From owner-svn-src-all@freebsd.org Sun Jul 24 00:06:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC28DBA2CF7; Sun, 24 Jul 2016 00:06:47 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-yw0-x233.google.com (mail-yw0-x233.google.com [IPv6:2607:f8b0:4002: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 5B43C1368; Sun, 24 Jul 2016 00:06:47 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-yw0-x233.google.com with SMTP id u134so132750599ywg.3; Sat, 23 Jul 2016 17:06:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:cc:message-id:from:to:in-reply-to:content-transfer-encoding :mime-version:subject:date:references; bh=s+puyyN9GrDzFbiibvcHy6EoQCE8tlgLDb/cNvW+CRk=; b=XqJNCtJcIfry5pnimg1saeuBn9ZB/nxPpJx97XunLhY09krKAirX6AQ9q/5/Syq8zb u5UXeFO4jS5hiosXJY7FkGMiHwmx989SGECM8JKD/utZpjhmYPfpVygOPIbTC2oeaaUa B4VyuiXxSdy8XB/P2/tLaWTNk74jxdaASyZ6L04ZM7hXsC9afiuSpEt1UxpeB6HnmWw5 N1EJ+Hzvqed15Clqf6NaMeC2nCl+HLjWsydqU/LDVQMx6STO7FxSceeLfYMCIjn4NNq4 +bgxfbY/Bx4U9o/Rgtaq6CU3Uwt/6fSPRLgGNnSoy9afCj0AancO96bo34GxCDGaJ7Ss ZZzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:cc:message-id:from:to:in-reply-to :content-transfer-encoding:mime-version:subject:date:references; bh=s+puyyN9GrDzFbiibvcHy6EoQCE8tlgLDb/cNvW+CRk=; b=gokbim1el2pnhoSZXBRdkmB347/wz+MZJxJvIny+fo1Fr2GcjIVobPji/GTnP8vrH1 ROX5vEatsIi+ahK8CSB7R3zjVXcBfgYv5hANxEQ8cg0vxZkdWI7lxd3W0DUL+Kye33rb 7YDY8lU/cKZ+eZupo+ui3C46VhhrycgQKvSOZB4BsiSmMaW1rWzvVttMO/zV+g7Bfifq 5LJhLsh3eKeTXVeqBkITcLzaTT50EHy6XLG2gPblt0nBeuT9Bl/iAyQHJWVpIpIQf3Ue ySqCK0GLk0RoN1e2MqD8WPj/KhAqIiiJIHPoeYHWq6Cbyor0xm7SEHXu9uCBH9AQBnOk zdmg== X-Gm-Message-State: AEkoouulA4a5oR08Z0lIjW6eIZfS8P2YwXEWNi2n7b+PX5aMcmC2sKJgdhL/GT5zBdrWLw== X-Received: by 10.37.0.198 with SMTP id 189mr9152623yba.119.1469318806241; Sat, 23 Jul 2016 17:06:46 -0700 (PDT) Received: from [172.20.1.77] (rrcs-71-43-12-11.se.biz.rr.com. [71.43.12.11]) by smtp.gmail.com with ESMTPSA id x126sm8428847ywg.12.2016.07.23.17.06.44 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 23 Jul 2016 17:06:45 -0700 (PDT) Sender: Justin Hibbits Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <114ED1ED-C709-4C80-B9A3-A0609445AB5E@freebsd.org> From: Justin Hibbits To: Bruce Evans In-Reply-To: <20160723130540.Q2164@besplex.bde.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: svn commit: r303209 - head/sys/powerpc/booke Date: Sat, 23 Jul 2016 20:06:28 -0500 References: <201607230227.u6N2Rgiw002223@repo.freebsd.org> <20160723130540.Q2164@besplex.bde.org> X-Mailer: Apple Mail (2.936) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 00:06:47 -0000 On Jul 22, 2016, at 10:28 PM, Bruce Evans wrote: > On Sat, 23 Jul 2016, Justin Hibbits wrote: > >> Log: >> Use label math instead of hard-coding offsets for return addresses. >> >> Though the chances of the code in these sections changing are low, >> future-proof >> the sections and use label math. > > Not with numeric labels. I'm not future proofing it against label changes, I'm future proofing it against instruction additions/subtractions. > >> Renumber the surrounding areas to avoid duplicate label numbers. > > New numeric labels tend to move the addresses of old labels. > Renumbering > to give unique numeric labels more than defeats their reason for > existence -- > you have to manage them on every change to a label anywhere in the > file > (and perhaps in macros and included files). You never get a error for > a duplicated numeric label. Non-unique numeric labels are also a good > obfuscation. Given a branch to 1f or 1b, grepping the file for 1: may > find many labels 1:. You have to examine all the labels named 1: or > search only near the jump to see where 1 is. Its name is supposed to > not matter, but perhaps it does. I debated renumbering, and in my first iteration I didn't, but decided to for final commit, just for pure aesthetic purposes. In the future, I expect a lot of 0: labels for number labels, but as you mention below, named labels should be used for most labels anyway. > > Numeric labels should only be used in macros, and then only when the > macro processor is too feeble to support generating unique non-numeric > labels. Standard cpp is too feeble for this. > > I managed to remove all numeric labels in i386/exception.s (except in > macros and included files), and none came back. amd64/exception.S has > 19 of them, 7 with the additional style bug of being on a line with > a statement or comment. > > Bruce - Justin From owner-svn-src-all@freebsd.org Sun Jul 24 01:31:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6DFEB98CDE; Sun, 24 Jul 2016 01:31:42 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 942FA11F9; Sun, 24 Jul 2016 01:31:42 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O1Vf7o020388; Sun, 24 Jul 2016 01:31:41 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O1VfOH020387; Sun, 24 Jul 2016 01:31:41 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201607240131.u6O1VfOH020387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sun, 24 Jul 2016 01:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303253 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 01:31:42 -0000 Author: loos Date: Sun Jul 24 01:31:41 2016 New Revision: 303253 URL: https://svnweb.freebsd.org/changeset/base/303253 Log: Allow the use of micphy on am335x devices. The Micrel PHYs reads the optional external delays from DTB. Tested and used by uBMC and uFW. Sponsored by: Rubicon Communications (Netgate) Modified: head/sys/arm/ti/files.ti Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Sat Jul 23 22:50:59 2016 (r303252) +++ head/sys/arm/ti/files.ti Sun Jul 24 01:31:41 2016 (r303253) @@ -20,6 +20,7 @@ arm/ti/ti_i2c.c optional ti_i2c arm/ti/ti_sdhci.c optional sdhci arm/ti/ti_spi.c optional ti_spi +dev/mii/micphy.c optional micphy dev/uart/uart_dev_ti8250.c optional uart dev/uart/uart_dev_ns8250.c optional uart From owner-svn-src-all@freebsd.org Sun Jul 24 04:38:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95E96BA0678; Sun, 24 Jul 2016 04:38:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DD981F56; Sun, 24 Jul 2016 04:38:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O4coGS090418; Sun, 24 Jul 2016 04:38:50 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O4coKF090414; Sun, 24 Jul 2016 04:38:50 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607240438.u6O4coKF090414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 24 Jul 2016 04:38:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303254 - in stable: 10 10/share/man/man9 10/sys/sys 9 9/share/man/man9 9/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 04:38:51 -0000 Author: jhb Date: Sun Jul 24 04:38:50 2016 New Revision: 303254 URL: https://svnweb.freebsd.org/changeset/base/303254 Log: MFC 300253: Remove dangling references to rman_await_resource(). This function was removed when RF_TIMESHARE was removed a couple of years ago. Modified: stable/10/ObsoleteFiles.inc stable/10/share/man/man9/Makefile stable/10/share/man/man9/rman.9 stable/10/sys/sys/rman.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/ObsoleteFiles.inc (contents, props changed) stable/9/share/man/man9/Makefile stable/9/share/man/man9/rman.9 stable/9/sys/sys/rman.h Directory Properties: stable/9/ (props changed) stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Sun Jul 24 01:31:41 2016 (r303253) +++ stable/10/ObsoleteFiles.inc Sun Jul 24 04:38:50 2016 (r303254) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20160723: stale MLINK removed +OLD_FILES+=usr/share/man/man9/rman_await_resource.9.gz # 20160216: Remove obsolete unbound-control-setup OLD_FILES+=usr/sbin/unbound-control-setup # 20151222: liblzma header Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Sun Jul 24 01:31:41 2016 (r303253) +++ stable/10/share/man/man9/Makefile Sun Jul 24 04:38:50 2016 (r303254) @@ -1074,7 +1074,6 @@ MLINKS+=resource_int_value.9 resource_lo resource_int_value.9 resource_string_value.9 MLINKS+=rman.9 rman_activate_resource.9 \ rman.9 rman_adjust_resource.9 \ - rman.9 rman_await_resource.9 \ rman.9 rman_deactivate_resource.9 \ rman.9 rman_fini.9 \ rman.9 rman_first_free_region.9 \ Modified: stable/10/share/man/man9/rman.9 ============================================================================== --- stable/10/share/man/man9/rman.9 Sun Jul 24 01:31:41 2016 (r303253) +++ stable/10/share/man/man9/rman.9 Sun Jul 24 04:38:50 2016 (r303254) @@ -25,14 +25,13 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2014 +.Dd May 19, 2016 .Dt RMAN 9 .Os .Sh NAME .Nm rman , .Nm rman_activate_resource , .Nm rman_adjust_resource , -.Nm rman_await_resource , .Nm rman_deactivate_resource , .Nm rman_fini , .Nm rman_init , @@ -67,8 +66,6 @@ .Ft int .Fn rman_adjust_resource "struct resource *r" "u_long start" "u_long end" .Ft int -.Fn rman_await_resource "struct resource *r" "int pri2" "int timo" -.Ft int .Fn rman_deactivate_resource "struct resource *r" .Ft int .Fn rman_fini "struct rman *rm" @@ -387,23 +384,6 @@ flag. If other consumers are waiting for this range, it will wakeup their threads. .Pp The -.Fn rman_await_resource -function performs an asynchronous wait for a resource -.Fa r -to become inactive, that is, for the -.Dv RF_ACTIVE -flag to be cleared. -It is used to enable cooperative sharing of a resource -which can only be safely used by one thread at a time. -The arguments -.Fa pri -and -.Fa timo -are passed to the -.Fn rman_await_resource -function. -.Pp -The .Fn rman_get_start , .Fn rman_get_end , .Fn rman_get_size , Modified: stable/10/sys/sys/rman.h ============================================================================== --- stable/10/sys/sys/rman.h Sun Jul 24 01:31:41 2016 (r303253) +++ stable/10/sys/sys/rman.h Sun Jul 24 04:38:50 2016 (r303254) @@ -117,7 +117,6 @@ TAILQ_HEAD(rman_head, rman); int rman_activate_resource(struct resource *r); int rman_adjust_resource(struct resource *r, u_long start, u_long end); -int rman_await_resource(struct resource *r, int pri, int timo); int rman_first_free_region(struct rman *rm, u_long *start, u_long *end); bus_space_handle_t rman_get_bushandle(struct resource *); bus_space_tag_t rman_get_bustag(struct resource *); From owner-svn-src-all@freebsd.org Sun Jul 24 04:38:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05EB8BA067E; Sun, 24 Jul 2016 04:38:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7D8C1F57; Sun, 24 Jul 2016 04:38:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O4cpHb090427; Sun, 24 Jul 2016 04:38:51 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O4corb090423; Sun, 24 Jul 2016 04:38:50 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607240438.u6O4corb090423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 24 Jul 2016 04:38:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r303254 - in stable: 10 10/share/man/man9 10/sys/sys 9 9/share/man/man9 9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 04:38:52 -0000 Author: jhb Date: Sun Jul 24 04:38:50 2016 New Revision: 303254 URL: https://svnweb.freebsd.org/changeset/base/303254 Log: MFC 300253: Remove dangling references to rman_await_resource(). This function was removed when RF_TIMESHARE was removed a couple of years ago. Modified: stable/9/ObsoleteFiles.inc (contents, props changed) stable/9/share/man/man9/Makefile stable/9/share/man/man9/rman.9 stable/9/sys/sys/rman.h Directory Properties: stable/9/ (props changed) stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/ObsoleteFiles.inc stable/10/share/man/man9/Makefile stable/10/share/man/man9/rman.9 stable/10/sys/sys/rman.h Directory Properties: stable/10/ (props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Sun Jul 24 01:31:41 2016 (r303253) +++ stable/9/ObsoleteFiles.inc Sun Jul 24 04:38:50 2016 (r303254) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20160723: stale MLINK removed +OLD_FILES+=usr/share/man/man9/rman_await_resource.9.gz # 20151025: remove links to removed/unimplemented mbuf(9) macros OLD_FILES+=usr/share/man/man9/MEXT_ADD_REF.9.gz OLD_FILES+=usr/share/man/man9/MEXTFREE.9.gz Modified: stable/9/share/man/man9/Makefile ============================================================================== --- stable/9/share/man/man9/Makefile Sun Jul 24 01:31:41 2016 (r303253) +++ stable/9/share/man/man9/Makefile Sun Jul 24 04:38:50 2016 (r303254) @@ -1035,7 +1035,6 @@ MLINKS+=resource_int_value.9 resource_lo resource_int_value.9 resource_string_value.9 MLINKS+=rman.9 rman_activate_resource.9 \ rman.9 rman_adjust_resource.9 \ - rman.9 rman_await_resource.9 \ rman.9 rman_deactivate_resource.9 \ rman.9 rman_fini.9 \ rman.9 rman_first_free_region.9 \ Modified: stable/9/share/man/man9/rman.9 ============================================================================== --- stable/9/share/man/man9/rman.9 Sun Jul 24 01:31:41 2016 (r303253) +++ stable/9/share/man/man9/rman.9 Sun Jul 24 04:38:50 2016 (r303254) @@ -25,14 +25,13 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2014 +.Dd May 19, 2016 .Dt RMAN 9 .Os .Sh NAME .Nm rman , .Nm rman_activate_resource , .Nm rman_adjust_resource , -.Nm rman_await_resource , .Nm rman_deactivate_resource , .Nm rman_fini , .Nm rman_init , @@ -67,8 +66,6 @@ .Ft int .Fn rman_adjust_resource "struct resource *r" "u_long start" "u_long end" .Ft int -.Fn rman_await_resource "struct resource *r" "int pri2" "int timo" -.Ft int .Fn rman_deactivate_resource "struct resource *r" .Ft int .Fn rman_fini "struct rman *rm" @@ -387,23 +384,6 @@ flag. If other consumers are waiting for this range, it will wakeup their threads. .Pp The -.Fn rman_await_resource -function performs an asynchronous wait for a resource -.Fa r -to become inactive, that is, for the -.Dv RF_ACTIVE -flag to be cleared. -It is used to enable cooperative sharing of a resource -which can only be safely used by one thread at a time. -The arguments -.Fa pri -and -.Fa timo -are passed to the -.Fn rman_await_resource -function. -.Pp -The .Fn rman_get_start , .Fn rman_get_end , .Fn rman_get_size , Modified: stable/9/sys/sys/rman.h ============================================================================== --- stable/9/sys/sys/rman.h Sun Jul 24 01:31:41 2016 (r303253) +++ stable/9/sys/sys/rman.h Sun Jul 24 04:38:50 2016 (r303254) @@ -117,7 +117,6 @@ TAILQ_HEAD(rman_head, rman); int rman_activate_resource(struct resource *r); int rman_adjust_resource(struct resource *r, u_long start, u_long end); -int rman_await_resource(struct resource *r, int pri, int timo); int rman_first_free_region(struct rman *rm, u_long *start, u_long *end); bus_space_handle_t rman_get_bushandle(struct resource *); bus_space_tag_t rman_get_bustag(struct resource *); From owner-svn-src-all@freebsd.org Sun Jul 24 04:39:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E514DBA071B; Sun, 24 Jul 2016 04:39:06 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [192.203.228.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C69D61355; Sun, 24 Jul 2016 04:39:06 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 711F5CBB; Sat, 23 Jul 2016 21:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1469335145; bh=fTJvrAD+E0CJEMJWktmXhRtAINLO/w6noqTE01hSHlA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dL9tlYkKba13XfqOPVe88v5GviiTCunMOkStMfrpnP06LDnCuVFsPj0pFQ/VFHT1d tdHSqfYdwmfqV3g9ecM8aebM+yuskUuDAcuLDQ7JAEdGlrVXooaOqnVJdUL2WvDSKt u8/BsNkbItSP1/hTJFKdt3T95qIcNRI8aNUQkrEs= From: Peter Wemm To: svn-src-head@freebsd.org Cc: "Andrey V. Elsukov" , src-committers@freebsd.org, svn-src-all@freebsd.org, "re@freebsd.org" Subject: Re: svn commit: r303019 - head/sys/geom Date: Sat, 23 Jul 2016 21:39 -0700 Message-ID: <3277576.dFZ2EGo2Fh@overcee.wemm.org> User-Agent: KMail/4.14.3 (FreeBSD/11.0-ALPHA6; KDE/4.14.3; amd64; ; ) In-Reply-To: <201607190536.u6J5aLl7015268@repo.freebsd.org> References: <201607190536.u6J5aLl7015268@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4542475.Ev8TQeSbU3"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 04:39:07 -0000 --nextPart4542475.Ev8TQeSbU3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Tuesday, July 19, 2016 05:36:21 AM Andrey V. Elsukov wrote: > Author: ae > Date: Tue Jul 19 05:36:21 2016 > New Revision: 303019 > URL: https://svnweb.freebsd.org/changeset/base/303019 >=20 > Log: > Use g_resize_provider() to change the size of GEOM_DISK provider, > when it is being opened. This should fix the possible loss of a res= ize > event when disk capacity changed. Are you sure about this? We have machines in the freebsd.org cluster t= hat now=20 panic on boot: Trying to mount root from zfs:zroot []... GEOM_PART: da0 was automatically resized. Use `gpart commit da0` to save changes or `gpart undo da0` to revert = them. GEOM_PART: integrity check failed (da0, GPT) Fatal trap 12: page fault while in kernel mode cpuid =3D 1; apic id =3D 01 fault virtual address=09=3D 0x48 fault code=09=09=3D supervisor read data, page not present instruction pointer=09=3D 0x20:0xffffffff80740005 stack pointer=09 =3D 0x28:0xfffffe01f119db10 frame pointer=09 =3D 0x28:0xfffffe01f119db30 code segment=09=09=3D base 0x0, limit 0xfffff, type 0x1b =09=09=09=3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags=09=3D interrupt enabled, resume, IOPL =3D 0 current process=09=09=3D 13 (g_event) [ thread pid 13 tid 100019 ] Stopped at g_part_resize+0x35: testb $0x8,0x48(%rbx) db> where Tracing pid 13 tid 100019 td 0xfffff8000426fa00 g_part_resize() at g_part_resize+0x35/frame 0xfffffe01f119db30 g_resize_provider_event() at g_resize_provider_event+0xb5/frame 0xfffff= e01f119d0 g_run_events() at g_run_events+0x20e/frame 0xfffffe01f119dbb0 .. It is exploding here: g_part_resize(struct g_consumer *cp) { struct g_part_table *table; G_PART_TRACE((G_T_TOPOLOGY, "%s(%s)", __func__, cp->provider->n= ame)); g_topology_assert(); table =3D cp->geom->softc; if (table->gpt_opened =3D=3D 0) { ^^^^^^^^^ (table is null) Are you creating events too soon now? At the very least, please reconsider having this MFC'ed without getting= to the=20 bottom of it. =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart4542475.Ev8TQeSbU3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJXlEZkAAoJEDXWlwnsgJ4EnC0IAK/3ZRLGACt3gTAWLETbIcJe LGiZw4R9UlNZmbhh49q7wXOIfrlgRFyCh13HSm34CyEFglbE6RMAMiDcMaLNO6LD XIqWJ2gmQxiOU8tdcXign4QxWnO1G7gycZDOnwIRzULsqi2cUmXP9zUomlXoBA08 rtMmHJo+vb9CbUNfu92P+aw/XydAN3CLIwLSHKl52wF4wvEgwv8AP34VWf3fjBWp weLMsslc43EjvCSchDZpf+eFWvBtH35r5aUm3Aty2agnUkhpnnKBkJ2eP7gMl2G3 30qAZZS8m+NGz0FR/RHVpYXgj7UhmuNWUjMXkLq1FX4Oy7/3m0MRKTrKEAhZb8g= =48mN -----END PGP SIGNATURE----- --nextPart4542475.Ev8TQeSbU3-- From owner-svn-src-all@freebsd.org Sun Jul 24 05:24:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11287BA10BD; Sun, 24 Jul 2016 05:24:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4AC015E5; Sun, 24 Jul 2016 05:24:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O5OAmM008947; Sun, 24 Jul 2016 05:24:10 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O5OANG008944; Sun, 24 Jul 2016 05:24:10 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607240524.u6O5OANG008944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 24 Jul 2016 05:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303255 - in stable: 10/share/man/man9 10/sys/dev/pci 9/share/man/man9 9/sys/dev/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 05:24:12 -0000 Author: jhb Date: Sun Jul 24 05:24:10 2016 New Revision: 303255 URL: https://svnweb.freebsd.org/changeset/base/303255 Log: MFC 302175: Add pci_get_max_payload() to fetch the PCI-express maximum payload size. Modified: stable/10/share/man/man9/pci.9 stable/10/sys/dev/pci/pci.c stable/10/sys/dev/pci/pcivar.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/share/man/man9/pci.9 stable/9/sys/dev/pci/pci.c stable/9/sys/dev/pci/pcivar.h Directory Properties: stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/share/man/man9/pci.9 ============================================================================== --- stable/10/share/man/man9/pci.9 Sun Jul 24 04:38:50 2016 (r303254) +++ stable/10/share/man/man9/pci.9 Sun Jul 24 05:24:10 2016 (r303255) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 23, 2015 +.Dd June 24, 2016 .Dt PCI 9 .Os .Sh NAME @@ -43,6 +43,7 @@ .Nm pci_find_extcap , .Nm pci_find_htcap , .Nm pci_find_pcie_root_port , +.Nm pci_get_max_payload , .Nm pci_get_max_read_req , .Nm pci_get_powerstate , .Nm pci_get_vpd_ident , @@ -95,6 +96,8 @@ .Ft device_t .Fn pci_find_pcie_root_port "device_t dev" .Ft int +.Fn pci_get_max_payload "device_t dev" +.Ft int .Fn pci_get_max_read_req "device_t dev" .Ft int .Fn pci_get_powerstate "device_t dev" @@ -436,6 +439,16 @@ or .Xr bus_activate_resource 9 . .Pp The +.Fn pci_get_max_payload +function returns the current maximum TLP payload size in bytes for a +PCI-express device. +If the +.Fa dev +device is not a PCI-express device, +.Fn pci_get_max_payload +returns zero. +.Pp +The .Fn pci_get_max_read_req function returns the current maximum read request size in bytes for a PCI-express device. Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Sun Jul 24 04:38:50 2016 (r303254) +++ stable/10/sys/dev/pci/pci.c Sun Jul 24 05:24:10 2016 (r303255) @@ -1881,6 +1881,22 @@ pci_ht_map_msi(device_t dev, uint64_t ad } int +pci_get_max_payload(device_t dev) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + int cap; + uint16_t val; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) + return (0); + val = pci_read_config(dev, cap + PCIER_DEVICE_CTL, 2); + val &= PCIEM_CTL_MAX_PAYLOAD; + val >>= 5; + return (1 << (val + 7)); +} + +int pci_get_max_read_req(device_t dev) { struct pci_devinfo *dinfo = device_get_ivars(dev); Modified: stable/10/sys/dev/pci/pcivar.h ============================================================================== --- stable/10/sys/dev/pci/pcivar.h Sun Jul 24 04:38:50 2016 (r303254) +++ stable/10/sys/dev/pci/pcivar.h Sun Jul 24 05:24:10 2016 (r303255) @@ -534,6 +534,7 @@ int pci_msix_device_blacklisted(device_t void pci_ht_map_msi(device_t dev, uint64_t addr); device_t pci_find_pcie_root_port(device_t dev); +int pci_get_max_payload(device_t dev); int pci_get_max_read_req(device_t dev); void pci_restore_state(device_t dev); void pci_save_state(device_t dev); From owner-svn-src-all@freebsd.org Sun Jul 24 05:24:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A8B7BA10CB; Sun, 24 Jul 2016 05:24:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E66015E7; Sun, 24 Jul 2016 05:24:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O5OBCD008955; Sun, 24 Jul 2016 05:24:11 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O5OBNs008952; Sun, 24 Jul 2016 05:24:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607240524.u6O5OBNs008952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 24 Jul 2016 05:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r303255 - in stable: 10/share/man/man9 10/sys/dev/pci 9/share/man/man9 9/sys/dev/pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 05:24:12 -0000 Author: jhb Date: Sun Jul 24 05:24:10 2016 New Revision: 303255 URL: https://svnweb.freebsd.org/changeset/base/303255 Log: MFC 302175: Add pci_get_max_payload() to fetch the PCI-express maximum payload size. Modified: stable/9/share/man/man9/pci.9 stable/9/sys/dev/pci/pci.c stable/9/sys/dev/pci/pcivar.h Directory Properties: stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/man/man9/pci.9 stable/10/sys/dev/pci/pci.c stable/10/sys/dev/pci/pcivar.h Directory Properties: stable/10/ (props changed) Modified: stable/9/share/man/man9/pci.9 ============================================================================== --- stable/9/share/man/man9/pci.9 Sun Jul 24 04:38:50 2016 (r303254) +++ stable/9/share/man/man9/pci.9 Sun Jul 24 05:24:10 2016 (r303255) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 5, 2015 +.Dd June 24, 2016 .Dt PCI 9 .Os .Sh NAME @@ -41,6 +41,7 @@ .Nm pci_find_dbsf , .Nm pci_find_device , .Nm pci_find_pcie_root_port , +.Nm pci_get_max_payload , .Nm pci_get_max_read_req , .Nm pci_get_powerstate , .Nm pci_get_vpd_ident , @@ -87,6 +88,8 @@ .Ft device_t .Fn pci_find_pcie_root_port "device_t dev" .Ft int +.Fn pci_get_max_payload "device_t dev" +.Ft int .Fn pci_get_max_read_req "device_t dev" .Ft int .Fn pci_get_powerstate "device_t dev" @@ -381,6 +384,16 @@ or .Xr bus_activate_resource 9 . .Pp The +.Fn pci_get_max_payload +function returns the current maximum TLP payload size in bytes for a +PCI-express device. +If the +.Fa dev +device is not a PCI-express device, +.Fn pci_get_max_payload +returns zero. +.Pp +The .Fn pci_get_max_read_req function returns the current maximum read request size in bytes for a PCI-express device. Modified: stable/9/sys/dev/pci/pci.c ============================================================================== --- stable/9/sys/dev/pci/pci.c Sun Jul 24 04:38:50 2016 (r303254) +++ stable/9/sys/dev/pci/pci.c Sun Jul 24 05:24:10 2016 (r303255) @@ -1775,6 +1775,22 @@ pci_ht_map_msi(device_t dev, uint64_t ad } int +pci_get_max_payload(device_t dev) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + int cap; + uint16_t val; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) + return (0); + val = pci_read_config(dev, cap + PCIER_DEVICE_CTL, 2); + val &= PCIEM_CTL_MAX_PAYLOAD; + val >>= 5; + return (1 << (val + 7)); +} + +int pci_get_max_read_req(device_t dev) { struct pci_devinfo *dinfo = device_get_ivars(dev); Modified: stable/9/sys/dev/pci/pcivar.h ============================================================================== --- stable/9/sys/dev/pci/pcivar.h Sun Jul 24 04:38:50 2016 (r303254) +++ stable/9/sys/dev/pci/pcivar.h Sun Jul 24 05:24:10 2016 (r303255) @@ -476,6 +476,7 @@ int pci_msix_device_blacklisted(device_t void pci_ht_map_msi(device_t dev, uint64_t addr); device_t pci_find_pcie_root_port(device_t dev); +int pci_get_max_payload(device_t dev); int pci_get_max_read_req(device_t dev); void pci_restore_state(device_t dev); void pci_save_state(device_t dev); From owner-svn-src-all@freebsd.org Sun Jul 24 05:27:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21F91BA11E3; Sun, 24 Jul 2016 05:27:22 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [192.203.228.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 024971944; Sun, 24 Jul 2016 05:27:21 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 0D9F6CD7; Sat, 23 Jul 2016 22:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1469338041; bh=lI6exy/p12z/3tykeZ/LEJdEI32/Dani5/7tQAXdkpo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bjTAlJSCvhFuOJMzXBHCivJHzH7BPZfy9SOvd1XgL2w/3Cl8SFeDkoK+umE4NX1i5 +FTYh9aX9eo5Shj041Zv8lo0zFNE7ViLc0TahoBAeUyi6GPskrNDEn6DfFn7gA1d65 Swq95dTgrKdq+pExZfvd9iELn6MsB9OVBIrDtJpg= From: Peter Wemm To: svn-src-all@freebsd.org Cc: svn-src-head@freebsd.org, "Andrey V. Elsukov" , src-committers@freebsd.org Subject: Re: svn commit: r303019 - head/sys/geom Date: Sat, 23 Jul 2016 22:27:15 -0700 Message-ID: <6198652.UmU69kS6Zt@overcee.wemm.org> User-Agent: KMail/4.14.3 (FreeBSD/11.0-ALPHA6; KDE/4.14.3; amd64; ; ) In-Reply-To: <3277576.dFZ2EGo2Fh@overcee.wemm.org> References: <201607190536.u6J5aLl7015268@repo.freebsd.org> <3277576.dFZ2EGo2Fh@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2853987.LzzQhyQHJt"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 05:27:22 -0000 --nextPart2853987.LzzQhyQHJt Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Saturday, July 23, 2016 09:39:00 PM Peter Wemm wrote: > On Tuesday, July 19, 2016 05:36:21 AM Andrey V. Elsukov wrote: > > Author: ae > > Date: Tue Jul 19 05:36:21 2016 > > New Revision: 303019 > > URL: https://svnweb.freebsd.org/changeset/base/303019 > >=20 > > Log: > > Use g_resize_provider() to change the size of GEOM_DISK provider,= > > when it is being opened. This should fix the possible loss of a r= esize > > event when disk capacity changed. >=20 > Are you sure about this? We have machines in the freebsd.org cluster= that > now panic on boot: >=20 > Trying to mount root from zfs:zroot []... > GEOM_PART: da0 was automatically resized. > Use `gpart commit da0` to save changes or `gpart undo da0` to rever= t them. > GEOM_PART: integrity check failed (da0, GPT) >=20 > Fatal trap 12: page fault while in kernel mode > cpuid =3D 1; apic id =3D 01 > fault virtual address=09=3D 0x48 > fault code=09=09=3D supervisor read data, page not present > instruction pointer=09=3D 0x20:0xffffffff80740005 > stack pointer=09 =3D 0x28:0xfffffe01f119db10 > frame pointer=09 =3D 0x28:0xfffffe01f119db30 > code segment=09=09=3D base 0x0, limit 0xfffff, type 0x1b > =09=09=09=3D DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags=09=3D interrupt enabled, resume, IOPL =3D 0 > current process=09=09=3D 13 (g_event) > [ thread pid 13 tid 100019 ] > Stopped at g_part_resize+0x35: testb $0x8,0x48(%rbx) >=20 >=20 >=20 > db> where > Tracing pid 13 tid 100019 td 0xfffff8000426fa00 > g_part_resize() at g_part_resize+0x35/frame 0xfffffe01f119db30 > g_resize_provider_event() at g_resize_provider_event+0xb5/frame > 0xfffffe01f119d0 g_run_events() at g_run_events+0x20e/frame > 0xfffffe01f119dbb0 > .. >=20 > It is exploding here: > g_part_resize(struct g_consumer *cp) > { > struct g_part_table *table; >=20 > G_PART_TRACE((G_T_TOPOLOGY, "%s(%s)", __func__, > cp->provider->name)); g_topology_assert(); >=20 > table =3D cp->geom->softc; > if (table->gpt_opened =3D=3D 0) { > ^^^^^^^^^ (table is null) >=20 > Are you creating events too soon now? Sometimes da0 fails, other times da1 fails.. and sometimes it is comple= tely=20 fine. There is some sort of race going on with this change during the = very=20 first moments of bootup. =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart2853987.LzzQhyQHJt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJXlFG0AAoJEDXWlwnsgJ4EmLkH/A/haQXONwKWt/OP1PVowC2P ZjSzFQpHogYDJXo0HqENWYD6zNUCgz89lAYBV0jZ/m2vgEmQ3tNL2KD86j8a7Pj/ IsVgBebYT79hrVkBGs5E02iGTNEiDIe0aFupIKdouijiXbDf84eL00gIEJpOGWzy Fh6/Gtjn5LRNK6K9fA6sKJN2O3MH5kxTKqRFmw6/B07Z6vKKr3aG5vQSuISP5GV7 KOi9A1TtdrEpU2Q7OmMMone5zVWchHsmXPX4l1FkUBvxuBz786k6ZVFkHMw9CSjH RSAAB/15kc480IXf114DOL4Hd2oTXpwGaetzb3C8nxDYQIrJsMywwQ2BOyFLE54= =VtCP -----END PGP SIGNATURE----- --nextPart2853987.LzzQhyQHJt-- From owner-svn-src-all@freebsd.org Sun Jul 24 07:45:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12109BA3314; Sun, 24 Jul 2016 07:45:25 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mail.miracle.cz (mail.miracle.cz [193.84.128.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.miracle.cz", Issuer "Miracle Group Root CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E22A1F54; Sun, 24 Jul 2016 07:45:24 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from [193.84.128.50] (meloun.ad.miracle.cz [193.84.128.50]) by mail.miracle.cz (Postfix) with ESMTPSA id 0EC853ACA4; Sun, 24 Jul 2016 09:45:20 +0200 (CEST) Subject: Re: svn commit: r301453 - in head/sys: arm/arm arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/mips sys To: Nathan Whitehorn , Svatopluk Kraus , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201606051620.u55GKD5S066398@repo.freebsd.org> <578E0B5D.3070105@FreeBSD.org> <578F6075.7010500@FreeBSD.org> <05a80ac6-4285-ec9d-36e9-2f92c609f746@freebsd.org> <57907B0F.9070204@FreeBSD.org> <9d2a224c-b787-2875-5984-a7a2354e8695@freebsd.org> <57934ABD.6010807@FreeBSD.org> <4e7a3e8f-cc21-f5f2-e3e0-4dbd554a4cd0@freebsd.org> From: Michal Meloun X-Enigmail-Draft-Status: N1110 Message-ID: <5794720F.4050303@FreeBSD.org> Date: Sun, 24 Jul 2016 09:45:19 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <4e7a3e8f-cc21-f5f2-e3e0-4dbd554a4cd0@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.miracle.cz); Sun, 24 Jul 2016 09:45:20 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 07:45:25 -0000 Dne 23.07.2016 v 20:35 Nathan Whitehorn napsal(a): > > > On 07/23/16 03:45, Michal Meloun wrote: >> Dne 21.07.2016 v 17:53 Nathan Whitehorn napsal(a): >>> >>> On PowerPC, GENERIC64 supports FDT systems (some IBM hardware), OFW >>> systems (Macs, some IBM hardware), systems with no device trees at >>> all (old-style PS3), and systems with a mixture of device tree and >>> no device tree (new-style PS3). On these, there is a mixture of >>> "real" interrupts and GPIO-type interrupts. There is no limitation >>> that this be used only for device-tree-type systems. >>> >>> The system requires two things: an interrupt domain key and an >>> arbitrary unique byte string describing the interrupt. When running >>> with a device tree, these are set to the phandle of the >>> interrupt-parent and the contents of the device tree interrupt >>> specifier, respectively, and the system was of course developed with >>> that in mind. But they don't need to be, and often aren't. You could >>> make the domain an element of an enum (where "ACPI" is a choice, for >>> instance -- this is what PS3 does), or set it to a pointer to a >>> device_t, or really anything you like. Similarly, the interrupt >>> specifier is totally free-form. >> >> Yes, I agree. and i think that we followed the same direction. But i >> see two problems with this approach. >> - in some cases (OFW, device_t) you don't have control over domain >> key value, so you cannot guarantee its uniqueness. >> Of course, probability of collision is low, but it is. > > We could solve this in a number of ways, for example widening to 64 > bits, or adding another value (domain type, for example). You could > also make an acpi_bus_map_intr() to go with the OFW one that connect > in some machine-dependent code if you have fundamentally incompatible > bus enumeration mechanisms that you expect to exist simultaneously -- > but, of course, no systems like this seem to actually exist, so the > problem is both easily solved and totally theoretical. > >> - within ofw_bus_map_intr() (or later - at the time when byte string >> must be decoded) you are not able (easily) to differentiate >> between different formats, thus you are not able to select >> appropriate decoder. The GPIO controller, for example, >> must be able to handle interrupts defined by standard OFW property, >> or by pair concurrently. > > In principle, you could solve that as above, or by registering a > second interrupt domain for the same controller. > > In practice, it doesn't matter since, in the GPIO case, for example, > the GPIO controller is never itself also a normal interrupt controller > (i.e. the GIC and GPIO controller are always different devices). As > such, the theoretical does not occur in practice. form https://svnweb.freebsd.org/base/head/sys/gnu/dts/arm/tegra124-jetson-tk1.dts?revision=295436&view=markup#l1380 "interrupts = ; " Do you want more examples ? > >> For this reason we makes domain key composite, in our model, the >> domain key consist of "domain key type" >> and "domain key value". This composite key guarantees uniqueness and >> it also allows to select proper parser for byte string. > > Yes, but this solves what is a nonexistant problem by making the > system substantially less flexible and more invasive. Which is not a > good tradeoff. > I think that existence of problem is confirmed in the above example . Quote from previous paragraph: "We could solve this in a number of ways, ... , or adding another value (domain type, for example)." What can I say more ... >> This is, imho, only one difference between us. > > One of many, yes. > >> >>> You could, for instance, set it to one of the structures introduced >>> in r301453 if you wanted to. >>> >>> I would have zero problems with changing the prototype of the >>> existing dev/ofw function to something more generic in name, like: >>> >>> bus_map_intr(device_t dev, uintptr_t iparent, size_t intrlen, void >>> *intr) >>> >>> instead of the existing equivalent: >>> >>> ofw_bus_map_intr(device_t dev, phandle_t iparent, int icells, >>> pcell_t *intr) >>> >> Our bus_map_intr() method is not indeed as replacement of >> ofw_bus_map_intr(). Its evolution of "how we can store more complex >> data to resource list (from bus enumerator) and transfer it to >> bus_allocate_resource() and/or to bus_setup_intr()" in driver >> independent way. We found no reasonable way to do it, so we postponed >> reading of properties to bus_allocate_resource() time. > > Right, but that is (a) a solved problem with ofw_bus_map_intr() and > (b) this code doesn't solve it as completely. What does it let you do > that the existing code does not? There has not been a single concrete > example of something anyone wants to do on actual hardware so far in > this discussion. > >> But now jhb@ gives us alternative and I must say that this looks >> like a clean and elegant way how to make this (assuming that we can >> expand resource_list_entry by pointer to alloc_resource_args) > > Except that jhb@'s suggestion doesn't actually work for interrupts for > the reasons I and others have pointed out. We could make such a > system, but it would be a different one. > >> >>>> By this, one byte string in OFW encoding can describe one IRQ and >>>> exactly same string in UEFI encoding can describe different IRQ. >>>> Or, in reverse, OFW and UEFI can describe same (and compatible) IRQ >>>> by two different strings. >>>> This is exact reason, why we discards virtual IRQ idea and I think >>>> that this fact is root issue of this clash. >>>> Probably it doesn't make sense to talk about others, unless we can >>>> find consensus on this. >>> >>> You have the larger problem if you end up in this situation that you >>> are enumerating the hardware by two different and incompatible >>> techniques. There simply is no way to solve this unless you either >>> (a) segregate the system into an ACPI-enumerated domain and an >>> OF-enumerated domain, in which case the problem vanishes, (b) >>> discard one enumeration, which is what arm64 does and will always >>> do, according to Andrew in another post, or (c) make some incredibly >>> complex merging code that would naturally handle interrupts with >>> everything else. So I don't think this is an actual, real problem. >>> >> I think that above proposed solution resolves this gracefully. > > Assuming you are talking about jhb's decoration plan in the bus > hierarchy, it doesn't actually work for interrupts at all because of > lateral connections and circular dependencies. > >> >>> >>>>> >>>>>> >>>>>>> 2. It partially duplicates the functionality of >>>>>>> OFW_BUS_MAP_INTR(), but is both problematically more general and >>>>>>> less flexible (it has requirements on timing of PIC attachment >>>>>>> vs. driver resource allocation) >>>>>> OFW_BUS_MAP_INTR() can parse only OFW based data and expect >>>>>> that parsed data are magicaly stored within the call. >>>>>> The new method, bus_map_intr(), can parse data from multiple >>>>>> sources (OFW, UEFI / ACPI, synthetic[gpio device + pin >>>>>> number]). It also returns parsed data back to caller. >>>>> >>>>> That is not true. It works as long as you can specify the >>>>> interrupt state as a 32-bit key of some kind for the PIC and a >>>>> string of arbitrary data, which works with all of those. You could >>>>> even make the interrupt data be a pointer to exactly the structs >>>>> you have chosen to define here. >>>> Nope, in heterogeneous world, same string can describe two >>>> different IRQs and/or two different strings can describe single IRQ >>>> in compatible manner. >>> >>> Can you give *any* concrete example of this that doesn't involve >>> mixed ACPI/FDT enumeration of a single system where devices appear >>> in both trees, which doesn't actually ever happen? >> GPIO - its interrupt function can be accessed by regular >> "interrupts" property, or it can be derived from GPIO pin. > > The GPIO controller has one or more interrupts assigned to it that are > part of its parent's interrupt domain. It cascades them to one or more > virtual interrupts that belong to its own domain. Where is the > ambiguity or complication here? >>> >>>>> >>>>>> >>>>>>> 3. It is not fully transparent to end code. Since it happens at >>>>>>> bus_alloc_resource() time, it is complicated to get the >>>>>>> appropriate values for IRQs constructed by composite techniques >>>>>>> (interrupt-map vs. interrupts vs. hand allocation vs. PCI >>>>>>> routing, for example). >>>>>> I don't see any limitation - can you be more exact? Why is not >>>>>> transparent? Why is more complicated ? >>>>> >>>>> Suppose that a PCI device adds more IRQs to its resource list or >>>>> modifies the ordering. How is whatever bus layer supposed to do >>>>> something sensible at allocation time? It requires that RID >>>>> numbers mean something to the parent bus after assignment, which >>>>> is not guaranteed by anything and is, in more than handful of >>>>> cases I think of, not true in practice. >>>> Sure. And since the new code allows delivering resources in RL, so >>>> I don't see any limitation here. >>> >>> It indexed mapping by RID and then searches interrupt lists by that >>> to get the interrupt-parent. This is fundamentally a broken design >>> if the child needs to, say, add a second interrupt to its RL on a >>> different interrupt-parent. >> ?? I don't understand. The new code doesn't need this. > > int bus_generic_map_intr(device_t dev, device_t child, int *rid, > rman_res_t *start, rman_res_t *end, > rman_res_t *count, struct intr_map_data > **imd); > > This works either by rid or by rman_res_t. In the event of a > self-assigned interrupt from the child, which is a fairly common case, > neither of these values are meaningfully parseable by the bus parent, > especially if the interrupt is on a different controller. The main > issue is that this code goes back to the device tree according to the > *parent*'s idea of how it should be parsed and there are many cases > (GPIO interrupts, for example) when the *child* needs to amend the > list in a different way. >> >>> >>>> >>>>> >>>>>>> It is much easier to do this correctly at bus attach time when >>>>>>> the resource lists are made (how PPC does it). >>>>>>> >>>>>> I don't agree. I don't agree. Making this at bus attach time >>>>>> leads into complicated 'virtual' IRQ infrastructure, with many >>>>>> unresolved corner cases. >>>>> >>>>> Which unresolved corner cases? This has been working correctly on >>>>> a number of platforms in both FreeBSD and Linux for many years. >>>> Nope, it doesn't work for ARM yet (for GPIO interrupts for >>>> example) and Linux uses EPROBE_DEFER mechanism for a long time. >>>> See: http://lxr.free-electrons.com/source/drivers/base/platform.c#L87 >>> >>> There is some missing code on ARM (probably about 30 minutes of work >>> to make it match PowerPC) to make it work in an ideal case, sure, >>> but there is no reason you could not go out right now, with the >>> existing code, and implement GPIO interrupts by declaring the GPIO >>> driver as an interrupt controller. >>> >>> Can you give any concrete case of something that doesn't work? >> GPIO again. How you can allocate interrupt associated with given gpio >> pin installed by "cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;" > > You parse that as an interrupt on a interrupt domain associated with > the GPIO controller referenced by &gpio. In pseudo-code: > > int irq = ofw_bus_map_intr(dev, <&gpio>, ncells, GPIO_ACTIVE_LOW>); > The GPIO controller, meanwhile, has registered an interrupt domain for > <&gpio> and is asked to decode and configure the interrupt defined by > , which it knows how to parse. This > is simple and straightforward. And again and again: We have "cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;" and interrupt-parent = <&gpio>; "interrupts = ; " in one tree. And we need to get a interrupt in both variants. > >> >>>> >>>>> >>>>>> >>>>>>> (1) is easy to fix without API changes, but (2) and (3) are >>>>>>> fundamental architectural problems that will bite us immediately >>>>>>> down the road and cause a permanent schism between OF support on >>>>>>> different platforms. >>>>>>> >>>>>>> Let me describe how this is handled on PowerPC (Linux on PPC >>>>>>> solves the problem the same way). When constructing a resource >>>>>>> list, bus drivers that construct them from OF properties call >>>>>>> ofw_bus_map_intr() with the interrupt parent phandle and the >>>>>>> array of cells corresponding to the interrupt. This thunks >>>>>>> immediately to nexus, which connects to code in intr_machdep.c. >>>>>>> Code there assigns a unique made-up virtual IRQ and returns it, >>>>>>> caching the interrupt parent ID and opaque interrupt data (if >>>>>>> the same string of data reappears later, you get back the same >>>>>>> virtual IRQ of course). >>>>>>> >>>>>>> When PIC drivers attach and register themselves with the >>>>>>> interrupt handling layer, all the interrupts for that PIC are >>>>>>> passed to it along with the virtual IRQ. The PIC driver is >>>>>>> supposed to know what its interrupt data mean, which can be >>>>>>> safely guaranteed, and it presents the assigned virtual IRQ >>>>>>> number to the kernel when dispatching interrupts. (IRQs >>>>>>> configured after PIC attachment are passed through immediately). >>>>>>> >>>>>>> This accomplishes the following things: >>>>>>> 1. Parsing interrupt data is moved to the PIC driver, which is >>>>>>> the only place it can be done safely. >>>>>> I don't see anything different comparing with INTRNG. >>>>> >>>>> What I am advocating *is* INTRNG, at least as originally conceived >>>>> and implemented. >>>>> >>>>>>> 2. There is no ordering requirement on PIC attachment vs. the >>>>>>> attachment of anything else. >>>>>> I think thats is not a true - PIC must exist before >>>>>> bus_alloc_resource() / bus_setup_intr() is called. >>>>> >>>>> It does not with the IRQ mapping infrastructure. Interrupts are >>>>> set up at PIC attachment, whenever that occurs. >>>>> >>>> Assuming that bus_alloc_resource and bus_setup_intr() are close >>>> thorougher and in linear piece of code, can i assume that you can >>>> call bus_setup_intr() >>>> without PIC attached ? >>> >>> Yes. >> So driver can request and/or setup any random IRQ and gets success >> from bus_alloc_resource() or bus_setup_intr()? >> Do you think that is this right behavior? > > Yes. And it is a behavior required by newbus. > >>> >>>>>> >>>>>>> 3. Changes are extremely minimal relative to the "standard" >>>>>>> interrupt flow: you only have to patch code that is already >>>>>>> directly dealing with OF interrupts. >>>>>> I don't see anything different comparing with INTRNG. >>>>> >>>>> Again, this was the original INTRNG architecture and is already >>>>> implemented. As such, there are *no* changes required on ARM to >>>>> get it. bus_map_intr() adds a bunch of new code, in parallel with >>>>> the old code that also solves the problem, to no purpose. >>>> So, on PPC, how i can get interrupt for GPIO pin described by this >>>> property: >>>> https://svnweb.freebsd.org/base/head/sys/gnu/dts/arm/tegra124-jetson-tk1.dts?revision=295436&view=markup#l1691 >>>> >>> >>> The GPIO controller registers itself as an interrupt domain and >>> decodes those strings as IRQ specifiers. When interrupts are >>> configured, it does whatever it needs to do to configure them >>> appropriately and dispatches them to the kernel when they occur. >>> It's a pretty trivial cascaded interrupt configuration. And, since >>> the VIRQ code does not need the interrupt controller attached in >>> advance, you don't need to worry about attach order of wherever >>> &gpio points and the SDHCI driver. >>> >>>>> >>>>>>> 4. It happens at bus enumeration time, when results can be >>>>>>> guaranteed self-consistent. >>>>>> Where do you see any potential source of inconsistency in INTRNG? >>>>> >>>>> See the example above about modified interrupt lists. There is >>>>> also no obvious way for a child device to construct an interrupt >>>>> not assigned to it by the parent device from device tree >>>>> properties without knowing in some detail what kind of interrupt >>>>> needs to be built. >>>>> >>>>>> >>>>>>> 5. It combines naturally with ofw_bus_lookup_imap() and friends >>>>>>> in the interrupt-map case (e.g. for PCI). >>>>>> Again, I don't see anything different. Proper parsing of >>>>>> interrupt property is not a problem of INTRNG (but must be fixed, >>>>>> of course). >>>>> >>>>> But it is *already* fixed by the standard code that already >>>>> exists. You are introducing a less-functional parallel code path here. >>>> NO, its not fixed, at least not for ARM. >>> >>> Why not, concretely? I'm happy to write whatever code is missing if >>> there's a bug. It can't be more than a few tens of lines in arm/intr.c. >> Interrupt maps are not covered by current ARM code. > > This suggests otherwise: > files.arm:dev/ofw/ofwpci.c optional fdt pci > > But it's quite possible that code is not being used as widely as it > should, since it's a new introduction to the ARM tree. That the > existing code is not being used broadly enough is hardly a reasonable > to invent something new. > >>>>> >>>>>>> >>>>>>> I'm not sure what the right path forward is, but this code needs >>>>>>> to be fixed. The PowerPC code is fully MI, and was the template >>>>>>> for the original INTRNG, so it shouldn't be too bad to replace. >>>>>>> -Nathan >>>>>>> >>>>>> >>>>>> So, new INTRNG: >>>>>> - Introduces new more general bus method that can parse interrupt >>>>>> configuration >>>>>> data from any source. Is this step backward? >>>>> >>>>> Yes, since it is more general in some sense, while simultaneously >>>>> handling fewer cases than code that already exists and is implemented. >>>>> >>>>>> >>>>>> - Old INTRNG and PPC code stores unparsed and/or parsed interrupt >>>>>> data in >>>>>> INTRNG and each consumer must query for them. This data sharing >>>>>> also causes >>>>>> significant locking issues. New INTRNG stores interrupt >>>>>> configuration data into >>>>>> given resource, so each relevant bus method can access it >>>>>> immediately. >>>>>> Is this step backward? >>>>> >>>>> Which locking issues? And yes, it is. >>>>> >>>>>> >>>>>> - New INTRNG is not OFW centric, it can works with virtually >>>>>> unlimited number >>>>>> of configuration data sources. Is this step backward? >>>>> >>>>> Also yes, because it makes the interrupt handles less opaque, >>>>> which makes the infrastructure less flexible. >>>>> >>>>>> - New INTRNG correctly uses standard system infrastructure. Real >>>>>> IRQ number >>>>>> is reserved in rman within bus_alloc_resource() call, >>>>>> interrupt HW is >>>>>> configured (only!) within bus_setup_intr() call. Is this step >>>>>> backward? >>>>> >>>>> The "real" IRQ number is not well defined always, so requiring >>>>> that is a step backwards, yes. >>>>> >>>>>> - New INTRNG completely eliminates huge and not always working >>>>>> virtual >>>>>> IRQ concept. >>>>> >>>>> When does it "not always work"? It seems to, in fact, always work >>>>> on multiple platforms and have for a long time in the face of all >>>>> kinds of totally bizarre topologies and system architectures. >>>>> >>>>>> >>>>>> >>>>>> Don’t take me bad, I’m open to any change. But no, at this time, >>>>>> I’m not ready to completely revert someone else's work – although >>>>>> I am a co-author. >>>>> >>>>> I would urge, in the strongest possible terms, that this be backed >>>>> out from stable/11 at least. We can add the new API back for 11.1 >>>>> if we want it, but we totally lose the ability to change it later >>>>> in the stable/11 cycle if it stays in now. >>>>> -Nathan >>>>> >>>> The API is part of still unstable, experimental INTRNG, so its not >>>> fixed we we can change it at any time, I think. >>>> But yes, we forget to wrap new bus_map_intr() method (and >>>> associated code) by #ifdef INTRNG. Is this sufficient for you? >>> >>> For HEAD, yes. I would like it out of stable/11 entirely until this >>> discussion converges. >>> -Nathan >> The current code (in stable/11) works and is tested. I simple cannot >> commit any untested change for stable tree mainly if is in BETA2 >> stage. And I cannot fully test the requested change, at this time i >> have access to single ARM platform. >> But we're in the same situation - both have the same commit bit, >> neither one of us is the author of the disputed commit and neither of >> us are not able to fully test it. >> So feel free to commit what you want, if you have courage to commit >> untested code. I haven't it...\ >> Michal >> > > Well, the code isn't actually used anywhere in stable/11, or HEAD, so > it can't possibly be either tested or important for the functionality > of any current code. As such, I will revert from HEAD on Monday and > request an MFC from re@ following that if the author has not appeared > by that time. > -Nathan The code is, of course, already used by each of INTRNG enabled platforms. ------------------------------------------------------------------------------------------------------ diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c index 1e048c4..14eb507 100644 --- a/sys/dev/ofw/ofwbus.c +++ b/sys/dev/ofw/ofwbus.c @@ -323,7 +323,7 @@ ofwbus_map_intr(device_t bus, device_t child, int *rid, rman_res_t *start, int ncells, rv; u_int irq; struct intr_map_data_fdt *fdt_data; - +printf(" *** %s: bus: %p\n", __func__, bus); node = ofw_bus_get_node(child); rv = ofw_bus_intr_by_rid(child, node, *rid, &iparent, &ncells, &cells); if (rv != 0) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index af3ca57..b381163 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3960,6 +3960,7 @@ int bus_generic_map_intr(device_t dev, device_t child, int *rid, rman_res_t *start, rman_res_t *end, rman_res_t *count, struct intr_map_data **imd) { +printf(" *** %s: dev: %p\n", __func__, dev); /* Propagate up the bus hierarchy until someone handles it. */ if (dev->parent) return (BUS_MAP_INTR(dev->parent, child, rid, start, end, count, --------------------------------------------------------------------------------------------------- Result: *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** bus_generic_map_intr: dev: 0xc4ce5780 *** bus_generic_map_intr: dev: 0xc4ce0980 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** bus_generic_map_intr: dev: 0xc4e52080 *** bus_generic_map_intr: dev: 0xc4e52480 *** bus_generic_map_intr: dev: 0xc4e52780 *** bus_generic_map_intr: dev: 0xc4ce1500 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** bus_generic_map_intr: dev: 0xc4ce0300 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 *** ofwbus_map_intr: bus: 0xc4ce1880 So its hard to say that code is unused. And, just for info, last "clean in PPC way" is initial commit INTRNG at r289529 (9 months ago). Michal From owner-svn-src-all@freebsd.org Sun Jul 24 08:12:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48F30BA3A62; Sun, 24 Jul 2016 08:12:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 196C61CB1; Sun, 24 Jul 2016 08:12:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O8CNCo070621; Sun, 24 Jul 2016 08:12:23 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O8CNr7070619; Sun, 24 Jul 2016 08:12:23 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607240812.u6O8CNr7070619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 24 Jul 2016 08:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303256 - in stable/11/usr.sbin/pw: . tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 08:12:24 -0000 Author: bapt Date: Sun Jul 24 08:12:23 2016 New Revision: 303256 URL: https://svnweb.freebsd.org/changeset/base/303256 Log: iDo not try to delete the home of the user if is is not a directory for example "/dev/null" PR: 211195 Submitted by: rday Reported by: eniorm Approved by: re (kib) Modified: stable/11/usr.sbin/pw/rm_r.c stable/11/usr.sbin/pw/tests/pw_userdel.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/pw/rm_r.c ============================================================================== --- stable/11/usr.sbin/pw/rm_r.c Sun Jul 24 05:24:10 2016 (r303255) +++ stable/11/usr.sbin/pw/rm_r.c Sun Jul 24 08:12:23 2016 (r303256) @@ -50,6 +50,9 @@ rm_r(int rootfd, const char *path, uid_t path++; dirfd = openat(rootfd, path, O_DIRECTORY); + if (dirfd == -1) { + return; + } d = fdopendir(dirfd); while ((e = readdir(d)) != NULL) { Modified: stable/11/usr.sbin/pw/tests/pw_userdel.sh ============================================================================== --- stable/11/usr.sbin/pw/tests/pw_userdel.sh Sun Jul 24 05:24:10 2016 (r303255) +++ stable/11/usr.sbin/pw/tests/pw_userdel.sh Sun Jul 24 08:12:23 2016 (r303256) @@ -59,9 +59,18 @@ delete_numeric_name_body() { ${PW} userdel -n 4001 } +atf_test_case home_not_a_dir +home_not_a_dir_body() { + populate_root_etc_skel + touch ${HOME}/foo + atf_check ${RPW} useradd foo -d /foo + atf_check ${RPW} userdel foo -r +} + atf_init_test_cases() { atf_add_test_case rmuser_seperate_group atf_add_test_case user_do_not_try_to_delete_root_if_user_unknown atf_add_test_case delete_files atf_add_test_case delete_numeric_name + atf_add_test_case home_not_a_dir } From owner-svn-src-all@freebsd.org Sun Jul 24 08:21:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C323BA3C5A; Sun, 24 Jul 2016 08:21:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E9071FCB; Sun, 24 Jul 2016 08:21:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O8LLGo070994; Sun, 24 Jul 2016 08:21:21 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O8LLX9070991; Sun, 24 Jul 2016 08:21:21 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607240821.u6O8LLX9070991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 24 Jul 2016 08:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303257 - in stable/10/usr.sbin/pw: . tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 08:21:22 -0000 Author: bapt Date: Sun Jul 24 08:21:21 2016 New Revision: 303257 URL: https://svnweb.freebsd.org/changeset/base/303257 Log: Do not try to delete the home of the user if is is not a directory for example "/dev/null" PR: 211195 Submitted by: rday Reported by: eniorm Modified: stable/10/usr.sbin/pw/rm_r.c stable/10/usr.sbin/pw/tests/pw_userdel.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/rm_r.c ============================================================================== --- stable/10/usr.sbin/pw/rm_r.c Sun Jul 24 08:12:23 2016 (r303256) +++ stable/10/usr.sbin/pw/rm_r.c Sun Jul 24 08:21:21 2016 (r303257) @@ -50,6 +50,9 @@ rm_r(int rootfd, const char *path, uid_t path++; dirfd = openat(rootfd, path, O_DIRECTORY); + if (dirfd == -1) { + return; + } d = fdopendir(dirfd); while ((e = readdir(d)) != NULL) { Modified: stable/10/usr.sbin/pw/tests/pw_userdel.sh ============================================================================== --- stable/10/usr.sbin/pw/tests/pw_userdel.sh Sun Jul 24 08:12:23 2016 (r303256) +++ stable/10/usr.sbin/pw/tests/pw_userdel.sh Sun Jul 24 08:21:21 2016 (r303257) @@ -59,9 +59,18 @@ delete_numeric_name_body() { ${PW} userdel -n 4001 } +atf_test_case home_not_a_dir +home_not_a_dir_body() { + populate_root_etc_skel + touch ${HOME}/foo + atf_check ${RPW} useradd foo -d /foo + atf_check ${RPW} userdel foo -r +} + atf_init_test_cases() { atf_add_test_case rmuser_seperate_group atf_add_test_case user_do_not_try_to_delete_root_if_user_unknown atf_add_test_case delete_files atf_add_test_case delete_numeric_name + atf_add_test_case home_not_a_dir } From owner-svn-src-all@freebsd.org Sun Jul 24 08:35:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B927EBA3EFD; Sun, 24 Jul 2016 08:35:46 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90EF31842; Sun, 24 Jul 2016 08:35:46 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O8ZjZr078221; Sun, 24 Jul 2016 08:35:45 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O8ZjcP078217; Sun, 24 Jul 2016 08:35:45 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201607240835.u6O8ZjcP078217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Sun, 24 Jul 2016 08:35:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303258 - in head/sys: conf dev/nvram2env X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 08:35:46 -0000 Author: mizhka Date: Sun Jul 24 08:35:45 2016 New Revision: 303258 URL: https://svnweb.freebsd.org/changeset/base/303258 Log: [nvram2env] split implementation into generic & MIPS-based code Split implementation of nvram2env to generic (MI) & MIPS-based code: - removed includes like "*siba*", because they are unused - added nvram2env_mips.c file with MIPS-specific code, code moved from nvram2env.c - added header file to shared defines/structures/function prototypes between MI and MIPS code Also this fix allows to implement own nvram2env drivers. Reviewed by: ray, adrian (mentor) Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D6513 Added: head/sys/dev/nvram2env/nvram2env.h (contents, props changed) head/sys/dev/nvram2env/nvram2env_mips.c (contents, props changed) Modified: head/sys/conf/files.mips head/sys/dev/nvram2env/nvram2env.c Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Sun Jul 24 08:21:21 2016 (r303257) +++ head/sys/conf/files.mips Sun Jul 24 08:35:45 2016 (r303258) @@ -86,6 +86,7 @@ crypto/blowfish/bf_enc.c optional crypt crypto/des/des_enc.c optional crypto | ipsec | netsmb # AP common nvram interface MIPS specific, but maybe should be more generic +dev/nvram2env/nvram2env_mips.c optional nvram2env dev/nvram2env/nvram2env.c optional nvram2env # hwpmc support Modified: head/sys/dev/nvram2env/nvram2env.c ============================================================================== --- head/sys/dev/nvram2env/nvram2env.c Sun Jul 24 08:21:21 2016 (r303257) +++ head/sys/dev/nvram2env/nvram2env.c Sun Jul 24 08:35:45 2016 (r303258) @@ -46,50 +46,7 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include - -#define nvram2env_read_1(sc, reg) \ - bus_space_read_1((sc)->sc_bt, (sc)->sc_bh,(reg)) - -#define nvram2env_read_2(sc, reg) \ - bus_space_read_2((sc)->sc_bt, (sc)->sc_bh,(reg)) - -#define nvram2env_read_4(sc, reg) \ - bus_space_read_4((sc)->sc_bt, (sc)->sc_bh,(reg)) - -#define nvram2env_write_1(sc, reg, val) \ - bus_space_write_1((sc)->sc_bt, (sc)->sc_bh, \ - (reg), (val)) - -#define nvram2env_write_2(sc, reg, val) \ - bus_space_write_2((sc)->sc_bt, (sc)->sc_bh, \ - (reg), (val)) - -#define nvram2env_write_4(sc, reg, val) \ - bus_space_write_4((sc)->sc_bt, (sc)->sc_bh, \ - (reg), (val)) - -struct nvram2env_softc { - bus_space_tag_t bst; - bus_space_handle_t bsh; - bus_addr_t addr; - int need_swap; - uint32_t sig; - uint32_t flags; -#define NVRAM_FLAGS_NOCHECK 0x0001 /* Do not check(CRC or somthing else)*/ -#define NVRAM_FLAGS_GENERIC 0x0002 /* Format Generic, skip 4b and read */ -#define NVRAM_FLAGS_BROADCOM 0x0004 /* Format Broadcom, use struct nvram */ -#define NVRAM_FLAGS_UBOOT 0x0008 /* Format Generic, skip 4b of CRC and read */ - uint32_t maxsize; - uint32_t crc; -}; - -static int nvram2env_attach(device_t); -static int nvram2env_probe(device_t); - -#define NVRAM_MAX_SIZE 0x10000 +#include "nvram2env.h" static void nvram2env_identify(driver_t * drv, device_t parent) @@ -100,34 +57,55 @@ nvram2env_identify(driver_t * drv, devic BUS_ADD_CHILD(parent, 0, "nvram2env", i); } -static int +int nvram2env_probe(device_t dev) { uint32_t i, ivar, sig; struct nvram2env_softc * sc = device_get_softc(dev); - sc->bst = mips_bus_space_generic; - if (resource_int_value("nvram", device_get_unit(dev), "sig", - &sc->sig) != 0 || sc->sig == 0) - sc->sig = 0x48534c46; - - if (resource_int_value("nvram", device_get_unit(dev), "maxsize", - &sc->maxsize) != 0 || sc->maxsize == 0) - sc->maxsize = NVRAM_MAX_SIZE; - - if (resource_int_value("nvram", device_get_unit(dev), "flags", - &sc->flags) != 0 || sc->flags == 0) - sc->flags = NVRAM_FLAGS_GENERIC; + /* + * Please ensure that your implementation of NVRAM->ENV specifies + * bus tag + */ + if (sc->bst == NULL) + return (ENXIO); + + if (sc->sig == 0) + if (resource_int_value("nvram", device_get_unit(dev), "sig", + &sc->sig) != 0 || sc->sig == 0) + sc->sig = CFE_NVRAM_SIGNATURE; + + if (sc->maxsize == 0) + if (resource_int_value("nvram", device_get_unit(dev), "maxsize", + &sc->maxsize) != 0 || sc->maxsize == 0) + sc->maxsize = NVRAM_MAX_SIZE; + + if (sc->flags == 0) + if (resource_int_value("nvram", device_get_unit(dev), "flags", + &sc->flags) != 0 || sc->flags == 0) + sc->flags = NVRAM_FLAGS_GENERIC; for (i = 0; i < 2; i ++) { - if (resource_int_value("nvram", device_get_unit(dev), - (!i)?"base":"fallbackbase", &ivar) != 0 || - ivar == 0) - continue; + switch (i) { + case 0: + break; + case 1: + case 2: + if (resource_int_value("nvram", device_get_unit(dev), + (i == 1) ? "base" : "fallbackbase", &ivar) != 0 || + ivar == 0) + continue; + + sc->addr = ivar; + break; + default: + break; + } - sc->addr = ivar; + if (sc->addr == 0) + continue; if (bootverbose) device_printf(dev, "base=0x%08x sig=0x%08x " @@ -172,15 +150,6 @@ unmap_done: } -struct nvram { - u_int32_t sig; - u_int32_t size; - u_int32_t unknown1; - u_int32_t unknown2; - u_int32_t unknown3; - char data[]; -}; - static uint32_t read_4(struct nvram2env_softc * sc, int offset) { if (sc->need_swap) @@ -190,7 +159,7 @@ static uint32_t read_4(struct nvram2env_ } -static int +int nvram2env_attach(device_t dev) { struct nvram2env_softc *sc; @@ -209,10 +178,11 @@ nvram2env_attach(device_t dev) sig = read_4(sc, 0); size = read_4(sc, 4); -#if 1 + if (bootverbose) - device_printf(dev, " size=0x%05x maxsize=0x%05x\n", size, sc->maxsize); -#endif + device_printf(dev, " size=0x%05x maxsize=0x%05x\n", size, + sc->maxsize); + size = (size > sc->maxsize)?sc->maxsize:size; @@ -265,12 +235,12 @@ nvram2env_attach(device_t dev) assign = strchr(pair,'='); assign[0] = '\0'; value = assign+1; -#if 1 + if (bootverbose) - printf("ENV: %s=%s\n", pair, value); -#else - printf("ENV: %s\n", pair); -#endif + printf("ENV[%p]: %s=%s\n", + (void*)((char*)pair - (char*)nv), + pair, value); + kern_setenv(pair, value); if (strcasecmp(pair, "WAN_MAC_ADDR") == 0) { @@ -313,12 +283,10 @@ static device_method_t nvram2env_methods DEVMETHOD_END }; -static driver_t nvram2env_driver = { +driver_t nvram2env_driver = { "nvram2env", nvram2env_methods, sizeof(struct nvram2env_softc), }; -static devclass_t nvram2env_devclass; - -DRIVER_MODULE(nvram2env, nexus, nvram2env_driver, nvram2env_devclass, 0, 0); +devclass_t nvram2env_devclass; Added: head/sys/dev/nvram2env/nvram2env.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/nvram2env/nvram2env.h Sun Jul 24 08:35:45 2016 (r303258) @@ -0,0 +1,88 @@ +/*- + * Copyright (c) 2010 Aleksandr Rybalko. + * Copyright (c) 2016 Michael Zhilin. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + + +#ifndef NVRAM2ENV_NVRAM2ENV_H_ +#define NVRAM2ENV_NVRAM2ENV_H_ + +#define nvram2env_read_1(sc, reg) \ + bus_space_read_1((sc)->sc_bt, (sc)->sc_bh,(reg)) + +#define nvram2env_read_2(sc, reg) \ + bus_space_read_2((sc)->sc_bt, (sc)->sc_bh,(reg)) + +#define nvram2env_read_4(sc, reg) \ + bus_space_read_4((sc)->sc_bt, (sc)->sc_bh,(reg)) + +#define nvram2env_write_1(sc, reg, val) \ + bus_space_write_1((sc)->sc_bt, (sc)->sc_bh, \ + (reg), (val)) + +#define nvram2env_write_2(sc, reg, val) \ + bus_space_write_2((sc)->sc_bt, (sc)->sc_bh, \ + (reg), (val)) + +#define nvram2env_write_4(sc, reg, val) \ + bus_space_write_4((sc)->sc_bt, (sc)->sc_bh, \ + (reg), (val)) + +struct nvram2env_softc { + bus_space_tag_t bst; + bus_space_handle_t bsh; + bus_addr_t addr; + int need_swap; + uint32_t sig; + uint32_t flags; +#define NVRAM_FLAGS_NOCHECK 0x0001 /* Do not check(CRC or somthing else)*/ +#define NVRAM_FLAGS_GENERIC 0x0002 /* Format Generic, skip 4b and read */ +#define NVRAM_FLAGS_BROADCOM 0x0004 /* Format Broadcom, use struct nvram */ +#define NVRAM_FLAGS_UBOOT 0x0008 /* Format Generic, skip 4b of CRC and read */ + uint32_t maxsize; + uint32_t crc; +}; + +#define NVRAM_MAX_SIZE 0x10000 +#define CFE_NVRAM_SIGNATURE 0x48534c46 + +struct nvram { + u_int32_t sig; + u_int32_t size; + u_int32_t unknown1; + u_int32_t unknown2; + u_int32_t unknown3; + char data[]; +}; + +int nvram2env_attach(device_t); +int nvram2env_probe(device_t); + +extern devclass_t nvram2env_devclass; +extern driver_t nvram2env_driver; + +#endif /* SYS_DEV_NVRAM2ENV_NVRAM2ENV_H_ */ Added: head/sys/dev/nvram2env/nvram2env_mips.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/nvram2env/nvram2env_mips.c Sun Jul 24 08:35:45 2016 (r303258) @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2010 Aleksandr Rybalko. + * Copyright (c) 2016 Michael Zhilin. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Implementation of pseudo driver for MIPS to copy the NVRAM settings + * from various sources into the kernel environment. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +#include "nvram2env.h" + +static int +nvram2env_mips_probe(device_t dev) +{ + struct nvram2env_softc *sc; + + sc = device_get_softc(dev); + sc->bst = mips_bus_space_generic; + + return (nvram2env_probe(dev)); +} + +static device_method_t nvram2env_mips_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, nvram2env_mips_probe), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(nvram2env, nvram2env_mips_driver, nvram2env_mips_methods, + sizeof(struct nvram2env_softc), nvram2env_driver); +DRIVER_MODULE(nvram2env_mips, nexus, nvram2env_mips_driver, nvram2env_devclass, + NULL, NULL); + +MODULE_VERSION(nvram2env_mips, 1); +MODULE_DEPEND(nvram2env_mips, nvram2env, 1, 1, 1); From owner-svn-src-all@freebsd.org Sun Jul 24 08:50:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7842BA3342; Sun, 24 Jul 2016 08:50:11 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 7E96F1375; Sun, 24 Jul 2016 08:50:11 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from zapp (bcdf0033.skybroadband.com [188.223.0.51]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id AE629D78E6; Sun, 24 Jul 2016 08:49:34 +0000 (UTC) Date: Sun, 24 Jul 2016 09:49:33 +0100 From: Andrew Turner To: Luiz Otavio O Souza Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303253 - head/sys/arm/ti Message-ID: <20160724094933.294c4f4d@zapp> In-Reply-To: <201607240131.u6O1VfOH020387@repo.freebsd.org> References: <201607240131.u6O1VfOH020387@repo.freebsd.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 08:50:11 -0000 On Sun, 24 Jul 2016 01:31:41 +0000 (UTC) Luiz Otavio O Souza wrote: > Author: loos > Date: Sun Jul 24 01:31:41 2016 > New Revision: 303253 > URL: https://svnweb.freebsd.org/changeset/base/303253 > > Log: > Allow the use of micphy on am335x devices. > > The Micrel PHYs reads the optional external delays from DTB. > > Tested and used by uBMC and uFW. > > Sponsored by: Rubicon Communications (Netgate) > > Modified: > head/sys/arm/ti/files.ti > > Modified: head/sys/arm/ti/files.ti > ============================================================================== > --- head/sys/arm/ti/files.ti Sat Jul 23 22:50:59 2016 > (r303252) +++ head/sys/arm/ti/files.ti Sun Jul 24 01:31:41 > 2016 (r303253) @@ -20,6 +20,7 @@ > arm/ti/ti_i2c.c > optional ti_i2c arm/ti/ti_sdhci.c > optional sdhci > arm/ti/ti_spi.c > optional ti_spi > +dev/mii/micphy.c optional > micphy Why add it here and not sys/conf/files? It doesn't seem to be Ti specific. Andrew From owner-svn-src-all@freebsd.org Sun Jul 24 08:52:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D272BBA366C; Sun, 24 Jul 2016 08:52:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 835FC1AA1; Sun, 24 Jul 2016 08:52:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O8qniX085752; Sun, 24 Jul 2016 08:52:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O8qn7c085751; Sun, 24 Jul 2016 08:52:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607240852.u6O8qn7c085751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 24 Jul 2016 08:52:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303259 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 08:52:50 -0000 Author: andrew Date: Sun Jul 24 08:52:49 2016 New Revision: 303259 URL: https://svnweb.freebsd.org/changeset/base/303259 Log: Remove now unused functions from the FDT uart cpu driver. Obtained from: ABT Systems Ltd MFC after: 1 month X-MFC with: r303100 Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/uart/uart_cpu_fdt.c Modified: head/sys/dev/uart/uart_cpu_fdt.c ============================================================================== --- head/sys/dev/uart/uart_cpu_fdt.c Sun Jul 24 08:35:45 2016 (r303258) +++ head/sys/dev/uart/uart_cpu_fdt.c Sun Jul 24 08:52:49 2016 (r303259) @@ -70,53 +70,6 @@ uart_cpu_eqres(struct uart_bas *b1, stru return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0); } -static int -phandle_chosen_propdev(phandle_t chosen, const char *name, phandle_t *node) -{ - char buf[64]; - - if (OF_getprop(chosen, name, buf, sizeof(buf)) <= 0) - return (ENXIO); - if ((*node = OF_finddevice(buf)) == -1) - return (ENXIO); - - return (0); -} - -static const struct ofw_compat_data * -uart_fdt_find_compatible(phandle_t node, const struct ofw_compat_data *cd) -{ - const struct ofw_compat_data *ocd; - - for (ocd = cd; ocd->ocd_str != NULL; ocd++) { - if (fdt_is_compatible(node, ocd->ocd_str)) - return (ocd); - } - return (NULL); -} - -static uintptr_t -uart_fdt_find_by_node(phandle_t node, int class_list) -{ - struct ofw_compat_data **cd; - const struct ofw_compat_data *ocd; - - if (class_list) { - SET_FOREACH(cd, uart_fdt_class_set) { - ocd = uart_fdt_find_compatible(node, *cd); - if ((ocd != NULL) && (ocd->ocd_data != 0)) - return (ocd->ocd_data); - } - } else { - SET_FOREACH(cd, uart_fdt_class_and_device_set) { - ocd = uart_fdt_find_compatible(node, *cd); - if ((ocd != NULL) && (ocd->ocd_data != 0)) - return (ocd->ocd_data); - } - } - return (0); -} - int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { From owner-svn-src-all@freebsd.org Sun Jul 24 09:00:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A896BA396D; Sun, 24 Jul 2016 09:00:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 194F91D44; Sun, 24 Jul 2016 09:00:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O90JUS086102; Sun, 24 Jul 2016 09:00:19 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O90HZj086080; Sun, 24 Jul 2016 09:00:17 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607240900.u6O90HZj086080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 24 Jul 2016 09:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303260 - stable/11/share/timedef X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 09:00:20 -0000 Author: bapt Date: Sun Jul 24 09:00:16 2016 New Revision: 303260 URL: https://svnweb.freebsd.org/changeset/base/303260 Log: MFC: r303219 Add weekday to the date format of more locales Approved by: re (kib) Modified: stable/11/share/timedef/cs_CZ.ISO8859-2.src stable/11/share/timedef/cs_CZ.UTF-8.src stable/11/share/timedef/da_DK.ISO8859-15.src stable/11/share/timedef/da_DK.UTF-8.src stable/11/share/timedef/de_AT.ISO8859-15.src stable/11/share/timedef/de_AT.UTF-8.src stable/11/share/timedef/de_DE.ISO8859-15.src stable/11/share/timedef/de_DE.UTF-8.src stable/11/share/timedef/et_EE.ISO8859-15.src stable/11/share/timedef/et_EE.UTF-8.src stable/11/share/timedef/fi_FI.ISO8859-15.src stable/11/share/timedef/fi_FI.UTF-8.src stable/11/share/timedef/hr_HR.ISO8859-2.src stable/11/share/timedef/hr_HR.UTF-8.src stable/11/share/timedef/is_IS.ISO8859-15.src stable/11/share/timedef/is_IS.UTF-8.src stable/11/share/timedef/nb_NO.ISO8859-15.src stable/11/share/timedef/nb_NO.UTF-8.src stable/11/share/timedef/nn_NO.ISO8859-15.src stable/11/share/timedef/nn_NO.UTF-8.src stable/11/share/timedef/sk_SK.ISO8859-2.src stable/11/share/timedef/sk_SK.UTF-8.src Directory Properties: stable/11/ (props changed) Modified: stable/11/share/timedef/cs_CZ.ISO8859-2.src ============================================================================== --- stable/11/share/timedef/cs_CZ.ISO8859-2.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/cs_CZ.ISO8859-2.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ sobota %d.%m.%y # # c_fmt -%e. %B %Y %H:%M:%S +%A %e %B %Y %H:%M:%S # # AM/PM dopoledne odpoledne # # date_fmt -%e. %B %Y %H:%M:%S %Z +%A %e %B %Y %H:%M:%S %Z # # Long month names (without case ending) leden Modified: stable/11/share/timedef/cs_CZ.UTF-8.src ============================================================================== --- stable/11/share/timedef/cs_CZ.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/cs_CZ.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ sobota %d.%m.%y # # c_fmt -%e. %B %Y %H:%M:%S +%A %e %B %Y %H:%M:%S # # AM/PM dopoledne odpoledne # # date_fmt -%e. %B %Y %H:%M:%S %Z +%A %e %B %Y %H:%M:%S %Z # # Long month names (without case ending) leden Modified: stable/11/share/timedef/da_DK.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/da_DK.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/da_DK.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ lørdag %d/%m/%Y # # c_fmt -%e. %B %Y kl. %H.%M.%S +%A %e %B %Y kl. %H.%M.%S # # AM/PM AM PM # # date_fmt -%e. %B %Y kl. %H.%M.%S %Z +%A %e %B %Y kl. %H.%M.%S %Z # # Long month names (without case ending) januar Modified: stable/11/share/timedef/da_DK.UTF-8.src ============================================================================== --- stable/11/share/timedef/da_DK.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/da_DK.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ lørdag %d/%m/%Y # # c_fmt -%e. %B %Y kl. %H.%M.%S +%A %e %B %Y kl. %H.%M.%S # # AM/PM AM PM # # date_fmt -%e. %B %Y kl. %H.%M.%S %Z +%A %e %B %Y kl. %H.%M.%S %Z # # Long month names (without case ending) januar Modified: stable/11/share/timedef/de_AT.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/de_AT.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/de_AT.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ Samstag %d.%m.%y # # c_fmt -%e. %B %Y um %H:%M:%S +%A %e %B %Y um %H:%M:%S # # AM/PM vorm. nachm. # # date_fmt -%e. %B %Y um %H:%M:%S %Z +%A %e %B %Y um %H:%M:%S %Z # # Long month names (without case ending) Jänner Modified: stable/11/share/timedef/de_AT.UTF-8.src ============================================================================== --- stable/11/share/timedef/de_AT.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/de_AT.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ Samstag %d.%m.%y # # c_fmt -%e. %B %Y um %H:%M:%S +%A %e %B %Y um %H:%M:%S # # AM/PM vorm. nachm. # # date_fmt -%e. %B %Y um %H:%M:%S %Z +%A %e %B %Y um %H:%M:%S %Z # # Long month names (without case ending) Jänner Modified: stable/11/share/timedef/de_DE.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/de_DE.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/de_DE.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ Samstag %d.%m.%y # # c_fmt -%e. %B %Y um %H:%M:%S +%A %e %B %Y um %H:%M:%S # # AM/PM vorm. nachm. # # date_fmt -%e. %B %Y um %H:%M:%S %Z +%A %e %B %Y um %H:%M:%S %Z # # Long month names (without case ending) Januar Modified: stable/11/share/timedef/de_DE.UTF-8.src ============================================================================== --- stable/11/share/timedef/de_DE.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/de_DE.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ Samstag %d.%m.%y # # c_fmt -%e. %B %Y um %H:%M:%S +%A %e %B %Y um %H:%M:%S # # AM/PM vorm. nachm. # # date_fmt -%e. %B %Y um %H:%M:%S %Z +%A %e %B %Y um %H:%M:%S %Z # # Long month names (without case ending) Januar Modified: stable/11/share/timedef/et_EE.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/et_EE.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/et_EE.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ laupäev %d.%m.%y # # c_fmt -%e. %B %Y %H:%M.%S +%A %e %B %Y %H:%M.%S # # AM/PM AM PM # # date_fmt -%e. %B %Y %H:%M.%S %Z +%A %e %B %Y %H:%M.%S %Z # # Long month names (without case ending) jaanuar Modified: stable/11/share/timedef/et_EE.UTF-8.src ============================================================================== --- stable/11/share/timedef/et_EE.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/et_EE.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ laupäev %d.%m.%y # # c_fmt -%e. %B %Y %H:%M.%S +%A %e %B %Y %H:%M.%S # # AM/PM AM PM # # date_fmt -%e. %B %Y %H:%M.%S %Z +%A %e %B %Y %H:%M.%S %Z # # Long month names (without case ending) jaanuar Modified: stable/11/share/timedef/fi_FI.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/fi_FI.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/fi_FI.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ lauantaina %d.%m.%Y # # c_fmt -%e. %B %Y klo %H.%M.%S +%A %e %B %Y klo %H.%M.%S # # AM/PM ap. ip. # # date_fmt -%e. %B %Y klo %H.%M.%S %Z +%A %e %B %Y klo %H.%M.%S %Z # # Long month names (without case ending) tammikuuta Modified: stable/11/share/timedef/fi_FI.UTF-8.src ============================================================================== --- stable/11/share/timedef/fi_FI.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/fi_FI.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ lauantaina %d.%m.%Y # # c_fmt -%e. %B %Y klo %H.%M.%S +%A %e %B %Y klo %H.%M.%S # # AM/PM ap. ip. # # date_fmt -%e. %B %Y klo %H.%M.%S %Z +%A %e %B %Y klo %H.%M.%S %Z # # Long month names (without case ending) tammikuuta Modified: stable/11/share/timedef/hr_HR.ISO8859-2.src ============================================================================== --- stable/11/share/timedef/hr_HR.ISO8859-2.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/hr_HR.ISO8859-2.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ subota %d.%m.%Y. # # c_fmt -%e. %B %Y. u %H:%M:%S +%A %e %B %Y. u %H:%M:%S # # AM/PM AM PM # # date_fmt -%e. %B %Y. u %H:%M:%S %Z +%A %e %B %Y. u %H:%M:%S %Z # # Long month names (without case ending) sijeènja Modified: stable/11/share/timedef/hr_HR.UTF-8.src ============================================================================== --- stable/11/share/timedef/hr_HR.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/hr_HR.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ subota %d.%m.%Y. # # c_fmt -%e. %B %Y. u %H:%M:%S +%A %e %B %Y. u %H:%M:%S # # AM/PM AM PM # # date_fmt -%e. %B %Y. u %H:%M:%S %Z +%A %e %B %Y. u %H:%M:%S %Z # # Long month names (without case ending) sijeÄnja Modified: stable/11/share/timedef/is_IS.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/is_IS.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/is_IS.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ laugardagur %d.%m.%Y # # c_fmt -%e. %B %Y kl. %H:%M:%S +%A %e %B %Y kl. %H:%M:%S # # AM/PM f.h. e.h. # # date_fmt -%e. %B %Y kl. %H:%M:%S %Z +%A %e %B %Y kl. %H:%M:%S %Z # # Long month names (without case ending) janúar Modified: stable/11/share/timedef/is_IS.UTF-8.src ============================================================================== --- stable/11/share/timedef/is_IS.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/is_IS.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ laugardagur %d.%m.%Y # # c_fmt -%e. %B %Y kl. %H:%M:%S +%A %e %B %Y kl. %H:%M:%S # # AM/PM f.h. e.h. # # date_fmt -%e. %B %Y kl. %H:%M:%S %Z +%A %e %B %Y kl. %H:%M:%S %Z # # Long month names (without case ending) janúar Modified: stable/11/share/timedef/nb_NO.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/nb_NO.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/nb_NO.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ lørdag %d.%m.%Y # # c_fmt -%e. %B %Y kl. %H.%M.%S +%A %e %B %Y kl. %H.%M.%S # # AM/PM a.m. p.m. # # date_fmt -%e. %B %Y kl. %H.%M.%S %Z +%A %e %B %Y kl. %H.%M.%S %Z # # Long month names (without case ending) januar Modified: stable/11/share/timedef/nb_NO.UTF-8.src ============================================================================== --- stable/11/share/timedef/nb_NO.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/nb_NO.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ lørdag %d.%m.%Y # # c_fmt -%e. %B %Y kl. %H.%M.%S +%A %e %B %Y kl. %H.%M.%S # # AM/PM a.m. p.m. # # date_fmt -%e. %B %Y kl. %H.%M.%S %Z +%A %e %B %Y kl. %H.%M.%S %Z # # Long month names (without case ending) januar Modified: stable/11/share/timedef/nn_NO.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/nn_NO.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/nn_NO.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ laurdag %d.%m.%Y # # c_fmt -%e. %B %Y kl. %H:%M:%S +%A %e %B %Y kl. %H:%M:%S # # AM/PM formiddag ettermiddag # # date_fmt -%e. %B %Y kl. %H:%M:%S %Z +%A %e %B %Y kl. %H:%M:%S %Z # # Long month names (without case ending) januar Modified: stable/11/share/timedef/nn_NO.UTF-8.src ============================================================================== --- stable/11/share/timedef/nn_NO.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/nn_NO.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ laurdag %d.%m.%Y # # c_fmt -%e. %B %Y kl. %H:%M:%S +%A %e %B %Y kl. %H:%M:%S # # AM/PM formiddag ettermiddag # # date_fmt -%e. %B %Y kl. %H:%M:%S %Z +%A %e %B %Y kl. %H:%M:%S %Z # # Long month names (without case ending) januar Modified: stable/11/share/timedef/sk_SK.ISO8859-2.src ============================================================================== --- stable/11/share/timedef/sk_SK.ISO8859-2.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/sk_SK.ISO8859-2.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ sobota %d.%m.%y # # c_fmt -%e. %B %Y, %H:%M:%S +%A %e %B %Y, %H:%M:%S # # AM/PM dopoludnia odpoludnia # # date_fmt -%e. %B %Y, %H:%M:%S %Z +%A %e %B %Y, %H:%M:%S %Z # # Long month names (without case ending) januára Modified: stable/11/share/timedef/sk_SK.UTF-8.src ============================================================================== --- stable/11/share/timedef/sk_SK.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/sk_SK.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ sobota %d.%m.%y # # c_fmt -%e. %B %Y, %H:%M:%S +%A %e %B %Y, %H:%M:%S # # AM/PM dopoludnia odpoludnia # # date_fmt -%e. %B %Y, %H:%M:%S %Z +%A %e %B %Y, %H:%M:%S %Z # # Long month names (without case ending) januára From owner-svn-src-all@freebsd.org Sun Jul 24 09:15:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 247D6BA3CA9; Sun, 24 Jul 2016 09:15:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F056D168B; Sun, 24 Jul 2016 09:15:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O9FCJ1093292; Sun, 24 Jul 2016 09:15:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O9FBk2093286; Sun, 24 Jul 2016 09:15:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607240915.u6O9FBk2093286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 24 Jul 2016 09:15:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303261 - in head/sys: amd64/amd64 amd64/include/pc arm/arm arm64/arm64 i386/include/pc sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 09:15:13 -0000 Author: mav Date: Sun Jul 24 09:15:11 2016 New Revision: 303261 URL: https://svnweb.freebsd.org/changeset/base/303261 Log: Add more UEFI/e820 memory types from latest specifications. This is only cosmetics. MFC after: 2 weeks Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/include/pc/bios.h head/sys/arm/arm/machdep.c head/sys/arm64/arm64/machdep.c head/sys/i386/include/pc/bios.h head/sys/sys/efi.h Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Jul 24 09:00:16 2016 (r303260) +++ head/sys/amd64/amd64/machdep.c Sun Jul 24 09:15:11 2016 (r303261) @@ -1090,7 +1090,8 @@ add_efi_map_entries(struct efi_map_heade "ACPIMemoryNVS", "MemoryMappedIO", "MemoryMappedIOPortSpace", - "PalCode" + "PalCode", + "PersistentMemory" }; /* @@ -1111,7 +1112,7 @@ add_efi_map_entries(struct efi_map_heade for (i = 0, p = map; i < ndesc; i++, p = efi_next_descriptor(p, efihdr->descriptor_size)) { if (boothowto & RB_VERBOSE) { - if (p->md_type <= EFI_MD_TYPE_PALCODE) + if (p->md_type < nitems(types)) type = types[p->md_type]; else type = ""; @@ -1133,6 +1134,12 @@ add_efi_map_entries(struct efi_map_heade printf("RP "); if (p->md_attr & EFI_MD_ATTR_XP) printf("XP "); + if (p->md_attr & EFI_MD_ATTR_NV) + printf("NV "); + if (p->md_attr & EFI_MD_ATTR_MORE_RELIABLE) + printf("MORE_RELIABLE "); + if (p->md_attr & EFI_MD_ATTR_RO) + printf("RO "); if (p->md_attr & EFI_MD_ATTR_RT) printf("RUNTIME"); printf("\n"); Modified: head/sys/amd64/include/pc/bios.h ============================================================================== --- head/sys/amd64/include/pc/bios.h Sun Jul 24 09:00:16 2016 (r303260) +++ head/sys/amd64/include/pc/bios.h Sun Jul 24 09:15:11 2016 (r303261) @@ -40,6 +40,9 @@ #define SMAP_TYPE_ACPI_RECLAIM 3 #define SMAP_TYPE_ACPI_NVS 4 #define SMAP_TYPE_ACPI_ERROR 5 +#define SMAP_TYPE_DISABLED 6 +#define SMAP_TYPE_PMEM 7 +#define SMAP_TYPE_PRAM 12 #define SMAP_XATTR_ENABLED 0x00000001 #define SMAP_XATTR_NON_VOLATILE 0x00000002 Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sun Jul 24 09:00:16 2016 (r303260) +++ head/sys/arm/arm/machdep.c Sun Jul 24 09:15:11 2016 (r303261) @@ -1424,7 +1424,8 @@ add_efi_map_entries(struct efi_map_heade "ACPIMemoryNVS", "MemoryMappedIO", "MemoryMappedIOPortSpace", - "PalCode" + "PalCode", + "PersistentMemory" }; *mrcnt = 0; @@ -1448,7 +1449,7 @@ add_efi_map_entries(struct efi_map_heade for (i = 0, j = 0, p = map; i < ndesc; i++, p = efi_next_descriptor(p, efihdr->descriptor_size)) { if (boothowto & RB_VERBOSE) { - if (p->md_type <= EFI_MD_TYPE_PALCODE) + if (p->md_type < nitems(types)) type = types[p->md_type]; else type = ""; @@ -1470,6 +1471,12 @@ add_efi_map_entries(struct efi_map_heade printf("RP "); if (p->md_attr & EFI_MD_ATTR_XP) printf("XP "); + if (p->md_attr & EFI_MD_ATTR_NV) + printf("NV "); + if (p->md_attr & EFI_MD_ATTR_MORE_RELIABLE) + printf("MORE_RELIABLE "); + if (p->md_attr & EFI_MD_ATTR_RO) + printf("RO "); if (p->md_attr & EFI_MD_ATTR_RT) printf("RUNTIME"); printf("\n"); Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Sun Jul 24 09:00:16 2016 (r303260) +++ head/sys/arm64/arm64/machdep.c Sun Jul 24 09:15:11 2016 (r303261) @@ -707,7 +707,8 @@ add_efi_map_entries(struct efi_map_heade "ACPIMemoryNVS", "MemoryMappedIO", "MemoryMappedIOPortSpace", - "PalCode" + "PalCode", + "PersistentMemory" }; /* @@ -728,7 +729,7 @@ add_efi_map_entries(struct efi_map_heade for (i = 0, p = map; i < ndesc; i++, p = efi_next_descriptor(p, efihdr->descriptor_size)) { if (boothowto & RB_VERBOSE) { - if (p->md_type <= EFI_MD_TYPE_PALCODE) + if (p->md_type < nitems(types)) type = types[p->md_type]; else type = ""; @@ -750,6 +751,12 @@ add_efi_map_entries(struct efi_map_heade printf("RP "); if (p->md_attr & EFI_MD_ATTR_XP) printf("XP "); + if (p->md_attr & EFI_MD_ATTR_NV) + printf("NV "); + if (p->md_attr & EFI_MD_ATTR_MORE_RELIABLE) + printf("MORE_RELIABLE "); + if (p->md_attr & EFI_MD_ATTR_RO) + printf("RO "); if (p->md_attr & EFI_MD_ATTR_RT) printf("RUNTIME"); printf("\n"); Modified: head/sys/i386/include/pc/bios.h ============================================================================== --- head/sys/i386/include/pc/bios.h Sun Jul 24 09:00:16 2016 (r303260) +++ head/sys/i386/include/pc/bios.h Sun Jul 24 09:15:11 2016 (r303261) @@ -210,6 +210,9 @@ struct PIR_table #define SMAP_TYPE_ACPI_RECLAIM 3 #define SMAP_TYPE_ACPI_NVS 4 #define SMAP_TYPE_ACPI_ERROR 5 +#define SMAP_TYPE_DISABLED 6 +#define SMAP_TYPE_PMEM 7 +#define SMAP_TYPE_PRAM 12 #define SMAP_XATTR_ENABLED 0x00000001 #define SMAP_XATTR_NON_VOLATILE 0x00000002 Modified: head/sys/sys/efi.h ============================================================================== --- head/sys/sys/efi.h Sun Jul 24 09:00:16 2016 (r303260) +++ head/sys/sys/efi.h Sun Jul 24 09:15:11 2016 (r303261) @@ -69,6 +69,7 @@ struct efi_md { #define EFI_MD_TYPE_IOMEM 11 /* Memory-mapped I/O. */ #define EFI_MD_TYPE_IOPORT 12 /* I/O port space. */ #define EFI_MD_TYPE_PALCODE 13 /* PAL */ +#define EFI_MD_TYPE_PERSISTENT 14 /* Persistent memory. */ uint32_t __pad; uint64_t md_phys; void *md_virt; @@ -82,6 +83,10 @@ struct efi_md { #define EFI_MD_ATTR_WP 0x0000000000001000UL #define EFI_MD_ATTR_RP 0x0000000000002000UL #define EFI_MD_ATTR_XP 0x0000000000004000UL +#define EFI_MD_ATTR_NV 0x0000000000008000UL +#define EFI_MD_ATTR_MORE_RELIABLE \ + 0x0000000000010000UL +#define EFI_MD_ATTR_RO 0x0000000000020000UL #define EFI_MD_ATTR_RT 0x8000000000000000UL }; From owner-svn-src-all@freebsd.org Sun Jul 24 10:00:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A09DB9B8CB; Sun, 24 Jul 2016 10:00:30 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 757921D27; Sun, 24 Jul 2016 10:00:30 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OA0TPS008858; Sun, 24 Jul 2016 10:00:29 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OA0TK7008856; Sun, 24 Jul 2016 10:00:29 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201607241000.u6OA0TK7008856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 24 Jul 2016 10:00:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303262 - stable/11/usr.sbin/ctld X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 10:00:30 -0000 Author: trasz Date: Sun Jul 24 10:00:29 2016 New Revision: 303262 URL: https://svnweb.freebsd.org/changeset/base/303262 Log: MFC r303132: Add documentation for "ctld -u", the UCL configuration file format. Submitted by: jceel@ Approved by: re (kib) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D7222 Modified: stable/11/usr.sbin/ctld/ctl.conf.5 stable/11/usr.sbin/ctld/ctld.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/11/usr.sbin/ctld/ctl.conf.5 Sun Jul 24 09:15:11 2016 (r303261) +++ stable/11/usr.sbin/ctld/ctl.conf.5 Sun Jul 24 10:00:29 2016 (r303262) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2015 +.Dd July 21, 2016 .Dt CTL.CONF 5 .Os .Sh NAME @@ -481,6 +481,97 @@ target naa.50015178f369f092 { lun 0 example_1 } .Ed +.Pp +An equivalent configuration in UCL format, for use with +.Fl u : +.Bd -literal +auth-group { + ag0 { + chap-mutual = [ + { + user = "user" + secret = "secretsecret" + mutual-user = "mutualuser" + mutual-secret = "mutualsecret" + }, + { + user = "user2" + secret = "secret2secret2" + mutual-user = "mutualuser" + mutual-secret = "mutualsecret" + } + ] + } + + ag1 { + auth-type = none + initiator-name = [ + "iqn.2012-06.com.example:initiatorhost1", + "iqn.2012-06.com.example:initiatorhost2" + ] + initiator-portal = [192.168.1.1/24, "[2001:db8::de:ef]"] + } +} + +portal-group { + pg0 { + discovery-auth-group = no-authentication + listen = [ + 0.0.0.0:3260, + "[::]:3260", + "[fe80::be:ef]:3261" + ] + } +} + +lun { + example_0 { + path = /dev/zvol/tank/example_0 + blocksize = 4096 + size = "4G" + } + + example_1 { + path = /dev/zvol/tank/example_1 + options { + naa = "0x50015178f369f093" + } + } + + example_2 { + path = /dev/zvol/tank/example_2 + options { + vendor = "FreeBSD" + } + } +} + +target { + "iqn.2012-06.com.example:target0" { + alias = "Example target" + auth-group = no-authentication + lun = [ + { number = 0, name = example_0 }, + ] + } + + "iqn.2012-06.com.example:target1" { + auth-group = ag0 + portal-group { name = pg0 } + lun = [ + { number = 0, name = example_1 }, + { number = 1, name = example_2 } + ] + } + + naa.50015178f369f092 { + port = isp0 + lun = [ + { number = 0, name = example_1 } + ] + } +} +.Ed .Sh SEE ALSO .Xr ctl 4 , .Xr ctladm 8 , Modified: stable/11/usr.sbin/ctld/ctld.8 ============================================================================== --- stable/11/usr.sbin/ctld/ctld.8 Sun Jul 24 09:15:11 2016 (r303261) +++ stable/11/usr.sbin/ctld/ctld.8 Sun Jul 24 10:00:29 2016 (r303262) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 22, 2015 +.Dd July 21, 2016 .Dt CTLD 8 .Os .Sh NAME @@ -37,6 +37,7 @@ .Nm .Op Fl d .Op Fl f Ar config-file +.Op Fl u .Sh DESCRIPTION The .Nm @@ -84,6 +85,8 @@ The daemon sends verbose debug output to put itself in the background. The daemon will also not fork and will exit after processing one connection. This option is only intended for debugging the target. +.It Fl u +Use UCL configuration file format instead of the traditional non-UCL format. .El .Sh FILES .Bl -tag -width ".Pa /var/run/ctld.pid" -compact From owner-svn-src-all@freebsd.org Sun Jul 24 10:10:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20173B9BBB4; Sun, 24 Jul 2016 10:10:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7E06131C; Sun, 24 Jul 2016 10:10:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OAAA2W012436; Sun, 24 Jul 2016 10:10:10 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OAA9IJ012434; Sun, 24 Jul 2016 10:10:09 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201607241010.u6OAA9IJ012434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 24 Jul 2016 10:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303263 - in head/sys: compat/svr4 net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 10:10:11 -0000 Author: glebius Date: Sun Jul 24 10:10:09 2016 New Revision: 303263 URL: https://svnweb.freebsd.org/changeset/base/303263 Log: Partially revert r257696/r257713, which have an issue with writing to user controlled address. Restore the old code that emulated OSIOCGIFCONF in if.c. Noticed by: C Turt Modified: head/sys/compat/svr4/svr4_sockio.c head/sys/net/if.c Modified: head/sys/compat/svr4/svr4_sockio.c ============================================================================== --- head/sys/compat/svr4/svr4_sockio.c Sun Jul 24 10:00:29 2016 (r303262) +++ head/sys/compat/svr4/svr4_sockio.c Sun Jul 24 10:10:09 2016 (r303263) @@ -73,6 +73,8 @@ bsd_to_svr4_flags(bf) return sf; } +#define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) + int svr4_sock_ioctl(fp, td, retval, fd, cmd, data) struct file *fp; @@ -144,7 +146,6 @@ svr4_sock_ioctl(fp, td, retval, fd, cmd, case SVR4_SIOCGIFCONF: { struct svr4_ifconf sc; - struct ifconf *ifc; if ((error = copyin(data, &sc, sizeof(sc))) != 0) return error; @@ -153,19 +154,9 @@ svr4_sock_ioctl(fp, td, retval, fd, cmd, sizeof(struct ifreq), sizeof(struct svr4_ifreq), sc.svr4_ifc_len)); - ifc = (struct ifconf *)≻ - ifc->ifc_req->ifr_addr.sa_family = - sc.svr4_ifc_req->svr4_ifr_addr.sa_family; - ifc->ifc_req->ifr_addr.sa_len = - sizeof(struct osockaddr); - - error = fo_ioctl(fp, SIOCGIFCONF, &sc, td->td_ucred, - td); - - sc.svr4_ifc_req->svr4_ifr_addr.sa_family = - ifc->ifc_req->ifr_addr.sa_family; - - if (error != 0) + if ((error = fo_ioctl(fp, OSIOCGIFCONF, + (caddr_t) &sc, td->td_ucred, + td)) != 0) return error; DPRINTF(("SIOCGIFCONF\n")); Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sun Jul 24 10:00:29 2016 (r303262) +++ head/sys/net/if.c Sun Jul 24 10:10:09 2016 (r303263) @@ -2699,6 +2699,9 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, return (error); } +/* COMPAT_SVR4 */ +#define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) + #ifdef COMPAT_FREEBSD32 struct ifconf32 { int32_t ifc_len; @@ -2738,6 +2741,7 @@ ifioctl(struct socket *so, u_long cmd, c switch (cmd) { case SIOCGIFCONF: + case OSIOCGIFCONF: /* COMPAT_SVR4 */ error = ifconf(cmd, data); CURVNET_RESTORE(); return (error); @@ -3009,6 +3013,15 @@ again: if (prison_if(curthread->td_ucred, sa) != 0) continue; addrs++; + /* COMPAT_SVR4 */ + if (cmd == OSIOCGIFCONF) { + struct osockaddr *osa = + (struct osockaddr *)&ifr.ifr_addr; + ifr.ifr_addr = *sa; + osa->sa_family = sa->sa_family; + sbuf_bcat(sb, &ifr, sizeof(ifr)); + max_len += sizeof(ifr); + } else if (sa->sa_len <= sizeof(*sa)) { ifr.ifr_addr = *sa; sbuf_bcat(sb, &ifr, sizeof(ifr)); From owner-svn-src-all@freebsd.org Sun Jul 24 10:15:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46D10B9BDF9; Sun, 24 Jul 2016 10:15:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 31C3617E9; Sun, 24 Jul 2016 10:15:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u6OAF8C5036214 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 24 Jul 2016 03:15:08 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u6OAF8CS036213; Sun, 24 Jul 2016 03:15:08 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 24 Jul 2016 03:15:08 -0700 From: Gleb Smirnoff To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303263 - in head/sys: compat/svr4 net Message-ID: <20160724101508.GJ1076@FreeBSD.org> References: <201607241010.u6OAA9IJ012434@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201607241010.u6OAA9IJ012434@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 10:15:10 -0000 On Sun, Jul 24, 2016 at 10:10:09AM +0000, Gleb Smirnoff wrote: T> Author: glebius T> Date: Sun Jul 24 10:10:09 2016 T> New Revision: 303263 T> URL: https://svnweb.freebsd.org/changeset/base/303263 T> T> Log: T> Partially revert r257696/r257713, which have an issue with writing to user T> controlled address. Restore the old code that emulated OSIOCGIFCONF in if.c. T> T> Noticed by: C Turt I believe no one on the planet uses compat_svr4, but better fix it for 11.0-RELEASE, since too late to remove it. Note that SVR4_SIOCGIFCONF actually won't work for FreeBSD 10.x, if you load in compat_svr4.ko, since it depends on COMPAT_43 functionality compiled in kernel, which isn't case for i386 GENERIC. Of course the change wasn't tested, since I don't know how to produce or where to take an SVR4 binary that does something useful with SVR4_SIOCGIFCONF. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Sun Jul 24 10:35:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2984DBA14F5; Sun, 24 Jul 2016 10:35:46 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E83AC142B; Sun, 24 Jul 2016 10:35:45 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OAZjTD023472; Sun, 24 Jul 2016 10:35:45 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OAZijR023467; Sun, 24 Jul 2016 10:35:44 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201607241035.u6OAZijR023467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 24 Jul 2016 10:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303264 - head/usr.bin/calendar/calendars/ru_RU.UTF-8 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 10:35:46 -0000 Author: glebius Date: Sun Jul 24 10:35:44 2016 New Revision: 303264 URL: https://svnweb.freebsd.org/changeset/base/303264 Log: The date format for ru_RU.UTF-8 locale has changed some time ago, adjust the ru_RU.UTF-8 calendar files. Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.common head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.holiday head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.military head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.orthodox head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.common ============================================================================== --- head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.common Sun Jul 24 10:10:09 2016 (r303263) +++ head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.common Sun Jul 24 10:35:44 2016 (r303264) @@ -9,97 +9,97 @@ LANG=ru_RU.UTF-8 -12 Ñнв День работника прокуратуры -13 Ñнв День роÑÑийÑкой печати -14 Ñнв Старый Ðовый год -21 Ñнв День инженерных войÑк -25 Ñнв ТатьÑнин день. СтуденчеÑкий праздник - 8 фев День роÑÑийÑкой науки -10 фев День дипломатичеÑкого работника - 1 мар Ð’Ñемирный день гражданÑкой обороны +12 Ñнв. День работника прокуратуры +13 Ñнв. День роÑÑийÑкой печати +14 Ñнв. Старый Ðовый год +21 Ñнв. День инженерных войÑк +25 Ñнв. ТатьÑнин день. СтуденчеÑкий праздник + 8 февр. День роÑÑийÑкой науки +10 февр. День дипломатичеÑкого работника + 1 марта Ð’Ñемирный день гражданÑкой обороны 03/SunSecond День работников геодезии и картографии -11 мар День работника органов Ð½Ð°Ñ€ÐºÐ¾ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»Ñ -18 мар День налоговой полиции +11 марта День работника органов Ð½Ð°Ñ€ÐºÐ¾ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»Ñ +18 марта День налоговой полиции 03/SunThird День работников торговли, бытового обÑÐ»ÑƒÐ¶Ð¸Ð²Ð°Ð½Ð¸Ñ Ð½Ð°ÑÐµÐ»ÐµÐ½Ð¸Ñ Ð¸ жилищно-коммунального хозÑйÑтва -27 мар Международный день театра -27 мар День внутренних войÑк - 1 апр День Ñмеха - 2 апр День ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð½Ð°Ñ€Ð¾Ð´Ð¾Ð² +27 марта Международный день театра +27 марта День внутренних войÑк + 1 апр. День Ñмеха + 2 апр. День ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð½Ð°Ñ€Ð¾Ð´Ð¾Ð² 04/SunFirst День геолога -12 апр День коÑмонавтики +12 апр. День коÑмонавтики 04/SunSecond День войÑк противовоздушной обороны -26 апр День памÑти погибших в радиационных авариÑÑ… и катаÑтрофах -30 апр День пожарной охраны - 7 май День радио -17 май Международный день телекоммуникаций -18 май Международный день музеев -24 май День ÑлавÑнÑкой пиÑьменноÑти и культуры -26 май День роÑÑийÑкого предпринимательÑтва -27 май ОбщероÑÑийÑкий день библиотек -28 май День пограничника -30 май День пожарной охраны -31 май День РоÑÑийÑкой Ðдвокатуры +26 апр. День памÑти погибших в радиационных авариÑÑ… и катаÑтрофах +30 апр. День пожарной охраны + 7 Ð¼Ð°Ñ Ð”ÐµÐ½ÑŒ радио +17 Ð¼Ð°Ñ ÐœÐµÐ¶Ð´ÑƒÐ½Ð°Ñ€Ð¾Ð´Ð½Ñ‹Ð¹ день телекоммуникаций +18 Ð¼Ð°Ñ ÐœÐµÐ¶Ð´ÑƒÐ½Ð°Ñ€Ð¾Ð´Ð½Ñ‹Ð¹ день музеев +24 Ð¼Ð°Ñ Ð”ÐµÐ½ÑŒ ÑлавÑнÑкой пиÑьменноÑти и культуры +26 Ð¼Ð°Ñ Ð”ÐµÐ½ÑŒ роÑÑийÑкого предпринимательÑтва +27 Ð¼Ð°Ñ ÐžÐ±Ñ‰ÐµÑ€Ð¾ÑÑийÑкий день библиотек +28 Ð¼Ð°Ñ Ð”ÐµÐ½ÑŒ пограничника +30 Ð¼Ð°Ñ Ð”ÐµÐ½ÑŒ пожарной охраны +31 Ð¼Ð°Ñ Ð”ÐµÐ½ÑŒ РоÑÑийÑкой Ðдвокатуры 05/SunLast День химика - 1 июн День защиты детей - 5 июн День Ñколога - 6 июн ПушкинÑкий день - 8 июн День Ñоциального работника + 1 Ð¸ÑŽÐ½Ñ Ð”ÐµÐ½ÑŒ защиты детей + 5 Ð¸ÑŽÐ½Ñ Ð”ÐµÐ½ÑŒ Ñколога + 6 Ð¸ÑŽÐ½Ñ ÐŸÑƒÑˆÐºÐ¸Ð½Ñкий день + 8 Ð¸ÑŽÐ½Ñ Ð”ÐµÐ½ÑŒ Ñоциального работника 06/SunSecond День работников легкой промышленноÑти 06/SunThird День медицинÑкого работника -22 июн День памÑти и Ñкорби (Ðачало Великой ОтечеÑтвенной Войны, 1941 год) -27 июн День молодежи -29 июн День партизан и подпольщиков +22 Ð¸ÑŽÐ½Ñ Ð”ÐµÐ½ÑŒ памÑти и Ñкорби (Ðачало Великой ОтечеÑтвенной Войны, 1941 год) +27 Ð¸ÑŽÐ½Ñ Ð”ÐµÐ½ÑŒ молодежи +29 Ð¸ÑŽÐ½Ñ Ð”ÐµÐ½ÑŒ партизан и подпольщиков 06/SatLast День Ð¸Ð·Ð¾Ð±Ñ€ÐµÑ‚Ð°Ñ‚ÐµÐ»Ñ Ð¸ рационализатора 07/SunFirst День работников морÑкого и речного флота 07/SunSecond День рыбака 07/SunSecond День роÑÑийÑкой почты 07/SunThird День металлурга 07/SunLast День Военно-МорÑкого Флота -28 июл День ÐºÑ€ÐµÑ‰ÐµÐ½Ð¸Ñ Ð ÑƒÑи - 6 авг День железнодорожных войÑк +28 Ð¸ÑŽÐ»Ñ Ð”ÐµÐ½ÑŒ ÐºÑ€ÐµÑ‰ÐµÐ½Ð¸Ñ Ð ÑƒÑи + 6 авг. День железнодорожных войÑк 08/SunFirst День железнодорожника -12 авг День военно-воздушных Ñил +12 авг. День военно-воздушных Ñил 08/SunSecond День ÑÑ‚Ñ€Ð¾Ð¸Ñ‚ÐµÐ»Ñ 08/SunThird День Воздушного Флота -22 авг День гоÑударÑтвенного флага -27 авг День кино +22 авг. День гоÑударÑтвенного флага +27 авг. День кино 08/SunLast День шахтера - 1 Ñен День знаний - 2 Ñен День роÑÑийÑкой гвардии - 3 Ñен День ÑолидарноÑти в борьбе Ñ Ñ‚ÐµÑ€Ñ€Ð¾Ñ€Ð¸Ð·Ð¼Ð¾Ð¼ - 4 Ñен День ÑпециалиÑта по Ñдерному обеÑпечению + 1 Ñент. День знаний + 2 Ñент. День роÑÑийÑкой гвардии + 3 Ñент. День ÑолидарноÑти в борьбе Ñ Ñ‚ÐµÑ€Ñ€Ð¾Ñ€Ð¸Ð·Ð¼Ð¾Ð¼ + 4 Ñент. День ÑпециалиÑта по Ñдерному обеÑпечению 09/SunFirst День работников нефтÑной и газовой промышленноÑти 09/SunSecond День танкиÑта 09/SunThird День работников леÑа -28 Ñен День работника атомной промышленноÑти +28 Ñент. День работника атомной промышленноÑти 09/SunLast День машиноÑÑ‚Ñ€Ð¾Ð¸Ñ‚ÐµÐ»Ñ - 1 окт День пожилых людей - 1 окт День Ñухопутных войÑк - 4 окт День коÑмичеÑких войÑк - 5 окт День ÑƒÑ‡Ð¸Ñ‚ÐµÐ»Ñ -14 окт Международный день Ñтандартизации + 1 окт. День пожилых людей + 1 окт. День Ñухопутных войÑк + 4 окт. День коÑмичеÑких войÑк + 5 окт. День ÑƒÑ‡Ð¸Ñ‚ÐµÐ»Ñ +14 окт. Международный день Ñтандартизации 10/SunSecond День работников ÑельÑкого хозÑйÑтва и перерабатывающей промышленноÑти 10/SunThird День работников дорожного хозÑйÑтва -24 окт Международный день ООР-25 окт День таможенника -30 окт День памÑти жертв политичеÑких репреÑÑий +24 окт. Международный день ООР+25 окт. День таможенника +30 окт. День памÑти жертв политичеÑких репреÑÑий 10/SunLast День работников автомобильного транÑпорта - 7 Ð½Ð¾Ñ Ð”ÐµÐ½ÑŒ октÑбрьÑкой революции 1917 года - 9 Ð½Ð¾Ñ Ð’Ñемирный день качеÑтва -10 Ð½Ð¾Ñ Ð”ÐµÐ½ÑŒ милиции -16 Ð½Ð¾Ñ Ð”ÐµÐ½ÑŒ морÑкой пехоты -17 Ð½Ð¾Ñ ÐœÐµÐ¶Ð´ÑƒÐ½Ð°Ñ€Ð¾Ð´Ð½Ñ‹Ð¹ день Ñтудентов -19 Ð½Ð¾Ñ Ð”ÐµÐ½ÑŒ ракетных войÑк и артиллерии -21 Ð½Ð¾Ñ Ð”ÐµÐ½ÑŒ работников налоговых органов -26 Ð½Ð¾Ñ Ð’Ñемирный день информации + 7 ноÑб. День окт.ÑбрьÑкой революции 1917 года + 9 ноÑб. Ð’Ñемирный день качеÑтва +10 ноÑб. День милиции +16 ноÑб. День морÑкой пехоты +17 ноÑб. Международный день Ñтудентов +19 ноÑб. День ракетных войÑк и артиллерии +21 ноÑб. День работников налоговых органов +26 ноÑб. Ð’Ñемирный день информации 11/SunLast День матери - 1 дек Ð’Ñемирный день борьбы Ñо СПИДом - 3 дек День юриÑта - 9 дек День Героев ОтечеÑтва -12 дек День КонÑтитуции -17 дек День ракетных войÑк ÑтратегичеÑкого Ð½Ð°Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ -20 дек День работника органов безопаÑноÑти -22 дек День Ñнергетика -27 дек День ÑпаÑÐ°Ñ‚ÐµÐ»Ñ + 1 дек. Ð’Ñемирный день борьбы Ñо СПИДом + 3 дек. День юриÑта + 9 дек. День Героев ОтечеÑтва +12 дек. День КонÑтитуции +17 дек. День ракетных войÑк ÑтратегичеÑкого Ð½Ð°Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ +20 дек. День работника органов безопаÑноÑти +22 дек. День Ñнергетика +27 дек. День ÑпаÑÐ°Ñ‚ÐµÐ»Ñ #endif /* !_ru_RU_UTF_8_common_ */ Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.holiday ============================================================================== --- head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.holiday Sun Jul 24 10:10:09 2016 (r303263) +++ head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.holiday Sun Jul 24 10:35:44 2016 (r303264) @@ -9,17 +9,17 @@ LANG=ru_RU.UTF-8 - 1 Ñнв Ðовый год - 2 Ñнв Ðовогодние каникулы - 3 Ñнв Ðовогодние каникулы - 4 Ñнв Ðовогодние каникулы - 5 Ñнв Ðовогодние каникулы - 7 Ñнв РождеÑтво ХриÑтово -23 фев День защитника ОтечеÑтва - 8 мар Международный женÑкий день - 1 май Праздник ВеÑны и Труда - 9 май День Победы -12 июн День РоÑÑии - 4 Ð½Ð¾Ñ Ð”ÐµÐ½ÑŒ народного единÑтва + 1 Ñнв. Ðовый год + 2 Ñнв. Ðовогодние каникулы + 3 Ñнв. Ðовогодние каникулы + 4 Ñнв. Ðовогодние каникулы + 5 Ñнв. Ðовогодние каникулы + 7 Ñнв. РождеÑтво ХриÑтово +23 февр. День защитника ОтечеÑтва + 8 марта Международный женÑкий день + 1 Ð¼Ð°Ñ ÐŸÑ€Ð°Ð·Ð´Ð½Ð¸Ðº ВеÑны и Труда + 9 Ð¼Ð°Ñ Ð”ÐµÐ½ÑŒ Победы +12 Ð¸ÑŽÐ½Ñ Ð”ÐµÐ½ÑŒ РоÑÑии + 4 ноÑб. День народного единÑтва #endif /* !_ru_RU_UTF_8_holiday_ */ Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.military ============================================================================== --- head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.military Sun Jul 24 10:10:09 2016 (r303263) +++ head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.military Sun Jul 24 10:35:44 2016 (r303264) @@ -9,20 +9,20 @@ LANG=ru_RU.UTF-8 -27 Ñнв День ÑнÑÑ‚Ð¸Ñ Ð±Ð»Ð¾ÐºÐ°Ð´Ñ‹ города Ленинграда (1944 год) - 2 фев День разгрома ÑоветÑкими войÑками немецко-фашиÑÑ‚Ñких войÑк в СталинградÑкой битве (1943 год) -23 фев День победы КраÑной Ðрмии над кайзеровÑкими войÑками Германии (1918 год) -18 апр День победы руÑÑких воинов кнÑÐ·Ñ ÐлекÑандра ÐевÑкого над немецкими рыцарÑми на ЧудÑком озере (Ледовое побоище, 1242 год) -10 июл День победы руÑÑкой армии под командованием Петра Первого над шведами в ПолтавÑком Ñражении (1709 год) - 9 авг День первой в роÑÑийÑкой иÑтории морÑкой победы руÑÑкого флота под командованием Петра Первого над шведами у мыÑа Гангут (1714 год) -23 авг День разгрома ÑоветÑкими войÑками немецко-фашиÑÑ‚Ñких войÑк в КурÑкой битве (1943 год) - 2 Ñен День Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð’Ñ‚Ð¾Ñ€Ð¾Ð¹ мировой войны (1945 год) - 8 Ñен День БородинÑкого ÑÑ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ€ÑƒÑÑкой армии под командованием Ðœ.И. Кутузова Ñ Ñ„Ñ€Ð°Ð½Ñ†ÑƒÐ·Ñкой армией (1812 год) -11 Ñен День победы руÑÑкой ÑÑкадры под командованием Ф.Ф. Ушакова над турецкой ÑÑкадрой у мыÑа Тендра (1790 год) -21 Ñен День победы руÑÑких полков во главе Ñ Ð²ÐµÐ»Ð¸ÐºÐ¸Ð¼ кнÑзем Дмитрием ДонÑким над монголо-татарÑкими войÑками в КуликовÑкой битве (1380 год) - 7 Ð½Ð¾Ñ Ð”ÐµÐ½ÑŒ оÑÐ²Ð¾Ð±Ð¾Ð¶Ð´ÐµÐ½Ð¸Ñ ÐœÐ¾Ñквы Ñилами народного Ð¾Ð¿Ð¾Ð»Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð´ руководÑтвом Кузьмы Минина и Ð”Ð¼Ð¸Ñ‚Ñ€Ð¸Ñ ÐŸÐ¾Ð¶Ð°Ñ€Ñкого от польÑких интервентов (1612 год) - 1 дек День победы руÑÑкой ÑÑкадры под командованием П.С. Ðахимова над турецкой ÑÑкадрой у мыÑа Синоп (1853 год) - 5 дек День начала контрнаÑÑ‚ÑƒÐ¿Ð»ÐµÐ½Ð¸Ñ ÑоветÑких войÑк против немецко-фашиÑÑ‚Ñких войÑк в битве под МоÑквой (1941 год) -24 дек День взÑÑ‚Ð¸Ñ Ñ‚ÑƒÑ€ÐµÑ†ÐºÐ¾Ð¹ крепоÑти Измаил руÑÑкими войÑками под командованием Ð.Ð’. Суворова (1790 год) +27 Ñнв. День ÑнÑÑ‚Ð¸Ñ Ð±Ð»Ð¾ÐºÐ°Ð´Ñ‹ города Ленинграда (1944 год) + 2 февр. День разгрома ÑоветÑкими войÑками немецко-фашиÑÑ‚Ñких войÑк в СталинградÑкой битве (1943 год) +23 февр. День победы КраÑной Ðрмии над кайзеровÑкими войÑками Германии (1918 год) +18 апр. День победы руÑÑких воинов кнÑÐ·Ñ ÐлекÑандра ÐевÑкого над немецкими рыцарÑми на ЧудÑком озере (Ледовое побоище, 1242 год) +10 Ð¸ÑŽÐ»Ñ Ð”ÐµÐ½ÑŒ победы руÑÑкой армии под командованием Петра Первого над шведами в ПолтавÑком Ñражении (1709 год) + 9 авг. День первой в роÑÑийÑкой иÑтории морÑкой победы руÑÑкого флота под командованием Петра Первого над шведами у мыÑа Гангут (1714 год) +23 авг. День разгрома ÑоветÑкими войÑками немецко-фашиÑÑ‚Ñких войÑк в КурÑкой битве (1943 год) + 2 Ñент. День Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð’Ñ‚Ð¾Ñ€Ð¾Ð¹ мировой войны (1945 год) + 8 Ñент. День БородинÑкого ÑÑ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ€ÑƒÑÑкой армии под командованием Ðœ.И. Кутузова Ñ Ñ„Ñ€Ð°Ð½Ñ†ÑƒÐ·Ñкой армией (1812 год) +11 Ñент. День победы руÑÑкой ÑÑкадры под командованием Ф.Ф. Ушакова над турецкой ÑÑкадрой у мыÑа Тендра (1790 год) +21 Ñент. День победы руÑÑких полков во главе Ñ Ð²ÐµÐ»Ð¸ÐºÐ¸Ð¼ кнÑзем Дмитрием ДонÑким над монголо-татарÑкими войÑками в КуликовÑкой битве (1380 год) + 7 ноÑб. День оÑÐ²Ð¾Ð±Ð¾Ð¶Ð´ÐµÐ½Ð¸Ñ ÐœÐ¾Ñквы Ñилами народного Ð¾Ð¿Ð¾Ð»Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð´ руководÑтвом Кузьмы Минина и Ð”Ð¼Ð¸Ñ‚Ñ€Ð¸Ñ ÐŸÐ¾Ð¶Ð°Ñ€Ñкого от польÑких интервентов (1612 год) + 1 дек. День победы руÑÑкой ÑÑкадры под командованием П.С. Ðахимова над турецкой ÑÑкадрой у мыÑа Синоп (1853 год) + 5 дек. День начала контрнаÑÑ‚ÑƒÐ¿Ð»ÐµÐ½Ð¸Ñ ÑоветÑких войÑк против немецко-фашиÑÑ‚Ñких войÑк в битве под МоÑквой (1941 год) +24 дек. День взÑÑ‚Ð¸Ñ Ñ‚ÑƒÑ€ÐµÑ†ÐºÐ¾Ð¹ крепоÑти Измаил руÑÑкими войÑками под командованием Ð.Ð’. Суворова (1790 год) #endif /* !_ru_RU_UTF_8_military_ */ Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.orthodox ============================================================================== --- head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.orthodox Sun Jul 24 10:10:09 2016 (r303263) +++ head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.orthodox Sun Jul 24 10:35:44 2016 (r303264) @@ -10,27 +10,27 @@ LANG=ru_RU.UTF-8 Paskha=ПаÑха -21 Ñен РождеÑтво ПреÑвÑтой Богородицы -27 Ñен Воздвижение КреÑта ГоÑÐ¿Ð¾Ð´Ð½Ñ -14 окт Покров ПреÑвÑтой Богородицы - 4 дек Введение во храм ПреÑвÑтой Богородицы - 7 Ñнв РождеÑтво ХриÑтово -14 Ñнв Обрезание ГоÑподне -19 Ñнв БогоÑвление или Крещение ГоÑподне -15 фев Сретение ГоÑподне +21 Ñент. РождеÑтво ПреÑвÑтой Богородицы +27 Ñент. Воздвижение КреÑта ГоÑÐ¿Ð¾Ð´Ð½Ñ +14 окт. Покров ПреÑвÑтой Богородицы + 4 дек. Введение во храм ПреÑвÑтой Богородицы + 7 Ñнв. РождеÑтво ХриÑтово +14 Ñнв. Обрезание ГоÑподне +19 Ñнв. БогоÑвление или Крещение ГоÑподне +15 февр. Сретение ГоÑподне ПаÑха-48 Великий ПоÑÑ‚ -ПаÑха-7 Вход ГоÑподень в ИеруÑалим. Вербное ВоÑкреÑенье +ПаÑха-7 Вход ГоÑподень в ИеруÑалим. Вербное ВоÑкреÑент.ье ПаÑха-3 Великий Четверг ПаÑха-2 СтраÑÑ‚Ð½Ð°Ñ ÐŸÑтница -ПаÑха ВоÑкреÑение ХриÑтово -ПаÑха+39 ВознеÑение +ПаÑха ВоÑкреÑент.ие ХриÑтово +ПаÑха+39 ВознеÑент.ие ПаÑха+49 День СвÑтой Троицы. ПÑтидеÑÑтница - 7 апр Благовещение ПреÑвÑтой Богородицы - 7 июл РождеÑтво Иоанна Предтечи -12 июл День ÑвÑÑ‚Ñ‹Ñ… первоверховных апоÑтолов Петра и Павла -19 авг Преображение ГоÑподне -28 авг УÑпение ПреÑвÑтой Богородицы -11 Ñен УÑекновение главы Иоанна Предтечи + 7 апр. Благовещение ПреÑвÑтой Богородицы + 7 Ð¸ÑŽÐ»Ñ Ð Ð¾Ð¶Ð´ÐµÑтво Иоанна Предтечи +12 Ð¸ÑŽÐ»Ñ Ð”ÐµÐ½ÑŒ ÑвÑÑ‚Ñ‹Ñ… первоверховных апоÑтолов Петра и Павла +19 авг. Преображение ГоÑподне +28 авг. УÑпение ПреÑвÑтой Богородицы +11 Ñент. УÑекновение главы Иоанна Предтечи #endif /* !_ru_RU_UTF_8_orthodox_ */ Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan ============================================================================== --- head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan Sun Jul 24 10:10:09 2016 (r303263) +++ head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan Sun Jul 24 10:35:44 2016 (r303264) @@ -10,33 +10,33 @@ LANG=ru_RU.UTF-8 Paskha=ПаÑха -21 дек* Зимнее ÑолнцеÑтоÑние -25 дек КолÑда (Ñдвинутое зимнее ÑолнцеÑтоÑние) - 6 Ñнв День ÐšÐ°Ñ‰ÐµÑ Ð¸ ВелеÑа -24 фев День ВелеÑа -29 фев День ÐšÐ°Ñ‰ÐµÑ - 1 мар День Марены -14 мар Ðовый Год, ОвÑень малый +21 дек.* Зимнее ÑолнцеÑтоÑние +25 дек. КолÑда (Ñдвинутое зимнее ÑолнцеÑтоÑние) + 6 Ñнв. День ÐšÐ°Ñ‰ÐµÑ Ð¸ ВелеÑа +24 февр. День ВелеÑа +29 февр. День ÐšÐ°Ñ‰ÐµÑ + 1 марта День Марены +14 марта Ðовый Год, ОвÑент.ÑŒ малый ПаÑха-55 МаÑленица ПаÑха+7 КраÑÐ½Ð°Ñ Ð“Ð¾Ñ€ÐºÐ° ПаÑха+16 Радуница -20 мар* ВеÑенние равноденÑтвие - 7 апр День Марены (Ñдвинутое веÑеннее равноденÑтвие) - 6 май День Дажьбога, ОвÑень большой -22 май Ярилин День -15 июн День Триглава -21 июн* Летнее ÑолнцеÑтоÑние - 1 июл РуÑÐ°Ð»ÑŒÐ½Ð°Ñ ÐÐµÐ´ÐµÐ»Ñ - 7 июл Купала (Ñдвинутое летнее ÑолнцеÑтоÑние) -27 июл Отбор жертв Перуну, руÑалии - 2 авг Перунов День -21 авг День Стрибога -28 авг УÑпение Златогорки -14 Ñен День Волха Змеевича -22 Ñен* Поворот к зиме (оÑеннее равноденÑтвие) -10 Ð½Ð¾Ñ Ð”ÐµÐ½ÑŒ Макоши -21 Ð½Ð¾Ñ Ð”ÐµÐ½ÑŒ Сварога и Семаргла - 9 дек День Дажьбога и Марены +20 марта* ВеÑент.ние равноденÑтвие + 7 апр. День Марены (Ñдвинутое веÑент.нее равноденÑтвие) + 6 Ð¼Ð°Ñ Ð”ÐµÐ½ÑŒ Дажьбога, ОвÑент.ÑŒ большой +22 Ð¼Ð°Ñ Ð¯Ñ€Ð¸Ð»Ð¸Ð½ День +15 Ð¸ÑŽÐ½Ñ Ð”ÐµÐ½ÑŒ Триглава +21 июнÑ* Летнее ÑолнцеÑтоÑние + 1 Ð¸ÑŽÐ»Ñ Ð ÑƒÑÐ°Ð»ÑŒÐ½Ð°Ñ ÐÐµÐ´ÐµÐ»Ñ + 7 Ð¸ÑŽÐ»Ñ ÐšÑƒÐ¿Ð°Ð»Ð° (Ñдвинутое летнее ÑолнцеÑтоÑние) +27 Ð¸ÑŽÐ»Ñ ÐžÑ‚Ð±Ð¾Ñ€ жертв Перуну, руÑалии + 2 авг. Перунов День +21 авг. День Стрибога +28 авг. УÑпение Златогорки +14 Ñент. День Волха Змеевича +22 Ñент.* Поворот к зиме (оÑеннее равноденÑтвие) +10 ноÑб. День Макоши +21 ноÑб. День Сварога и Семартагла + 9 дек. День Дажьбога и Марены #endif /* !_ru_RU_UTF_8_pagan_ */ From owner-svn-src-all@freebsd.org Sun Jul 24 11:05:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DA70BA1E42; Sun, 24 Jul 2016 11:05:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EC1312FA; Sun, 24 Jul 2016 11:05:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OB5NHL034893; Sun, 24 Jul 2016 11:05:23 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OB5Nbh034892; Sun, 24 Jul 2016 11:05:23 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607241105.u6OB5Nbh034892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 24 Jul 2016 11:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303265 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 11:05:24 -0000 Author: bapt Date: Sun Jul 24 11:05:23 2016 New Revision: 303265 URL: https://svnweb.freebsd.org/changeset/base/303265 Log: Remove reference cpp(1) which is not used anymore Modified: head/usr.bin/calendar/calendar.1 Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Sun Jul 24 10:35:44 2016 (r303264) +++ head/usr.bin/calendar/calendar.1 Sun Jul 24 11:05:23 2016 (r303265) @@ -28,7 +28,7 @@ .\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 .\" $FreeBSD$ .\" -.Dd April 6, 2013 +.Dd July 24, 2016 .Dt CALENDAR 1 .Os .Sh NAME @@ -295,7 +295,6 @@ This is no longer true, the date is only at the beginning of a line. .Sh SEE ALSO .Xr at 1 , -.Xr cpp 1 , .Xr mail 1 , .Xr cron 8 .Sh HISTORY From owner-svn-src-all@freebsd.org Sun Jul 24 14:42:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01CF9BA3E74; Sun, 24 Jul 2016 14:42:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C85821A44; Sun, 24 Jul 2016 14:42:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OEgCrD017988; Sun, 24 Jul 2016 14:42:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OEgCQb017987; Sun, 24 Jul 2016 14:42:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607241442.u6OEgCQb017987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 24 Jul 2016 14:42:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303266 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 14:42:13 -0000 Author: mav Date: Sun Jul 24 14:42:11 2016 New Revision: 303266 URL: https://svnweb.freebsd.org/changeset/base/303266 Log: Postpone ntb_get_msix_info() till we need to negotiate MSIX. Calling it earlier increases the window when MSIX info may change. This change does not solve the problem completely, but seems logical. Complete solution should probably include link reset in case of MSIX remap to trigger new negotiation, but we have no way to get notified about that now. Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Jul 24 11:05:23 2016 (r303265) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Jul 24 14:42:11 2016 (r303266) @@ -1084,8 +1084,6 @@ ntb_init_isr(struct ntb_softc *ntb) ntb_create_msix_vec(ntb, num_vectors); rc = ntb_setup_msix(ntb, num_vectors); - if (rc == 0 && HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) - ntb_get_msix_info(ntb); } if (rc != 0) { device_printf(ntb->device, @@ -2715,6 +2713,7 @@ ntb_exchange_msix(void *ctx) if (ntb->peer_msix_done) goto msix_done; + ntb_get_msix_info(ntb); for (i = 0; i < XEON_NONLINK_DB_MSIX_BITS; i++) { ntb_peer_spad_write(ntb->device, NTB_MSIX_DATA0 + i, ntb->msix_data[i].nmd_data); From owner-svn-src-all@freebsd.org Sun Jul 24 14:50:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1733BA3FB0; Sun, 24 Jul 2016 14:50:18 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C0ED1E2B; Sun, 24 Jul 2016 14:50:18 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OEoH24018524; Sun, 24 Jul 2016 14:50:17 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OEoH0W018514; Sun, 24 Jul 2016 14:50:17 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201607241450.u6OEoH0W018514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 24 Jul 2016 14:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303267 - in stable/11: sys/netinet usr.bin/netstat X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 14:50:18 -0000 Author: tuexen Date: Sun Jul 24 14:50:16 2016 New Revision: 303267 URL: https://svnweb.freebsd.org/changeset/base/303267 Log: MFC r302904: Fix a bug which results in a core dump when running netstat with the -W option and having a listening SCTP socket. The bug was introduced in r279122 when adding support for libxo. MFC r302907: When calling netstat -Laptcp the local address values are not aligned with the corresponding entry in the table header. r295136 increased the value width from 14 to 32 without the corresponding change to the table header. This commit adds the change to the table header width. MFC r302917: Ensure that the -a, -W, -L options for SCTP behave similar as for TCP. MFC r302928: Address a potential memory leak found a the clang static code analyzer running on the userland stack. MFC r302930: Don't free a data chunk twice. Found by the clang static code analyzer running for the userland stack. MFC r302935: Deal with a portential memory allocation failure, which was reported by the clang static code analyzer. Joint work with rrs@. MFC r302942: Add missing sctps_reasmusrmsgs counter. Joint work with rrs@. MFC r302945: Don't duplicate code for SCTP, just use the ones used for UDP and TCP. This fixes a bug with link local addresses. This will require and upcoming change in the kernel to bring SCTP to the same behaviour as UDP and TCP. MFC r302949: Fix the PR-SCTP behaviour. This is done by rrs@. MFC r302950: Add a constant required by RFC 7496. MFC r303024: netstat and sockstat expect the IPv6 link local addresses to have an embedded scope. So don't recover. MFC r303025: Use correct order of conditions to avoid NULL deref. MFC r303073: Fix a bug in deferred stream reset processing which results in using a length field before it is set. Thanks to Taylor Brandstetter for reporting the issue and providing a fix. Approved by: re (kib) Modified: stable/11/sys/netinet/sctp_auth.c stable/11/sys/netinet/sctp_constants.h stable/11/sys/netinet/sctp_header.h stable/11/sys/netinet/sctp_indata.c stable/11/sys/netinet/sctp_output.c stable/11/sys/netinet/sctp_sysctl.c stable/11/sys/netinet/sctp_uio.h stable/11/usr.bin/netstat/inet.c stable/11/usr.bin/netstat/sctp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_auth.c ============================================================================== --- stable/11/sys/netinet/sctp_auth.c Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_auth.c Sun Jul 24 14:50:16 2016 (r303267) @@ -542,7 +542,7 @@ sctp_insert_sharedkey(struct sctp_keyhea } } /* shouldn't reach here */ - return (0); + return (EINVAL); } void @@ -622,8 +622,11 @@ sctp_copy_skeylist(const struct sctp_key LIST_FOREACH(skey, src, next) { new_skey = sctp_copy_sharedkey(skey); if (new_skey != NULL) { - (void)sctp_insert_sharedkey(dest, new_skey); - count++; + if (sctp_insert_sharedkey(dest, new_skey)) { + sctp_free_sharedkey(new_skey); + } else { + count++; + } } } return (count); Modified: stable/11/sys/netinet/sctp_constants.h ============================================================================== --- stable/11/sys/netinet/sctp_constants.h Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_constants.h Sun Jul 24 14:50:16 2016 (r303267) @@ -345,6 +345,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_RTT_FROM_NON_DATA 0 #define SCTP_RTT_FROM_DATA 1 +#define PR_SCTP_UNORDERED_FLAG 0x0001 /* IP hdr (20/40) + 12+2+2 (enet) + sctp common 12 */ #define SCTP_FIRST_MBUF_RESV 68 Modified: stable/11/sys/netinet/sctp_header.h ============================================================================== --- stable/11/sys/netinet/sctp_header.h Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_header.h Sun Jul 24 14:50:16 2016 (r303267) @@ -397,7 +397,7 @@ struct sctp_strseq { struct sctp_strseq_mid { uint16_t stream; - uint16_t reserved; + uint16_t flags; uint32_t msg_id; }; Modified: stable/11/sys/netinet/sctp_indata.c ============================================================================== --- stable/11/sys/netinet/sctp_indata.c Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_indata.c Sun Jul 24 14:50:16 2016 (r303267) @@ -753,7 +753,7 @@ sctp_handle_old_data(struct sctp_tcb *st */ struct sctp_tmit_chunk *chk, *lchk, *tchk; uint32_t fsn; - struct sctp_queued_to_read *nc = NULL; + struct sctp_queued_to_read *nc; int cnt_added; if (control->first_frag_seen == 0) { @@ -768,6 +768,11 @@ restart: TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, lchk) { if (chk->rec.data.fsn_num == fsn) { /* Ok lets add it */ + sctp_alloc_a_readq(stcb, nc); + if (nc == NULL) { + break; + } + memset(nc, 0, sizeof(struct sctp_queued_to_read)); TAILQ_REMOVE(&control->reasm, chk, sctp_next); sctp_add_chk_to_control(control, strm, stcb, asoc, chk); fsn++; @@ -781,7 +786,6 @@ restart: * on the control queue to a new * control. */ - sctp_alloc_a_readq(stcb, nc); sctp_build_readq_entry_from_ctl(nc, control); tchk = TAILQ_FIRST(&control->reasm); if (tchk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) { @@ -819,6 +823,7 @@ restart: if (control->on_strm_q) { TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); control->on_strm_q = 0; + SCTP_STAT_INCR_COUNTER64(sctps_reasmusrmsgs); } if (control->on_read_q == 0) { sctp_add_to_readq(stcb->sctp_ep, stcb, control, @@ -826,16 +831,19 @@ restart: SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); } sctp_wakeup_the_read_socket(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED); - if ((nc) && (nc->first_frag_seen)) { + if ((nc->first_frag_seen) && !TAILQ_EMPTY(&nc->reasm)) { /* * Switch to the new guy and * continue */ control = nc; - nc = NULL; goto restart; + } else { + sctp_free_a_readq(stcb, nc); } return (1); + } else { + sctp_free_a_readq(stcb, nc); } } else { /* Can't add more */ @@ -961,11 +969,6 @@ place_chunk: * should not happen since the FSN is a TSN and it * should have been dropped earlier. */ - if (chk->data) { - sctp_m_freem(chk->data); - chk->data = NULL; - } - sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); sctp_abort_in_reasm(stcb, control, chk, abort_flag, SCTP_FROM_SCTP_INDATA + SCTP_LOC_5); @@ -1026,6 +1029,7 @@ sctp_deliver_reasm_check(struct sctp_tcb control, control->on_strm_q); } #endif + SCTP_STAT_INCR_COUNTER64(sctps_reasmusrmsgs); TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); control->on_strm_q = 0; } @@ -1080,6 +1084,7 @@ done_un: control, control->on_strm_q); } #endif + SCTP_STAT_INCR_COUNTER64(sctps_reasmusrmsgs); TAILQ_REMOVE(&strm->inqueue, control, next_instrm); control->on_strm_q = 0; } @@ -1125,6 +1130,7 @@ deliver_more: control, control->on_strm_q); } #endif + SCTP_STAT_INCR_COUNTER64(sctps_reasmusrmsgs); TAILQ_REMOVE(&strm->inqueue, control, next_instrm); control->on_strm_q = 0; } @@ -5277,10 +5283,11 @@ sctp_kick_prsctp_reorder_queue(struct sc } } + static void sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb, struct sctp_association *asoc, - uint16_t stream, uint32_t seq) + uint16_t stream, uint32_t seq, int ordered, int old) { struct sctp_queued_to_read *control; struct sctp_stream_in *strm; @@ -5295,7 +5302,7 @@ sctp_flush_reassm_for_str_seq(struct sct * queue. */ strm = &asoc->strmin[stream]; - control = find_reasm_entry(strm, (uint32_t) seq, 0, 0); + control = find_reasm_entry(strm, (uint32_t) seq, ordered, old); if (control == NULL) { /* Not found */ return; @@ -5427,6 +5434,7 @@ sctp_handle_forward_tsn(struct sctp_tcb unsigned int num_str; uint32_t sequence; uint16_t stream; + uint16_t ordered, flags; int old; struct sctp_strseq *stseq, strseqbuf; struct sctp_strseq_mid *stseq_m, strseqbuf_m; @@ -5452,6 +5460,12 @@ sctp_handle_forward_tsn(struct sctp_tcb } stream = ntohs(stseq_m->stream); sequence = ntohl(stseq_m->msg_id); + flags = ntohs(stseq_m->flags); + if (flags & PR_SCTP_UNORDERED_FLAG) { + ordered = 0; + } else { + ordered = 1; + } } else { stseq = (struct sctp_strseq *)sctp_m_getptr(m, offset, sizeof(struct sctp_strseq), @@ -5462,6 +5476,7 @@ sctp_handle_forward_tsn(struct sctp_tcb } stream = ntohs(stseq->stream); sequence = (uint32_t) ntohs(stseq->sequence); + ordered = 1; } /* Convert */ @@ -5487,7 +5502,7 @@ sctp_handle_forward_tsn(struct sctp_tcb asoc->fragmented_delivery_inprogress = 0; } strm = &asoc->strmin[stream]; - sctp_flush_reassm_for_str_seq(stcb, asoc, stream, sequence); + sctp_flush_reassm_for_str_seq(stcb, asoc, stream, sequence, ordered, old); TAILQ_FOREACH(ctl, &stcb->sctp_ep->read_queue, next) { if ((ctl->sinfo_stream == stream) && (ctl->sinfo_ssn == sequence)) { Modified: stable/11/sys/netinet/sctp_output.c ============================================================================== --- stable/11/sys/netinet/sctp_output.c Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_output.c Sun Jul 24 14:50:16 2016 (r303267) @@ -10383,7 +10383,7 @@ sctp_fill_in_rest: /* no more to look at */ break; } - if (at->rec.data.rcv_flags & SCTP_DATA_UNORDERED) { + if ((at->rec.data.rcv_flags & SCTP_DATA_UNORDERED) && old) { /* We don't report these */ continue; } @@ -10504,7 +10504,7 @@ sctp_fill_in_rest: tp1 = TAILQ_NEXT(at, sctp_next); if (tp1 == NULL) break; - if (at->rec.data.rcv_flags & SCTP_DATA_UNORDERED) { + if (old && (at->rec.data.rcv_flags & SCTP_DATA_UNORDERED)) { /* We don't report these */ i--; at = tp1; @@ -10519,8 +10519,11 @@ sctp_fill_in_rest: strseq++; } else { strseq_m->stream = ntohs(at->rec.data.stream_number); - strseq_m->reserved = ntohs(0); strseq_m->msg_id = ntohl(at->rec.data.stream_seq); + if (at->rec.data.rcv_flags & SCTP_DATA_UNORDERED) + strseq_m->flags = ntohs(PR_SCTP_UNORDERED_FLAG); + else + strseq_m->flags = 0; strseq_m++; } at = tp1; @@ -11937,7 +11940,6 @@ sctp_send_deferred_reset_response(struct return; } SCTP_BUF_RESV_UF(chk->data, SCTP_MIN_OVERHEAD); - sctp_add_stream_reset_result(chk, ent->seq, response); /* setup chunk parameters */ chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; @@ -11952,6 +11954,7 @@ sctp_send_deferred_reset_response(struct ch->chunk_length = htons(chk->book_size); atomic_add_int(&chk->whoTo->ref_count, 1); SCTP_BUF_LEN(chk->data) = chk->send_size; + sctp_add_stream_reset_result(chk, ent->seq, response); /* insert the chunk for sending */ TAILQ_INSERT_TAIL(&asoc->control_send_queue, chk, Modified: stable/11/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/11/sys/netinet/sctp_sysctl.c Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_sysctl.c Sun Jul 24 14:50:16 2016 (r303267) @@ -279,15 +279,6 @@ sctp_sysctl_copy_out_local_addresses(str if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { if (local_scope == 0) continue; - if (sin6->sin6_scope_id == 0) { - /* - * bad link - * local - * address - */ - if (sa6_recoverscope(sin6) != 0) - continue; - } } if ((site_scope == 0) && (IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr))) continue; Modified: stable/11/sys/netinet/sctp_uio.h ============================================================================== --- stable/11/sys/netinet/sctp_uio.h Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_uio.h Sun Jul 24 14:50:16 2016 (r303267) @@ -259,7 +259,8 @@ struct sctp_snd_all_completes { /* The lower four bits is an enumeration of PR-SCTP policies */ #define SCTP_PR_SCTP_NONE 0x0000/* Reliable transfer */ #define SCTP_PR_SCTP_TTL 0x0001/* Time based PR-SCTP */ -#define SCTP_PR_SCTP_BUF 0x0002/* Buffer based PR-SCTP */ +#define SCTP_PR_SCTP_PRIO 0x0002/* Buffer based PR-SCTP */ +#define SCTP_PR_SCTP_BUF SCTP_PR_SCTP_PRIO /* For backwards compatibility */ #define SCTP_PR_SCTP_RTX 0x0003/* Number of retransmissions based PR-SCTP */ #define SCTP_PR_SCTP_MAX SCTP_PR_SCTP_RTX #define SCTP_PR_SCTP_ALL 0x000f/* Used for aggregated stats */ Modified: stable/11/usr.bin/netstat/inet.c ============================================================================== --- stable/11/usr.bin/netstat/inet.c Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/usr.bin/netstat/inet.c Sun Jul 24 14:50:16 2016 (r303267) @@ -418,10 +418,10 @@ protopr(u_long off, const char *name, in "Tcpcb"); if (Lflag) xo_emit((Aflag && !Wflag) ? - "{T:/%-5.5s} {T:/%-14.14s} {T:/%-18.18s}" : + "{T:/%-5.5s} {T:/%-32.32s} {T:/%-18.18s}" : ((!Wflag || af1 == AF_INET) ? - "{T:/%-5.5s} {T:/%-14.14s} {T:/%-22.22s}" : - "{T:/%-5.5s} {T:/%-14.14s} {T:/%-45.45s}"), + "{T:/%-5.5s} {T:/%-32.32s} {T:/%-22.22s}" : + "{T:/%-5.5s} {T:/%-32.32s} {T:/%-45.45s}"), "Proto", "Listen", "Local Address"); else if (Tflag) xo_emit((Aflag && !Wflag) ? Modified: stable/11/usr.bin/netstat/sctp.c ============================================================================== --- stable/11/usr.bin/netstat/sctp.c Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/usr.bin/netstat/sctp.c Sun Jul 24 14:50:16 2016 (r303267) @@ -104,93 +104,14 @@ struct xraddr_entry { LIST_ENTRY(xraddr_entry) xraddr_entries; }; -/* - * Construct an Internet address representation. - * If numeric_addr has been supplied, give - * numeric value, otherwise try for symbolic name. - */ #ifdef INET -static char * -inetname(struct in_addr *inp) -{ - char *cp; - static char line[MAXHOSTNAMELEN]; - struct hostent *hp; - struct netent *np; - - cp = 0; - if (!numeric_addr && inp->s_addr != INADDR_ANY) { - int net = inet_netof(*inp); - int lna = inet_lnaof(*inp); - - if (lna == INADDR_ANY) { - np = getnetbyaddr(net, AF_INET); - if (np) - cp = np->n_name; - } - if (cp == NULL) { - hp = gethostbyaddr((char *)inp, sizeof (*inp), AF_INET); - if (hp) { - cp = hp->h_name; - trimdomain(cp, strlen(cp)); - } - } - } - if (inp->s_addr == INADDR_ANY) - strcpy(line, "*"); - else if (cp) { - strlcpy(line, cp, sizeof(line)); - } else { - inp->s_addr = ntohl(inp->s_addr); -#define C(x) ((u_int)((x) & 0xff)) - sprintf(line, "%u.%u.%u.%u", C(inp->s_addr >> 24), - C(inp->s_addr >> 16), C(inp->s_addr >> 8), C(inp->s_addr)); - inp->s_addr = htonl(inp->s_addr); - } - return (line); -} +char * +inetname(struct in_addr *inp); #endif #ifdef INET6 -static char ntop_buf[INET6_ADDRSTRLEN]; - -static char * -inet6name(struct in6_addr *in6p) -{ - char *cp; - static char line[50]; - struct hostent *hp; - static char domain[MAXHOSTNAMELEN]; - static int first = 1; - - if (first && !numeric_addr) { - first = 0; - if (gethostname(domain, MAXHOSTNAMELEN) == 0 && - (cp = strchr(domain, '.'))) - (void) strcpy(domain, cp + 1); - else - domain[0] = 0; - } - cp = 0; - if (!numeric_addr && !IN6_IS_ADDR_UNSPECIFIED(in6p)) { - hp = gethostbyaddr((char *)in6p, sizeof(*in6p), AF_INET6); - if (hp) { - if ((cp = strchr(hp->h_name, '.')) && - !strcmp(cp + 1, domain)) - *cp = 0; - cp = hp->h_name; - } - } - if (IN6_IS_ADDR_UNSPECIFIED(in6p)) - strcpy(line, "*"); - else if (cp) - strcpy(line, cp); - else - sprintf(line, "%s", - inet_ntop(AF_INET6, (void *)in6p, ntop_buf, - sizeof(ntop_buf))); - return (line); -} +char * +inet6name(struct in6_addr *in6p); #endif static void @@ -447,7 +368,8 @@ sctp_process_inpcb(struct xsctp_inpcb *x first = 0; } xladdr = (struct xsctp_laddr *)(buf + *offset); - if (Lflag && !is_listening) { + if ((!aflag && is_listening) || + (Lflag && !is_listening)) { sctp_skip_xinpcb_ifneed(buf, buflen, offset); return; } @@ -513,8 +435,10 @@ retry: xo_open_instance("local-address"); if (xladdr_total == 0) { - xo_emit("{:protocol/%-6.6s/%s} {:type/%-5.5s/%s} ", - pname, tname); + if (!Lflag) { + xo_emit("{:protocol/%-6.6s/%s} " + "{:type/%-5.5s/%s} ", pname, tname); + } } else { xo_emit("\n"); xo_emit(Lflag ? "{P:/%-21.21s} " : "{P:/%-12.12s} ", @@ -529,7 +453,7 @@ retry: "{:state/CLOSED}", " "); } else { xo_emit("{P:/%-45.45s} " - "{:state:LISTEN}", " "); + "{:state/LISTEN}", " "); } } else { if (process_closed) { From owner-svn-src-all@freebsd.org Sun Jul 24 15:23:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E862BA35D2 for ; Sun, 24 Jul 2016 15:23:52 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) (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 2EF921E36 for ; Sun, 24 Jul 2016 15:23:51 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f43.google.com with SMTP id l69so113671364lfg.1 for ; Sun, 24 Jul 2016 08:23:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=7EGgVD+0mWV+GsuzgyPstVKnmzrSIzzT1V7505SMruY=; b=QMBASVjlwwnGy/GR3FJlkBeVfIYjGuZeZW5MVmiO44EamTqzNBmj6dIaRNzxBf6uN3 kvyXir5lPt1V3XoJuxypc69AeXAohjddlWYZxodOvJzHgy0WG11Nkbz60rnEdKexd9br 9yaVq48jnmK0Xr6VtCN3UGyMq+0qWcY2EGjHBUgLGcm7y1ISq6ZyUIzgN5mowU8y5XNF 5HSqqJ7gmCFAP7z+97kqn/OKj7Cw6gkt1Mkt31/RH24H3xnD4+uYavVQMeX/MzeO4XtZ t+ppzQapAoHwsmgAoE6uGejnbsA5B8pCnRltJtuLpCuKkITZ+PcXAydE2XFKrc6G1oEH mGBw== X-Gm-Message-State: AEkoousB74zghqe5s9kHCAgQMmPI6lFVUEOTHEfimAjgkZTwtSil0Mf/UIVLPaQuV1arAA== X-Received: by 10.25.35.19 with SMTP id j19mr5416931lfj.106.1469373390819; Sun, 24 Jul 2016 08:16:30 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id h9sm4791355lfe.8.2016.07.24.08.16.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jul 2016 08:16:30 -0700 (PDT) Subject: Re: svn commit: r303264 - head/usr.bin/calendar/calendars/ru_RU.UTF-8 To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607241035.u6OAZijR023467@repo.freebsd.org> From: Andrey Chernov Message-ID: <76ecf576-3b05-9a58-9c58-6b45f49b7286@freebsd.org> Date: Sun, 24 Jul 2016 18:16:26 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201607241035.u6OAZijR023467@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 15:23:52 -0000 What happens with the lines below? On 24.07.2016 13:35, Gleb Smirnoff wrote: > Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.orthodox > -ПаÑха-7 Вход ГоÑподень в ИеруÑалим. Вербное ВоÑкреÑенье > +ПаÑха-7 Вход ГоÑподень в ИеруÑалим. Вербное ВоÑкреÑент.ье > +ПаÑха ВоÑкреÑент.ие ХриÑтово > +ПаÑха+39 ВознеÑент.ие > Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan > -14 мар Ðовый Год, ОвÑень малый > +14 марта Ðовый Год, ОвÑент.ÑŒ малый > -20 мар* ВеÑенние равноденÑтвие > - 7 апр День Марены (Ñдвинутое веÑеннее равноденÑтвие) > +20 марта* ВеÑент.ние равноденÑтвие > + 7 апр. День Марены (Ñдвинутое веÑент.нее равноденÑтвие) > + 6 Ð¼Ð°Ñ Ð”ÐµÐ½ÑŒ Дажьбога, ОвÑент.ÑŒ большой From owner-svn-src-all@freebsd.org Sun Jul 24 15:32:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B92ADBA37B5; Sun, 24 Jul 2016 15:32:12 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CCAD1333; Sun, 24 Jul 2016 15:32:12 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u6OFW3s5009249 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 24 Jul 2016 08:32:03 -0700 Subject: Re: svn commit: r301453 - in head/sys: arm/arm arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/mips sys To: Michal Meloun , Svatopluk Kraus , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201606051620.u55GKD5S066398@repo.freebsd.org> <578E0B5D.3070105@FreeBSD.org> <578F6075.7010500@FreeBSD.org> <05a80ac6-4285-ec9d-36e9-2f92c609f746@freebsd.org> <57907B0F.9070204@FreeBSD.org> <9d2a224c-b787-2875-5984-a7a2354e8695@freebsd.org> <57934ABD.6010807@FreeBSD.org> <4e7a3e8f-cc21-f5f2-e3e0-4dbd554a4cd0@freebsd.org> <5794720F.4050303@FreeBSD.org> From: Nathan Whitehorn Message-ID: <8bfd8668-bc49-e109-e610-b5cd470be3ec@freebsd.org> Date: Sun, 24 Jul 2016 08:32:03 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <5794720F.4050303@FreeBSD.org> X-Sonic-CAuth: UmFuZG9tSVYdzuiyOMYhHmtpJiOj4me7bvjW1HbUZALJZSAt5XS0G0zkcMSyVU8RVH5EhuK/+F3bvj3PWenBLLHdx0qAWChdcG8/jm58ScE= X-Sonic-ID: C;qs1mxbNR5hGcBJNwxPCmMQ== M;vkOlxbNR5hGcBJNwxPCmMQ== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 15:32:12 -0000 On 07/24/16 00:45, Michal Meloun wrote: > Dne 23.07.2016 v 20:35 Nathan Whitehorn napsal(a): >> >> >> On 07/23/16 03:45, Michal Meloun wrote: >>> Dne 21.07.2016 v 17:53 Nathan Whitehorn napsal(a): >>>> >>>> On PowerPC, GENERIC64 supports FDT systems (some IBM hardware), OFW >>>> systems (Macs, some IBM hardware), systems with no device trees at >>>> all (old-style PS3), and systems with a mixture of device tree and >>>> no device tree (new-style PS3). On these, there is a mixture of >>>> "real" interrupts and GPIO-type interrupts. There is no limitation >>>> that this be used only for device-tree-type systems. >>>> >>>> The system requires two things: an interrupt domain key and an >>>> arbitrary unique byte string describing the interrupt. When running >>>> with a device tree, these are set to the phandle of the >>>> interrupt-parent and the contents of the device tree interrupt >>>> specifier, respectively, and the system was of course developed >>>> with that in mind. But they don't need to be, and often aren't. You >>>> could make the domain an element of an enum (where "ACPI" is a >>>> choice, for instance -- this is what PS3 does), or set it to a >>>> pointer to a device_t, or really anything you like. Similarly, the >>>> interrupt specifier is totally free-form. >>> >>> Yes, I agree. and i think that we followed the same direction. But i >>> see two problems with this approach. >>> - in some cases (OFW, device_t) you don't have control over domain >>> key value, so you cannot guarantee its uniqueness. >>> Of course, probability of collision is low, but it is. >> >> We could solve this in a number of ways, for example widening to 64 >> bits, or adding another value (domain type, for example). You could >> also make an acpi_bus_map_intr() to go with the OFW one that connect >> in some machine-dependent code if you have fundamentally incompatible >> bus enumeration mechanisms that you expect to exist simultaneously -- >> but, of course, no systems like this seem to actually exist, so the >> problem is both easily solved and totally theoretical. >> >>> - within ofw_bus_map_intr() (or later - at the time when byte string >>> must be decoded) you are not able (easily) to differentiate >>> between different formats, thus you are not able to select >>> appropriate decoder. The GPIO controller, for example, >>> must be able to handle interrupts defined by standard OFW >>> property, or by pair concurrently. >> >> In principle, you could solve that as above, or by registering a >> second interrupt domain for the same controller. >> >> In practice, it doesn't matter since, in the GPIO case, for example, >> the GPIO controller is never itself also a normal interrupt >> controller (i.e. the GIC and GPIO controller are always different >> devices). As such, the theoretical does not occur in practice. > form > https://svnweb.freebsd.org/base/head/sys/gnu/dts/arm/tegra124-jetson-tk1.dts?revision=295436&view=markup#l1380 > "interrupts = ; " > Do you want more examples ? Those have the identical format to the GPIO properties, because they are the same thing. So it works out of the box. Do you have examples of something that *doesn't work*? > >> >>> For this reason we makes domain key composite, in our model, the >>> domain key consist of "domain key type" >>> and "domain key value". This composite key guarantees uniqueness >>> and it also allows to select proper parser for byte string. >> >> Yes, but this solves what is a nonexistant problem by making the >> system substantially less flexible and more invasive. Which is not a >> good tradeoff. >> > I think that existence of problem is confirmed in the above example . > Quote from previous paragraph: > "We could solve this in a number of ways, ... , or adding another > value (domain type, for example)." > What can I say more ... Except that the example you gave *is not an example* of the problem you are describing. You would only end up with a problem if: 1) You had interrupts in a GPIO property rather than in an interrupts property (or equivalent). 2) *And* you had interrupts on GPIOs in an interrupts property (or equivalent) 3) *and* those are encoded differently 4) *and* the different encodings use the same number of cells 5) *and* are not otherwise distinguishable Does that ever actually happen, in the real world, on any device tree? You could imagine any kind of messed up thing you want, but we shouldn't structure APIs around them, especially given that the current alternative you are proposing has real, concrete problems on real hardware that actually exists. > > [snip] >>> >>>> >>>>> >>>>>> >>>>>>>> It is much easier to do this correctly at bus attach time when >>>>>>>> the resource lists are made (how PPC does it). >>>>>>>> >>>>>>> I don't agree. I don't agree. Making this at bus attach time >>>>>>> leads into complicated 'virtual' IRQ infrastructure, with many >>>>>>> unresolved corner cases. >>>>>> >>>>>> Which unresolved corner cases? This has been working correctly on >>>>>> a number of platforms in both FreeBSD and Linux for many years. >>>>> Nope, it doesn't work for ARM yet (for GPIO interrupts for >>>>> example) and Linux uses EPROBE_DEFER mechanism for a long time. >>>>> See: http://lxr.free-electrons.com/source/drivers/base/platform.c#L87 >>>> >>>> There is some missing code on ARM (probably about 30 minutes of >>>> work to make it match PowerPC) to make it work in an ideal case, >>>> sure, but there is no reason you could not go out right now, with >>>> the existing code, and implement GPIO interrupts by declaring the >>>> GPIO driver as an interrupt controller. >>>> >>>> Can you give any concrete case of something that doesn't work? >>> GPIO again. How you can allocate interrupt associated with given >>> gpio pin installed by "cd-gpios = <&gpio TEGRA_GPIO(V, 2) >>> GPIO_ACTIVE_LOW>;" >> >> You parse that as an interrupt on a interrupt domain associated with >> the GPIO controller referenced by &gpio. In pseudo-code: >> >> int irq = ofw_bus_map_intr(dev, <&gpio>, ncells, > GPIO_ACTIVE_LOW>); >> The GPIO controller, meanwhile, has registered an interrupt domain >> for <&gpio> and is asked to decode and configure the interrupt >> defined by , which it knows how to >> parse. This is simple and straightforward. > And again and again: > We have > "cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;" > and > interrupt-parent = <&gpio>; > "interrupts = ; " > in one tree. And we need to get a interrupt in both variants. Where, again, those are completely identical and there are not even two variants, so you are presenting this an example of a problem *that it does not exemplify*. > >>>>>> I would urge, in the strongest possible terms, that this be >>>>>> backed out from stable/11 at least. We can add the new API back >>>>>> for 11.1 if we want it, but we totally lose the ability to change >>>>>> it later in the stable/11 cycle if it stays in now. >>>>>> -Nathan >>>>>> >>>>> The API is part of still unstable, experimental INTRNG, so its not >>>>> fixed we we can change it at any time, I think. >>>>> But yes, we forget to wrap new bus_map_intr() method (and >>>>> associated code) by #ifdef INTRNG. Is this sufficient for you? >>>> >>>> For HEAD, yes. I would like it out of stable/11 entirely until this >>>> discussion converges. >>>> -Nathan >>> The current code (in stable/11) works and is tested. I simple >>> cannot commit any untested change for stable tree mainly if is in >>> BETA2 stage. And I cannot fully test the requested change, at this >>> time i have access to single ARM platform. >>> But we're in the same situation - both have the same commit bit, >>> neither one of us is the author of the disputed commit and neither >>> of us are not able to fully test it. >>> So feel free to commit what you want, if you have courage to commit >>> untested code. I haven't it...\ >>> Michal >>> >> >> Well, the code isn't actually used anywhere in stable/11, or HEAD, so >> it can't possibly be either tested or important for the functionality >> of any current code. As such, I will revert from HEAD on Monday and >> request an MFC from re@ following that if the author has not appeared >> by that time. >> -Nathan > > The code is, of course, already used by each of INTRNG enabled platforms. > > ------------------------------------------------------------------------------------------------------ > diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c > index 1e048c4..14eb507 100644 > --- a/sys/dev/ofw/ofwbus.c > +++ b/sys/dev/ofw/ofwbus.c > @@ -323,7 +323,7 @@ ofwbus_map_intr(device_t bus, device_t child, int > *rid, rman_res_t *start, > int ncells, rv; > u_int irq; > struct intr_map_data_fdt *fdt_data; > - > +printf(" *** %s: bus: %p\n", __func__, bus); > node = ofw_bus_get_node(child); > rv = ofw_bus_intr_by_rid(child, node, *rid, &iparent, &ncells, > &cells); > if (rv != 0) > diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c > index af3ca57..b381163 100644 > --- a/sys/kern/subr_bus.c > +++ b/sys/kern/subr_bus.c > @@ -3960,6 +3960,7 @@ int > bus_generic_map_intr(device_t dev, device_t child, int *rid, > rman_res_t *start, > rman_res_t *end, rman_res_t *count, struct intr_map_data **imd) > { > +printf(" *** %s: dev: %p\n", __func__, dev); > /* Propagate up the bus hierarchy until someone handles it. */ > if (dev->parent) > return (BUS_MAP_INTR(dev->parent, child, rid, start, > end, count, > --------------------------------------------------------------------------------------------------- > Result: > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** bus_generic_map_intr: dev: 0xc4ce5780 > *** bus_generic_map_intr: dev: 0xc4ce0980 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** bus_generic_map_intr: dev: 0xc4e52080 > *** bus_generic_map_intr: dev: 0xc4e52480 > *** bus_generic_map_intr: dev: 0xc4e52780 > *** bus_generic_map_intr: dev: 0xc4ce1500 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** bus_generic_map_intr: dev: 0xc4ce0300 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > *** ofwbus_map_intr: bus: 0xc4ce1880 > > So its hard to say that code is unused. > > And, just for info, last "clean in PPC way" is initial commit INTRNG > at r289529 (9 months ago). > Michal > > Ah, I see, it is called from bus_extend_resource(). Could you describe this one? It takes an arbitrary resource, but only actually works on interrupts and seems to be called from #ifdef-ed parts of the MI bus_alloc_resource(). Could you describe what is going on here some more? There doesn't appear to be any documentation of any of this. This will make this much harder to untangle, unfortunately, and probably means we are stuck with this as a rump API in stable/11. -Nathan From owner-svn-src-all@freebsd.org Sun Jul 24 15:45:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4443BA3A08 for ; Sun, 24 Jul 2016 15:45:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::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 8721E1A4C for ; Sun, 24 Jul 2016 15:45:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22c.google.com with SMTP id f6so68993832ith.1 for ; Sun, 24 Jul 2016 08:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=k9auXX0sYeGMBzAsyPRJsLDOKykM4nK92ewWZsev6Yo=; b=EgjWdOiwwA7SQFh12VKaifZzKZjeXOWFzf+b178AFICC+7kH5OXu/WQ3SzMDYF19G6 bgIeaRtJM/wIkzp+4jqizQwMStyTRRtpaZLzt3GXbgXVqoeQ7BD0GmYucPRgFlPoC3PH na0XYRvKrrfuiqUiEus+hy97byzkZ4+p62V3cwU/RXOdKIxzl7HIKXQ4bYEfuptImAwv yaZZ8jG68AmSwp8L3izS/9EDruDsolM3CuCpfnQWloLHKsc8U1TCCMbdpctRDHGgZ7Yd Pt9lbcxGfgDnmVDXnZCypwjVMYkMr67GPpPMQn5JMtApGi3tN/5U8IJzLfme+iHquPPd C4zw== 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; bh=k9auXX0sYeGMBzAsyPRJsLDOKykM4nK92ewWZsev6Yo=; b=X9uGC9F+oS68Rlt8GjEnGddrEuGXcM4bug7DNPOzHbfU+HFdG/nDeKWaRasZDgq8YA bwxbhHp+BzwI9Hd6tk8IoQpG57xY5M3HU8GyxDor33K9FKsAcFUX+8aCL6UI9owiyFng oJOIsFXG6x6BHspX9oqUisByj9Tl6GYZrpohJzkrBlNBaEMlQ9sQ3wg67kNCEdDFiiCW 27DKwwhM6HwF0BzpZusmlIhH91K4sAG9NFv4OsHUw+5k7njAspAz+Y7vxNBJecbgybvf Diim55KQOgu+soB24Zw4AUmrmYFdIIZdrVLj2V6mB9SJzA+TYl28N3rqJFnSuIGPm0sb xavg== X-Gm-Message-State: AEkooutOg3T2WfxpbWT24kr3/9uCTUgW9G+D11eAnbs2d+tezrEw/CLzfohl/JASfY+BMWek2hRw9Ua+ar/VRg== X-Received: by 10.36.11.2 with SMTP id 2mr16692316itd.60.1469375145788; Sun, 24 Jul 2016 08:45:45 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.137.131 with HTTP; Sun, 24 Jul 2016 08:45:44 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <8bfd8668-bc49-e109-e610-b5cd470be3ec@freebsd.org> References: <201606051620.u55GKD5S066398@repo.freebsd.org> <578E0B5D.3070105@FreeBSD.org> <578F6075.7010500@FreeBSD.org> <05a80ac6-4285-ec9d-36e9-2f92c609f746@freebsd.org> <57907B0F.9070204@FreeBSD.org> <9d2a224c-b787-2875-5984-a7a2354e8695@freebsd.org> <57934ABD.6010807@FreeBSD.org> <4e7a3e8f-cc21-f5f2-e3e0-4dbd554a4cd0@freebsd.org> <5794720F.4050303@FreeBSD.org> <8bfd8668-bc49-e109-e610-b5cd470be3ec@freebsd.org> From: Warner Losh Date: Sun, 24 Jul 2016 09:45:44 -0600 X-Google-Sender-Auth: nrFh_z-9N-8C0bJwbb8uofaALSw Message-ID: Subject: Re: svn commit: r301453 - in head/sys: arm/arm arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/mips sys To: Nathan Whitehorn Cc: Michal Meloun , Svatopluk Kraus , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 15:45:46 -0000 On Sun, Jul 24, 2016 at 9:32 AM, Nathan Whitehorn wrote: > This will make this much harder to untangle, unfortunately, and probably > means we are stuck with this as a rump API in stable/11. The time to have had this discussion was 9 months ago when it first started to appear in the tree and on differential and on the mailing lists. I'm also not convinced that 'planes' would be the right way to solve the interrupt issues. There's been talk about it for a long time, but no action. The relationships in FDT are DAGs, not trees, and newbus is inherently tree-based. Warner From owner-svn-src-all@freebsd.org Sun Jul 24 15:48:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5480EBA3AC4 for ; Sun, 24 Jul 2016 15:48:07 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) (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 EB8F61C4C for ; Sun, 24 Jul 2016 15:48:06 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f51.google.com with SMTP id g62so113884487lfe.3 for ; Sun, 24 Jul 2016 08:48:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=qB3TV5aWZcTPFV35QyZQ8MbxT3wdjsbtXCTdl0xDH+A=; b=ZPefgeE/z5hCQeKZpDm98RvMc2YJ87+eS6kkY8YQdn4bhW0SejufsqgYp+xnDuL3ba J4EidawOviaPZA0T+h+IV9+EfxwORlDAZNHCI6locDQIqR/bHW4DlMxsT9GOcqyRP5zZ jVmiH3ithdV3SwuKak1vzbKMJbFHohMBWfDpTv2jhAXQoP3pKCFrnhYMtO9tvmmjoR/N uzFqBmug5JOViqjGsa1Hi2b4KZfm2ZYd2YU+4GxEovq4G3WvZ91Snm1MVVE2/f426YqS /1HHQzOV1gtPJujR7Yj7KXdYYcbxmLEh5AWoG47X3D456DSVmKeEUHFRcnHyM0CxAyre IZ/A== X-Gm-Message-State: AEkoouvD1shTrverUkId1a3OmZdkv0tV0pWKnc/49v6WoLr/Gw5+C6DMnaUDm67NDrisxA== X-Received: by 10.25.81.139 with SMTP id f133mr6074607lfb.78.1469375284982; Sun, 24 Jul 2016 08:48:04 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id c125sm4789119lfe.10.2016.07.24.08.48.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jul 2016 08:48:04 -0700 (PDT) Subject: Re: svn commit: r303218 - head/tools/tools/locale/tools To: Baptiste Daroussin References: <201607231124.u6NBO5aJ003824@repo.freebsd.org> <97566d46-1d37-8c95-f276-f55b190bddbb@freebsd.org> <20160723115244.76vhhzl55qoyw4kf@ivaldir.etoilebsd.net> <2ddb2814-9edf-82a9-350c-aebf34cdb4ab@freebsd.org> <20160723123228.i2tmxaklkoad6vkh@ivaldir.etoilebsd.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Andrey Chernov Message-ID: Date: Sun, 24 Jul 2016 18:48:00 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160723123228.i2tmxaklkoad6vkh@ivaldir.etoilebsd.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4ELSWsHPTtIeDWI984PUX9wu0jMrAHKvg" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 15:48:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4ELSWsHPTtIeDWI984PUX9wu0jMrAHKvg Content-Type: multipart/mixed; boundary="jFl3RWirmM27nRf4sS3RKbOCKcJvbl8wg" From: Andrey Chernov To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r303218 - head/tools/tools/locale/tools References: <201607231124.u6NBO5aJ003824@repo.freebsd.org> <97566d46-1d37-8c95-f276-f55b190bddbb@freebsd.org> <20160723115244.76vhhzl55qoyw4kf@ivaldir.etoilebsd.net> <2ddb2814-9edf-82a9-350c-aebf34cdb4ab@freebsd.org> <20160723123228.i2tmxaklkoad6vkh@ivaldir.etoilebsd.net> In-Reply-To: <20160723123228.i2tmxaklkoad6vkh@ivaldir.etoilebsd.net> --jFl3RWirmM27nRf4sS3RKbOCKcJvbl8wg Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 23.07.2016 15:32, Baptiste Daroussin wrote: > On Sat, Jul 23, 2016 at 02:58:31PM +0300, Andrey Chernov wrote: >> On 23.07.2016 14:52, Baptiste Daroussin wrote: >>> On Sat, Jul 23, 2016 at 02:41:39PM +0300, Andrey Chernov wrote: >>>> On 23.07.2016 14:24, Baptiste Daroussin wrote: >>>>> Author: bapt >>>>> Date: Sat Jul 23 11:24:05 2016 >>>>> New Revision: 303218 >>>>> URL: https://svnweb.freebsd.org/changeset/base/303218 >>>>> >>>>> Log: >>>>> Add another hack to add weekday to date format to more locales >>>>> >>>>> While here only initialize the iconv converter when needed >>>>> >>>>> Modified: >>>>> head/tools/tools/locale/tools/cldr2def.pl >>>> >>>> BTW, is there any progress in generating all collates with -m ${area= } as >>>> you planned? >>>> >>> you mean the @modifier? >> >> No, I mean that: >>>> Perhaps all uk_UA should be generated with -m ${area} too - Ukrainia= ns >>>> have extended Cyrillics in their alphabet and I am not sure that the= ir >>>> order match default Unicode order for Cyrillic. The same about be_BY= , >>>> bg_BG and sr_Cyrl_RS. They may match or may not, I don't check such >>> deeply. >>>> >>>> It seems the safest side will be to generate all with -m ${area} >>>> >>> Yes that is my plan, except for the 1 or 2 that cannot be generated >> >from cldr >>> directly >> >=20 > Nope I haven't made any progress, and I actually did a bunch of tests o= f some > (honnestly not all locales) trying to get a representative set and coul= d not > find differnce in ordering between locales generated with -m ${area}. >=20 > It would also needs lots of work on the generation tools. >=20 > I first need to write a tool that compares collation rules for various = ${area} > (not done yet) to see how much this is really needed and use it in the > generation tools. >=20 > I will try to do that for 12 if it is really worth it (based on the res= ult from > that comparison tools) IMHO we don't need comparison tools, just blindly adding -m ${area} to generating of every collate with different area be enough. CLDR may involve from time to time including national alphabets changes (which may happen often enough too), so it will be better to not run such tests every time with new CLDR import, but just the make code which do it correctly independently (-m ${area}) and forget about it, it will be much easier to maintain. Moreover, you'll spend more time writing such testing tool than adding -m ${area} :) --jFl3RWirmM27nRf4sS3RKbOCKcJvbl8wg-- --4ELSWsHPTtIeDWI984PUX9wu0jMrAHKvg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJXlOMwAAoJEKUckv0MjfbKwfkIAMVYxgd0EEL94EYXtiaBpnL/ VdT0suOHkjYzXICMMkxH1Av9Luu7v9Oq1M11vYhcwiHJqTZMzIGvDgPugSDdbyx7 ilkCiTxJERPFsSQzn4YAuOMMZuJgFKvfKNXM5WUTYhv8A1R6FyHfmUDrP6Y7VUVK d3hrVX/Q4ZBYhVMlNT0zjxqkVk8xTMRiznCLHz4EmgSqzoLiBtm4VBXzanwghse5 ltP08tMj2dkF0UdqeswXugnyVeJ98FaT8Fzi1l8vN/tu9rv29jumj6pNsXxsC7Ds t3ayUmtMNWBsKrwfUKDSML1tsEJ2G45AsAGQHX8+MXykLrUcOU34QYlswkTIYrg= =ldlB -----END PGP SIGNATURE----- --4ELSWsHPTtIeDWI984PUX9wu0jMrAHKvg-- From owner-svn-src-all@freebsd.org Sun Jul 24 15:57:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1233DBA3001; Sun, 24 Jul 2016 15:57:34 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::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 9222E13BB; Sun, 24 Jul 2016 15:57:33 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-wm0-x233.google.com with SMTP id o80so125706339wme.1; Sun, 24 Jul 2016 08:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=59MItsMSN1zzYzUZAz2t6YFLmg7/ihIXr1uZXYvsFNU=; b=tFCgflqUy+B5qhBGegHH8cj6i1lxUugDmFIZZ0Z50DFxQnmdBbUHhzVvFaWwVBJNQo 7uyoWoYOCSdf0ei93IUPSs4t23IaLgpysWV+ay3zk8rpwLHhbLSw3drlDJ1oD0AnFa/5 szJOCbmUoZytec/5FEeKna8Z3TnwctDQCgJ2S7MY6FfOt8GIDrS6dEhieAdSED9vlLjZ PIFBVdZViJtffjmMztJlV5Kj67dt6K8nmxKguHEpAGJEjuez4YgrIkkT89HszUtwBeqE 4FtsPVqOrpbut2mTttsu1xfSDxTS7BgjMuU/W4iAL16XT/xHQxpQqtPlEsDxWPvW1tkA X/fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=59MItsMSN1zzYzUZAz2t6YFLmg7/ihIXr1uZXYvsFNU=; b=nHevRdM2edyYDGx6jZNBHmzoe53Uj5vT4YGB8HWWTQ9i13hAxLHWCdqN8lYKL0kHbw qr8SgEz8My/LBXaRPjtcoEroX7qkXt7OIHR0I1HijbLuQ+PbDPd9PwUDS9lzaJj4KurI DLglcOva320ZI5WmuKZpCrCCOPDzGpDj0Zz79kUkqfNRvPwxPioDQfPvEN0Lh/vzxF8p hN0bB3D/TfQus4Mo6BSV/Tgb1hXroA/2QpnuD1yG6bYFtPrsibn0erzCUHgDOH/qbZ2U IsSJlr70K/d+3JmPg+IVtDArv0C2t5L4c5lhNlboPvUvJ0rJGn+n3cy7tSd8Fln34Xr/ vcmg== X-Gm-Message-State: AEkoouvHH1GIc/RQSvca+lRHC9KQgPszFlqWF7SR6SlqGipMbobC3d2RDzR8aoxU7yQMkQ== X-Received: by 10.28.152.5 with SMTP id a5mr16149902wme.76.1469375851737; Sun, 24 Jul 2016 08:57:31 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id d80sm22874002wmd.14.2016.07.24.08.57.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jul 2016 08:57:30 -0700 (PDT) Sender: Baptiste Daroussin Date: Sun, 24 Jul 2016 17:57:30 +0200 From: Baptiste Daroussin To: Andrey Chernov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303218 - head/tools/tools/locale/tools Message-ID: <20160724155729.pscfwaqsrxj5wgll@ivaldir.etoilebsd.net> References: <201607231124.u6NBO5aJ003824@repo.freebsd.org> <97566d46-1d37-8c95-f276-f55b190bddbb@freebsd.org> <20160723115244.76vhhzl55qoyw4kf@ivaldir.etoilebsd.net> <2ddb2814-9edf-82a9-350c-aebf34cdb4ab@freebsd.org> <20160723123228.i2tmxaklkoad6vkh@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sdbmesofzgtbbqep" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1-neo (2016-06-11) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 15:57:34 -0000 --sdbmesofzgtbbqep Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 24, 2016 at 06:48:00PM +0300, Andrey Chernov wrote: > On 23.07.2016 15:32, Baptiste Daroussin wrote: > > On Sat, Jul 23, 2016 at 02:58:31PM +0300, Andrey Chernov wrote: > >> On 23.07.2016 14:52, Baptiste Daroussin wrote: > >>> On Sat, Jul 23, 2016 at 02:41:39PM +0300, Andrey Chernov wrote: > >>>> On 23.07.2016 14:24, Baptiste Daroussin wrote: > >>>>> Author: bapt > >>>>> Date: Sat Jul 23 11:24:05 2016 > >>>>> New Revision: 303218 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/303218 > >>>>> > >>>>> Log: > >>>>> Add another hack to add weekday to date format to more locales > >>>>> > >>>>> While here only initialize the iconv converter when needed > >>>>> > >>>>> Modified: > >>>>> head/tools/tools/locale/tools/cldr2def.pl > >>>> > >>>> BTW, is there any progress in generating all collates with -m ${area= } as > >>>> you planned? > >>>> > >>> you mean the @modifier? > >> > >> No, I mean that: > >>>> Perhaps all uk_UA should be generated with -m ${area} too - Ukrainia= ns > >>>> have extended Cyrillics in their alphabet and I am not sure that the= ir > >>>> order match default Unicode order for Cyrillic. The same about be_BY, > >>>> bg_BG and sr_Cyrl_RS. They may match or may not, I don't check such > >>> deeply. > >>>> > >>>> It seems the safest side will be to generate all with -m ${area} > >>>> > >>> Yes that is my plan, except for the 1 or 2 that cannot be generated > >> >from cldr > >>> directly > >> > >=20 > > Nope I haven't made any progress, and I actually did a bunch of tests o= f some > > (honnestly not all locales) trying to get a representative set and coul= d not > > find differnce in ordering between locales generated with -m ${area}. > >=20 > > It would also needs lots of work on the generation tools. > >=20 > > I first need to write a tool that compares collation rules for various = ${area} > > (not done yet) to see how much this is really needed and use it in the > > generation tools. > >=20 > > I will try to do that for 12 if it is really worth it (based on the res= ult from > > that comparison tools) >=20 > IMHO we don't need comparison tools, just blindly adding -m ${area} to > generating of every collate with different area be enough. CLDR may > involve from time to time including national alphabets changes (which > may happen often enough too), so it will be better to not run such tests > every time with new CLDR import, but just the make code which do it > correctly independently (-m ${area}) and forget about it, it will be > much easier to maintain. Moreover, you'll spend more time writing such > testing tool than adding -m ${area} :) >=20 Point taken, still the whole tooling has been made around not doing the -m ${area} thing which I worked around for a few collation, I need to rework (= aka greatly simplify those tools so good direction) to be able to do a full -m ${area}. I will do that for sure for 12.0 Best regards, Bapt --sdbmesofzgtbbqep Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXlOVmAAoJEGOJi9zxtz5arb8P/01fJWKIMh0eRreJNYowoFXS QoFyJpuxycL3v4lnzq/0s5GEy7rSE4HStGo+JyTIixp6u3aV+Z4J0CStuDAl5iHr NETqdraoQ46UE3mx0SNMwQBBAjcBLd7+5xf0f5BjFZV6eNcbO9/NRLwu6KcgSokt BfUM1QeBoB8JN/pFOeRyJahBZgUnqX/6K73FWDUqVLuM4R/wzM6YEFA2mrFZJziv JHoQYsrIRj0mgaZhcqTkcNu2oVYbOkLDE35YmqNezDVyiIa84mQPappDpo4vvi3a 1UMSoFPfDzBDhxBP8LiGfxOjb1OJ8FJJ/TThEvXJsmYjs6rc5vxR3PrOZsFFRdaK DQ7ooCFeqLXOxwo5XfokCeuHEh+5rjLA4uKdCCZ77dodKn4f9Ctu71QsKg0aYgjG JkKlZ4f8s6z5ERPqizsKquzW/04P84wMrFApq/4dUFfvfBLi89YbLISecxoE1vKK NLSvVwjwqcEeaQm1w8S9dIAN1GeZWBeLWLGGOYe3xrjT0JfEg7mT6l3k8DqwnYfM 9MXGN4Yb+qWi7N4siS8ubXk4ChfvFHjzorjO+Wn1F09ulnh/jErJ+828QPfDUTMu JV15LQJHpOGpQ69UoAa4vHMkhllyoo5N1ryjDqRjEe18RBAMZDfkcoHKec3+clel R+HmrrH9t/Px8JdLD0+U =DmXD -----END PGP SIGNATURE----- --sdbmesofzgtbbqep-- From owner-svn-src-all@freebsd.org Sun Jul 24 16:00:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73D84BA3116; Sun, 24 Jul 2016 16:00:13 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B0FF160E; Sun, 24 Jul 2016 16:00:13 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u6OG05pM009715 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 24 Jul 2016 09:00:06 -0700 Subject: Re: svn commit: r301453 - in head/sys: arm/arm arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/mips sys To: Warner Losh References: <201606051620.u55GKD5S066398@repo.freebsd.org> <578E0B5D.3070105@FreeBSD.org> <578F6075.7010500@FreeBSD.org> <05a80ac6-4285-ec9d-36e9-2f92c609f746@freebsd.org> <57907B0F.9070204@FreeBSD.org> <9d2a224c-b787-2875-5984-a7a2354e8695@freebsd.org> <57934ABD.6010807@FreeBSD.org> <4e7a3e8f-cc21-f5f2-e3e0-4dbd554a4cd0@freebsd.org> <5794720F.4050303@FreeBSD.org> <8bfd8668-bc49-e109-e610-b5cd470be3ec@freebsd.org> Cc: Michal Meloun , Svatopluk Kraus , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Nathan Whitehorn Message-ID: <4c7b76c3-42c3-6039-00dc-9ed08b885315@freebsd.org> Date: Sun, 24 Jul 2016 09:00:05 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVYy0vQj3PauRi/Yx7jlImhjDoBYJDD49v0ysoficYSOsSQtJHVIvLmpiCwAkcaYHYvJqDNYVPHAT+iegMjkE4YHwko5srxhqSM= X-Sonic-ID: C;4v3xr7dR5hG/9ptMTlz00w== M;zORIsLdR5hG/9ptMTlz00w== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 16:00:13 -0000 On 07/24/16 08:45, Warner Losh wrote: > On Sun, Jul 24, 2016 at 9:32 AM, Nathan Whitehorn > wrote: >> This will make this much harder to untangle, unfortunately, and probably >> means we are stuck with this as a rump API in stable/11. > The time to have had this discussion was 9 months ago when it first started > to appear in the tree and on differential and on the mailing lists. > > I'm also not convinced that 'planes' would be the right way to solve the > interrupt issues. There's been talk about it for a long time, but no action. > The relationships in FDT are DAGs, not trees, and newbus is inherently > tree-based. > > Warner > I at least had never seen this code until it appeared in the tree and went through a phabricator review during code slush in which no one approved it. The general discussion of INTRNG 9 months ago was great, and I wrote some of the code. It is a big step forward. This particular code, however, is not consistent with the understanding of what INTRNG would be that I got from that discussion. The actual discussion on mailing lists seems to consist only of this cryptic email on an ARM list (https://lists.freebsd.org/pipermail/freebsd-arm/2016-June/013976.html) with no meaningful content right before the commit and some phabricator reviews that no one signed off on, that do not include all the relevant maintainers, and that end in one case with open questions followed by a commit. Since this fundamentally affects parts of kern/ and newbus, this needed to be on freebsd-arch for a month at the *very* least and to have positive approval. Given how this was handled and where we are in the release cycle, I don't know what the right course of action is; I see no good outcomes at this point. The core problem is that the code in this commit series duplicates an existing architecture that solves all the problems it purports, but can't ever be portable to other platforms because of its dependency model. As such, it will either (a) bitrot or (b) sit in the tree as a permanent, inflexible, ARM-only adjunct to the systems used on other platforms, filling kern and dev/ofw with progressively more #ifdef. We worked very hard to *remove* an API very similar from this on MIPS in the initial parts of INTRNG because it crippled the flexibility of the system. Having it appear again, under the radar, during code slush with no meaningful review and the author unreachable right before a major release is extremely disappointing. -Nathan From owner-svn-src-all@freebsd.org Sun Jul 24 16:32:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DD8FBA3798; Sun, 24 Jul 2016 16:32:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C647163C; Sun, 24 Jul 2016 16:32:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OGWYui059594; Sun, 24 Jul 2016 16:32:34 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OGWYwH059593; Sun, 24 Jul 2016 16:32:34 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201607241632.u6OGWYwH059593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 24 Jul 2016 16:32:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303268 - stable/11/sys/dev/ixgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 16:32:35 -0000 Author: sbruno Date: Sun Jul 24 16:32:34 2016 New Revision: 303268 URL: https://svnweb.freebsd.org/changeset/base/303268 Log: MFC r303032 Fixup DA cable detection routines to not set the cable type to unknown if they do not match one of two cable types. PR: 150249 Approved by: re (gjb) Modified: stable/11/sys/dev/ixgbe/ixgbe_phy.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ixgbe/ixgbe_phy.c ============================================================================== --- stable/11/sys/dev/ixgbe/ixgbe_phy.c Sun Jul 24 14:50:16 2016 (r303267) +++ stable/11/sys/dev/ixgbe/ixgbe_phy.c Sun Jul 24 16:32:34 2016 (r303268) @@ -1534,21 +1534,18 @@ s32 ixgbe_identify_sfp_module_generic(st hw->phy.type = ixgbe_phy_sfp_intel; break; default: - if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) - hw->phy.type = - ixgbe_phy_sfp_passive_unknown; - else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) - hw->phy.type = - ixgbe_phy_sfp_active_unknown; - else - hw->phy.type = ixgbe_phy_sfp_unknown; + hw->phy.type = ixgbe_phy_sfp_unknown; break; } } /* Allow any DA cable vendor */ if (cable_tech & (IXGBE_SFF_DA_PASSIVE_CABLE | - IXGBE_SFF_DA_ACTIVE_CABLE)) { + IXGBE_SFF_DA_ACTIVE_CABLE)) { + if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) + hw->phy.type = ixgbe_phy_sfp_passive_unknown; + else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) + hw->phy.type = ixgbe_phy_sfp_active_unknown; status = IXGBE_SUCCESS; goto out; } From owner-svn-src-all@freebsd.org Sun Jul 24 16:33:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C014BBA3808; Sun, 24 Jul 2016 16:33:49 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FBDC17A8; Sun, 24 Jul 2016 16:33:49 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OGXm4R059714; Sun, 24 Jul 2016 16:33:48 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OGXmVd059713; Sun, 24 Jul 2016 16:33:48 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201607241633.u6OGXmVd059713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 24 Jul 2016 16:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303269 - stable/10/sys/dev/ixgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 16:33:49 -0000 Author: sbruno Date: Sun Jul 24 16:33:48 2016 New Revision: 303269 URL: https://svnweb.freebsd.org/changeset/base/303269 Log: MFC r303032 Fixup DA cable detection routines to not set the cable type to unknown if they do not match one of two cable types. PR: 150249 Modified: stable/10/sys/dev/ixgbe/ixgbe_phy.c Modified: stable/10/sys/dev/ixgbe/ixgbe_phy.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe_phy.c Sun Jul 24 16:32:34 2016 (r303268) +++ stable/10/sys/dev/ixgbe/ixgbe_phy.c Sun Jul 24 16:33:48 2016 (r303269) @@ -1534,21 +1534,18 @@ s32 ixgbe_identify_sfp_module_generic(st hw->phy.type = ixgbe_phy_sfp_intel; break; default: - if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) - hw->phy.type = - ixgbe_phy_sfp_passive_unknown; - else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) - hw->phy.type = - ixgbe_phy_sfp_active_unknown; - else - hw->phy.type = ixgbe_phy_sfp_unknown; + hw->phy.type = ixgbe_phy_sfp_unknown; break; } } /* Allow any DA cable vendor */ if (cable_tech & (IXGBE_SFF_DA_PASSIVE_CABLE | - IXGBE_SFF_DA_ACTIVE_CABLE)) { + IXGBE_SFF_DA_ACTIVE_CABLE)) { + if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) + hw->phy.type = ixgbe_phy_sfp_passive_unknown; + else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) + hw->phy.type = ixgbe_phy_sfp_active_unknown; status = IXGBE_SUCCESS; goto out; } From owner-svn-src-all@freebsd.org Sun Jul 24 17:07:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 015B6BA31AB; Sun, 24 Jul 2016 17:07:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5F2F1956; Sun, 24 Jul 2016 17:07:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OH7dRK070908; Sun, 24 Jul 2016 17:07:39 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OH7dIi070906; Sun, 24 Jul 2016 17:07:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201607241707.u6OH7dIi070906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 24 Jul 2016 17:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r303270 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 17:07:41 -0000 Author: adrian Date: Sun Jul 24 17:07:39 2016 New Revision: 303270 URL: https://svnweb.freebsd.org/changeset/base/303270 Log: oops - correct username! Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sun Jul 24 16:33:48 2016 (r303269) +++ svnadmin/conf/access Sun Jul 24 17:07:39 2016 (r303270) @@ -107,7 +107,7 @@ hrs hselasky ian imp -imre +ivadasz ivoras iwasaki jah Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Sun Jul 24 16:33:48 2016 (r303269) +++ svnadmin/conf/mentors Sun Jul 24 17:07:39 2016 (r303270) @@ -18,7 +18,7 @@ benl philip Co-mentor: simon carl jimharris cherry gibbs eri gnn Co-mentor: thompsa -imre adrian Co-mentor: cognet +ivadasz adrian Co-mentor: cognet jceel trasz jkh rwatson jonathan rwatson From owner-svn-src-all@freebsd.org Sun Jul 24 17:09:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C93CBA32C9; Sun, 24 Jul 2016 17:09:33 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mail.miracle.cz (mail.miracle.cz [193.84.128.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.miracle.cz", Issuer "Miracle Group Root CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3738A1B8D; Sun, 24 Jul 2016 17:09:32 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from [193.84.128.50] (meloun.ad.miracle.cz [193.84.128.50]) by mail.miracle.cz (Postfix) with ESMTPSA id D54793ACB3; Sun, 24 Jul 2016 19:09:23 +0200 (CEST) Subject: Re: svn commit: r301453 - in head/sys: arm/arm arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/mips sys To: Nathan Whitehorn , Svatopluk Kraus , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201606051620.u55GKD5S066398@repo.freebsd.org> <578E0B5D.3070105@FreeBSD.org> <578F6075.7010500@FreeBSD.org> <05a80ac6-4285-ec9d-36e9-2f92c609f746@freebsd.org> <57907B0F.9070204@FreeBSD.org> <9d2a224c-b787-2875-5984-a7a2354e8695@freebsd.org> <57934ABD.6010807@FreeBSD.org> <4e7a3e8f-cc21-f5f2-e3e0-4dbd554a4cd0@freebsd.org> <5794720F.4050303@FreeBSD.org> <8bfd8668-bc49-e109-e610-b5cd470be3ec@freebsd.org> From: Michal Meloun Message-ID: <5794F643.4070207@FreeBSD.org> Date: Sun, 24 Jul 2016 19:09:23 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <8bfd8668-bc49-e109-e610-b5cd470be3ec@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.miracle.cz); Sun, 24 Jul 2016 19:09:23 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 17:09:33 -0000 Dne 24.07.2016 v 17:32 Nathan Whitehorn napsal(a): > > > On 07/24/16 00:45, Michal Meloun wrote: >> Dne 23.07.2016 v 20:35 Nathan Whitehorn napsal(a): >>> >>> >>> On 07/23/16 03:45, Michal Meloun wrote: >>>> Dne 21.07.2016 v 17:53 Nathan Whitehorn napsal(a): >>>>> >>>>> On PowerPC, GENERIC64 supports FDT systems (some IBM hardware), >>>>> OFW systems (Macs, some IBM hardware), systems with no device >>>>> trees at all (old-style PS3), and systems with a mixture of device >>>>> tree and no device tree (new-style PS3). On these, there is a >>>>> mixture of "real" interrupts and GPIO-type interrupts. There is no >>>>> limitation that this be used only for device-tree-type systems. >>>>> >>>>> The system requires two things: an interrupt domain key and an >>>>> arbitrary unique byte string describing the interrupt. When >>>>> running with a device tree, these are set to the phandle of the >>>>> interrupt-parent and the contents of the device tree interrupt >>>>> specifier, respectively, and the system was of course developed >>>>> with that in mind. But they don't need to be, and often aren't. >>>>> You could make the domain an element of an enum (where "ACPI" is a >>>>> choice, for instance -- this is what PS3 does), or set it to a >>>>> pointer to a device_t, or really anything you like. Similarly, the >>>>> interrupt specifier is totally free-form. >>>> >>>> Yes, I agree. and i think that we followed the same direction. But >>>> i see two problems with this approach. >>>> - in some cases (OFW, device_t) you don't have control over >>>> domain key value, so you cannot guarantee its uniqueness. >>>> Of course, probability of collision is low, but it is. >>> >>> We could solve this in a number of ways, for example widening to 64 >>> bits, or adding another value (domain type, for example). You could >>> also make an acpi_bus_map_intr() to go with the OFW one that connect >>> in some machine-dependent code if you have fundamentally >>> incompatible bus enumeration mechanisms that you expect to exist >>> simultaneously -- but, of course, no systems like this seem to >>> actually exist, so the problem is both easily solved and totally >>> theoretical. >>> >>>> - within ofw_bus_map_intr() (or later - at the time when byte >>>> string must be decoded) you are not able (easily) to differentiate >>>> between different formats, thus you are not able to select >>>> appropriate decoder. The GPIO controller, for example, >>>> must be able to handle interrupts defined by standard OFW >>>> property, or by pair concurrently. >>> >>> In principle, you could solve that as above, or by registering a >>> second interrupt domain for the same controller. >>> >>> In practice, it doesn't matter since, in the GPIO case, for example, >>> the GPIO controller is never itself also a normal interrupt >>> controller (i.e. the GIC and GPIO controller are always different >>> devices). As such, the theoretical does not occur in practice. >> form >> https://svnweb.freebsd.org/base/head/sys/gnu/dts/arm/tegra124-jetson-tk1.dts?revision=295436&view=markup#l1380 >> "interrupts = ; " >> Do you want more examples ? > > Those have the identical format to the GPIO properties, because they > are the same thing. So it works out of the box. Do you have examples > of something that *doesn't work*? > >> >>> >>>> For this reason we makes domain key composite, in our model, the >>>> domain key consist of "domain key type" >>>> and "domain key value". This composite key guarantees uniqueness >>>> and it also allows to select proper parser for byte string. >>> >>> Yes, but this solves what is a nonexistant problem by making the >>> system substantially less flexible and more invasive. Which is not a >>> good tradeoff. >>> >> I think that existence of problem is confirmed in the above example . >> Quote from previous paragraph: >> "We could solve this in a number of ways, ... , or adding another >> value (domain type, for example)." >> What can I say more ... > > Except that the example you gave *is not an example* of the problem > you are describing. You would only end up with a problem if: > 1) You had interrupts in a GPIO property rather than in an interrupts > property (or equivalent). > 2) *And* you had interrupts on GPIOs in an interrupts property (or > equivalent) > 3) *and* those are encoded differently > 4) *and* the different encodings use the same number of cells > 5) *and* are not otherwise distinguishable > > Does that ever actually happen, in the real world, on any device tree? > You could imagine any kind of messed up thing you want, but we > shouldn't structure APIs around them, especially given that the > current alternative you are proposing has real, concrete problems on > real hardware that actually exists. > >> >> > > [snip] > >>>> >>>>> >>>>>> >>>>>>> >>>>>>>>> It is much easier to do this correctly at bus attach time when >>>>>>>>> the resource lists are made (how PPC does it). >>>>>>>>> >>>>>>>> I don't agree. I don't agree. Making this at bus attach time >>>>>>>> leads into complicated 'virtual' IRQ infrastructure, with many >>>>>>>> unresolved corner cases. >>>>>>> >>>>>>> Which unresolved corner cases? This has been working correctly >>>>>>> on a number of platforms in both FreeBSD and Linux for many years. >>>>>> Nope, it doesn't work for ARM yet (for GPIO interrupts for >>>>>> example) and Linux uses EPROBE_DEFER mechanism for a long time. >>>>>> See: http://lxr.free-electrons.com/source/drivers/base/platform.c#L87 >>>>> >>>>> There is some missing code on ARM (probably about 30 minutes of >>>>> work to make it match PowerPC) to make it work in an ideal case, >>>>> sure, but there is no reason you could not go out right now, with >>>>> the existing code, and implement GPIO interrupts by declaring the >>>>> GPIO driver as an interrupt controller. >>>>> >>>>> Can you give any concrete case of something that doesn't work? >>>> GPIO again. How you can allocate interrupt associated with given >>>> gpio pin installed by "cd-gpios = <&gpio TEGRA_GPIO(V, 2) >>>> GPIO_ACTIVE_LOW>;" >>> >>> You parse that as an interrupt on a interrupt domain associated with >>> the GPIO controller referenced by &gpio. In pseudo-code: >>> >>> int irq = ofw_bus_map_intr(dev, <&gpio>, ncells, >> GPIO_ACTIVE_LOW>); >>> The GPIO controller, meanwhile, has registered an interrupt domain >>> for <&gpio> and is asked to decode and configure the interrupt >>> defined by , which it knows how to >>> parse. This is simple and straightforward. >> And again and again: >> We have >> "cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;" >> and >> interrupt-parent = <&gpio>; >> "interrupts = ; " >> in one tree. And we need to get a interrupt in both variants. > > Where, again, those are completely identical and there are not even > two variants, so you are presenting this an example of a problem *that > it does not exemplify*. > >> >>>>>>> I would urge, in the strongest possible terms, that this be >>>>>>> backed out from stable/11 at least. We can add the new API back >>>>>>> for 11.1 if we want it, but we totally lose the ability to >>>>>>> change it later in the stable/11 cycle if it stays in now. >>>>>>> -Nathan >>>>>>> >>>>>> The API is part of still unstable, experimental INTRNG, so its >>>>>> not fixed we we can change it at any time, I think. >>>>>> But yes, we forget to wrap new bus_map_intr() method (and >>>>>> associated code) by #ifdef INTRNG. Is this sufficient for you? >>>>> >>>>> For HEAD, yes. I would like it out of stable/11 entirely until >>>>> this discussion converges. >>>>> -Nathan >>>> The current code (in stable/11) works and is tested. I simple >>>> cannot commit any untested change for stable tree mainly if is in >>>> BETA2 stage. And I cannot fully test the requested change, at this >>>> time i have access to single ARM platform. >>>> But we're in the same situation - both have the same commit bit, >>>> neither one of us is the author of the disputed commit and neither >>>> of us are not able to fully test it. >>>> So feel free to commit what you want, if you have courage to commit >>>> untested code. I haven't it...\ >>>> Michal >>>> >>> >>> Well, the code isn't actually used anywhere in stable/11, or HEAD, >>> so it can't possibly be either tested or important for the >>> functionality of any current code. As such, I will revert from HEAD >>> on Monday and request an MFC from re@ following that if the author >>> has not appeared by that time. >>> -Nathan >> >> The code is, of course, already used by each of INTRNG enabled platforms. >> >> ------------------------------------------------------------------------------------------------------ >> diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c >> index 1e048c4..14eb507 100644 >> --- a/sys/dev/ofw/ofwbus.c >> +++ b/sys/dev/ofw/ofwbus.c >> @@ -323,7 +323,7 @@ ofwbus_map_intr(device_t bus, device_t child, int >> *rid, rman_res_t *start, >> int ncells, rv; >> u_int irq; >> struct intr_map_data_fdt *fdt_data; >> - >> +printf(" *** %s: bus: %p\n", __func__, bus); >> node = ofw_bus_get_node(child); >> rv = ofw_bus_intr_by_rid(child, node, *rid, &iparent, >> &ncells, &cells); >> if (rv != 0) >> diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c >> index af3ca57..b381163 100644 >> --- a/sys/kern/subr_bus.c >> +++ b/sys/kern/subr_bus.c >> @@ -3960,6 +3960,7 @@ int >> bus_generic_map_intr(device_t dev, device_t child, int *rid, >> rman_res_t *start, >> rman_res_t *end, rman_res_t *count, struct intr_map_data **imd) >> { >> +printf(" *** %s: dev: %p\n", __func__, dev); >> /* Propagate up the bus hierarchy until someone handles it. */ >> if (dev->parent) >> return (BUS_MAP_INTR(dev->parent, child, rid, start, >> end, count, >> --------------------------------------------------------------------------------------------------- >> Result: >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** bus_generic_map_intr: dev: 0xc4ce5780 >> *** bus_generic_map_intr: dev: 0xc4ce0980 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** bus_generic_map_intr: dev: 0xc4e52080 >> *** bus_generic_map_intr: dev: 0xc4e52480 >> *** bus_generic_map_intr: dev: 0xc4e52780 >> *** bus_generic_map_intr: dev: 0xc4ce1500 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** bus_generic_map_intr: dev: 0xc4ce0300 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> >> So its hard to say that code is unused. >> >> And, just for info, last "clean in PPC way" is initial commit INTRNG >> at r289529 (9 months ago). >> Michal >> >> > > Ah, I see, it is called from bus_extend_resource(). Could you describe > this one? It takes an arbitrary resource, but only actually works on > interrupts and seems to be called from #ifdef-ed parts of the MI > bus_alloc_resource(). Could you describe what is going on here some > more? There doesn't appear to be any documentation of any of this. > > This will make this much harder to untangle, unfortunately, and > probably means we are stuck with this as a rump API in stable/11. > -Nathan > > From owner-svn-src-all@freebsd.org Sun Jul 24 17:51:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FBE8BA3A65; Sun, 24 Jul 2016 17:51:05 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mail.miracle.cz (mail.miracle.cz [193.84.128.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.miracle.cz", Issuer "Miracle Group Root CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CDF2C1C10; Sun, 24 Jul 2016 17:51:04 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from [193.84.128.50] (meloun.ad.miracle.cz [193.84.128.50]) by mail.miracle.cz (Postfix) with ESMTPSA id 36D6C3ACB5; Sun, 24 Jul 2016 19:51:02 +0200 (CEST) Subject: Re: svn commit: r301453 - in head/sys: arm/arm arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/mips sys To: Nathan Whitehorn , Svatopluk Kraus , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201606051620.u55GKD5S066398@repo.freebsd.org> <578E0B5D.3070105@FreeBSD.org> <578F6075.7010500@FreeBSD.org> <05a80ac6-4285-ec9d-36e9-2f92c609f746@freebsd.org> <57907B0F.9070204@FreeBSD.org> <9d2a224c-b787-2875-5984-a7a2354e8695@freebsd.org> <57934ABD.6010807@FreeBSD.org> <4e7a3e8f-cc21-f5f2-e3e0-4dbd554a4cd0@freebsd.org> <5794720F.4050303@FreeBSD.org> <8bfd8668-bc49-e109-e610-b5cd470be3ec@freebsd.org> From: Michal Meloun X-Enigmail-Draft-Status: N1110 Message-ID: <57950005.6070403@FreeBSD.org> Date: Sun, 24 Jul 2016 19:51:01 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <8bfd8668-bc49-e109-e610-b5cd470be3ec@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.miracle.cz); Sun, 24 Jul 2016 19:51:02 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 17:51:05 -0000 I'm sorry for the blank response sent by mistake. Dne 24.07.2016 v 17:32 Nathan Whitehorn napsal(a): > > > On 07/24/16 00:45, Michal Meloun wrote: >> Dne 23.07.2016 v 20:35 Nathan Whitehorn napsal(a): >>> >>> >>> On 07/23/16 03:45, Michal Meloun wrote: >>>> Dne 21.07.2016 v 17:53 Nathan Whitehorn napsal(a): >>>>> >>>>> On PowerPC, GENERIC64 supports FDT systems (some IBM hardware), >>>>> OFW systems (Macs, some IBM hardware), systems with no device >>>>> trees at all (old-style PS3), and systems with a mixture of device >>>>> tree and no device tree (new-style PS3). On these, there is a >>>>> mixture of "real" interrupts and GPIO-type interrupts. There is no >>>>> limitation that this be used only for device-tree-type systems. >>>>> >>>>> The system requires two things: an interrupt domain key and an >>>>> arbitrary unique byte string describing the interrupt. When >>>>> running with a device tree, these are set to the phandle of the >>>>> interrupt-parent and the contents of the device tree interrupt >>>>> specifier, respectively, and the system was of course developed >>>>> with that in mind. But they don't need to be, and often aren't. >>>>> You could make the domain an element of an enum (where "ACPI" is a >>>>> choice, for instance -- this is what PS3 does), or set it to a >>>>> pointer to a device_t, or really anything you like. Similarly, the >>>>> interrupt specifier is totally free-form. >>>> >>>> Yes, I agree. and i think that we followed the same direction. But >>>> i see two problems with this approach. >>>> - in some cases (OFW, device_t) you don't have control over >>>> domain key value, so you cannot guarantee its uniqueness. >>>> Of course, probability of collision is low, but it is. >>> >>> We could solve this in a number of ways, for example widening to 64 >>> bits, or adding another value (domain type, for example). You could >>> also make an acpi_bus_map_intr() to go with the OFW one that connect >>> in some machine-dependent code if you have fundamentally >>> incompatible bus enumeration mechanisms that you expect to exist >>> simultaneously -- but, of course, no systems like this seem to >>> actually exist, so the problem is both easily solved and totally >>> theoretical. >>> >>>> - within ofw_bus_map_intr() (or later - at the time when byte >>>> string must be decoded) you are not able (easily) to differentiate >>>> between different formats, thus you are not able to select >>>> appropriate decoder. The GPIO controller, for example, >>>> must be able to handle interrupts defined by standard OFW >>>> property, or by pair concurrently. >>> >>> In principle, you could solve that as above, or by registering a >>> second interrupt domain for the same controller. >>> >>> In practice, it doesn't matter since, in the GPIO case, for example, >>> the GPIO controller is never itself also a normal interrupt >>> controller (i.e. the GIC and GPIO controller are always different >>> devices). As such, the theoretical does not occur in practice. >> form >> https://svnweb.freebsd.org/base/head/sys/gnu/dts/arm/tegra124-jetson-tk1.dts?revision=295436&view=markup#l1380 >> "interrupts = ; " >> Do you want more examples ? > > Those have the identical format to the GPIO properties, because they > are the same thing. So it works out of the box. Do you have examples > of something that *doesn't work*? >> >>> >>>> For this reason we makes domain key composite, in our model, the >>>> domain key consist of "domain key type" >>>> and "domain key value". This composite key guarantees uniqueness >>>> and it also allows to select proper parser for byte string. >>> >>> Yes, but this solves what is a nonexistant problem by making the >>> system substantially less flexible and more invasive. Which is not a >>> good tradeoff. >>> >> I think that existence of problem is confirmed in the above example . >> Quote from previous paragraph: >> "We could solve this in a number of ways, ... , or adding another >> value (domain type, for example)." >> What can I say more ... > > Except that the example you gave *is not an example* of the problem > you are describing. You would only end up with a problem if: > 1) You had interrupts in a GPIO property rather than in an interrupts > property (or equivalent). > 2) *And* you had interrupts on GPIOs in an interrupts property (or > equivalent) > 3) *and* those are encoded differently > 4) *and* the different encodings use the same number of cells > 5) *and* are not otherwise distinguishable > > Does that ever actually happen, in the real world, on any device tree? > You could imagine any kind of messed up thing you want, but we > shouldn't structure APIs around them, especially given that the > current alternative you are proposing has real, concrete problems on > real hardware that actually exists. > Allow me to respond to this issue only. I think that this main issue, everything else looks resolvable for me (or, in worst case, can be converted to MD code). from linux/arch/arm/boot/dts/am335x-evm.dts (it's first file that I'm searched) ---------------------------------------------------------------------------------------------------------------------------- &gpmc { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&nandflash_pins_s0>; ranges = <0 0 0x08000000 0x1000000>; /* CS0: 16MB for NAND */ nand@0,0 { compatible = "ti,omap2-nand"; reg = <0 0 4>; /* CS0, offset 0, IO size 4 */ interrupt-parent = <&gpmc>; interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ <1 IRQ_TYPE_NONE>; /* termcount */ rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */ ---------------------------------------------------------------------------------------------------------------------------- so we have rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */ and interrupt-parent = <&gpmc>; interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ --- or --- from linux/arch/arm/boot/dts/exynos5420-peach-pit.dts max98090: codec@10 { compatible = "maxim,max98090"; reg = <0x10>; interrupts = <2 0>; interrupt-parent = <&gpx0>; pinctrl-names = "default"; and sleep-gpios = <&gpx3 5 GPIO_ACTIVE_HIGH>; also, in this case, first cell in 'interrupts' property have different meaning that second cell in 'sleep-gpio'. (on exynos, not all gpios supports interrrupts) In general, binding for 'interrupts ' and '-gpios ' are different, but can have same size . Michal >> >> > > [snip] > >>>> >>>>> >>>>>> >>>>>>> >>>>>>>>> It is much easier to do this correctly at bus attach time when >>>>>>>>> the resource lists are made (how PPC does it). >>>>>>>>> >>>>>>>> I don't agree. I don't agree. Making this at bus attach time >>>>>>>> leads into complicated 'virtual' IRQ infrastructure, with many >>>>>>>> unresolved corner cases. >>>>>>> >>>>>>> Which unresolved corner cases? This has been working correctly >>>>>>> on a number of platforms in both FreeBSD and Linux for many years. >>>>>> Nope, it doesn't work for ARM yet (for GPIO interrupts for >>>>>> example) and Linux uses EPROBE_DEFER mechanism for a long time. >>>>>> See: http://lxr.free-electrons.com/source/drivers/base/platform.c#L87 >>>>> >>>>> There is some missing code on ARM (probably about 30 minutes of >>>>> work to make it match PowerPC) to make it work in an ideal case, >>>>> sure, but there is no reason you could not go out right now, with >>>>> the existing code, and implement GPIO interrupts by declaring the >>>>> GPIO driver as an interrupt controller. >>>>> >>>>> Can you give any concrete case of something that doesn't work? >>>> GPIO again. How you can allocate interrupt associated with given >>>> gpio pin installed by "cd-gpios = <&gpio TEGRA_GPIO(V, 2) >>>> GPIO_ACTIVE_LOW>;" >>> >>> You parse that as an interrupt on a interrupt domain associated with >>> the GPIO controller referenced by &gpio. In pseudo-code: >>> >>> int irq = ofw_bus_map_intr(dev, <&gpio>, ncells, >> GPIO_ACTIVE_LOW>); >>> The GPIO controller, meanwhile, has registered an interrupt domain >>> for <&gpio> and is asked to decode and configure the interrupt >>> defined by , which it knows how to >>> parse. This is simple and straightforward. >> And again and again: >> We have >> "cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;" >> and >> interrupt-parent = <&gpio>; >> "interrupts = ; " >> in one tree. And we need to get a interrupt in both variants. > > Where, again, those are completely identical and there are not even > two variants, so you are presenting this an example of a problem *that > it does not exemplify*. > >> >>>>>>> I would urge, in the strongest possible terms, that this be >>>>>>> backed out from stable/11 at least. We can add the new API back >>>>>>> for 11.1 if we want it, but we totally lose the ability to >>>>>>> change it later in the stable/11 cycle if it stays in now. >>>>>>> -Nathan >>>>>>> >>>>>> The API is part of still unstable, experimental INTRNG, so its >>>>>> not fixed we we can change it at any time, I think. >>>>>> But yes, we forget to wrap new bus_map_intr() method (and >>>>>> associated code) by #ifdef INTRNG. Is this sufficient for you? >>>>> >>>>> For HEAD, yes. I would like it out of stable/11 entirely until >>>>> this discussion converges. >>>>> -Nathan >>>> The current code (in stable/11) works and is tested. I simple >>>> cannot commit any untested change for stable tree mainly if is in >>>> BETA2 stage. And I cannot fully test the requested change, at this >>>> time i have access to single ARM platform. >>>> But we're in the same situation - both have the same commit bit, >>>> neither one of us is the author of the disputed commit and neither >>>> of us are not able to fully test it. >>>> So feel free to commit what you want, if you have courage to commit >>>> untested code. I haven't it...\ >>>> Michal >>>> >>> >>> Well, the code isn't actually used anywhere in stable/11, or HEAD, >>> so it can't possibly be either tested or important for the >>> functionality of any current code. As such, I will revert from HEAD >>> on Monday and request an MFC from re@ following that if the author >>> has not appeared by that time. >>> -Nathan >> >> The code is, of course, already used by each of INTRNG enabled platforms. >> >> ------------------------------------------------------------------------------------------------------ >> diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c >> index 1e048c4..14eb507 100644 >> --- a/sys/dev/ofw/ofwbus.c >> +++ b/sys/dev/ofw/ofwbus.c >> @@ -323,7 +323,7 @@ ofwbus_map_intr(device_t bus, device_t child, int >> *rid, rman_res_t *start, >> int ncells, rv; >> u_int irq; >> struct intr_map_data_fdt *fdt_data; >> - >> +printf(" *** %s: bus: %p\n", __func__, bus); >> node = ofw_bus_get_node(child); >> rv = ofw_bus_intr_by_rid(child, node, *rid, &iparent, >> &ncells, &cells); >> if (rv != 0) >> diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c >> index af3ca57..b381163 100644 >> --- a/sys/kern/subr_bus.c >> +++ b/sys/kern/subr_bus.c >> @@ -3960,6 +3960,7 @@ int >> bus_generic_map_intr(device_t dev, device_t child, int *rid, >> rman_res_t *start, >> rman_res_t *end, rman_res_t *count, struct intr_map_data **imd) >> { >> +printf(" *** %s: dev: %p\n", __func__, dev); >> /* Propagate up the bus hierarchy until someone handles it. */ >> if (dev->parent) >> return (BUS_MAP_INTR(dev->parent, child, rid, start, >> end, count, >> --------------------------------------------------------------------------------------------------- >> Result: >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** bus_generic_map_intr: dev: 0xc4ce5780 >> *** bus_generic_map_intr: dev: 0xc4ce0980 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** bus_generic_map_intr: dev: 0xc4e52080 >> *** bus_generic_map_intr: dev: 0xc4e52480 >> *** bus_generic_map_intr: dev: 0xc4e52780 >> *** bus_generic_map_intr: dev: 0xc4ce1500 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** bus_generic_map_intr: dev: 0xc4ce0300 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> *** ofwbus_map_intr: bus: 0xc4ce1880 >> >> So its hard to say that code is unused. >> >> And, just for info, last "clean in PPC way" is initial commit INTRNG >> at r289529 (9 months ago). >> Michal >> >> > > Ah, I see, it is called from bus_extend_resource(). Could you describe > this one? It takes an arbitrary resource, but only actually works on > interrupts and seems to be called from #ifdef-ed parts of the MI > bus_alloc_resource(). Could you describe what is going on here some > more? There doesn't appear to be any documentation of any of this. > > This will make this much harder to untangle, unfortunately, and > probably means we are stuck with this as a rump API in stable/11. > -Nathan > > From owner-svn-src-all@freebsd.org Sun Jul 24 18:04:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDB07BA3F09; Sun, 24 Jul 2016 18:04:13 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5C261538; Sun, 24 Jul 2016 18:04:13 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OI4C0C092845; Sun, 24 Jul 2016 18:04:12 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OI4CIG092843; Sun, 24 Jul 2016 18:04:12 GMT (envelope-from br@FreeBSD.org) Message-Id: <201607241804.u6OI4CIG092843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sun, 24 Jul 2016 18:04:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303271 - in head: share/mk sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 18:04:14 -0000 Author: br Date: Sun Jul 24 18:04:12 2016 New Revision: 303271 URL: https://svnweb.freebsd.org/changeset/base/303271 Log: Fix style. Modified: head/share/mk/bsd.sys.mk head/sys/conf/kern.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sun Jul 24 17:07:39 2016 (r303270) +++ head/share/mk/bsd.sys.mk Sun Jul 24 18:04:12 2016 (r303271) @@ -111,12 +111,30 @@ CWARNFLAGS+= -Wno-format # GCC 5.2.0 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50200 -CWARNFLAGS+= -Wno-error=unused-function -Wno-error=enum-compare -Wno-error=logical-not-parentheses -Wno-error=bool-compare -Wno-error=uninitialized -Wno-error=array-bounds -Wno-error=clobbered -Wno-error=cast-align -Wno-error=extra -Wno-error=attributes -Wno-error=inline -Wno-error=unused-but-set-variable -Wno-error=unused-value -Wno-error=strict-aliasing -Wno-error=address +CWARNFLAGS+= -Wno-error=address \ + -Wno-error=array-bounds \ + -Wno-error=attributes \ + -Wno-error=bool-compare \ + -Wno-error=cast-align \ + -Wno-error=clobbered \ + -Wno-error=enum-compare \ + -Wno-error=extra \ + -Wno-error=inline \ + -Wno-error=logical-not-parentheses \ + -Wno-error=strict-aliasing \ + -Wno-error=uninitialized \ + -Wno-error=unused-but-set-variable \ + -Wno-error=unused-function \ + -Wno-error=unused-value .endif # GCC 6.1.0 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 -CWARNFLAGS+= -Wno-error=unused-const-variable= -Wno-error=nonnull-compare -Wno-error=shift-negative-value -Wno-error=misleading-indentation -Wno-error=tautological-compare +CWARNFLAGS+= -Wno-error=misleading-indentation \ + -Wno-error=nonnull-compare \ + -Wno-error=shift-negative-value \ + -Wno-error=tautological-compare \ + -Wno-error=unused-const-variable .endif # How to handle FreeBSD custom printf format specifiers. Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sun Jul 24 17:07:39 2016 (r303270) +++ head/sys/conf/kern.mk Sun Jul 24 18:04:12 2016 (r303271) @@ -51,7 +51,7 @@ CWARNEXTRA?= -Wno-error=inline -Wno-erro -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes \ -Wno-error=strict-overflow -Wno-error=overflow .if ${COMPILER_VERSION} >= 60100 -CWARNEXTRA+= -Wno-error=nonnull-compare -Wno-error=shift-overflow= +CWARNEXTRA+= -Wno-error=nonnull-compare -Wno-error=shift-overflow .endif .else # For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars. From owner-svn-src-all@freebsd.org Sun Jul 24 18:05:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F284EBA3F83; Sun, 24 Jul 2016 18:05:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D002E16B5; Sun, 24 Jul 2016 18:05:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OI56LH092926; Sun, 24 Jul 2016 18:05:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OI55np092924; Sun, 24 Jul 2016 18:05:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607241805.u6OI55np092924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 24 Jul 2016 18:05:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303272 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 18:05:07 -0000 Author: bdrewery Date: Sun Jul 24 18:05:05 2016 New Revision: 303272 URL: https://svnweb.freebsd.org/changeset/base/303272 Log: SYSTEM_COMPILER: Rework the logic to allow a 'make test-system-compiler'. 1. Always calculate what the expected values are. 2. Add 'make test-system-compiler' to show all of the computed values vs the wanted values. 3. Extend the .info line to buildkernel/kernel-toolchain/toolchain/_cross-tools. 4. Consolidate all of the logic to one condition. MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile head/Makefile.inc1 Modified: head/Makefile ============================================================================== --- head/Makefile Sun Jul 24 18:04:12 2016 (r303271) +++ head/Makefile Sun Jul 24 18:05:05 2016 (r303272) @@ -131,7 +131,8 @@ TGTS= all all-man buildenv buildenvvars builddtb xdev xdev-build xdev-install \ xdev-links native-xtools stageworld stagekernel stage-packages \ create-world-packages create-kernel-packages create-packages \ - packages installconfig real-packages sign-packages package-pkg + packages installconfig real-packages sign-packages package-pkg \ + test-system-compiler # XXX: r156740: This can't work since bsd.subdir.mk is not included ever. # It will only work for SUBDIR_TARGETS in make.conf. @@ -151,7 +152,8 @@ TGTS+= ${BITGTS} META_TGT_WHITELIST+= \ _* build32 buildfiles buildincludes buildkernel buildsoft \ buildworld everything kernel-toolchain kernel-toolchains kernel \ - kernels libraries native-xtools showconfig tinderbox toolchain \ + kernels libraries native-xtools showconfig test-system-compiler \ + tinderbox toolchain \ toolchains universe world worlds xdev xdev-build .ORDER: buildworld installworld Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Jul 24 18:04:12 2016 (r303271) +++ head/Makefile.inc1 Sun Jul 24 18:05:05 2016 (r303272) @@ -82,50 +82,66 @@ MK_CROSS_COMPILER= no .include "share/mk/src.opts.mk" # Check if there is a local compiler that can satisfy as an external compiler. -.if ${MK_SYSTEM_COMPILER} == "yes" && ${MK_CROSS_COMPILER} == "yes" && \ - (${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \ - !make(showconfig) && !make(native-xtools) && !make(xdev*) # Which compiler is expected to be used? .if ${MK_CLANG_BOOTSTRAP} == "yes" -_expected_compiler_type= clang +WANT_COMPILER_TYPE= clang .elif ${MK_GCC_BOOTSTRAP} == "yes" -_expected_compiler_type= gcc +WANT_COMPILER_TYPE= gcc .endif -# If the expected vs CC is different then we can't skip. -# GCC cannot be used for cross-arch yet. For clang we pass -target later if -# TARGET_ARCH!=MACHINE_ARCH. -.if ${_expected_compiler_type} == ${COMPILER_TYPE} && \ - (${COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) -# It needs to be the same revision as we would build for the bootstrap. -.if !defined(CROSS_COMPILER_FREEBSD_VERSION) -.if ${_expected_compiler_type} == "clang" -CROSS_COMPILER_FREEBSD_VERSION!= \ +.if !defined(WANT_COMPILER_FREEBSD_VERSION) +.if ${WANT_COMPILER_TYPE} == "clang" +WANT_COMPILER_FREEBSD_VERSION_FILE= lib/clang/freebsd_cc_version.h +WANT_COMPILER_FREEBSD_VERSION!= \ awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \ - ${SRCDIR}/lib/clang/freebsd_cc_version.h || echo unknown -CROSS_COMPILER_VERSION!= \ + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown +WANT_COMPILER_VERSION_FILE= lib/clang/include/clang/Basic/Version.inc +WANT_COMPILER_VERSION!= \ awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ - ${SRCDIR}/lib/clang/include/clang/Basic/Version.inc || echo unknown -.elif ${_expected_compiler_type} == "gcc" -CROSS_COMPILER_FREEBSD_VERSION!= \ + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE} || echo unknown +.elif ${WANT_COMPILER_TYPE} == "gcc" +WANT_COMPILER_FREEBSD_VERSION_FILE= gnu/usr.bin/cc/cc_tools/freebsd-native.h +WANT_COMPILER_FREEBSD_VERSION!= \ awk '$$2 == "FBSD_CC_VER" {printf("%d\n", $$3)}' \ - ${SRCDIR}/gnu/usr.bin/cc/cc_tools/freebsd-native.h || echo unknown -CROSS_COMPILER_VERSION!= \ + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown +WANT_COMPILER_VERSION_FILE= contrib/gcc/BASE-VER +WANT_COMPILER_VERSION!= \ awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3}' \ - ${SRCDIR}/contrib/gcc/BASE-VER || echo unknown + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE} || echo unknown .endif -.export CROSS_COMPILER_FREEBSD_VERSION CROSS_COMPILER_VERSION -.endif # !defined(CROSS_COMPILER_FREEBSD_VERSION) -.if ${COMPILER_VERSION} == ${CROSS_COMPILER_VERSION} && \ - ${COMPILER_FREEBSD_VERSION} == ${CROSS_COMPILER_FREEBSD_VERSION} +.export WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_VERSION +.endif # !defined(WANT_COMPILER_FREEBSD_VERSION) +# It needs to be the same revision as we would build for the bootstrap. +# If the expected vs CC is different then we can't skip. +# GCC cannot be used for cross-arch yet. For clang we pass -target later if +# TARGET_ARCH!=MACHINE_ARCH. +.if ${MK_SYSTEM_COMPILER} == "yes" && ${MK_CROSS_COMPILER} == "yes" && \ + (${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \ + !make(showconfig) && !make(native-xtools) && !make(xdev*) && \ + ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} && \ + (${COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ + ${COMPILER_VERSION} == ${WANT_COMPILER_VERSION} && \ + ${COMPILER_FREEBSD_VERSION} == ${WANT_COMPILER_FREEBSD_VERSION} # Everything matches, disable the bootstrap compiler. MK_CLANG_BOOTSTRAP= no MK_GCC_BOOTSTRAP= no -.if make(buildworld) +USING_SYSTEM_COMPILER= yes +.endif # ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} +USING_SYSTEM_COMPILER?= no +TEST_SYSTEM_COMPILER_VARS= \ + USING_SYSTEM_COMPILER MK_SYSTEM_COMPILER \ + MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP MK_GCC_BOOTSTRAP \ + WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \ + WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ + CC COMPILER_TYPE COMPILER_VERSION COMPILER_FREEBSD_VERSION +test-system-compiler: .PHONY +.for v in ${TEST_SYSTEM_COMPILER_VARS} + ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}" +.endfor +.if ${USING_SYSTEM_COMPILER} == "yes" && \ + (make(buildworld) || make(buildkernel) || make(kernel-toolchain) || \ + make(toolchain) || make(_cross-tools)) .info SYSTEM_COMPILER: Determined that CC=${CC} matches the source tree. Not bootstrapping a cross-compiler. .endif -.endif # ${COMPILER_VERSION} == ${CROSS_COMPILER_VERSION} -.endif # ${_expected_compiler_type} == ${COMPILER_TYPE} -.endif # ${XCC:N${CCACHE_BIN}:M/*} # For installworld need to ensure that the looked-up compiler metadata is # passed along rather than trying to run cc from the restricted From owner-svn-src-all@freebsd.org Sun Jul 24 18:28:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6135BA1639; Sun, 24 Jul 2016 18:28:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 965C411C4; Sun, 24 Jul 2016 18:28:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OISEuq000376; Sun, 24 Jul 2016 18:28:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OISE5j000375; Sun, 24 Jul 2016 18:28:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607241828.u6OISE5j000375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 24 Jul 2016 18:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303273 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 18:28:15 -0000 Author: bdrewery Date: Sun Jul 24 18:28:14 2016 New Revision: 303273 URL: https://svnweb.freebsd.org/changeset/base/303273 Log: Fix empty WANT_COMPILER_TYPE when neither compiler is bootstrapped. Bug in r303272. MFC after: 3 days X-MFC-With: r303272 Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Jul 24 18:05:05 2016 (r303272) +++ head/Makefile.inc1 Sun Jul 24 18:28:14 2016 (r303273) @@ -87,6 +87,8 @@ MK_CROSS_COMPILER= no WANT_COMPILER_TYPE= clang .elif ${MK_GCC_BOOTSTRAP} == "yes" WANT_COMPILER_TYPE= gcc +.else +WANT_COMPILER_TYPE= .endif .if !defined(WANT_COMPILER_FREEBSD_VERSION) .if ${WANT_COMPILER_TYPE} == "clang" From owner-svn-src-all@freebsd.org Sun Jul 24 18:48:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A626BA1A0E; Sun, 24 Jul 2016 18:48:36 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (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 170881AC2; Sun, 24 Jul 2016 18:48:36 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x244.google.com with SMTP id f6so6280758ith.2; Sun, 24 Jul 2016 11:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:cc; bh=Nmf7rnZcEO64yIpAR61ZIvtM4iaaOwaEsT8+q0KNOpI=; b=ZebUpuak1scR+qOc3+eTyl8b6A3T+7XmaDobblJK5A+6qy+x0ThIqyLuiFudzOHdv5 cWury5mV0yDoa3lFlGFIPLbio1u4HXY4LHmeMAEg4+eT136rBzya9hj+v4LEZMYOXC3d IoaX01kSkgZM9Z11rWvtT1CljRY4RkQMcLxxbuuVw6Z4REi4GVyxTSpO0paF/jcWOh8v SctbmnibLv+m6MK4r3Nd/qb2zFT1qNjrYTQvFw9nm8pUQ1UhnEWANAQHtXnjr4TA1KKp K7ZxWbxxbCYnUv51u1+22OJf/w6oYd917zQdiCxy7KWVoEb7vXxkCauAZOzWT+BJd7pl VZPA== 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:from:date:message-id:subject :to:cc; bh=Nmf7rnZcEO64yIpAR61ZIvtM4iaaOwaEsT8+q0KNOpI=; b=gwqLtpAF69dSrxRGvtxpPFZI39OV/HTqBfrDNOiq70WMb/8wRh9Rkw/z0GvEw/Emky egBJ1Oe2DI9Ds34Wb6c2M74qdE7VSJTrAKxz+qt1lcywRgakwDDcenIBQH4Q9rI2YK86 Pq5v8aZ6w6QzqEM4g5wl5U0pgQICDYfNisqnTYDHB9gFC533NzlfLhtnqfkHRxYWMIJP Z184ZnrFcW4KHNkuiaX3bYTBWQiw3EoXhtLG5nCQKqe7Gn6UrfT13fwpAp0v0Vq47jP1 WWDdnw8bCWGmk6TjmjFVKA347JVW6dzI2zzsr+wD7YDErwihSOQlD9S8Qma0AWLyYDPD uEuQ== X-Gm-Message-State: ALyK8tIykUH31Ae1VCo2FmD92qwRIauLms9NqZN4bl1t7Q0QkyqPReYAoMe/hwdM5Y+gR5ZoS1mcjOrrK4LDjQ== X-Received: by 10.36.150.70 with SMTP id z67mr53606780itd.80.1469386115328; Sun, 24 Jul 2016 11:48:35 -0700 (PDT) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.36.141.129 with HTTP; Sun, 24 Jul 2016 11:48:34 -0700 (PDT) From: Adrian Chadd Date: Sun, 24 Jul 2016 11:48:34 -0700 X-Google-Sender-Auth: isEh3Jzx09f8ZjvTsCEChlRvIkk Message-ID: Subject: Re: svn commit: r301453 - in head/sys: arm/arm arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/mips sys To: Michal Meloun Cc: Nathan Whitehorn , Svatopluk Kraus , "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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 18:48:36 -0000 [snip] Hi, I think a lot of this whole discussion stems from a reasonably unclear shared idea of where intrng is supposed to be going and what it's supposed to be doing. I'm sure everyone has their own ideas of what it is for their own needs, but this thread shows a clear separation between the original writers and people working on supporting their own platforms. So, my suggestion - also so I can understand it, since I kinda need it now for the atheros mips ports! - is maybe something gets written up in the wiki that's a more detailed technical overview of intrng, including the problems its trying to solve. Then, instead of flinging things around on the commit mailing list, people edit the wiki and discuss on -arm about the specific details. I think that'll avoid a lot of what's going on. (And honestly, I'd like it more sorted out sooner rather than later, as I really want to start attacking the QCA ARM ports (IPQ4019) if it's not already done, and that's all interrupt/gpio/etc gymnastics we need INTRNG for.) So, Nathan, wanna start a wiki page with the /current/ implementation that's in -HEAD and what the intention was from the PPC side? -adrian From owner-svn-src-all@freebsd.org Sun Jul 24 18:50:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BAE3BA1B8F; Sun, 24 Jul 2016 18:50:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 298031C8B; Sun, 24 Jul 2016 18:50:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OIoB04007868; Sun, 24 Jul 2016 18:50:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OIoBgg007866; Sun, 24 Jul 2016 18:50:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607241850.u6OIoBgg007866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 24 Jul 2016 18:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303274 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 18:50:12 -0000 Author: bdrewery Date: Sun Jul 24 18:50:11 2016 New Revision: 303274 URL: https://svnweb.freebsd.org/changeset/base/303274 Log: Don't disable binutils/elftoolchain bootstrapping with external compiler. This was a regression from r300349. Setting MK_CROSS_COMPILER=no forces the compiler bootstraping *and* the binutils/elftoolchain bootstrapping to be disabled in share/mk/src.opts.mk. The only intent with using an external compiler is to disable bootstrapping of the compiler. The binutils/elftoolchain bootstrapping must still occur unless XAS is set. This did not affect WITH_SYSTEM_COMPILER. Now that setting an external compiler sets both MK_CLANG_BOOTSTRAP and MK_GCC_BOOTSTRAP to no, and MK_CROSS_COMPILER does the same via share/mk/src/opts.mk, remove redundant logic that checks for MK_CROSS_COMPILER. It will not always be true now that MK_CROSS_COMPILER==no when an external compiler is used and --sysroot/-target is needed. Reported by: sbruno Pointyhat to: bdrewery MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 head/Makefile.libcompat Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Jul 24 18:28:14 2016 (r303273) +++ head/Makefile.inc1 Sun Jul 24 18:50:11 2016 (r303274) @@ -74,7 +74,8 @@ X${COMPILER}?= ${${COMPILER}} # If a full path to an external cross compiler is given, don't build # a cross compiler. .if ${XCC:N${CCACHE_BIN}:M/*} -MK_CROSS_COMPILER= no +MK_CLANG_BOOTSTRAP= no +MK_GCC_BOOTSTRAP= no .endif # Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. @@ -116,7 +117,7 @@ WANT_COMPILER_VERSION!= \ # If the expected vs CC is different then we can't skip. # GCC cannot be used for cross-arch yet. For clang we pass -target later if # TARGET_ARCH!=MACHINE_ARCH. -.if ${MK_SYSTEM_COMPILER} == "yes" && ${MK_CROSS_COMPILER} == "yes" && \ +.if ${MK_SYSTEM_COMPILER} == "yes" && \ (${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \ !make(showconfig) && !make(native-xtools) && !make(xdev*) && \ ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} && \ @@ -550,8 +551,7 @@ BFLAGS+= -B${CROSS_BINUTILS_PREFIX} .endif # External compiler needs sysroot and target flags. -.if ${MK_CROSS_COMPILER} == "no" || \ - (${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no") +.if ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no" .if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX}) BFLAGS+= -B${WORLDTMP}/usr/bin .endif @@ -579,7 +579,7 @@ TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x8 XCFLAGS+= -target ${TARGET_TRIPLE} .endif XCFLAGS+= --sysroot=${WORLDTMP} -.endif # ${MK_CROSS_COMPILER} == "no" +.endif # ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no" .if !empty(BFLAGS) XCFLAGS+= ${BFLAGS} @@ -1820,7 +1820,6 @@ _elftctools= lib/libelftc \ usr.bin/elfcopy .endif -.if ${MK_CROSS_COMPILER} != "no" .if ${MK_CLANG_BOOTSTRAP} != "no" _clang= usr.bin/clang _clang_libs= lib/clang @@ -1828,7 +1827,6 @@ _clang_libs= lib/clang .if ${MK_GCC_BOOTSTRAP} != "no" _cc= gnu/usr.bin/cc .endif -.endif .if ${MK_USB} != "no" _usb_tools= sys/boot/usb/tools .endif Modified: head/Makefile.libcompat ============================================================================== --- head/Makefile.libcompat Sun Jul 24 18:28:14 2016 (r303273) +++ head/Makefile.libcompat Sun Jul 24 18:50:11 2016 (r303274) @@ -81,8 +81,8 @@ LIBCOMPATCFLAGS+= -B${LIBCOMPATTMP}/usr/ LIBCOMPATCFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include # Force using libc++ for external GCC. # XXX: This should be checking MK_GNUCXX == no -.if ${X_COMPILER_VERSION} >= 40800 && (${MK_CROSS_COMPILER} == "no" || \ - (${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no")) +.if ${X_COMPILER_VERSION} >= 40800 && \ + (${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no") LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \ -nostdinc++ -L${LIBCOMPAT_OBJTREE}${.CURDIR}/lib/libc++ .endif From owner-svn-src-all@freebsd.org Sun Jul 24 20:39:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76285BA3B75; Sun, 24 Jul 2016 20:39:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F6DB17CB; Sun, 24 Jul 2016 20:39:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OKdjXI048975; Sun, 24 Jul 2016 20:39:45 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OKdi9I048958; Sun, 24 Jul 2016 20:39:44 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607242039.u6OKdi9I048958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 24 Jul 2016 20:39:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r303275 - in vendor/libdivsufsort: . dist dist/CMakeModules dist/examples dist/include dist/lib dist/pkgconfig X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 20:39:46 -0000 Author: delphij Date: Sun Jul 24 20:39:43 2016 New Revision: 303275 URL: https://svnweb.freebsd.org/changeset/base/303275 Log: Vendor import of libdivsufsort, a software library that implements a lightweight suffix array construction algorithm. Obtained from: https://github.com/y-256/libdivsufsort Added: vendor/libdivsufsort/ vendor/libdivsufsort/dist/ vendor/libdivsufsort/dist/.gitignore vendor/libdivsufsort/dist/CHANGELOG.md vendor/libdivsufsort/dist/CMakeLists.txt (contents, props changed) vendor/libdivsufsort/dist/CMakeModules/ vendor/libdivsufsort/dist/CMakeModules/AppendCompilerFlags.cmake vendor/libdivsufsort/dist/CMakeModules/CheckFunctionKeywords.cmake vendor/libdivsufsort/dist/CMakeModules/CheckLFS.cmake vendor/libdivsufsort/dist/CMakeModules/ProjectCPack.cmake vendor/libdivsufsort/dist/CMakeModules/cmake_uninstall.cmake.in (contents, props changed) vendor/libdivsufsort/dist/LICENSE vendor/libdivsufsort/dist/README.md vendor/libdivsufsort/dist/VERSION.cmake vendor/libdivsufsort/dist/examples/ vendor/libdivsufsort/dist/examples/CMakeLists.txt (contents, props changed) vendor/libdivsufsort/dist/examples/bwt.c (contents, props changed) vendor/libdivsufsort/dist/examples/mksary.c (contents, props changed) vendor/libdivsufsort/dist/examples/sasearch.c (contents, props changed) vendor/libdivsufsort/dist/examples/suftest.c (contents, props changed) vendor/libdivsufsort/dist/examples/unbwt.c (contents, props changed) vendor/libdivsufsort/dist/include/ vendor/libdivsufsort/dist/include/CMakeLists.txt (contents, props changed) vendor/libdivsufsort/dist/include/config.h.cmake vendor/libdivsufsort/dist/include/divsufsort.h.cmake vendor/libdivsufsort/dist/include/divsufsort_private.h (contents, props changed) vendor/libdivsufsort/dist/include/lfs.h.cmake vendor/libdivsufsort/dist/lib/ vendor/libdivsufsort/dist/lib/CMakeLists.txt (contents, props changed) vendor/libdivsufsort/dist/lib/divsufsort.c (contents, props changed) vendor/libdivsufsort/dist/lib/sssort.c (contents, props changed) vendor/libdivsufsort/dist/lib/trsort.c (contents, props changed) vendor/libdivsufsort/dist/lib/utils.c (contents, props changed) vendor/libdivsufsort/dist/pkgconfig/ vendor/libdivsufsort/dist/pkgconfig/CMakeLists.txt (contents, props changed) vendor/libdivsufsort/dist/pkgconfig/libdivsufsort.pc.cmake Added: vendor/libdivsufsort/dist/.gitignore ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/.gitignore Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,32 @@ +# Object files +*.o +*.ko +*.obj +*.elf + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# CMake files/directories +build/ Added: vendor/libdivsufsort/dist/CHANGELOG.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/CHANGELOG.md Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,21 @@ +# libdivsufsort Change Log + +See full changelog at: https://github.com/y-256/libdivsufsort/commits + +## [2.0.1] - 2010-11-11 +### Fixed +* Wrong variable used in `divbwt` function +* Enclose some string variables with double quotation marks in include/CMakeLists.txt +* Fix typo in include/CMakeLists.txt + +## 2.0.0 - 2008-08-23 +### Changed +* Switch the build system to [CMake](http://www.cmake.org/) +* Improve the performance of the suffix-sorting algorithm + +### Added +* OpenMP support +* 64-bit version of divsufsort + +[Unreleased]: https://github.com/y-256/libdivsufsort/compare/2.0.1...HEAD +[2.0.1]: https://github.com/y-256/libdivsufsort/compare/2.0.0...2.0.1 Added: vendor/libdivsufsort/dist/CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/CMakeLists.txt Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,99 @@ +### cmake file for building libdivsufsort Package ### +cmake_minimum_required(VERSION 2.4.4) +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") +include(AppendCompilerFlags) + +## Project information ## +project(libdivsufsort C) +set(PROJECT_VENDOR "Yuta Mori") +set(PROJECT_CONTACT "yuta.256@gmail.com") +set(PROJECT_URL "https://github.com/y-256/libdivsufsort") +set(PROJECT_DESCRIPTION "A lightweight suffix sorting library") +include(VERSION.cmake) + +## CPack configuration ## +set(CPACK_GENERATOR "TGZ;TBZ2;ZIP") +set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2;ZIP") +include(ProjectCPack) + +## Project options ## +option(BUILD_SHARED_LIBS "Set to OFF to build static libraries" ON) +option(BUILD_EXAMPLES "Build examples" ON) +option(BUILD_DIVSUFSORT64 "Build libdivsufsort64" OFF) +option(USE_OPENMP "Use OpenMP for parallelization" OFF) +option(WITH_LFS "Enable Large File Support" ON) + +## Installation directories ## +set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32 or 64)") + +set(CMAKE_INSTALL_RUNTIMEDIR "" CACHE PATH "Specify the output directory for dll runtimes (default is bin)") +if(NOT CMAKE_INSTALL_RUNTIMEDIR) + set(CMAKE_INSTALL_RUNTIMEDIR "${CMAKE_INSTALL_PREFIX}/bin") +endif(NOT CMAKE_INSTALL_RUNTIMEDIR) + +set(CMAKE_INSTALL_LIBDIR "" CACHE PATH "Specify the output directory for libraries (default is lib)") +if(NOT CMAKE_INSTALL_LIBDIR) + set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") +endif(NOT CMAKE_INSTALL_LIBDIR) + +set(CMAKE_INSTALL_INCLUDEDIR "" CACHE PATH "Specify the output directory for header files (default is include)") +if(NOT CMAKE_INSTALL_INCLUDEDIR) + set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include") +endif(NOT CMAKE_INSTALL_INCLUDEDIR) + +set(CMAKE_INSTALL_PKGCONFIGDIR "" CACHE PATH "Specify the output directory for pkgconfig files (default is lib/pkgconfig)") +if(NOT CMAKE_INSTALL_PKGCONFIGDIR) + set(CMAKE_INSTALL_PKGCONFIGDIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig") +endif(NOT CMAKE_INSTALL_PKGCONFIGDIR) + +## Build type ## +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") +elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CMAKE_VERBOSE_MAKEFILE ON) +endif(NOT CMAKE_BUILD_TYPE) + +## Compiler options ## +if(MSVC) + append_c_compiler_flags("/W4" "VC" CMAKE_C_FLAGS) + append_c_compiler_flags("/Oi;/Ot;/Ox;/Oy" "VC" CMAKE_C_FLAGS_RELEASE) + if(USE_OPENMP) + append_c_compiler_flags("/openmp" "VC" CMAKE_C_FLAGS) + endif(USE_OPENMP) +elseif(BORLAND) + append_c_compiler_flags("-w" "BCC" CMAKE_C_FLAGS) + append_c_compiler_flags("-Oi;-Og;-Os;-Ov;-Ox" "BCC" CMAKE_C_FLAGS_RELEASE) +else(MSVC) + if(CMAKE_COMPILER_IS_GNUCC) + append_c_compiler_flags("-Wall" "GCC" CMAKE_C_FLAGS) + append_c_compiler_flags("-fomit-frame-pointer" "GCC" CMAKE_C_FLAGS_RELEASE) + if(USE_OPENMP) + append_c_compiler_flags("-fopenmp" "GCC" CMAKE_C_FLAGS) + endif(USE_OPENMP) + else(CMAKE_COMPILER_IS_GNUCC) + append_c_compiler_flags("-Wall" "UNKNOWN" CMAKE_C_FLAGS) + append_c_compiler_flags("-fomit-frame-pointer" "UNKNOWN" CMAKE_C_FLAGS_RELEASE) + if(USE_OPENMP) + append_c_compiler_flags("-fopenmp;-openmp;-omp" "UNKNOWN" CMAKE_C_FLAGS) + endif(USE_OPENMP) + endif(CMAKE_COMPILER_IS_GNUCC) +endif(MSVC) + +## Add definitions ## +add_definitions(-DHAVE_CONFIG_H=1 -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS) + +## Add subdirectories ## +add_subdirectory(pkgconfig) +add_subdirectory(include) +add_subdirectory(lib) +if(BUILD_EXAMPLES) + add_subdirectory(examples) +endif(BUILD_EXAMPLES) + +## Add 'uninstall' target ## +CONFIGURE_FILE( + "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/CMakeModules/cmake_uninstall.cmake" + IMMEDIATE @ONLY) +ADD_CUSTOM_TARGET(uninstall + "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/CMakeModules/cmake_uninstall.cmake") Added: vendor/libdivsufsort/dist/CMakeModules/AppendCompilerFlags.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/CMakeModules/AppendCompilerFlags.cmake Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,38 @@ +include(CheckCSourceCompiles) +include(CheckCXXSourceCompiles) + +macro(append_c_compiler_flags _flags _name _result) + set(SAFE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) + string(REGEX REPLACE "[-+/ ]" "_" cname "${_name}") + string(TOUPPER "${cname}" cname) + foreach(flag ${_flags}) + string(REGEX REPLACE "^[-+/ ]+(.*)[-+/ ]*$" "\\1" flagname "${flag}") + string(REGEX REPLACE "[-+/ ]" "_" flagname "${flagname}") + string(TOUPPER "${flagname}" flagname) + set(have_flag "HAVE_${cname}_${flagname}") + set(CMAKE_REQUIRED_FLAGS "${flag}") + check_c_source_compiles("int main() { return 0; }" ${have_flag}) + if(${have_flag}) + set(${_result} "${${_result}} ${flag}") + endif(${have_flag}) + endforeach(flag) + set(CMAKE_REQUIRED_FLAGS ${SAFE_CMAKE_REQUIRED_FLAGS}) +endmacro(append_c_compiler_flags) + +macro(append_cxx_compiler_flags _flags _name _result) + set(SAFE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) + string(REGEX REPLACE "[-+/ ]" "_" cname "${_name}") + string(TOUPPER "${cname}" cname) + foreach(flag ${_flags}) + string(REGEX REPLACE "^[-+/ ]+(.*)[-+/ ]*$" "\\1" flagname "${flag}") + string(REGEX REPLACE "[-+/ ]" "_" flagname "${flagname}") + string(TOUPPER "${flagname}" flagname) + set(have_flag "HAVE_${cname}_${flagname}") + set(CMAKE_REQUIRED_FLAGS "${flag}") + check_cxx_source_compiles("int main() { return 0; }" ${have_flag}) + if(${have_flag}) + set(${_result} "${${_result}} ${flag}") + endif(${have_flag}) + endforeach(flag) + set(CMAKE_REQUIRED_FLAGS ${SAFE_CMAKE_REQUIRED_FLAGS}) +endmacro(append_cxx_compiler_flags) Added: vendor/libdivsufsort/dist/CMakeModules/CheckFunctionKeywords.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/CMakeModules/CheckFunctionKeywords.cmake Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,15 @@ +include(CheckCSourceCompiles) + +macro(check_function_keywords _wordlist) + set(${_result} "") + foreach(flag ${_wordlist}) + string(REGEX REPLACE "[-+/ ()]" "_" flagname "${flag}") + string(TOUPPER "${flagname}" flagname) + set(have_flag "HAVE_${flagname}") + check_c_source_compiles("${flag} void func(); void func() { } int main() { func(); return 0; }" ${have_flag}) + if(${have_flag} AND NOT ${_result}) + set(${_result} "${flag}") +# break() + endif(${have_flag} AND NOT ${_result}) + endforeach(flag) +endmacro(check_function_keywords) Added: vendor/libdivsufsort/dist/CMakeModules/CheckLFS.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/CMakeModules/CheckLFS.cmake Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,109 @@ +## Checks for large file support ## +include(CheckIncludeFile) +include(CheckSymbolExists) +include(CheckTypeSize) + +macro(check_lfs _isenable) + set(LFS_OFF_T "") + set(LFS_FOPEN "") + set(LFS_FSEEK "") + set(LFS_FTELL "") + set(LFS_PRID "") + + if(${_isenable}) + set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") + set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 + -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS) + + check_include_file("sys/types.h" HAVE_SYS_TYPES_H) + check_include_file("inttypes.h" HAVE_INTTYPES_H) + check_include_file("stddef.h" HAVE_STDDEF_H) + check_include_file("stdint.h" HAVE_STDINT_H) + + # LFS type1: 8 <= sizeof(off_t), fseeko, ftello + check_type_size("off_t" SIZEOF_OFF_T) + if(SIZEOF_OFF_T GREATER 7) + check_symbol_exists("fseeko" "stdio.h" HAVE_FSEEKO) + check_symbol_exists("ftello" "stdio.h" HAVE_FTELLO) + if(HAVE_FSEEKO AND HAVE_FTELLO) + set(LFS_OFF_T "off_t") + set(LFS_FOPEN "fopen") + set(LFS_FSEEK "fseeko") + set(LFS_FTELL "ftello") + check_symbol_exists("PRIdMAX" "inttypes.h" HAVE_PRIDMAX) + if(HAVE_PRIDMAX) + set(LFS_PRID "PRIdMAX") + else(HAVE_PRIDMAX) + check_type_size("long" SIZEOF_LONG) + check_type_size("int" SIZEOF_INT) + if(SIZEOF_OFF_T GREATER SIZEOF_LONG) + set(LFS_PRID "\"lld\"") + elseif(SIZEOF_LONG GREATER SIZEOF_INT) + set(LFS_PRID "\"ld\"") + else(SIZEOF_OFF_T GREATER SIZEOF_LONG) + set(LFS_PRID "\"d\"") + endif(SIZEOF_OFF_T GREATER SIZEOF_LONG) + endif(HAVE_PRIDMAX) + endif(HAVE_FSEEKO AND HAVE_FTELLO) + endif(SIZEOF_OFF_T GREATER 7) + + # LFS type2: 8 <= sizeof(off64_t), fopen64, fseeko64, ftello64 + if(NOT LFS_OFF_T) + check_type_size("off64_t" SIZEOF_OFF64_T) + if(SIZEOF_OFF64_T GREATER 7) + check_symbol_exists("fopen64" "stdio.h" HAVE_FOPEN64) + check_symbol_exists("fseeko64" "stdio.h" HAVE_FSEEKO64) + check_symbol_exists("ftello64" "stdio.h" HAVE_FTELLO64) + if(HAVE_FOPEN64 AND HAVE_FSEEKO64 AND HAVE_FTELLO64) + set(LFS_OFF_T "off64_t") + set(LFS_FOPEN "fopen64") + set(LFS_FSEEK "fseeko64") + set(LFS_FTELL "ftello64") + check_symbol_exists("PRIdMAX" "inttypes.h" HAVE_PRIDMAX) + if(HAVE_PRIDMAX) + set(LFS_PRID "PRIdMAX") + else(HAVE_PRIDMAX) + check_type_size("long" SIZEOF_LONG) + check_type_size("int" SIZEOF_INT) + if(SIZEOF_OFF64_T GREATER SIZEOF_LONG) + set(LFS_PRID "\"lld\"") + elseif(SIZEOF_LONG GREATER SIZEOF_INT) + set(LFS_PRID "\"ld\"") + else(SIZEOF_OFF64_T GREATER SIZEOF_LONG) + set(LFS_PRID "\"d\"") + endif(SIZEOF_OFF64_T GREATER SIZEOF_LONG) + endif(HAVE_PRIDMAX) + endif(HAVE_FOPEN64 AND HAVE_FSEEKO64 AND HAVE_FTELLO64) + endif(SIZEOF_OFF64_T GREATER 7) + endif(NOT LFS_OFF_T) + + # LFS type3: 8 <= sizeof(__int64), _fseeki64, _ftelli64 + if(NOT LFS_OFF_T) + check_type_size("__int64" SIZEOF___INT64) + if(SIZEOF___INT64 GREATER 7) + check_symbol_exists("_fseeki64" "stdio.h" HAVE__FSEEKI64) + check_symbol_exists("_ftelli64" "stdio.h" HAVE__FTELLI64) + if(HAVE__FSEEKI64 AND HAVE__FTELLI64) + set(LFS_OFF_T "__int64") + set(LFS_FOPEN "fopen") + set(LFS_FSEEK "_fseeki64") + set(LFS_FTELL "_ftelli64") + set(LFS_PRID "\"I64d\"") + endif(HAVE__FSEEKI64 AND HAVE__FTELLI64) + endif(SIZEOF___INT64 GREATER 7) + endif(NOT LFS_OFF_T) + + set(CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") + endif(${_isenable}) + + if(NOT LFS_OFF_T) + ## not found + set(LFS_OFF_T "long") + set(LFS_FOPEN "fopen") + set(LFS_FSEEK "fseek") + set(LFS_FTELL "ftell") + set(LFS_PRID "\"ld\"") + endif(NOT LFS_OFF_T) + +endmacro(check_lfs) Added: vendor/libdivsufsort/dist/CMakeModules/ProjectCPack.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/CMakeModules/ProjectCPack.cmake Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,38 @@ +# If the cmake version includes cpack, use it +IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") + SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}") + SET(CPACK_PACKAGE_VENDOR "${PROJECT_VENDOR}") + SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md") + SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") + SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") + SET(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") + SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") +# SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${PROJECT_VERSION}") + SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION_FULL}") + + IF(NOT DEFINED CPACK_SYSTEM_NAME) + SET(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") + ENDIF(NOT DEFINED CPACK_SYSTEM_NAME) + + IF(${CPACK_SYSTEM_NAME} MATCHES Windows) + IF(CMAKE_CL_64) + SET(CPACK_SYSTEM_NAME win64-${CMAKE_SYSTEM_PROCESSOR}) + ELSE(CMAKE_CL_64) + SET(CPACK_SYSTEM_NAME win32-${CMAKE_SYSTEM_PROCESSOR}) + ENDIF(CMAKE_CL_64) + ENDIF(${CPACK_SYSTEM_NAME} MATCHES Windows) + + IF(NOT DEFINED CPACK_PACKAGE_FILE_NAME) + SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}") + ENDIF(NOT DEFINED CPACK_PACKAGE_FILE_NAME) + + SET(CPACK_PACKAGE_CONTACT "${PROJECT_CONTACT}") + IF(UNIX) + SET(CPACK_STRIP_FILES "") + SET(CPACK_SOURCE_STRIP_FILES "") +# SET(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake") + ENDIF(UNIX) + SET(CPACK_SOURCE_IGNORE_FILES "/CVS/" "/build/" "/\\\\.build/" "/\\\\.svn/" "~$") + # include CPack model once all variables are set + INCLUDE(CPack) +ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") Added: vendor/libdivsufsort/dist/CMakeModules/cmake_uninstall.cmake.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/CMakeModules/cmake_uninstall.cmake.in Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,36 @@ +IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") +ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + +FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +STRING(REGEX REPLACE "\n" ";" files "${files}") + +SET(NUM 0) +FOREACH(file ${files}) + IF(EXISTS "$ENV{DESTDIR}${file}") + MESSAGE(STATUS "Looking for \"$ENV{DESTDIR}${file}\" - found") + SET(UNINSTALL_CHECK_${NUM} 1) + ELSE(EXISTS "$ENV{DESTDIR}${file}") + MESSAGE(STATUS "Looking for \"$ENV{DESTDIR}${file}\" - not found") + SET(UNINSTALL_CHECK_${NUM} 0) + ENDIF(EXISTS "$ENV{DESTDIR}${file}") + MATH(EXPR NUM "1 + ${NUM}") +ENDFOREACH(file) + +SET(NUM 0) +FOREACH(file ${files}) + IF(${UNINSTALL_CHECK_${NUM}}) + MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") + EXEC_PROGRAM( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + IF(NOT "${rm_retval}" STREQUAL 0) + MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") + ENDIF(NOT "${rm_retval}" STREQUAL 0) + ENDIF(${UNINSTALL_CHECK_${NUM}}) + MATH(EXPR NUM "1 + ${NUM}") +ENDFOREACH(file) + +FILE(REMOVE "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") Added: vendor/libdivsufsort/dist/LICENSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/LICENSE Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2003 Yuta Mori All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. Added: vendor/libdivsufsort/dist/README.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/README.md Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,140 @@ +# libdivsufsort + +libdivsufsort is a software library that implements a lightweight suffix array construction algorithm. + +## News +* 2015-03-21: The project has moved from [Google Code](http://code.google.com/p/libdivsufsort/) to [GitHub](https://github.com/y-256/libdivsufsort) + +## Introduction +This library provides a simple and an efficient C API to construct a suffix array and a Burrows-Wheeler transformed string from a given string over a constant-size alphabet. +The algorithm runs in O(n log n) worst-case time using only 5n+O(1) bytes of memory space, where n is the length of +the string. + +## Build requirements +* An ANSI C Compiler (e.g. GNU GCC) +* [CMake](http://www.cmake.org/ "CMake") version 2.4.2 or newer +* CMake-supported build tool + +## Building on GNU/Linux +1. Get the source code from GitHub. You can either + * use git to clone the repository + ``` + git clone https://github.com/y-256/libdivsufsort.git + ``` + * or download a [zip file](../../archive/master.zip) directly +2. Create a `build` directory in the package source directory. +```shell +$ cd libdivsufsort +$ mkdir build +$ cd build +``` +3. Configure the package for your system. +If you want to install to a different location, change the -DCMAKE_INSTALL_PREFIX option. +```shell +$ cmake -DCMAKE_BUILD_TYPE="Release" \ +-DCMAKE_INSTALL_PREFIX="/usr/local" .. +``` +4. Compile the package. +```shell +$ make +``` +5. (Optional) Install the library and header files. +```shell +$ sudo make install +``` + +## API +```c +/* Data types */ +typedef int32_t saint_t; +typedef int32_t saidx_t; +typedef uint8_t sauchar_t; + +/* + * Constructs the suffix array of a given string. + * @param T[0..n-1] The input string. + * @param SA[0..n-1] The output array or suffixes. + * @param n The length of the given string. + * @return 0 if no error occurred, -1 or -2 otherwise. + */ +saint_t +divsufsort(const sauchar_t *T, saidx_t *SA, saidx_t n); + +/* + * Constructs the burrows-wheeler transformed string of a given string. + * @param T[0..n-1] The input string. + * @param U[0..n-1] The output string. (can be T) + * @param A[0..n-1] The temporary array. (can be NULL) + * @param n The length of the given string. + * @return The primary index if no error occurred, -1 or -2 otherwise. + */ +saidx_t +divbwt(const sauchar_t *T, sauchar_t *U, saidx_t *A, saidx_t n); +``` + +## Example Usage +```c +#include +#include +#include + +#include + +int main() { + // intput data + char *Text = "abracadabra"; + int n = strlen(Text); + int i, j; + + // allocate + int *SA = (int *)malloc(n * sizeof(int)); + + // sort + divsufsort((unsigned char *)Text, SA, n); + + // output + for(i = 0; i < n; ++i) { + printf("SA[%2d] = %2d: ", i, SA[i]); + for(j = SA[i]; j < n; ++j) { + printf("%c", Text[j]); + } + printf("$\n"); + } + + // deallocate + free(SA); + + return 0; +} +``` +See the [examples](examples) directory for a few other examples. + +## Benchmarks +See [Benchmarks](https://github.com/y-256/libdivsufsort/blob/wiki/SACA_Benchmarks.md) page for details. + +## License +libdivsufsort is released under the [MIT license](LICENSE "MIT license"). +> The MIT License (MIT) +> +> Copyright (c) 2003 Yuta Mori All rights reserved. +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +## Author +* Yuta Mori Added: vendor/libdivsufsort/dist/VERSION.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/VERSION.cmake Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,23 @@ +set(PROJECT_VERSION_MAJOR "2") +set(PROJECT_VERSION_MINOR "0") +set(PROJECT_VERSION_PATCH "2") +set(PROJECT_VERSION_EXTRA "-1") +set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") +set(PROJECT_VERSION_FULL "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${PROJECT_VERSION_EXTRA}") + +set(LIBRARY_VERSION "3.0.1") +set(LIBRARY_SOVERSION "3") + +## Git revision number ## +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") + execute_process(COMMAND git describe --tags HEAD + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + OUTPUT_VARIABLE GIT_DESCRIBE_TAGS ERROR_QUIET) + if(GIT_DESCRIBE_TAGS) + string(REGEX REPLACE "^v(.*)" "\\1" GIT_REVISION "${GIT_DESCRIBE_TAGS}") + string(STRIP "${GIT_REVISION}" GIT_REVISION) + if(GIT_REVISION) + set(PROJECT_VERSION_FULL "${GIT_REVISION}") + endif(GIT_REVISION) + endif(GIT_DESCRIBE_TAGS) +endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") Added: vendor/libdivsufsort/dist/examples/CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/examples/CMakeLists.txt Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,11 @@ +## Add definitions ## +add_definitions(-D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64) + +## Targets ## +include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include" + "${CMAKE_CURRENT_BINARY_DIR}/../include") +link_directories("${CMAKE_CURRENT_BINARY_DIR}/../lib") +foreach(src suftest mksary sasearch bwt unbwt) + add_executable(${src} ${src}.c) + target_link_libraries(${src} divsufsort) +endforeach(src) Added: vendor/libdivsufsort/dist/examples/bwt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/examples/bwt.c Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,220 @@ +/* + * bwt.c for libdivsufsort + * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#if HAVE_CONFIG_H +# include "config.h" +#endif +#include +#if HAVE_STRING_H +# include +#endif +#if HAVE_STDLIB_H +# include +#endif +#if HAVE_MEMORY_H +# include +#endif +#if HAVE_STDDEF_H +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_IO_H && HAVE_FCNTL_H +# include +# include +#endif +#include +#include +#include "lfs.h" + + +static +size_t +write_int(FILE *fp, saidx_t n) { + unsigned char c[4]; + c[0] = (unsigned char)((n >> 0) & 0xff), c[1] = (unsigned char)((n >> 8) & 0xff), + c[2] = (unsigned char)((n >> 16) & 0xff), c[3] = (unsigned char)((n >> 24) & 0xff); + return fwrite(c, sizeof(unsigned char), 4, fp); +} + +static +void +print_help(const char *progname, int status) { + fprintf(stderr, + "bwt, a burrows-wheeler transform program, version %s.\n", + divsufsort_version()); + fprintf(stderr, "usage: %s [-b num] INFILE OUTFILE\n", progname); + fprintf(stderr, " -b num set block size to num MiB [1..512] (default: 32)\n\n"); + exit(status); +} + +int +main(int argc, const char *argv[]) { + FILE *fp, *ofp; + const char *fname, *ofname; + sauchar_t *T; + saidx_t *SA; + LFS_OFF_T n; + size_t m; + saidx_t pidx; + clock_t start,finish; + saint_t i, blocksize = 32, needclose = 3; + + /* Check arguments. */ + if((argc == 1) || + (strcmp(argv[1], "-h") == 0) || + (strcmp(argv[1], "--help") == 0)) { print_help(argv[0], EXIT_SUCCESS); } + if((argc != 3) && (argc != 5)) { print_help(argv[0], EXIT_FAILURE); } + i = 1; + if(argc == 5) { + if(strcmp(argv[i], "-b") != 0) { print_help(argv[0], EXIT_FAILURE); } + blocksize = atoi(argv[i + 1]); + if(blocksize < 0) { blocksize = 1; } + else if(512 < blocksize) { blocksize = 512; } + i += 2; + } + blocksize <<= 20; + + /* Open a file for reading. */ + if(strcmp(argv[i], "-") != 0) { +#if HAVE_FOPEN_S + if(fopen_s(&fp, fname = argv[i], "rb") != 0) { +#else + if((fp = LFS_FOPEN(fname = argv[i], "rb")) == NULL) { +#endif + fprintf(stderr, "%s: Cannot open file `%s': ", argv[0], fname); + perror(NULL); + exit(EXIT_FAILURE); + } + } else { +#if HAVE__SETMODE && HAVE__FILENO + if(_setmode(_fileno(stdin), _O_BINARY) == -1) { + fprintf(stderr, "%s: Cannot set mode: ", argv[0]); + perror(NULL); + exit(EXIT_FAILURE); + } +#endif + fp = stdin; + fname = "stdin"; + needclose ^= 1; + } + i += 1; + + /* Open a file for writing. */ + if(strcmp(argv[i], "-") != 0) { +#if HAVE_FOPEN_S + if(fopen_s(&ofp, ofname = argv[i], "wb") != 0) { +#else + if((ofp = LFS_FOPEN(ofname = argv[i], "wb")) == NULL) { +#endif + fprintf(stderr, "%s: Cannot open file `%s': ", argv[0], ofname); + perror(NULL); + exit(EXIT_FAILURE); + } + } else { +#if HAVE__SETMODE && HAVE__FILENO + if(_setmode(_fileno(stdout), _O_BINARY) == -1) { + fprintf(stderr, "%s: Cannot set mode: ", argv[0]); + perror(NULL); + exit(EXIT_FAILURE); + } +#endif + ofp = stdout; + ofname = "stdout"; + needclose ^= 2; + } + + /* Get the file size. */ + if(LFS_FSEEK(fp, 0, SEEK_END) == 0) { + n = LFS_FTELL(fp); + rewind(fp); + if(n < 0) { + fprintf(stderr, "%s: Cannot ftell `%s': ", argv[0], fname); + perror(NULL); + exit(EXIT_FAILURE); + } + if(0x20000000L < n) { n = 0x20000000L; } + if((blocksize == 0) || (n < blocksize)) { blocksize = (saidx_t)n; } + } else if(blocksize == 0) { blocksize = 32 << 20; } + + /* Allocate 5blocksize bytes of memory. */ + T = (sauchar_t *)malloc(blocksize * sizeof(sauchar_t)); + SA = (saidx_t *)malloc(blocksize * sizeof(saidx_t)); + if((T == NULL) || (SA == NULL)) { + fprintf(stderr, "%s: Cannot allocate memory.\n", argv[0]); + exit(EXIT_FAILURE); + } + + /* Write the blocksize. */ + if(write_int(ofp, blocksize) != 4) { + fprintf(stderr, "%s: Cannot write to `%s': ", argv[0], ofname); + perror(NULL); + exit(EXIT_FAILURE); + } + + fprintf(stderr, " BWT (blocksize %" PRIdSAINT_T ") ... ", blocksize); + start = clock(); + for(n = 0; 0 < (m = fread(T, sizeof(sauchar_t), blocksize, fp)); n += m) { + /* Burrows-Wheeler Transform. */ + pidx = divbwt(T, T, SA, m); + if(pidx < 0) { + fprintf(stderr, "%s (bw_transform): %s.\n", + argv[0], + (pidx == -1) ? "Invalid arguments" : "Cannot allocate memory"); + exit(EXIT_FAILURE); + } + + /* Write the bwted data. */ + if((write_int(ofp, pidx) != 4) || + (fwrite(T, sizeof(sauchar_t), m, ofp) != m)) { + fprintf(stderr, "%s: Cannot write to `%s': ", argv[0], ofname); + perror(NULL); + exit(EXIT_FAILURE); + } + } + if(ferror(fp)) { + fprintf(stderr, "%s: Cannot read from `%s': ", argv[0], fname); + perror(NULL); + exit(EXIT_FAILURE); + } + finish = clock(); + fprintf(stderr, "%" PRIdOFF_T " bytes: %.4f sec\n", + n, (double)(finish - start) / (double)CLOCKS_PER_SEC); + + /* Close files */ + if(needclose & 1) { fclose(fp); } + if(needclose & 2) { fclose(ofp); } + + /* Deallocate memory. */ + free(SA); + free(T); + + return 0; +} Added: vendor/libdivsufsort/dist/examples/mksary.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libdivsufsort/dist/examples/mksary.c Sun Jul 24 20:39:43 2016 (r303275) @@ -0,0 +1,193 @@ +/* + * mksary.c for libdivsufsort + * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#if HAVE_CONFIG_H +# include "config.h" +#endif +#include +#if HAVE_STRING_H +# include +#endif +#if HAVE_STDLIB_H +# include +#endif +#if HAVE_MEMORY_H +# include +#endif +#if HAVE_STDDEF_H +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_IO_H && HAVE_FCNTL_H +# include +# include +#endif +#include +#include +#include "lfs.h" + + +static +void +print_help(const char *progname, int status) { + fprintf(stderr, + "mksary, a simple suffix array builder, version %s.\n", + divsufsort_version()); + fprintf(stderr, "usage: %s INFILE OUTFILE\n\n", progname); + exit(status); +} + +int +main(int argc, const char *argv[]) { + FILE *fp, *ofp; + const char *fname, *ofname; + sauchar_t *T; + saidx_t *SA; + LFS_OFF_T n; + clock_t start, finish; + saint_t needclose = 3; + + /* Check arguments. */ + if((argc == 1) || + (strcmp(argv[1], "-h") == 0) || + (strcmp(argv[1], "--help") == 0)) { print_help(argv[0], EXIT_SUCCESS); } + if(argc != 3) { print_help(argv[0], EXIT_FAILURE); } + + /* Open a file for reading. */ + if(strcmp(argv[1], "-") != 0) { +#if HAVE_FOPEN_S + if(fopen_s(&fp, fname = argv[1], "rb") != 0) { +#else + if((fp = LFS_FOPEN(fname = argv[1], "rb")) == NULL) { +#endif + fprintf(stderr, "%s: Cannot open file `%s': ", argv[0], fname); + perror(NULL); + exit(EXIT_FAILURE); + } + } else { +#if HAVE__SETMODE && HAVE__FILENO + if(_setmode(_fileno(stdin), _O_BINARY) == -1) { + fprintf(stderr, "%s: Cannot set mode: ", argv[0]); + perror(NULL); + exit(EXIT_FAILURE); + } +#endif + fp = stdin; + fname = "stdin"; + needclose ^= 1; + } + + /* Open a file for writing. */ + if(strcmp(argv[2], "-") != 0) { +#if HAVE_FOPEN_S + if(fopen_s(&ofp, ofname = argv[2], "wb") != 0) { +#else + if((ofp = LFS_FOPEN(ofname = argv[2], "wb")) == NULL) { +#endif + fprintf(stderr, "%s: Cannot open file `%s': ", argv[0], ofname); + perror(NULL); + exit(EXIT_FAILURE); + } + } else { +#if HAVE__SETMODE && HAVE__FILENO + if(_setmode(_fileno(stdout), _O_BINARY) == -1) { + fprintf(stderr, "%s: Cannot set mode: ", argv[0]); + perror(NULL); + exit(EXIT_FAILURE); + } +#endif + ofp = stdout; + ofname = "stdout"; + needclose ^= 2; + } + + /* Get the file size. */ + if(LFS_FSEEK(fp, 0, SEEK_END) == 0) { + n = LFS_FTELL(fp); + rewind(fp); + if(n < 0) { + fprintf(stderr, "%s: Cannot ftell `%s': ", argv[0], fname); + perror(NULL); + exit(EXIT_FAILURE); + } + if(0x7fffffff <= n) { + fprintf(stderr, "%s: Input file `%s' is too big.\n", argv[0], fname); + exit(EXIT_FAILURE); + } + } else { + fprintf(stderr, "%s: Cannot fseek `%s': ", argv[0], fname); + perror(NULL); + exit(EXIT_FAILURE); + } + + /* Allocate 5blocksize bytes of memory. */ + T = (sauchar_t *)malloc((size_t)n * sizeof(sauchar_t)); + SA = (saidx_t *)malloc((size_t)n * sizeof(saidx_t)); + if((T == NULL) || (SA == NULL)) { + fprintf(stderr, "%s: Cannot allocate memory.\n", argv[0]); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jul 24 20:43:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18B10BA3D38; Sun, 24 Jul 2016 20:43:04 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C35F31CA9; Sun, 24 Jul 2016 20:43:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OKh2N7052643; Sun, 24 Jul 2016 20:43:02 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OKh2mf052642; Sun, 24 Jul 2016 20:43:02 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607242043.u6OKh2mf052642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 24 Jul 2016 20:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r303276 - vendor/libdivsufsort/0.0.2015.10.27 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 20:43:04 -0000 Author: delphij Date: Sun Jul 24 20:43:02 2016 New Revision: 303276 URL: https://svnweb.freebsd.org/changeset/base/303276 Log: Tag libdivsufsort snapshot of 2015/10/27. Git revision: 5f60d6f026c30fb4ac296f696b3c8b0eb71bd428 Added: vendor/libdivsufsort/0.0.2015.10.27/ - copied from r303275, vendor/libdivsufsort/dist/ From owner-svn-src-all@freebsd.org Sun Jul 24 20:44:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 990F2BA3DBA; Sun, 24 Jul 2016 20:44:33 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 81CA91E08; Sun, 24 Jul 2016 20:44:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u6OKiV59038456 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 24 Jul 2016 13:44:31 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u6OKiVrC038455; Sun, 24 Jul 2016 13:44:31 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 24 Jul 2016 13:44:31 -0700 From: Gleb Smirnoff To: Andrey Chernov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303264 - head/usr.bin/calendar/calendars/ru_RU.UTF-8 Message-ID: <20160724204431.GM1076@FreeBSD.org> References: <201607241035.u6OAZijR023467@repo.freebsd.org> <76ecf576-3b05-9a58-9c58-6b45f49b7286@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <76ecf576-3b05-9a58-9c58-6b45f49b7286@freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 20:44:33 -0000 Andrey, thanks, I will fix that. Trusting script and not checking results was stupid. On Sun, Jul 24, 2016 at 06:16:26PM +0300, Andrey Chernov wrote: A> What happens with the lines below? A> A> On 24.07.2016 13:35, Gleb Smirnoff wrote: A> > Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.orthodox A> > -ПаÑха-7 Вход ГоÑподень в ИеруÑалим. Вербное ВоÑкреÑенье A> > +ПаÑха-7 Вход ГоÑподень в ИеруÑалим. Вербное ВоÑкреÑент.ье A> > +ПаÑха ВоÑкреÑент.ие ХриÑтово A> > +ПаÑха+39 ВознеÑент.ие A> A> > Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan A> > -14 мар Ðовый Год, ОвÑень малый A> > +14 марта Ðовый Год, ОвÑент.ÑŒ малый A> > -20 мар* ВеÑенние равноденÑтвие A> > - 7 апр День Марены (Ñдвинутое веÑеннее равноденÑтвие) A> > +20 марта* ВеÑент.ние равноденÑтвие A> > + 7 апр. День Марены (Ñдвинутое веÑент.нее равноденÑтвие) A> > + 6 Ð¼Ð°Ñ Ð”ÐµÐ½ÑŒ Дажьбога, ОвÑент.ÑŒ большой A> -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Sun Jul 24 20:47:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D34FBA3E58; Sun, 24 Jul 2016 20:47:58 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E8D1114D; Sun, 24 Jul 2016 20:47:58 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OKlvv7052870; Sun, 24 Jul 2016 20:47:57 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OKlvBg052868; Sun, 24 Jul 2016 20:47:57 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201607242047.u6OKlvBg052868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 24 Jul 2016 20:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303277 - head/usr.bin/calendar/calendars/ru_RU.UTF-8 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 20:47:58 -0000 Author: glebius Date: Sun Jul 24 20:47:57 2016 New Revision: 303277 URL: https://svnweb.freebsd.org/changeset/base/303277 Log: Fix failures of scripted conversion. Noticed by: ache Pointy hat to: glebius Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.orthodox head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.orthodox ============================================================================== --- head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.orthodox Sun Jul 24 20:43:02 2016 (r303276) +++ head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.orthodox Sun Jul 24 20:47:57 2016 (r303277) @@ -19,11 +19,11 @@ Paskha=ПаÑха 19 Ñнв. БогоÑвление или Крещение ГоÑподне 15 февр. Сретение ГоÑподне ПаÑха-48 Великий ПоÑÑ‚ -ПаÑха-7 Вход ГоÑподень в ИеруÑалим. Вербное ВоÑкреÑент.ье +ПаÑха-7 Вход ГоÑподень в ИеруÑалим. Вербное ВоÑкреÑенье ПаÑха-3 Великий Четверг ПаÑха-2 СтраÑÑ‚Ð½Ð°Ñ ÐŸÑтница -ПаÑха ВоÑкреÑент.ие ХриÑтово -ПаÑха+39 ВознеÑент.ие +ПаÑха ВоÑкреÑение ХриÑтово +ПаÑха+39 ВознеÑение ПаÑха+49 День СвÑтой Троицы. ПÑтидеÑÑтница 7 апр. Благовещение ПреÑвÑтой Богородицы 7 Ð¸ÑŽÐ»Ñ Ð Ð¾Ð¶Ð´ÐµÑтво Иоанна Предтечи Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan ============================================================================== --- head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan Sun Jul 24 20:43:02 2016 (r303276) +++ head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan Sun Jul 24 20:47:57 2016 (r303277) @@ -16,13 +16,13 @@ Paskha=ПаÑха 24 февр. День ВелеÑа 29 февр. День ÐšÐ°Ñ‰ÐµÑ 1 марта День Марены -14 марта Ðовый Год, ОвÑент.ÑŒ малый +14 марта Ðовый Год, ОвÑень малый ПаÑха-55 МаÑленица ПаÑха+7 КраÑÐ½Ð°Ñ Ð“Ð¾Ñ€ÐºÐ° ПаÑха+16 Радуница -20 марта* ВеÑент.ние равноденÑтвие - 7 апр. День Марены (Ñдвинутое веÑент.нее равноденÑтвие) - 6 Ð¼Ð°Ñ Ð”ÐµÐ½ÑŒ Дажьбога, ОвÑент.ÑŒ большой +20 марта* ВеÑеннее равноденÑтвие + 7 апр. День Марены (Ñдвинутое веÑеннее равноденÑтвие) + 6 Ð¼Ð°Ñ Ð”ÐµÐ½ÑŒ Дажьбога, ОвÑень большой 22 Ð¼Ð°Ñ Ð¯Ñ€Ð¸Ð»Ð¸Ð½ День 15 Ð¸ÑŽÐ½Ñ Ð”ÐµÐ½ÑŒ Триглава 21 июнÑ* Летнее ÑолнцеÑтоÑние From owner-svn-src-all@freebsd.org Sun Jul 24 22:30:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A606FBA3122; Sun, 24 Jul 2016 22:30:33 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90B391DAE; Sun, 24 Jul 2016 22:30:33 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u6OMUUWb006969 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 24 Jul 2016 15:30:31 -0700 Subject: Re: svn commit: r301453 - in head/sys: arm/arm arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/mips sys To: Adrian Chadd , Michal Meloun References: Cc: Svatopluk Kraus , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Nathan Whitehorn Message-ID: Date: Sun, 24 Jul 2016 15:30:30 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVYYCl8yo2QZAdO5/oQMzTZ8mDP5sYWLodHaRXMGRI/Bp0p8B4Lo+nztEMOPSrDcX3JtDVuV+aY6KyyyRSnHMuVwKHFmHyHPMcY= X-Sonic-ID: C;jol2Ou5R5hGjE5tMTlz00w== M;dlTSOu5R5hGjE5tMTlz00w== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 22:30:33 -0000 That's a good idea, Adrian. I've made a wiki page at https://wiki.freebsd.org/Complicated_Interrupts describing this and moved the discussion to freebsd-arch@ -Nathan On 07/24/16 11:48, Adrian Chadd wrote: > [snip] > > Hi, > > I think a lot of this whole discussion stems from a reasonably unclear > shared idea of where intrng is supposed to be going and what it's > supposed to be doing. I'm sure everyone has their own ideas of what it > is for their own needs, but this thread shows a clear separation > between the original writers and people working on supporting their > own platforms. > > So, my suggestion - also so I can understand it, since I kinda need it > now for the atheros mips ports! - is maybe something gets written up > in the wiki that's a more detailed technical overview of intrng, > including the problems its trying to solve. Then, instead of flinging > things around on the commit mailing list, people edit the wiki and > discuss on -arm about the specific details. > > I think that'll avoid a lot of what's going on. > > (And honestly, I'd like it more sorted out sooner rather than later, > as I really want to start attacking the QCA ARM ports (IPQ4019) if > it's not already done, and that's all interrupt/gpio/etc gymnastics we > need INTRNG for.) > > So, Nathan, wanna start a wiki page with the /current/ implementation > that's in -HEAD and what the intention was from the PPC side? > > > > -adrian > From owner-svn-src-all@freebsd.org Sun Jul 24 23:40:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BC76BA3FC6; Sun, 24 Jul 2016 23:40:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF7D418CE; Sun, 24 Jul 2016 23:40:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6ONeYXj015721; Sun, 24 Jul 2016 23:40:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6ONeYwD015720; Sun, 24 Jul 2016 23:40:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607242340.u6ONeYwD015720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 24 Jul 2016 23:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303279 - head/contrib/elftoolchain/libelftc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 23:40:35 -0000 Author: emaste Date: Sun Jul 24 23:40:33 2016 New Revision: 303279 URL: https://svnweb.freebsd.org/changeset/base/303279 Log: libelftc: fix demangling of wchar_t "wchar_t" is 7 characters long, not 6. PR: 208661 Submitted by: Daniel McRobb Obtained from: ELF Tool Chain r3480 MFC after: 3 days Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c ============================================================================== --- head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Sun Jul 24 20:54:30 2016 (r303278) +++ head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Sun Jul 24 23:40:33 2016 (r303279) @@ -2551,7 +2551,7 @@ again: case 'w': /* wchar_t */ - if (!cpp_demangle_push_str(ddata, "wchar_t", 6)) + if (!cpp_demangle_push_str(ddata, "wchar_t", 7)) goto clean; ++ddata->cur; goto rtn; From owner-svn-src-all@freebsd.org Mon Jul 25 00:46:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AA0FBA31AA; Mon, 25 Jul 2016 00:46:02 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C8AB13B0; Mon, 25 Jul 2016 00:46:02 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6P0k1Gb041295; Mon, 25 Jul 2016 00:46:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6P0k1i1041294; Mon, 25 Jul 2016 00:46:01 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607250046.u6P0k1i1041294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 25 Jul 2016 00:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303280 - stable/10/usr.bin/mail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 00:46:02 -0000 Author: delphij Date: Mon Jul 25 00:46:01 2016 New Revision: 303280 URL: https://svnweb.freebsd.org/changeset/base/303280 Log: MFC r302542: Use _PATH_DEVNULL instead of hardcoding. Modified: stable/10/usr.bin/mail/collect.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mail/collect.c ============================================================================== --- stable/10/usr.bin/mail/collect.c Sun Jul 24 23:40:33 2016 (r303279) +++ stable/10/usr.bin/mail/collect.c Mon Jul 25 00:46:01 2016 (r303280) @@ -339,9 +339,9 @@ cont: int nullfd, tempfd, rc; char tempname2[PATHSIZE]; - if ((nullfd = open("/dev/null", O_RDONLY, 0)) + if ((nullfd = open(_PATH_DEVNULL, O_RDONLY, 0)) == -1) { - warn("/dev/null"); + warn(_PATH_DEVNULL); break; } From owner-svn-src-all@freebsd.org Mon Jul 25 00:46:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D001BA3208; Mon, 25 Jul 2016 00:46:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0FE31586; Mon, 25 Jul 2016 00:46:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6P0kkUT041371; Mon, 25 Jul 2016 00:46:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6P0kkMG041370; Mon, 25 Jul 2016 00:46:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607250046.u6P0kkMG041370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 25 Jul 2016 00:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r303281 - stable/9/usr.bin/mail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 00:46:47 -0000 Author: delphij Date: Mon Jul 25 00:46:45 2016 New Revision: 303281 URL: https://svnweb.freebsd.org/changeset/base/303281 Log: MFC r302542: Use _PATH_DEVNULL instead of hardcoding. Modified: stable/9/usr.bin/mail/collect.c Directory Properties: stable/9/usr.bin/mail/ (props changed) Modified: stable/9/usr.bin/mail/collect.c ============================================================================== --- stable/9/usr.bin/mail/collect.c Mon Jul 25 00:46:01 2016 (r303280) +++ stable/9/usr.bin/mail/collect.c Mon Jul 25 00:46:45 2016 (r303281) @@ -339,9 +339,9 @@ cont: int nullfd, tempfd, rc; char tempname2[PATHSIZE]; - if ((nullfd = open("/dev/null", O_RDONLY, 0)) + if ((nullfd = open(_PATH_DEVNULL, O_RDONLY, 0)) == -1) { - warn("/dev/null"); + warn(_PATH_DEVNULL); break; } From owner-svn-src-all@freebsd.org Mon Jul 25 00:49:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71B3DBA32D4; Mon, 25 Jul 2016 00:49:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E6E0173C; Mon, 25 Jul 2016 00:49:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6P0nRbs041503; Mon, 25 Jul 2016 00:49:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6P0nR5k041502; Mon, 25 Jul 2016 00:49:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607250049.u6P0nR5k041502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jul 2016 00:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303282 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 00:49:28 -0000 Author: emaste Date: Mon Jul 25 00:49:27 2016 New Revision: 303282 URL: https://svnweb.freebsd.org/changeset/base/303282 Log: avoid building otusfw when WITHOUT_SOURCELESS_UCODE set PR: 204748 Submitted by: Fabian Keil Obtained from: ElectroBSD MFC after: 1 week Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Jul 25 00:46:45 2016 (r303281) +++ head/sys/modules/Makefile Mon Jul 25 00:49:27 2016 (r303282) @@ -279,7 +279,7 @@ SUBDIR= \ ${_nxge} \ oce \ otus \ - otusfw \ + ${_otusfw} \ ow \ ${_padlock} \ ${_padlock_rng} \ @@ -498,6 +498,7 @@ _fatm= fatm _fxp= fxp _ispfw= ispfw _mwlfw= mwlfw +_otusfw= otusfw _ralfw= ralfw _rtwnfw= rtwnfw _urtwnfw= urtwnfw From owner-svn-src-all@freebsd.org Mon Jul 25 03:12:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCA79BA4E68; Mon, 25 Jul 2016 03:12:42 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EBA9123C; Mon, 25 Jul 2016 03:12:42 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6P3CfCU097107; Mon, 25 Jul 2016 03:12:41 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6P3CfAx097099; Mon, 25 Jul 2016 03:12:41 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607250312.u6P3CfAx097099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 25 Jul 2016 03:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303283 - in head/sys/dev/hyperv: netvsc vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 03:12:42 -0000 Author: sephe Date: Mon Jul 25 03:12:40 2016 New Revision: 303283 URL: https://svnweb.freebsd.org/changeset/base/303283 Log: hyperv/vmbus: Rename hv_vmbus_priv.h to vmbus_brvar.h It only contains bufring related bits for a while. MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7281 Added: head/sys/dev/hyperv/vmbus/vmbus_brvar.h - copied unchanged from r303282, head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h Deleted: head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/vmbus/hv_ring_buffer.c head/sys/dev/hyperv/vmbus/hyperv.c head/sys/dev/hyperv/vmbus/hyperv_reg.h head/sys/dev/hyperv/vmbus/vmbus.c head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Mon Jul 25 00:49:27 2016 (r303282) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Mon Jul 25 03:12:40 2016 (r303283) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include "hv_net_vsc.h" #include "hv_rndis.h" #include "hv_rndis_filter.h" Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Mon Jul 25 00:49:27 2016 (r303282) +++ head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Mon Jul 25 03:12:40 2016 (r303283) @@ -31,8 +31,8 @@ #include #include -#include "hv_vmbus_priv.h" #include +#include /* Amount of space to write to */ #define HV_BYTES_AVAIL_TO_WRITE(r, w, z) \ Modified: head/sys/dev/hyperv/vmbus/hyperv.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hyperv.c Mon Jul 25 00:49:27 2016 (r303282) +++ head/sys/dev/hyperv/vmbus/hyperv.c Mon Jul 25 03:12:40 2016 (r303283) @@ -43,12 +43,14 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include -#include #include #include #include +#if 0 #include +#endif #define HYPERV_FREEBSD_BUILD 0ULL #define HYPERV_FREEBSD_VERSION ((uint64_t)__FreeBSD_version) Modified: head/sys/dev/hyperv/vmbus/hyperv_reg.h ============================================================================== --- head/sys/dev/hyperv/vmbus/hyperv_reg.h Mon Jul 25 00:49:27 2016 (r303282) +++ head/sys/dev/hyperv/vmbus/hyperv_reg.h Mon Jul 25 03:12:40 2016 (r303283) @@ -30,6 +30,7 @@ #define _HYPERV_REG_H_ #include +#include /* * Hyper-V Synthetic MSRs Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Mon Jul 25 00:49:27 2016 (r303282) +++ head/sys/dev/hyperv/vmbus/vmbus.c Mon Jul 25 03:12:40 2016 (r303283) @@ -60,11 +60,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include +#include #include #include "acpi_if.h" Copied: head/sys/dev/hyperv/vmbus/vmbus_brvar.h (from r303282, head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hyperv/vmbus/vmbus_brvar.h Mon Jul 25 03:12:40 2016 (r303283, copy of r303282, head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h) @@ -0,0 +1,85 @@ +/*- + * Copyright (c) 2009-2012,2016 Microsoft Corp. + * Copyright (c) 2012 NetApp Inc. + * Copyright (c) 2012 Citrix Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __HYPERV_PRIV_H__ +#define __HYPERV_PRIV_H__ + +#include +#include +#include +#include +#include + +#include + +struct vmbus_softc; + +/* + * Private, VM Bus functions + */ +struct sysctl_ctx_list; +struct sysctl_oid; + +void vmbus_br_sysctl_create(struct sysctl_ctx_list *ctx, + struct sysctl_oid *br_tree, hv_vmbus_ring_buffer_info *br, + const char *name); + +int hv_vmbus_ring_buffer_init( + hv_vmbus_ring_buffer_info *ring_info, + void *buffer, + uint32_t buffer_len); + +void hv_ring_buffer_cleanup( + hv_vmbus_ring_buffer_info *ring_info); + +int hv_ring_buffer_write( + hv_vmbus_ring_buffer_info *ring_info, + const struct iovec iov[], + uint32_t iovlen, + boolean_t *need_sig); + +int hv_ring_buffer_peek( + hv_vmbus_ring_buffer_info *ring_info, + void *buffer, + uint32_t buffer_len); + +int hv_ring_buffer_read( + hv_vmbus_ring_buffer_info *ring_info, + void *buffer, + uint32_t buffer_len, + uint32_t offset); + +void hv_ring_buffer_read_begin( + hv_vmbus_ring_buffer_info *ring_info); + +uint32_t hv_ring_buffer_read_end( + hv_vmbus_ring_buffer_info *ring_info); + +#endif /* __HYPERV_PRIV_H__ */ Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Mon Jul 25 00:49:27 2016 (r303282) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Mon Jul 25 03:12:40 2016 (r303283) @@ -46,10 +46,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include +#include +#include static void vmbus_chan_update_evtflagcnt(struct vmbus_softc *, const struct vmbus_channel *); From owner-svn-src-all@freebsd.org Mon Jul 25 03:30:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76E1EBA31AC; Mon, 25 Jul 2016 03:30:27 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E9AB1A33; Mon, 25 Jul 2016 03:30:27 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6P3UQD1001588; Mon, 25 Jul 2016 03:30:26 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6P3UQhb001586; Mon, 25 Jul 2016 03:30:26 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607250330.u6P3UQhb001586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 25 Jul 2016 03:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303284 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 03:30:27 -0000 Author: sephe Date: Mon Jul 25 03:30:26 2016 New Revision: 303284 URL: https://svnweb.freebsd.org/changeset/base/303284 Log: hyperv/vmbus: Move bufring info definition to vmbus_brvar.h MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7282 Modified: head/sys/dev/hyperv/vmbus/vmbus_brvar.h head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Modified: head/sys/dev/hyperv/vmbus/vmbus_brvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_brvar.h Mon Jul 25 03:12:40 2016 (r303283) +++ head/sys/dev/hyperv/vmbus/vmbus_brvar.h Mon Jul 25 03:30:26 2016 (r303284) @@ -28,22 +28,20 @@ * $FreeBSD$ */ -#ifndef __HYPERV_PRIV_H__ -#define __HYPERV_PRIV_H__ +#ifndef _VMBUS_BRVAR_H_ +#define _VMBUS_BRVAR_H_ #include #include #include -#include #include -#include +typedef struct { + struct vmbus_bufring *ring_buffer; + struct mtx ring_lock; + uint32_t ring_data_size; /* ring_size */ +} hv_vmbus_ring_buffer_info; -struct vmbus_softc; - -/* - * Private, VM Bus functions - */ struct sysctl_ctx_list; struct sysctl_oid; @@ -82,4 +80,4 @@ void hv_ring_buffer_read_begin( uint32_t hv_ring_buffer_read_end( hv_vmbus_ring_buffer_info *ring_info); -#endif /* __HYPERV_PRIV_H__ */ +#endif /* _VMBUS_BRVAR_H_ */ Modified: head/sys/dev/hyperv/vmbus/vmbus_chanvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Mon Jul 25 03:12:40 2016 (r303283) +++ head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Mon Jul 25 03:30:26 2016 (r303284) @@ -39,12 +39,7 @@ #include #include #include - -typedef struct { - struct vmbus_bufring *ring_buffer; - struct mtx ring_lock; - uint32_t ring_data_size; /* ring_size */ -} hv_vmbus_ring_buffer_info; +#include struct vmbus_channel { /* From owner-svn-src-all@freebsd.org Mon Jul 25 03:58:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A81CBA39B5; Mon, 25 Jul 2016 03:58:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07FB91863; Mon, 25 Jul 2016 03:58:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6P3wKhN012270; Mon, 25 Jul 2016 03:58:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6P3wJtw012266; Mon, 25 Jul 2016 03:58:19 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607250358.u6P3wJtw012266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 25 Jul 2016 03:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303285 - in head: contrib/libdivsufsort contrib/libdivsufsort/CMakeModules contrib/libdivsufsort/examples contrib/libdivsufsort/include contrib/libdivsufsort/lib contrib/libdivsufsort/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 03:58:21 -0000 Author: delphij Date: Mon Jul 25 03:58:19 2016 New Revision: 303285 URL: https://svnweb.freebsd.org/changeset/base/303285 Log: Change bsdiff to use divsufsort suffix sort library instead of qsufsort, which is more efficient. Note that for now we do not create a separate library for libdivsufsort because it's not used anywhere else. Obtained from: Chromium MFC after: 2 months Added: head/contrib/libdivsufsort/ - copied from r303279, vendor/libdivsufsort/dist/ head/usr.bin/bsdiff/bsdiff/config.h (contents, props changed) head/usr.bin/bsdiff/bsdiff/divsufsort64.h (contents, props changed) Deleted: head/contrib/libdivsufsort/.gitignore head/contrib/libdivsufsort/CMakeLists.txt head/contrib/libdivsufsort/CMakeModules/ head/contrib/libdivsufsort/VERSION.cmake head/contrib/libdivsufsort/examples/ head/contrib/libdivsufsort/include/CMakeLists.txt head/contrib/libdivsufsort/include/lfs.h.cmake head/contrib/libdivsufsort/lib/CMakeLists.txt head/contrib/libdivsufsort/pkgconfig/ Modified: head/usr.bin/bsdiff/bsdiff/Makefile head/usr.bin/bsdiff/bsdiff/bsdiff.c Modified: head/usr.bin/bsdiff/bsdiff/Makefile ============================================================================== --- head/usr.bin/bsdiff/bsdiff/Makefile Mon Jul 25 03:30:26 2016 (r303284) +++ head/usr.bin/bsdiff/bsdiff/Makefile Mon Jul 25 03:58:19 2016 (r303285) @@ -1,6 +1,17 @@ # $FreeBSD$ -PROG= bsdiff +PROG= bsdiff + +# libdivsufsort configured with: +# cmake -DCMAKE_BUILD_TYPE="Release" -DBUILD_DIVSUFSORT64=ON +.PATH: ${.CURDIR}/../../../contrib/libdivsufsort/lib +CFLAGS+= -DHAVE_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE +CFLAGS+= -D_LARGE_FILES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS +CFLAGS+= -D__STDC_LIMIT_MACROS -DBUILD_DIVSUFSORT64 +CFLAGS+= -I${.CURDIR}/../../../contrib/libdivsufsort/include -I${.CURDIR} +SRCS= divsufsort.c sssort.c trsort.c utils.c + +SRCS+= bsdiff.c LIBADD= bz2 Modified: head/usr.bin/bsdiff/bsdiff/bsdiff.c ============================================================================== --- head/usr.bin/bsdiff/bsdiff/bsdiff.c Mon Jul 25 03:30:26 2016 (r303284) +++ head/usr.bin/bsdiff/bsdiff/bsdiff.c Mon Jul 25 03:58:19 2016 (r303285) @@ -44,106 +44,11 @@ __FBSDID("$FreeBSD$"); #define O_BINARY 0 #endif -#define MIN(x,y) (((x)<(y)) ? (x) : (y)) - -static void split(off_t *I,off_t *V,off_t start,off_t len,off_t h) -{ - off_t i,j,k,x,tmp,jj,kk; - - if(len<16) { - for(k=start;kstart) split(I,V,start,jj-start,h); - - for(i=0;ikk) split(I,V,kk,start+len-kk,h); -} - -static void qsufsort(off_t *I,off_t *V,u_char *old,off_t oldsize) -{ - off_t buckets[256]; - off_t i,h,len; - - for(i=0;i<256;i++) buckets[i]=0; - for(i=0;i0;i--) buckets[i]=buckets[i-1]; - buckets[0]=0; - - for(i=0;i + +#ifndef DIVSUFSORT_API +# ifdef DIVSUFSORT_BUILD_DLL +# define DIVSUFSORT_API +# else +# define DIVSUFSORT_API +# endif +#endif + +/*- Datatypes -*/ +#ifndef SAUCHAR_T +#define SAUCHAR_T +typedef uint8_t sauchar_t; +#endif /* SAUCHAR_T */ +#ifndef SAINT_T +#define SAINT_T +typedef int32_t saint_t; +#endif /* SAINT_T */ +#ifndef SAIDX64_T +#define SAIDX64_T +typedef int64_t saidx64_t; +#endif /* SAIDX64_T */ +#ifndef PRIdSAINT_T +#define PRIdSAINT_T PRId32 +#endif /* PRIdSAINT_T */ +#ifndef PRIdSAIDX64_T +#define PRIdSAIDX64_T PRId64 +#endif /* PRIdSAIDX64_T */ + + +/*- Prototypes -*/ + +/** + * Constructs the suffix array of a given string. + * @param T[0..n-1] The input string. + * @param SA[0..n-1] The output array of suffixes. + * @param n The length of the given string. + * @return 0 if no error occurred, -1 or -2 otherwise. + */ +DIVSUFSORT_API +saint_t +divsufsort64(const sauchar_t *T, saidx64_t *SA, saidx64_t n); + +/** + * Constructs the burrows-wheeler transformed string of a given string. + * @param T[0..n-1] The input string. + * @param U[0..n-1] The output string. (can be T) + * @param A[0..n-1] The temporary array. (can be NULL) + * @param n The length of the given string. + * @return The primary index if no error occurred, -1 or -2 otherwise. + */ +DIVSUFSORT_API +saidx64_t +divbwt64(const sauchar_t *T, sauchar_t *U, saidx64_t *A, saidx64_t n); + +/** + * Returns the version of the divsufsort library. + * @return The version number string. + */ +DIVSUFSORT_API +const char * +divsufsort64_version(void); + + +/** + * Constructs the burrows-wheeler transformed string of a given string and suffix array. + * @param T[0..n-1] The input string. + * @param U[0..n-1] The output string. (can be T) + * @param SA[0..n-1] The suffix array. (can be NULL) + * @param n The length of the given string. + * @param idx The output primary index. + * @return 0 if no error occurred, -1 or -2 otherwise. + */ +DIVSUFSORT_API +saint_t +bw_transform64(const sauchar_t *T, sauchar_t *U, + saidx64_t *SA /* can NULL */, + saidx64_t n, saidx64_t *idx); + +/** + * Inverse BW-transforms a given BWTed string. + * @param T[0..n-1] The input string. + * @param U[0..n-1] The output string. (can be T) + * @param A[0..n-1] The temporary array. (can be NULL) + * @param n The length of the given string. + * @param idx The primary index. + * @return 0 if no error occurred, -1 or -2 otherwise. + */ +DIVSUFSORT_API +saint_t +inverse_bw_transform64(const sauchar_t *T, sauchar_t *U, + saidx64_t *A /* can NULL */, + saidx64_t n, saidx64_t idx); + +/** + * Checks the correctness of a given suffix array. + * @param T[0..n-1] The input string. + * @param SA[0..n-1] The input suffix array. + * @param n The length of the given string. + * @param verbose The verbose mode. + * @return 0 if no error occurred. + */ +DIVSUFSORT_API +saint_t +sufcheck64(const sauchar_t *T, const saidx64_t *SA, saidx64_t n, saint_t verbose); + +/** + * Search for the pattern P in the string T. + * @param T[0..Tsize-1] The input string. + * @param Tsize The length of the given string. + * @param P[0..Psize-1] The input pattern string. + * @param Psize The length of the given pattern string. + * @param SA[0..SAsize-1] The input suffix array. + * @param SAsize The length of the given suffix array. + * @param idx The output index. + * @return The count of matches if no error occurred, -1 otherwise. + */ +DIVSUFSORT_API +saidx64_t +sa_search64(const sauchar_t *T, saidx64_t Tsize, + const sauchar_t *P, saidx64_t Psize, + const saidx64_t *SA, saidx64_t SAsize, + saidx64_t *left); + +/** + * Search for the character c in the string T. + * @param T[0..Tsize-1] The input string. + * @param Tsize The length of the given string. + * @param SA[0..SAsize-1] The input suffix array. + * @param SAsize The length of the given suffix array. + * @param c The input character. + * @param idx The output index. + * @return The count of matches if no error occurred, -1 otherwise. + */ +DIVSUFSORT_API +saidx64_t +sa_simplesearch64(const sauchar_t *T, saidx64_t Tsize, + const saidx64_t *SA, saidx64_t SAsize, + saint_t c, saidx64_t *left); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* _DIVSUFSORT64_H */ From owner-svn-src-all@freebsd.org Mon Jul 25 05:33:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFE0BBA48BD; Mon, 25 Jul 2016 05:33:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A64E1AA4; Mon, 25 Jul 2016 05:33:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6P5XKmX048882; Mon, 25 Jul 2016 05:33:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6P5XJFr048868; Mon, 25 Jul 2016 05:33:19 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607250533.u6P5XJFr048868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 25 Jul 2016 05:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r303286 - in stable/9: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src lib/libmagic X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 05:33:22 -0000 Author: delphij Date: Mon Jul 25 05:33:19 2016 New Revision: 303286 URL: https://svnweb.freebsd.org/changeset/base/303286 Log: MFC r302221,302222: MFV r302218: file 5.28. Relnotes: yes Added: stable/9/contrib/file/magic/Magdir/ber - copied unchanged from r302221, head/contrib/file/magic/Magdir/ber stable/9/contrib/file/magic/Magdir/coverage - copied unchanged from r302221, head/contrib/file/magic/Magdir/coverage stable/9/contrib/file/magic/Magdir/pc88 - copied unchanged from r302221, head/contrib/file/magic/Magdir/pc88 stable/9/contrib/file/magic/Magdir/pc98 - copied unchanged from r302221, head/contrib/file/magic/Magdir/pc98 stable/9/contrib/file/magic/Magdir/x68000 - copied unchanged from r302221, head/contrib/file/magic/Magdir/x68000 Deleted: stable/9/contrib/file/src/magic.h Modified: stable/9/contrib/file/ChangeLog stable/9/contrib/file/config.h.in stable/9/contrib/file/configure stable/9/contrib/file/configure.ac stable/9/contrib/file/doc/file.man stable/9/contrib/file/magic/Magdir/c-lang stable/9/contrib/file/magic/Magdir/console stable/9/contrib/file/magic/Magdir/database stable/9/contrib/file/magic/Magdir/elf stable/9/contrib/file/magic/Magdir/msdos stable/9/contrib/file/magic/Magdir/msx stable/9/contrib/file/magic/Magdir/perl stable/9/contrib/file/magic/Makefile.am stable/9/contrib/file/magic/Makefile.in stable/9/contrib/file/src/Makefile.am stable/9/contrib/file/src/Makefile.in stable/9/contrib/file/src/apprentice.c stable/9/contrib/file/src/cdf.c stable/9/contrib/file/src/compress.c stable/9/contrib/file/src/der.c stable/9/contrib/file/src/file.c stable/9/contrib/file/src/softmagic.c stable/9/lib/libmagic/Makefile stable/9/lib/libmagic/config.h Directory Properties: stable/9/contrib/file/ (props changed) stable/9/lib/libmagic/ (props changed) Modified: stable/9/contrib/file/ChangeLog ============================================================================== --- stable/9/contrib/file/ChangeLog Mon Jul 25 03:58:19 2016 (r303285) +++ stable/9/contrib/file/ChangeLog Mon Jul 25 05:33:19 2016 (r303286) @@ -1,3 +1,15 @@ +2016-06-13 19:40 Christos Zoulas + + * release 5.28 + * fix leak on allocation failure + +2016-06-01 1:20 Christos Zoulas + + * PR/555: Avoid overflow for offset > nbytes + * PR/550: Segv on DER parsing: + - use the correct variable for length + - set offset to 0 on failure. + 2016-05-13 12:00 Christos Zoulas * release 5.27 Modified: stable/9/contrib/file/config.h.in ============================================================================== --- stable/9/contrib/file/config.h.in Mon Jul 25 03:58:19 2016 (r303285) +++ stable/9/contrib/file/config.h.in Mon Jul 25 05:33:19 2016 (r303286) @@ -328,6 +328,9 @@ # endif #endif +/* Enable zlib compression support */ +#undef ZLIBSUPPORT + /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 Modified: stable/9/contrib/file/configure ============================================================================== --- stable/9/contrib/file/configure Mon Jul 25 03:58:19 2016 (r303285) +++ stable/9/contrib/file/configure Mon Jul 25 05:33:19 2016 (r303286) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.27. +# Generated by GNU Autoconf 2.69 for file 5.28. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.27' -PACKAGE_STRING='file 5.27' +PACKAGE_VERSION='5.28' +PACKAGE_STRING='file 5.28' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -766,6 +766,7 @@ enable_option_checking enable_silent_rules enable_elf enable_elf_core +enable_zlib enable_fsect_man5 enable_dependency_tracking enable_static @@ -1327,7 +1328,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.27 to adapt to many kinds of systems. +\`configure' configures file 5.28 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1397,7 +1398,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.27:";; + short | recursive ) echo "Configuration of file 5.28:";; esac cat <<\_ACEOF @@ -1409,6 +1410,7 @@ Optional Features: --disable-silent-rules verbose build output (undo: "make V=0") --disable-elf disable builtin ELF support --disable-elf-core disable ELF core file support + --disable-zlib disable zlib compression support [default=auto] --enable-fsect-man5 enable file formats in man section 5 --enable-dependency-tracking do not reject slow dependency extractors @@ -1507,7 +1509,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.27 +file configure 5.28 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2163,7 +2165,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.27, which was +It was created by file $as_me 5.28, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3029,7 +3031,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.27' + VERSION='5.28' cat >>confdefs.h <<_ACEOF @@ -3218,6 +3220,16 @@ $as_echo "#define ELFCORE 1" >>confdefs. fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib support" >&5 +$as_echo_n "checking for zlib support... " >&6; } +# Check whether --enable-zlib was given. +if test "${enable_zlib+set}" = set; then : + enableval=$enable_zlib; +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_zlib" >&5 +$as_echo "$enable_zlib" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file formats in man section 5" >&5 $as_echo_n "checking for file formats in man section 5... " >&6; } # Check whether --enable-fsect-man5 was given. @@ -12812,7 +12824,8 @@ fi done -for ac_header in zlib.h +if test "$enable_zlib" != "no"; then + for ac_header in zlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = xyes; then : @@ -12824,6 +12837,7 @@ fi done +fi ac_fn_c_check_type "$LINENO" "sig_t" "ac_cv_type_sig_t" " #ifdef HAVE_SIGNAL_H #include @@ -14400,7 +14414,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5 +if test "$enable_zlib" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5 $as_echo_n "checking for gzopen in -lz... " >&6; } if ${ac_cv_lib_z_gzopen+:} false; then : $as_echo_n "(cached) " >&6 @@ -14445,6 +14460,7 @@ _ACEOF fi +fi if test "$MINGW" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regexec in -lgnurx" >&5 $as_echo_n "checking for regexec in -lgnurx... " >&6; } @@ -14504,6 +14520,16 @@ else fi +if test "$enable_zlib" = "yes"; then + if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then + as_fn_error $? "zlib support requested but not found" "$LINENO" 5 + fi +elif test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then + +$as_echo "#define ZLIBSUPPORT 1" >>confdefs.h + +fi + ac_config_files="$ac_config_files Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile" cat >confcache <<\_ACEOF @@ -15049,7 +15075,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.27, which was +This file was extended by file $as_me 5.28, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15115,7 +15141,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.27 +file config.status 5.28 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: stable/9/contrib/file/configure.ac ============================================================================== --- stable/9/contrib/file/configure.ac Mon Jul 25 03:58:19 2016 (r303285) +++ stable/9/contrib/file/configure.ac Mon Jul 25 05:33:19 2016 (r303286) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.27],[christos@astron.com]) +AC_INIT([file],[5.28],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -34,6 +34,11 @@ fi], [ AC_DEFINE([ELFCORE], 1, [Define for ELF core file support]) ]) +AC_MSG_CHECKING(for zlib support) +AC_ARG_ENABLE(zlib, +[AS_HELP_STRING([--disable-zlib], [disable zlib compression support @<:@default=auto@:>@])]) +AC_MSG_RESULT($enable_zlib) + AC_MSG_CHECKING(for file formats in man section 5) AC_ARG_ENABLE(fsect-man5, [ --enable-fsect-man5 enable file formats in man section 5], @@ -84,7 +89,9 @@ AC_CHECK_HEADERS(stdint.h fcntl.h locale AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h) AC_CHECK_HEADERS(getopt.h err.h xlocale.h signal.h) AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h) -AC_CHECK_HEADERS(zlib.h) +if test "$enable_zlib" != "no"; then + AC_CHECK_HEADERS(zlib.h) +fi AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[ #ifdef HAVE_SIGNAL_H #include @@ -148,7 +155,9 @@ dnl Provide implementation of some requi AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r localtime_r gmtime_r pread strcasestr fmtcheck dprintf) dnl Checks for libraries -AC_CHECK_LIB(z,gzopen) +if test "$enable_zlib" != "no"; then + AC_CHECK_LIB(z, gzopen) +fi if test "$MINGW" = 1; then AC_CHECK_LIB(gnurx,regexec,,AC_MSG_ERROR([libgnurx is required to build file(1) with MinGW])) fi @@ -156,5 +165,14 @@ fi dnl See if we are cross-compiling AM_CONDITIONAL(IS_CROSS_COMPILE, test "$cross_compiling" = yes) +dnl Final sanity checks +if test "$enable_zlib" = "yes"; then + if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then + AC_MSG_ERROR([zlib support requested but not found]) + fi +elif test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then + AC_DEFINE([ZLIBSUPPORT], 1, [Enable zlib compression support]) +fi + AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile]) AC_OUTPUT Modified: stable/9/contrib/file/doc/file.man ============================================================================== --- stable/9/contrib/file/doc/file.man Mon Jul 25 03:58:19 2016 (r303285) +++ stable/9/contrib/file/doc/file.man Mon Jul 25 05:33:19 2016 (r303286) @@ -1,4 +1,4 @@ -.\" $File: file.man,v 1.120 2016/03/31 17:51:12 christos Exp $ +.\" $File: file.man,v 1.121 2016/06/07 22:09:20 rrt Exp $ .Dd March 13, 2016 .Dt FILE __CSECTION__ .Os @@ -213,6 +213,9 @@ Prints ELF file details. Consults magic files. .It tar Examines tar files. +.It text +A synonym for +.Sq ascii . .El .It Fl Fl extension Print a slash-separated list of valid extensions for the file type found. Copied: stable/9/contrib/file/magic/Magdir/ber (from r302221, head/contrib/file/magic/Magdir/ber) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/file/magic/Magdir/ber Mon Jul 25 05:33:19 2016 (r303286, copy of r302221, head/contrib/file/magic/Magdir/ber) @@ -0,0 +1,65 @@ + +#------------------------------------------------------------------------------ +# $File: ber,v 1.1 2016/06/05 00:21:30 christos Exp $ +# ber: file(1) magic for several BER formats used in the mobile +# telecommunications industry (Georg Sauthoff) + +# The file formats are standardized by the GSMA (GSM association). +# They are specified via ASN.1 schemas and some prose. Basic encoding +# rules (BER) is the used encoding. The formats are used for exchanging +# call data records (CDRs) between mobile operators and associated +# parties for roaming clearing purposes and fraud detection. + +# The magic file covers: + +# - TAP files (TD.57) - CDR batches and notifications +# - RAP files (TD.32) - return batches and acknowledgements +# - NRT files (TD.35) - CDR batches for 'near real time' processing + +# +# TAP 3 Files +# TAP -> Transferred Account Procedure +# cf. http://www.gsma.com/newsroom/wp-content/uploads/TD.57-v32.31.pdf +# TransferBatch short tag +0 byte 0x61 +# BatchControlInfo short tag +>&1 search/b5 \x64 +# Sender long tag #TAP 3.x (BER encoded) +>>&1 search/b8 \x5f\x81\x44 +# 3 block +>>>&64 search/b64 \x5f\x81\x49\x01\x03\x5f\x81\x3d\x01 +>>>>&0 byte x TAP 3.%d Batch (TD.57, Transferred Account) + +# Notification short tag +0 byte 0x62 +# Sender long tag +>2 search/b8 \x5f\x81\x44 +# 3 block +>>&64 search/b64 \x5f\x81\x49\x01\x03\x5f\x81\x3d\x01 +>>>&0 byte x TAP 3.%d Notification (TD.57, Transferred Account) + + +# NRT Files +# NRT a.k.a. NRTRDE +0 byte 0x61 +# 2 block +>&1 search/b8 \x5f\x29\x01\x02\x5f\x25\x01 +>>&0 byte x NRT 2.%d (TD.35, Near Real Time Roaming Data Exchange) + +# RAP Files +# cf. http://www.gsma.com/newsroom/wp-content/uploads/TD.32-v6.11.pdf +# Long ReturnBatch tag +0 string \x7f\x84\x16 +# Long RapBatchControlInfo tag +>&1 search/b8 \x7f\x84\x19 +# 3 block +>>&64 search/b64 \x5f\x81\x49\x01\x03\x5f\x81\x3d\x01 +# 1 block +>>>&1 string/b \x5f\x84\x20\x01\x01\x5f\x84\x1f\x01 +>>>>&0 byte x RAP 1.%d Batch (TD.32, Returned Account Procedure), +>>>&0 byte x TAP 3.%d + +# Long Acknowledgement tag +0 string \x7f\x84\x17 +# Long Sender tag +>&1 search/b5 \x5f\x81\x44 RAP Acknowledgement (TD.32, Returned Account Procedure) Modified: stable/9/contrib/file/magic/Magdir/c-lang ============================================================================== --- stable/9/contrib/file/magic/Magdir/c-lang Mon Jul 25 03:58:19 2016 (r303285) +++ stable/9/contrib/file/magic/Magdir/c-lang Mon Jul 25 05:33:19 2016 (r303286) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: c-lang,v 1.22 2015/10/29 18:49:11 christos Exp $ +# $File: c-lang,v 1.23 2016/05/21 14:28:27 christos Exp $ # c-lang: file(1) magic for C and related languages programs # # The strength is to beat standard HTML @@ -38,7 +38,8 @@ !:strength + 30 !:mime text/x-c++ 0 regex \^class[\ \t\n]+ C++ source text -!:strength + 30 +# But class is reduced to avoid beating php (Jens Schleusener) +!:strength + 13 !:mime text/x-c++ 0 regex \^public: C++ source text !:strength + 30 Modified: stable/9/contrib/file/magic/Magdir/console ============================================================================== --- stable/9/contrib/file/magic/Magdir/console Mon Jul 25 03:58:19 2016 (r303285) +++ stable/9/contrib/file/magic/Magdir/console Mon Jul 25 05:33:19 2016 (r303286) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: console,v 1.25 2016/04/18 20:22:10 christos Exp $ +# $File: console,v 1.26 2016/06/12 15:20:37 christos Exp $ # Console game magic # Toby Deshane @@ -56,6 +56,32 @@ >4 lelong <16 UNIF v%d format NES ROM image #------------------------------------------------------------------------------ +# fds: file(1) magic for Famciom Disk System disk images +# Reference: http://wiki.nesdev.com/w/index.php/Family_Computer_Disk_System#.FDS_format +# From: David Korth +# TODO: Check "Disk info block" and get info from that in addition to the optional header. + +# Disk info block. (block 1) +0 name nintendo-fds-disk-info-block +>1 string *NINTENDO-HVC* Famicom Disk System disk image: +>23 byte !1 FMC- +>23 byte 1 FSC- +>16 string x \b%.3s +>15 byte x \b, mfr 0x%02X +>20 byte x (Rev.%02u) + +# Headered version. +0 string FDS\x1A +>0x11 string *NINTENDO-HVC* +>>0x10 use nintendo-fds-disk-info-block +>4 byte 1 (%u side) +>4 byte !1 (%u sides) + +# Unheadered version. +1 string *NINTENDO-HVC* +>0 use nintendo-fds-disk-info-block + +#------------------------------------------------------------------------------ # gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format # Reference: http://gbdev.gg8.se/wiki/articles/The_Cartridge_Header # @@ -569,6 +595,15 @@ 0x1C belong 0xC2339F3D Nintendo GameCube disc image: >0 use nintendo-gcn-disc-common +# Type: Nintendo GameCube embedded disc image +# Commonly found on demo discs. +# From: David Korth +# Reference: http://hitmen.c02.at/files/yagcd/yagcd/index.html#idx14.8 +0 belong 0xAE0F38A2 +>0x0C belong 0x00100000 +>>(8.L+0x1C) belong 0xC2339F3D Nintendo GameCube embedded disc image: +>>>(8.L) use nintendo-gcn-disc-common + # Type: Nintendo Wii disc image # From: David Korth # Reference: http://wiibrew.org/wiki/Wii_Disc @@ -586,22 +621,15 @@ # Nintendo 3DS file formats. # -# Type: Nintendo 3DS "NCCH" header. -# Contained within either a CXI executable or an NCSD image. -# From: David Korth -# Reference: https://www.3dbrew.org/wiki/NCCH -0 name nintendo-3ds-NCCH ->0x100 string NCCH ->>0x150 string >\0 \b: "%.16s" ->>0x112 leshort x (v%u) ->>0x18C byte 2 (New3DS only) - # Type: Nintendo 3DS "NCSD" image. (game cards and eMMC) # From: David Korth # Reference: https://www.3dbrew.org/wiki/NCSD 0x100 string NCSD >0x118 lequad 0 Nintendo 3DS Game Card image ->>0x1000 use nintendo-3ds-NCCH +# NCCH header for partition 0. (game data) +>>0x1150 string >\0 \b: "%.16s" +>>0x312 byte x (Rev.%02u) +>>0x118C byte 2 (New3DS only) >>0x18D byte 0 (inner device) >>0x18D byte 1 (Card1) >>0x18D byte 2 (Card2) @@ -609,12 +637,74 @@ >0x118 bequad 0x0102020202000000 Nintendo 3DS eMMC dump (Old3DS) >0x118 bequad 0x0102020203000000 Nintendo 3DS eMMC dump (New3DS) +# Nintendo 3DS version code. +# Reference: https://www.3dbrew.org/wiki/Titles +# Format: leshort containing three fields: +# - 6-bit: Major +# - 6-bit: Minor +# - 4-bit: Revision +# NOTE: Only supporting major/minor versions from 0-15 right now. +# NOTE: Should be prefixed with "v". +0 name nintendo-3ds-version-code +# Raw version. +>0 leshort x \b%u, +# Major version. +>0 leshort&0xFC00 0x0000 0 +>0 leshort&0xFC00 0x0400 1 +>0 leshort&0xFC00 0x0800 2 +>0 leshort&0xFC00 0x0C00 3 +>0 leshort&0xFC00 0x1000 4 +>0 leshort&0xFC00 0x1400 5 +>0 leshort&0xFC00 0x1800 6 +>0 leshort&0xFC00 0x1C00 7 +>0 leshort&0xFC00 0x2000 8 +>0 leshort&0xFC00 0x2400 9 +>0 leshort&0xFC00 0x2800 10 +>0 leshort&0xFC00 0x2C00 11 +>0 leshort&0xFC00 0x3000 12 +>0 leshort&0xFC00 0x3400 13 +>0 leshort&0xFC00 0x3800 14 +>0 leshort&0xFC00 0x3C00 15 +# Minor version. +>0 leshort&0x03F0 0x0000 \b.0 +>0 leshort&0x03F0 0x0010 \b.1 +>0 leshort&0x03F0 0x0020 \b.2 +>0 leshort&0x03F0 0x0030 \b.3 +>0 leshort&0x03F0 0x0040 \b.4 +>0 leshort&0x03F0 0x0050 \b.5 +>0 leshort&0x03F0 0x0060 \b.6 +>0 leshort&0x03F0 0x0070 \b.7 +>0 leshort&0x03F0 0x0080 \b.8 +>0 leshort&0x03F0 0x0090 \b.9 +>0 leshort&0x03F0 0x00A0 \b.10 +>0 leshort&0x03F0 0x00B0 \b.11 +>0 leshort&0x03F0 0x00C0 \b.12 +>0 leshort&0x03F0 0x00D0 \b.13 +>0 leshort&0x03F0 0x00E0 \b.14 +>0 leshort&0x03F0 0x00F0 \b.15 +# Revision. +>0 leshort&0x000F x \b.%u + # Type: Nintendo 3DS "NCCH" container. # https://www.3dbrew.org/wiki/NCCH -0x100 string NCCH Nintendo 3DS ->0x18D byte&2 0 File Archive (CFA) ->0x18D byte&2 2 Executable Image (CXI) ->0 use nintendo-3ds-NCCH +0x100 string NCCH Nintendo 3DS +>0x18D byte&2 0 File Archive (CFA) +>0x18D byte&2 2 Executable Image (CXI) +>0x150 string >\0 \b: "%.16s" +>0x18D byte 0x05 +>>0x10E leshort x (Old3DS System Update v +>>0x10E use nintendo-3ds-version-code +>>0x10E leshort x \b) +>0x18D byte 0x15 +>>0x10E leshort x (New3DS System Update v +>>0x10E use nintendo-3ds-version-code +>>0x10E leshort x \b) +>0x18D byte !0x05 +>>0x18D byte !0x15 +>>>0x112 byte x (v +>>>0x112 use nintendo-3ds-version-code +>>>0x112 byte x \b) +>0x18C byte 2 (New3DS only) # Type: Nintendo 3DS "SMDH" file. (application description) # From: David Korth Copied: stable/9/contrib/file/magic/Magdir/coverage (from r302221, head/contrib/file/magic/Magdir/coverage) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/file/magic/Magdir/coverage Mon Jul 25 05:33:19 2016 (r303286, copy of r302221, head/contrib/file/magic/Magdir/coverage) @@ -0,0 +1,91 @@ + +#------------------------------------------------------------------------------ +# $File: coverage,v 1.1 2016/06/05 00:26:32 christos Exp $ +# xoverage: file(1) magic for test coverage data + +# File formats used to store test coverage data +# 2016-05-21, Georg Sauthoff + + +# - GCC gcno - written by GCC at compile time when compiling with +# gcc -ftest-coverage +# - GCC gcda - written by a program that was compiled with +# gcc -fprofile-arcs +# - LLVM raw profiles - generated by a program compiled with +# clang -fprofile-instr-generate -fcoverage-mapping ... +# - LLVM indexed profiles - generated by +# llvm-profdata +# - GCOV reports, i.e. the annotated source code +# - LCOV trace files, i.e. aggregated GCC profiles +# +# GCC coverage tracefiles +# .gcno file are created during compile time, +# while data collected during runtime is stored in .gcda files +# cf. gcov-io.h +# https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Gcov-Data-Files.html +# Examples: +# Fedora 23/x86-64/gcc-5.3.1: 6f 6e 63 67 52 33 30 35 +# Debian 8 PPC64/gcc-4.9.2 : 67 63 6e 6f 34 30 39 2a +0 lelong 0x67636e6f GCC gcno coverage (-ftest-coverage), +>&3 byte x version %c. +>&1 byte x \b%c + +# big endian +0 belong 0x67636e6f GCC gcno coverage (-ftest-coverage), +>&0 byte x version %c. +>&2 byte x \b%c (big-endian) + +# Examples: +# Fedora 23/x86-64/gcc-5.3.1: 61 64 63 67 52 33 30 35 +# Debian 8 PPC64/gcc-4.9.2 : 67 63 64 61 34 30 39 2a +0 lelong 0x67636461 GCC gcda coverage (-fprofile-arcs), +>&3 byte x version %c. +>&1 byte x \b%c + +# big endian +0 belong 0x67636461 GCC gcda coverage (-fprofile-arcs), +>&0 byte x version %c. +>&2 byte x \b%c (big-endian) + + +# LCOV tracefiles +# cf. http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php +0 string TN: +>&0 search/64 \nSF:/ LCOV coverage tracefile + + +# Coverage reports generated by gcov +# i.e. source code annoted with coverage information +0 string \x20\x20\x20\x20\x20\x20\x20\x20-:\x20\x20\x20\ 0:Source: +>&0 search/128 \x20\x20\x20\x20\x20\x20\x20\x20-:\x20\x20\x20\ 0:Graph: +>>&0 search/128 \x20\x20\x20\x20\x20\x20\x20\x20-:\x20\x20\x20\ 0:Data: GCOV coverage report + + +# LLVM coverage files + +# raw data after running a program compiled with: +# `clang -fprofile-instr-generate -fcoverage-mapping ...` +# default name: default.profraw +# magic is: \xFF lprofr \x81 +# cf. http://llvm.org/docs/doxygen/html/InstrProfData_8inc_source.html +0 lequad 0xff6c70726f667281 LLVM raw profile data, +>&0 byte x version %d + +# big endian +0 bequad 0xff6c70726f667281 LLVM raw profile data, +>&7 byte x version %d (big-endian) + + +# LLVM indexed instruction profile (as generated by llvm-profdata) +# magic is: reverse(\xFF lprofi \x81) +# cf. http://llvm.org/docs/CoverageMappingFormat.html +# http://llvm.org/docs/doxygen/html/namespacellvm_1_1IndexedInstrProf.html +# http://llvm.org/docs/CommandGuide/llvm-cov.html +# http://llvm.org/docs/CommandGuide/llvm-profdata.html +0 lequad 0x8169666f72706cff LLVM indexed profile data, +>&0 byte x version %d + +# big endian +0 bequad 0x8169666f72706cff LLVM indexed profile data, +>&7 byte x version %d (big-endian) + Modified: stable/9/contrib/file/magic/Magdir/database ============================================================================== --- stable/9/contrib/file/magic/Magdir/database Mon Jul 25 03:58:19 2016 (r303285) +++ stable/9/contrib/file/magic/Magdir/database Mon Jul 25 05:33:19 2016 (r303286) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: database,v 1.48 2016/04/14 20:34:28 christos Exp $ +# $File: database,v 1.49 2016/06/11 17:01:51 christos Exp $ # database: file(1) magic for various databases # # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk) @@ -611,3 +611,14 @@ !:ext pan # database name >>>5 pstring x \b, "%s" + +# +# +# askSam Database by Stefan A. Haubenthal +0 string askw40\0 askSam DB + +# +# +# MUIbase Database Tool by Stefan A. Haubenthal +0 string MBSTV\040 MUIbase DB +>6 string x version %s Modified: stable/9/contrib/file/magic/Magdir/elf ============================================================================== --- stable/9/contrib/file/magic/Magdir/elf Mon Jul 25 03:58:19 2016 (r303285) +++ stable/9/contrib/file/magic/Magdir/elf Mon Jul 25 05:33:19 2016 (r303286) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: elf,v 1.69 2015/06/16 17:23:08 christos Exp $ +# $File: elf,v 1.70 2016/06/02 12:36:30 christos Exp $ # elf: file(1) magic for ELF executables # # We have to check the byte order flag to see what byte order all the @@ -301,25 +301,23 @@ >>0 use elf-le >5 byte 2 MSB >>0 use \^elf-le -# Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed -# like proper ELF, but extracting the string had bad results. ->4 byte <0x80 ->>8 string >\0 (%s) ->8 string \0 ->>7 byte 0 (SYSV) ->>7 byte 1 (HP-UX) ->>7 byte 2 (NetBSD) ->>7 byte 3 (GNU/Linux) ->>7 byte 4 (GNU/Hurd) ->>7 byte 5 (86Open) ->>7 byte 6 (Solaris) ->>7 byte 7 (Monterey) ->>7 byte 8 (IRIX) ->>7 byte 9 (FreeBSD) ->>7 byte 10 (Tru64) ->>7 byte 11 (Novell Modesto) ->>7 byte 12 (OpenBSD) ->8 string \2 ->>7 byte 13 (OpenVMS) ->>7 byte 97 (ARM) ->>7 byte 255 (embedded) +>7 byte 0 (SYSV) +>7 byte 1 (HP-UX) +>7 byte 2 (NetBSD) +>7 byte 3 (GNU/Linux) +>7 byte 4 (GNU/Hurd) +>7 byte 5 (86Open) +>7 byte 6 (Solaris) +>7 byte 7 (Monterey) +>7 byte 8 (IRIX) +>7 byte 9 (FreeBSD) +>7 byte 10 (Tru64) +>7 byte 11 (Novell Modesto) +>7 byte 12 (OpenBSD) +>7 byte 13 (OpenVMS) +>7 byte 14 (HP NonStop Kernel) +>7 byte 15 (AROS Research Operating System) +>7 byte 16 (FenixOS) +>7 byte 17 (Nuxi CloudABI) +>7 byte 97 (ARM) +>7 byte 255 (embedded) Modified: stable/9/contrib/file/magic/Magdir/msdos ============================================================================== --- stable/9/contrib/file/magic/Magdir/msdos Mon Jul 25 03:58:19 2016 (r303285) +++ stable/9/contrib/file/magic/Magdir/msdos Mon Jul 25 05:33:19 2016 (r303286) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: msdos,v 1.105 2016/03/03 18:58:14 christos Exp $ +# $File: msdos,v 1.106 2016/06/11 00:52:14 christos Exp $ # msdos: file(1) magic for MS-DOS files # @@ -633,47 +633,86 @@ 0 string/b \102\101\050\000\000\000\056\000\000\000\000\000\000\000 Icon for MS Windows # Windows icons -0 name ico-dir -# not entirely accurate, the number of icons is part of the header ->0 byte 1 - 1 icon ->0 ubyte >1 - %d icons ->2 byte 0 \b, 256x ->2 byte !0 \b, %dx ->3 byte 0 \b256 ->3 byte !0 \b%d ->4 ubyte !0 \b, %d colors - +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/CUR_(file_format) +# Note: similiar to Windows CURsor. container for BMP (only DIB part) or PNG 0 belong 0x00000100 >9 byte 0 ->>0 byte x MS Windows icon resource -!:mime image/x-icon ->>4 use ico-dir +>>0 byte x +>>0 use cur-ico-dir >9 ubyte 0xff ->>0 byte x MS Windows icon resource -!:mime image/x-icon ->>4 use ico-dir +>>0 byte x +>>0 use cur-ico-dir +# displays number of icons and information for icon or cursor +0 name cur-ico-dir +# skip some Lotus 1-2-3 worksheets, CYCLE.PIC and keep Windows cursors with +# 1st data offset = dir header size + n * dir entry size = 6 + n * 10h = ?6h +>18 ulelong &0x00000006 +# skip remaining worksheets, because valid only for DIB image (40) or PNG image (\x89PNG) +>>(18.l) ulelong x MS Windows +>>>0 ubelong 0x00000100 icon resource +#!:mime image/vnd.microsoft.icon +!:mime image/x-icon +!:ext ico +>>>>4 uleshort x - %d icon +# plural s +>>>>4 uleshort >1 \bs +# 1st icon +>>>>0x06 use ico-entry +# 2nd icon +>>>>4 uleshort >1 +>>>>>0x16 use ico-entry +>>>0 ubelong 0x00000200 cursor resource +#!:mime image/x-cur +!:mime image/x-win-bitmap +!:ext cur +>>>>4 uleshort x - %d icon +>>>>4 uleshort >1 \bs +# 1st cursor +>>>>0x06 use cur-entry +#>>>>0x16 use cur-entry +# display information of one cursor entry +0 name cur-entry +>0 use cur-ico-entry +>4 uleshort x \b, hotspot @%dx +>6 uleshort x \b%d +# display information of one icon entry +0 name ico-entry +>0 use cur-ico-entry +# normally 0 1 but also found 14 +>4 uleshort >1 \b, %d planes +# normally 0 1 but also found some 3, 4, some 6, 8, 24, many 32, two 256 +>6 uleshort >1 \b, %d bits/pixel +# display shared information of cursor or icon entry +0 name cur-ico-entry +>0 byte =0 \b, 256x +>0 byte !0 \b, %dx +>1 byte =0 \b256 +>1 byte !0 \b%d +# number of colors in palette +>2 ubyte !0 \b, %d colors +# reserved 0 FFh +#>3 ubyte x \b, reserved %x +#>8 ulelong x \b, image size %d +# offset of PNG or DIB image +#>12 ulelong x \b, offset 0x%x +# PNG header (\x89PNG) +>(12.l) ubelong =0x89504e47 +>>&-4 indirect x \b with +# DIB image +>(12.l) ubelong !0x89504e47 +#>>&-4 use dib-image # Windows non-animated cursors -0 name cur-dir -# not entirely accurate, the number of icons is part of the header ->0 byte 1 - 1 icon ->0 ubyte >1 - %d icons ->2 byte 0 \b, 256x ->2 byte !0 \b, %dx ->3 byte 0 \b256 ->3 byte !0 \b%d ->6 uleshort x \b, hotspot @%dx ->8 uleshort x \b%d - +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/CUR_(file_format) +# Note: similiar to Windows ICOn. container for BMP ( only DIB part) +# GRR: line below is too general as it catches also Lotus 1-2-3 files 0 belong 0x00000200 >9 byte 0 ->>0 byte x MS Windows cursor resource -!:mime image/x-cur ->>4 use cur-dir +>>0 use cur-ico-dir >9 ubyte 0xff ->>0 byte x MS Windows cursor resource -!:mime image/x-cur ->>4 use cur-dir +>>0 use cur-ico-dir # .chr files 0 string/b PK\010\010BGI Borland font Modified: stable/9/contrib/file/magic/Magdir/msx ============================================================================== --- stable/9/contrib/file/magic/Magdir/msx Mon Jul 25 03:58:19 2016 (r303285) +++ stable/9/contrib/file/magic/Magdir/msx Mon Jul 25 05:33:19 2016 (r303286) @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------ # msx: file(1) magic for the MSX Home Computer -# v1.1 +# v1.3 # Fabio R. Schmidlin ############## MSX Music file formats ############## @@ -99,34 +99,6 @@ >>5 uleshort 0 >>>3 uleshort >0x013D MSX Graph Saurus compressed image -# Maki-chan Graphic format -0 string/b MAKI02\ \ Maki-chan image, ->8 byte x system ID: %c ->9 byte x \b%c ->10 byte x \b%c ->11 byte x \b%c, ->13 search/0x200 \x1A -# >>&3 ubyte 0 , video mode: PC-98 400 lines, 16 analog colors -# >>&3 ubyte 1 , video mode: MSX SC7, 16 analog colors -# >>&3 ubyte 2 , video mode: VM-98 400 lines, 8 analog colors -# >>&3 ubyte 3 , video mode: PC-88 analog, 200 lines, 8 analog colors -# >>&3 ubyte 4 , video mode: 400 lines, 16 digital colors -# >>&3 ubyte 5 , video mode: 200 lines, 16 digital colors -# >>&3 ubyte 6 , video mode: old PC-98 digital 400 lines, 8 colors -# >>&3 ubyte 7 , video mode: PC-88 400 lines, 8 digital colors ->>&8 uleshort+1 x %dx ->>&10 uleshort+1 x \b%d, ->>&3 ubyte&0x82 0x80 256 colors ->>&3 ubyte&0x82 0x00 16 colors ->>&3 ubyte&0x82 0x01 8 colors ->>&3 ubyte&0x04 4 digital ->>&3 ubyte&0x04 0 analog ->>&3 ubyte&0x01 1 \b, 2:1 dot aspect ratio - -# Japanese PIC file -0 string/b PIC\x1A ->4 lelong 0 Japanese PIC image file - # MSX G9B image file 0 string/b G9B >1 uleshort 11 @@ -146,70 +118,152 @@ ############## Other MSX file formats ############## -# MSX ROMs +# MSX internal ROMs +0 ubeshort 0xF3C3 +>2 uleshort <0x4000 +>>8 ubyte 0xC3 +>>>9 uleshort <0x4000 +>>>>0x0B ubeshort 0x00C3 +>>>>>0x0D uleshort <0x4000 +>>>>>>0x0F ubeshort 0x00C3 +>>>>>>>0x11 uleshort <0x4000 +>>>>>>>>0x13 ubeshort 0x00C3 +>>>>>>>>>0x15 uleshort <0x4000 +>>>>>>>>>>0x50 ubyte 0xC3 +>>>>>>>>>>>0x51 uleshort <0x4000 +>>>>>>>>>>>>(9.s) ubyte 0xC3 +>>>>>>>>>>>>>&0 uleshort >0x4000 +>>>>>>>>>>>>>>&0 ubyte 0xC3 MSX BIOS+BASIC +>>>>>>>>>>>>>>>0x002D ubyte+1 <3 \b. version=MSX%d +>>>>>>>>>>>>>>>0x002D ubyte 2 \b, version=MSX2+ +>>>>>>>>>>>>>>>0x002D ubyte 3 \b, version=MSX Turbo-R +>>>>>>>>>>>>>>>0x002D ubyte >3 \b, version=Unknown MSX %d version +>>>>>>>>>>>>>>>0x0006 ubyte x \b, VDP.DR=0x%2x +>>>>>>>>>>>>>>>0x0007 ubyte x \b, VDP.DW=0x%2x +>>>>>>>>>>>>>>>0x002B ubyte&0xF 0 \b, charset=Japanese +>>>>>>>>>>>>>>>0x002B ubyte&0xF 1 \b, charset=International +>>>>>>>>>>>>>>>0x002B ubyte&0xF 2 \b, charset=Korean +>>>>>>>>>>>>>>>0x002B ubyte&0xF >2 \b, charset=Unknown id:%d +>>>>>>>>>>>>>>>0x002B ubyte&0x70 0x00 \b, date format=Y-M-D +>>>>>>>>>>>>>>>0x002B ubyte&0x70 0x10 \b, date format=M-D-Y +>>>>>>>>>>>>>>>0x002B ubyte&0x70 0x20 \b, date format=D-M-Y +>>>>>>>>>>>>>>>0x002B ubyte&0x80 0x00 \b, vfreq=60Hz +>>>>>>>>>>>>>>>0x002B ubyte&0x80 0x80 \b, vfreq=50Hz +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 0 \b, keyboard=Japanese +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 1 \b, keyboard=International +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 2 \b, keyboard=French +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 3 \b, keyboard=UK +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 4 \b, keyboard=German +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 5 \b, keyboard=Unknown id:%d +>>>>>>>>>>>>>>>0x002C ubyte&0x0F 6 \b, keyboard=Spanish +>>>>>>>>>>>>>>>0x002C ubyte&0x0F >6 \b, keyboard=Unknown id:%d +>>>>>>>>>>>>>>>0x002C ubyte&0xF0 0x00 \b, basic=Japanese +>>>>>>>>>>>>>>>0x002C ubyte&0xF0 0x10 \b, basic=International +>>>>>>>>>>>>>>>0x002C ubyte&0xF0 >0x10 \b, basic=Unknown id:%d +>>>>>>>>>>>>>>>0x002E ubyte&1 1 \b, built-in MIDI + + +0 string/b CD +>2 uleshort >0x10 +>>2 uleshort <0x4000 +>>>4 uleshort <0x4000 +>>>>6 uleshort <0x4000 +>>>>>8 ubyte 0xC3 +>>>>>>9 uleshort <0x4000 +>>>>>>>0x10 ubyte 0xC3 +>>>>>>>>0x11 uleshort <0x4000 +>>>>>>>>>0x14 ubyte 0xC3 +>>>>>>>>>>0x15 uleshort <0x4000 MSX2/2+/TR SubROM + +0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 +>0x5F0 ubequad 0x8282828244380000 +>>0x150 ubyte 0x38 +>>>0x170 string \20\20\20 +>>>>0x1E32 string ()) +>>>>>0x2130 ubequad 0xA5A5594924231807 +>>>>>0x2138 ubequad 0x4A4A3424488830C0 MSX Kanji Font + + + +# MSX extension ROMs 0 string/b AB >2 uleshort 0x0010 MSX ROM >>2 uleshort x \b, init=0x%4x ->>4 uleshort >0 \b, stat=0x%4x ->>6 uleshort >0 \b, dev=0x%4x +>>4 uleshort >0 \b, stahdl=0x%4x +>>6 uleshort >0 \b, devhdl=0x%4x >>8 uleshort >0 \b, bas=0x%4x >2 uleshort 0x4010 MSX ROM >>2 uleshort x \b, init=0x%04x ->>4 uleshort >0 \b, stat=0x%04x ->>6 uleshort >0 \b, dev=0x%04x +>>4 uleshort >0 \b, stahdl=0x%04x +>>6 uleshort >0 \b, devhdl=0x%04x >>8 uleshort >0 \b, bas=0x%04x >2 uleshort 0x8010 MSX ROM >>2 uleshort x \b, init=0x%04x ->>4 uleshort >0 \b, stat=0x%04x ->>6 uleshort >0 \b, dev=0x%04x +>>4 uleshort >0 \b, stahdl=0x%04x +>>6 uleshort >0 \b, devhdl=0x%04x >>8 uleshort >0 \b, bas=0x%04x +0 string/b AB\0\0 +>6 uleshort 0 +>>4 uleshort >0x400F MSX-BASIC extension ROM +>>>4 uleshort >0 \b, stahdl=0x%04x +>>>6 uleshort >0 \b, devhdl=0x%04x +>>>0x1C string OPLL \b, MSX-Music +>>>>0x18 string PAC2 \b (external) +>>>>0x18 string APRL \b (internal) + +0 string/b AB\0\0\0\0 +>6 uleshort >0x400F MSX device BIOS +>>6 uleshort >0 \b, devhdl=0x%04x + 0 string/b AB #>2 string 5JSuperLAYDOCK MSX Super Laydock ROM #>3 string @HYDLIDE3MSX MSX Hydlide-3 ROM #>3 string @3\x80IA862 Golvellius MSX1 ROM ->2 uleshort >10 ->>10 string \0\0\0\0\0\0 MSX ROM ->>>0x10 string YZ\0\0\0\0 Konami Game Master 2 MSX ROM ->>>0x10 string CD \b, Konami RC- ->>>>0x12 ubyte x \b%d ->>>>0x13 ubyte/16 x \b%d ->>>>0x13 ubyte&0xF x \b%d ->>>0x10 string EF \b, Konami RC- *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jul 25 07:02:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8C5DB9B9A2 for ; Mon, 25 Jul 2016 07:02:58 +0000 (UTC) (envelope-from blueform@comineurope.org) Received: from s31.linuxpl.com (s31.linuxpl.com [136.243.82.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C72C1C62 for ; Mon, 25 Jul 2016 07:02:57 +0000 (UTC) (envelope-from blueform@comineurope.org) Received: from blueform by s31.linuxpl.com with local (Exim 4.87) (envelope-from ) id 1bRZEk-0003iI-GV for svn-src-all@freebsd.org; Mon, 25 Jul 2016 08:19:34 +0200 To: svn-src-all@freebsd.org Subject: Problems with item delivery, n.000472356 X-PHP-Script: comineurope.org/post.php for 64.71.32.11 Date: Mon, 25 Jul 2016 08:19:34 +0200 From: "FedEx Ground" Reply-To: "FedEx Ground" Message-ID: <04c40d1ea57bc39ddca4863e128e2917@comineurope.org> X-Priority: 3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 07:02:58 -0000 Dear Customer, We could not deliver your item. You can review complete details of your order in the find attached. Yours sincerely, Samuel Logan, Sr. Delivery Agent. From owner-svn-src-all@freebsd.org Mon Jul 25 08:13:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D6CFBA3EDF; Mon, 25 Jul 2016 08:13:51 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CB8F1AAD; Mon, 25 Jul 2016 08:13:51 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6P8DoHp006896; Mon, 25 Jul 2016 08:13:50 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6P8DoAl006895; Mon, 25 Jul 2016 08:13:50 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201607250813.u6P8DoAl006895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Mon, 25 Jul 2016 08:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303287 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 08:13:51 -0000 Author: julian Date: Mon Jul 25 08:13:50 2016 New Revision: 303287 URL: https://svnweb.freebsd.org/changeset/base/303287 Log: Split MAKE_SYSENT into two parts so that the initializer part can be used separately if one wants to embed the sysent into a larger structure. MFC after: 1 week Modified: head/sys/sys/sysent.h Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Mon Jul 25 05:33:19 2016 (r303286) +++ head/sys/sys/sysent.h Mon Jul 25 08:13:50 2016 (r303287) @@ -175,13 +175,21 @@ struct syscall_module_data { int flags; /* flags for syscall_register */ }; -#define MAKE_SYSENT(syscallname) \ -static struct sysent syscallname##_sysent = { \ - (sizeof(struct syscallname ## _args ) \ +/* separate initialization vector so it can be used in a substructure */ +#define SYSENT_INIT_VALS(_syscallname) { \ + .sy_narg = (sizeof(struct _syscallname ## _args ) \ / sizeof(register_t)), \ - (sy_call_t *)& sys_##syscallname, \ - SYS_AUE_##syscallname \ -} + .sy_call = (sy_call_t *)&sys_##_syscallname, \ + .sy_auevent = SYS_AUE_##_syscallname, \ + .sy_systrace_args_func = NULL, \ + .sy_entry = 0, \ + .sy_return = 0, \ + .sy_flags = 0, \ + .sy_thrcnt = 0 \ +} + +#define MAKE_SYSENT(syscallname) \ +static struct sysent syscallname##_sysent = SYSENT_INIT_VALS(syscallname); #define MAKE_SYSENT_COMPAT(syscallname) \ static struct sysent syscallname##_sysent = { \ From owner-svn-src-all@freebsd.org Mon Jul 25 09:12:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A59B4BA4E55; Mon, 25 Jul 2016 09:12:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F3F21753; Mon, 25 Jul 2016 09:12:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6P9C8mi028517; Mon, 25 Jul 2016 09:12:08 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6P9C8wq028516; Mon, 25 Jul 2016 09:12:08 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201607250912.u6P9C8wq028516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 25 Jul 2016 09:12:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303288 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 09:12:09 -0000 Author: ae Date: Mon Jul 25 09:12:08 2016 New Revision: 303288 URL: https://svnweb.freebsd.org/changeset/base/303288 Log: Do not invoke resize method if geom is being withered. PR: 211028 MFC after: 2 weeks Modified: head/sys/geom/geom_subr.c Modified: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Mon Jul 25 08:13:50 2016 (r303287) +++ head/sys/geom/geom_subr.c Mon Jul 25 09:12:08 2016 (r303288) @@ -636,7 +636,7 @@ g_resize_provider_event(void *arg, int f LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, cp2) { gp = cp->geom; - if (gp->resize != NULL) + if ((gp->flags & G_GEOM_WITHER) == 0 && gp->resize != NULL) gp->resize(cp); } From owner-svn-src-all@freebsd.org Mon Jul 25 11:25:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5473ABA399B; Mon, 25 Jul 2016 11:25:35 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11B9B1AAE; Mon, 25 Jul 2016 11:25:34 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PBPY1n076838; Mon, 25 Jul 2016 11:25:34 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PBPYWa076837; Mon, 25 Jul 2016 11:25:34 GMT (envelope-from des@FreeBSD.org) Message-Id: <201607251125.u6PBPYWa076837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Mon, 25 Jul 2016 11:25:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303289 - head/sbin/geom/class/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 11:25:35 -0000 Author: des Date: Mon Jul 25 11:25:33 2016 New Revision: 303289 URL: https://svnweb.freebsd.org/changeset/base/303289 Log: Rewrite the GPT and MBR examples. For GPT, ensure that the boot partition is large enough for gptzfsboot, which has doubled in size since 10. PR: 211361 MFC after: 3 days Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Mon Jul 25 09:12:08 2016 (r303288) +++ head/sbin/geom/class/part/gpart.8 Mon Jul 25 11:25:33 2016 (r303289) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 10, 2015 +.Dd July 25, 2016 .Dt GPART 8 .Os .Sh NAME @@ -1193,86 +1193,112 @@ Otherwise the values will be left unchan .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. .Sh EXAMPLES -Create a GPT scheme on -.Pa ada0 : +The examples below assume that the disk's logical block size is 512 +bytes, regardless of its physical block size. +.Ss GPT +In this example, we will format +.Pa ada0 +with the GPT scheme and create boot, swap and root partitions. +First, we need to create the partition table: .Bd -literal -offset indent /sbin/gpart create -s GPT ada0 .Ed .Pp -Embed GPT bootstrap code into a protective MBR: +Next, we install a protective MBR with the first-stage bootstrap code. +The protective MBR lists a single, bootable partition spanning the +entire disk, thus allowing non-GPT-aware BIOSes to boot from the disk +and preventing tools which do not understand the GPT scheme from +considering the disk to be unformatted. .Bd -literal -offset indent /sbin/gpart bootcode -b /boot/pmbr ada0 .Ed .Pp -Create a dedicated +We then create a dedicated .Cm freebsd-boot -partition that can boot +partition to hold the second-stage boot loader, which will load the .Fx -from a -.Cm freebsd-ufs -partition, and install bootstrap code into it. +kernel and modules from a UFS or ZFS filesystem. This partition must be larger than the bootstrap code .Po -usually either +either .Pa /boot/gptboot -or +for UFS or .Pa /boot/gptzfsboot +for ZFS .Pc , but smaller than 545 kB since the first-stage loader will load the entire partition into memory during boot, regardless of how much data it actually contains. -This example uses 88 blocks (44 kB) so the next partition will be -aligned on a 64 kB boundary without the need to specify an explicit -offset or alignment. -The boot partition itself is aligned on a 4 kB boundary. +We create a 472-block (236 kB) boot partition at offset 40, which is +the size of the partition table (34 blocks or 17 kB) rounded up to the +nearest 4 kB boundary. .Bd -literal -offset indent -/sbin/gpart add -b 40 -s 88 -t freebsd-boot ada0 +/sbin/gpart add -b 40 -s 472 -t freebsd-boot ada0 /sbin/gpart bootcode -p /boot/gptboot -i 1 ada0 .Ed .Pp -Create a 512MB-sized +We now create a 4 GB swap partition at the first available offset, +which is 40 + 472 = 512 blocks (256 kB). +.Bd -literal -offset indent +/sbin/gpart add -s 4G -t freebsd-swap ada0 +.Ed +.Pp +Aligning the swap partition and all subsequent partitions on a 256 kB +boundary ensures optimal performance on a wide range of media, from +plain old disks with 512-byte blocks, through modern +.Dq advanced format +disks with 4096-byte physical blocks, to RAID volumes with stripe +sizes of up to 256 kB. +.Pp +Finally, we create and format an 8 GB .Cm freebsd-ufs -partition to contain a UFS filesystem from which the system can boot. +partition for the root filesystem, leaving the rest of the slice free +for additional filesystems: .Bd -literal -offset indent -/sbin/gpart add -s 512M -t freebsd-ufs ada0 +/sbin/gpart add -s 8G -t freebsd-ufs ada0 +/sbin/newfs -Uj /dev/ada0p3 .Ed +.Ss MBR +In this example, we will format +.Pa ada0 +with the MBR scheme and create a single partition which we subdivide +using a traditional +.Bx +disklabel. .Pp -Create an MBR scheme on -.Pa ada0 , -then create a 30GB-sized -.Fx -slice, mark it active and -install the -.Nm boot0 -boot manager: +First, we create the partition table and a single 64 GB partition, +then we mark that partition active (bootable) and install the +first-stage boot loader: .Bd -literal -offset indent /sbin/gpart create -s MBR ada0 -/sbin/gpart add -t freebsd -s 30G ada0 +/sbin/gpart add -t freebsd -s 64G ada0 /sbin/gpart set -a active -i 1 ada0 /sbin/gpart bootcode -b /boot/boot0 ada0 .Ed .Pp -Now create a -.Bx -scheme -.Pf ( Bx -label) with space for up to 20 partitions: +Next, we create a disklabel in that partition +.Po +.Dq slice +in disklabel terminology +.Pc +with room for up to 20 partitions: .Bd -literal -offset indent /sbin/gpart create -s BSD -n 20 ada0s1 .Ed .Pp -Create a 1GB-sized UFS partition and a 4GB-sized swap partition: +We then create an 8 GB root partition and a 4 GB swap partition: .Bd -literal -offset indent -/sbin/gpart add -t freebsd-ufs -s 1G ada0s1 +/sbin/gpart add -t freebsd-ufs -s 8G ada0s1 /sbin/gpart add -t freebsd-swap -s 4G ada0s1 .Ed .Pp -Install bootstrap code for the +Finally, we install the appropriate boot loader for the .Bx label: .Bd -literal -offset indent /sbin/gpart bootcode -b /boot/boot ada0s1 .Ed +.Ss VTOC8 .Pp Create a VTOC8 scheme on .Pa da0 : @@ -1298,6 +1324,7 @@ After creating all required partitions, .Bd -literal -offset indent /sbin/gpart bootcode -p /boot/boot1 da0 .Ed +.Ss Backup and Restore .Pp Create a backup of the partition table from .Pa da0 : From owner-svn-src-all@freebsd.org Mon Jul 25 11:42:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3BC2BA3D98; Mon, 25 Jul 2016 11:42:44 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: from mail-pf0-x22d.google.com (mail-pf0-x22d.google.com [IPv6:2607:f8b0:400e:c00::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 A128D13A1; Mon, 25 Jul 2016 11:42:44 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: by mail-pf0-x22d.google.com with SMTP id x72so63541585pfd.2; Mon, 25 Jul 2016 04:42:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Jv0NnXwhzRLHxp8dSXZjMLaXsBReGknnCYg7+0VITfU=; b=X2NvHZZ2x02DGubYvhQAZmhKnoTzEMQaTvir4LWFgkrLhogRB4Rw+Xbhg0qDSp1mEY enru0Y9gDU07wow3JdAIocA84nt318LDMOyJxft3sfX2dJQecsG1fmXkqbeUMynWfHiE nZgavBlBHV9vSWEWr/cNXoS5ZLuKBK23hJry7qZXogBDEWtDScEPNtHeuFhozzw7hUZU hiCQt7j1ZzUDLzqRpiAEDA4LHC6NHSj4UivIh4niSAiCsQmHIIgbjRP5iic6XiR+MFNT Cjit4PC/LictbaDiHvX8g4kZtNccpSsXURaKcLr79/mfkYVdkJE5o0OD1P8ks4IweQiN Jypw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Jv0NnXwhzRLHxp8dSXZjMLaXsBReGknnCYg7+0VITfU=; b=OzZr6NzpO3So1jAh3WaWAbErdvkJq98unJLRuThD2osuslXEa5AFLcXporZtSPV930 WGW+32LYFafowytshffCkDMWPZkd3O0UTYSHKL3YA8rhbw1gE8RvBFTxGGKBCNi52/sg vLqe4YhKCpB8mnY26BW007u3I4o46dq8SPorE+pVhdhyLrZ3MnXywiMrgdjZsTodUpf1 r5Jz4+YBlK8hxv2jtZw7uJkyu+wAx2cVqu+azj22cspOA1iozUDsqOCBcKkDwzQFF89L 2OgBi1vLNWZaL1z1YHcKSm0YgY+Kkh3ibpkybzjpxigHU+Qbb1QW2QC+DIMBFKIH3ztG pxrA== X-Gm-Message-State: AEkoousT4boUF1xjdRiuWdVDRxXWQbPnN2VAqNPzgoU3xtTWe9h3tbTbceaZnInH72fjRQBtEtQNT5fkib5eBA== X-Received: by 10.98.43.68 with SMTP id r65mr28599657pfr.148.1469446964083; Mon, 25 Jul 2016 04:42:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.5.67 with HTTP; Mon, 25 Jul 2016 04:42:43 -0700 (PDT) In-Reply-To: <20160724204431.GM1076@FreeBSD.org> References: <201607241035.u6OAZijR023467@repo.freebsd.org> <76ecf576-3b05-9a58-9c58-6b45f49b7286@freebsd.org> <20160724204431.GM1076@FreeBSD.org> From: Michael Zhilin Date: Mon, 25 Jul 2016 14:42:43 +0300 Message-ID: Subject: Re: svn commit: r303264 - head/usr.bin/calendar/calendars/ru_RU.UTF-8 To: Gleb Smirnoff Cc: Andrey Chernov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 11:42:44 -0000 SGkgR2xlYiwgQW5kcmV5LA0KDQpDb3VsZCB5b3UgcGxlYXNlIGZpeCBvbmUgbW9yZSBsaW5lIGlu DQp1c3IuYmluL2NhbGVuZGFyL2NhbGVuZGFycy9ydV9SVS5VVEYtOC9jYWxlbmRhci5jb21tb246 DQogPj4gNyDQvdC+0Y/QsS4gICAg0JTQtdC90Ywg0L7QutGCLtGP0LHRgNGM0YHQutC+0Lkg0YDQ tdCy0L7Qu9GO0YbQuNC4IDE5MTcg0LPQvtC00LANCg0KQlRXLCB0aGUgbGluZSBvZiAidXNyLmJp bi9jYWxlbmRhci9jYWxlbmRhcnMvcnVfUlUuVVRGLTgvY2FsZW5kYXIubWlsaXRhcnkiDQpwcm9i YWJseSBoYXMgaW5jb3JyZWN0IGRhdGU6DQogPj4gNyDQvdC+0Y/QsS4gICAg0JTQtdC90Ywg0L7R gdCy0L7QsdC+0LbQtNC10L3QuNGPINCc0L7RgdC60LLRiyDRgdC40LvQsNC80Lgg0L3QsNGA0L7Q tNC90L7Qs9C+INC+0L/QvtC70YfQtdC90LjRjyDQv9C+0LQNCtGA0YPQutC+0LLQvtC00YHRgtCy 0L7QvCDQmtGD0LfRjNC80Ysg0JzQuNC90LjQvdCwINC4INCU0LzQuNGC0YDQuNGPINCf0L7QttCw 0YDRgdC60L7Qs9C+INC+0YIg0L/QvtC70YzRgdC60LjRhSDQuNC90YLQtdGA0LLQtdC90YLQvtCy DQooMTYxMiDQs9C+0LQpDQoNCkkgc3VwcG9zZSBpdCBzaG91bGQgYmUgNHRoIG9mIE5vdmVtYmVy IDopDQoNClRoYW5rIHlvdSwNCiAgTWljaGFlbCENCg0KMjAxNi0wNy0yNCAyMzo0NCBHTVQrMDM6 MDAgR2xlYiBTbWlybm9mZiA8Z2xlYml1c0BmcmVlYnNkLm9yZz46DQoNCj4gICBBbmRyZXksDQo+ DQo+ICAgdGhhbmtzLCBJIHdpbGwgZml4IHRoYXQuIFRydXN0aW5nIHNjcmlwdCBhbmQgbm90IGNo ZWNraW5nIHJlc3VsdHMgd2FzDQo+IHN0dXBpZC4NCj4NCj4gT24gU3VuLCBKdWwgMjQsIDIwMTYg YXQgMDY6MTY6MjZQTSArMDMwMCwgQW5kcmV5IENoZXJub3Ygd3JvdGU6DQo+IEE+IFdoYXQgaGFw cGVucyB3aXRoIHRoZSBsaW5lcyBiZWxvdz8NCj4gQT4NCj4gQT4gT24gMjQuMDcuMjAxNiAxMzoz NSwgR2xlYiBTbWlybm9mZiB3cm90ZToNCj4gQT4gPiBNb2RpZmllZDoNCj4gaGVhZC91c3IuYmlu L2NhbGVuZGFyL2NhbGVuZGFycy9ydV9SVS5VVEYtOC9jYWxlbmRhci5vcnRob2RveA0KPiBBPiA+ IC3Qn9Cw0YHRhdCwLTcgICDQktGF0L7QtCDQk9C+0YHQv9C+0LTQtdC90Ywg0LIg0JjQtdGA0YPR gdCw0LvQuNC8LiDQktC10YDQsdC90L7QtSDQktC+0YHQutGA0LXRgdC10L3RjNC1DQo+IEE+ID4g K9Cf0LDRgdGF0LAtNyAgINCS0YXQvtC0INCT0L7RgdC/0L7QtNC10L3RjCDQsiDQmNC10YDRg9GB 0LDQu9C40LwuINCS0LXRgNCx0L3QvtC1INCS0L7RgdC60YDQtdGB0LXQvdGCLtGM0LUNCj4gQT4g PiAr0J/QsNGB0YXQsCAgICAg0JLQvtGB0LrRgNC10YHQtdC90YIu0LjQtSDQpdGA0LjRgdGC0L7Q stC+DQo+IEE+ID4gK9Cf0LDRgdGF0LArMzkgINCS0L7Qt9C90LXRgdC10L3Rgi7QuNC1DQo+IEE+ DQo+IEE+ID4gTW9kaWZpZWQ6IGhlYWQvdXNyLmJpbi9jYWxlbmRhci9jYWxlbmRhcnMvcnVfUlUu VVRGLTgvY2FsZW5kYXIucGFnYW4NCj4gQT4gPiAtMTQg0LzQsNGAICAgINCd0L7QstGL0Lkg0JPQ vtC0LCDQntCy0YHQtdC90Ywg0LzQsNC70YvQuQ0KPiBBPiA+ICsxNCDQvNCw0YDRgtCwICDQndC+ 0LLRi9C5INCT0L7QtCwg0J7QstGB0LXQvdGCLtGMINC80LDQu9GL0LkNCj4gQT4gPiAtMjAg0LzQ sNGAKiAgINCS0LXRgdC10L3QvdC40LUg0YDQsNCy0L3QvtC00LXQvdGB0YLQstC40LUNCj4gQT4g PiAtIDcg0LDQv9GAICAgINCU0LXQvdGMINCc0LDRgNC10L3RiyAo0YHQtNCy0LjQvdGD0YLQvtC1 INCy0LXRgdC10L3QvdC10LUg0YDQsNCy0L3QvtC00LXQvdGB0YLQstC40LUpDQo+IEE+ID4gKzIw INC80LDRgNGC0LAqINCS0LXRgdC10L3Rgi7QvdC40LUg0YDQsNCy0L3QvtC00LXQvdGB0YLQstC4 0LUNCj4gQT4gPiArIDcg0LDQv9GALiAgINCU0LXQvdGMINCc0LDRgNC10L3RiyAo0YHQtNCy0LjQ vdGD0YLQvtC1INCy0LXRgdC10L3Rgi7QvdC10LUg0YDQsNCy0L3QvtC00LXQvdGB0YLQstC40LUp DQo+IEE+ID4gKyA2INC80LDRjyAgICDQlNC10L3RjCDQlNCw0LbRjNCx0L7Qs9CwLCDQntCy0YHQ tdC90YIu0Ywg0LHQvtC70YzRiNC+0LkNCj4gQT4NCj4NCj4gLS0NCj4gVG90dXMgdHV1cywgR2xl Yml1cy4NCj4NCj4NCg== From owner-svn-src-all@freebsd.org Mon Jul 25 13:29:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B0D7BA3FBE; Mon, 25 Jul 2016 13:29:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 163C41206; Mon, 25 Jul 2016 13:29:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PDSxMP020854; Mon, 25 Jul 2016 13:28:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PDSxHe020852; Mon, 25 Jul 2016 13:28:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607251328.u6PDSxHe020852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 25 Jul 2016 13:28:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303290 - in stable/11/sys: kern vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 13:29:00 -0000 Author: kib Date: Mon Jul 25 13:28:59 2016 New Revision: 303290 URL: https://svnweb.freebsd.org/changeset/base/303290 Log: MFC r302567: In vgonel(), postpone setting BO_DEAD until VOP_RECLAIM() is called, if vnode is VMIO. For VMIO vnodes, set BO_DEAD in vm_object_terminate(). MFC r302580: Fix grammar. Approved by: re (gjb) Modified: stable/11/sys/kern/vfs_subr.c stable/11/sys/vm/vm_object.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_subr.c ============================================================================== --- stable/11/sys/kern/vfs_subr.c Mon Jul 25 11:25:33 2016 (r303289) +++ stable/11/sys/kern/vfs_subr.c Mon Jul 25 13:28:59 2016 (r303290) @@ -3232,7 +3232,13 @@ vgonel(struct vnode *vp) TAILQ_EMPTY(&vp->v_bufobj.bo_clean.bv_hd) && vp->v_bufobj.bo_clean.bv_cnt == 0, ("vp %p bufobj not invalidated", vp)); - vp->v_bufobj.bo_flag |= BO_DEAD; + + /* + * For VMIO bufobj, BO_DEAD is set in vm_object_terminate() + * after the object's page queue is flushed. + */ + if (vp->v_bufobj.bo_object == NULL) + vp->v_bufobj.bo_flag |= BO_DEAD; BO_UNLOCK(&vp->v_bufobj); /* Modified: stable/11/sys/vm/vm_object.c ============================================================================== --- stable/11/sys/vm/vm_object.c Mon Jul 25 11:25:33 2016 (r303289) +++ stable/11/sys/vm/vm_object.c Mon Jul 25 13:28:59 2016 (r303290) @@ -741,6 +741,10 @@ vm_object_terminate(vm_object_t object) vinvalbuf(vp, V_SAVE, 0, 0); + BO_LOCK(&vp->v_bufobj); + vp->v_bufobj.bo_flag |= BO_DEAD; + BO_UNLOCK(&vp->v_bufobj); + VM_OBJECT_WLOCK(object); } From owner-svn-src-all@freebsd.org Mon Jul 25 13:31:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 694FFBA40F9; Mon, 25 Jul 2016 13:31:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A10F1517; Mon, 25 Jul 2016 13:31:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PDVI0Q021571; Mon, 25 Jul 2016 13:31:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PDVIPV021569; Mon, 25 Jul 2016 13:31:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607251331.u6PDVIPV021569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 25 Jul 2016 13:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303291 - in stable/10/sys: kern vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 13:31:19 -0000 Author: kib Date: Mon Jul 25 13:31:18 2016 New Revision: 303291 URL: https://svnweb.freebsd.org/changeset/base/303291 Log: MFC r302567: In vgonel(), postpone setting BO_DEAD until VOP_RECLAIM() is called, if vnode is VMIO. For VMIO vnodes, set BO_DEAD in vm_object_terminate(). MFC r302580: Fix grammar. Modified: stable/10/sys/kern/vfs_subr.c stable/10/sys/vm/vm_object.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Mon Jul 25 13:28:59 2016 (r303290) +++ stable/10/sys/kern/vfs_subr.c Mon Jul 25 13:31:18 2016 (r303291) @@ -2934,7 +2934,13 @@ vgonel(struct vnode *vp) TAILQ_EMPTY(&vp->v_bufobj.bo_clean.bv_hd) && vp->v_bufobj.bo_clean.bv_cnt == 0, ("vp %p bufobj not invalidated", vp)); - vp->v_bufobj.bo_flag |= BO_DEAD; + + /* + * For VMIO bufobj, BO_DEAD is set in vm_object_terminate() + * after the object's page queue is flushed. + */ + if (vp->v_bufobj.bo_object == NULL) + vp->v_bufobj.bo_flag |= BO_DEAD; BO_UNLOCK(&vp->v_bufobj); /* Modified: stable/10/sys/vm/vm_object.c ============================================================================== --- stable/10/sys/vm/vm_object.c Mon Jul 25 13:28:59 2016 (r303290) +++ stable/10/sys/vm/vm_object.c Mon Jul 25 13:31:18 2016 (r303291) @@ -737,6 +737,10 @@ vm_object_terminate(vm_object_t object) vinvalbuf(vp, V_SAVE, 0, 0); + BO_LOCK(&vp->v_bufobj); + vp->v_bufobj.bo_flag |= BO_DEAD; + BO_UNLOCK(&vp->v_bufobj); + VM_OBJECT_WLOCK(object); } From owner-svn-src-all@freebsd.org Mon Jul 25 14:16:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D665BA4A7A; Mon, 25 Jul 2016 14:16:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4BBB1C3F; Mon, 25 Jul 2016 14:16:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEGSKH038883; Mon, 25 Jul 2016 14:16:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEGSts038882; Mon, 25 Jul 2016 14:16:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607251416.u6PEGSts038882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jul 2016 14:16:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303292 - stable/11/contrib/libcxxrt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:16:30 -0000 Author: emaste Date: Mon Jul 25 14:16:28 2016 New Revision: 303292 URL: https://svnweb.freebsd.org/changeset/base/303292 Log: MFC r303157: libcxxrt: add padding in __cxa_allocate_* to fix alignment The addition of the referenceCount to __cxa_allocate_exception put the unwindHeader at offset 0x58 in __cxa_exception, but it requires 16-byte alignment. In order to avoid changing the current __cxa_exception ABI (and thus breaking its consumers), add explicit padding in the allocation routines (and account for it when freeing). This is intended as a lower-risk change for FreeBSD 11. A "more correct" fix should be prepared for upstream and -CURRENT. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/libcxxrt/exception.cc Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libcxxrt/exception.cc ============================================================================== --- stable/11/contrib/libcxxrt/exception.cc Mon Jul 25 13:31:18 2016 (r303291) +++ stable/11/contrib/libcxxrt/exception.cc Mon Jul 25 14:16:28 2016 (r303292) @@ -572,6 +572,19 @@ static void free_exception(char *e) } } +#ifdef __LP64__ +/** + * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte + * alignment but it was broken by the addition of the referenceCount. + * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep + * compatibility with consumers of the broken __cxa_exception, explicitly add + * padding on allocation (and account for it on free). + */ +static const int exception_alignment_padding = 8; +#else +static const int exception_alignment_padding = 0; +#endif + /** * Allocates an exception structure. Returns a pointer to the space that can * be used to store an object of thrown_size bytes. This function will use an @@ -580,16 +593,19 @@ static void free_exception(char *e) */ extern "C" void *__cxa_allocate_exception(size_t thrown_size) { - size_t size = thrown_size + sizeof(__cxa_exception); + size_t size = exception_alignment_padding + sizeof(__cxa_exception) + + thrown_size; char *buffer = alloc_or_die(size); - return buffer+sizeof(__cxa_exception); + return buffer + exception_alignment_padding + sizeof(__cxa_exception); } extern "C" void *__cxa_allocate_dependent_exception(void) { - size_t size = sizeof(__cxa_dependent_exception); + size_t size = exception_alignment_padding + + sizeof(__cxa_dependent_exception); char *buffer = alloc_or_die(size); - return buffer+sizeof(__cxa_dependent_exception); + return buffer + exception_alignment_padding + + sizeof(__cxa_dependent_exception); } /** @@ -617,7 +633,8 @@ extern "C" void __cxa_free_exception(voi } } - free_exception(reinterpret_cast(ex)); + free_exception(reinterpret_cast(ex) - + exception_alignment_padding); } static void releaseException(__cxa_exception *exception) @@ -644,7 +661,8 @@ void __cxa_free_dependent_exception(void { releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception(reinterpret_cast(ex)); + free_exception(reinterpret_cast(ex) - + exception_alignment_padding); } /** From owner-svn-src-all@freebsd.org Mon Jul 25 14:26:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C3B2BA4C5F; Mon, 25 Jul 2016 14:26:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8CEC12CC; Mon, 25 Jul 2016 14:26:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEQX5g042846; Mon, 25 Jul 2016 14:26:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEQXKV042845; Mon, 25 Jul 2016 14:26:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607251426.u6PEQXKV042845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jul 2016 14:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303293 - stable/10/lib/libcxxrt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:26:35 -0000 Author: emaste Date: Mon Jul 25 14:26:33 2016 New Revision: 303293 URL: https://svnweb.freebsd.org/changeset/base/303293 Log: MFC r302278: libcxxrt: correct mangled "typeinfo name" symbols in Version.map r261644 (MFC of r260553) added missing C++ typinfos to libcxxrt's version script. It appears that a number of duplicate mangled symbols were added due to a cut and paste error. Switch the second instances to _ZTS*, typeinfo name for *. Found by lld, which produces an error or warning for duplicate symbols. Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libcxxrt/Version.map Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcxxrt/Version.map ============================================================================== --- stable/10/lib/libcxxrt/Version.map Mon Jul 25 14:16:28 2016 (r303292) +++ stable/10/lib/libcxxrt/Version.map Mon Jul 25 14:26:33 2016 (r303293) @@ -209,19 +209,19 @@ CXXABI_1.3 { "typeinfo name for void*"; "typeinfo name for unsigned int*"; "typeinfo name for float*"; - # C++11 typeinfo not understood by our linker + # C++11 typeinfo name not understood by our linker # std::nullptr_t - _ZTSDn;_ZTIPDn;_ZTIPKDn; + _ZTSDn;_ZTSPDn;_ZTSPKDn; # char16_t - _ZTSDi;_ZTIPDi;_ZTIPKDi; + _ZTSDi;_ZTSPDi;_ZTSPKDi; # char32_t - _ZTSDs;_ZTIPDs;_ZTIPKDs; + _ZTSDs;_ZTSPDs;_ZTSPKDs; # IEEE 754r decimal floating point - _ZTSDd;_ZTIPDd;_ZTIPKDd; - _ZTSDe;_ZTIPDe;_ZTIPKDe; - _ZTSDf;_ZTIPDf;_ZTIPKDf; + _ZTSDd;_ZTSPDd;_ZTSPKDd; + _ZTSDe;_ZTSPDe;_ZTSPKDe; + _ZTSDf;_ZTSPDf;_ZTSPKDf; # IEEE 754r half-precision floating point - _ZTSDh;_ZTIPDh;_ZTIPKDh; + _ZTSDh;_ZTSPDh;_ZTSPKDh; "typeinfo name for __cxxabiv1::__array_type_info"; "typeinfo name for __cxxabiv1::__class_type_info"; From owner-svn-src-all@freebsd.org Mon Jul 25 14:28:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58943BA4D12; Mon, 25 Jul 2016 14:28:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AFF214D0; Mon, 25 Jul 2016 14:28:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PESodI042981; Mon, 25 Jul 2016 14:28:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PESo3s042980; Mon, 25 Jul 2016 14:28:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607251428.u6PESo3s042980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jul 2016 14:28:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303294 - stable/10/sys/boot/efi/boot1 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:28:51 -0000 Author: emaste Date: Mon Jul 25 14:28:50 2016 New Revision: 303294 URL: https://svnweb.freebsd.org/changeset/base/303294 Log: MFC r302335: boot1.efi: fix assignment / comparison expression PR: 210706 Submitted by: David Binderman Modified: stable/10/sys/boot/efi/boot1/boot1.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/efi/boot1/boot1.c ============================================================================== --- stable/10/sys/boot/efi/boot1/boot1.c Mon Jul 25 14:26:33 2016 (r303293) +++ stable/10/sys/boot/efi/boot1/boot1.c Mon Jul 25 14:28:50 2016 (r303294) @@ -629,7 +629,7 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_T case EFI_BUFFER_TOO_SMALL: (void)bs->FreePool(handles); if ((status = bs->AllocatePool(EfiLoaderData, hsize, - (void **)&handles) != EFI_SUCCESS)) { + (void **)&handles)) != EFI_SUCCESS) { panic("Failed to allocate %zu handles (%lu)", hsize / sizeof(*handles), EFI_ERROR_CODE(status)); } From owner-svn-src-all@freebsd.org Mon Jul 25 14:35:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 611FDBA4F12; Mon, 25 Jul 2016 14:35:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B2F919A2; Mon, 25 Jul 2016 14:35:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEZEQx046537; Mon, 25 Jul 2016 14:35:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEZE3C046535; Mon, 25 Jul 2016 14:35:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607251435.u6PEZE3C046535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jul 2016 14:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303295 - stable/10/usr.bin/ar X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:35:15 -0000 Author: emaste Date: Mon Jul 25 14:35:14 2016 New Revision: 303295 URL: https://svnweb.freebsd.org/changeset/base/303295 Log: MFC r301974: ar: enable reproducible output by default when invoked as 'ar -s' ar output is already deterministic by default for ar -q and ar -r, and when invoked as ranlib. Make ar -s equivalent to ranlib and enable deterministic output by default in that case too. PR: 210330 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/ar/ar.1 stable/10/usr.bin/ar/ar.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ar/ar.1 ============================================================================== --- stable/10/usr.bin/ar/ar.1 Mon Jul 25 14:28:50 2016 (r303294) +++ stable/10/usr.bin/ar/ar.1 Mon Jul 25 14:35:14 2016 (r303295) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 24, 2015 +.Dd July 25, 2016 .Dt AR 1 .Os .Sh NAME @@ -205,7 +205,12 @@ When used in combination with the .Fl r or .Fl q -option, insert 0's instead of the real mtime, uid and gid values +option, +with the +.Fl s +option without other options, or when invoked as +.Nm ranlib , +insert 0's instead of the real mtime, uid and gid values and 0644 instead of file mode from the members named by arguments .Ar . This ensures that checksums on the resulting archives are reproducible Modified: stable/10/usr.bin/ar/ar.c ============================================================================== --- stable/10/usr.bin/ar/ar.c Mon Jul 25 14:28:50 2016 (r303294) +++ stable/10/usr.bin/ar/ar.c Mon Jul 25 14:35:14 2016 (r303295) @@ -283,7 +283,8 @@ main(int argc, char **argv) } /* Set determinstic mode for -D, and by default without -U. */ - if (Dflag || (Uflag == 0 && (bsdar->mode == 'q' || bsdar->mode == 'r'))) + if (Dflag || (Uflag == 0 && (bsdar->mode == 'q' || bsdar->mode == 'r' || + (bsdar->mode == '\0' && bsdar->options & AR_S)))) bsdar->options |= AR_D; if (bsdar->options & AR_A) From owner-svn-src-all@freebsd.org Mon Jul 25 14:35:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6522BA4F80; Mon, 25 Jul 2016 14:35:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 870271B01; Mon, 25 Jul 2016 14:35:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEZmgg046618; Mon, 25 Jul 2016 14:35:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEZmR4046617; Mon, 25 Jul 2016 14:35:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607251435.u6PEZmR4046617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 25 Jul 2016 14:35:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303296 - stable/11/usr.bin/mail X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:35:49 -0000 Author: delphij Date: Mon Jul 25 14:35:48 2016 New Revision: 303296 URL: https://svnweb.freebsd.org/changeset/base/303296 Log: MFC r302542: Use _PATH_DEVNULL instead of hardcoding. Approved by: re (kib) Modified: stable/11/usr.bin/mail/collect.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mail/collect.c ============================================================================== --- stable/11/usr.bin/mail/collect.c Mon Jul 25 14:35:14 2016 (r303295) +++ stable/11/usr.bin/mail/collect.c Mon Jul 25 14:35:48 2016 (r303296) @@ -339,9 +339,9 @@ cont: int nullfd, tempfd, rc; char tempname2[PATHSIZE]; - if ((nullfd = open("/dev/null", O_RDONLY, 0)) + if ((nullfd = open(_PATH_DEVNULL, O_RDONLY, 0)) == -1) { - warn("/dev/null"); + warn(_PATH_DEVNULL); break; } From owner-svn-src-all@freebsd.org Mon Jul 25 14:36:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12878BA3049; Mon, 25 Jul 2016 14:36:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D905F1C94; Mon, 25 Jul 2016 14:36:56 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEaugv046710; Mon, 25 Jul 2016 14:36:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEau7O046709; Mon, 25 Jul 2016 14:36:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607251436.u6PEau7O046709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jul 2016 14:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303297 - stable/10/sys/boot/efi/boot1 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:36:57 -0000 Author: emaste Date: Mon Jul 25 14:36:55 2016 New Revision: 303297 URL: https://svnweb.freebsd.org/changeset/base/303297 Log: MFC r297871: boot1.efifat: provide a fallback startup.nsh In case the firmware falls through to executing startup.sh, populate it with the name of our boot loader. In normal operation this should not be necessary but may allow the system to boot if it would otherwise just remain at a shell prompt. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/boot/efi/boot1/generate-fat.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/efi/boot1/generate-fat.sh ============================================================================== --- stable/10/sys/boot/efi/boot1/generate-fat.sh Mon Jul 25 14:35:48 2016 (r303296) +++ stable/10/sys/boot/efi/boot1/generate-fat.sh Mon Jul 25 14:36:55 2016 (r303297) @@ -41,6 +41,8 @@ mkdir -p stub/efi/boot # Make a dummy file for boot1 echo 'Boot1 START' | dd of=stub/efi/boot/$FILENAME cbs=$BOOT1_SIZE count=1 conv=block +# Provide a fallback startup.nsh +echo $FILENAME > stub/efi/boot/startup.nsh umount stub mdconfig -d -u $DEVICE From owner-svn-src-all@freebsd.org Mon Jul 25 14:45:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47865BA332B; Mon, 25 Jul 2016 14:45:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19693136F; Mon, 25 Jul 2016 14:45:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEjmSB050344; Mon, 25 Jul 2016 14:45:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEjmOp050343; Mon, 25 Jul 2016 14:45:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607251445.u6PEjmOp050343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 25 Jul 2016 14:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303298 - head/usr.bin/bsdiff/bspatch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:45:49 -0000 Author: delphij Date: Mon Jul 25 14:45:48 2016 New Revision: 303298 URL: https://svnweb.freebsd.org/changeset/base/303298 Log: Fix bspatch heap overflow vulnerability. Obtained from: Chromium Reported by: Lu Tung-Pin Security: FreeBSD-SA-16:25.bspatch Modified: head/usr.bin/bsdiff/bspatch/bspatch.c Modified: head/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- head/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 14:36:55 2016 (r303297) +++ head/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 14:45:48 2016 (r303298) @@ -164,6 +164,10 @@ int main(int argc,char * argv[]) } /* Sanity-check */ + if ((ctrl[0] < 0) || (ctrl[1] < 0)) + errx(1,"Corrupt patch\n"); + + /* Sanity-check */ if(newpos+ctrl[0]>newsize) errx(1,"Corrupt patch\n"); From owner-svn-src-all@freebsd.org Mon Jul 25 14:49:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8C94BA33CD; Mon, 25 Jul 2016 14:49:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A59CD15C5; Mon, 25 Jul 2016 14:49:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEnF81050509; Mon, 25 Jul 2016 14:49:15 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEnFmL050508; Mon, 25 Jul 2016 14:49:15 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607251449.u6PEnFmL050508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 25 Jul 2016 14:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303299 - head/sys/arm64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:49:16 -0000 Author: andrew Date: Mon Jul 25 14:49:15 2016 New Revision: 303299 URL: https://svnweb.freebsd.org/changeset/base/303299 Log: Enable the generic OHCI driver on arm64 Obtained from: ABT Systems Ltd MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Mon Jul 25 14:45:48 2016 (r303298) +++ head/sys/arm64/conf/GENERIC Mon Jul 25 14:49:15 2016 (r303299) @@ -130,6 +130,7 @@ device pl011 # USB support options USB_DEBUG # enable debug msgs device dwcotg # DWC OTG controller +device ohci # OHCI PCI->USB interface device xhci # XHCI PCI->USB interface (USB 3.0) device usb # USB Bus (required) device ukbd # Keyboard From owner-svn-src-all@freebsd.org Mon Jul 25 14:52:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6A96BA34A5; Mon, 25 Jul 2016 14:52:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 990181A63; Mon, 25 Jul 2016 14:52:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEqCnd054009; Mon, 25 Jul 2016 14:52:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEqC4t054008; Mon, 25 Jul 2016 14:52:12 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607251452.u6PEqC4t054008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 25 Jul 2016 14:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303300 - stable/11/usr.bin/bsdiff/bspatch X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:52:13 -0000 Author: delphij Date: Mon Jul 25 14:52:12 2016 New Revision: 303300 URL: https://svnweb.freebsd.org/changeset/base/303300 Log: Fix bspatch heap overflow vulnerability. Obtained from: Chromium Reported by: Lu Tung-Pin Security: FreeBSD-SA-16:25.bspatch Approved by: re (so@ blanket) Modified: stable/11/usr.bin/bsdiff/bspatch/bspatch.c Modified: stable/11/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- stable/11/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 14:49:15 2016 (r303299) +++ stable/11/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 14:52:12 2016 (r303300) @@ -164,6 +164,10 @@ int main(int argc,char * argv[]) } /* Sanity-check */ + if ((ctrl[0] < 0) || (ctrl[1] < 0)) + errx(1,"Corrupt patch\n"); + + /* Sanity-check */ if(newpos+ctrl[0]>newsize) errx(1,"Corrupt patch\n"); From owner-svn-src-all@freebsd.org Mon Jul 25 14:53:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90B7BBA3615; Mon, 25 Jul 2016 14:53:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FE331CE4; Mon, 25 Jul 2016 14:53:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEr40R054240; Mon, 25 Jul 2016 14:53:04 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEr4gv054239; Mon, 25 Jul 2016 14:53:04 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607251453.u6PEr4gv054239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 25 Jul 2016 14:53:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r303301 - in stable: 10/usr.bin/bsdiff/bspatch 9/usr.bin/bsdiff/bspatch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:53:05 -0000 Author: delphij Date: Mon Jul 25 14:53:04 2016 New Revision: 303301 URL: https://svnweb.freebsd.org/changeset/base/303301 Log: Fix bspatch heap overflow vulnerability. Obtained from: Chromium Reported by: Lu Tung-Pin Security: FreeBSD-SA-16:25.bspatch Modified: stable/9/usr.bin/bsdiff/bspatch/bspatch.c Changes in other areas also in this revision: Modified: stable/10/usr.bin/bsdiff/bspatch/bspatch.c Modified: stable/9/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- stable/9/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 14:52:12 2016 (r303300) +++ stable/9/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 14:53:04 2016 (r303301) @@ -155,6 +155,10 @@ int main(int argc,char * argv[]) }; /* Sanity-check */ + if ((ctrl[0] < 0) || (ctrl[1] < 0)) + errx(1,"Corrupt patch\n"); + + /* Sanity-check */ if(newpos+ctrl[0]>newsize) errx(1,"Corrupt patch\n"); From owner-svn-src-all@freebsd.org Mon Jul 25 14:53:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6C1BBA361B; Mon, 25 Jul 2016 14:53:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 961BF1CE6; Mon, 25 Jul 2016 14:53:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEr4BP054246; Mon, 25 Jul 2016 14:53:04 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEr4VJ054245; Mon, 25 Jul 2016 14:53:04 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607251453.u6PEr4VJ054245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 25 Jul 2016 14:53:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303301 - in stable: 10/usr.bin/bsdiff/bspatch 9/usr.bin/bsdiff/bspatch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:53:05 -0000 Author: delphij Date: Mon Jul 25 14:53:04 2016 New Revision: 303301 URL: https://svnweb.freebsd.org/changeset/base/303301 Log: Fix bspatch heap overflow vulnerability. Obtained from: Chromium Reported by: Lu Tung-Pin Security: FreeBSD-SA-16:25.bspatch Modified: stable/10/usr.bin/bsdiff/bspatch/bspatch.c Changes in other areas also in this revision: Modified: stable/9/usr.bin/bsdiff/bspatch/bspatch.c Modified: stable/10/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- stable/10/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 14:52:12 2016 (r303300) +++ stable/10/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 14:53:04 2016 (r303301) @@ -155,6 +155,10 @@ int main(int argc,char * argv[]) }; /* Sanity-check */ + if ((ctrl[0] < 0) || (ctrl[1] < 0)) + errx(1,"Corrupt patch\n"); + + /* Sanity-check */ if(newpos+ctrl[0]>newsize) errx(1,"Corrupt patch\n"); From owner-svn-src-all@freebsd.org Mon Jul 25 15:03:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39460BA38E9; Mon, 25 Jul 2016 15:03:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01FBF1576; Mon, 25 Jul 2016 15:03:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PF3FjX058070; Mon, 25 Jul 2016 15:03:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PF3FEV058068; Mon, 25 Jul 2016 15:03:15 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607251503.u6PF3FEV058068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 25 Jul 2016 15:03:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303302 - stable/11/usr.bin/mail X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 15:03:16 -0000 Author: pfg Date: Mon Jul 25 15:03:14 2016 New Revision: 303302 URL: https://svnweb.freebsd.org/changeset/base/303302 Log: MFC r302911: mail(1): Avoid closing negative file descriptors. CID: 1008105, 1008106 Approved by: re (gjb) Modified: stable/11/usr.bin/mail/quit.c stable/11/usr.bin/mail/v7.local.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mail/quit.c ============================================================================== --- stable/11/usr.bin/mail/quit.c Mon Jul 25 14:53:04 2016 (r303301) +++ stable/11/usr.bin/mail/quit.c Mon Jul 25 15:03:14 2016 (r303302) @@ -228,7 +228,8 @@ quit(void) return; } (void)Fclose(obuf); - (void)close(open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0600)); + if ((fd = open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0600)) >= 0) + (void)close(fd); if ((obuf = Fopen(mbox, "r+")) == NULL) { warn("%s", mbox); (void)Fclose(ibuf); Modified: stable/11/usr.bin/mail/v7.local.c ============================================================================== --- stable/11/usr.bin/mail/v7.local.c Mon Jul 25 14:53:04 2016 (r303301) +++ stable/11/usr.bin/mail/v7.local.c Mon Jul 25 15:03:14 2016 (r303302) @@ -68,9 +68,12 @@ findmail(char *user, char *buf, int bufl void demail(void) { + int fd; if (value("keep") != NULL || rm(mailname) < 0) - (void)close(open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600)); + if ((fd = open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600)) >= + 0) + (void)close(fd); } /* From owner-svn-src-all@freebsd.org Mon Jul 25 15:04:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C54E0BA39A0; Mon, 25 Jul 2016 15:04:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97AAF16DB; Mon, 25 Jul 2016 15:04:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PF4FAN058147; Mon, 25 Jul 2016 15:04:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PF4FFd058145; Mon, 25 Jul 2016 15:04:15 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607251504.u6PF4FFd058145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 25 Jul 2016 15:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303303 - stable/10/usr.bin/mail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 15:04:16 -0000 Author: pfg Date: Mon Jul 25 15:04:15 2016 New Revision: 303303 URL: https://svnweb.freebsd.org/changeset/base/303303 Log: MFC r302911: mail(1): Avoid closing negative file descriptors. CID: 1008105, 1008106 Modified: stable/10/usr.bin/mail/quit.c stable/10/usr.bin/mail/v7.local.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mail/quit.c ============================================================================== --- stable/10/usr.bin/mail/quit.c Mon Jul 25 15:03:14 2016 (r303302) +++ stable/10/usr.bin/mail/quit.c Mon Jul 25 15:04:15 2016 (r303303) @@ -228,7 +228,8 @@ quit(void) return; } (void)Fclose(obuf); - (void)close(open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0600)); + if ((fd = open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0600)) >= 0) + (void)close(fd); if ((obuf = Fopen(mbox, "r+")) == NULL) { warn("%s", mbox); (void)Fclose(ibuf); Modified: stable/10/usr.bin/mail/v7.local.c ============================================================================== --- stable/10/usr.bin/mail/v7.local.c Mon Jul 25 15:03:14 2016 (r303302) +++ stable/10/usr.bin/mail/v7.local.c Mon Jul 25 15:04:15 2016 (r303303) @@ -68,9 +68,12 @@ findmail(char *user, char *buf, int bufl void demail(void) { + int fd; if (value("keep") != NULL || rm(mailname) < 0) - (void)close(open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600)); + if ((fd = open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600)) >= + 0) + (void)close(fd); } /* From owner-svn-src-all@freebsd.org Mon Jul 25 15:04:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70600BA39DC; Mon, 25 Jul 2016 15:04:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35FDC16E6; Mon, 25 Jul 2016 15:04:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PF4JGB058209; Mon, 25 Jul 2016 15:04:19 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PF4HKb058193; Mon, 25 Jul 2016 15:04:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607251504.u6PF4HKb058193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 25 Jul 2016 15:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r303304 - in releng: 10.1 10.1/sys/conf 10.1/usr.bin/bsdiff/bspatch 10.1/usr.sbin/freebsd-update 10.2 10.2/sys/conf 10.2/usr.bin/bsdiff/bspatch 10.2/usr.sbin/freebsd-update 10.3 10.3/sy... X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 15:04:20 -0000 Author: delphij Date: Mon Jul 25 15:04:17 2016 New Revision: 303304 URL: https://svnweb.freebsd.org/changeset/base/303304 Log: Fix bspatch heap overflow vulnerability. [SA-16:25] Fix freebsd-update(8) support of FreeBSD 11.0 release distribution. [EN-16:09] Approved by: so Modified: releng/10.1/UPDATING releng/10.1/sys/conf/newvers.sh releng/10.1/usr.bin/bsdiff/bspatch/bspatch.c releng/10.1/usr.sbin/freebsd-update/freebsd-update.sh releng/10.2/UPDATING releng/10.2/sys/conf/newvers.sh releng/10.2/usr.bin/bsdiff/bspatch/bspatch.c releng/10.2/usr.sbin/freebsd-update/freebsd-update.sh releng/10.3/UPDATING releng/10.3/sys/conf/newvers.sh releng/10.3/usr.bin/bsdiff/bspatch/bspatch.c releng/10.3/usr.sbin/freebsd-update/freebsd-update.sh releng/9.3/UPDATING releng/9.3/sys/conf/newvers.sh releng/9.3/usr.bin/bsdiff/bspatch/bspatch.c releng/9.3/usr.sbin/freebsd-update/freebsd-update.sh Modified: releng/10.1/UPDATING ============================================================================== --- releng/10.1/UPDATING Mon Jul 25 15:04:15 2016 (r303303) +++ releng/10.1/UPDATING Mon Jul 25 15:04:17 2016 (r303304) @@ -16,6 +16,14 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20160725 p37 FreeBSD-SA-16:25.bspatch + FreeBSD-EN-16:09.freebsd-update + + Fix bspatch heap overflow vulnerability. [SA-16:25] + + Fix freebsd-update(8) support of FreeBSD 11.0 release + distribution. [EN-16:09] + 20160604 p36 FreeBSD-SA-16:24.ntp Fix multiple vulnerabilities of ntp. Modified: releng/10.1/sys/conf/newvers.sh ============================================================================== --- releng/10.1/sys/conf/newvers.sh Mon Jul 25 15:04:15 2016 (r303303) +++ releng/10.1/sys/conf/newvers.sh Mon Jul 25 15:04:17 2016 (r303304) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="RELEASE-p36" +BRANCH="RELEASE-p37" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.1/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- releng/10.1/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 15:04:15 2016 (r303303) +++ releng/10.1/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 15:04:17 2016 (r303304) @@ -155,6 +155,10 @@ int main(int argc,char * argv[]) }; /* Sanity-check */ + if ((ctrl[0] < 0) || (ctrl[1] < 0)) + errx(1,"Corrupt patch\n"); + + /* Sanity-check */ if(newpos+ctrl[0]>newsize) errx(1,"Corrupt patch\n"); Modified: releng/10.1/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/10.1/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 25 15:04:15 2016 (r303303) +++ releng/10.1/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 25 15:04:17 2016 (r303304) @@ -1229,7 +1229,7 @@ fetch_metadata_sanity () { # Check that the first four fields make sense. if gunzip -c < files/$1.gz | - grep -qvE "^[a-z]+\|[0-9a-z]+\|${P}+\|[fdL-]\|"; then + grep -qvE "^[a-z]+\|[0-9a-z-]+\|${P}+\|[fdL-]\|"; then fetch_metadata_bogus "" return 1 fi Modified: releng/10.2/UPDATING ============================================================================== --- releng/10.2/UPDATING Mon Jul 25 15:04:15 2016 (r303303) +++ releng/10.2/UPDATING Mon Jul 25 15:04:17 2016 (r303304) @@ -16,6 +16,14 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20160725 p20 FreeBSD-SA-16:25.bspatch + FreeBSD-EN-16:09.freebsd-update + + Fix bspatch heap overflow vulnerability. [SA-16:25] + + Fix freebsd-update(8) support of FreeBSD 11.0 release + distribution. [EN-16:09] + 20160604 p19 FreeBSD-SA-16:24.ntp Fix multiple vulnerabilities of ntp. Modified: releng/10.2/sys/conf/newvers.sh ============================================================================== --- releng/10.2/sys/conf/newvers.sh Mon Jul 25 15:04:15 2016 (r303303) +++ releng/10.2/sys/conf/newvers.sh Mon Jul 25 15:04:17 2016 (r303304) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.2" -BRANCH="RELEASE-p19" +BRANCH="RELEASE-p20" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.2/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- releng/10.2/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 15:04:15 2016 (r303303) +++ releng/10.2/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 15:04:17 2016 (r303304) @@ -155,6 +155,10 @@ int main(int argc,char * argv[]) }; /* Sanity-check */ + if ((ctrl[0] < 0) || (ctrl[1] < 0)) + errx(1,"Corrupt patch\n"); + + /* Sanity-check */ if(newpos+ctrl[0]>newsize) errx(1,"Corrupt patch\n"); Modified: releng/10.2/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/10.2/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 25 15:04:15 2016 (r303303) +++ releng/10.2/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 25 15:04:17 2016 (r303304) @@ -1245,7 +1245,7 @@ fetch_metadata_sanity () { # Check that the first four fields make sense. if gunzip -c < files/$1.gz | - grep -qvE "^[a-z]+\|[0-9a-z]+\|${P}+\|[fdL-]\|"; then + grep -qvE "^[a-z]+\|[0-9a-z-]+\|${P}+\|[fdL-]\|"; then fetch_metadata_bogus "" return 1 fi Modified: releng/10.3/UPDATING ============================================================================== --- releng/10.3/UPDATING Mon Jul 25 15:04:15 2016 (r303303) +++ releng/10.3/UPDATING Mon Jul 25 15:04:17 2016 (r303304) @@ -16,6 +16,14 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20160725 p6 FreeBSD-SA-16:25.bspatch + FreeBSD-EN-16:09.freebsd-update + + Fix bspatch heap overflow vulnerability. [SA-16:25] + + Fix freebsd-update(8) support of FreeBSD 11.0 release + distribution. [EN-16:09] + 20160604 p5 FreeBSD-SA-16:24.ntp Fix multiple vulnerabilities of ntp. Modified: releng/10.3/sys/conf/newvers.sh ============================================================================== --- releng/10.3/sys/conf/newvers.sh Mon Jul 25 15:04:15 2016 (r303303) +++ releng/10.3/sys/conf/newvers.sh Mon Jul 25 15:04:17 2016 (r303304) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.3" -BRANCH="RELEASE-p5" +BRANCH="RELEASE-p6" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.3/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- releng/10.3/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 15:04:15 2016 (r303303) +++ releng/10.3/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 15:04:17 2016 (r303304) @@ -155,6 +155,10 @@ int main(int argc,char * argv[]) }; /* Sanity-check */ + if ((ctrl[0] < 0) || (ctrl[1] < 0)) + errx(1,"Corrupt patch\n"); + + /* Sanity-check */ if(newpos+ctrl[0]>newsize) errx(1,"Corrupt patch\n"); Modified: releng/10.3/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/10.3/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 25 15:04:15 2016 (r303303) +++ releng/10.3/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 25 15:04:17 2016 (r303304) @@ -1250,7 +1250,7 @@ fetch_metadata_sanity () { # Check that the first four fields make sense. if gunzip -c < files/$1.gz | - grep -qvE "^[a-z]+\|[0-9a-z]+\|${P}+\|[fdL-]\|"; then + grep -qvE "^[a-z]+\|[0-9a-z-]+\|${P}+\|[fdL-]\|"; then fetch_metadata_bogus "" return 1 fi Modified: releng/9.3/UPDATING ============================================================================== --- releng/9.3/UPDATING Mon Jul 25 15:04:15 2016 (r303303) +++ releng/9.3/UPDATING Mon Jul 25 15:04:17 2016 (r303304) @@ -11,6 +11,14 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20160725 p45 FreeBSD-SA-16:25.bspatch + FreeBSD-EN-16:09.freebsd-update + + Fix bspatch heap overflow vulnerability. [SA-16:25] + + Fix freebsd-update(8) support of FreeBSD 11.0 release + distribution. [EN-16:09] + 20160604 p44 FreeBSD-SA-16:24.ntp Fix multiple vulnerabilities of ntp. Modified: releng/9.3/sys/conf/newvers.sh ============================================================================== --- releng/9.3/sys/conf/newvers.sh Mon Jul 25 15:04:15 2016 (r303303) +++ releng/9.3/sys/conf/newvers.sh Mon Jul 25 15:04:17 2016 (r303304) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="RELEASE-p44" +BRANCH="RELEASE-p45" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.3/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- releng/9.3/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 15:04:15 2016 (r303303) +++ releng/9.3/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 15:04:17 2016 (r303304) @@ -155,6 +155,10 @@ int main(int argc,char * argv[]) }; /* Sanity-check */ + if ((ctrl[0] < 0) || (ctrl[1] < 0)) + errx(1,"Corrupt patch\n"); + + /* Sanity-check */ if(newpos+ctrl[0]>newsize) errx(1,"Corrupt patch\n"); Modified: releng/9.3/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/9.3/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 25 15:04:15 2016 (r303303) +++ releng/9.3/usr.sbin/freebsd-update/freebsd-update.sh Mon Jul 25 15:04:17 2016 (r303304) @@ -1229,7 +1229,7 @@ fetch_metadata_sanity () { # Check that the first four fields make sense. if gunzip -c < files/$1.gz | - grep -qvE "^[a-z]+\|[0-9a-z]+\|${P}+\|[fdL-]\|"; then + grep -qvE "^[a-z]+\|[0-9a-z-]+\|${P}+\|[fdL-]\|"; then fetch_metadata_bogus "" return 1 fi From owner-svn-src-all@freebsd.org Mon Jul 25 15:05:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EE76BA3ABF; Mon, 25 Jul 2016 15:05:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2178F1A15; Mon, 25 Jul 2016 15:05:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PF51Im058284; Mon, 25 Jul 2016 15:05:01 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PF51It058282; Mon, 25 Jul 2016 15:05:01 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607251505.u6PF51It058282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 25 Jul 2016 15:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r303305 - stable/9/usr.bin/mail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 15:05:02 -0000 Author: pfg Date: Mon Jul 25 15:05:01 2016 New Revision: 303305 URL: https://svnweb.freebsd.org/changeset/base/303305 Log: MFC r302911: mail(1): Avoid closing negative file descriptors. CID: 1008105, 1008106 Modified: stable/9/usr.bin/mail/quit.c stable/9/usr.bin/mail/v7.local.c Directory Properties: stable/9/usr.bin/mail/ (props changed) Modified: stable/9/usr.bin/mail/quit.c ============================================================================== --- stable/9/usr.bin/mail/quit.c Mon Jul 25 15:04:17 2016 (r303304) +++ stable/9/usr.bin/mail/quit.c Mon Jul 25 15:05:01 2016 (r303305) @@ -228,7 +228,8 @@ quit(void) return; } (void)Fclose(obuf); - (void)close(open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0600)); + if ((fd = open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0600)) >= 0) + (void)close(fd); if ((obuf = Fopen(mbox, "r+")) == NULL) { warn("%s", mbox); (void)Fclose(ibuf); Modified: stable/9/usr.bin/mail/v7.local.c ============================================================================== --- stable/9/usr.bin/mail/v7.local.c Mon Jul 25 15:04:17 2016 (r303304) +++ stable/9/usr.bin/mail/v7.local.c Mon Jul 25 15:05:01 2016 (r303305) @@ -68,9 +68,12 @@ findmail(char *user, char *buf, int bufl void demail(void) { + int fd; if (value("keep") != NULL || rm(mailname) < 0) - (void)close(open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600)); + if ((fd = open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600)) >= + 0) + (void)close(fd); } /* From owner-svn-src-all@freebsd.org Mon Jul 25 15:56:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07450BA4557; Mon, 25 Jul 2016 15:56:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1B6513D8; Mon, 25 Jul 2016 15:56:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PFubKp077246; Mon, 25 Jul 2016 15:56:37 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PFub3S077245; Mon, 25 Jul 2016 15:56:37 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607251556.u6PFub3S077245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 25 Jul 2016 15:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303306 - stable/11/lib/librt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 15:56:39 -0000 Author: jhb Date: Mon Jul 25 15:56:37 2016 New Revision: 303306 URL: https://svnweb.freebsd.org/changeset/base/303306 Log: MFC 302860: Fix aio system call wrappers in librt. - Update aio_return/waitcomplete wrappers for the ssize_t return type. - Fix the aio_return() wrapper to fail with EINVAL on a pending job. This matches the semantics of the in-kernel system call. Also, aio_return() returns errors via errno, not via the return value. Approved by: re (gjb) Sponsored by: Chelsio Communications Modified: stable/11/lib/librt/aio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/librt/aio.c ============================================================================== --- stable/11/lib/librt/aio.c Mon Jul 25 15:05:01 2016 (r303305) +++ stable/11/lib/librt/aio.c Mon Jul 25 15:56:37 2016 (r303306) @@ -54,8 +54,8 @@ typedef void (*aio_func)(union sigval va extern int __sys_aio_read(struct aiocb *iocb); extern int __sys_aio_write(struct aiocb *iocb); -extern int __sys_aio_waitcomplete(struct aiocb **iocbp, struct timespec *timeout); -extern int __sys_aio_return(struct aiocb *iocb); +extern ssize_t __sys_aio_waitcomplete(struct aiocb **iocbp, struct timespec *timeout); +extern ssize_t __sys_aio_return(struct aiocb *iocb); extern int __sys_aio_error(struct aiocb *iocb); extern int __sys_aio_fsync(int op, struct aiocb *iocb); @@ -136,12 +136,13 @@ __aio_write(struct aiocb *iocb) return aio_io(iocb, &__sys_aio_write); } -int +ssize_t __aio_waitcomplete(struct aiocb **iocbp, struct timespec *timeout) { + ssize_t ret; int err; - int ret = __sys_aio_waitcomplete(iocbp, timeout); + ret = __sys_aio_waitcomplete(iocbp, timeout); if (*iocbp) { if ((*iocbp)->aio_sigevent.sigev_notify == SIGEV_THREAD) { err = errno; @@ -155,13 +156,20 @@ __aio_waitcomplete(struct aiocb **iocbp, return (ret); } -int +ssize_t __aio_return(struct aiocb *iocb) { if (iocb->aio_sigevent.sigev_notify == SIGEV_THREAD) { - if (__sys_aio_error(iocb) == EINPROGRESS) - return (EINPROGRESS); + if (__sys_aio_error(iocb) == EINPROGRESS) { + /* + * Fail with EINVAL to match the semantics of + * __sys_aio_return() for an in-progress + * request. + */ + errno = EINVAL; + return (-1); + } __sigev_list_lock(); __sigev_delete(SI_ASYNCIO, (sigev_id_t)iocb); __sigev_list_unlock(); From owner-svn-src-all@freebsd.org Mon Jul 25 15:57:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08FC2BA45B9; Mon, 25 Jul 2016 15:57:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD2F115BA; Mon, 25 Jul 2016 15:57:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PFvEjb077320; Mon, 25 Jul 2016 15:57:14 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PFvEle077319; Mon, 25 Jul 2016 15:57:14 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607251557.u6PFvEle077319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 25 Jul 2016 15:57:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303307 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 15:57:15 -0000 Author: andrew Date: Mon Jul 25 15:57:13 2016 New Revision: 303307 URL: https://svnweb.freebsd.org/changeset/base/303307 Log: Rework how we number CPUs on arm64 to try and keep clusters together. Obtained from: ABT Systems Ltd MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Mon Jul 25 15:56:37 2016 (r303306) +++ head/sys/arm64/arm64/mp_machdep.c Mon Jul 25 15:57:13 2016 (r303307) @@ -454,9 +454,16 @@ cpu_init_fdt(u_int id, phandle_t node, u if (id == cpu0) return (1); + /* + * Rotate the CPU IDs to put the boot CPU as CPU 0. We keep the other + * CPUs ordered as the are likely grouped into clusters so it can be + * useful to keep that property, e.g. for the GICv3 driver to send + * an IPI to all CPUs in the cluster. + */ cpuid = id; if (cpuid < cpu0) - cpuid++; + cpuid += mp_maxid + 1; + cpuid -= cpu0; pcpup = &__pcpu[cpuid]; pcpu_init(pcpup, cpuid, sizeof(struct pcpu)); From owner-svn-src-all@freebsd.org Mon Jul 25 15:59:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9C0FBA4629; Mon, 25 Jul 2016 15:59:32 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9DE117AD; Mon, 25 Jul 2016 15:59:32 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PFxVW1077433; Mon, 25 Jul 2016 15:59:31 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PFxV6S077432; Mon, 25 Jul 2016 15:59:31 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607251559.u6PFxV6S077432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 25 Jul 2016 15:59:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303308 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 15:59:33 -0000 Author: andrew Date: Mon Jul 25 15:59:31 2016 New Revision: 303308 URL: https://svnweb.freebsd.org/changeset/base/303308 Log: Fix a typo in a string in a KASSERT to sanity check the CPU IDs. Obtained from: ABT Systems Ltd MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Mon Jul 25 15:57:13 2016 (r303307) +++ head/sys/arm64/arm64/mp_machdep.c Mon Jul 25 15:59:31 2016 (r303308) @@ -441,7 +441,7 @@ cpu_init_fdt(u_int id, phandle_t node, u if (id > mp_maxid) return (0); - KASSERT(id < MAXCPU, ("Too mant CPUs")); + KASSERT(id < MAXCPU, ("Too many CPUs")); KASSERT(addr_size == 1 || addr_size == 2, ("Invalid register size")); #ifdef INVARIANTS From owner-svn-src-all@freebsd.org Mon Jul 25 16:18:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07474BA4B3A; Mon, 25 Jul 2016 16:18:22 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBB6613A7; Mon, 25 Jul 2016 16:18:21 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PGIL0C084623; Mon, 25 Jul 2016 16:18:21 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PGILmw084622; Mon, 25 Jul 2016 16:18:21 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607251618.u6PGILmw084622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 25 Jul 2016 16:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303309 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 16:18:22 -0000 Author: andrew Date: Mon Jul 25 16:18:20 2016 New Revision: 303309 URL: https://svnweb.freebsd.org/changeset/base/303309 Log: Remove an unused variable. Obtained from: ABT Systems Ltd MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Mon Jul 25 15:59:31 2016 (r303308) +++ head/sys/arm64/arm64/mp_machdep.c Mon Jul 25 16:18:20 2016 (r303309) @@ -112,9 +112,6 @@ static int ipi_handler(void *arg); struct mtx ap_boot_mtx; struct pcb stoppcbs[MAXCPU]; -#ifdef INVARIANTS -static uint32_t cpu_reg[MAXCPU][2]; -#endif static device_t cpu_list[MAXCPU]; /* @@ -443,13 +440,6 @@ cpu_init_fdt(u_int id, phandle_t node, u KASSERT(id < MAXCPU, ("Too many CPUs")); - KASSERT(addr_size == 1 || addr_size == 2, ("Invalid register size")); -#ifdef INVARIANTS - cpu_reg[id][0] = reg[0]; - if (addr_size == 2) - cpu_reg[id][1] = reg[1]; -#endif - /* We are already running on cpu 0 */ if (id == cpu0) return (1); From owner-svn-src-all@freebsd.org Mon Jul 25 16:28:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3F9FBA4029; Mon, 25 Jul 2016 16:28:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BD571C81; Mon, 25 Jul 2016 16:28:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PGS2MW088245; Mon, 25 Jul 2016 16:28:02 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PGS2Ga088243; Mon, 25 Jul 2016 16:28:02 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201607251628.u6PGS2Ga088243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 25 Jul 2016 16:28:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303310 - in head/sys: fs/devfs kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 16:28:03 -0000 Author: cem Date: Mon Jul 25 16:28:02 2016 New Revision: 303310 URL: https://svnweb.freebsd.org/changeset/base/303310 Log: devfs: Move most ioctl logic down to vnode layer Devfs' file layer ioctl is now just a thin shim around the vnode layer. Reviewed by: kib Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7286 Modified: head/sys/fs/devfs/devfs_vnops.c head/sys/kern/vfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Mon Jul 25 16:18:20 2016 (r303309) +++ head/sys/fs/devfs/devfs_vnops.c Mon Jul 25 16:28:02 2016 (r303310) @@ -779,47 +779,61 @@ devfs_getattr(struct vop_getattr_args *a static int devfs_ioctl_f(struct file *fp, u_long com, void *data, struct ucred *cred, struct thread *td) { - struct cdev *dev; - struct cdevsw *dsw; - struct vnode *vp; - struct vnode *vpold; - int error, i, ref; - const char *p; - struct fiodgname_arg *fgn; struct file *fpop; + int error; fpop = td->td_fpop; - error = devfs_fp_check(fp, &dev, &dsw, &ref); - if (error != 0) { - error = vnops.fo_ioctl(fp, com, data, cred, td); - return (error); - } + td->td_fpop = fp; + error = vnops.fo_ioctl(fp, com, data, cred, td); + td->td_fpop = fpop; + return (error); +} + +static int +devfs_ioctl(struct vop_ioctl_args *ap) +{ + struct fiodgname_arg *fgn; + struct vnode *vpold, *vp; + struct cdevsw *dsw; + struct thread *td; + struct cdev *dev; + int error, ref, i; + const char *p; + u_long com; + + vp = ap->a_vp; + com = ap->a_command; + td = ap->a_td; + + dsw = devvn_refthread(vp, &dev, &ref); + if (dsw == NULL) + return (ENXIO); + KASSERT(dev->si_refcount > 0, + ("devfs: un-referenced struct cdev *(%s)", devtoname(dev))); if (com == FIODTYPE) { - *(int *)data = dsw->d_flags & D_TYPEMASK; - td->td_fpop = fpop; - dev_relthread(dev, ref); - return (0); + *(int *)ap->a_data = dsw->d_flags & D_TYPEMASK; + error = 0; + goto out; } else if (com == FIODGNAME) { - fgn = data; + fgn = ap->a_data; p = devtoname(dev); i = strlen(p) + 1; if (i > fgn->len) error = EINVAL; else error = copyout(p, fgn->buf, i); - td->td_fpop = fpop; - dev_relthread(dev, ref); - return (error); + goto out; } - error = dsw->d_ioctl(dev, com, data, fp->f_flag, td); - td->td_fpop = NULL; + + error = dsw->d_ioctl(dev, com, ap->a_data, ap->a_fflag, td); + +out: dev_relthread(dev, ref); if (error == ENOIOCTL) error = ENOTTY; - if (error == 0 && com == TIOCSCTTY) { - vp = fp->f_vnode; + if (error == 0 && com == TIOCSCTTY) { /* Do nothing if reassigning same control tty */ sx_slock(&proctree_lock); if (td->td_proc->p_session->s_ttyvp == vp) { @@ -1862,6 +1876,7 @@ static struct fileops devfs_ops_f = { .fo_flags = DFLAG_PASSABLE | DFLAG_SEEKABLE }; +/* Vops for non-CHR vnodes in /dev. */ static struct vop_vector devfs_vnodeops = { .vop_default = &default_vnodeops, @@ -1885,6 +1900,7 @@ static struct vop_vector devfs_vnodeops .vop_vptocnp = devfs_vptocnp, }; +/* Vops for VCHR vnodes in /dev. */ static struct vop_vector devfs_specops = { .vop_default = &default_vnodeops, @@ -1894,6 +1910,7 @@ static struct vop_vector devfs_specops = .vop_create = VOP_PANIC, .vop_fsync = devfs_fsync, .vop_getattr = devfs_getattr, + .vop_ioctl = devfs_ioctl, .vop_link = VOP_PANIC, .vop_mkdir = VOP_PANIC, .vop_mknod = VOP_PANIC, Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Mon Jul 25 16:18:20 2016 (r303309) +++ head/sys/kern/vfs_vnops.c Mon Jul 25 16:28:02 2016 (r303310) @@ -1492,6 +1492,10 @@ vn_ioctl(fp, com, data, active_cred, td) return (VOP_IOCTL(vp, com, data, fp->f_flag, active_cred, td)); } + break; + case VCHR: + return (VOP_IOCTL(vp, com, data, fp->f_flag, + active_cred, td)); default: return (ENOTTY); } From owner-svn-src-all@freebsd.org Mon Jul 25 17:18:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5B00BA33BA; Mon, 25 Jul 2016 17:18:00 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7230C10CD; Mon, 25 Jul 2016 17:18:00 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PHHxdO006979; Mon, 25 Jul 2016 17:17:59 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PHHx6m006978; Mon, 25 Jul 2016 17:17:59 GMT (envelope-from np@FreeBSD.org) Message-Id: <201607251717.u6PHHx6m006978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 25 Jul 2016 17:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303311 - stable/11/usr.sbin/ctld X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 17:18:00 -0000 Author: np Date: Mon Jul 25 17:17:59 2016 New Revision: 303311 URL: https://svnweb.freebsd.org/changeset/base/303311 Log: MFC r303199: ctld(8): Fix MaxBurstLength negotiation. The target must reply with the selected value of MaxBurstSize instead of just echoing back the initiator's offered value. Reviewed by: mav@ Approved by: re@ (gjb@) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7278 Modified: stable/11/usr.sbin/ctld/login.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ctld/login.c ============================================================================== --- stable/11/usr.sbin/ctld/login.c Mon Jul 25 16:28:02 2016 (r303310) +++ stable/11/usr.sbin/ctld/login.c Mon Jul 25 17:17:59 2016 (r303311) @@ -569,7 +569,7 @@ login_negotiate_key(struct pdu *request, tmp = MAX_BURST_LENGTH; } conn->conn_max_burst_length = tmp; - keys_add(response_keys, name, value); + keys_add_int(response_keys, name, tmp); } else if (strcmp(name, "FirstBurstLength") == 0) { tmp = strtoul(value, NULL, 10); if (tmp <= 0) { From owner-svn-src-all@freebsd.org Mon Jul 25 17:37:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC21FBA3B48; Mon, 25 Jul 2016 17:37:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA09D1CD7; Mon, 25 Jul 2016 17:37:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PHb3fR014404; Mon, 25 Jul 2016 17:37:03 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PHb2Z4014400; Mon, 25 Jul 2016 17:37:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607251737.u6PHb2Z4014400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 25 Jul 2016 17:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303312 - in stable/11: share/man/man4 sys/dev/vt sys/dev/vt/hw/fb X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 17:37:04 -0000 Author: bdrewery Date: Mon Jul 25 17:37:02 2016 New Revision: 303312 URL: https://svnweb.freebsd.org/changeset/base/303312 Log: MFC r303043: Increase vt(4) framebuffer maximum size PR: 210382 Approved by: re (gjb) Modified: stable/11/share/man/man4/vt.4 stable/11/sys/dev/vt/hw/fb/vt_fb.c stable/11/sys/dev/vt/vt.h stable/11/sys/dev/vt/vt_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/vt.4 ============================================================================== --- stable/11/share/man/man4/vt.4 Mon Jul 25 17:17:59 2016 (r303311) +++ stable/11/share/man/man4/vt.4 Mon Jul 25 17:37:02 2016 (r303312) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 21, 2016 +.Dd July 19, 2016 .Dt "VIRTUAL TERMINALS" 4 .Os .Sh NAME @@ -36,8 +36,8 @@ .Cd "options VT_MAXWINDOWS=N" .Cd "options VT_ALT_TO_ESC_HACK=1" .Cd "options VT_TWOBUTTON_MOUSE" -.Cd "options VT_FB_DEFAULT_WIDTH=X" -.Cd "options VT_FB_DEFAULT_HEIGHT=Y" +.Cd "options VT_FB_MAX_WIDTH=X" +.Cd "options VT_FB_MAX_HEIGHT=Y" .Cd "options SC_NO_CUTPASTE" .Cd "device vt" .Pp Modified: stable/11/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/11/sys/dev/vt/hw/fb/vt_fb.c Mon Jul 25 17:17:59 2016 (r303311) +++ stable/11/sys/dev/vt/hw/fb/vt_fb.c Mon Jul 25 17:37:02 2016 (r303312) @@ -416,10 +416,10 @@ vt_fb_init(struct vt_device *vd) int err; info = vd->vd_softc; - vd->vd_height = MIN(VT_FB_DEFAULT_HEIGHT, info->fb_height); + vd->vd_height = MIN(VT_FB_MAX_HEIGHT, info->fb_height); margin = (info->fb_height - vd->vd_height) >> 1; vd->vd_transpose = margin * info->fb_stride; - vd->vd_width = MIN(VT_FB_DEFAULT_WIDTH, info->fb_width); + vd->vd_width = MIN(VT_FB_MAX_WIDTH, info->fb_width); margin = (info->fb_width - vd->vd_width) >> 1; vd->vd_transpose += margin * (info->fb_bpp / NBBY); vd->vd_video_dev = info->fb_video_dev; Modified: stable/11/sys/dev/vt/vt.h ============================================================================== --- stable/11/sys/dev/vt/vt.h Mon Jul 25 17:17:59 2016 (r303311) +++ stable/11/sys/dev/vt/vt.h Mon Jul 25 17:37:02 2016 (r303312) @@ -377,11 +377,11 @@ void vt_upgrade(struct vt_device *vd); #define PIXEL_WIDTH(w) ((w) / 8) #define PIXEL_HEIGHT(h) ((h) / 16) -#ifndef VT_FB_DEFAULT_WIDTH -#define VT_FB_DEFAULT_WIDTH 2048 +#ifndef VT_FB_MAX_WIDTH +#define VT_FB_MAX_WIDTH 4096 #endif -#ifndef VT_FB_DEFAULT_HEIGHT -#define VT_FB_DEFAULT_HEIGHT 1200 +#ifndef VT_FB_MAX_HEIGHT +#define VT_FB_MAX_HEIGHT 2400 #endif /* name argument is not used yet. */ Modified: stable/11/sys/dev/vt/vt_core.c ============================================================================== --- stable/11/sys/dev/vt/vt_core.c Mon Jul 25 17:17:59 2016 (r303311) +++ stable/11/sys/dev/vt/vt_core.c Mon Jul 25 17:37:02 2016 (r303312) @@ -181,8 +181,8 @@ static void vt_resume_handler(void *priv SET_DECLARE(vt_drv_set, struct vt_driver); -#define _VTDEFH MAX(100, PIXEL_HEIGHT(VT_FB_DEFAULT_HEIGHT)) -#define _VTDEFW MAX(200, PIXEL_WIDTH(VT_FB_DEFAULT_WIDTH)) +#define _VTDEFH MAX(100, PIXEL_HEIGHT(VT_FB_MAX_HEIGHT)) +#define _VTDEFW MAX(200, PIXEL_WIDTH(VT_FB_MAX_WIDTH)) struct terminal vt_consterm; static struct vt_window vt_conswindow; From owner-svn-src-all@freebsd.org Mon Jul 25 18:25:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56FA0B9CCC5; Mon, 25 Jul 2016 18:25:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 269D41EB8; Mon, 25 Jul 2016 18:25:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PIPJQQ033005; Mon, 25 Jul 2016 18:25:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PIPJI5033003; Mon, 25 Jul 2016 18:25:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607251825.u6PIPJI5033003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 25 Jul 2016 18:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303314 - stable/11/sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 18:25:20 -0000 Author: bdrewery Date: Mon Jul 25 18:25:19 2016 New Revision: 303314 URL: https://svnweb.freebsd.org/changeset/base/303314 Log: MFC r303195: Don't run find(1) for __MPATH with NO_MODULES set. Approved by: re (gjb) Modified: stable/11/sys/conf/config.mk stable/11/sys/conf/kern.pre.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/config.mk ============================================================================== --- stable/11/sys/conf/config.mk Mon Jul 25 18:24:54 2016 (r303313) +++ stable/11/sys/conf/config.mk Mon Jul 25 18:25:19 2016 (r303314) @@ -54,7 +54,7 @@ KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | .export KERN_OPTS .endif -.if !defined(__MPATH) +.if !defined(NO_MODULES) && !defined(__MPATH) __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m .export __MPATH .endif Modified: stable/11/sys/conf/kern.pre.mk ============================================================================== --- stable/11/sys/conf/kern.pre.mk Mon Jul 25 18:24:54 2016 (r303313) +++ stable/11/sys/conf/kern.pre.mk Mon Jul 25 18:25:19 2016 (r303314) @@ -192,7 +192,7 @@ SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symb SYSTEM_DEP+= ${LDSCRIPT} # Calculate path for .m files early, if needed. -.if !defined(__MPATH) +.if !defined(NO_MODULES) && !defined(__MPATH) __MPATH!=find ${S:tA}/ -name \*_if.m .endif @@ -212,7 +212,9 @@ MKMODULESENV+= MODULES_OVERRIDE="${MODUL .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif +.if !defined(NO_MODULES) MKMODULESENV+= __MPATH="${__MPATH}" +.endif # Architecture and output format arguments for objdump to convert image to # object file From owner-svn-src-all@freebsd.org Mon Jul 25 19:16:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C07AEBA0E5D; Mon, 25 Jul 2016 19:16:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 937551D67; Mon, 25 Jul 2016 19:16:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PJGUOB051806; Mon, 25 Jul 2016 19:16:30 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PJGUGd051805; Mon, 25 Jul 2016 19:16:30 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201607251916.u6PJGUGd051805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 25 Jul 2016 19:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303315 - head/sys/cam/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 19:16:31 -0000 Author: imp Date: Mon Jul 25 19:16:30 2016 New Revision: 303315 URL: https://svnweb.freebsd.org/changeset/base/303315 Log: Remove some extraneous printfs. Modified: head/sys/cam/nvme/nvme_xpt.c Modified: head/sys/cam/nvme/nvme_xpt.c ============================================================================== --- head/sys/cam/nvme/nvme_xpt.c Mon Jul 25 18:25:19 2016 (r303314) +++ head/sys/cam/nvme/nvme_xpt.c Mon Jul 25 19:16:30 2016 (r303315) @@ -538,13 +538,8 @@ nvme_action(union ccb *start_ccb) switch (start_ccb->ccb_h.func_code) { case XPT_SCAN_BUS: - printf("NVME scan BUS started -- ignored\n"); -// break; case XPT_SCAN_TGT: - printf("NVME scan TGT started -- ignored\n"); -// break; case XPT_SCAN_LUN: - printf("NVME scan started\n"); nvme_scan_lun(start_ccb->ccb_h.path->periph, start_ccb->ccb_h.path, start_ccb->crcn.flags, start_ccb); From owner-svn-src-all@freebsd.org Mon Jul 25 19:16:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B88FBA0EAA; Mon, 25 Jul 2016 19:16:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E98E31ED6; Mon, 25 Jul 2016 19:16:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PJGoh3051873; Mon, 25 Jul 2016 19:16:50 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PJGo7x051872; Mon, 25 Jul 2016 19:16:50 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607251916.u6PJGo7x051872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 25 Jul 2016 19:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303316 - stable/11/share/man/man3 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 19:16:51 -0000 Author: jhb Date: Mon Jul 25 19:16:49 2016 New Revision: 303316 URL: https://svnweb.freebsd.org/changeset/base/303316 Log: MFC 302861: Fix rendering issues. - Use Ta to separate column headers. - Correct width of the 'Code' column in the last table. Approved by: re (gjb) Modified: stable/11/share/man/man3/siginfo.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man3/siginfo.3 ============================================================================== --- stable/11/share/man/man3/siginfo.3 Mon Jul 25 19:16:30 2016 (r303315) +++ stable/11/share/man/man3/siginfo.3 Mon Jul 25 19:16:49 2016 (r303316) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2012 +.Dd July 14, 2016 .Dt SIGINFO 3 .Os .Sh NAME @@ -54,7 +54,7 @@ In either case, the system returns the i .Vt siginfo_t , which includes the following information: .Bl -column ".Vt union signal" ".Va si_overrun" -.It Sy "Type Member Description" +.It Sy Type Ta Sy Member Ta Sy Description .It Vt int Ta Va si_signo Ta signal number .It Vt int Ta Va si_errno Ta @@ -107,7 +107,7 @@ for use as values of that are signal-specific or non-signal-specific reasons why the signal was generated: .Bl -column ".Dv SIGPOLL" ".Dv CLD_CONTINUED" -.It Sy "Signal Code Reason" +.It Sy Signal Ta Sy Code Ta Sy Reason .It Dv SIGILL Ta Dv ILL_ILLOPC Ta illegal opcode .It Ta Dv ILL_ILLOPN Ta @@ -206,7 +206,7 @@ signal sent by .Pp In addition, the following signal-specific information is available: .Bl -column ".Dv SIGPOLL" ".Dv CLD_CONTINUED" -.It Sy "Signal Member Value" +.It Sy Signal Ta Sy Member Ta Sy Value .It Dv SIGILL Ta Va si_addr Ta address of faulting instruction .It Ta Va si_trapno Ta @@ -240,8 +240,8 @@ or .El .Pp Finally, the following code-specific information is available: -.Bl -column ".Dv SI_QUEUE" ".Va si_overrun" -.It Sy "Code Member Value" +.Bl -column ".Dv SI_ASYNCIO" ".Va si_overrun" +.It Sy Code Ta Sy Member Ta Sy Value .It Dv SI_USER Ta Va si_pid Ta the process ID that sent the signal .It Ta Va si_uid Ta From owner-svn-src-all@freebsd.org Mon Jul 25 19:18:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53F16BA0FD0; Mon, 25 Jul 2016 19:18:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AEAA11D1; Mon, 25 Jul 2016 19:18:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PJIh5p051985; Mon, 25 Jul 2016 19:18:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PJIhu0051984; Mon, 25 Jul 2016 19:18:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607251918.u6PJIhu0051984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 25 Jul 2016 19:18:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r303317 - in stable: 10/share/man/man3 9/share/man/man3 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 19:18:44 -0000 Author: jhb Date: Mon Jul 25 19:18:42 2016 New Revision: 303317 URL: https://svnweb.freebsd.org/changeset/base/303317 Log: MFC 302861: Fix rendering issues. - Use Ta to separate column headers. - Correct width of the 'Code' column in the last table. Modified: stable/9/share/man/man3/siginfo.3 Directory Properties: stable/9/share/man/man3/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/man/man3/siginfo.3 Directory Properties: stable/10/ (props changed) Modified: stable/9/share/man/man3/siginfo.3 ============================================================================== --- stable/9/share/man/man3/siginfo.3 Mon Jul 25 19:16:49 2016 (r303316) +++ stable/9/share/man/man3/siginfo.3 Mon Jul 25 19:18:42 2016 (r303317) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2012 +.Dd July 14, 2016 .Dt SIGINFO 3 .Os .Sh NAME @@ -54,7 +54,7 @@ In either case, the system returns the i .Vt siginfo_t , which includes the following information: .Bl -column ".Vt union signal" ".Va si_overrun" -.It Sy "Type Member Description" +.It Sy Type Ta Sy Member Ta Sy Description .It Vt int Ta Va si_signo Ta signal number .It Vt int Ta Va si_errno Ta @@ -107,7 +107,7 @@ for use as values of that are signal-specific or non-signal-specific reasons why the signal was generated: .Bl -column ".Dv SIGPOLL" ".Dv CLD_CONTINUED" -.It Sy "Signal Code Reason" +.It Sy Signal Ta Sy Code Ta Sy Reason .It Dv SIGILL Ta Dv ILL_ILLOPC Ta illegal opcode .It Ta Dv ILL_ILLOPN Ta @@ -206,7 +206,7 @@ signal sent by .Pp In addition, the following signal-specific information is available: .Bl -column ".Dv SIGPOLL" ".Dv CLD_CONTINUED" -.It Sy "Signal Member Value" +.It Sy Signal Ta Sy Member Ta Sy Value .It Dv SIGILL Ta Va si_addr Ta address of faulting instruction .It Ta Va si_trapno Ta @@ -240,8 +240,8 @@ or .El .Pp Finally, the following code-specific information is available: -.Bl -column ".Dv SI_QUEUE" ".Va si_overrun" -.It Sy "Code Member Value" +.Bl -column ".Dv SI_ASYNCIO" ".Va si_overrun" +.It Sy Code Ta Sy Member Ta Sy Value .It Dv SI_USER Ta Va si_pid Ta the process ID that sent the signal .It Ta Va si_uid Ta From owner-svn-src-all@freebsd.org Mon Jul 25 19:18:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DDF1BA0FCC; Mon, 25 Jul 2016 19:18:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C916511D0; Mon, 25 Jul 2016 19:18:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PJIhuq051979; Mon, 25 Jul 2016 19:18:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PJIh8h051978; Mon, 25 Jul 2016 19:18:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607251918.u6PJIh8h051978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 25 Jul 2016 19:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303317 - in stable: 10/share/man/man3 9/share/man/man3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 19:18:44 -0000 Author: jhb Date: Mon Jul 25 19:18:42 2016 New Revision: 303317 URL: https://svnweb.freebsd.org/changeset/base/303317 Log: MFC 302861: Fix rendering issues. - Use Ta to separate column headers. - Correct width of the 'Code' column in the last table. Modified: stable/10/share/man/man3/siginfo.3 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/share/man/man3/siginfo.3 Directory Properties: stable/9/share/man/man3/ (props changed) Modified: stable/10/share/man/man3/siginfo.3 ============================================================================== --- stable/10/share/man/man3/siginfo.3 Mon Jul 25 19:16:49 2016 (r303316) +++ stable/10/share/man/man3/siginfo.3 Mon Jul 25 19:18:42 2016 (r303317) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2012 +.Dd July 14, 2016 .Dt SIGINFO 3 .Os .Sh NAME @@ -54,7 +54,7 @@ In either case, the system returns the i .Vt siginfo_t , which includes the following information: .Bl -column ".Vt union signal" ".Va si_overrun" -.It Sy "Type Member Description" +.It Sy Type Ta Sy Member Ta Sy Description .It Vt int Ta Va si_signo Ta signal number .It Vt int Ta Va si_errno Ta @@ -107,7 +107,7 @@ for use as values of that are signal-specific or non-signal-specific reasons why the signal was generated: .Bl -column ".Dv SIGPOLL" ".Dv CLD_CONTINUED" -.It Sy "Signal Code Reason" +.It Sy Signal Ta Sy Code Ta Sy Reason .It Dv SIGILL Ta Dv ILL_ILLOPC Ta illegal opcode .It Ta Dv ILL_ILLOPN Ta @@ -206,7 +206,7 @@ signal sent by .Pp In addition, the following signal-specific information is available: .Bl -column ".Dv SIGPOLL" ".Dv CLD_CONTINUED" -.It Sy "Signal Member Value" +.It Sy Signal Ta Sy Member Ta Sy Value .It Dv SIGILL Ta Va si_addr Ta address of faulting instruction .It Ta Va si_trapno Ta @@ -240,8 +240,8 @@ or .El .Pp Finally, the following code-specific information is available: -.Bl -column ".Dv SI_QUEUE" ".Va si_overrun" -.It Sy "Code Member Value" +.Bl -column ".Dv SI_ASYNCIO" ".Va si_overrun" +.It Sy Code Ta Sy Member Ta Sy Value .It Dv SI_USER Ta Va si_pid Ta the process ID that sent the signal .It Ta Va si_uid Ta From owner-svn-src-all@freebsd.org Mon Jul 25 19:37:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB92BBA1630; Mon, 25 Jul 2016 19:37:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6D341D14; Mon, 25 Jul 2016 19:37:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PJbAni059307; Mon, 25 Jul 2016 19:37:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PJbAum059304; Mon, 25 Jul 2016 19:37:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607251937.u6PJbAum059304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jul 2016 19:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303318 - in stable/11/contrib/llvm/projects/libunwind: include src X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 19:37:12 -0000 Author: emaste Date: Mon Jul 25 19:37:10 2016 New Revision: 303318 URL: https://svnweb.freebsd.org/changeset/base/303318 Log: Merge LLVM libunwind fixes r302475: libunwind: limit stack usage in unwind cursor This may be reworked upstream but in the interim should address the stack usage issue reported in the PR. r303061: libunwind: Properly align _Unwind_Exception. _Unwind_Exception is required to be double word aligned. GCC has interpreted this to mean "use the maximum useful alignment for the target" so follow that lead. PR: 206384 (r302475) Obtained from: LLVM review D22543 (r303061) Approved by: re (gjb) Modified: stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h stable/11/contrib/llvm/projects/libunwind/include/unwind.h stable/11/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h ============================================================================== --- stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h Mon Jul 25 19:18:42 2016 (r303317) +++ stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h Mon Jul 25 19:37:10 2016 (r303318) @@ -22,30 +22,37 @@ # define _LIBUNWIND_TARGET_I386 1 # define _LIBUNWIND_CONTEXT_SIZE 8 # define _LIBUNWIND_CURSOR_SIZE 19 +# define _LIBUNWIND_MAX_REGISTER 9 # elif defined(__x86_64__) # define _LIBUNWIND_TARGET_X86_64 1 # define _LIBUNWIND_CONTEXT_SIZE 21 # define _LIBUNWIND_CURSOR_SIZE 33 +# define _LIBUNWIND_MAX_REGISTER 17 # elif defined(__ppc__) # define _LIBUNWIND_TARGET_PPC 1 # define _LIBUNWIND_CONTEXT_SIZE 117 # define _LIBUNWIND_CURSOR_SIZE 128 +# define _LIBUNWIND_MAX_REGISTER 113 # elif defined(__aarch64__) # define _LIBUNWIND_TARGET_AARCH64 1 # define _LIBUNWIND_CONTEXT_SIZE 66 # define _LIBUNWIND_CURSOR_SIZE 78 +# define _LIBUNWIND_MAX_REGISTER 96 # elif defined(__arm__) # define _LIBUNWIND_TARGET_ARM 1 # define _LIBUNWIND_CONTEXT_SIZE 60 # define _LIBUNWIND_CURSOR_SIZE 67 +# define _LIBUNWIND_MAX_REGISTER 96 # elif defined(__or1k__) # define _LIBUNWIND_TARGET_OR1K 1 # define _LIBUNWIND_CONTEXT_SIZE 16 # define _LIBUNWIND_CURSOR_SIZE 28 +# define _LIBUNWIND_MAX_REGISTER 32 # elif defined(__riscv__) # define _LIBUNWIND_TARGET_RISCV 1 # define _LIBUNWIND_CONTEXT_SIZE 128 /* XXX */ # define _LIBUNWIND_CURSOR_SIZE 140 /* XXX */ +# define _LIBUNWIND_MAX_REGISTER 96 # else # error "Unsupported architecture." # endif @@ -58,6 +65,7 @@ # define _LIBUNWIND_TARGET_OR1K 1 # define _LIBUNWIND_CONTEXT_SIZE 128 # define _LIBUNWIND_CURSOR_SIZE 140 +# define _LIBUNWIND_MAX_REGISTER 120 #endif // _LIBUNWIND_IS_NATIVE_ONLY #endif // ____LIBUNWIND_CONFIG_H__ Modified: stable/11/contrib/llvm/projects/libunwind/include/unwind.h ============================================================================== --- stable/11/contrib/llvm/projects/libunwind/include/unwind.h Mon Jul 25 19:18:42 2016 (r303317) +++ stable/11/contrib/llvm/projects/libunwind/include/unwind.h Mon Jul 25 19:37:10 2016 (r303318) @@ -128,7 +128,7 @@ struct _Unwind_Exception { // added for binary compatibility. uint32_t reserved[3]; #endif -}; +} __attribute__((__aligned__)); typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (int version, Modified: stable/11/contrib/llvm/projects/libunwind/src/DwarfParser.hpp ============================================================================== --- stable/11/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Mon Jul 25 19:18:42 2016 (r303317) +++ stable/11/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Mon Jul 25 19:37:10 2016 (r303318) @@ -62,7 +62,7 @@ public: }; enum { - kMaxRegisterNumber = 120 + kMaxRegisterNumber = _LIBUNWIND_MAX_REGISTER }; enum RegisterSavedWhere { kRegisterUnused, From owner-svn-src-all@freebsd.org Mon Jul 25 20:02:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A5C1BA41D6; Mon, 25 Jul 2016 20:02:13 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE3DB105D; Mon, 25 Jul 2016 20:02:12 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PK2CYZ073649; Mon, 25 Jul 2016 20:02:12 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PK2CVS073648; Mon, 25 Jul 2016 20:02:12 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201607252002.u6PK2CVS073648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 25 Jul 2016 20:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303319 - stable/11/usr.sbin/camdd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 20:02:13 -0000 Author: asomers Date: Mon Jul 25 20:02:11 2016 New Revision: 303319 URL: https://svnweb.freebsd.org/changeset/base/303319 Log: MFC r303091 Fix camdd for host-aware and host-managed SMR disks. This should've gone in as part of r300207 Approved by: re (gjb) Modified: stable/11/usr.sbin/camdd/camdd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/camdd/camdd.c ============================================================================== --- stable/11/usr.sbin/camdd/camdd.c Mon Jul 25 19:37:10 2016 (r303318) +++ stable/11/usr.sbin/camdd/camdd.c Mon Jul 25 20:02:11 2016 (r303319) @@ -1292,6 +1292,7 @@ camdd_probe_pass(struct cam_device *cam_ case T_CDROM: case T_OPTICAL: case T_RBC: + case T_ZBC_HM: break; default: errx(1, "Unsupported SCSI device type %d", scsi_dev_type); From owner-svn-src-all@freebsd.org Mon Jul 25 20:49:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B781BA4AA8; Mon, 25 Jul 2016 20:49:17 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B1441795; Mon, 25 Jul 2016 20:49:17 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PKnGhA089426; Mon, 25 Jul 2016 20:49:16 GMT (envelope-from rene@FreeBSD.org) Received: (from rene@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PKnGGJ089425; Mon, 25 Jul 2016 20:49:16 GMT (envelope-from rene@FreeBSD.org) Message-Id: <201607252049.u6PKnGGJ089425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rene set sender to rene@FreeBSD.org using -f From: Rene Ladan Date: Mon, 25 Jul 2016 20:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303320 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 20:49:17 -0000 Author: rene (doc,ports committer) Date: Mon Jul 25 20:49:16 2016 New Revision: 303320 URL: https://svnweb.freebsd.org/changeset/base/303320 Log: miwi resigned from FreeBSD, update the graph Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Mon Jul 25 20:02:11 2016 (r303319) +++ head/share/misc/organization.dot Mon Jul 25 20:49:16 2016 (r303320) @@ -30,11 +30,11 @@ coresecretary [label="Core Team Secretar doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] -portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nantoine, bapt, bdrewery,\nmat, swills, miwi"] +portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nantoine, bapt, bdrewery,\nmat, swills"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nrene"] re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] secteam [label="Security Team\nsecteam@FreeBSD.org\ndelphij,\ndes, gavin, gjb,\nglebius, remko"] -portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\ndelphij, eadler, feld, jgh, junovitch, miwi, rea, sbz, simon, swills, zi"] +portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\ndelphij, eadler, feld, jgh, junovitch, rea, sbz, simon, swills, zi"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] securityofficer [label="Security Officer Team\nsecurity-officer@FreeBSD.org\ncperciva, simon, nectar"] srccommitters [label="Src Committers\nsrc-committers@FreeBSD.org"] From owner-svn-src-all@freebsd.org Mon Jul 25 21:07:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E2A8BA4F59 for ; Mon, 25 Jul 2016 21:07:15 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::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 E896B1452 for ; Mon, 25 Jul 2016 21:07:14 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x229.google.com with SMTP id q128so149612552wma.1 for ; Mon, 25 Jul 2016 14:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FAWMfwkadTr31u2STBe+gTDT9htQmCxlrMTSePbRvHQ=; b=1ovZZPJHwpEd4+fF2td/Pur1Uizaj0K7qHPnpcReOtu/gRl/6kSFlwFi2fhdqnqmPY QxpHcs4rhU4x4Yr1zaVRAQgkXwowhlP0mSPY6/q8tFoQOi/CkuggMAu/7ZAGeR5PydW9 N8uGpUEXHgtfx7NYvQOH/GUzzjRGq+iZAhI4LxcddhvyiTYgkG9/GQynzbpN+3UIITeG YQ59Q3VbDj7k1ZX8Qbs2Dyx2dONYbSNIgd9bpo0c13eFbGLc53lN0jIY5MBeMjPYZzuo pW41gfNt0Ezj0TZSFAmpISZrQAMHo3lkSv0zH+P2ryOjoOxc0HyPUbOKVMFHp8aj9r2l o3Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FAWMfwkadTr31u2STBe+gTDT9htQmCxlrMTSePbRvHQ=; b=kW5wplvj9r1Qau2rZ0o8jm5FkC7aYoQASXmYjcSv8FMKAsHnPXbjr10evmi61GPzOC 2hhduUCUs1dUL5JqJb8I7ywSPJinWc/bM22kzWC/ENFBXIoSLwOsjs3vbvrH7Ve8LBMo eeWZDzLcXPkQ3thQk8xodie3yK8n1gFfLwj5pjYhRzLNvCKvv8pAHzEcZQLvHjItHYCr f/GoaDUJejyduSwBEioU0ZOBh3WrdepbqtNPYloZ+9duBvWyo/y6PMIUpLvi+liYCM2N Iwqnt6715IZCnhLMdKlerP1K4lcp9gYOExP8RnrS5o5m/2x1tAtohcS7u/m33sFrRDSM GOmQ== X-Gm-Message-State: AEkoouudggUZKtBbnucM7PWRhlIu4Kpigr4y4gWwMD2nxnAi7u6oOCPnx4k3NQK4t4Vhx9ZhdjBjiH9+uyXltc7C X-Received: by 10.28.17.138 with SMTP id 132mr21272949wmr.81.1469480833366; Mon, 25 Jul 2016 14:07:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.73.99 with HTTP; Mon, 25 Jul 2016 14:07:12 -0700 (PDT) In-Reply-To: <201505091911.t49JB2gh067512@svn.freebsd.org> References: <201505091911.t49JB2gh067512@svn.freebsd.org> From: Oliver Pinter Date: Mon, 25 Jul 2016 23:07:12 +0200 Message-ID: Subject: Re: svn commit: r282684 - in head/sys: amd64/amd64 amd64/include x86/include x86/xen To: Konstantin Belousov 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 21:07:15 -0000 On Sat, May 9, 2015 at 9:11 PM, Konstantin Belousov wrote: > Author: kib > Date: Sat May 9 19:11:01 2015 > New Revision: 282684 > URL: https://svnweb.freebsd.org/changeset/base/282684 > > Log: > Rewrite amd64 PCID implementation to follow an algorithm described in > the Vahalia' "Unix Internals" section 15.12 "Other TLB Consistency > Algorithms". The same algorithm is already utilized by the MIPS pmap > to handle ASIDs. > > The PCID for the address space is now allocated per-cpu during context > switch to the thread using pmap, when no PCID on the cpu was ever > allocated, or the current PCID is invalidated. If the PCID is reused, > bit 63 of %cr3 can be set to avoid TLB flush. > > Each cpu has PCID' algorithm generation count, which is saved in the > pmap pcpu block when pcpu PCID is allocated. On invalidation, the > pmap generation count is zeroed, which signals the context switch code > that already allocated PCID is no longer valid. The implication is > the TLB shootdown for the given cpu/address space, due to the > allocation of new PCID. > > The pm_save mask is no longer has to be tracked, which (significantly) > reduces the targets of the TLB shootdown IPIs. Previously, pm_save > was reset only on pmap_invalidate_all(), which made it accumulate the > cpuids of all processors on which the thread was scheduled between > full TLB shootdowns. > > Besides reducing the amount of TLB shootdowns and removing atomics to > update pm_saves in the context switch code, the algorithm is much > simpler than the maintanence of pm_save and selection of the right > address space in the shootdown IPI handler. > > Reviewed by: alc > Tested by: pho > Sponsored by: The FreeBSD Foundation > MFC after: 3 weeks > > Modified: > head/sys/amd64/amd64/apic_vector.S > head/sys/amd64/amd64/cpu_switch.S > head/sys/amd64/amd64/genassym.c > head/sys/amd64/amd64/machdep.c > head/sys/amd64/amd64/mp_machdep.c > head/sys/amd64/amd64/pmap.c > head/sys/amd64/amd64/vm_machdep.c > head/sys/amd64/include/cpufunc.h > head/sys/amd64/include/pcpu.h > head/sys/amd64/include/pmap.h > head/sys/amd64/include/smp.h > head/sys/x86/include/specialreg.h > head/sys/x86/xen/xen_apic.c > > Modified: head/sys/amd64/amd64/apic_vector.S > [snip] Hi! Are you still plan to MFC back these PCID related changes to 10-STABLE, or there is a good reason no merge them back or the MFC was just have forgotten? Thanks, Oliver From owner-svn-src-all@freebsd.org Mon Jul 25 21:19:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D0B4BA47B6 for ; Mon, 25 Jul 2016 21:19:55 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c: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 22FA61445 for ; Mon, 25 Jul 2016 21:19:55 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x22a.google.com with SMTP id f65so150533332wmi.0 for ; Mon, 25 Jul 2016 14:19:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/iyFrrgRtn3DZd4k39rmr+AhEHaazQ3i6f0lv9KKZkI=; b=SYnzf8zUYOf/SSS8dWTWTRe3ynsegsIy4JV0F3vNY+Yp10SluWYNQ+oJ765e+r9nI9 HdSI9eiKq5cYU7nhkbbLvkRtW3QehF01/splg1jel/5O/Z73eCk5NxrZCUAIq/euKklC +D07p2280Zz0z/BCvE4TFUIJWgJ2JhyaDibM4+pcR3nHWTCcXCf0j18zDK4NvUD9GDgx EJ7Za6+cAz6bj/SgudTDlzzMDjyN8QriMg9God8TNpyKfI6wkQtc/G7US8YUfauiekOJ pYzoy+VtnFaXw1y34Xl26M9PWQxpLtz8Hy5FX4yHq0IVrLkTQQ9DCf/pgwNFAc6KKdRO kuKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/iyFrrgRtn3DZd4k39rmr+AhEHaazQ3i6f0lv9KKZkI=; b=Ge/LQ+8Gnmz3eYOD0whK49vkb2MvAcb/PESNskEMbd70zspwiYV99rVSsCAaFhPPjF wd8r5k5OZOTBs2XYdXQvBDpons2R+QN1pTFB4O1o1DrjrhisPV6KZWrMM14sXfwbWxn5 oH1/wDRFqiVsX3FAXyE0xqqqhC3+IeHQHkH0bJomviMfJYJ/1yuhGAnizno3hmxi636y VjoIHQWjIFNyJNa3KWZAiMZQhkHSVWQi81r1qyD1c7Rj2ntch7kjrwljX32A1+7kANBd sYLOX1GXxC6p/3ctQYuPFULU4T1StAl5Id20FpIRrGCVYXaBu3uq+ZQIaOiaAzmTkUBr /apw== X-Gm-Message-State: AEkoouvn9q6QKxNZKf/EXVU2qmCWfkS0Q+fOp5Eh09n2kMKu+QGtnDx2+jexyjUwcWDaaRjvFnp61H6x5ySLQAoJ X-Received: by 10.28.182.84 with SMTP id g81mr3800063wmf.20.1469481593656; Mon, 25 Jul 2016 14:19:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.73.99 with HTTP; Mon, 25 Jul 2016 14:19:53 -0700 (PDT) In-Reply-To: <201510291907.t9TJ70UN004616@repo.freebsd.org> References: <201510291907.t9TJ70UN004616@repo.freebsd.org> From: Oliver Pinter Date: Mon, 25 Jul 2016 23:19:53 +0200 Message-ID: Subject: Re: svn commit: r290156 - head/sys/amd64/amd64 To: Konstantin Belousov Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , "Conrad E. Meyer" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 21:19:55 -0000 On Thu, Oct 29, 2015 at 8:07 PM, Conrad E. Meyer wrote: > Author: cem > Date: Thu Oct 29 19:07:00 2015 > New Revision: 290156 > URL: https://svnweb.freebsd.org/changeset/base/290156 > > Log: > pmap_change_attr: Only fixup DMAP for DMAPed ranges > > pmap_change_attr must change the memory type of both the requested KVA > and the corresponding DMAP mappings (if such mappings exist), to satisfy > an Intel requirement that two or more mappings to the same physical > pages must have the same memory type. > > However, not all kernel mapped pages have corresponding DMAP mappings -- > for example, 64-bit BARs. Skip fixing up the DMAP for out-of-bounds > addresses. > > Submitted by: Steve Wahl > Reviewed by: alc, jhb > Sponsored by: Dell Compellent > Differential Revision: https://reviews.freebsd.org/D4030 > > Modified: > head/sys/amd64/amd64/pmap.c Hi Konstantin! MFC back this to 10-STABLE? Sure, it was never marked as MFC, but cem@ never mark them. Thanks, Oliver > > Modified: head/sys/amd64/amd64/pmap.c > ============================================================================== > --- head/sys/amd64/amd64/pmap.c Thu Oct 29 19:02:24 2015 (r290155) > +++ head/sys/amd64/amd64/pmap.c Thu Oct 29 19:07:00 2015 (r290156) > @@ -6411,7 +6411,7 @@ pmap_change_attr_locked(vm_offset_t va, > */ > for (tmpva = base; tmpva < base + size; ) { > pdpe = pmap_pdpe(kernel_pmap, tmpva); > - if (*pdpe == 0) > + if (pdpe == NULL || *pdpe == 0) > return (EINVAL); > if (*pdpe & PG_PS) { > /* > @@ -6484,7 +6484,8 @@ pmap_change_attr_locked(vm_offset_t va, > X86_PG_PDE_CACHE); > changed = TRUE; > } > - if (tmpva >= VM_MIN_KERNEL_ADDRESS) { > + if (tmpva >= VM_MIN_KERNEL_ADDRESS && > + (*pdpe & PG_PS_FRAME) < dmaplimit) { > if (pa_start == pa_end) { > /* Start physical address run. */ > pa_start = *pdpe & PG_PS_FRAME; > @@ -6513,7 +6514,8 @@ pmap_change_attr_locked(vm_offset_t va, > X86_PG_PDE_CACHE); > changed = TRUE; > } > - if (tmpva >= VM_MIN_KERNEL_ADDRESS) { > + if (tmpva >= VM_MIN_KERNEL_ADDRESS && > + (*pde & PG_PS_FRAME) < dmaplimit) { > if (pa_start == pa_end) { > /* Start physical address run. */ > pa_start = *pde & PG_PS_FRAME; > @@ -6540,7 +6542,8 @@ pmap_change_attr_locked(vm_offset_t va, > X86_PG_PTE_CACHE); > changed = TRUE; > } > - if (tmpva >= VM_MIN_KERNEL_ADDRESS) { > + if (tmpva >= VM_MIN_KERNEL_ADDRESS && > + (*pte & PG_PS_FRAME) < dmaplimit) { > if (pa_start == pa_end) { > /* Start physical address run. */ > pa_start = *pte & PG_FRAME; > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Mon Jul 25 23:04:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A6C2BA4747; Mon, 25 Jul 2016 23:04:22 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B6CF1485; Mon, 25 Jul 2016 23:04:22 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PN4LTt044012; Mon, 25 Jul 2016 23:04:21 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PN4LQw044011; Mon, 25 Jul 2016 23:04:21 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201607252304.u6PN4LQw044011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 25 Jul 2016 23:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r303321 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 23:04:22 -0000 Author: sbruno Date: Mon Jul 25 23:04:21 2016 New Revision: 303321 URL: https://svnweb.freebsd.org/changeset/base/303321 Log: Temp raise of my limit as I thwack a bunch of firmware files into base. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Mon Jul 25 20:49:16 2016 (r303320) +++ svnadmin/conf/sizelimit.conf Mon Jul 25 23:04:21 2016 (r303321) @@ -26,3 +26,4 @@ mm obrien peter rwatson +sbruno From owner-svn-src-all@freebsd.org Mon Jul 25 23:05:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34D0CBA47A4; Mon, 25 Jul 2016 23:05:27 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5EC91619; Mon, 25 Jul 2016 23:05:26 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PN5PYj044101; Mon, 25 Jul 2016 23:05:25 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PN5PMa044097; Mon, 25 Jul 2016 23:05:25 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201607252305.u6PN5PMa044097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 25 Jul 2016 23:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303322 - in head: share/man/man4 sys/conf sys/contrib/dev/iwm sys/modules/iwmfw sys/modules/iwmfw/iwm3160fw sys/modules/iwmfw/iwm7260fw sys/modules/iwmfw/iwm7265fw sys/modules/iwmfw/iw... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 23:05:27 -0000 Author: sbruno Date: Mon Jul 25 23:05:25 2016 New Revision: 303322 URL: https://svnweb.freebsd.org/changeset/base/303322 Log: Update iwmfw(4) to include support for 8260 series units and update f/w for the other devices supported by this driver. Patch linked in https://reviews.freebsd.org/D6967 but not actually a part of the review. Obtained from DragonflyBSD. Submitted by: Kevin Bowling MFC after: 2 weeks Relnotes: yes Added: head/sys/contrib/dev/iwm/iwm-3160-16.fw.uu head/sys/contrib/dev/iwm/iwm-7260-16.fw.uu head/sys/contrib/dev/iwm/iwm-7265-16.fw.uu head/sys/contrib/dev/iwm/iwm-8000C-16.fw.uu head/sys/modules/iwmfw/iwm8000Cfw/ head/sys/modules/iwmfw/iwm8000Cfw/Makefile (contents, props changed) Modified: head/share/man/man4/iwmfw.4 head/sys/conf/files head/sys/contrib/dev/iwm/iwm-3160-9.fw.uu head/sys/contrib/dev/iwm/iwm-7260-9.fw.uu head/sys/contrib/dev/iwm/iwm-7265-9.fw.uu head/sys/modules/iwmfw/Makefile head/sys/modules/iwmfw/iwm3160fw/Makefile head/sys/modules/iwmfw/iwm7260fw/Makefile head/sys/modules/iwmfw/iwm7265fw/Makefile Modified: head/share/man/man4/iwmfw.4 ============================================================================== --- head/share/man/man4/iwmfw.4 Mon Jul 25 23:04:21 2016 (r303321) +++ head/share/man/man4/iwmfw.4 Mon Jul 25 23:05:25 2016 (r303322) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 28, 2015 +.Dd June 25, 2016 .Dt IWMFW 4 .Os .Sh NAME @@ -45,6 +45,7 @@ of the following: .Cd "device iwm3160fw" .Cd "device iwm7260fw" .Cd "device iwm7265fw" +.Cd "device iwm8000Cfw" .Ed .Pp Alternatively, to load the driver as a @@ -54,10 +55,11 @@ module at boot time, place the following iwm3160fw_load="YES" iwm7260fw_load="YES" iwm7265fw_load="YES" +iwm8000Cfw_load="YES" .Ed .Sh DESCRIPTION This module provides access to firmware sets for the -Intel Dual Band Wireless WiFi 3160, 7260 and 7265 series of +Intel Dual Band Wireless WiFi 3160, 7260, 7265 and 8260 series of IEEE 802.11n/11ac adapters. It may be statically linked into the kernel, or loaded as a module. Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Jul 25 23:04:21 2016 (r303321) +++ head/sys/conf/files Mon Jul 25 23:05:25 2016 (r303322) @@ -1735,7 +1735,7 @@ iwm3160fw.fwo optional iwm3160fw | iwm no-implicit-rule \ clean "iwm3160fw.fwo" iwm3160.fw optional iwm3160fw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-3160-9.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-3160-16.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm3160.fw" @@ -1749,7 +1749,7 @@ iwm7260fw.fwo optional iwm7260fw | iwm no-implicit-rule \ clean "iwm7260fw.fwo" iwm7260.fw optional iwm7260fw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-7260-9.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-7260-16.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7260.fw" @@ -1763,10 +1763,24 @@ iwm7265fw.fwo optional iwm7265fw | iwm no-implicit-rule \ clean "iwm7265fw.fwo" iwm7265.fw optional iwm7265fw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-7265-9.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-7265-16.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7265.fw" +iwm8000Cfw.c optional iwm8000Cfw | iwmfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwm8000C.fw:iwm8000Cfw -miwm8000Cfw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwm8000Cfw.c" +iwm8000Cfw.fwo optional iwm8000Cfw | iwmfw \ + dependency "iwm8000C.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "iwm8000Cfw.fwo" +iwm8000C.fw optional iwm8000Cfw | iwmfw \ + dependency "$S/contrib/dev/iwm/iwm-8000C-16.fw.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "iwm8000C.fw" dev/iwn/if_iwn.c optional iwn iwn1000fw.c optional iwn1000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn1000.fw:iwn1000fw -miwn1000fw -c${.TARGET}" \ Added: head/sys/contrib/dev/iwm/iwm-3160-16.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwm/iwm-3160-16.fw.uu Mon Jul 25 23:05:25 2016 (r303322) @@ -0,0 +1,20408 @@ +begin 644 iwm-3160-16.fw +M`````$E73`IS=')E86TZ0V]R94-Y8VQE,3-?0=P!'8!,`2`0`;<`@``&$/'!TB!``=)N@=P!`!`!LPZ!W`$8($&R0(`!LE +M!"C`$>D/`&$``!LE``$;)%P$7`$)!% +MP!!@``!AX`3`$N@=P!$!`%(DM!_`$`(`$W`#``!A"`!8,`@`9#$'``!A#Q-2 +M(H($$R0(`!,E`0!2;@$``&$!``!A````80@`6&[H#P!A```3)0``$R0D$,`1 +M`(`3)#@!,B!`#*$0```20```$E"0`` +M84``$R4&`1,D!"C`$0]V$R(L2,<1#W@3(@``QA$#``$D```!)0]%`"(`7``Y +M[_\`,A@``&0``!,D`0`3)3@@=P!#F_Q,R__\3,^@=P!$```$D"``!)0\!8R(! +M`%(D"``';@(``&$``!4D````(0X``&'8!,`2Z!W`$0$`4B2T'\`0`@`3<`(` +M`&$(`&0QY@\`80\34B(/$U(B`0!2;@$``&$!``!A````81PJ@($``,`6`@$3 +M9$(!$R0$*,`18'Z`@0``P!8&`1-B!`C`$`0`$V0/7``B"@``0``&`'`:``!A +M```3)```$R4``,`7`$!8,,@@P!!P1<`0$`C`$```$R4#`!,D'`C`$1P(P!$` +M`!,D!`C`$0\4%2($`!4F#S`@(OO_,#(#`!,D&`C`$0\4%2("`!4F#R`P(@`` +M$R001<`1&`C`$0`06#`/`!,B`0`3,`0HP!$/?!,B"`#,$0``$R4``!,D-$C' +M$4``$R4'`1,D!"C`$0][$R(!`!,P!"C`$0\4%2("`!4F#TT3(@00Q1$"`!,D +M\!S`$0$`$R3L',`1```3)'``$R40',`1```3)0``$R3@',`14'Z`@0``P!8" +M`1-B#Q05(AL`%28``!,E`0`3)"00P!$``!,D``#`%P``%20````A```;)0`` +M&R0!`&1N`0`;)`(`9&X"`!LD!`!D;@0`&R0,`!MB#QL+(@\+8R(!`!M``@`; +M00```&$``!LE"`B`@0`;&B@``,`6```;)0(`&T```!MQ#V1C(@``'20````A +M```````````(```````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````1`"`````````````#!`0``0!$`X0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$!`/$`D0$`4*$`L0$!`0`A`0#1`0$!`0$!`0$!`0!@,0$!`0$!`0$!`0 +M$!`0$`@0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`'$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$`````````0`S`,!``X`[`8%`,0`2`0&`$``#`4'`-@`9`4(`&@`/`8) +M`$``I`8*`#P`T`,+`#P`#`0/``@`Y`81`!@`3`42`*0!```3``P`_`84``,` +M"`<5``0`#`<````````````````````````````````````````````````` +M```````>````'H@>B%H```!6````5HA6B`(!``"J````JHBJB/X!``","@`` +M5(Q4C*0?````````````````_@```0#_``(!_P$`_P$!`/X"`0,"_P$!`/\! +M`0'_`@#_`P(`_@0"`P+_`@(`_P("`?\#`/\%`P#^!@,``_\#`P#_`P,!_P`` +M`````````````)1)```*````!````'A]@`````````````````#T20``!0`` +M``0```!X?8````````$```"8^```&/D``+#X``#T^```U/4``-#U``!D-P`` +M%#8``&0V```````````````!"_\```4#```$`@``!O\```#_```,_P``!_\` +M``C_```)_P``"O\```+_`0#_``$"`!$!`0(!`0$#_P$!!`(!`04#`0$&!`$! +M!P4!`0@&`0$)#P$!"A`!``S_`0#^_P(`_P<"`0'_`@(""`("`PD"`@0*`@(% +M"P("!@P"`@<-`@((#@(""0X"`@H-`@`,_P(`_O\````````````````````` +M``#_!P```/\```?_``$)"```"O\!`@```0,!_P$#`O\!`P/_`0$$_P$"!0`! +M`0O_`0(,_P$$!@8!`0?_`0`(_P$`"O\"`@#_`@,!_P(#`O\"`P/_`@$$`0(" +M!0`"`0L!`@(,`0($!@8"`@<``@`(`0(`"@$#`/\"`P,`_P,#`?\#`P+_`P,# +M!`,!!`4#`@4``P$+!0,"#`4#!`8&`P,'_P,`"`4#``H%`P#^`P0$`/\$!`'_ +M!`0"_P0$`_\$!`3_!`0%_P0$"_\$!`S_!`0&!@0$!P8$``C_!``*_P`````` +M``````#_`````0,``@("``,``@``!?\```;_```$_P``!P0```C_`0#_`0$! +M``,!`@$"`0("`@$`!/\!`0<$`0`(_P(#``8"`@(&`@`%_P(`!O\"``3_`@`' +M!P(`"`<#`P`&`P`!!0,"`@8#`07_`P`&_P,`!`<#``<'`P`(!P```````0#_ +M`0#_``$``?\!`@+_`@#_`0(``?\"`0/_`@,$_P(""O\"`@G_`@((_P,``?\# +M`0,*`P4%"@,$!O\#!@H(`P,)_P0`_P,$``'_!`$#"P0"!PL$`@@$!`,$_P0" +M"@D$!`G_!`0&_P4`_P(%!`;_!0$#!@4``?\%!0K_!04)!08`__\&!`;_!@$# +M!@8``?\&`P3_!@8)!P8&"O\```````````````````````@$#`(*!@X!"04- +M`PL'#P&1```!/P```I$``#X]```#D0``/3T```21```_`P``!9$```D0```& +MD0``%AP```>1```?'P``")$``!P6```)D0``$`D```J1```#/P``"Y$``#T] +M```,D0``/3X```V1```_`0``$1`^2$A(X!`$````#2`$````($,Y`````."$ +M`0``X1`!`````A"7RP4`,&`+````#]($````&-+\__\?">")AH2$"N"$A``` +M"^"F5=<@#.`BBRPR#>"JB8>^PQ%^"2C(N*&."*B@``&>!^2><@&N`B +MBRPR&^"33;>^PQ)&```````G,`````$2`4A0$``F#^%````V`1%``` +M!F`1%```&1`$`````7,P`0``81`@````$B"4`P``UA`<8P``UQ`<8P``V!`< +M8P``V1!Z@(``VA!X@(``VQ!X@(``"1!N7P``&A``````,1"&`0``,A"0`0`` +M,Q#(````-!!0````-1"`````.A!I````.Q#`````P1``````*N#YY>`>>^PQ*."+BXF)*>")B0```D'AX;%Q02"AX> +M'AX>'AX;%Q02"AX>'AX>'AX;%Q02"AX>````````````````(+'V````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````#0,H`!`#*``5`R@`%`,H`!,#*``'!R@`$`@H``H)*``;!"@`!@DH`!X +M)*``?"2@`(`DH`"$)*``4!"@`$@FH`!@$*``3":@`&00H`!H$*``6!"@`#`0 +MH``\$*``-!"@`"P,H```@:0``8&D``.!I`"()*``C"2@`)`DH`"4)*``F"2@ +M`)PDH`"@)*``I"2@``````````````````````!Q&PT`X($!`!:?`@`````` +M``````````!Q`0G?``#H``#B```^`5<_`69``7=!`9A"`0`/C.``*^`!;/``C3``C0``C4``C1``C5``C2`!C6```Q`"0$`$PX``#E +M`7/F`02/`?^#`6F.`0^0`0"1`7V2`7V3`7U9``;]``'^`!/_``9N``1\`0V` +M`0VY`07.`0*]`0G'`1_(`1:D`1"E`1"K`1"J`1"R`1.S`1/?`0'7`0!Z`0`` +M``````,!!0`0``0`$0`2``,`"@`T`34!-@$E``H`!``/``,!.``0`!(````' +M#!,`!!.``.P2@``H$X``Z!*```,!`@$%``0`$``*``8`?`&``7,!=P&7`9D! +ME@&8`=P!)0":`9P!```````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````0````(`````````+A$O%S`0,2@R$3/R-B(X$3D7.A`[*#P1 +M/?)`(D$!2#A).$HN2RY4'%4<5AQ7'%HX6SA<.%TX8%AA6'@X>3B('(DP``M'L``(P7``!L&```Z!<``&P7``!H&```9!<``%@7``!<%P``8!<` +M`$QP``"D<```?'```'1P``#_____________________!````/__________ +M_____P,```#_____``````````#_____``````````#_____```````````# +M````$`````,`````````````````````````_P``````````````_P`````` +M`````````````````````0`````!_P```O\```,!```%_P``!O\```C_```' +M_P``"?\```K_```+_P``#/\!`/\#`0$```$!`@H!`@4$`0$&_P$!!_\!`PH' +M`0$+_P$!#/\#`/\"`P,```,$!00#!0;_`P,*!P,!"_\#`PS_`@#_`P("```" +M`@0&`@(%_P("!O\"`@?_`@0*!P(""_\"`0P%!`#_`@0$```$`0$)!`0$!@0$ +M!?\$!0;_!`0*!P0""_\$`0P%!0#_`P4%```%!`C_!04'"`4#"?\%!0;_!04$ +M_P`````````````````````%```````````````>````$````!``````(@`B +M$3,1,_#P\/#`P,#`_/S\_/[^_OZJJJJJJJJJJJJJJJZJJJJJ*/\`S*JJ``"J +MJ@#,JJH```!``,```````%``\`!0`/"JJJJJJJJJJJJJJJJJJJJJ*/\`S*JJ +M``"JJ@#,JJH``````````````%``\`!0`/"JJJJJJJJJJJJJJNZJJJJJ*/\` +MS*JJ``"JJ@#,JJH```!``,``0`#``%``\`!0`/`'````#P`````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````__\``/__`````````````/__``#__P````````````#__P``__]@)P`` +MY"<``*@G``"D)P``C"<``&PG``!,*```D"@``&PH``#,)P``K"<````````` +M````````````````````````````````````````````````````!P```````````````!`0X.````````,@@"#P,` +M`0`````````!`0X.````````(P0""@````````````#T`0`````````````` +M`````````'Q/@``````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````$`````"0`0```*``$"<` +M`.@#``#H`P``]".``/0C@``0A(``#(2```R$@``,A(``$(2```R$@``,A(`` +M#(2```R$@``0A(``$(2```R$@``0A(``#(2``/__```!``````````````!$ +M)`$`1"0!`$0D`0`H!@$`1"0!`$0D`0!<"`$`1"0!`$S^```0!0$`1"0!`$0D +M`0!$)`$`1"0!`$0D`0!$)`$`1"0!`$0D`0!$)`$`1"0!`$0D`0!$)`$`1"0! +M`/@>`0`@'`$`4!\!`$0D`0!$)`$`1"0!`-@5`0#0(P$`"!@!`,08`0#`%P$` +MV`P!`"@,`0"($0$`7!L!`&0D`0!$)`$`P$`Z'L!`)1[`0#8>@$`$'L!`*1Z`0"<>P$``0`````````` +M``````````````````````````-````4``````$```````!4*(`````````` +M`````````````````````````````)PQ`0`%```"!````'A]@``````````` +M``$``````````@````````!G12,!!0````("`@("`@("`@("`@("`@("`@(" +M`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(" +M`@("`@("`@("`@("`@("`@("`@$"`@("`@("`0$"`@("`@("`@("`@("`@`` +M```0`@``````````````````````````````````Z,J````````````````` +M````````````````````````````"](.T@W2"-()T@K2$M(3TA32&](`8```#_!P!4!P```/\@```````8A(`````` +M```````````````````````````````````````````````````````````` +M_P```/__________________________```````````````````````````` +M````````````````````````````````````````````````````3+$!`-`[ +M`0`4MP$`T#L!`&1N`@#0.P$`W"D!`!Q.`@!L7`$`T#L!`-`[`0`L4@(`+%(" +M`"Q2`@`L4@(`+%("`"Q2`@`L4@(`T#L!`-`[`0#0.P$`T#L!`*2;``#0.P$` +MT#L!`-`[`0#0.P$`T#L!`#Q<`0`D7`$`T#L!`-`[`0`````````````````` +M```````````````````````````````!`````0`````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````0````(````#`````````/\```#_````_P```/\````````` +M``````````````````````````#_````B!,````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````/____\````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`(``````````````````````````_____P`````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````@`````````````````````````#_____```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````"``````````````````````````/____\````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````(``````````````````````````_____P`````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````@``````````````````````````````` +M`````````````````````/\````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``#_____`````/____\`````_____P````#_____```````````/`#\``0`` +M``\`/P`!````#P`_``$````/`#\``0````\`/P`!``````````\`/P`!```` +M#P`_``$````/`#\``0````\`/P`!````#P`_``$`````````#P`_``$````/ +M`#\``0````\`/P`!````#P`_``$````/`#\``0`````````/`#\``0````\` +M/P`!````#P`_``$````/`#\``0````\`/P`!``````````\`/P`!````#P`_ +M``$````/`#\``0````\`/P`!````#P`_``$``````````````*L````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````````.H* +MH@I>"AT*X`FE"6T)-PD$"=,(I`AW"$L((@CZ!],'K@>*!P`````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````%1,```"````!````'A]@`````````````````"P +M3```!0````0```!X?8``````````````!0```PD#"0````````````````<` +M```>`````P```/____\````````````````````````````````````````` +M``````````````````````!F9@X``````&9F"@!F9@8`9F8&`&9F`@!F9@(` +M9F8^`&9F/@!F9CH`9F8Z``````!F9C8``````&9F,@``````9F8.```````` +M````9F8&```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````D`"0D) +M"0D)"0D)``D`"0`)```)```````````````````````````````````````` +M``````````````````````````````````````````````#(!8`````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````#['8P`,Q$``````````!$````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````0%!@<("0H+#`T.#Q`J*RPM+B]*2TQ-3D]0:FML;6YO<(J+C(V. +MCY"JJZRMKJ^PR\S-SL_0T=+3U-76U]C9VMO#C($&QY?#C(%(!Y@#C(&)1YB#C('*AYC#C((+QYD#C()-!YE +M#C(*.1YG#C(+/AYH#C(,0QYI#C(-2!YJ#C(.31YL#C(B4$`-(``D8$`/(#$F +M<$`2(#0H`$$4(#$J$$$7(#$L($$9(#$N,$$<(#,P0$$>(#$R4$$A(#$T8$$C +M(#$V<$$F(#,X`$(H(#$Z$$(K(#$\($(M(#$^,$(P(#-`0$(R(#%D8$1?(C!F +M<$1B(C)H`$5D(B]J$$5G(B]L($5I(B]N,$5L(C)P0$5N(B]R4$5Q(B]T8$5S +M(B]V<$5V(C)X`$9X(B]Z$$9[(B]\($9](B]^,$:`(C&`0$:"(B^"4$:%(@"$ +M8$:'(BZ&<$:*(C&(`$>,(BZ*$$>/(BZ,($>1(BZ.,$>4(C"00$>6(BV12$>8 +M(@"5:$>=(BV7>$>?(C"9"$BB)"V;&$BD)"V=*$BG)"V?.$BI)#"A2$BL)"VE +M:$BQ)"T````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````/``\`#P`/``\`#P`/``\````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````0`!``````#``)``T``` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````#_____H,2`````````````0$(/`$!"#P!`0@\`0$(/`$!" +M#P!`0@\`0$(/`$!"#P!`0@\`0$(/`.`'``!``0``X`<``$`!```@)P``X`<` +M`.`'``!``0``X`<``$`!```"``````````(````````````````````````` +M````````````````````````````````_&R``#SB@``8```````````````` +M`````````/____\````````````````````````````````````````````` +M````````````````````````````````````````^!,"`!P4`@`L%`(`!!0" +M`/03`@`P%`(`W!,"````````4````#`````````````````````````````` +M`$```(`Q``"`#@``````````````````````````````+@```#(````@```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````H!X"```;`@"0'@(`C!T"`'`>`@#PJ0$`,!X"`#`;`@"X'`(`Y!H"`.@: +M`@`````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````"````````````` +M````````@````("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("` +M@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("` +M@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("` +M@("```(```````````````````````````````"```````#_```````````" +M````````````````````````````````@```````_P```````````@`````` +M`````````````````````````(```````/\```````````(````````````` +M``````````````````"```````#_```````````"```````````````````` +M````````````@```````_P```````````@`````````````````````````` +M`````(```````/\```````````(```````````````````````````````"` +M``````#_```````````"````````````````````````````````@``````` +M_P```````````@```````````````````````````````(```````/\````` +M``````(```````````````````````````````"```````#_```````````" +M````````````````````````````````@```````_P```````````@`````` +M`````````````````````````(```````/\```````````(````````````` +M``````````````````"```````#_```````````"```````````````````` +M````````````@```````_P```````````@`````````````````````````` +M`````(```````/\```````````(```````````````````````````````"` +M``````#_``````````````````"!`````````((`````````@P````````"$ +M`````````(4`````````A@````````"'`````````(@`````````B0`````` +M``"*`````````(L`````````C`````````"-`````````(X`````````CP`` +M``````#``0`````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````!(<0``&'$``)QQ +M```P<0``H'$``!!Q``!,<0``_P```/\```#_````_P```/\```#_````_P`` +M`/\```#_````_P```/\```#_````_P```/\```#_````_P```/\```#_```` +M_P```/\```#_````_P```/\```#_````_P```/\```#_````_P```/\```#_ +M````_P`````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````!@@H``<(*``*""@`"P@H``X(*``(""@`"0@H``P(*`` +M-""@`#P@H`!`(:``1"&@`&@AH`!L(:``>"&@`$@AH`!,(:``<"&@`'0AH`!\ +M(:```````/\````````````````````````````````````````````````` +M````````""T"``4```($````>'V``````````````````*QQ```&````!``` +M`'A]@`````````````````!(+@$`"@````0```!X?8`````````````````` +MM&L```4```($````>'V``````````````````$"``0`%```"!````'A]@``` +M```````````````,@0$`!0```@0```!X?8``````````````````]"P"``8` +M````````>'V``'A]@`!X?8``M""@`&P@H```,```_X___P``````````F'V` +M`)A]@`"D(*``.""@``$```#X____``````````"X?8``N'V``*@@H``\(*`` +M$````,?___\``````````-A]@`#8?8``K""@`'@AH`!``0``/_[__P`````` +M````^'V``/A]@`"P(*``?"&@```,``#_\?__``````````#_````_P`````` +M`````````````````````````````````````````````````0#_```````` +M````````````````````````````,"R``,#3@``8``````````$````````` +M`````%`K@`"(TX``&``````````!``````````````!0;(``P.&``!@````` +M`````0`````````````````````````````````````````````````````` +M``#80(``B-F``!@``````````0`````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````__\``/__```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````\`/P`!````#P`_``$````/`#\``0````\` +M/P`!````#P`_``$````/`#\``0````\`/P`!````#P`_``(`````"P`0``L` +M"P`*``L`!H`!``@`"``(``@````(``:``0`(``@`"``(````"``&@`$````` +M``````````!(2#P\````````````````````````````````2$@\/``````` +M``````````````#_?P```````/]_````````_W\```````#_?P```````/]_ +M````````_W\``/]_``````````````````!]>79Y;WEI>7UW=G=O=VEW?75V +M=6]U:75]R%T(8\% +MAP5_!7@%CP.'`W\#>`-]>79Y;WEI>7UW=G=O=VEW?75V=6]U:75]4-R0VQ#9D-Y +M07)!;$%F07HEB-S(VTC9R-Z(7,A;2%G(7T%=@5O!6D%?0-V`V\# +M:0-]>79Y;WEI>7UW=G=O=VEW?75V=6]U:75]7EY8!W +M>7=R=VQW@'5Y=7)U;'6`7%R<6QQ@&]Y;W)O;&^`;7EM6MR:VQK@&EY:7)I;&F`9WEG65R96QE@&-Y8W)C;&.`87EA +M$5Q16M%?T-X0W%#:T-_07A!<4%K080E?25V)6\EA"-](W8C;R.$ +M(7TA=B%O(8<%?P5X!7(%AP-_`W@#<@,``````````/X```#0T+JYM[>XM[@` +M````````````````````````[[ZMWN^^K=[OOJW>[[ZMW@`````````````` +M````````````/'L```H````$````>'V```````#<"P$``````/\````$```` +M````````````````__\``#@Y``!,.0``8#D``.PX``#D.```]#@``&`X``!8 +M.```V.P``/#H``#LZ0``2.H``&SI``#,Z0``).H``"#M```T\P``?/,``"ST +M``"$]```X/,``!CT``!\]```M.D``)CI``#DZ``````````````"`@7_`@,` +M``(!`0$#`P#_`P$!`0,``@(#`@4&```"_P````,```$#``$$!``#`P4``@4& +M`0$!_P$``@(!`P`%`0(%!@````````````````````#L+`(`!@````0```!X +M?8``````````````````#"T"``8````$````>'V````````Q.3HS-CHS-@`` +M``#)``````````4"#0`(!#D4.0``.2,Y`!`,.3DY'!@Y(``*(#F70F!W/#@T +M,"PH)"`<&!00#`@$``0%!00"`@``'049`!,`````2D9-&`````3>W]\$W@`` +M`P`&!@8&!@8```````````,-,(J*.$>*BHJ*BG2*6F0`5H-L3HJ*BHJ*1TX= +MBGIZ9QIV+0`````&%!04!!04%`(4%!0`````!`8`!@0&!@8&!@8&!@8&!@8& +M`@8$``````L'`P`[-S,O*R____'____R#___\A_____R+___\C____)/___R7___\F +M`````````````````````````````(0Q````````A#$``````````````@`` +M``(````4AP$`J(P````````````````````````````````````````/`#\` +M`@````\`/P`"````#P`_``(````/`#\``@````\`/P`"(`````````$```"J +MJJJJJJJJJJJJJNZJJJJJ*/\`S*JJ``"JJ@#,JJH```!``,``0`#``%``\`!0 +M`/`````````````````````````````````````````````````````````` +M``````"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ@`````````` +M````````````;&UN;W!QP$`).,``/Q[`0`DXP``4)(!`.@L`@```````````````````````````%CE +M````````6.4``-23`0``````('P!`(R2```@?`$`('P!`"1-`0"HY0``('P! +M`*CE``"(E`$`('P!````````````````````````````U.8```````#4Y@`` +M``````````````````````````!DHP$`3$T!`*CG``"`C0$`J.<``,24`0`` +M``````````\`/P`!````#P`_``$````/`#\``0````\`/P`!````#P`_``$` +M`````````````````````````````!SY``"(C0$`'/D``*B5`0`````````` +M``````````````````````!$_````````$3\``!LF`$``````"@`*``P`"P` +M+``H`#P`-``L`"P`/``T`#``+`!4`$0`?_\'#Q\_`0,%``<"`P0&!@T%!0D) +M"0D)"0D```$'#Q\_?_____\``/____\```"`555550```$#07D)[:"^A/9H? +M%BFTE]`>.([C.!S'<1R]A/82CN,X#AS'<1R.XS@.7D)["<=Q'`&8``-AE``#890```````*CX`0`@ +M^P$`J`$"`.P"`@`$````'!$``!PR```<,P``'!0```0````<`@``I<:$^)GN +MC?8-_[W6L=Y4D5!@`P*ISGU6&>=BM>9-FNQ%CYT?0(F'^A7OZ[+)C@O[[$%G +ML_U?ZD6_(_=3EN1;F\)U'.&N/6I,6FQ!?@+U3X-<:/11--$(^9/B5/%NW%AM>:56:4$<^*$.D&!('^\*!$>+HEXTOSHOY=P("* +M!:T_O"%(<`3QWV/!=W6O8T(P(!KE#OUMOTR!%!@U)B_#X;ZB-JS(Y[HK,I7FH,"8&=&>?Z-F1'Y4JSN#"\J,*:?BO!T6=JT[ +MVU9D3G0>%-N2"@QL2.2X79]NO>]#IL2H.:0Q-].+\C+50XM9;K?:C`%DL=*< +MX$FTV/JL!_,ESZ_*CO3I1Q@0U6^(\&]*RWO\J-9M.BP``0($!`8&`!$```````````````````!D````$````/\` +M#"`(````$@```````````````````"P!```0````_P`,(`(````3```````` +M````````````+`$``!````#_``P@!P```!0`````````0`8````````!```` +M$`````$`#$`$````%0````````!`!@````````$````0`````0`,0`,````6 +M`````````$`&`````````0```!`````!``Q``P```!<````````````````` +M```!````$````/\`!``$````&`````````!`!@```````#(````R`````0', +M0`,````9`````````````````````0````$````!`0"``0```!H````````` +M```````````!`````0```/__`*`%````&P`````````0``````````$````0 +M`````0($``8````<``````````0``````````0````$````!``P``0```!T` +M````````!``````````!`````0````$`#``!````'@`````````$```````` +M``$````!`````0``@`$````?`````````````````````0````@```#_``P@ +M!@```"`````````````````````!````"````/\`#"`"````(0`````````` +M``````````$````!````_P`,H`,````B`````````````````````0````$` +M```!`@R``0```",````````````````````!`````0```/\``*`&````)``` +M``````````````````$````!`````0)$``(````E```````````````````` +M`0```!````#_``P@`P```"8`````````V``````````!````9`````$`"``" +M````)P`````````L`0````````$````!`````0`,0`0````H`````````"P! +M`````````0````$```#_``Q`!````"D`````````+`$````````!`````0`` +M``$`#$`$````*@`````````L`0````````$````!`````0`,0`,````K```` +M`````"P!`````````0````$````!``Q`!0```"P``````````@`````````! +M`````0````$`!``%````+0`````````$``````````$````!`````0`,0`$` +M```N`````````"P!`````````0```&D````!``Q``P```"\````````````` +M`````````@``$@```/\`#&`"````,``````````R`````````&0````0```` +M_P`,8`8````Q`````````"P!`````````0```&X````!``Q`!`````0,#`@4 +M!`0$0````(```````0````(````$``!`````0````$````#_0555%0````"` +MB(@(`````0``'/____\`$```!`$`&/[__W\`"```!`(!&/____\`$````0$! +M&/____\`$````P``'/S_4M55#0```@``'/S_I^JK#@``!0(!&/S_4M55#0`` +M`@$!&/S_I^JK#@```P$!&/S_4M55#0``!0$`&/S_J6JK!@```$```!<```#L +MM@``%``````````!````,((!``````#TVP```P```-"[```$````A-8```@` +M```TU```#````##'```1`````````!,```!XMP``%@```&1P`@``````K-L` +M``0```#D;0(`!0```#C"```(````.-0```P```#'V````````````````````````````````````````!``````#0_@`````` +M````````````````````````````````````$``````````0```````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jul 25 23:06:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45A32BA4802; Mon, 25 Jul 2016 23:06:39 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F16651794; Mon, 25 Jul 2016 23:06:38 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PN6cR5044220; Mon, 25 Jul 2016 23:06:38 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PN6c7u044219; Mon, 25 Jul 2016 23:06:38 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201607252306.u6PN6c7u044219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 25 Jul 2016 23:06:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r303323 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 23:06:39 -0000 Author: sbruno Date: Mon Jul 25 23:06:37 2016 New Revision: 303323 URL: https://svnweb.freebsd.org/changeset/base/303323 Log: Restore my previous limit. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Mon Jul 25 23:05:25 2016 (r303322) +++ svnadmin/conf/sizelimit.conf Mon Jul 25 23:06:37 2016 (r303323) @@ -26,4 +26,3 @@ mm obrien peter rwatson -sbruno From owner-svn-src-all@freebsd.org Mon Jul 25 23:37:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38967BA51AC; Mon, 25 Jul 2016 23:37:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01BFA1756; Mon, 25 Jul 2016 23:37:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PNbmbf055558; Mon, 25 Jul 2016 23:37:48 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PNbl2V055548; Mon, 25 Jul 2016 23:37:47 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607252337.u6PNbl2V055548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 25 Jul 2016 23:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303324 - in stable/11: lib/libc/sys share/man/man3 share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 23:37:49 -0000 Author: jhb Date: Mon Jul 25 23:37:47 2016 New Revision: 303324 URL: https://svnweb.freebsd.org/changeset/base/303324 Log: MFC 302899: Add documentation for the sigevent structure. - Add a sigevent(3) manpage to give a general overview of the sigevent structure and the available notification mechanisms. - Document that AIO requests contain a nested sigevent structure that can be used to request completion notification. - Expand the sigevent details in other manuals to note details such as the extra values stored in a queued signal's information or in a posted kevent. Approved by: re (gjb) Added: stable/11/share/man/man3/sigevent.3 - copied unchanged from r302899, head/share/man/man3/sigevent.3 Modified: stable/11/lib/libc/sys/aio_fsync.2 stable/11/lib/libc/sys/aio_mlock.2 stable/11/lib/libc/sys/aio_read.2 stable/11/lib/libc/sys/aio_write.2 stable/11/lib/libc/sys/lio_listio.2 stable/11/lib/libc/sys/mq_notify.2 stable/11/lib/libc/sys/timer_create.2 stable/11/share/man/man3/Makefile stable/11/share/man/man4/aio.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/aio_fsync.2 ============================================================================== --- stable/11/lib/libc/sys/aio_fsync.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/aio_fsync.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 27, 2013 +.Dd July 15, 2016 .Dt AIO_FSYNC 2 .Os .Sh NAME @@ -71,6 +71,29 @@ while it is in progress. .Pp If the request could not be enqueued (generally due to invalid arguments), the call returns without having enqueued the request. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . +.Sh RESTRICTIONS +The asynchronous I/O Control Block structure pointed to by +.Fa iocb +must remain valid until the +operation has completed. +For this reason, use of auto (stack) variables +for these objects is discouraged. +.Pp +The asynchronous I/O control buffer +.Fa iocb +should be zeroed before the +.Fn aio_fsync +call to avoid passing bogus context information to the kernel. +.Pp +Modifications of the Asynchronous I/O Control Block structure or the +buffer contents after the request has been enqueued, but before the +request has completed, are not allowed. .Sh RETURN VALUES .Rv -std aio_fsync .Sh ERRORS @@ -80,6 +103,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_fsync @@ -138,6 +165,7 @@ system calls. .Xr aio_waitcomplete 2 , .Xr aio_write 2 , .Xr fsync 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/11/lib/libc/sys/aio_mlock.2 ============================================================================== --- stable/11/lib/libc/sys/aio_mlock.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/aio_mlock.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 3, 2013 +.Dd July 15, 2016 .Dt AIO_MLOCK 2 .Os .Sh NAME @@ -64,6 +64,12 @@ If the request could not be enqueued (ge .Xr aio 4 limits), then the call returns without having enqueued the request. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . .Sh RESTRICTIONS The Asynchronous I/O Control Block structure pointed to by .Fa iocb @@ -92,6 +98,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_mlock @@ -116,6 +126,7 @@ if the request was explicitly cancelled .Xr aio_error 2 , .Xr aio_return 2 , .Xr mlock 2 , +.Xr sigevent 3 , .Xr aio 4 .Sh PORTABILITY The Modified: stable/11/lib/libc/sys/aio_read.2 ============================================================================== --- stable/11/lib/libc/sys/aio_read.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/aio_read.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 17, 1998 +.Dd July 15, 2016 .Dt AIO_READ 2 .Os .Sh NAME @@ -79,6 +79,12 @@ If the request is successfully enqueued, .Fa iocb->aio_offset can be modified during the request as context, so this value must not be referenced after the request is enqueued. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . .Sh RESTRICTIONS The Asynchronous I/O Control Block structure pointed to by .Fa iocb @@ -115,6 +121,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_read @@ -191,6 +201,7 @@ would be invalid. .Xr aio_suspend 2 , .Xr aio_waitcomplete 2 , .Xr aio_write 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/11/lib/libc/sys/aio_write.2 ============================================================================== --- stable/11/lib/libc/sys/aio_write.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/aio_write.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 2, 1999 +.Dd July 15, 2016 .Dt AIO_WRITE 2 .Os .Sh NAME @@ -85,6 +85,12 @@ If the request is successfully enqueued, .Fa iocb->aio_offset can be modified during the request as context, so this value must not be referenced after the request is enqueued. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . .Sh RESTRICTIONS The Asynchronous I/O Control Block structure pointed to by .Fa iocb @@ -119,6 +125,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_write @@ -186,6 +196,7 @@ would be invalid. .Xr aio_return 2 , .Xr aio_suspend 2 , .Xr aio_waitcomplete 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/11/lib/libc/sys/lio_listio.2 ============================================================================== --- stable/11/lib/libc/sys/lio_listio.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/lio_listio.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2003 +.Dd July 15, 2016 .Dt LIO_LISTIO 2 .Os .Sh NAME @@ -83,14 +83,52 @@ If .Fa mode is .Dv LIO_NOWAIT , -the requests are processed asynchronously, and the signal specified by .Fa sig -is sent when all operations have completed. +can be used to request asynchronous notification when all operations have +completed. If .Fa sig is .Dv NULL , -the calling process is not notified of I/O completion. +no notification is sent. +.Pp +For +.Dv SIGEV_KEVENT +notifications, +the posted kevent will contain: +.Bl -column ".Va filter" +.It Sy Member Ta Sy Value +.It Va ident Ta Fa list +.It Va filter Ta Dv EVFILT_LIO +.It Va udata Ta +value stored in +.Fa sig->sigev_value +.El +.Pp +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the information for the queued signal will include +.Dv SI_ASYNCIO +in the +.Va si_code +field and the value stored in +.Fa sig->sigev_value +in the +.Va si_value +field. +.Pp +For +.Dv SIGEV_THREAD +notifications, +the value stored in +.Fa sig->sigev_value +is passed to the +.Fa sig->sigev_notify_function +as described in +.Xr sigevent 3 . .Pp The order in which the requests are carried out is not specified; in particular, there is no guarantee that they will be executed in @@ -136,6 +174,10 @@ or .Fa nent is greater than .Dv AIO_LISTIO_MAX . +.It Bq Er EINVAL +The asynchronous notification method in +.Fa sig->sigev_notify +is invalid or not supported. .It Bq Er EINTR A signal interrupted the system call before it could be completed. .It Bq Er EIO @@ -166,6 +208,7 @@ structure individually by calling .Xr aio_write 2 , .Xr read 2 , .Xr write 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/11/lib/libc/sys/mq_notify.2 ============================================================================== --- stable/11/lib/libc/sys/mq_notify.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/mq_notify.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2005 +.Dd July 15, 2016 .Dt MQ_NOTIFY 2 .Os .Sh NAME @@ -77,18 +77,27 @@ is .Dv SIGEV_NONE , then no signal will be posted, but the error status and the return status for the operation will be set appropriately. -If -.Fa notification->sigev_notify -is -.Dv SIGEV_SIGNAL , -then the signal specified in +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the signal specified in .Fa notification->sigev_signo -will be sent to the process. -The signal will be queued to the process and the value specified in +will be sent to the calling process +.Pq Dv SIGEV_SIGNO +or to the thread whose LWP ID is +.Fa notification->sigev_notify_thread_id +.Pq Dv SIGEV_THREAD_ID . +The information for the queued signal will include: +.Bl -column ".Va si_value" +.It Sy Member Ta Sy Value +.It Va si_code Ta Dv SI_MESGQ +.It Va si_value Ta +the value stored in .Fa notification->sigev_value -will be the -.Va si_value -component of the generated signal. +.It Va si_mqd Ta Fa mqdes +.El .Pp If .Fa notification @@ -123,11 +132,16 @@ The argument is not a valid message queue descriptor. .It Bq Er EBUSY Process is already registered for notification by the message queue. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa notification->sigev_notify +is invalid or not supported. .El .Sh SEE ALSO .Xr mq_open 2 , .Xr mq_send 2 , .Xr mq_timedsend 2 , +.Xr sigevent 3 , .Xr siginfo 3 .Sh STANDARDS The Modified: stable/11/lib/libc/sys/timer_create.2 ============================================================================== --- stable/11/lib/libc/sys/timer_create.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/timer_create.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2009 +.Dd July 15, 2016 .Dt TIMER_CREATE 2 .Os .Sh NAME @@ -74,6 +74,36 @@ structure. This structure, allocated by the application, defines the asynchronous notification to occur when the timer expires. +.Pp +If +.Fa evp->sigev_notify +is +.Dv SIGEV_SIGNO +or +.Dv SIGEV_THREAD_ID , +the signal specified in +.Fa evp->sigev_signo +will be sent to the calling process +.Pq Dv SIGEV_SIGNO +or to the thread whose LWP ID is +.Fa evp->sigev_notify_thread_id +.Pq Dv SIGEV_THREAD_ID . +The information for the queued signal will include: +.Bl -column ".Va si_value" +.It Sy Member Ta Sy Value +.It Va si_code Ta Dv SI_TIMER +.It Va si_value Ta +the value stored in +.Fa evp->sigev_value +.It Va si_timerid Ta timer ID +.It Va si_overrun Ta timer overrun count +.It Va si_errno Ta +If timer overrun is +.Brq Dv DELAYTIMER_MAX , +an error code defined in +.In errno.h +.El +.Pp If the .Fa evp argument is @@ -88,12 +118,14 @@ member having the value .Dv SIGEV_SIGNAL , the .Va sigev_signo -having a default signal number, and the +having a default signal number +.Pq Dv SIGALRM , +and the .Va sigev_value member having the value of the timer ID. .Pp -The implementations supports a +This implementation supports a .Fa clock_id of .Dv CLOCK_REALTIME @@ -144,6 +176,8 @@ The calling process has already created this implementation. .It Bq Er EINVAL The specified clock ID is not supported. +.It Bq Er EINVAL +The specified asynchronous notification method is not supported. .It Bq Er EFAULT Any arguments point outside the allocated address space or there is a memory protection fault. @@ -152,6 +186,7 @@ memory protection fault. .Xr clock_getres 2 , .Xr timer_delete 2 , .Xr timer_getoverrun 2 , +.Xr sigevent 3 , .Xr siginfo 3 .Sh STANDARDS The Modified: stable/11/share/man/man3/Makefile ============================================================================== --- stable/11/share/man/man3/Makefile Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/share/man/man3/Makefile Mon Jul 25 23:37:47 2016 (r303324) @@ -15,6 +15,7 @@ MAN= assert.3 \ offsetof.3 \ ${PTHREAD_MAN} \ queue.3 \ + sigevent.3 \ siginfo.3 \ stdarg.3 \ sysexits.3 \ Copied: stable/11/share/man/man3/sigevent.3 (from r302899, head/share/man/man3/sigevent.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/man/man3/sigevent.3 Mon Jul 25 23:37:47 2016 (r303324, copy of r302899, head/share/man/man3/sigevent.3) @@ -0,0 +1,127 @@ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 2016 John H. Baldwin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 15, 2016 +.Dt SIGEVENT 3 +.Os +.Sh NAME +.Nm sigevent +.Nd "asynchronous event notification" +.Sh SYNOPSIS +.In signal.h +.Sh DESCRIPTION +Some operations permit threads to request asychronous notification of events +via a +.Vt struct sigevent +structure. +This structure contains several fields that describe the requested notification: +.Bl -column ".Vt void (*)(union sigval)" ".Va sigev_notify_kevent_flags" +.It Sy Type Ta Sy Member Ta Sy Description +.It Vt int Ta sigev_notify Ta notification method +.It Vt int Ta sigev_signo Ta signal number +.It Vt union sigval Ta sigev_value Ta signal value +.It Vt int Ta sigev_notify_kqueue Ta +.Xr kqueue 2 +file descriptor +.It Vt unsigned short Ta sigev_notify_kevent_flags Ta kevent flags +.It Vt lwpid_t Ta sigev_notify_thread_id Ta LWP ID +.It Vt void (*)(union sigval) Ta sigev_notify_function Ta +callback function pointer +.It Vt pthread_attr_t * Ta sigev_notify_attributes Ta +callback thread attributes +.El +.Pp +The +.Va sigev_notify +field specifies the notification method used when the event triggers: +.Bl -tag -width ".Dv SIGEV_THREAD_ID" +.It Dv SIGEV_NONE +No notification is sent. +.It Dv SIGEV_SIGNAL +The signal +.Va sigev_signo +is queued as a real-time signal to the calling process. +The value stored in +.Va sigev_value +will be present in the +.Va si_value +of the +.Vt siginfo_t +structure of the queued signal. +.It Dv SIGEV_THREAD +The notification function in +.Va sigev_notify_function +is called in a separate thread context. +The thread is created with the attributes specified in +.Va *sigev_notify_attributes . +The value stored in +.Va sigev_value +is passed as the sole argument to +.Va sigev_notify_function . +If +.Va sigev_notify_attributes +is +.Dv NULL , +the thread is created with default attributes. +.It Dv SIGEV_KEVENT +A new kevent is posted to the kqueue +.Va sigev_notify_kqueue . +The +.Va udata +member of the kevent structure contains the value stored in +.Va sigev_value . +The meaning of other fields in the kevent are specific to the type of triggered +event. +.It Dv SIGEV_THREAD_ID +The signal +.Va sigev_signo +is queued to the thread whose LWP ID is +.Va sigev_notify_thread_id . +The value stored in +.Va sigev_value +will be present in the +.Va si_value +of the +.Vt siginfo_t +structure of the queued signal. +.El +.Sh NOTES +Note that programs wishing to use +.Dv SIGEV_THREAD +notifications must link against the +.Lb librt . +.Sh SEE ALSO +.Xr aio_read 2 , +.Xr mq_notify 2 , +.Xr timer_create 2 , +.Xr siginfo 3 +.Sh STANDARDS +The +.Vt struct sigevent +type conforms to +.St -p1003.1-2004 . Modified: stable/11/share/man/man4/aio.4 ============================================================================== --- stable/11/share/man/man4/aio.4 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/share/man/man4/aio.4 Mon Jul 25 23:37:47 2016 (r303324) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2016 +.Dd July 15, 2016 .Dt AIO 4 .Os .Sh NAME @@ -137,6 +137,54 @@ The number of outstanding asynchronous I The maximum number of outstanding asynchronous I/O requests permitted system-wide. .El +.Pp +Asynchronous I/O control buffers should be zeroed before initializing +individual fields. +This ensures all fields are initialized. +.Pp +All asynchronous I/O control buffers contain a +.Vt sigevent +structure in the +.Va aio_sigevent +field which can be used to request notification when an operation completes. +.Pp +For +.Dv SIGEV_KEVENT +notifications, +the posted kevent will contain: +.Bl -column ".Va filter" +.It Sy Member Ta Sy Value +.It Va ident Ta asynchronous I/O control buffer pointer +.It Va filter Ta Dv EVFILT_AIO +.It Va udata Ta +value stored in +.Va aio_sigevent.sigev_value +.El +.Pp +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the information for the queued signal will include +.Dv SI_ASYNCIO +in the +.Va si_code +field and the value stored in +.Va sigevent.sigev_value +in the +.Va si_value +field. +.Pp +For +.Dv SIGEV_THREAD +notifications, +the value stored in +.Va aio_sigevent.sigev_value +is passed to the +.Va aio_sigevent.sigev_notify_function +as described in +.Xr sigevent 3 . .Sh SEE ALSO .Xr aio_cancel 2 , .Xr aio_error 2 , @@ -146,6 +194,7 @@ system-wide. .Xr aio_waitcomplete 2 , .Xr aio_write 2 , .Xr lio_listio 2 , +.Xr sigevent 3 , .Xr sysctl 8 .Sh HISTORY The From owner-svn-src-all@freebsd.org Mon Jul 25 23:38:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCB2DBA5210; Mon, 25 Jul 2016 23:38:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 814B118CD; Mon, 25 Jul 2016 23:38:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PNcGTM055646; Mon, 25 Jul 2016 23:38:16 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PNcFjF055637; Mon, 25 Jul 2016 23:38:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607252338.u6PNcFjF055637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 25 Jul 2016 23:38:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r303325 - in stable: 10/lib/libc/sys 10/share/man/man3 10/share/man/man4 9/lib/libc/sys 9/share/man/man3 9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 23:38:17 -0000 Author: jhb Date: Mon Jul 25 23:38:14 2016 New Revision: 303325 URL: https://svnweb.freebsd.org/changeset/base/303325 Log: MFC 302899: Add documentation for the sigevent structure. - Add a sigevent(3) manpage to give a general overview of the sigevent structure and the available notification mechanisms. - Document that AIO requests contain a nested sigevent structure that can be used to request completion notification. - Expand the sigevent details in other manuals to note details such as the extra values stored in a queued signal's information or in a posted kevent. Added: stable/9/share/man/man3/sigevent.3 - copied unchanged from r302899, head/share/man/man3/sigevent.3 Modified: stable/9/lib/libc/sys/aio_fsync.2 stable/9/lib/libc/sys/aio_read.2 stable/9/lib/libc/sys/aio_write.2 stable/9/lib/libc/sys/lio_listio.2 stable/9/lib/libc/sys/mq_notify.2 stable/9/lib/libc/sys/timer_create.2 stable/9/share/man/man3/Makefile stable/9/share/man/man4/aio.4 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/share/man/man3/ (props changed) stable/9/share/man/man4/ (props changed) Changes in other areas also in this revision: Added: stable/10/share/man/man3/sigevent.3 - copied unchanged from r302899, head/share/man/man3/sigevent.3 Modified: stable/10/lib/libc/sys/aio_fsync.2 stable/10/lib/libc/sys/aio_mlock.2 stable/10/lib/libc/sys/aio_read.2 stable/10/lib/libc/sys/aio_write.2 stable/10/lib/libc/sys/lio_listio.2 stable/10/lib/libc/sys/mq_notify.2 stable/10/lib/libc/sys/timer_create.2 stable/10/share/man/man3/Makefile stable/10/share/man/man4/aio.4 Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/libc/sys/aio_fsync.2 ============================================================================== --- stable/9/lib/libc/sys/aio_fsync.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/9/lib/libc/sys/aio_fsync.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 27, 2013 +.Dd July 15, 2016 .Dt AIO_FSYNC 2 .Os .Sh NAME @@ -71,6 +71,29 @@ while it is in progress. .Pp If the request could not be enqueued (generally due to invalid arguments), the call returns without having enqueued the request. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . +.Sh RESTRICTIONS +The asynchronous I/O Control Block structure pointed to by +.Fa iocb +must remain valid until the +operation has completed. +For this reason, use of auto (stack) variables +for these objects is discouraged. +.Pp +The asynchronous I/O control buffer +.Fa iocb +should be zeroed before the +.Fn aio_fsync +call to avoid passing bogus context information to the kernel. +.Pp +Modifications of the Asynchronous I/O Control Block structure or the +buffer contents after the request has been enqueued, but before the +request has completed, are not allowed. .Sh RETURN VALUES .Rv -std aio_fsync .Sh ERRORS @@ -80,6 +103,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_fsync @@ -138,6 +165,7 @@ system calls. .Xr aio_waitcomplete 2 , .Xr aio_write 2 , .Xr fsync 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/9/lib/libc/sys/aio_read.2 ============================================================================== --- stable/9/lib/libc/sys/aio_read.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/9/lib/libc/sys/aio_read.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 17, 1998 +.Dd July 15, 2016 .Dt AIO_READ 2 .Os .Sh NAME @@ -79,6 +79,12 @@ If the request is successfully enqueued, .Fa iocb->aio_offset can be modified during the request as context, so this value must not be referenced after the request is enqueued. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . .Sh RESTRICTIONS The Asynchronous I/O Control Block structure pointed to by .Fa iocb @@ -115,6 +121,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_read @@ -191,6 +201,7 @@ would be invalid. .Xr aio_suspend 2 , .Xr aio_waitcomplete 2 , .Xr aio_write 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/9/lib/libc/sys/aio_write.2 ============================================================================== --- stable/9/lib/libc/sys/aio_write.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/9/lib/libc/sys/aio_write.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 2, 1999 +.Dd July 15, 2016 .Dt AIO_WRITE 2 .Os .Sh NAME @@ -85,6 +85,12 @@ If the request is successfully enqueued, .Fa iocb->aio_offset can be modified during the request as context, so this value must not be referenced after the request is enqueued. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . .Sh RESTRICTIONS The Asynchronous I/O Control Block structure pointed to by .Fa iocb @@ -119,6 +125,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_write @@ -186,6 +196,7 @@ would be invalid. .Xr aio_return 2 , .Xr aio_suspend 2 , .Xr aio_waitcomplete 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/9/lib/libc/sys/lio_listio.2 ============================================================================== --- stable/9/lib/libc/sys/lio_listio.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/9/lib/libc/sys/lio_listio.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2003 +.Dd July 15, 2016 .Dt LIO_LISTIO 2 .Os .Sh NAME @@ -83,14 +83,52 @@ If .Fa mode is .Dv LIO_NOWAIT , -the requests are processed asynchronously, and the signal specified by .Fa sig -is sent when all operations have completed. +can be used to request asynchronous notification when all operations have +completed. If .Fa sig is .Dv NULL , -the calling process is not notified of I/O completion. +no notification is sent. +.Pp +For +.Dv SIGEV_KEVENT +notifications, +the posted kevent will contain: +.Bl -column ".Va filter" +.It Sy Member Ta Sy Value +.It Va ident Ta Fa list +.It Va filter Ta Dv EVFILT_LIO +.It Va udata Ta +value stored in +.Fa sig->sigev_value +.El +.Pp +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the information for the queued signal will include +.Dv SI_ASYNCIO +in the +.Va si_code +field and the value stored in +.Fa sig->sigev_value +in the +.Va si_value +field. +.Pp +For +.Dv SIGEV_THREAD +notifications, +the value stored in +.Fa sig->sigev_value +is passed to the +.Fa sig->sigev_notify_function +as described in +.Xr sigevent 3 . .Pp The order in which the requests are carried out is not specified; in particular, there is no guarantee that they will be executed in @@ -136,6 +174,10 @@ or .Fa nent is greater than .Dv AIO_LISTIO_MAX . +.It Bq Er EINVAL +The asynchronous notification method in +.Fa sig->sigev_notify +is invalid or not supported. .It Bq Er EINTR A signal interrupted the system call before it could be completed. .It Bq Er EIO @@ -166,6 +208,7 @@ structure individually by calling .Xr aio_write 2 , .Xr read 2 , .Xr write 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/9/lib/libc/sys/mq_notify.2 ============================================================================== --- stable/9/lib/libc/sys/mq_notify.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/9/lib/libc/sys/mq_notify.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2005 +.Dd July 15, 2016 .Dt MQ_NOTIFY 2 .Os .Sh NAME @@ -77,18 +77,27 @@ is .Dv SIGEV_NONE , then no signal will be posted, but the error status and the return status for the operation will be set appropriately. -If -.Fa notification->sigev_notify -is -.Dv SIGEV_SIGNAL , -then the signal specified in +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the signal specified in .Fa notification->sigev_signo -will be sent to the process. -The signal will be queued to the process and the value specified in +will be sent to the calling process +.Pq Dv SIGEV_SIGNO +or to the thread whose LWP ID is +.Fa notification->sigev_notify_thread_id +.Pq Dv SIGEV_THREAD_ID . +The information for the queued signal will include: +.Bl -column ".Va si_value" +.It Sy Member Ta Sy Value +.It Va si_code Ta Dv SI_MESGQ +.It Va si_value Ta +the value stored in .Fa notification->sigev_value -will be the -.Va si_value -component of the generated signal. +.It Va si_mqd Ta Fa mqdes +.El .Pp If .Fa notification @@ -123,11 +132,16 @@ The argument is not a valid message queue descriptor. .It Bq Er EBUSY Process is already registered for notification by the message queue. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa notification->sigev_notify +is invalid or not supported. .El .Sh SEE ALSO .Xr mq_open 2 , .Xr mq_send 2 , .Xr mq_timedsend 2 , +.Xr sigevent 3 , .Xr siginfo 3 .Sh STANDARDS The Modified: stable/9/lib/libc/sys/timer_create.2 ============================================================================== --- stable/9/lib/libc/sys/timer_create.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/9/lib/libc/sys/timer_create.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2009 +.Dd July 15, 2016 .Dt TIMER_CREATE 2 .Os .Sh NAME @@ -74,6 +74,36 @@ structure. This structure, allocated by the application, defines the asynchronous notification to occur when the timer expires. +.Pp +If +.Fa evp->sigev_notify +is +.Dv SIGEV_SIGNO +or +.Dv SIGEV_THREAD_ID , +the signal specified in +.Fa evp->sigev_signo +will be sent to the calling process +.Pq Dv SIGEV_SIGNO +or to the thread whose LWP ID is +.Fa evp->sigev_notify_thread_id +.Pq Dv SIGEV_THREAD_ID . +The information for the queued signal will include: +.Bl -column ".Va si_value" +.It Sy Member Ta Sy Value +.It Va si_code Ta Dv SI_TIMER +.It Va si_value Ta +the value stored in +.Fa evp->sigev_value +.It Va si_timerid Ta timer ID +.It Va si_overrun Ta timer overrun count +.It Va si_errno Ta +If timer overrun is +.Brq Dv DELAYTIMER_MAX , +an error code defined in +.In errno.h +.El +.Pp If the .Fa evp argument is @@ -88,12 +118,14 @@ member having the value .Dv SIGEV_SIGNAL , the .Va sigev_signo -having a default signal number, and the +having a default signal number +.Pq Dv SIGALRM , +and the .Va sigev_value member having the value of the timer ID. .Pp -The implementations supports a +This implementation supports a .Fa clock_id of .Dv CLOCK_REALTIME @@ -144,6 +176,8 @@ The calling process has already created this implementation. .It Bq Er EINVAL The specified clock ID is not supported. +.It Bq Er EINVAL +The specified asynchronous notification method is not supported. .It Bq Er EFAULT Any arguments point outside the allocated address space or there is a memory protection fault. @@ -152,6 +186,7 @@ memory protection fault. .Xr clock_getres 2 , .Xr timer_delete 2 , .Xr timer_getoverrun 2 , +.Xr sigevent 3 , .Xr siginfo 3 .Sh STANDARDS The Modified: stable/9/share/man/man3/Makefile ============================================================================== --- stable/9/share/man/man3/Makefile Mon Jul 25 23:37:47 2016 (r303324) +++ stable/9/share/man/man3/Makefile Mon Jul 25 23:38:14 2016 (r303325) @@ -11,6 +11,7 @@ MAN= assert.3 \ makedev.3 \ ${PTHREAD_MAN} \ queue.3 \ + sigevent.3 \ siginfo.3 \ stdarg.3 \ sysexits.3 \ Copied: stable/9/share/man/man3/sigevent.3 (from r302899, head/share/man/man3/sigevent.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man3/sigevent.3 Mon Jul 25 23:38:14 2016 (r303325, copy of r302899, head/share/man/man3/sigevent.3) @@ -0,0 +1,127 @@ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 2016 John H. Baldwin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 15, 2016 +.Dt SIGEVENT 3 +.Os +.Sh NAME +.Nm sigevent +.Nd "asynchronous event notification" +.Sh SYNOPSIS +.In signal.h +.Sh DESCRIPTION +Some operations permit threads to request asychronous notification of events +via a +.Vt struct sigevent +structure. +This structure contains several fields that describe the requested notification: +.Bl -column ".Vt void (*)(union sigval)" ".Va sigev_notify_kevent_flags" +.It Sy Type Ta Sy Member Ta Sy Description +.It Vt int Ta sigev_notify Ta notification method +.It Vt int Ta sigev_signo Ta signal number +.It Vt union sigval Ta sigev_value Ta signal value +.It Vt int Ta sigev_notify_kqueue Ta +.Xr kqueue 2 +file descriptor +.It Vt unsigned short Ta sigev_notify_kevent_flags Ta kevent flags +.It Vt lwpid_t Ta sigev_notify_thread_id Ta LWP ID +.It Vt void (*)(union sigval) Ta sigev_notify_function Ta +callback function pointer +.It Vt pthread_attr_t * Ta sigev_notify_attributes Ta +callback thread attributes +.El +.Pp +The +.Va sigev_notify +field specifies the notification method used when the event triggers: +.Bl -tag -width ".Dv SIGEV_THREAD_ID" +.It Dv SIGEV_NONE +No notification is sent. +.It Dv SIGEV_SIGNAL +The signal +.Va sigev_signo +is queued as a real-time signal to the calling process. +The value stored in +.Va sigev_value +will be present in the +.Va si_value +of the +.Vt siginfo_t +structure of the queued signal. +.It Dv SIGEV_THREAD +The notification function in +.Va sigev_notify_function +is called in a separate thread context. +The thread is created with the attributes specified in +.Va *sigev_notify_attributes . +The value stored in +.Va sigev_value +is passed as the sole argument to +.Va sigev_notify_function . +If +.Va sigev_notify_attributes +is +.Dv NULL , +the thread is created with default attributes. +.It Dv SIGEV_KEVENT +A new kevent is posted to the kqueue +.Va sigev_notify_kqueue . +The +.Va udata +member of the kevent structure contains the value stored in +.Va sigev_value . +The meaning of other fields in the kevent are specific to the type of triggered +event. +.It Dv SIGEV_THREAD_ID +The signal +.Va sigev_signo +is queued to the thread whose LWP ID is +.Va sigev_notify_thread_id . +The value stored in +.Va sigev_value +will be present in the +.Va si_value +of the +.Vt siginfo_t +structure of the queued signal. +.El +.Sh NOTES +Note that programs wishing to use +.Dv SIGEV_THREAD +notifications must link against the +.Lb librt . +.Sh SEE ALSO +.Xr aio_read 2 , +.Xr mq_notify 2 , +.Xr timer_create 2 , +.Xr siginfo 3 +.Sh STANDARDS +The +.Vt struct sigevent +type conforms to +.St -p1003.1-2004 . Modified: stable/9/share/man/man4/aio.4 ============================================================================== --- stable/9/share/man/man4/aio.4 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/9/share/man/man4/aio.4 Mon Jul 25 23:38:14 2016 (r303325) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 24, 2002 +.Dd July 15, 2016 .Dt AIO 4 .Os .Sh NAME @@ -45,6 +45,54 @@ The facility provides system calls for asynchronous I/O. It is available both as a kernel option for static inclusion and as a dynamic kernel module. +.Pp +Asynchronous I/O control buffers should be zeroed before initializing +individual fields. +This ensures all fields are initialized. +.Pp +All asynchronous I/O control buffers contain a +.Vt sigevent +structure in the +.Va aio_sigevent +field which can be used to request notification when an operation completes. +.Pp +For +.Dv SIGEV_KEVENT +notifications, +the posted kevent will contain: +.Bl -column ".Va filter" +.It Sy Member Ta Sy Value +.It Va ident Ta asynchronous I/O control buffer pointer +.It Va filter Ta Dv EVFILT_AIO +.It Va udata Ta +value stored in +.Va aio_sigevent.sigev_value +.El +.Pp +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the information for the queued signal will include +.Dv SI_ASYNCIO +in the +.Va si_code +field and the value stored in +.Va sigevent.sigev_value +in the +.Va si_value +field. +.Pp +For +.Dv SIGEV_THREAD +notifications, +the value stored in +.Va aio_sigevent.sigev_value +is passed to the +.Va aio_sigevent.sigev_notify_function +as described in +.Xr sigevent 3 . .Sh SEE ALSO .Xr aio_cancel 2 , .Xr aio_error 2 , @@ -54,6 +102,7 @@ dynamic kernel module. .Xr aio_waitcomplete 2 , .Xr aio_write 2 , .Xr lio_listio 2 , +.Xr sigevent 3 , .Xr config 8 , .Xr kldload 8 , .Xr kldunload 8 From owner-svn-src-all@freebsd.org Mon Jul 25 23:38:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A908DBA5207; Mon, 25 Jul 2016 23:38:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7818818CB; Mon, 25 Jul 2016 23:38:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PNcFpo055632; Mon, 25 Jul 2016 23:38:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PNcErg055622; Mon, 25 Jul 2016 23:38:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607252338.u6PNcErg055622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 25 Jul 2016 23:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303325 - in stable: 10/lib/libc/sys 10/share/man/man3 10/share/man/man4 9/lib/libc/sys 9/share/man/man3 9/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 23:38:16 -0000 Author: jhb Date: Mon Jul 25 23:38:14 2016 New Revision: 303325 URL: https://svnweb.freebsd.org/changeset/base/303325 Log: MFC 302899: Add documentation for the sigevent structure. - Add a sigevent(3) manpage to give a general overview of the sigevent structure and the available notification mechanisms. - Document that AIO requests contain a nested sigevent structure that can be used to request completion notification. - Expand the sigevent details in other manuals to note details such as the extra values stored in a queued signal's information or in a posted kevent. Added: stable/10/share/man/man3/sigevent.3 - copied unchanged from r302899, head/share/man/man3/sigevent.3 Modified: stable/10/lib/libc/sys/aio_fsync.2 stable/10/lib/libc/sys/aio_mlock.2 stable/10/lib/libc/sys/aio_read.2 stable/10/lib/libc/sys/aio_write.2 stable/10/lib/libc/sys/lio_listio.2 stable/10/lib/libc/sys/mq_notify.2 stable/10/lib/libc/sys/timer_create.2 stable/10/share/man/man3/Makefile stable/10/share/man/man4/aio.4 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/share/man/man3/sigevent.3 - copied unchanged from r302899, head/share/man/man3/sigevent.3 Modified: stable/9/lib/libc/sys/aio_fsync.2 stable/9/lib/libc/sys/aio_read.2 stable/9/lib/libc/sys/aio_write.2 stable/9/lib/libc/sys/lio_listio.2 stable/9/lib/libc/sys/mq_notify.2 stable/9/lib/libc/sys/timer_create.2 stable/9/share/man/man3/Makefile stable/9/share/man/man4/aio.4 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/share/man/man3/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/10/lib/libc/sys/aio_fsync.2 ============================================================================== --- stable/10/lib/libc/sys/aio_fsync.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/10/lib/libc/sys/aio_fsync.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 27, 2013 +.Dd July 15, 2016 .Dt AIO_FSYNC 2 .Os .Sh NAME @@ -71,6 +71,29 @@ while it is in progress. .Pp If the request could not be enqueued (generally due to invalid arguments), the call returns without having enqueued the request. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . +.Sh RESTRICTIONS +The asynchronous I/O Control Block structure pointed to by +.Fa iocb +must remain valid until the +operation has completed. +For this reason, use of auto (stack) variables +for these objects is discouraged. +.Pp +The asynchronous I/O control buffer +.Fa iocb +should be zeroed before the +.Fn aio_fsync +call to avoid passing bogus context information to the kernel. +.Pp +Modifications of the Asynchronous I/O Control Block structure or the +buffer contents after the request has been enqueued, but before the +request has completed, are not allowed. .Sh RETURN VALUES .Rv -std aio_fsync .Sh ERRORS @@ -80,6 +103,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_fsync @@ -138,6 +165,7 @@ system calls. .Xr aio_waitcomplete 2 , .Xr aio_write 2 , .Xr fsync 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/10/lib/libc/sys/aio_mlock.2 ============================================================================== --- stable/10/lib/libc/sys/aio_mlock.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/10/lib/libc/sys/aio_mlock.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 3, 2013 +.Dd July 15, 2016 .Dt AIO_MLOCK 2 .Os .Sh NAME @@ -64,6 +64,12 @@ If the request could not be enqueued (ge .Xr aio 4 limits), then the call returns without having enqueued the request. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . .Sh RESTRICTIONS The Asynchronous I/O Control Block structure pointed to by .Fa iocb @@ -92,6 +98,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_mlock @@ -116,6 +126,7 @@ if the request was explicitly cancelled .Xr aio_error 2 , .Xr aio_return 2 , .Xr mlock 2 , +.Xr sigevent 3 , .Xr aio 4 .Sh PORTABILITY The Modified: stable/10/lib/libc/sys/aio_read.2 ============================================================================== --- stable/10/lib/libc/sys/aio_read.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/10/lib/libc/sys/aio_read.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 17, 1998 +.Dd July 15, 2016 .Dt AIO_READ 2 .Os .Sh NAME @@ -79,6 +79,12 @@ If the request is successfully enqueued, .Fa iocb->aio_offset can be modified during the request as context, so this value must not be referenced after the request is enqueued. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . .Sh RESTRICTIONS The Asynchronous I/O Control Block structure pointed to by .Fa iocb @@ -115,6 +121,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_read @@ -191,6 +201,7 @@ would be invalid. .Xr aio_suspend 2 , .Xr aio_waitcomplete 2 , .Xr aio_write 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/10/lib/libc/sys/aio_write.2 ============================================================================== --- stable/10/lib/libc/sys/aio_write.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/10/lib/libc/sys/aio_write.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 2, 1999 +.Dd July 15, 2016 .Dt AIO_WRITE 2 .Os .Sh NAME @@ -85,6 +85,12 @@ If the request is successfully enqueued, .Fa iocb->aio_offset can be modified during the request as context, so this value must not be referenced after the request is enqueued. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . .Sh RESTRICTIONS The Asynchronous I/O Control Block structure pointed to by .Fa iocb @@ -119,6 +125,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_write @@ -186,6 +196,7 @@ would be invalid. .Xr aio_return 2 , .Xr aio_suspend 2 , .Xr aio_waitcomplete 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/10/lib/libc/sys/lio_listio.2 ============================================================================== --- stable/10/lib/libc/sys/lio_listio.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/10/lib/libc/sys/lio_listio.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2003 +.Dd July 15, 2016 .Dt LIO_LISTIO 2 .Os .Sh NAME @@ -83,14 +83,52 @@ If .Fa mode is .Dv LIO_NOWAIT , -the requests are processed asynchronously, and the signal specified by .Fa sig -is sent when all operations have completed. +can be used to request asynchronous notification when all operations have +completed. If .Fa sig is .Dv NULL , -the calling process is not notified of I/O completion. +no notification is sent. +.Pp +For +.Dv SIGEV_KEVENT +notifications, +the posted kevent will contain: +.Bl -column ".Va filter" +.It Sy Member Ta Sy Value +.It Va ident Ta Fa list +.It Va filter Ta Dv EVFILT_LIO +.It Va udata Ta +value stored in +.Fa sig->sigev_value +.El +.Pp +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the information for the queued signal will include +.Dv SI_ASYNCIO +in the +.Va si_code +field and the value stored in +.Fa sig->sigev_value +in the +.Va si_value +field. +.Pp +For +.Dv SIGEV_THREAD +notifications, +the value stored in +.Fa sig->sigev_value +is passed to the +.Fa sig->sigev_notify_function +as described in +.Xr sigevent 3 . .Pp The order in which the requests are carried out is not specified; in particular, there is no guarantee that they will be executed in @@ -136,6 +174,10 @@ or .Fa nent is greater than .Dv AIO_LISTIO_MAX . +.It Bq Er EINVAL +The asynchronous notification method in +.Fa sig->sigev_notify +is invalid or not supported. .It Bq Er EINTR A signal interrupted the system call before it could be completed. .It Bq Er EIO @@ -166,6 +208,7 @@ structure individually by calling .Xr aio_write 2 , .Xr read 2 , .Xr write 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/10/lib/libc/sys/mq_notify.2 ============================================================================== --- stable/10/lib/libc/sys/mq_notify.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/10/lib/libc/sys/mq_notify.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2005 +.Dd July 15, 2016 .Dt MQ_NOTIFY 2 .Os .Sh NAME @@ -77,18 +77,27 @@ is .Dv SIGEV_NONE , then no signal will be posted, but the error status and the return status for the operation will be set appropriately. -If -.Fa notification->sigev_notify -is -.Dv SIGEV_SIGNAL , -then the signal specified in +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the signal specified in .Fa notification->sigev_signo -will be sent to the process. -The signal will be queued to the process and the value specified in +will be sent to the calling process +.Pq Dv SIGEV_SIGNO +or to the thread whose LWP ID is +.Fa notification->sigev_notify_thread_id +.Pq Dv SIGEV_THREAD_ID . +The information for the queued signal will include: +.Bl -column ".Va si_value" +.It Sy Member Ta Sy Value +.It Va si_code Ta Dv SI_MESGQ +.It Va si_value Ta +the value stored in .Fa notification->sigev_value -will be the -.Va si_value -component of the generated signal. +.It Va si_mqd Ta Fa mqdes +.El .Pp If .Fa notification @@ -123,11 +132,16 @@ The argument is not a valid message queue descriptor. .It Bq Er EBUSY Process is already registered for notification by the message queue. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa notification->sigev_notify +is invalid or not supported. .El .Sh SEE ALSO .Xr mq_open 2 , .Xr mq_send 2 , .Xr mq_timedsend 2 , +.Xr sigevent 3 , .Xr siginfo 3 .Sh STANDARDS The Modified: stable/10/lib/libc/sys/timer_create.2 ============================================================================== --- stable/10/lib/libc/sys/timer_create.2 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/10/lib/libc/sys/timer_create.2 Mon Jul 25 23:38:14 2016 (r303325) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2009 +.Dd July 15, 2016 .Dt TIMER_CREATE 2 .Os .Sh NAME @@ -74,6 +74,36 @@ structure. This structure, allocated by the application, defines the asynchronous notification to occur when the timer expires. +.Pp +If +.Fa evp->sigev_notify +is +.Dv SIGEV_SIGNO +or +.Dv SIGEV_THREAD_ID , +the signal specified in +.Fa evp->sigev_signo +will be sent to the calling process +.Pq Dv SIGEV_SIGNO +or to the thread whose LWP ID is +.Fa evp->sigev_notify_thread_id +.Pq Dv SIGEV_THREAD_ID . +The information for the queued signal will include: +.Bl -column ".Va si_value" +.It Sy Member Ta Sy Value +.It Va si_code Ta Dv SI_TIMER +.It Va si_value Ta +the value stored in +.Fa evp->sigev_value +.It Va si_timerid Ta timer ID +.It Va si_overrun Ta timer overrun count +.It Va si_errno Ta +If timer overrun is +.Brq Dv DELAYTIMER_MAX , +an error code defined in +.In errno.h +.El +.Pp If the .Fa evp argument is @@ -88,12 +118,14 @@ member having the value .Dv SIGEV_SIGNAL , the .Va sigev_signo -having a default signal number, and the +having a default signal number +.Pq Dv SIGALRM , +and the .Va sigev_value member having the value of the timer ID. .Pp -The implementations supports a +This implementation supports a .Fa clock_id of .Dv CLOCK_REALTIME @@ -144,6 +176,8 @@ The calling process has already created this implementation. .It Bq Er EINVAL The specified clock ID is not supported. +.It Bq Er EINVAL +The specified asynchronous notification method is not supported. .It Bq Er EFAULT Any arguments point outside the allocated address space or there is a memory protection fault. @@ -152,6 +186,7 @@ memory protection fault. .Xr clock_getres 2 , .Xr timer_delete 2 , .Xr timer_getoverrun 2 , +.Xr sigevent 3 , .Xr siginfo 3 .Sh STANDARDS The Modified: stable/10/share/man/man3/Makefile ============================================================================== --- stable/10/share/man/man3/Makefile Mon Jul 25 23:37:47 2016 (r303324) +++ stable/10/share/man/man3/Makefile Mon Jul 25 23:38:14 2016 (r303325) @@ -13,6 +13,7 @@ MAN= assert.3 \ offsetof.3 \ ${PTHREAD_MAN} \ queue.3 \ + sigevent.3 \ siginfo.3 \ stdarg.3 \ sysexits.3 \ Copied: stable/10/share/man/man3/sigevent.3 (from r302899, head/share/man/man3/sigevent.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man3/sigevent.3 Mon Jul 25 23:38:14 2016 (r303325, copy of r302899, head/share/man/man3/sigevent.3) @@ -0,0 +1,127 @@ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 2016 John H. Baldwin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 15, 2016 +.Dt SIGEVENT 3 +.Os +.Sh NAME +.Nm sigevent +.Nd "asynchronous event notification" +.Sh SYNOPSIS +.In signal.h +.Sh DESCRIPTION +Some operations permit threads to request asychronous notification of events +via a +.Vt struct sigevent +structure. +This structure contains several fields that describe the requested notification: +.Bl -column ".Vt void (*)(union sigval)" ".Va sigev_notify_kevent_flags" +.It Sy Type Ta Sy Member Ta Sy Description +.It Vt int Ta sigev_notify Ta notification method +.It Vt int Ta sigev_signo Ta signal number +.It Vt union sigval Ta sigev_value Ta signal value +.It Vt int Ta sigev_notify_kqueue Ta +.Xr kqueue 2 +file descriptor +.It Vt unsigned short Ta sigev_notify_kevent_flags Ta kevent flags +.It Vt lwpid_t Ta sigev_notify_thread_id Ta LWP ID +.It Vt void (*)(union sigval) Ta sigev_notify_function Ta +callback function pointer +.It Vt pthread_attr_t * Ta sigev_notify_attributes Ta +callback thread attributes +.El +.Pp +The +.Va sigev_notify +field specifies the notification method used when the event triggers: +.Bl -tag -width ".Dv SIGEV_THREAD_ID" +.It Dv SIGEV_NONE +No notification is sent. +.It Dv SIGEV_SIGNAL +The signal +.Va sigev_signo +is queued as a real-time signal to the calling process. +The value stored in +.Va sigev_value +will be present in the +.Va si_value +of the +.Vt siginfo_t +structure of the queued signal. +.It Dv SIGEV_THREAD +The notification function in +.Va sigev_notify_function +is called in a separate thread context. +The thread is created with the attributes specified in +.Va *sigev_notify_attributes . +The value stored in +.Va sigev_value +is passed as the sole argument to +.Va sigev_notify_function . +If +.Va sigev_notify_attributes +is +.Dv NULL , +the thread is created with default attributes. +.It Dv SIGEV_KEVENT +A new kevent is posted to the kqueue +.Va sigev_notify_kqueue . +The +.Va udata +member of the kevent structure contains the value stored in +.Va sigev_value . +The meaning of other fields in the kevent are specific to the type of triggered +event. +.It Dv SIGEV_THREAD_ID +The signal +.Va sigev_signo +is queued to the thread whose LWP ID is +.Va sigev_notify_thread_id . +The value stored in +.Va sigev_value +will be present in the +.Va si_value +of the +.Vt siginfo_t +structure of the queued signal. +.El +.Sh NOTES +Note that programs wishing to use +.Dv SIGEV_THREAD +notifications must link against the +.Lb librt . +.Sh SEE ALSO +.Xr aio_read 2 , +.Xr mq_notify 2 , +.Xr timer_create 2 , +.Xr siginfo 3 +.Sh STANDARDS +The +.Vt struct sigevent +type conforms to +.St -p1003.1-2004 . Modified: stable/10/share/man/man4/aio.4 ============================================================================== --- stable/10/share/man/man4/aio.4 Mon Jul 25 23:37:47 2016 (r303324) +++ stable/10/share/man/man4/aio.4 Mon Jul 25 23:38:14 2016 (r303325) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 24, 2002 +.Dd July 15, 2016 .Dt AIO 4 .Os .Sh NAME @@ -45,6 +45,54 @@ The facility provides system calls for asynchronous I/O. It is available both as a kernel option for static inclusion and as a dynamic kernel module. +.Pp +Asynchronous I/O control buffers should be zeroed before initializing +individual fields. +This ensures all fields are initialized. +.Pp +All asynchronous I/O control buffers contain a +.Vt sigevent +structure in the +.Va aio_sigevent +field which can be used to request notification when an operation completes. +.Pp +For +.Dv SIGEV_KEVENT +notifications, +the posted kevent will contain: +.Bl -column ".Va filter" +.It Sy Member Ta Sy Value +.It Va ident Ta asynchronous I/O control buffer pointer +.It Va filter Ta Dv EVFILT_AIO +.It Va udata Ta +value stored in +.Va aio_sigevent.sigev_value +.El +.Pp +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the information for the queued signal will include +.Dv SI_ASYNCIO +in the +.Va si_code +field and the value stored in +.Va sigevent.sigev_value +in the +.Va si_value +field. +.Pp +For +.Dv SIGEV_THREAD +notifications, +the value stored in +.Va aio_sigevent.sigev_value +is passed to the +.Va aio_sigevent.sigev_notify_function +as described in +.Xr sigevent 3 . .Sh SEE ALSO .Xr aio_cancel 2 , .Xr aio_error 2 , @@ -54,6 +102,7 @@ dynamic kernel module. .Xr aio_waitcomplete 2 , .Xr aio_write 2 , .Xr lio_listio 2 , +.Xr sigevent 3 , .Xr config 8 , .Xr kldload 8 , .Xr kldunload 8 From owner-svn-src-all@freebsd.org Mon Jul 25 23:44:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 407D5BA540E; Mon, 25 Jul 2016 23:44:46 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBA3A1F17; Mon, 25 Jul 2016 23:44:45 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PNijql059465; Mon, 25 Jul 2016 23:44:45 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PNijea059463; Mon, 25 Jul 2016 23:44:45 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201607252344.u6PNijea059463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 25 Jul 2016 23:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303326 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 23:44:46 -0000 Author: sbruno Date: Mon Jul 25 23:44:44 2016 New Revision: 303326 URL: https://svnweb.freebsd.org/changeset/base/303326 Log: iwm(4): switch to ieee80211_runtask() Submitted by: Andiry Voskoboinyk (s3erios@gmail.com) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D5054 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Jul 25 23:38:14 2016 (r303325) +++ head/sys/dev/iwm/if_iwm.c Mon Jul 25 23:44:44 2016 (r303326) @@ -4092,6 +4092,7 @@ do { \ static void iwm_notif_intr(struct iwm_softc *sc) { + struct ieee80211com *ic = &sc->sc_ic; uint16_t hw; bus_dmamap_sync(sc->rxq.stat_dma.tag, sc->rxq.stat_dma.map, @@ -4145,7 +4146,6 @@ iwm_notif_intr(struct iwm_softc *sc) int missed; /* XXX look at mac_id to determine interface ID */ - struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); SYNC_RESP_STRUCT(resp, pkt); @@ -4253,7 +4253,7 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_SCAN_COMPLETE_NOTIFICATION: { struct iwm_scan_complete_notif *notif; SYNC_RESP_STRUCT(notif, pkt); - taskqueue_enqueue(sc->sc_tq, &sc->sc_es_task); + ieee80211_runtask(ic, &sc->sc_es_task); break; } case IWM_REPLY_ERROR: { @@ -4627,14 +4627,6 @@ iwm_attach(device_t dev) callout_init_mtx(&sc->sc_watchdog_to, &sc->sc_mtx, 0); callout_init_mtx(&sc->sc_led_blink_to, &sc->sc_mtx, 0); TASK_INIT(&sc->sc_es_task, 0, iwm_endscan_cb, sc); - sc->sc_tq = taskqueue_create("iwm_taskq", M_WAITOK, - taskqueue_thread_enqueue, &sc->sc_tq); - error = taskqueue_start_threads(&sc->sc_tq, 1, 0, "iwm_taskq"); - if (error != 0) { - device_printf(dev, "can't start threads, error %d\n", - error); - goto fail; - } /* PCI attach */ error = iwm_pci_attach(dev); @@ -5015,10 +5007,8 @@ iwm_detach_local(struct iwm_softc *sc, i device_t dev = sc->sc_dev; int i; - if (sc->sc_tq) { - taskqueue_drain_all(sc->sc_tq); - taskqueue_free(sc->sc_tq); - } + ieee80211_draintask(&sc->sc_ic, &sc->sc_es_task); + callout_drain(&sc->sc_led_blink_to); callout_drain(&sc->sc_watchdog_to); iwm_stop_device(sc); Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Jul 25 23:38:14 2016 (r303325) +++ head/sys/dev/iwm/if_iwmvar.h Mon Jul 25 23:44:44 2016 (r303326) @@ -495,7 +495,6 @@ struct iwm_softc { uint8_t sc_cmd_resp[IWM_CMD_RESP_MAX]; int sc_wantresp; - struct taskqueue *sc_tq; struct task sc_es_task; struct iwm_rx_phy_info sc_last_phy_info; From owner-svn-src-all@freebsd.org Tue Jul 26 00:02:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B2DEBA59E7; Tue, 26 Jul 2016 00:02:18 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 026EC19E2; Tue, 26 Jul 2016 00:02:17 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6Q02HFF066812; Tue, 26 Jul 2016 00:02:17 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6Q02HKn066810; Tue, 26 Jul 2016 00:02:17 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201607260002.u6Q02HKn066810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 26 Jul 2016 00:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303327 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 00:02:18 -0000 Author: sbruno Date: Tue Jul 26 00:02:17 2016 New Revision: 303327 URL: https://svnweb.freebsd.org/changeset/base/303327 Log: iwm(4) synchronize driver to DragonFlyBSD version and recent f/w update. Submitted by: Kevin Bowling (kevin.bowling@kev009.com) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D6967 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_led.c head/sys/dev/iwm/if_iwm_led.h head/sys/dev/iwm/if_iwm_mac_ctxt.c head/sys/dev/iwm/if_iwm_pcie_trans.c head/sys/dev/iwm/if_iwm_phy_ctxt.c head/sys/dev/iwm/if_iwm_phy_db.c head/sys/dev/iwm/if_iwm_power.c head/sys/dev/iwm/if_iwm_scan.c head/sys/dev/iwm/if_iwm_scan.h head/sys/dev/iwm/if_iwm_time_event.c head/sys/dev/iwm/if_iwm_util.c head/sys/dev/iwm/if_iwm_util.h head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Jul 25 23:44:44 2016 (r303326) +++ head/sys/dev/iwm/if_iwm.c Tue Jul 26 00:02:17 2016 (r303327) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.39 2015/03/23 00:35:19 jsg Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.42 2015/05/30 02:49:23 deraadt Exp $ */ /* * Copyright (c) 2014 genua mbh @@ -173,11 +173,23 @@ const uint8_t iwm_nvm_channels[] = { 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 149, 153, 157, 161, 165 }; -#define IWM_NUM_2GHZ_CHANNELS 14 - _Static_assert(nitems(iwm_nvm_channels) <= IWM_NUM_CHANNELS, "IWM_NUM_CHANNELS is too small"); +const uint8_t iwm_nvm_channels_8000[] = { + /* 2.4 GHz */ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + /* 5 GHz */ + 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, + 149, 153, 157, 161, 165, 169, 173, 177, 181 +}; +_Static_assert(nitems(iwm_nvm_channels_8000) <= IWM_NUM_CHANNELS_8000, + "IWM_NUM_CHANNELS_8000 is too small"); + +#define IWM_NUM_2GHZ_CHANNELS 14 +#define IWM_N_HW_ADDR_MASK 0xF + /* * XXX For now, there's simply a fixed set of rate table entries * that are populated. @@ -205,6 +217,11 @@ const struct iwm_rate { #define IWM_RIDX_IS_CCK(_i_) ((_i_) < IWM_RIDX_OFDM) #define IWM_RIDX_IS_OFDM(_i_) ((_i_) >= IWM_RIDX_OFDM) +struct iwm_nvm_section { + uint16_t length; + uint8_t *data; +}; + static int iwm_store_cscheme(struct iwm_softc *, const uint8_t *, size_t); static int iwm_firmware_store_section(struct iwm_softc *, enum iwm_ucode_type, @@ -242,27 +259,45 @@ static void iwm_mvm_nic_config(struct iw static int iwm_nic_rx_init(struct iwm_softc *); static int iwm_nic_tx_init(struct iwm_softc *); static int iwm_nic_init(struct iwm_softc *); -static void iwm_enable_txq(struct iwm_softc *, int, int); +static int iwm_enable_txq(struct iwm_softc *, int, int, int); static int iwm_post_alive(struct iwm_softc *); static int iwm_nvm_read_chunk(struct iwm_softc *, uint16_t, uint16_t, uint16_t, uint8_t *, uint16_t *); static int iwm_nvm_read_section(struct iwm_softc *, uint16_t, uint8_t *, - uint16_t *); + uint16_t *, size_t); static uint32_t iwm_eeprom_channel_flags(uint16_t); static void iwm_add_channel_band(struct iwm_softc *, - struct ieee80211_channel[], int, int *, int, int, + struct ieee80211_channel[], int, int *, int, size_t, const uint8_t[]); static void iwm_init_channel_map(struct ieee80211com *, int, int *, struct ieee80211_channel[]); static int iwm_parse_nvm_data(struct iwm_softc *, const uint16_t *, - const uint16_t *, const uint16_t *, uint8_t, - uint8_t); -struct iwm_nvm_section; + const uint16_t *, const uint16_t *, + const uint16_t *, const uint16_t *, + const uint16_t *); +static void iwm_set_hw_address_8000(struct iwm_softc *, + struct iwm_nvm_data *, + const uint16_t *, const uint16_t *); +static int iwm_get_sku(const struct iwm_softc *, const uint16_t *, + const uint16_t *); +static int iwm_get_nvm_version(const struct iwm_softc *, const uint16_t *); +static int iwm_get_radio_cfg(const struct iwm_softc *, const uint16_t *, + const uint16_t *); +static int iwm_get_n_hw_addrs(const struct iwm_softc *, + const uint16_t *); +static void iwm_set_radio_cfg(const struct iwm_softc *, + struct iwm_nvm_data *, uint32_t); static int iwm_parse_nvm_sections(struct iwm_softc *, struct iwm_nvm_section *); static int iwm_nvm_init(struct iwm_softc *); +static int iwm_firmware_load_sect(struct iwm_softc *, uint32_t, + const uint8_t *, uint32_t); static int iwm_firmware_load_chunk(struct iwm_softc *, uint32_t, const uint8_t *, uint32_t); +static int iwm_load_firmware_7000(struct iwm_softc *, enum iwm_ucode_type); +static int iwm_load_cpu_sections_8000(struct iwm_softc *, + struct iwm_fw_sects *, int , int *); +static int iwm_load_firmware_8000(struct iwm_softc *, enum iwm_ucode_type); static int iwm_load_firmware(struct iwm_softc *, enum iwm_ucode_type); static int iwm_start_fw(struct iwm_softc *, enum iwm_ucode_type); static int iwm_send_tx_ant_cfg(struct iwm_softc *, uint8_t); @@ -297,10 +332,8 @@ static int iwm_tx(struct iwm_softc *, st struct ieee80211_node *, int); static int iwm_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); -static void iwm_mvm_add_sta_cmd_v6_to_v5(struct iwm_mvm_add_sta_cmd_v6 *, - struct iwm_mvm_add_sta_cmd_v5 *); static int iwm_mvm_send_add_sta_cmd_status(struct iwm_softc *, - struct iwm_mvm_add_sta_cmd_v6 *, + struct iwm_mvm_add_sta_cmd_v7 *, int *); static int iwm_mvm_sta_send_to_fw(struct iwm_softc *, struct iwm_node *, int); @@ -321,6 +354,13 @@ static void iwm_setrates(struct iwm_soft static int iwm_media_change(struct ifnet *); static int iwm_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void iwm_endscan_cb(void *, int); +static void iwm_mvm_fill_sf_command(struct iwm_softc *, + struct iwm_sf_cfg_cmd *, + struct ieee80211_node *); +static int iwm_mvm_sf_config(struct iwm_softc *, enum iwm_sf_state); +static int iwm_send_bt_init_conf(struct iwm_softc *); +static int iwm_send_update_mcc_cmd(struct iwm_softc *, const char *); +static void iwm_mvm_tt_tx_backoff(struct iwm_softc *, uint32_t); static int iwm_init_hw(struct iwm_softc *); static void iwm_init(struct iwm_softc *); static void iwm_start(struct iwm_softc *); @@ -331,10 +371,12 @@ static void iwm_parent(struct ieee80211c static const char * iwm_desc_lookup(uint32_t); static void iwm_nic_error(struct iwm_softc *); +static void iwm_nic_umac_error(struct iwm_softc *); #endif static void iwm_notif_intr(struct iwm_softc *); static void iwm_intr(void *); static int iwm_attach(device_t); +static int iwm_is_valid_ether_addr(uint8_t *); static void iwm_preinit(void *); static int iwm_detach_local(struct iwm_softc *sc, int); static void iwm_init_task(void *); @@ -477,6 +519,12 @@ iwm_read_firmware(struct iwm_softc *sc, } fw->fw_fp = fwp; + /* (Re-)Initialize default values. */ + sc->sc_capaflags = 0; + sc->sc_capa_n_scan_channels = IWM_MAX_NUM_SCAN_CHANNELS; + memset(sc->sc_enabled_capa, 0, sizeof(sc->sc_enabled_capa)); + memset(sc->sc_fw_mcc, 0, sizeof(sc->sc_fw_mcc)); + /* * Parse firmware contents */ @@ -490,7 +538,10 @@ iwm_read_firmware(struct iwm_softc *sc, goto out; } - sc->sc_fwver = le32toh(uhdr->ver); + snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%d.%d (API ver %d)", + IWM_UCODE_MAJOR(le32toh(uhdr->ver)), + IWM_UCODE_MINOR(le32toh(uhdr->ver)), + IWM_UCODE_API(le32toh(uhdr->ver))); data = uhdr->data; len = fw->fw_fp->datasize - sizeof(*uhdr); @@ -527,7 +578,8 @@ iwm_read_firmware(struct iwm_softc *sc, sc->sc_capa_max_probe_len = le32toh(*(const uint32_t *)tlv_data); /* limit it to something sensible */ - if (sc->sc_capa_max_probe_len > (1<<16)) { + if (sc->sc_capa_max_probe_len > + IWM_SCAN_OFFLOAD_PROBE_REQ_SIZE) { IWM_DPRINTF(sc, IWM_DEBUG_FIRMWARE_TLV, "%s: IWM_UCODE_TLV_PROBE_MAX_LEN " "ridiculous\n", __func__); @@ -578,7 +630,8 @@ iwm_read_firmware(struct iwm_softc *sc, goto parse_out; } break; - case IWM_UCODE_TLV_NUM_OF_CPU: + case IWM_UCODE_TLV_NUM_OF_CPU: { + uint32_t num_cpu; if (tlv_len != sizeof(uint32_t)) { device_printf(sc->sc_dev, "%s: IWM_UCODE_TLV_NUM_OF_CPU: tlv_len (%d) < sizeof(uint32_t)\n", @@ -587,15 +640,16 @@ iwm_read_firmware(struct iwm_softc *sc, error = EINVAL; goto parse_out; } - if (le32toh(*(const uint32_t*)tlv_data) != 1) { + num_cpu = le32toh(*(const uint32_t *)tlv_data); + if (num_cpu < 1 || num_cpu > 2) { device_printf(sc->sc_dev, - "%s: driver supports " - "only TLV_NUM_OF_CPU == 1", + "%s: Driver supports only 1 or 2 CPUs\n", __func__); error = EINVAL; goto parse_out; } break; + } case IWM_UCODE_TLV_SEC_RT: if ((error = iwm_firmware_store_section(sc, IWM_UCODE_TYPE_REGULAR, tlv_data, tlv_len)) != 0) { @@ -657,11 +711,80 @@ iwm_read_firmware(struct iwm_softc *sc, le32toh(*(const uint32_t *)tlv_data); break; - case IWM_UCODE_TLV_API_CHANGES_SET: - case IWM_UCODE_TLV_ENABLED_CAPABILITIES: + case IWM_UCODE_TLV_API_CHANGES_SET: { + const struct iwm_ucode_api *api; + if (tlv_len != sizeof(*api)) { + error = EINVAL; + goto parse_out; + } + api = (const struct iwm_ucode_api *)tlv_data; + /* Flags may exceed 32 bits in future firmware. */ + if (le32toh(api->api_index) > 0) { + device_printf(sc->sc_dev, + "unsupported API index %d\n", + le32toh(api->api_index)); + goto parse_out; + } + sc->sc_ucode_api = le32toh(api->api_flags); + break; + } + + case IWM_UCODE_TLV_ENABLED_CAPABILITIES: { + const struct iwm_ucode_capa *capa; + int idx, i; + if (tlv_len != sizeof(*capa)) { + error = EINVAL; + goto parse_out; + } + capa = (const struct iwm_ucode_capa *)tlv_data; + idx = le32toh(capa->api_index); + if (idx > howmany(IWM_NUM_UCODE_TLV_CAPA, 32)) { + device_printf(sc->sc_dev, + "unsupported API index %d\n", idx); + goto parse_out; + } + for (i = 0; i < 32; i++) { + if ((le32toh(capa->api_capa) & (1U << i)) == 0) + continue; + setbit(sc->sc_enabled_capa, i + (32 * idx)); + } + break; + } + + case 48: /* undocumented TLV */ + case IWM_UCODE_TLV_SDIO_ADMA_ADDR: + case IWM_UCODE_TLV_FW_GSCAN_CAPA: /* ignore, not used by current driver */ break; + case IWM_UCODE_TLV_SEC_RT_USNIFFER: + if ((error = iwm_firmware_store_section(sc, + IWM_UCODE_TYPE_REGULAR_USNIFFER, tlv_data, + tlv_len)) != 0) + goto parse_out; + break; + + case IWM_UCODE_TLV_N_SCAN_CHANNELS: + if (tlv_len != sizeof(uint32_t)) { + error = EINVAL; + goto parse_out; + } + sc->sc_capa_n_scan_channels = + le32toh(*(const uint32_t *)tlv_data); + break; + + case IWM_UCODE_TLV_FW_VERSION: + if (tlv_len != sizeof(uint32_t) * 3) { + error = EINVAL; + goto parse_out; + } + snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), + "%d.%d.%d", + le32toh(((const uint32_t *)tlv_data)[0]), + le32toh(((const uint32_t *)tlv_data)[1]), + le32toh(((const uint32_t *)tlv_data)[2])); + break; + default: device_printf(sc->sc_dev, "%s: unknown firmware section %d, abort\n", @@ -710,7 +833,7 @@ iwm_dma_map_addr(void *arg, bus_dma_segm if (error != 0) return; KASSERT(nsegs == 1, ("too many DMA segments, %d should be 1", nsegs)); - *(bus_addr_t *)arg = segs[0].ds_addr; + *(bus_addr_t *)arg = segs[0].ds_addr; } static int @@ -720,6 +843,7 @@ iwm_dma_contig_alloc(bus_dma_tag_t tag, int error; dma->tag = NULL; + dma->map = NULL; dma->size = size; dma->vaddr = NULL; @@ -739,14 +863,16 @@ iwm_dma_contig_alloc(bus_dma_tag_t tag, if (error != 0) { bus_dmamem_free(dma->tag, dma->vaddr, dma->map); dma->vaddr = NULL; - goto fail; + goto fail; } bus_dmamap_sync(dma->tag, dma->map, BUS_DMASYNC_PREWRITE); return 0; -fail: iwm_dma_contig_free(dma); +fail: + iwm_dma_contig_free(dma); + return error; } @@ -764,7 +890,6 @@ iwm_dma_contig_free(struct iwm_dma_info bus_dma_tag_destroy(dma->tag); dma->tag = NULL; } - } /* fwmem is used to load firmware onto the card */ @@ -901,7 +1026,7 @@ fail: iwm_free_rx_ring(sc, ring); static void iwm_disable_rx_dma(struct iwm_softc *sc) { - + /* XXX conditional nic locks are stupid */ /* XXX print out if we can't lock the NIC? */ if (iwm_nic_lock(sc)) { /* XXX handle if RX stop doesn't finish? */ @@ -915,6 +1040,11 @@ iwm_reset_rx_ring(struct iwm_softc *sc, { /* Reset the ring state */ ring->cur = 0; + + /* + * The hw rx ring index in shared memory must also be cleared, + * otherwise the discrepancy can cause reprocessing chaos. + */ memset(sc->rxq.stat, 0, sizeof(*sc->rxq.stat)); } @@ -1125,6 +1255,7 @@ iwm_ict_reset(struct iwm_softc *sc) /* Set physical address of ICT table (4KB aligned). */ IWM_WRITE(sc, IWM_CSR_DRAM_INT_TBL_REG, IWM_CSR_DRAM_INT_TBL_ENABLE + | IWM_CSR_DRAM_INIT_TBL_WRITE_POINTER | IWM_CSR_DRAM_INIT_TBL_WRAP_CHECK | sc->ict_dma.paddr >> IWM_ICT_PADDR_SHIFT); @@ -1217,7 +1348,7 @@ iwm_stop_device(struct iwm_softc *sc) */ iwm_disable_interrupts(sc); /* stop and reset the on-board processor */ - IWM_WRITE(sc, IWM_CSR_RESET, IWM_CSR_RESET_REG_FLAG_NEVO_RESET); + IWM_WRITE(sc, IWM_CSR_RESET, IWM_CSR_RESET_REG_FLAG_SW_RESET); /* * Even if we stop the HW, we still want the RF kill @@ -1263,9 +1394,11 @@ iwm_mvm_nic_config(struct iwm_softc *sc) * (PCIe power is lost before PERST# is asserted), causing ME FW * to lose ownership and not being able to obtain it back. */ - iwm_set_bits_mask_prph(sc, IWM_APMG_PS_CTRL_REG, - IWM_APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS, - ~IWM_APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS); + if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { + iwm_set_bits_mask_prph(sc, IWM_APMG_PS_CTRL_REG, + IWM_APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS, + ~IWM_APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS); + } } static int @@ -1295,16 +1428,12 @@ iwm_nic_rx_init(struct iwm_softc *sc) IWM_FH_RSCSR_CHNL0_STTS_WPTR_REG, sc->rxq.stat_dma.paddr >> 4); /* Enable RX. */ - /* - * Note: Linux driver also sets this: - * (IWM_RX_RB_TIMEOUT << IWM_FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS) | - * - * It causes weird behavior. YMMV. - */ IWM_WRITE(sc, IWM_FH_MEM_RCSR_CHNL0_CONFIG_REG, IWM_FH_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL | IWM_FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY | /* HW bug */ IWM_FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL | + IWM_FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK | + (IWM_RX_RB_TIMEOUT << IWM_FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS) | IWM_FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K | IWM_RX_QUEUE_SIZE_LOG << IWM_FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS); @@ -1318,7 +1447,7 @@ iwm_nic_rx_init(struct iwm_softc *sc) * Thus sayeth el jefe (iwlwifi) via a comment: * * This value should initially be 0 (before preparing any - * RBs), should be 8 after preparing the first 8 RBs (for example) + * RBs), should be 8 after preparing the first 8 RBs (for example) */ IWM_WRITE(sc, IWM_FH_RSCSR_CHNL0_WPTR, 8); @@ -1354,6 +1483,9 @@ iwm_nic_tx_init(struct iwm_softc *sc) qid, txq->desc, (unsigned long) (txq->desc_dma.paddr >> 8)); } + + iwm_write_prph(sc, IWM_SCD_GP_CTRL, IWM_SCD_GP_CTRL_AUTO_ACTIVE_MODE); + iwm_nic_unlock(sc); return 0; @@ -1365,7 +1497,8 @@ iwm_nic_init(struct iwm_softc *sc) int error; iwm_apm_init(sc); - iwm_set_pwr(sc); + if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) + iwm_set_pwr(sc); iwm_mvm_nic_config(sc); @@ -1392,52 +1525,79 @@ const uint8_t iwm_mvm_ac_to_tx_fifo[] = IWM_MVM_TX_FIFO_BK, }; -static void -iwm_enable_txq(struct iwm_softc *sc, int qid, int fifo) +static int +iwm_enable_txq(struct iwm_softc *sc, int sta_id, int qid, int fifo) { if (!iwm_nic_lock(sc)) { device_printf(sc->sc_dev, "%s: cannot enable txq %d\n", __func__, qid); - return; /* XXX return EBUSY */ + return EBUSY; } - /* unactivate before configuration */ - iwm_write_prph(sc, IWM_SCD_QUEUE_STATUS_BITS(qid), - (0 << IWM_SCD_QUEUE_STTS_REG_POS_ACTIVE) - | (1 << IWM_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN)); + IWM_WRITE(sc, IWM_HBUS_TARG_WRPTR, qid << 8 | 0); - if (qid != IWM_MVM_CMD_QUEUE) { - iwm_set_bits_prph(sc, IWM_SCD_QUEUECHAIN_SEL, (1 << qid)); - } + if (qid == IWM_MVM_CMD_QUEUE) { + /* unactivate before configuration */ + iwm_write_prph(sc, IWM_SCD_QUEUE_STATUS_BITS(qid), + (0 << IWM_SCD_QUEUE_STTS_REG_POS_ACTIVE) + | (1 << IWM_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN)); + + iwm_clear_bits_prph(sc, IWM_SCD_AGGR_SEL, (1 << qid)); + + iwm_write_prph(sc, IWM_SCD_QUEUE_RDPTR(qid), 0); + + iwm_write_mem32(sc, sc->sched_base + IWM_SCD_CONTEXT_QUEUE_OFFSET(qid), 0); + /* Set scheduler window size and frame limit. */ + iwm_write_mem32(sc, + sc->sched_base + IWM_SCD_CONTEXT_QUEUE_OFFSET(qid) + + sizeof(uint32_t), + ((IWM_FRAME_LIMIT << IWM_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS) & + IWM_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK) | + ((IWM_FRAME_LIMIT << IWM_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS) & + IWM_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK)); + + iwm_write_prph(sc, IWM_SCD_QUEUE_STATUS_BITS(qid), + (1 << IWM_SCD_QUEUE_STTS_REG_POS_ACTIVE) | + (fifo << IWM_SCD_QUEUE_STTS_REG_POS_TXF) | + (1 << IWM_SCD_QUEUE_STTS_REG_POS_WSL) | + IWM_SCD_QUEUE_STTS_REG_MSK); + } else { + struct iwm_scd_txq_cfg_cmd cmd; + int error; - iwm_clear_bits_prph(sc, IWM_SCD_AGGR_SEL, (1 << qid)); + iwm_nic_unlock(sc); - IWM_WRITE(sc, IWM_HBUS_TARG_WRPTR, qid << 8 | 0); - iwm_write_prph(sc, IWM_SCD_QUEUE_RDPTR(qid), 0); + memset(&cmd, 0, sizeof(cmd)); + cmd.scd_queue = qid; + cmd.enable = 1; + cmd.sta_id = sta_id; + cmd.tx_fifo = fifo; + cmd.aggregate = 0; + cmd.window = IWM_FRAME_LIMIT; + + error = iwm_mvm_send_cmd_pdu(sc, IWM_SCD_QUEUE_CFG, IWM_CMD_SYNC, + sizeof(cmd), &cmd); + if (error) { + device_printf(sc->sc_dev, + "cannot enable txq %d\n", qid); + return error; + } + + if (!iwm_nic_lock(sc)) + return EBUSY; + } - iwm_write_mem32(sc, sc->sched_base + IWM_SCD_CONTEXT_QUEUE_OFFSET(qid), 0); - /* Set scheduler window size and frame limit. */ - iwm_write_mem32(sc, - sc->sched_base + IWM_SCD_CONTEXT_QUEUE_OFFSET(qid) + - sizeof(uint32_t), - ((IWM_FRAME_LIMIT << IWM_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS) & - IWM_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK) | - ((IWM_FRAME_LIMIT << IWM_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS) & - IWM_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK)); - - iwm_write_prph(sc, IWM_SCD_QUEUE_STATUS_BITS(qid), - (1 << IWM_SCD_QUEUE_STTS_REG_POS_ACTIVE) | - (fifo << IWM_SCD_QUEUE_STTS_REG_POS_TXF) | - (1 << IWM_SCD_QUEUE_STTS_REG_POS_WSL) | - IWM_SCD_QUEUE_STTS_REG_MSK); + iwm_write_prph(sc, IWM_SCD_EN_CTRL, + iwm_read_prph(sc, IWM_SCD_EN_CTRL) | qid); iwm_nic_unlock(sc); - IWM_DPRINTF(sc, IWM_DEBUG_XMIT, - "%s: enabled txq %d FIFO %d\n", + IWM_DPRINTF(sc, IWM_DEBUG_XMIT, "%s: enabled txq %d FIFO %d\n", __func__, qid, fifo); + + return 0; } static int @@ -1445,16 +1605,16 @@ iwm_post_alive(struct iwm_softc *sc) { int nwords; int error, chnl; + uint32_t base; if (!iwm_nic_lock(sc)) return EBUSY; - if (sc->sched_base != iwm_read_prph(sc, IWM_SCD_SRAM_BASE_ADDR)) { + base = iwm_read_prph(sc, IWM_SCD_SRAM_BASE_ADDR); + if (sc->sched_base != base) { device_printf(sc->sc_dev, - "%s: sched addr mismatch", - __func__); - error = EINVAL; - goto out; + "%s: sched addr mismatch: alive: 0x%x prph: 0x%x\n", + __func__, sc->sched_base, base); } iwm_ict_reset(sc); @@ -1474,8 +1634,15 @@ iwm_post_alive(struct iwm_softc *sc) iwm_write_prph(sc, IWM_SCD_CHAINEXT_EN, 0); + iwm_nic_unlock(sc); + /* enable command channel */ - iwm_enable_txq(sc, IWM_MVM_CMD_QUEUE, 7); + error = iwm_enable_txq(sc, 0 /* unused */, IWM_MVM_CMD_QUEUE, 7); + if (error) + return error; + + if (!iwm_nic_lock(sc)) + return EBUSY; iwm_write_prph(sc, IWM_SCD_TXFACT, 0xff); @@ -1490,11 +1657,13 @@ iwm_post_alive(struct iwm_softc *sc) IWM_FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN); /* Enable L1-Active */ - iwm_clear_bits_prph(sc, IWM_APMG_PCIDEV_STT_REG, - IWM_APMG_PCIDEV_STT_VAL_L1_ACT_DIS); + if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + iwm_clear_bits_prph(sc, IWM_APMG_PCIDEV_STT_REG, + IWM_APMG_PCIDEV_STT_VAL_L1_ACT_DIS); + } out: - iwm_nic_unlock(sc); + iwm_nic_unlock(sc); return error; } @@ -1508,17 +1677,25 @@ iwm_post_alive(struct iwm_softc *sc) const int nvm_to_read[] = { IWM_NVM_SECTION_TYPE_HW, IWM_NVM_SECTION_TYPE_SW, + IWM_NVM_SECTION_TYPE_REGULATORY, IWM_NVM_SECTION_TYPE_CALIBRATION, IWM_NVM_SECTION_TYPE_PRODUCTION, + IWM_NVM_SECTION_TYPE_HW_8000, + IWM_NVM_SECTION_TYPE_MAC_OVERRIDE, + IWM_NVM_SECTION_TYPE_PHY_SKU, }; /* Default NVM size to read */ -#define IWM_NVM_DEFAULT_CHUNK_SIZE (2*1024) -#define IWM_MAX_NVM_SECTION_SIZE 7000 +#define IWM_NVM_DEFAULT_CHUNK_SIZE (2*1024) +#define IWM_MAX_NVM_SECTION_SIZE 8192 #define IWM_NVM_WRITE_OPCODE 1 #define IWM_NVM_READ_OPCODE 0 +/* load nvm chunk response */ +#define IWM_READ_NVM_CHUNK_SUCCEED 0 +#define IWM_READ_NVM_CHUNK_INVALID_ADDRESS 1 + static int iwm_nvm_read_chunk(struct iwm_softc *sc, uint16_t section, uint16_t offset, uint16_t length, uint8_t *data, uint16_t *len) @@ -1538,20 +1715,24 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, IWM_CMD_SEND_IN_RFKILL, .data = { &nvm_access_cmd, }, }; - int ret, bytes_read, offset_read; + int ret, offset_read; + size_t bytes_read; uint8_t *resp_data; cmd.len[0] = sizeof(struct iwm_nvm_access_cmd); ret = iwm_send_cmd(sc, &cmd); - if (ret) + if (ret) { + device_printf(sc->sc_dev, + "Could not send NVM_ACCESS command (error=%d)\n", ret); return ret; + } pkt = cmd.resp_pkt; if (pkt->hdr.flags & IWM_CMD_FAILED_MSK) { device_printf(sc->sc_dev, - "%s: Bad return from IWM_NVM_ACCES_COMMAND (0x%08X)\n", - __func__, pkt->hdr.flags); + "Bad return from IWM_NVM_ACCES_COMMAND (0x%08X)\n", + pkt->hdr.flags); ret = EIO; goto exit; } @@ -1564,17 +1745,25 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, offset_read = le16toh(nvm_resp->offset); resp_data = nvm_resp->data; if (ret) { - device_printf(sc->sc_dev, - "%s: NVM access command failed with status %d\n", - __func__, ret); + IWM_DPRINTF(sc, IWM_DEBUG_RESET, + "NVM access command failed with status %d\n", ret); ret = EINVAL; goto exit; } if (offset_read != offset) { device_printf(sc->sc_dev, - "%s: NVM ACCESS response with invalid offset %d\n", - __func__, offset_read); + "NVM ACCESS response with invalid offset %d\n", + offset_read); + ret = EINVAL; + goto exit; + } + + if (bytes_read > length) { + device_printf(sc->sc_dev, + "NVM ACCESS response with too much data " + "(%d bytes requested, %zd bytes received)\n", + length, bytes_read); ret = EINVAL; goto exit; } @@ -1589,7 +1778,7 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, /* * Reads an NVM section completely. - * NICs prior to 7000 family doesn't have a real NVM, but just read + * NICs prior to 7000 family don't have a real NVM, but just read * section 0 which is the EEPROM. Because the EEPROM reading is unlimited * by uCode, we need to manually check in this case that we don't * overflow and try to read more than the EEPROM size. @@ -1599,32 +1788,34 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, */ static int iwm_nvm_read_section(struct iwm_softc *sc, - uint16_t section, uint8_t *data, uint16_t *len) + uint16_t section, uint8_t *data, uint16_t *len, size_t max_len) { - uint16_t length, seglen; - int error; + uint16_t chunklen, seglen; + int error = 0; + + IWM_DPRINTF(sc, IWM_DEBUG_RESET, + "reading NVM section %d\n", section); - /* Set nvm section read length */ - length = seglen = IWM_NVM_DEFAULT_CHUNK_SIZE; + chunklen = seglen = IWM_NVM_DEFAULT_CHUNK_SIZE; *len = 0; - /* Read the NVM until exhausted (reading less than requested) */ - while (seglen == length) { + /* Read NVM chunks until exhausted (reading less than requested) */ + while (seglen == chunklen && *len < max_len) { error = iwm_nvm_read_chunk(sc, - section, *len, length, data, &seglen); + section, *len, chunklen, data, &seglen); if (error) { - device_printf(sc->sc_dev, - "Cannot read NVM from section " - "%d offset %d, length %d\n", - section, *len, length); + IWM_DPRINTF(sc, IWM_DEBUG_RESET, + "Cannot read from NVM section " + "%d at offset %d\n", section, *len); return error; } *len += seglen; } IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "NVM section %d read completed\n", section); - return 0; + "NVM section %d read completed (%d bytes, error=%d)\n", + section, *len, error); + return error; } /* @@ -1634,7 +1825,7 @@ iwm_nvm_read_section(struct iwm_softc *s /* iwlwifi/iwl-nvm-parse.c */ /* NVM offsets (in words) definitions */ -enum wkp_nvm_offsets { +enum iwm_nvm_offsets { /* NVM HW-Section offset (in words) definitions */ IWM_HW_ADDR = 0x15, @@ -1651,6 +1842,32 @@ enum wkp_nvm_offsets { IWM_XTAL_CALIB = 0x316 - IWM_NVM_CALIB_SECTION }; +enum iwm_8000_nvm_offsets { + /* NVM HW-Section offset (in words) definitions */ + IWM_HW_ADDR0_WFPM_8000 = 0x12, + IWM_HW_ADDR1_WFPM_8000 = 0x16, + IWM_HW_ADDR0_PCIE_8000 = 0x8A, + IWM_HW_ADDR1_PCIE_8000 = 0x8E, + IWM_MAC_ADDRESS_OVERRIDE_8000 = 1, + + /* NVM SW-Section offset (in words) definitions */ + IWM_NVM_SW_SECTION_8000 = 0x1C0, + IWM_NVM_VERSION_8000 = 0, + IWM_RADIO_CFG_8000 = 0, + IWM_SKU_8000 = 2, + IWM_N_HW_ADDRS_8000 = 3, + + /* NVM REGULATORY -Section offset (in words) definitions */ + IWM_NVM_CHANNELS_8000 = 0, + IWM_NVM_LAR_OFFSET_8000_OLD = 0x4C7, + IWM_NVM_LAR_OFFSET_8000 = 0x507, + IWM_NVM_LAR_ENABLED_8000 = 0x7, + + /* NVM calibration section offset (in words) definitions */ + IWM_NVM_CALIB_SECTION_8000 = 0x2B8, + IWM_XTAL_CALIB_8000 = 0x316 - IWM_NVM_CALIB_SECTION_8000 +}; + /* SKU Capabilities (actual values from NVM definition) */ enum nvm_sku_bits { IWM_NVM_SKU_CAP_BAND_24GHZ = (1 << 0), @@ -1667,6 +1884,13 @@ enum nvm_sku_bits { #define IWM_NVM_RF_CFG_TX_ANT_MSK(x) ((x >> 8) & 0xF) /* bits 8-11 */ #define IWM_NVM_RF_CFG_RX_ANT_MSK(x) ((x >> 12) & 0xF) /* bits 12-15 */ +#define IWM_NVM_RF_CFG_FLAVOR_MSK_8000(x) (x & 0xF) +#define IWM_NVM_RF_CFG_DASH_MSK_8000(x) ((x >> 4) & 0xF) +#define IWM_NVM_RF_CFG_STEP_MSK_8000(x) ((x >> 8) & 0xF) +#define IWM_NVM_RF_CFG_TYPE_MSK_8000(x) ((x >> 12) & 0xFFF) +#define IWM_NVM_RF_CFG_TX_ANT_MSK_8000(x) ((x >> 24) & 0xF) +#define IWM_NVM_RF_CFG_RX_ANT_MSK_8000(x) ((x >> 28) & 0xF) + #define DEFAULT_MAX_TX_POWER 16 /** @@ -1718,7 +1942,8 @@ iwm_eeprom_channel_flags(uint16_t ch_fla static void iwm_add_channel_band(struct iwm_softc *sc, struct ieee80211_channel chans[], - int maxchans, int *nchans, int ch_idx, int ch_num, const uint8_t bands[]) + int maxchans, int *nchans, int ch_idx, size_t ch_num, + const uint8_t bands[]) { const uint16_t * const nvm_ch_flags = sc->sc_nvm.nvm_ch_flags; uint32_t nflags; @@ -1728,7 +1953,10 @@ iwm_add_channel_band(struct iwm_softc *s for (; ch_idx < ch_num; ch_idx++) { ch_flags = le16_to_cpup(nvm_ch_flags + ch_idx); - ieee = iwm_nvm_channels[ch_idx]; + if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) + ieee = iwm_nvm_channels[ch_idx]; + else + ieee = iwm_nvm_channels_8000[ch_idx]; if (!(ch_flags & IWM_NVM_CHANNEL_VALID)) { IWM_DPRINTF(sc, IWM_DEBUG_EEPROM, @@ -1760,6 +1988,7 @@ iwm_init_channel_map(struct ieee80211com struct iwm_softc *sc = ic->ic_softc; struct iwm_nvm_data *data = &sc->sc_nvm; uint8_t bands[IEEE80211_MODE_BYTES]; + size_t ch_num; memset(bands, 0, sizeof(bands)); /* 1-13: 11b/g channels. */ @@ -1774,51 +2003,182 @@ iwm_init_channel_map(struct ieee80211com IWM_NUM_2GHZ_CHANNELS - 1, IWM_NUM_2GHZ_CHANNELS, bands); if (data->sku_cap_band_52GHz_enable) { + if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) + ch_num = nitems(iwm_nvm_channels); + else + ch_num = nitems(iwm_nvm_channels_8000); memset(bands, 0, sizeof(bands)); setbit(bands, IEEE80211_MODE_11A); iwm_add_channel_band(sc, chans, maxchans, nchans, - IWM_NUM_2GHZ_CHANNELS, nitems(iwm_nvm_channels), bands); + IWM_NUM_2GHZ_CHANNELS, ch_num, bands); } } +static void +iwm_set_hw_address_8000(struct iwm_softc *sc, struct iwm_nvm_data *data, + const uint16_t *mac_override, const uint16_t *nvm_hw) +{ + const uint8_t *hw_addr; + + if (mac_override) { + static const uint8_t reserved_mac[] = { + 0x02, 0xcc, 0xaa, 0xff, 0xee, 0x00 + }; + + hw_addr = (const uint8_t *)(mac_override + + IWM_MAC_ADDRESS_OVERRIDE_8000); + + /* + * Store the MAC address from MAO section. + * No byte swapping is required in MAO section + */ + IEEE80211_ADDR_COPY(data->hw_addr, hw_addr); + + /* + * Force the use of the OTP MAC address in case of reserved MAC + * address in the NVM, or if address is given but invalid. + */ + if (!IEEE80211_ADDR_EQ(reserved_mac, hw_addr) && + !IEEE80211_ADDR_EQ(ieee80211broadcastaddr, data->hw_addr) && + iwm_is_valid_ether_addr(data->hw_addr) && + !IEEE80211_IS_MULTICAST(data->hw_addr)) + return; + + IWM_DPRINTF(sc, IWM_DEBUG_RESET, + "%s: mac address from nvm override section invalid\n", + __func__); + } + + if (nvm_hw) { + /* read the mac address from WFMP registers */ + uint32_t mac_addr0 = + htole32(iwm_read_prph(sc, IWM_WFMP_MAC_ADDR_0)); + uint32_t mac_addr1 = + htole32(iwm_read_prph(sc, IWM_WFMP_MAC_ADDR_1)); + + hw_addr = (const uint8_t *)&mac_addr0; + data->hw_addr[0] = hw_addr[3]; + data->hw_addr[1] = hw_addr[2]; + data->hw_addr[2] = hw_addr[1]; + data->hw_addr[3] = hw_addr[0]; + + hw_addr = (const uint8_t *)&mac_addr1; + data->hw_addr[4] = hw_addr[1]; + data->hw_addr[5] = hw_addr[0]; + + return; + } + + device_printf(sc->sc_dev, "%s: mac address not found\n", __func__); + memset(data->hw_addr, 0, sizeof(data->hw_addr)); +} + +static int +iwm_get_sku(const struct iwm_softc *sc, const uint16_t *nvm_sw, + const uint16_t *phy_sku) +{ + if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) + return le16_to_cpup(nvm_sw + IWM_SKU); + + return le32_to_cpup((const uint32_t *)(phy_sku + IWM_SKU_8000)); +} + +static int +iwm_get_nvm_version(const struct iwm_softc *sc, const uint16_t *nvm_sw) +{ + if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) + return le16_to_cpup(nvm_sw + IWM_NVM_VERSION); + else + return le32_to_cpup((const uint32_t *)(nvm_sw + + IWM_NVM_VERSION_8000)); +} + +static int +iwm_get_radio_cfg(const struct iwm_softc *sc, const uint16_t *nvm_sw, + const uint16_t *phy_sku) +{ + if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) + return le16_to_cpup(nvm_sw + IWM_RADIO_CFG); + + return le32_to_cpup((const uint32_t *)(phy_sku + IWM_RADIO_CFG_8000)); +} + +static int +iwm_get_n_hw_addrs(const struct iwm_softc *sc, const uint16_t *nvm_sw) +{ + int n_hw_addr; + + if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) + return le16_to_cpup(nvm_sw + IWM_N_HW_ADDRS); + + n_hw_addr = le32_to_cpup((const uint32_t *)(nvm_sw + IWM_N_HW_ADDRS_8000)); + + return n_hw_addr & IWM_N_HW_ADDR_MASK; +} + +static void +iwm_set_radio_cfg(const struct iwm_softc *sc, struct iwm_nvm_data *data, + uint32_t radio_cfg) +{ + if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + data->radio_cfg_type = IWM_NVM_RF_CFG_TYPE_MSK(radio_cfg); + data->radio_cfg_step = IWM_NVM_RF_CFG_STEP_MSK(radio_cfg); + data->radio_cfg_dash = IWM_NVM_RF_CFG_DASH_MSK(radio_cfg); + data->radio_cfg_pnum = IWM_NVM_RF_CFG_PNUM_MSK(radio_cfg); + return; + } + + /* set the radio configuration for family 8000 */ + data->radio_cfg_type = IWM_NVM_RF_CFG_TYPE_MSK_8000(radio_cfg); + data->radio_cfg_step = IWM_NVM_RF_CFG_STEP_MSK_8000(radio_cfg); + data->radio_cfg_dash = IWM_NVM_RF_CFG_DASH_MSK_8000(radio_cfg); + data->radio_cfg_pnum = IWM_NVM_RF_CFG_FLAVOR_MSK_8000(radio_cfg); + data->valid_tx_ant = IWM_NVM_RF_CFG_TX_ANT_MSK_8000(radio_cfg); + data->valid_rx_ant = IWM_NVM_RF_CFG_RX_ANT_MSK_8000(radio_cfg); +} + static int iwm_parse_nvm_data(struct iwm_softc *sc, - const uint16_t *nvm_hw, const uint16_t *nvm_sw, - const uint16_t *nvm_calib, uint8_t tx_chains, uint8_t rx_chains) + const uint16_t *nvm_hw, const uint16_t *nvm_sw, + const uint16_t *nvm_calib, const uint16_t *mac_override, + const uint16_t *phy_sku, const uint16_t *regulatory) { struct iwm_nvm_data *data = &sc->sc_nvm; uint8_t hw_addr[IEEE80211_ADDR_LEN]; - uint16_t radio_cfg, sku; + uint32_t sku, radio_cfg; - data->nvm_version = le16_to_cpup(nvm_sw + IWM_NVM_VERSION); + data->nvm_version = iwm_get_nvm_version(sc, nvm_sw); - radio_cfg = le16_to_cpup(nvm_sw + IWM_RADIO_CFG); - data->radio_cfg_type = IWM_NVM_RF_CFG_TYPE_MSK(radio_cfg); - data->radio_cfg_step = IWM_NVM_RF_CFG_STEP_MSK(radio_cfg); - data->radio_cfg_dash = IWM_NVM_RF_CFG_DASH_MSK(radio_cfg); - data->radio_cfg_pnum = IWM_NVM_RF_CFG_PNUM_MSK(radio_cfg); + radio_cfg = iwm_get_radio_cfg(sc, nvm_sw, phy_sku); + iwm_set_radio_cfg(sc, data, radio_cfg); - sku = le16_to_cpup(nvm_sw + IWM_SKU); + sku = iwm_get_sku(sc, nvm_sw, phy_sku); data->sku_cap_band_24GHz_enable = sku & IWM_NVM_SKU_CAP_BAND_24GHZ; data->sku_cap_band_52GHz_enable = sku & IWM_NVM_SKU_CAP_BAND_52GHZ; data->sku_cap_11n_enable = 0; - data->n_hw_addrs = le16_to_cpup(nvm_sw + IWM_N_HW_ADDRS); - - data->xtal_calib[0] = *(nvm_calib + IWM_XTAL_CALIB); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jul 26 03:47:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45310BA5185; Tue, 26 Jul 2016 03:47:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17DFC183A; Tue, 26 Jul 2016 03:47:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6Q3lG3p049506; Tue, 26 Jul 2016 03:47:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6Q3lGI8049505; Tue, 26 Jul 2016 03:47:16 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607260347.u6Q3lGI8049505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 26 Jul 2016 03:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303328 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 03:47:17 -0000 Author: bdrewery Date: Tue Jul 26 03:47:16 2016 New Revision: 303328 URL: https://svnweb.freebsd.org/changeset/base/303328 Log: Add links for bit_ffc_at(3) and bit_ffs_at(3). MFC after: 3 days Modified: head/share/man/man3/Makefile Modified: head/share/man/man3/Makefile ============================================================================== --- head/share/man/man3/Makefile Tue Jul 26 00:02:17 2016 (r303327) +++ head/share/man/man3/Makefile Tue Jul 26 03:47:16 2016 (r303328) @@ -49,7 +49,9 @@ MLINKS+= bitstring.3 bit_alloc.3 \ bitstring.3 bit_clear.3 \ bitstring.3 bit_decl.3 \ bitstring.3 bit_ffc.3 \ + bitstring.3 bit_ffc_at.3 \ bitstring.3 bit_ffs.3 \ + bitstring.3 bit_ffs_at.3 \ bitstring.3 bit_nclear.3 \ bitstring.3 bit_nset.3 \ bitstring.3 bit_set.3 \ From owner-svn-src-all@freebsd.org Tue Jul 26 05:06:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 539D9BA5DD1; Tue, 26 Jul 2016 05:06:01 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07971172F; Tue, 26 Jul 2016 05:06:00 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6Q560wB079239; Tue, 26 Jul 2016 05:06:00 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6Q5601h079238; Tue, 26 Jul 2016 05:06:00 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607260506.u6Q5601h079238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 26 Jul 2016 05:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303329 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 05:06:01 -0000 Author: sephe Date: Tue Jul 26 05:06:00 2016 New Revision: 303329 URL: https://svnweb.freebsd.org/changeset/base/303329 Log: hyperv/vmbus: Nuke unnecessary accessor functions. MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7303 Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Tue Jul 26 03:47:16 2016 (r303328) +++ head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Tue Jul 26 05:06:00 2016 (r303329) @@ -136,86 +136,6 @@ get_ring_buffer_avail_bytes(hv_vmbus_rin *read = rbi->ring_data_size - *write; } -/** - * @brief Get the next write location for the specified ring buffer - */ -static __inline uint32_t -get_next_write_location(hv_vmbus_ring_buffer_info *ring_info) -{ - return ring_info->ring_buffer->br_windex; -} - -/** - * @brief Set the next write location for the specified ring buffer - */ -static __inline void -set_next_write_location(hv_vmbus_ring_buffer_info *ring_info, - uint32_t next_write_location) -{ - ring_info->ring_buffer->br_windex = next_write_location; -} - -/** - * @brief Get the next read location for the specified ring buffer - */ -static __inline uint32_t -get_next_read_location(hv_vmbus_ring_buffer_info *ring_info) -{ - return ring_info->ring_buffer->br_rindex; -} - -/** - * @brief Get the next read location + offset for the specified ring buffer. - * This allows the caller to skip. - */ -static __inline uint32_t -get_next_read_location_with_offset(hv_vmbus_ring_buffer_info *ring_info, - uint32_t offset) -{ - uint32_t next = ring_info->ring_buffer->br_rindex; - - next += offset; - next %= ring_info->ring_data_size; - return (next); -} - -/** - * @brief Set the next read location for the specified ring buffer - */ -static __inline void -set_next_read_location(hv_vmbus_ring_buffer_info *ring_info, - uint32_t next_read_location) -{ - ring_info->ring_buffer->br_rindex = next_read_location; -} - -/** - * @brief Get the start of the ring buffer - */ -static __inline void * -get_ring_buffer(hv_vmbus_ring_buffer_info *ring_info) -{ - return ring_info->ring_buffer->br_data; -} - -/** - * @brief Get the size of the ring buffer. - */ -static __inline uint32_t -get_ring_buffer_size(hv_vmbus_ring_buffer_info *ring_info) -{ - return ring_info->ring_data_size; -} - -/** - * Get the read and write indices as uint64_t of the specified ring buffer. - */ -static __inline uint64_t -get_ring_buffer_indices(hv_vmbus_ring_buffer_info *ring_info) -{ - return ((uint64_t)ring_info->ring_buffer->br_windex) << 32; -} - void hv_ring_buffer_read_begin(hv_vmbus_ring_buffer_info *ring_info) { @@ -341,7 +261,7 @@ hv_ring_buffer_write(hv_vmbus_ring_buffe /* * Write to the ring buffer */ - next_write_location = get_next_write_location(out_ring_info); + next_write_location = out_ring_info->ring_buffer->br_windex; old_write_location = next_write_location; @@ -353,7 +273,7 @@ hv_ring_buffer_write(hv_vmbus_ring_buffe /* * Set previous packet start */ - prev_indices = get_ring_buffer_indices(out_ring_info); + prev_indices = ((uint64_t)out_ring_info->ring_buffer->br_windex) << 32; next_write_location = copy_to_ring_buffer(out_ring_info, next_write_location, (char *)&prev_indices, sizeof(uint64_t)); @@ -366,7 +286,7 @@ hv_ring_buffer_write(hv_vmbus_ring_buffe /* * Now, update the write location */ - set_next_write_location(out_ring_info, next_write_location); + out_ring_info->ring_buffer->br_windex = next_write_location; mtx_unlock_spin(&out_ring_info->ring_lock); @@ -403,7 +323,7 @@ hv_ring_buffer_peek(hv_vmbus_ring_buffer /* * Convert to byte offset */ - nextReadLocation = get_next_read_location(in_ring_info); + nextReadLocation = in_ring_info->ring_buffer->br_rindex; nextReadLocation = copy_from_ring_buffer(in_ring_info, (char *)buffer, buffer_len, nextReadLocation); @@ -441,8 +361,8 @@ hv_ring_buffer_read(hv_vmbus_ring_buffer return (EAGAIN); } - next_read_location = get_next_read_location_with_offset(in_ring_info, - offset); + next_read_location = (in_ring_info->ring_buffer->br_rindex + offset) % + in_ring_info->ring_data_size; next_read_location = copy_from_ring_buffer(in_ring_info, (char *)buffer, buffer_len, next_read_location); @@ -460,7 +380,7 @@ hv_ring_buffer_read(hv_vmbus_ring_buffer /* * Update the read index */ - set_next_read_location(in_ring_info, next_read_location); + in_ring_info->ring_buffer->br_rindex = next_read_location; mtx_unlock_spin(&in_ring_info->ring_lock); @@ -476,8 +396,8 @@ static uint32_t copy_to_ring_buffer(hv_vmbus_ring_buffer_info *ring_info, uint32_t start_write_offset, const uint8_t *src, uint32_t src_len) { - char *ring_buffer = get_ring_buffer(ring_info); - uint32_t ring_buffer_size = get_ring_buffer_size(ring_info); + char *ring_buffer = ring_info->ring_buffer->br_data; + uint32_t ring_buffer_size = ring_info->ring_data_size; uint32_t fragLen; if (src_len > ring_buffer_size - start_write_offset) { @@ -505,8 +425,8 @@ copy_from_ring_buffer(hv_vmbus_ring_buff uint32_t dest_len, uint32_t start_read_offset) { uint32_t fragLen; - char *ring_buffer = get_ring_buffer(ring_info); - uint32_t ring_buffer_size = get_ring_buffer_size(ring_info); + char *ring_buffer = ring_info->ring_buffer->br_data; + uint32_t ring_buffer_size = ring_info->ring_data_size; if (dest_len > ring_buffer_size - start_read_offset) { /* wrap-around detected at the src */ From owner-svn-src-all@freebsd.org Tue Jul 26 05:26:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8D69BA515F; Tue, 26 Jul 2016 05:26:08 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8488E1F4E; Tue, 26 Jul 2016 05:26:08 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6Q5Q7ZQ086700; Tue, 26 Jul 2016 05:26:07 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6Q5Q7qK086699; Tue, 26 Jul 2016 05:26:07 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201607260526.u6Q5Q7qK086699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 26 Jul 2016 05:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303330 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 05:26:08 -0000 Author: allanjude Date: Tue Jul 26 05:26:07 2016 New Revision: 303330 URL: https://svnweb.freebsd.org/changeset/base/303330 Log: MFC: r302941 At the start of the installation process, all ZFS pools are exported and all GELI instances are detached, to allow a restarted install to proceed. PR: 210814 Approved by: re (gjb) Modified: stable/11/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/zfsboot Tue Jul 26 05:06:00 2016 (r303329) +++ stable/11/usr.sbin/bsdinstall/scripts/zfsboot Tue Jul 26 05:26:07 2016 (r303330) @@ -224,6 +224,7 @@ ZFS_UNMOUNT='zfs unmount "%s"' ZPOOL_CREATE_WITH_OPTIONS='zpool create %s "%s" %s %s' ZPOOL_DESTROY='zpool destroy "%s"' ZPOOL_EXPORT='zpool export "%s"' +ZPOOL_EXPORT_F='zpool export -f "%s"' ZPOOL_IMPORT_WITH_OPTIONS='zpool import %s "%s"' ZPOOL_LABELCLEAR_F='zpool labelclear -f "%s"' ZPOOL_SET='zpool set %s "%s"' @@ -783,6 +784,14 @@ zfs_create_diskpart() # NOTE: `-F' required to destroy if partitions still exist. # NOTE: Failure is ok here, blank disk will have nothing to destroy. # + f_dprintf "$funcname: Exporting ZFS pools..." + zpool list -Ho name | while read z_name; do + f_eval_catch -d $funcname zpool "$ZPOOL_EXPORT_F" $z_name + done + f_dprintf "$funcname: Detaching all GELI providers..." + geli status | tail -n +2 | while read g_name g_status g_component; do + f_eval_catch -d $funcname geli "$GELI_DETACH_F" $g_name + done f_dprintf "$funcname: Destroying all data/layouts on \`%s'..." "$disk" f_eval_catch -d $funcname gpart "$GPART_DESTROY_F" $disk f_eval_catch -d $funcname graid "$GRAID_DELETE" $disk From owner-svn-src-all@freebsd.org Tue Jul 26 05:26:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B15ACBA51C7; Tue, 26 Jul 2016 05:26:54 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80CA2120E; Tue, 26 Jul 2016 05:26:54 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6Q5Qrtg086784; Tue, 26 Jul 2016 05:26:53 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6Q5QrWO086783; Tue, 26 Jul 2016 05:26:53 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201607260526.u6Q5QrWO086783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 26 Jul 2016 05:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303331 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 05:26:54 -0000 Author: allanjude Date: Tue Jul 26 05:26:53 2016 New Revision: 303331 URL: https://svnweb.freebsd.org/changeset/base/303331 Log: MFC: r302940 Fix error in bsdinstall triggered when doing a GELI encrypted install to an MBR formatted disk Approved by: re (gjb) Sponsored by: ScaleEngine Inc. Modified: stable/11/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/zfsboot Tue Jul 26 05:26:07 2016 (r303330) +++ stable/11/usr.sbin/bsdinstall/scripts/zfsboot Tue Jul 26 05:26:53 2016 (r303331) @@ -1393,8 +1393,9 @@ zfs_create_boot() "-o altroot=\"$BSDINSTALL_CHROOT\"" "$zroot_name" || return $FAILURE if [ "$ZFSBOOT_BOOT_POOL" ]; then + # Import the bootpool, but do not mount it yet f_eval_catch $funcname zpool "$ZPOOL_IMPORT_WITH_OPTIONS" \ - "-o altroot=\"$BSDINSTALL_CHROOT\"" \ + "-o altroot=\"$BSDINSTALL_CHROOT\" -N" \ "$bootpool_name" || return $FAILURE fi fi From owner-svn-src-all@freebsd.org Tue Jul 26 05:27:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BDC3BA5221; Tue, 26 Jul 2016 05:27:28 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0537136A; Tue, 26 Jul 2016 05:27:27 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6Q5RRBk086853; Tue, 26 Jul 2016 05:27:27 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6Q5RR1M086852; Tue, 26 Jul 2016 05:27:27 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201607260527.u6Q5RR1M086852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 26 Jul 2016 05:27:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303332 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 05:27:28 -0000 Author: allanjude Date: Tue Jul 26 05:27:26 2016 New Revision: 303332 URL: https://svnweb.freebsd.org/changeset/base/303332 Log: MFC: r302790, r302795 Add new menu to bsdinstall to allow user to set date and time after selecting timezone. The 'skip' button is the default selection. Submitted by: des Approved by: re (gjb) Modified: stable/11/usr.sbin/bsdinstall/scripts/time Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/time ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/time Tue Jul 26 05:26:53 2016 (r303331) +++ stable/11/usr.sbin/bsdinstall/scripts/time Tue Jul 26 05:27:26 2016 (r303332) @@ -26,4 +26,42 @@ # # $FreeBSD$ +# Select timezone chroot $BSDINSTALL_CHROOT tzsetup + +# Switch to target timezone +saved_TZ="$TZ" +TZ="${BSDINSTALL_CHROOT}/etc/localtime" +export TZ + +# Set date +exec 3>&1 +DATE=$(dialog --backtitle 'FreeBSD Installer' \ + --title 'Time & Date' \ + --ok-label 'Set Date' \ + --cancel-label 'Skip' \ + --defaultno \ + --date-format '%Y%m%d%H%M.%S' \ + --calendar '' 2 40 \ +2>&1 1>&3) && date $DATE +exec 3>&- + +# Set time +exec 3>&1 +TIME=$(dialog --backtitle 'FreeBSD Installer' \ + --title 'Time & Date' \ + --ok-label 'Set Time' \ + --cancel-label 'Skip' \ + --defaultno \ + --time-format '%H%M.%S' \ + --timebox '' 2 40 \ +2>&1 1>&3) && date $TIME +exec 3>&- + +# Switch back +if [ -n "$saved_TZ" ]; then + TZ="$saved_TZ" +else + unset TZ +fi +unset saved_TZ From owner-svn-src-all@freebsd.org Tue Jul 26 05:52:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EF05BA5765; Tue, 26 Jul 2016 05:52:55 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D39DD119B; Tue, 26 Jul 2016 05:52:54 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6Q5qsJt097525; Tue, 26 Jul 2016 05:52:54 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6Q5qs1e097524; Tue, 26 Jul 2016 05:52:54 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201607260552.u6Q5qs1e097524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 26 Jul 2016 05:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303333 - stable/11/sys/boot/efi/libefi X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 05:52:55 -0000 Author: manu Date: Tue Jul 26 05:52:53 2016 New Revision: 303333 URL: https://svnweb.freebsd.org/changeset/base/303333 Log: MFC: r303039 Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console. Approved by: re (gjb) Modified: stable/11/sys/boot/efi/libefi/Makefile Modified: stable/11/sys/boot/efi/libefi/Makefile ============================================================================== --- stable/11/sys/boot/efi/libefi/Makefile Tue Jul 26 05:27:26 2016 (r303332) +++ stable/11/sys/boot/efi/libefi/Makefile Tue Jul 26 05:52:53 2016 (r303333) @@ -35,6 +35,10 @@ CFLAGS+= -I${.CURDIR}/../../common # Handle FreeBSD specific %b and %D printf format specifiers CFLAGS+= ${FORMAT_EXTENSIONS} + +# Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console +.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64" CFLAGS+= -DTERM_EMU +.endif .include From owner-svn-src-all@freebsd.org Tue Jul 26 13:36:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6211DBA5878; Tue, 26 Jul 2016 13:36:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EDC617D1; Tue, 26 Jul 2016 13:36:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QDaSbI070810; Tue, 26 Jul 2016 13:36:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QDaS5d070809; Tue, 26 Jul 2016 13:36:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607261336.u6QDaS5d070809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 26 Jul 2016 13:36:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303335 - head/sys/dev/kbd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 13:36:29 -0000 Author: emaste Date: Tue Jul 26 13:36:28 2016 New Revision: 303335 URL: https://svnweb.freebsd.org/changeset/base/303335 Log: apply some style(9) to kbd: make function name start in column 1 Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/kbd/kbd.c Modified: head/sys/dev/kbd/kbd.c ============================================================================== --- head/sys/dev/kbd/kbd.c Tue Jul 26 08:58:44 2016 (r303334) +++ head/sys/dev/kbd/kbd.c Tue Jul 26 13:36:28 2016 (r303335) @@ -284,8 +284,8 @@ kbd_unregister(keyboard_t *kbd) } /* find a function table by the driver name */ -keyboard_switch_t -*kbd_get_switch(char *driver) +keyboard_switch_t * +kbd_get_switch(char *driver) { const keyboard_driver_t **list; const keyboard_driver_t *p; @@ -419,8 +419,8 @@ kbd_change_callback(keyboard_t *kbd, voi } /* get a keyboard structure */ -keyboard_t -*kbd_get_keyboard(int index) +keyboard_t * +kbd_get_keyboard(int index) { if ((index < 0) || (index >= keyboards)) return (NULL); @@ -1118,8 +1118,8 @@ fkey_change_ok(fkeytab_t *oldkey, fkeyar #endif /* get a pointer to the string associated with the given function key */ -u_char -*genkbd_get_fkeystr(keyboard_t *kbd, int fkey, size_t *len) +u_char * +genkbd_get_fkeystr(keyboard_t *kbd, int fkey, size_t *len) { if (kbd == NULL) return (NULL); @@ -1131,8 +1131,8 @@ u_char } /* diagnostic dump */ -static char -*get_kbd_type_name(int type) +static char * +get_kbd_type_name(int type) { static struct { int type; From owner-svn-src-all@freebsd.org Tue Jul 26 14:12:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBDABBA429D; Tue, 26 Jul 2016 14:12:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85AF51F51; Tue, 26 Jul 2016 14:12:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QECBSC085541; Tue, 26 Jul 2016 14:12:11 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QECBYI085540; Tue, 26 Jul 2016 14:12:11 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607261412.u6QECBYI085540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 26 Jul 2016 14:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303336 - stable/11/lib/libc/locale X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 14:12:12 -0000 Author: pfg Date: Tue Jul 26 14:12:11 2016 New Revision: 303336 URL: https://svnweb.freebsd.org/changeset/base/303336 Log: MFC r303046: libc: tag the rune initialization function prototypes visibility as hidden. It is good practice to export as few symbols as possible from your shared libraries, so use the GCC visibility attribute in this case, matching what Apple's libc does. Reference: https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html Hinted by: Apple's libc 1082.20.4 Approved by: re (gjb) Modified: stable/11/lib/libc/locale/mblocal.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/locale/mblocal.h ============================================================================== --- stable/11/lib/libc/locale/mblocal.h Tue Jul 26 13:36:28 2016 (r303335) +++ stable/11/lib/libc/locale/mblocal.h Tue Jul 26 14:12:11 2016 (r303336) @@ -65,18 +65,18 @@ extern struct xlocale_ctype __xlocale_gl /* * Rune initialization function prototypes. */ -int _none_init(struct xlocale_ctype *, _RuneLocale *); -int _UTF8_init(struct xlocale_ctype *, _RuneLocale *); -int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *); -int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *); -int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *); -int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *); -int _GB18030_init(struct xlocale_ctype *, _RuneLocale *); -int _GB2312_init(struct xlocale_ctype *, _RuneLocale *); -int _GBK_init(struct xlocale_ctype *, _RuneLocale *); -int _BIG5_init(struct xlocale_ctype *, _RuneLocale *); -int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *); -int _ascii_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _none_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _ascii_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _UTF8_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _GB18030_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _GB2312_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _GBK_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _BIG5_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *); typedef size_t (*mbrtowc_pfn_t)(wchar_t * __restrict, const char * __restrict, size_t, mbstate_t * __restrict); From owner-svn-src-all@freebsd.org Tue Jul 26 15:22:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E9CABA57EE; Tue, 26 Jul 2016 15:22:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E9E6171B; Tue, 26 Jul 2016 15:22:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QFMLkB011476; Tue, 26 Jul 2016 15:22:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QFMLlr011475; Tue, 26 Jul 2016 15:22:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607261522.u6QFMLlr011475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 26 Jul 2016 15:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303337 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 15:22:22 -0000 Author: emaste Date: Tue Jul 26 15:22:21 2016 New Revision: 303337 URL: https://svnweb.freebsd.org/changeset/base/303337 Log: MFC r303034: Include makewhatis in ITOOLS when MK_MAN_UTILS is true Previously it was conditional on MK_MAN. It's possible to build FreeBSD with man pages but without man page tools. MK_MAN_UTILS is the conditional used in share/man/Makefile for determining whether makewhatis is executed at install time, so it is the proper one for ITOOLS as well. PR: 210142 Approved by: re (gjb) Modified: stable/11/Makefile.inc1 Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Tue Jul 26 14:12:11 2016 (r303336) +++ stable/11/Makefile.inc1 Tue Jul 26 15:22:21 2016 (r303337) @@ -884,7 +884,7 @@ ITOOLS= [ awk cap_mkdb cat chflags chmod ${LOCAL_ITOOLS} # Needed for share/man -.if ${MK_MAN} != "no" +.if ${MK_MAN_UTILS} != "no" ITOOLS+=makewhatis .endif From owner-svn-src-all@freebsd.org Tue Jul 26 15:34:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E825ABA5AF2; Tue, 26 Jul 2016 15:34:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B79C51192; Tue, 26 Jul 2016 15:34:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QFYQ5K017046; Tue, 26 Jul 2016 15:34:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QFYQ9L017045; Tue, 26 Jul 2016 15:34:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607261534.u6QFYQ9L017045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 26 Jul 2016 15:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303338 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 15:34:28 -0000 Author: emaste Date: Tue Jul 26 15:34:26 2016 New Revision: 303338 URL: https://svnweb.freebsd.org/changeset/base/303338 Log: vt: lock Giant around kbd calls in CONS_GETINFO Note that keyboards are stored in an array and are not freed (just "unregistered" by clearing some fields) so a race would be limited to obtaining stale information about an unregistered keyboard. Reported by: CTurt MFC after: 3 days Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Tue Jul 26 15:22:21 2016 (r303337) +++ head/sys/dev/vt/vt_core.c Tue Jul 26 15:34:26 2016 (r303338) @@ -2228,9 +2228,11 @@ skip_thunk: return (EINVAL); if (vw == vd->vd_curwindow) { + mtx_lock(&Giant); kbd = kbd_get_keyboard(vd->vd_keyboard); if (kbd != NULL) vt_save_kbd_state(vw, kbd); + mtx_unlock(&Giant); } vi->m_num = vd->vd_curwindow->vw_number + 1; From owner-svn-src-all@freebsd.org Tue Jul 26 16:27:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5198BA49C2 for ; Tue, 26 Jul 2016 16:27:08 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002: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 8DD2E1358 for ; Tue, 26 Jul 2016 16:27:08 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x22c.google.com with SMTP id r9so20620735ywg.0 for ; Tue, 26 Jul 2016 09:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=b9mGP9yGdTjyyI2p6Ra7fz6LSu6YuLmZFDQsOyNG1PI=; b=jGO5IUlSpsVX2o2qFz2oWb+Ynsq4jTnyVREKrfBM1W44Kg2LVNm8TyuA9Yw/cY9Da8 IiGnMwQAkwl5EE0nYkbIJL6OnnWzzSfnOEvLvtecpW+PUQrJnXrQKLm/G+ErxA8+AsRe zDbln9kuNIOr3/7w1pFDLkxKJWw5nG103R7Cgd0xCJGtBa3CxwUO08f1x3ypCDm8kffm 2YFhUHctul6eUxTPOTHUxo8jD9p2uyL8VTmCJiRuT8rfmFNpV2Zbb+T/As68DwhrheC2 +EwxmFKRLPSZRVuhGHJfmFm9NlA9QJ0TxK+UprYPAEhp4xtdh/WKNcygaUffk3YWdhQC hPlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=b9mGP9yGdTjyyI2p6Ra7fz6LSu6YuLmZFDQsOyNG1PI=; b=Yijvp+8jotuBmoltqve0IqL+TGKB2JcRZw6EkwMIzrl9SjjyBEjdaXlmCfGc3napOV EYBwuHW+zJnuf9Ir/yPmw90Nn/Et5/Fn+fCyiilWqR8B1TSPifWoAIKsqrpyzpfVO0Be /EcaauBnB4D/U9iJoiJRj8mAH7OLUweEk7X9TAzzGbsnCvjKGAXbIQd0X5nIPzFfL3Kk 3yh+07cClT8+xfzCCNPntQLAff8WZNLDduzfBqo1X0cmJILO298Fv0FT360wUKdpfyP6 ShI7HcsdNmxsHLT+bKzKE0p7aA1ccd37o6pECZHMQ70tjxHV/Dc96RKR2RT7gGFbApIT w+1g== X-Gm-Message-State: AEkoousQbEJL7Cz3zR1dSM5NoZEzuhYhx68c5xu4h1uIl39Ms5gJT9E/UizKBPH9ZbqU/1n7XAMykJsfFbyCKw== X-Received: by 10.129.90.7 with SMTP id o7mr20971687ywb.313.1469550427634; Tue, 26 Jul 2016 09:27:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Tue, 26 Jul 2016 09:27:07 -0700 (PDT) In-Reply-To: <201607261534.u6QFYQ9L017045@repo.freebsd.org> References: <201607261534.u6QFYQ9L017045@repo.freebsd.org> From: Ed Schouten Date: Tue, 26 Jul 2016 18:27:07 +0200 Message-ID: Subject: Re: svn commit: r303338 - head/sys/dev/vt To: Ed Maste Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 16:27:08 -0000 Hi Ed, 2016-07-26 17:34 GMT+02:00 Ed Maste : > if (vw == vd->vd_curwindow) { > + mtx_lock(&Giant); > kbd = kbd_get_keyboard(vd->vd_keyboard); > if (kbd != NULL) > vt_save_kbd_state(vw, kbd); > + mtx_unlock(&Giant); > } Would it make sense to put an mtx_assert(&Giant, MA_OWNED) in kbd_get_keyboard()? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Tue Jul 26 16:40:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B6DDBA4E59; Tue, 26 Jul 2016 16:40:04 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AAF81BDC; Tue, 26 Jul 2016 16:40:04 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QGe38l040696; Tue, 26 Jul 2016 16:40:03 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QGe3Hq040694; Tue, 26 Jul 2016 16:40:03 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201607261640.u6QGe3Hq040694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 26 Jul 2016 16:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303339 - head/sys/dev/etherswitch/arswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 16:40:04 -0000 Author: adrian Date: Tue Jul 26 16:40:03 2016 New Revision: 303339 URL: https://svnweb.freebsd.org/changeset/base/303339 Log: Update my TODO items. Modified: head/sys/dev/etherswitch/arswitch/arswitch_7240.c head/sys/dev/etherswitch/arswitch/arswitch_8316.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_7240.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_7240.c Tue Jul 26 15:34:26 2016 (r303338) +++ head/sys/dev/etherswitch/arswitch/arswitch_7240.c Tue Jul 26 16:40:03 2016 (r303339) @@ -97,6 +97,8 @@ ar7240_hw_global_setup(struct arswitch_s AR7240_GLOBAL_CTRL_MTU_MASK, SM(1536, AR7240_GLOBAL_CTRL_MTU_MASK)); + /* XXX ARP? Frame Age enable? */ + /* Service Tag */ arswitch_modifyreg(sc->sc_dev, AR8X16_REG_SERVICE_TAG, AR8X16_SERVICE_TAG_MASK, 0); Modified: head/sys/dev/etherswitch/arswitch/arswitch_8316.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_8316.c Tue Jul 26 15:34:26 2016 (r303338) +++ head/sys/dev/etherswitch/arswitch/arswitch_8316.c Tue Jul 26 16:40:03 2016 (r303339) @@ -137,6 +137,7 @@ ar8316_hw_global_setup(struct arswitch_s arswitch_writereg(sc->sc_dev, AR8X16_REG_TAG_PRIO, 0xfa50); /* Enable ARP frame acknowledge. */ + /* XXX TODO: aging? */ arswitch_modifyreg(sc->sc_dev, AR8X16_REG_AT_CTRL, 0, AR8X16_AT_CTRL_ARP_EN); From owner-svn-src-all@freebsd.org Tue Jul 26 17:03:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 140E8BA58EA; Tue, 26 Jul 2016 17:03:22 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::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 D1B0A145B; Tue, 26 Jul 2016 17:03:21 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x230.google.com with SMTP id b62so30638118iod.3; Tue, 26 Jul 2016 10:03:21 -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; bh=QM4KblAYYqx1k+G3FW/oEc1yX44N71IvM7pbxnQFUaU=; b=n3ahKjl2fMpWGLp+i6g+ql+5caRHsDo7fH2J2I9xJMTGCqOA7pP/J/VUj2XIfJ2X7z o+oLfCgoL1AiBJ7WOovtanCDSxPiFNnLAJfPI1XoHeRqFJjjeFFsyxxfz0+9QVBnV5Yc wM/IdFw1CVi6qWrrOGKzG3Cli1xrxRXonnTnO+F9gAk8RAS7w5Ihc0VYV2gpNsGFnB9q p8ybg2WQh3Qt2oQ2wKhV9zzK8aYDUbJT1hYjn20gvoUGHkNgIUIoKIpTfdURr5TKsA8f drT+tAzHosgFxdycTEcZwXmLAYAWJGtv2oDZNXwn8sAcC8bpzBhMbf78HESOl6TMOtek tsfA== 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; bh=QM4KblAYYqx1k+G3FW/oEc1yX44N71IvM7pbxnQFUaU=; b=WQWuq7A/NA8pCk9NPvA/ym+cfklgIV2QqUMevnNoveZL/g5AfGDPUyW72rg1ee6Tt/ sTfsvXIZu3irWmTBiTkrJzvftbso/HDHGnoywE5tXKnSlRU+3RGNvNvUvUXz8Cz2TwzC K1mRb0WLImtXXJ7S0W6qHQrNOPHvo9rah6+qqhySjYQObJXUtJWHFSpnLV8VCNIkkxy3 lrfPf7UKtG+szPmS2GOS0X0DHj/8Rgjc4QQcot4zmQP9v1K4xyelCOFFhZX12T+QcPpn UQ2oMh2dExpldBkyIZxWqKEan6K5yJ+VV/AfMBQIAjjvD/p9Blt4UAZvgoGReoG5g7YB y1FQ== X-Gm-Message-State: AEkoouufwP4aapIoDoN4iNc3pHqGInc+AF+RAxnWUOK0/Vwit/jIFr3eCEvhBY//cY4QpxdKTIRfV4FCw9eKiw== X-Received: by 10.107.141.213 with SMTP id p204mr26248294iod.38.1469552601270; Tue, 26 Jul 2016 10:03:21 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.138.28 with HTTP; Tue, 26 Jul 2016 10:03:01 -0700 (PDT) In-Reply-To: References: <201607261534.u6QFYQ9L017045@repo.freebsd.org> From: Ed Maste Date: Tue, 26 Jul 2016 13:03:01 -0400 X-Google-Sender-Auth: RhxQS8URF5hFBuO8NxiF_1cZQMs Message-ID: Subject: Re: svn commit: r303338 - head/sys/dev/vt To: Ed Schouten Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 17:03:22 -0000 On 26 July 2016 at 12:27, Ed Schouten wrote: > Hi Ed, > > 2016-07-26 17:34 GMT+02:00 Ed Maste : >> if (vw == vd->vd_curwindow) { >> + mtx_lock(&Giant); >> kbd = kbd_get_keyboard(vd->vd_keyboard); >> if (kbd != NULL) >> vt_save_kbd_state(vw, kbd); >> + mtx_unlock(&Giant); >> } > > Would it make sense to put an mtx_assert(&Giant, MA_OWNED) in > kbd_get_keyboard()? Yes, I made that change locally and also intend to review kbd_get_keyboard's callers. I didn't commit it to HEAD right away to avoid mass breakage if there's missing locking. From owner-svn-src-all@freebsd.org Tue Jul 26 17:23:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 744E0BA52A9; Tue, 26 Jul 2016 17:23:50 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 395BF17B7; Tue, 26 Jul 2016 17:23:50 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QHNnxM080079; Tue, 26 Jul 2016 17:23:49 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QHNnhm080076; Tue, 26 Jul 2016 17:23:49 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607261723.u6QHNnhm080076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Tue, 26 Jul 2016 17:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303340 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 17:23:50 -0000 Author: ed Date: Tue Jul 26 17:23:49 2016 New Revision: 303340 URL: https://svnweb.freebsd.org/changeset/base/303340 Log: Add shmatt_t. It looks like our "struct shmid_ds::shm_nattch" deviates from the standard in the sense that it is a signed integer, whereas POSIX requires that it is unsigned, having a special type shmatt_t. Patch up our native and 32-bit copies to use a new shmatt_t that is an unsigned integer. As it's unsigned, we can relax the comparisons that are performed on it. Leave the Linux, iBCS2, etc. copies of the structure alone. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D6655 Modified: head/sys/compat/freebsd32/freebsd32_ipc.h head/sys/kern/sysv_shm.c head/sys/sys/shm.h Modified: head/sys/compat/freebsd32/freebsd32_ipc.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_ipc.h Tue Jul 26 16:40:03 2016 (r303339) +++ head/sys/compat/freebsd32/freebsd32_ipc.h Tue Jul 26 17:23:49 2016 (r303340) @@ -72,7 +72,7 @@ struct shmid_ds32 { int32_t shm_segsz; pid_t shm_lpid; pid_t shm_cpid; - int shm_nattch; + unsigned int shm_nattch; int32_t shm_atime; int32_t shm_dtime; int32_t shm_ctime; Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Tue Jul 26 16:40:03 2016 (r303339) +++ head/sys/kern/sysv_shm.c Tue Jul 26 17:23:49 2016 (r303340) @@ -275,7 +275,7 @@ shm_delete_mapping(struct vmspace *vm, s return (EINVAL); shmmap_s->shmid = -1; shmseg->u.shm_dtime = time_second; - if ((--shmseg->u.shm_nattch <= 0) && + if (--shmseg->u.shm_nattch == 0 && (shmseg->u.shm_perm.mode & SHMSEG_REMOVED)) { shm_deallocate_segment(shmseg); shm_last_free = segnum; @@ -289,7 +289,7 @@ shm_remove(struct shmid_kernel *shmseg, shmseg->u.shm_perm.key = IPC_PRIVATE; shmseg->u.shm_perm.mode |= SHMSEG_REMOVED; - if (shmseg->u.shm_nattch <= 0) { + if (shmseg->u.shm_nattch == 0) { shm_deallocate_segment(shmseg); shm_last_free = segnum; } Modified: head/sys/sys/shm.h ============================================================================== --- head/sys/sys/shm.h Tue Jul 26 16:40:03 2016 (r303339) +++ head/sys/sys/shm.h Tue Jul 26 17:23:49 2016 (r303340) @@ -92,12 +92,14 @@ struct shmid_ds_old { }; #endif +typedef unsigned int shmatt_t; + struct shmid_ds { struct ipc_perm shm_perm; /* operation permission structure */ size_t shm_segsz; /* size of segment in bytes */ pid_t shm_lpid; /* process ID of last shared memory op */ pid_t shm_cpid; /* process ID of creator */ - int shm_nattch; /* number of current attaches */ + shmatt_t shm_nattch; /* number of current attaches */ time_t shm_atime; /* time of last shmat() */ time_t shm_dtime; /* time of last shmdt() */ time_t shm_ctime; /* time of last change by shmctl() */ From owner-svn-src-all@freebsd.org Tue Jul 26 18:27:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3D80BA594E; Tue, 26 Jul 2016 18:27:49 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C42BE1293; Tue, 26 Jul 2016 18:27:49 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QIRmcr002914; Tue, 26 Jul 2016 18:27:48 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QIRmx7002913; Tue, 26 Jul 2016 18:27:48 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201607261827.u6QIRmx7002913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Tue, 26 Jul 2016 18:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303341 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 18:27:50 -0000 Author: phil Date: Tue Jul 26 18:27:48 2016 New Revision: 303341 URL: https://svnweb.freebsd.org/changeset/base/303341 Log: Fix start date to not be in the future. Submitted by: phil Reviewed by: sjg (mentor) Approved by: sjg Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Tue Jul 26 17:23:49 2016 (r303340) +++ head/share/misc/committers-src.dot Tue Jul 26 18:27:48 2016 (r303341) @@ -259,7 +259,7 @@ peadar [label="Peter Edwards\npeadar@Fre peter [label="Peter Wemm\npeter@FreeBSD.org\n1995/07/04"] peterj [label="Peter Jeremy\npeterj@FreeBSD.org\n2012/09/14"] pfg [label="Pedro Giffuni\npfg@FreeBSD.org\n2011/12/01"] -phil [label="Phil Shafer\nphil@FreeBSD.ogr\n2016/12/30"] +phil [label="Phil Shafer\nphil@FreeBSD.ogr\n2015/12/30"] philip [label="Philip Paeps\nphilip@FreeBSD.org\n2004/01/21"] phk [label="Poul-Henning Kamp\nphk@FreeBSD.org\n1994/02/21"] pho [label="Peter Holm\npho@FreeBSD.org\n2008/11/16"] From owner-svn-src-all@freebsd.org Tue Jul 26 20:11:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4726BA414D; Tue, 26 Jul 2016 20:11:30 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 987D218EA; Tue, 26 Jul 2016 20:11:30 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QKBTAi043259; Tue, 26 Jul 2016 20:11:29 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QKBTDp043256; Tue, 26 Jul 2016 20:11:29 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607262011.u6QKBTDp043256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Tue, 26 Jul 2016 20:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303342 - in head: include lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 20:11:30 -0000 Author: ed Date: Tue Jul 26 20:11:29 2016 New Revision: 303342 URL: https://svnweb.freebsd.org/changeset/base/303342 Log: Fix typing of srandom() and initstate(). POSIX requires that these functions have an unsigned int for their first argument; not an unsigned long. My reasoning is that we can safely change these functions without breaking the ABI. As far as I know, our supported architectures either use registers for passing function arguments that are at least as big as long (e.g., amd64), or int and long are of the same size (e.g., i386). Reviewed by: ache Differential Revision: https://reviews.freebsd.org/D6644 Modified: head/include/stdlib.h head/lib/libc/stdlib/random.3 head/lib/libc/stdlib/random.c Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Tue Jul 26 18:27:48 2016 (r303341) +++ head/include/stdlib.h Tue Jul 26 20:11:29 2016 (r303342) @@ -204,7 +204,7 @@ double erand48(unsigned short[3]); /* char *fcvt(double, int, int * __restrict, int * __restrict); */ /* char *gcvt(double, int, int * __restrict, int * __restrict); */ int grantpt(int); -char *initstate(unsigned long /* XSI requires u_int */, char *, long); +char *initstate(unsigned int, char *, size_t); long jrand48(unsigned short[3]); char *l64a(long); void lcong48(unsigned short[7]); @@ -227,7 +227,7 @@ int setkey(const char *); #endif char *setstate(/* const */ char *); void srand48(long); -void srandom(unsigned long); +void srandom(unsigned int); int unlockpt(int); #endif /* __XSI_VISIBLE */ Modified: head/lib/libc/stdlib/random.3 ============================================================================== --- head/lib/libc/stdlib/random.3 Tue Jul 26 18:27:48 2016 (r303341) +++ head/lib/libc/stdlib/random.3 Tue Jul 26 20:11:29 2016 (r303342) @@ -28,7 +28,7 @@ .\" @(#)random.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 2, 2013 +.Dd July 26, 2016 .Dt RANDOM 3 .Os .Sh NAME @@ -45,11 +45,11 @@ .Ft long .Fn random void .Ft void -.Fn srandom "unsigned long seed" +.Fn srandom "unsigned int seed" .Ft void .Fn srandomdev void .Ft char * -.Fn initstate "unsigned long seed" "char *state" "long n" +.Fn initstate "unsigned int seed" "char *state" "size_t n" .Ft char * .Fn setstate "char *state" .Sh DESCRIPTION Modified: head/lib/libc/stdlib/random.c ============================================================================== --- head/lib/libc/stdlib/random.c Tue Jul 26 18:27:48 2016 (r303341) +++ head/lib/libc/stdlib/random.c Tue Jul 26 20:11:29 2016 (r303342) @@ -236,7 +236,7 @@ good_rand(uint32_t ctx) * for default usage relies on values produced by this routine. */ void -srandom(unsigned long x) +srandom(unsigned int x) { int i, lim; @@ -311,7 +311,7 @@ srandomdev(void) * complain about mis-alignment, but you should disregard these messages. */ char * -initstate(unsigned long seed, char *arg_state, long n) +initstate(unsigned int seed, char *arg_state, size_t n) { char *ostate = (char *)(&state[-1]); uint32_t *int_arg_state = (uint32_t *)arg_state; From owner-svn-src-all@freebsd.org Tue Jul 26 20:15:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFFBEBA41F2; Tue, 26 Jul 2016 20:15:02 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 995E91BED; Tue, 26 Jul 2016 20:15:02 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-it0-x234.google.com with SMTP id u186so126219974ita.0; Tue, 26 Jul 2016 13:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=I9Bnk9TD3/DcKcpcCLXCB/Cbbs9Qh2sfDGER7cKvFFY=; b=o28zjNEhoNvfyH2BGHBGrk6ZAaURH+7u3J9946dJh6rJx05sQtdG2O/lwUck8MIXN6 05M3NKo5YXQ8LxAcbJUFuAFkLVj/p6FszsgpHMCx0AL+BKiuVcyvIx8T85NYB7d8PyQ1 1LWudDJZF/kPOKxJW0D2+Zo5xc5dG6HW7vjAXMdZpO35jMKkzhVQb+rWV549dBfuN1QI VLa00wUj32YXtJM9T2QYXDz3wnwCso2v+M2yWFt0pEnKGvG2+b3dUJtBXU2vmWmssl9C ImMn1cXDvw00W+LdruMCMn3W/65IQPPG7305gi9EuLHtCBT7zlRsAK3kopATs1LCxeL0 h0mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=I9Bnk9TD3/DcKcpcCLXCB/Cbbs9Qh2sfDGER7cKvFFY=; b=SwAT8VRRYICygod5LXD/HWL5tq3XgX241ZXW/PZz061Q66dFeqSVdqyNAzJ2RdI9HN I38vnh6NqtJietucqSp5aBcp7G/QB1eJoYlJA3quS5muaNVEbuhSY/SNghrQzL/TzKfE jQ/G/HtF8S/wNpF7sUtrsAV+BAcnOtSwV8/YbFisw8F6QA3b6EtxDwcGwY2ql+oopnoJ oj5fyPNEcA/UmB0imqoU838Jv+4LjhpCZjYaKayRlixqDh+A+6lTxG7j4lvmKACXytHg U2NvXdvuetMxqDQoUrva6xpwY+qaExx1sET2V2sRW38WEDLiKnjDd6knIbC6pw7OYmjS EhOQ== X-Gm-Message-State: AEkoouuwgGUGxCkbpIyeFE7rkyG5mSejDElUEb9dCvC7n+uuqLms4ttX0KgaOClZZfS4pHpPro0FWevtuLbSeQ== X-Received: by 10.202.193.195 with SMTP id r186mr12903284oif.109.1469564101436; Tue, 26 Jul 2016 13:15:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.44.176 with HTTP; Tue, 26 Jul 2016 13:14:59 -0700 (PDT) In-Reply-To: <201607262011.u6QKBTDp043256@repo.freebsd.org> References: <201607262011.u6QKBTDp043256@repo.freebsd.org> From: Benjamin Kaduk Date: Tue, 26 Jul 2016 15:14:59 -0500 Message-ID: Subject: Re: svn commit: r303342 - in head: include lib/libc/stdlib To: Ed Schouten Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 20:15:02 -0000 On Tue, Jul 26, 2016 at 3:11 PM, Ed Schouten wrote: > Author: ed > Date: Tue Jul 26 20:11:29 2016 > New Revision: 303342 > URL: https://svnweb.freebsd.org/changeset/base/303342 > > Log: > Fix typing of srandom() and initstate(). > > POSIX requires that these functions have an unsigned int for their first > argument; not an unsigned long. > > My reasoning is that we can safely change these functions without > breaking the ABI. As far as I know, our supported architectures either > use registers for passing function arguments that are at least as big as > long (e.g., amd64), or int and long are of the same size (e.g., i386). > Is a __FreeBSD_version bump planned? (Third-party software might want to be warning-clean.) -Ben From owner-svn-src-all@freebsd.org Tue Jul 26 20:20:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76DA9BA42AF; Tue, 26 Jul 2016 20:20:10 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 481901139; Tue, 26 Jul 2016 20:20:10 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QKK9V4044850; Tue, 26 Jul 2016 20:20:09 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QKK9Ab044849; Tue, 26 Jul 2016 20:20:09 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201607262020.u6QKK9Ab044849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 26 Jul 2016 20:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303343 - head/sys/netinet/cc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 20:20:10 -0000 Author: brd (doc,ports committer) Date: Tue Jul 26 20:20:09 2016 New Revision: 303343 URL: https://svnweb.freebsd.org/changeset/base/303343 Log: Fix the case for some sysctl descriptions. Reviewed by: gnn Modified: head/sys/netinet/cc/cc.c Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Tue Jul 26 20:11:29 2016 (r303342) +++ head/sys/netinet/cc/cc.c Tue Jul 26 20:20:09 2016 (r303343) @@ -316,12 +316,12 @@ SYSINIT(cc, SI_SUB_PROTO_IFATTACHDOMAIN, /* Declare sysctl tree and populate it. */ SYSCTL_NODE(_net_inet_tcp, OID_AUTO, cc, CTLFLAG_RW, NULL, - "congestion control related settings"); + "Congestion control related settings"); SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, algorithm, CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RW, - NULL, 0, cc_default_algo, "A", "default congestion control algorithm"); + NULL, 0, cc_default_algo, "A", "Default congestion control algorithm"); SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, available, CTLTYPE_STRING|CTLFLAG_RD, NULL, 0, cc_list_available, "A", - "list available congestion control algorithms"); + "List available congestion control algorithms"); From owner-svn-src-all@freebsd.org Tue Jul 26 20:26:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94D33BA4414; Tue, 26 Jul 2016 20:26:04 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AD5015CD; Tue, 26 Jul 2016 20:26:04 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QKQ3SM048651; Tue, 26 Jul 2016 20:26:03 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QKQ3FF048649; Tue, 26 Jul 2016 20:26:03 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201607262026.u6QKQ3FF048649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 26 Jul 2016 20:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303344 - stable/11/sys/dev/urtwn X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 20:26:04 -0000 Author: avos Date: Tue Jul 26 20:26:03 2016 New Revision: 303344 URL: https://svnweb.freebsd.org/changeset/base/303344 Log: MFC r303115: urtwn: fix A-MSDU tx aggregation when encryption is used. Clear unused (undocumented) CAM bytes while setting a key; without that, hardware does weird things when A-MSDU bit in QoS header is set. Tested with RTL8188CUS (AP) -> RTL8188EU (STA) (A-MSDU transmit). Reported by: many Approved by: re (gjb) Obtained from: https://github.com/s3erios/urtwm Modified: stable/11/sys/dev/urtwn/if_urtwn.c stable/11/sys/dev/urtwn/if_urtwnreg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/urtwn/if_urtwn.c ============================================================================== --- stable/11/sys/dev/urtwn/if_urtwn.c Tue Jul 26 20:20:09 2016 (r303343) +++ stable/11/sys/dev/urtwn/if_urtwn.c Tue Jul 26 20:26:03 2016 (r303344) @@ -2318,6 +2318,10 @@ urtwn_key_set_cb(struct urtwn_softc *sc, k->wk_cipher->ic_cipher, algo, k->wk_flags, k->wk_keylen, ether_sprintf(k->wk_macaddr)); + /* Clear high bits. */ + urtwn_cam_write(sc, R92C_CAM_CTL6(k->wk_keyix), 0); + urtwn_cam_write(sc, R92C_CAM_CTL7(k->wk_keyix), 0); + /* Write key. */ for (i = 0; i < 4; i++) { error = urtwn_cam_write(sc, R92C_CAM_KEY(k->wk_keyix, i), Modified: stable/11/sys/dev/urtwn/if_urtwnreg.h ============================================================================== --- stable/11/sys/dev/urtwn/if_urtwnreg.h Tue Jul 26 20:20:09 2016 (r303343) +++ stable/11/sys/dev/urtwn/if_urtwnreg.h Tue Jul 26 20:26:03 2016 (r303344) @@ -871,6 +871,8 @@ #define R92C_CAM_CTL0(entry) ((entry) * 8 + 0) #define R92C_CAM_CTL1(entry) ((entry) * 8 + 1) #define R92C_CAM_KEY(entry, i) ((entry) * 8 + 2 + (i)) +#define R92C_CAM_CTL6(entry) ((entry) * 8 + 6) +#define R92C_CAM_CTL7(entry) ((entry) * 8 + 7) /* Bits for R92C_CAM_CTL0(i). */ #define R92C_CAM_KEYID_M 0x00000003 From owner-svn-src-all@freebsd.org Tue Jul 26 20:35:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7859BA4869 for ; Tue, 26 Jul 2016 20:35:50 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm17-vm1.bullet.mail.bf1.yahoo.com (nm17-vm1.bullet.mail.bf1.yahoo.com [98.139.213.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F2411B2E for ; Tue, 26 Jul 2016 20:35:50 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1469565343; bh=0V9ii7F6hFlhvJHmq1CKecaKf8dUaGSTpv9/ONjmNfQ=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=tUVJEOzUlT/RPu1fmbCxWJpk7miNSHc+T5YRs9tNbppbMFCzSpUl0N3lnnraduHPZ9pKbxizHKBwBu41XGNuCOMlCipwXF2aCyiBjY3yaZ/b5BgqVy6znm1U7u31dwQj0vTsKaqBapTiPvPW2MyVxNUZlyLtuJI2v76fKmF5tiVmgau2e997yQIaLEGCirJJPcDkQK1C0NqyfGZ+6ieOIGVXH/iJHj5qR04jspH76e39TpS0p3ODKkKKVb7DqnMOGcL5wST/wtC2CSmrFvuTJXX8cSr4b4wkF3FPseijn1FSmR1ef0VqZlE0dqZ8uI4B3PyC6wM07hAdnljnnWdlxA== Received: from [98.139.215.143] by nm17.bullet.mail.bf1.yahoo.com with NNFMP; 26 Jul 2016 20:35:43 -0000 Received: from [98.139.213.11] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 26 Jul 2016 20:35:43 -0000 Received: from [127.0.0.1] by smtp111.mail.bf1.yahoo.com with NNFMP; 26 Jul 2016 20:35:43 -0000 X-Yahoo-Newman-Id: 121759.14839.bm@smtp111.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: AAmnQssVM1mufmGEOCW9u7SlJZ.CG_XSIDDszhZ.8o4idTy BFvA1oN1BqqxHp_dtMgX6CoqUhekIj.iIJfODnkJrtUiFZnLzO6aWqD0Oehv D9dTKPpCw1lQsPD7GmxoTj.vlBa2ksz_UU6EjCgnVBczzYFD8zdia8Mhxnmc LsXIySumYaBUWT0aNcTOtQsJByZ5iXm.8Wh1v3JuUA_w81x75E85EE.sdHeu 5elbDDQ5XR5_uBayJVsqQTkk3E0g3HbiG._HksWCTnsct6zslur9fk5IJfLy o.EA13cSiwR5ZC2spGSEeKSIDtmnedk1Ple.xIO0T8mfT0OxgJvsITdkoJP. I7ftQRUR0NLDger7dNcTSZIEMot9z0SVLsMhv0LIPXZLZWDIUqLesuyB1dTi K3EG3Rj1Fd567aWiLYlMDDiFH5L6s_gz1sizsieSqNWB36xI_ATIV8k4tNso 6vDsRHTAGzPzaYd05KLMSskNGIlqCX7BUYLuInFhukdkcUY6lfWcxjh9_p2T nV1KIFfHCreON3Eg4WuXUqqB0IggIw38eIXDEeZ9srmqiwg-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r303342 - in head: include lib/libc/stdlib To: Benjamin Kaduk , Ed Schouten References: <201607262011.u6QKBTDp043256@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Pedro Giffuni Message-ID: <5f0367b2-6916-b300-bba5-c3d3f3699a91@FreeBSD.org> Date: Tue, 26 Jul 2016 15:35:47 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 20:35:50 -0000 On 07/26/16 15:14, Benjamin Kaduk wrote: > On Tue, Jul 26, 2016 at 3:11 PM, Ed Schouten > wrote: > > Author: ed > Date: Tue Jul 26 20:11:29 2016 > New Revision: 303342 > URL: https://svnweb.freebsd.org/changeset/base/303342 > > Log: > Fix typing of srandom() and initstate(). > > POSIX requires that these functions have an unsigned int for their > first > argument; not an unsigned long. > > My reasoning is that we can safely change these functions without > breaking the ABI. As far as I know, our supported architectures either > use registers for passing function arguments that are at least as > big as > long (e.g., amd64), or int and long are of the same size (e.g., i386). > > > Is a __FreeBSD_version bump planned? (Third-party software might want > to be warning-clean.) > Third party software should already follow standards ;). Pedro. From owner-svn-src-all@freebsd.org Tue Jul 26 21:27:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A23DBA53A7; Tue, 26 Jul 2016 21:27:03 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 309A9164F; Tue, 26 Jul 2016 21:27:03 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QLR2b0070373; Tue, 26 Jul 2016 21:27:02 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QLR284070371; Tue, 26 Jul 2016 21:27:02 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201607262127.u6QLR284070371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Tue, 26 Jul 2016 21:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303345 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 21:27:03 -0000 Author: ivadasz Date: Tue Jul 26 21:27:02 2016 New Revision: 303345 URL: https://svnweb.freebsd.org/changeset/base/303345 Log: Mention AC3165 and AC8260 chipsets in iwm(4) and mention AC3165 in iwmfw(4) - Support for the AC3165 and AC8260 chipsets was added by r303322 and r303327. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7322 Modified: head/share/man/man4/iwm.4 head/share/man/man4/iwmfw.4 Modified: head/share/man/man4/iwm.4 ============================================================================== --- head/share/man/man4/iwm.4 Tue Jul 26 20:26:03 2016 (r303344) +++ head/share/man/man4/iwm.4 Tue Jul 26 21:27:02 2016 (r303345) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2015 +.Dd July 26, 2016 .Dt IWM 4 .Os .Sh NAME @@ -48,6 +48,7 @@ Choose one from: .Cd "device iwm3160fw" .Cd "device iwm7260fw" .Cd "device iwm7265fw" +.Cd "device iwm8000Cfw" .Ed .Pp Or you can use @@ -65,6 +66,7 @@ if_iwm_load="YES" iwm3160fw_load="YES" iwm7260fw_load="YES" iwm7265fw_load="YES" +iwm8000Cfw_load="YES" .Ed .Sh DESCRIPTION The @@ -73,8 +75,10 @@ driver provides support for: .Pp .Bl -tag -width Ds -offset indent -compact .It Intel Dual Band Wireless AC 3160 +.It Intel Dual Band Wireless AC 3165 .It Intel Dual Band Wireless AC 7260 .It Intel Dual Band Wireless AC 7265 +.It Intel Dual Band Wireless AC 8260 .El .Pp .Nm Modified: head/share/man/man4/iwmfw.4 ============================================================================== --- head/share/man/man4/iwmfw.4 Tue Jul 26 20:26:03 2016 (r303344) +++ head/share/man/man4/iwmfw.4 Tue Jul 26 21:27:02 2016 (r303345) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 25, 2016 +.Dd July 26, 2016 .Dt IWMFW 4 .Os .Sh NAME @@ -59,7 +59,7 @@ iwm8000Cfw_load="YES" .Ed .Sh DESCRIPTION This module provides access to firmware sets for the -Intel Dual Band Wireless WiFi 3160, 7260, 7265 and 8260 series of +Intel Dual Band Wireless WiFi 3160, 3165, 7260, 7265 and 8260 series of IEEE 802.11n/11ac adapters. It may be statically linked into the kernel, or loaded as a module. From owner-svn-src-all@freebsd.org Tue Jul 26 21:41:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F428BA5904 for ; Tue, 26 Jul 2016 21:41:03 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002: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 5801E1E2E for ; Tue, 26 Jul 2016 21:41:03 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x22c.google.com with SMTP id r9so35306527ywg.0 for ; Tue, 26 Jul 2016 14:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Rych/9kc9q2ybcio3Xtc4u+l5BlUOnoJdN2ufrxVkv8=; b=TyW6/+NqbeiPuOKCoWL+NDPSTL0HSR2sGT49C14LllCuuGNygmRcvRTzUsk4MC+57G NXuyWYgt7WoYhvdN9/ClmZHZdKims5+LnZnjEaPqW+VzCjoi6QxwFK6iS/Ofyu56WyUr 8fCDoGHFVA2vaimFruHN4LKcDrYTpGxWYEKsfqlvzCdO1+gHi3hGdNFVKNHo5UXUGNZd mKaDg3PXWAv1TK1aBYkroSNE/iFGv2Qs/+IQ0URCo77CjRFYhtnG7GqEaHAFHJauQCMY q/NoFg0gwFC4mVuatlOT1euFh9UeUNIQmCVHbIpwHyKKdOv6XmkdE0DDaxEtzcixmXiX 61nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Rych/9kc9q2ybcio3Xtc4u+l5BlUOnoJdN2ufrxVkv8=; b=YrGMtiX+HmkyOauahS0B4FrUqMxz0Fq3VtIS0EjNEdDG8kxu+fhCQqB3ne76KU7Fin b43DItr994aENv2GDZ8XLCvkp6I8GtdUfuoTJW5fcR1KKroFc0udNDXNEVjNHYk7i2dm w+CRGbmwxs+KQqyFn3qCmzsRHETKJLheXZSgWgijmo9jZffaAwbFwjpommGd6NZC/V0W q21YvkXEVGUBOHKatiq/vOFW+SBIV4yS5THELgBUpHCYtR/KDlU3VzoplHXMUDl/VVPm q+Zw4gxSB3oCph4qXPzcyM5pyIqZNXvp2u7ahuGzPfFvvbCifluCZAVcGsG8/pUqptHi f+YA== X-Gm-Message-State: AEkoouuT0SBA53bjMT0jr/6t8csOYTUanlgaUNY17NwE2WQhD9zeITzB9a6Lb1JauzxSkKdbSAzBkUGY3MFnow== X-Received: by 10.129.122.7 with SMTP id v7mr21718972ywc.219.1469569262020; Tue, 26 Jul 2016 14:41:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Tue, 26 Jul 2016 14:41:01 -0700 (PDT) In-Reply-To: <5f0367b2-6916-b300-bba5-c3d3f3699a91@FreeBSD.org> References: <201607262011.u6QKBTDp043256@repo.freebsd.org> <5f0367b2-6916-b300-bba5-c3d3f3699a91@FreeBSD.org> From: Ed Schouten Date: Tue, 26 Jul 2016 23:41:01 +0200 Message-ID: Subject: Re: svn commit: r303342 - in head: include lib/libc/stdlib To: Pedro Giffuni Cc: Benjamin Kaduk , Ed Schouten , "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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 21:41:03 -0000 Hi Pedro, Benjamin, 2016-07-26 22:35 GMT+02:00 Pedro Giffuni : > On 07/26/16 15:14, Benjamin Kaduk wrote: >> Is a __FreeBSD_version bump planned? (Third-party software might want >> to be warning-clean.) > > Third party software should already follow standards ;). Not only that. This change only changes arguments from one integer type to the other. As far as I know, such a change would not cause a compiler to generate (substantially) different diagnostics. If it turns out I'm mistaken I'll reconsider, but for now this should do. :-) -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Tue Jul 26 22:26:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66B9ABA6169; Tue, 26 Jul 2016 22:26:50 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3956116C4; Tue, 26 Jul 2016 22:26:50 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QMQn9L092694; Tue, 26 Jul 2016 22:26:49 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QMQn15092693; Tue, 26 Jul 2016 22:26:49 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201607262226.u6QMQn15092693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 26 Jul 2016 22:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303346 - head/sys/dev/usb/serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 22:26:50 -0000 Author: ian Date: Tue Jul 26 22:26:49 2016 New Revision: 303346 URL: https://svnweb.freebsd.org/changeset/base/303346 Log: Actually return line status register values from umoscom_cfg_get_status(). The hardware delivers ns16550-compatible status bits, which is what the usb_serial code expects, so no need for translation, no need for a local variable to hold a temporary lsr result. Modified: head/sys/dev/usb/serial/umoscom.c Modified: head/sys/dev/usb/serial/umoscom.c ============================================================================== --- head/sys/dev/usb/serial/umoscom.c Tue Jul 26 21:27:02 2016 (r303345) +++ head/sys/dev/usb/serial/umoscom.c Tue Jul 26 22:26:49 2016 (r303346) @@ -523,14 +523,16 @@ static void umoscom_cfg_get_status(struct ucom_softc *ucom, uint8_t *p_lsr, uint8_t *p_msr) { struct umoscom_softc *sc = ucom->sc_parent; - uint8_t lsr; uint8_t msr; DPRINTFN(5, "\n"); - /* read status registers */ + /* + * Read status registers. MSR bits need translation from ns16550 to + * SER_* values. LSR bits are ns16550 in hardware and ucom. + */ - lsr = umoscom_cfg_read(sc, UMOSCOM_LSR); + *p_lsr = umoscom_cfg_read(sc, UMOSCOM_LSR); msr = umoscom_cfg_read(sc, UMOSCOM_MSR); /* translate bits */ From owner-svn-src-all@freebsd.org Tue Jul 26 23:27:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 351EABA6E4F; Tue, 26 Jul 2016 23:27:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07FBB1272; Tue, 26 Jul 2016 23:27:28 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QNRS4C014973; Tue, 26 Jul 2016 23:27:28 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QNRS9h014972; Tue, 26 Jul 2016 23:27:28 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201607262327.u6QNRS9h014972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 26 Jul 2016 23:27:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303347 - head/sys/dev/usb/serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 23:27:29 -0000 Author: ian Date: Tue Jul 26 23:27:28 2016 New Revision: 303347 URL: https://svnweb.freebsd.org/changeset/base/303347 Log: Translate modem status reg bits from ns16550 to SER_* values used by the tty layer. Also, the line status reg bits are already ns16550 as expected by the ucom layer, so no need for translation or a local var to hold them. Modified: head/sys/dev/usb/serial/umcs.c Modified: head/sys/dev/usb/serial/umcs.c ============================================================================== --- head/sys/dev/usb/serial/umcs.c Tue Jul 26 22:26:49 2016 (r303346) +++ head/sys/dev/usb/serial/umcs.c Tue Jul 26 23:27:28 2016 (r303347) @@ -743,15 +743,26 @@ umcs7840_cfg_get_status(struct ucom_soft { struct umcs7840_softc *sc = ucom->sc_parent; uint8_t pn = ucom->sc_portno; - uint8_t hw_lsr = 0; /* local line status register */ uint8_t hw_msr = 0; /* local modem status register */ - /* Read LSR & MSR */ - umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_LSR, &hw_lsr); + /* + * Read status registers. MSR bits need translation from ns16550 to + * SER_* values. LSR bits are ns16550 in hardware and ucom. + */ + umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_LSR, lsr); umcs7840_get_UART_reg_sync(sc, pn, MCS7840_UART_REG_MSR, &hw_msr); - *lsr = hw_lsr; - *msr = hw_msr; + if (hw_msr & MCS7840_UART_MSR_NEGCTS) + *msr |= SER_CTS; + + if (hw_msr & MCS7840_UART_MSR_NEGDCD) + *msr |= SER_DCD; + + if (hw_msr & MCS7840_UART_MSR_NEGRI) + *msr |= SER_RI; + + if (hw_msr & MCS7840_UART_MSR_NEGDSR) + *msr |= SER_DSR; DPRINTF("Port %d status: LSR=%02x MSR=%02x\n", ucom->sc_portno, *lsr, *msr); } From owner-svn-src-all@freebsd.org Tue Jul 26 23:29:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82754BA6EB5; Tue, 26 Jul 2016 23:29:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52CC51436; Tue, 26 Jul 2016 23:29:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QNTbXV015087; Tue, 26 Jul 2016 23:29:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QNTbkp015086; Tue, 26 Jul 2016 23:29:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201607262329.u6QNTbkp015086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 26 Jul 2016 23:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303348 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 23:29:38 -0000 Author: np Date: Tue Jul 26 23:29:37 2016 New Revision: 303348 URL: https://svnweb.freebsd.org/changeset/base/303348 Log: cxgbe(4): Initialize the adapter queues (fwq and mgmtq) instead of returning EAGAIN if they aren't available when the user tries to program a filter. Do this after validating the filter so that the driver doesn't bring up the queues if it doesn't have to. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Jul 26 23:27:28 2016 (r303347) +++ head/sys/dev/cxgbe/t4_main.c Tue Jul 26 23:29:37 2016 (r303348) @@ -7909,11 +7909,6 @@ set_filter(struct adapter *sc, struct t4 goto done; } - if (!(sc->flags & FULL_INIT_DONE)) { - rc = EAGAIN; - goto done; - } - if (t->idx >= nfilters) { rc = EINVAL; goto done; @@ -7947,6 +7942,10 @@ set_filter(struct adapter *sc, struct t4 goto done; } + if (!(sc->flags & FULL_INIT_DONE) && + ((rc = adapter_full_init(sc)) != 0)) + goto done; + if (sc->tids.ftid_tab == NULL) { KASSERT(sc->tids.ftids_in_use == 0, ("%s: no memory allocated but filters_in_use > 0", From owner-svn-src-all@freebsd.org Tue Jul 26 23:40:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F021BA5102; Tue, 26 Jul 2016 23:40:27 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D255C19E3; Tue, 26 Jul 2016 23:40:26 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QNeQQd019123; Tue, 26 Jul 2016 23:40:26 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QNeQBV019122; Tue, 26 Jul 2016 23:40:26 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201607262340.u6QNeQBV019122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Tue, 26 Jul 2016 23:40:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303349 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 23:40:27 -0000 Author: grehan Date: Tue Jul 26 23:40:25 2016 New Revision: 303349 URL: https://svnweb.freebsd.org/changeset/base/303349 Log: Catch another case where an XHCI interrupt was being injected without state being set up. This fixes a core dump when dropping to the UEFI prompt with graphics enabled and moving the mouse around. Discussed with: Leon Dang MFC after: 3 days Modified: head/usr.sbin/bhyve/pci_xhci.c Modified: head/usr.sbin/bhyve/pci_xhci.c ============================================================================== --- head/usr.sbin/bhyve/pci_xhci.c Tue Jul 26 23:29:37 2016 (r303348) +++ head/usr.sbin/bhyve/pci_xhci.c Tue Jul 26 23:40:25 2016 (r303349) @@ -2559,7 +2559,8 @@ pci_xhci_dev_intr(struct usb_hci *hci, i /* check if device is ready; OS has to initialise it */ if (sc->rtsregs.erstba_p == NULL || - (sc->opregs.usbcmd & XHCI_CMD_RS) == 0) + (sc->opregs.usbcmd & XHCI_CMD_RS) == 0 || + dev->dev_ctx == NULL) return (0); p = XHCI_PORTREG_PTR(sc, hci->hci_port); From owner-svn-src-all@freebsd.org Tue Jul 26 23:42:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 925BDBA537A; Tue, 26 Jul 2016 23:42:43 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 654541E39; Tue, 26 Jul 2016 23:42:43 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QNggd1022443; Tue, 26 Jul 2016 23:42:42 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QNggsp022442; Tue, 26 Jul 2016 23:42:42 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201607262342.u6QNggsp022442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 26 Jul 2016 23:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303350 - head/sys/dev/usb/serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 23:42:43 -0000 Author: ian Date: Tue Jul 26 23:42:42 2016 New Revision: 303350 URL: https://svnweb.freebsd.org/changeset/base/303350 Log: Translate modem status reg bits from ns16550 to SER_* values used by the tty layer. Also annotate a switch case fall-through per style(9). Modified: head/sys/dev/usb/serial/umct.c Modified: head/sys/dev/usb/serial/umct.c ============================================================================== --- head/sys/dev/usb/serial/umct.c Tue Jul 26 23:40:25 2016 (r303349) +++ head/sys/dev/usb/serial/umct.c Tue Jul 26 23:42:42 2016 (r303350) @@ -86,6 +86,15 @@ __FBSDID("$FreeBSD$"); #define UMCT_SET_MCR 10 /* Set Modem Control Register */ #define UMCT_SET_MCR_SIZE 1 +#define UMCT_MSR_CTS_CHG 0x01 +#define UMCT_MSR_DSR_CHG 0x02 +#define UMCT_MSR_RI_CHG 0x04 +#define UMCT_MSR_CD_CHG 0x08 +#define UMCT_MSR_CTS 0x10 +#define UMCT_MSR_RTS 0x20 +#define UMCT_MSR_RI 0x40 +#define UMCT_MSR_CD 0x80 + #define UMCT_INTR_INTERVAL 100 #define UMCT_IFACE_INDEX 0 #define UMCT_CONFIG_INDEX 0 @@ -384,11 +393,23 @@ umct_intr_callback_sub(struct usb_xfer * pc = usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, buf, sizeof(buf)); - sc->sc_msr = buf[0]; + /* + * MSR bits need translation from ns16550 to SER_* values. + * LSR bits are ns16550 in hardware and ucom. + */ + sc->sc_msr = 0; + if (buf[0] & UMCT_MSR_CTS) + sc->sc_msr |= SER_CTS; + if (buf[0] & UMCT_MSR_CD) + sc->sc_msr |= SER_DCD; + if (buf[0] & UMCT_MSR_RI) + sc->sc_msr |= SER_RI; + if (buf[0] & UMCT_MSR_RTS) + sc->sc_msr |= SER_DSR; sc->sc_lsr = buf[1]; ucom_status_change(&sc->sc_ucom); - + /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); From owner-svn-src-all@freebsd.org Wed Jul 27 00:03:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 791CABA5A7D; Wed, 27 Jul 2016 00:03:19 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 497F517A6; Wed, 27 Jul 2016 00:03:19 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R03Iek029997; Wed, 27 Jul 2016 00:03:18 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R03I4o029996; Wed, 27 Jul 2016 00:03:18 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201607270003.u6R03I4o029996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 27 Jul 2016 00:03:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303351 - head/sys/dev/usb/serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 00:03:19 -0000 Author: ian Date: Wed Jul 27 00:03:18 2016 New Revision: 303351 URL: https://svnweb.freebsd.org/changeset/base/303351 Log: Translate modem status reg bits from ns16550 to SER_* values used by the tty layer. Also annotate a switch case fall-through per style(9). Modified: head/sys/dev/usb/serial/ubsa.c Modified: head/sys/dev/usb/serial/ubsa.c ============================================================================== --- head/sys/dev/usb/serial/ubsa.c Tue Jul 26 23:42:42 2016 (r303350) +++ head/sys/dev/usb/serial/ubsa.c Wed Jul 27 00:03:18 2016 (r303351) @@ -650,11 +650,19 @@ ubsa_intr_callback(struct usb_xfer *xfer usbd_copy_out(pc, 0, buf, sizeof(buf)); /* - * incidentally, Belkin adapter status bits match - * UART 16550 bits + * MSR bits need translation from ns16550 to SER_* values. + * LSR bits are ns16550 in hardware and ucom. */ + sc->sc_msr = 0; + if (buf[3] & UBSA_MSR_CTS) + sc->sc_msr |= SER_CTS; + if (buf[3] & UBSA_MSR_DCD) + sc->sc_msr |= SER_DCD; + if (buf[3] & UBSA_MSR_RI) + sc->sc_msr |= SER_RI; + if (buf[3] & UBSA_MSR_DSR) + sc->sc_msr |= SER_DSR; sc->sc_lsr = buf[2]; - sc->sc_msr = buf[3]; DPRINTF("lsr = 0x%02x, msr = 0x%02x\n", sc->sc_lsr, sc->sc_msr); @@ -663,7 +671,7 @@ ubsa_intr_callback(struct usb_xfer *xfer } else { DPRINTF("ignoring short packet, %d bytes\n", actlen); } - + /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); From owner-svn-src-all@freebsd.org Wed Jul 27 00:03:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFFB0BA5AB7; Wed, 27 Jul 2016 00:03:30 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC206195B; Wed, 27 Jul 2016 00:03:30 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R03UVU030048; Wed, 27 Jul 2016 00:03:30 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R03UAI030047; Wed, 27 Jul 2016 00:03:30 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201607270003.u6R03UAI030047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Wed, 27 Jul 2016 00:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303352 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 00:03:31 -0000 Author: grehan Date: Wed Jul 27 00:03:29 2016 New Revision: 303352 URL: https://svnweb.freebsd.org/changeset/base/303352 Log: - Change the fbuf "vga" parameter to "vga=on|io|off". "io" is the default, and allows VGA i/o registers to be accessed. This is required by Win7/2k8 graphics guests that use a combination of BIOS int10 and UEFI. "off" disables all VGA i/o and mem accesses. "on" is not yet hooked up, but will enable full VGA rendering. OpenBSD/UEFI >= 5.9 graphics guests can be booted using "vga=off" - Allow "rfb" to be used instead of "tcp" for the fbuf VNC description. "tcp" will be removed at a future point and is kept as an alias. Discussed with: Leon Dang MFC after: 3 days Modified: head/usr.sbin/bhyve/pci_fbuf.c Modified: head/usr.sbin/bhyve/pci_fbuf.c ============================================================================== --- head/usr.sbin/bhyve/pci_fbuf.c Wed Jul 27 00:03:18 2016 (r303351) +++ head/usr.sbin/bhyve/pci_fbuf.c Wed Jul 27 00:03:29 2016 (r303352) @@ -95,7 +95,8 @@ struct pci_fbuf_softc { char *rfb_host; int rfb_port; int rfb_wait; - int use_vga; + int vga_enabled; + int vga_full; uint32_t fbaddr; char *fb_base; @@ -114,7 +115,7 @@ pci_fbuf_usage(char *opt) { fprintf(stderr, "Invalid fbuf emulation \"%s\"\r\n", opt); - fprintf(stderr, "fbuf: {wait,}tcp=:port\r\n"); + fprintf(stderr, "fbuf: {wait,}{vga=on|io|off,}rfb=:port\r\n"); } static void @@ -234,13 +235,6 @@ pci_fbuf_parse_opts(struct pci_fbuf_soft continue; } -#if 0 /* notyet */ - if (strcmp(xopts, "vga") == 0) { - sc->use_vga = 1; - continue; - } -#endif - if ((config = strchr(xopts, '=')) == NULL) { pci_fbuf_usage(xopts); ret = -1; @@ -252,17 +246,31 @@ pci_fbuf_parse_opts(struct pci_fbuf_soft DPRINTF(DEBUG_VERBOSE, ("pci_fbuf option %s = %s\r\n", xopts, config)); - if (!strcmp(xopts, "tcp")) { + if (!strcmp(xopts, "tcp") || !strcmp(xopts, "rfb")) { /* parse host-ip:port */ - tmpstr = strsep(&config, ":"); + tmpstr = strsep(&config, ":"); if (!config) sc->rfb_port = atoi(tmpstr); else { sc->rfb_port = atoi(config); sc->rfb_host = tmpstr; } - } else if (!strcmp(xopts, "w")) { - sc->memregs.width = atoi(config); + } else if (!strcmp(xopts, "vga")) { + if (!strcmp(config, "off")) { + sc->vga_enabled = 0; + } else if (!strcmp(config, "io")) { + sc->vga_enabled = 1; + sc->vga_full = 0; + } else if (!strcmp(config, "on")) { + sc->vga_enabled = 1; + sc->vga_full = 1; + } else { + pci_fbuf_usage(opts); + ret = -1; + goto done; + } + } else if (!strcmp(xopts, "w")) { + sc->memregs.width = atoi(config); if (sc->memregs.width > COLS_MAX) { pci_fbuf_usage(xopts); ret = -1; @@ -299,7 +307,7 @@ pci_fbuf_render(struct bhyvegc *gc, void sc = arg; - if (sc->use_vga && sc->gc_image->vgamode) { + if (sc->vga_full && sc->gc_image->vgamode) { /* TODO: mode switching to vga and vesa should use the special * EFI-bhyve protocol port. */ @@ -352,12 +360,21 @@ pci_fbuf_init(struct vmctx *ctx, struct sc->memregs.height = ROWS_DEFAULT; sc->memregs.depth = 32; + sc->vga_enabled = 1; + sc->vga_full = 0; + sc->fsc_pi = pi; error = pci_fbuf_parse_opts(sc, opts); if (error != 0) goto done; + /* XXX until VGA rendering is enabled */ + if (sc->vga_full != 0) { + fprintf(stderr, "pci_fbuf: VGA rendering not enabled"); + goto done; + } + sc->fb_base = vm_create_devmem(ctx, VM_FRAMEBUFFER, "framebuffer", FB_SIZE); if (sc->fb_base == MAP_FAILED) { error = -1; @@ -382,7 +399,8 @@ pci_fbuf_init(struct vmctx *ctx, struct console_init(sc->memregs.width, sc->memregs.height, sc->fb_base); console_fb_register(pci_fbuf_render, sc); - sc->vgasc = vga_init(!sc->use_vga); + if (sc->vga_enabled) + sc->vgasc = vga_init(!sc->vga_full); sc->gc_image = console_get_image(); fbuf_sc = sc; From owner-svn-src-all@freebsd.org Wed Jul 27 00:08:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55666BA5BC8; Wed, 27 Jul 2016 00:08:03 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2302B1B5D; Wed, 27 Jul 2016 00:08:03 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R082ld030358; Wed, 27 Jul 2016 00:08:02 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R081o5030351; Wed, 27 Jul 2016 00:08:01 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201607270008.u6R081o5030351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 27 Jul 2016 00:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303353 - head/sys/dev/usb/serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 00:08:03 -0000 Author: ian Date: Wed Jul 27 00:08:01 2016 New Revision: 303353 URL: https://svnweb.freebsd.org/changeset/base/303353 Log: Annotate the usb-serial drivers which always return 0 for line status, so that it'll be easier to find and fix them in the future. Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/serial/uark.c head/sys/dev/usb/serial/uchcom.c head/sys/dev/usb/serial/ufoma.c head/sys/dev/usb/serial/umodem.c head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/serial/uslcom.c Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Wed Jul 27 00:03:29 2016 (r303352) +++ head/sys/dev/usb/serial/u3g.c Wed Jul 27 00:08:01 2016 (r303353) @@ -1100,6 +1100,7 @@ u3g_cfg_get_status(struct ucom_softc *uc { struct u3g_softc *sc = ucom->sc_parent; + /* XXX Note: sc_lsr is always zero */ *lsr = sc->sc_lsr[ucom->sc_subunit]; *msr = sc->sc_msr[ucom->sc_subunit]; } Modified: head/sys/dev/usb/serial/uark.c ============================================================================== --- head/sys/dev/usb/serial/uark.c Wed Jul 27 00:03:29 2016 (r303352) +++ head/sys/dev/usb/serial/uark.c Wed Jul 27 00:08:01 2016 (r303353) @@ -427,6 +427,7 @@ uark_cfg_get_status(struct ucom_softc *u { struct uark_softc *sc = ucom->sc_parent; + /* XXX Note: sc_lsr is always zero */ *lsr = sc->sc_lsr; *msr = sc->sc_msr; } Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Wed Jul 27 00:03:29 2016 (r303352) +++ head/sys/dev/usb/serial/uchcom.c Wed Jul 27 00:08:01 2016 (r303353) @@ -625,6 +625,7 @@ uchcom_cfg_get_status(struct ucom_softc DPRINTF("\n"); + /* XXX Note: sc_lsr is always zero */ *lsr = sc->sc_lsr; *msr = sc->sc_msr; } Modified: head/sys/dev/usb/serial/ufoma.c ============================================================================== --- head/sys/dev/usb/serial/ufoma.c Wed Jul 27 00:03:29 2016 (r303352) +++ head/sys/dev/usb/serial/ufoma.c Wed Jul 27 00:08:01 2016 (r303353) @@ -900,6 +900,7 @@ ufoma_cfg_get_status(struct ucom_softc * { struct ufoma_softc *sc = ucom->sc_parent; + /* XXX Note: sc_lsr is always zero */ *lsr = sc->sc_lsr; *msr = sc->sc_msr; } Modified: head/sys/dev/usb/serial/umodem.c ============================================================================== --- head/sys/dev/usb/serial/umodem.c Wed Jul 27 00:03:29 2016 (r303352) +++ head/sys/dev/usb/serial/umodem.c Wed Jul 27 00:08:01 2016 (r303353) @@ -558,6 +558,7 @@ umodem_cfg_get_status(struct ucom_softc DPRINTF("\n"); + /* XXX Note: sc_lsr is always zero */ *lsr = sc->sc_lsr; *msr = sc->sc_msr; } Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Wed Jul 27 00:03:29 2016 (r303352) +++ head/sys/dev/usb/serial/uplcom.c Wed Jul 27 00:08:01 2016 (r303353) @@ -807,6 +807,7 @@ uplcom_cfg_get_status(struct ucom_softc DPRINTF("\n"); + /* XXX Note: sc_lsr is always zero */ *lsr = sc->sc_lsr; *msr = sc->sc_msr; } Modified: head/sys/dev/usb/serial/uslcom.c ============================================================================== --- head/sys/dev/usb/serial/uslcom.c Wed Jul 27 00:03:29 2016 (r303352) +++ head/sys/dev/usb/serial/uslcom.c Wed Jul 27 00:08:01 2016 (r303353) @@ -704,6 +704,7 @@ uslcom_get_status(struct ucom_softc *uco DPRINTF("\n"); + /* XXX Note: sc_lsr is always zero */ *lsr = sc->sc_lsr; *msr = sc->sc_msr; } From owner-svn-src-all@freebsd.org Wed Jul 27 00:46:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE685BA36D4; Wed, 27 Jul 2016 00:46:49 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB15D1E4C; Wed, 27 Jul 2016 00:46:49 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R0kmtP045151; Wed, 27 Jul 2016 00:46:48 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R0kmWK045150; Wed, 27 Jul 2016 00:46:48 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201607270046.u6R0kmWK045150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 27 Jul 2016 00:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303354 - head/share/timedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 00:46:50 -0000 Author: kevlo Date: Wed Jul 27 00:46:48 2016 New Revision: 303354 URL: https://svnweb.freebsd.org/changeset/base/303354 Log: Add weekday to the date format. Modified: head/share/timedef/zh_TW.UTF-8.src Modified: head/share/timedef/zh_TW.UTF-8.src ============================================================================== --- head/share/timedef/zh_TW.UTF-8.src Wed Jul 27 00:08:01 2016 (r303353) +++ head/share/timedef/zh_TW.UTF-8.src Wed Jul 27 00:46:48 2016 (r303354) @@ -56,14 +56,14 @@ %Y/%m/%d # # c_fmt -%Yå¹´%m月%eæ—¥ %p%I:%M:%S [%Z] +%Yå¹´%m月%eæ—¥%A %p%I:%M:%S [%Z] # # AM/PM ä¸Šåˆ ä¸‹åˆ # # date_fmt -%Yå¹´%m月%eæ—¥ %p%I:%M:%S [%Z] +%Yå¹´%m月%eæ—¥%A %p%I:%M:%S [%Z] # # Long month names (without case ending) 1月 From owner-svn-src-all@freebsd.org Wed Jul 27 00:55:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 780F7BA386E for ; Wed, 27 Jul 2016 00:55:49 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) (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 ED98113A2 for ; Wed, 27 Jul 2016 00:55:48 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f42.google.com with SMTP id g62so16438793lfe.3 for ; Tue, 26 Jul 2016 17:55:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=zZMdYZ6M1V8VoXnnL7EL1e8IrULIqQhzmnekuO+cFKo=; b=ffsdwwhsYQ3OoEvOwgJIsHzCTCgSCceuBKjjAYB+tTVT8K/VQNrXEdQ9KDY10pa3Wo WxLTJsLwM4iDiJS0cMCT00YuRYMhqjsUwkLCrjiVB+32qybRmBepM4XmL4QqUEGHBR+z C6d5Eqlw2ru6dEJweKfwz53liwHgAc0qCB7xg94i+Q88TH3Ar772JVTOzFsV09iCmbc2 nLBpm59p7H7FMfDDakaBoAGqE4T/3FXKXES2UD6Oo1xTSlAJ3SB03xrwURoYHtGJpY7c TF+rzy4uB7ooe3dQD8qE26iEWuN/06ips1gY2zmDsmjdoSvL9RP2NnojyQxb8ZucV3k+ GIPg== X-Gm-Message-State: AEkoouviBr7/xdIZHrmiRPvCy4qKLkU5eGdCq050xv2o5KPMaNPvpPBiJlUYmFMeMC8mjA== X-Received: by 10.25.125.7 with SMTP id y7mr11481872lfc.140.1469580946441; Tue, 26 Jul 2016 17:55:46 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id f3sm526274lff.21.2016.07.26.17.55.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jul 2016 17:55:45 -0700 (PDT) Subject: Re: svn commit: r303354 - head/share/timedef To: Kevin Lo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607270046.u6R0kmWK045150@repo.freebsd.org> From: Andrey Chernov Message-ID: <81134a98-b8ff-fba9-1d8d-eed2cc1253db@freebsd.org> Date: Wed, 27 Jul 2016 03:55:44 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201607270046.u6R0kmWK045150@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 00:55:49 -0000 On 27.07.2016 3:46, Kevin Lo wrote: > Author: kevlo > Date: Wed Jul 27 00:46:48 2016 > New Revision: 303354 > URL: https://svnweb.freebsd.org/changeset/base/303354 > > Log: > Add weekday to the date format. This file is generated, so this change will be lost after next generation. It will be better to fix generation script instead. > > Modified: > head/share/timedef/zh_TW.UTF-8.src > > Modified: head/share/timedef/zh_TW.UTF-8.src > ============================================================================== > --- head/share/timedef/zh_TW.UTF-8.src Wed Jul 27 00:08:01 2016 (r303353) > +++ head/share/timedef/zh_TW.UTF-8.src Wed Jul 27 00:46:48 2016 (r303354) > @@ -56,14 +56,14 @@ > %Y/%m/%d > # > # c_fmt > -%Yå¹´%m月%eæ—¥ %p%I:%M:%S [%Z] > +%Yå¹´%m月%eæ—¥%A %p%I:%M:%S [%Z] > # > # AM/PM > ä¸Šåˆ > ä¸‹åˆ > # > # date_fmt > -%Yå¹´%m月%eæ—¥ %p%I:%M:%S [%Z] > +%Yå¹´%m月%eæ—¥%A %p%I:%M:%S [%Z] > # > # Long month names (without case ending) > 1月 > From owner-svn-src-all@freebsd.org Wed Jul 27 01:26:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7F0CBA6195; Wed, 27 Jul 2016 01:26:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 81A3E1449; Wed, 27 Jul 2016 01:26:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id C6D7AD68C9B; Wed, 27 Jul 2016 10:44:22 +1000 (AEST) Date: Wed, 27 Jul 2016 10:44:22 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Schouten cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303342 - in head: include lib/libc/stdlib In-Reply-To: <201607262011.u6QKBTDp043256@repo.freebsd.org> Message-ID: <20160727091654.P1485@besplex.bde.org> References: <201607262011.u6QKBTDp043256@repo.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=OtmysHLt c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=7p6omsNoN1DVj17v3WwA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 01:26:58 -0000 On Tue, 26 Jul 2016, Ed Schouten wrote: > Log: > Fix typing of srandom() and initstate(). > > POSIX requires that these functions have an unsigned int for their first > argument; not an unsigned long. > > My reasoning is that we can safely change these functions without > breaking the ABI. As far as I know, our supported architectures either > use registers for passing function arguments that are at least as big as > long (e.g., amd64), or int and long are of the same size (e.g., i386). This might work here since the type is unsigned, but it wouldn't work to change from int to long. Doing the correct extension in callers seems to be accidental on amd64, and doesn't happen for the signed case with gcc-4.2. For passing at least the first arg in the standard place (%rdi), gcc-4.2 loads both int and u_int args using movl. This always zero-extends. This is accidentally correct for u_ints, but for ints it does bad things like turning -1 into 0xFFFFFFFF. Callees don't depend on callers not passing garbage in the top bits. They generate extra instructions which waste time to do the correct extension if necessary. That is, if you don't pun the types. If you pass (int)-1 to a function expecting long, then with gcc-4.2 on amd64, -1 becomes 0xFFFFFFFF and the caller must trust this as a long value and not "fix" it to get -1 again. But clang sign-extends in callers, so this works, perhaps not accidentally. With unsigned types, zero-extension works for both compilers. Either gcc-4.2 is broken or clang is doing more than the ABI requires. I think the ABI shouldn't require much here. I expected the extra instructions to go away when sloppy unprotyped code and type pun became less common, but compilers still generate them. A stricter ABI would require callers to do more and callees would keep doing more. Bruce From owner-svn-src-all@freebsd.org Wed Jul 27 03:19:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 181DBBA6422; Wed, 27 Jul 2016 03:19:08 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x242.google.com (mail-pa0-x242.google.com [IPv6:2607:f8b0:400e:c03::242]) (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 D2834163C; Wed, 27 Jul 2016 03:19:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x242.google.com with SMTP id ez1so929418pab.3; Tue, 26 Jul 2016 20:19:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=5g4Nzjq5e4YHTwbA3PuGk1Mz/K8lGqEwfJGzGDVyf1M=; b=nheVEIfcwWNie6ZX42K4bFoSs9o1qCV88KYWXbX0dJNMbzz7bPasRPgb6ed6sA2TeQ V69f2HaONbcLzJLs7ZXZ3V+24KfghmDcuckBYCo9huXlOeBOMjHnBztNrJiuckCPlCfC IxQfpTPvZcgSzwDFm7wT/g014EXwgDPm7GaEkdonSbtXK8tWDihh+T55AtuKCE6ESqmk VtKJ1oSNhuMuclbeg+MaUkahQ1/SeAIYDtivd37OTyjFvZJIPjkkT09KsHzTS4Di/FW+ A8HiCHGog1U4sKLX7cUuInTLXhFjPSvxRZHFSZN6R39KlrLNTxtzkjCTeNkKekUcfUDJ Hm+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=5g4Nzjq5e4YHTwbA3PuGk1Mz/K8lGqEwfJGzGDVyf1M=; b=Khm2snF3ojxMm9qN5Gsn8Q1xXRZMRD+vXYui3F4YfAt5CFCanXLMO7S0lEh7E6cjZ1 UGlQ1MnH46lu1rXviMNKsacmg44zWebDehpXxTf650CK6YCzsp6+YhL/zSoKcBZ4uQ9e PtXySBNay+e9bT3LE8TqeNb8xS332XwYJuRyOvfTiGSDhmbZUFZjzanbPq1j+puDrSZU OP3mIrZgJk+PI/grSQ+ZB81/cXfRPv3m3PIxW1bULVdz2TfmLPTrSdbQ83A46d6ukmDQ 9GS/Xk2DzEWCTRASyDM6kj4KQ6LF1p9DHUf+8LKIeuP3xIV2hIyGSqY100Et+CT3f9KR akeA== X-Gm-Message-State: AEkoouvgUxWjYHI+CD9xFjzMnLRre3ipRmMK/KKN7+MkAWy+cb8HOOD7ekUb0Hq2s3MvEw== X-Received: by 10.66.233.38 with SMTP id tt6mr45111889pac.99.1469589546740; Tue, 26 Jul 2016 20:19:06 -0700 (PDT) Received: from [10.230.255.244] ([73.109.57.116]) by smtp.gmail.com with ESMTPSA id tm1sm4532163pac.23.2016.07.26.20.19.05 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Jul 2016 20:19:05 -0700 (PDT) Subject: Re: svn commit: r303047 - head/usr.bin/sed Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_3525F60C-E6B2-4FA0-8100-95C8B919B5F1"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201607192256.u6JMuewv007503@repo.freebsd.org> Date: Tue, 26 Jul 2016 20:19:06 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <1F81EA99-0498-4B8E-996A-D330EE6D770D@gmail.com> References: <201607192256.u6JMuewv007503@repo.freebsd.org> To: "Pedro F. Giffuni" X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 03:19:08 -0000 --Apple-Mail=_3525F60C-E6B2-4FA0-8100-95C8B919B5F1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jul 19, 2016, at 15:56, Pedro F. Giffuni wrote: >=20 > Author: pfg > Date: Tue Jul 19 22:56:40 2016 > New Revision: 303047 > URL: https://svnweb.freebsd.org/changeset/base/303047 >=20 > Log: > sed(1): Assorted cleanups and simplifications. >=20 > Const-ify several variables, make it build cleanly with WARNS level = 5. >=20 > Submitted by: mi > PR: 195929 > MFC after: 1 month >=20 > Modified: > head/usr.bin/sed/Makefile > head/usr.bin/sed/compile.c > head/usr.bin/sed/defs.h > head/usr.bin/sed/extern.h > head/usr.bin/sed/main.c > head/usr.bin/sed/misc.c > head/usr.bin/sed/process.c This breaks the etcupdate tests: = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211399 . Thanks, -Ngie --Apple-Mail=_3525F60C-E6B2-4FA0-8100-95C8B919B5F1 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJXmCgqAAoJEPWDqSZpMIYVCd4QAIS8A3xppHXQCryqIxWAlm6v G3DZ+yyP+u+5UOFAgGZnQXv24YHJWT6A0YD5RUjm/gsbX3WGzR3KGLLvUh5GITJn B/UbyYKUzRF7ZVFQA6HAdN7qVES38hnN3uLZpv4+nmGgEpghlAjnrmidP+Xm9W0n Ugh81eUEWBqVd4VNdxhuT8UQ+320u7mDmdJdB6jhZTpNqdPyuMZ+aT8cs/96tsQM OXq5lw+BdyMhZcbaLqLTCqEUlCwA90JcETgoyCz2ujZaE0yGx9ySjHd43jlx0h2P gERjvPULXtF5NAeb+UrAfWndc6iEb24HV99yddZJDjAxf6wh5C2gPQ8+EjBoHtuD 2nKV4mbR0+r/53JK8WaoUDQJ9ykGBluQWWI7NCLYmrdYospKvLAjUi6vsxip/pt/ Df4qVtodCh6qe3njCTkp6whgzF6X2YLM7B8USV+VMPo8uEpzBpJlltLdRruXzyN0 NFx0zWAl1sUYr3CY0b2jqnxU+HSH2V+d1LASn/isFYXjRAFYFOCaOuEvOBWL+vpE vdeRZFpvQ87sEfSe2egmFbF00qNfuEX4AJm2OAF7OOK2GOGDDz6PB/Ci/c+E/p5X V7y8es1WRfPk7iGnXKIJlx9I7xbTw3ciW2IZf9YHfRedK64A2zr4s1LEAAhUl2ri xOxkF6q+oRDHxwLGWIqR =JYYQ -----END PGP SIGNATURE----- --Apple-Mail=_3525F60C-E6B2-4FA0-8100-95C8B919B5F1-- From owner-svn-src-all@freebsd.org Wed Jul 27 03:21:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8F5BBA64C3; Wed, 27 Jul 2016 03:21:03 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A7521871; Wed, 27 Jul 2016 03:21:03 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R3L2j2001225; Wed, 27 Jul 2016 03:21:02 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R3L2AE001222; Wed, 27 Jul 2016 03:21:02 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201607270321.u6R3L2AE001222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Wed, 27 Jul 2016 03:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303355 - in head/sys: conf kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 03:21:03 -0000 Author: stevek Date: Wed Jul 27 03:21:02 2016 New Revision: 303355 URL: https://svnweb.freebsd.org/changeset/base/303355 Log: Add the NUM_CORE_FILES kernel config option which specifies the limit for the number of core files allowed by a particular process when using the %I core file name pattern. Sanity check at compile time to ensure the value is within the valid range of 0-10. Reviewed by: jtl, sjg Approved by: sjg (mentor) Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D6812 Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/kern/kern_sig.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Jul 27 00:46:48 2016 (r303354) +++ head/sys/conf/NOTES Wed Jul 27 03:21:02 2016 (r303355) @@ -578,6 +578,17 @@ options COMPILING_LINT # options STACK +# +# The NUM_CORE_FILES option specifies the limit for the number of core +# files generated by a particular process, when the core file format +# specifier includes the %I pattern. Since we only have 1 character for +# the core count in the format string, meaning the range will be 0-9, the +# maximum value allowed for this option is 10. +# This core file limit can be adjusted at runtime via the debug.ncores +# sysctl. +# +options NUM_CORE_FILES=5 + ##################################################################### # PERFORMANCE MONITORING OPTIONS Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Jul 27 00:46:48 2016 (r303354) +++ head/sys/conf/options Wed Jul 27 03:21:02 2016 (r303355) @@ -65,6 +65,7 @@ SYSCTL_DEBUG opt_sysctl.h EARLY_PRINTF opt_global.h TEXTDUMP_PREFERRED opt_ddb.h TEXTDUMP_VERBOSE opt_ddb.h +NUM_CORE_FILES opt_global.h # Miscellaneous options. ADAPTIVE_LOCKMGRS Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Wed Jul 27 00:46:48 2016 (r303354) +++ head/sys/kern/kern_sig.c Wed Jul 27 03:21:02 2016 (r303355) @@ -3142,8 +3142,12 @@ childproc_exited(struct proc *p) * We only have 1 character for the core count in the format * string, so the range will be 0-9 */ -#define MAX_NUM_CORES 10 -static int num_cores = 5; +#define MAX_NUM_CORE_FILES 10 +#ifndef NUM_CORE_FILES +#define NUM_CORE_FILES 5 +#endif +CTASSERT(NUM_CORE_FILES >= 0 && NUM_CORE_FILES <= MAX_NUM_CORE_FILES); +static int num_cores = NUM_CORE_FILES; static int sysctl_debug_num_cores_check (SYSCTL_HANDLER_ARGS) @@ -3155,8 +3159,8 @@ sysctl_debug_num_cores_check (SYSCTL_HAN error = sysctl_handle_int(oidp, &new_val, 0, req); if (error != 0 || req->newptr == NULL) return (error); - if (new_val > MAX_NUM_CORES) - new_val = MAX_NUM_CORES; + if (new_val > MAX_NUM_CORE_FILES) + new_val = MAX_NUM_CORE_FILES; if (new_val < 0) new_val = 0; num_cores = new_val; From owner-svn-src-all@freebsd.org Wed Jul 27 03:49:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6A19BA6C17; Wed, 27 Jul 2016 03:49:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89BB01307; Wed, 27 Jul 2016 03:49:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R3n0s8010630; Wed, 27 Jul 2016 03:49:00 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R3n0wr010629; Wed, 27 Jul 2016 03:49:00 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201607270349.u6R3n0wr010629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 27 Jul 2016 03:49:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303356 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 03:49:01 -0000 Author: alc Date: Wed Jul 27 03:49:00 2016 New Revision: 303356 URL: https://svnweb.freebsd.org/changeset/base/303356 Log: Update a comment to reflect r284376. MFC after: 3 days Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Wed Jul 27 03:21:02 2016 (r303355) +++ head/sys/vm/vm_pageout.c Wed Jul 27 03:49:00 2016 (r303356) @@ -1072,10 +1072,9 @@ unlock_page: /* * If the page appears to be clean at the machine-independent * layer, then remove all of its mappings from the pmap in - * anticipation of placing it onto the cache queue. If, - * however, any of the page's mappings allow write access, - * then the page may still be modified until the last of those - * mappings are removed. + * anticipation of freeing it. If, however, any of the page's + * mappings allow write access, then the page may still be + * modified until the last of those mappings are removed. */ if (object->ref_count != 0) { vm_page_test_dirty(m); From owner-svn-src-all@freebsd.org Wed Jul 27 04:33:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6EBAA7A722 for ; Wed, 27 Jul 2016 04:33:37 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm50-vm8.bullet.mail.bf1.yahoo.com (nm50-vm8.bullet.mail.bf1.yahoo.com [216.109.115.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F4FF1CCF for ; Wed, 27 Jul 2016 04:33:37 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1469594010; bh=oKjJuHrlL4LcNGT/YHmKWZCM4uHMBroQoLcdm8TSLns=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=LktGxMMZ+0Zm6S0bcfLiM2Z5YRFrI+9fGduT1bgvRVuhSz5wwFL9PB92iwJlLooENNBNPGq4UoaCWAytfg2fb1qr+EhHJ3osIkbJQEVQQmrEdAtpCwdHaZcYClEh9hpmzjLjDJSpLwdGRfg3LrirmqumUv6jKrnXeXB2ehavU8O4/FDOnMTKQDDzeUuErpY1O2VbvV1MOpRJEna78Z1e3rumzVxx3Lqhzuq7bo5HYcfDUWhUm2HJf6C0Vq88oxBFVxl9f0t2/N3cvY/9JseRXQeY3AKBwLI1IsDFFZSBK+JRxqt8G6A2jDktGtYPElGVVCtOXrP/VC+AN8/hGCT2yg== Received: from [66.196.81.172] by nm50.bullet.mail.bf1.yahoo.com with NNFMP; 27 Jul 2016 04:33:30 -0000 Received: from [68.142.230.78] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 27 Jul 2016 04:33:30 -0000 Received: from [127.0.0.1] by smtp235.mail.bf1.yahoo.com with NNFMP; 27 Jul 2016 04:33:30 -0000 X-Yahoo-Newman-Id: 808099.68347.bm@smtp235.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: gwik9woVM1lPUZ5RoO9P51IxmTjfQd_bqicQq.MxKDe285a 8.uI9oEXWL5L8_3SZj7nz4M_w0wB8KZi4KMAR6YLFVlH8vG99CywRUDZ92rG eNUcXQ1w_I33l9RDsJye1f0Mp57J6SOA8nVVVST3nZnsVg_o6Y94vjgPz.bb feCIZLxHVV9n6zUb412UJ0jfszdcJcn_bQk_OUw71hdCFTqC41_SIUufble8 damsplzcfXJHFqh9pYAxsvXaPzSd609RfMWbkFllPPprYd23DF4QYGHTkx.G EfIdPhF5OOmvOLNpSr6xQ7IBkjWeKrrsPC2puDKRM6BXJNwZ1kOq45el3KoB I.eACC_2eHdL.2z0RuRG5juZl8pLDXDCi4midp2TRkwiM74VnnxtrnneJ5lO 7Jnqu_P1EGw_X0fNVL0ZVv7w8cUVkSMGhVvi.4u66gUqnIGXk.wNRO7AhAL2 ZIPPEai4wIN.FouFcU0DLuKsovmGY8PrCrnJbqZyBdhlfrKymIorllqYwrlI KS8IbZFWRJUXfzI5T4Nx9_k2X74xyP2HkrqVCdxurP1LwCQ-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r303047 - head/usr.bin/sed To: "Ngie Cooper (yaneurabeya)" References: <201607192256.u6JMuewv007503@repo.freebsd.org> <1F81EA99-0498-4B8E-996A-D330EE6D770D@gmail.com> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: <8816e889-4e10-e936-2cdc-78e7243648c6@FreeBSD.org> Date: Tue, 26 Jul 2016 23:33:32 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1F81EA99-0498-4B8E-996A-D330EE6D770D@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 04:33:37 -0000 On 07/26/16 22:19, Ngie Cooper (yaneurabeya) wrote: > >> On Jul 19, 2016, at 15:56, Pedro F. Giffuni wrote: >> >> Author: pfg >> Date: Tue Jul 19 22:56:40 2016 >> New Revision: 303047 >> URL: https://svnweb.freebsd.org/changeset/base/303047 >> >> Log: >> sed(1): Assorted cleanups and simplifications. >> >> Const-ify several variables, make it build cleanly with WARNS level 5. >> >> Submitted by: mi >> PR: 195929 >> MFC after: 1 month >> >> Modified: >> head/usr.bin/sed/Makefile >> head/usr.bin/sed/compile.c >> head/usr.bin/sed/defs.h >> head/usr.bin/sed/extern.h >> head/usr.bin/sed/main.c >> head/usr.bin/sed/misc.c >> head/usr.bin/sed/process.c > > This breaks the etcupdate tests: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211399 . > Thanks, I am OK with reverting but I would like more details. Is there a way to get a diff between the pass vs. failing tests? Pedro. From owner-svn-src-all@freebsd.org Wed Jul 27 05:17:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0A88A7AD91; Wed, 27 Jul 2016 05:17:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB8261CCC; Wed, 27 Jul 2016 05:17:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R5HuTB044109; Wed, 27 Jul 2016 05:17:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R5Ht1n044107; Wed, 27 Jul 2016 05:17:55 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607270517.u6R5Ht1n044107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jul 2016 05:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303359 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 05:17:57 -0000 Author: bdrewery Date: Wed Jul 27 05:17:55 2016 New Revision: 303359 URL: https://svnweb.freebsd.org/changeset/base/303359 Log: MFC r303272,r303273: r303272: SYSTEM_COMPILER: Rework the logic to allow a 'make test-system-compiler'. r303273: Fix empty WANT_COMPILER_TYPE when neither compiler is bootstrapped. Approved by: re (kib) Modified: stable/11/Makefile stable/11/Makefile.inc1 Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile ============================================================================== --- stable/11/Makefile Wed Jul 27 05:03:58 2016 (r303358) +++ stable/11/Makefile Wed Jul 27 05:17:55 2016 (r303359) @@ -131,7 +131,8 @@ TGTS= all all-man buildenv buildenvvars builddtb xdev xdev-build xdev-install \ xdev-links native-xtools stageworld stagekernel stage-packages \ create-world-packages create-kernel-packages create-packages \ - packages installconfig real-packages sign-packages package-pkg + packages installconfig real-packages sign-packages package-pkg \ + test-system-compiler # XXX: r156740: This can't work since bsd.subdir.mk is not included ever. # It will only work for SUBDIR_TARGETS in make.conf. @@ -151,7 +152,8 @@ TGTS+= ${BITGTS} META_TGT_WHITELIST+= \ _* build32 buildfiles buildincludes buildkernel buildsoft \ buildworld everything kernel-toolchain kernel-toolchains kernel \ - kernels libraries native-xtools showconfig tinderbox toolchain \ + kernels libraries native-xtools showconfig test-system-compiler \ + tinderbox toolchain \ toolchains universe world worlds xdev xdev-build .ORDER: buildworld installworld Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Wed Jul 27 05:03:58 2016 (r303358) +++ stable/11/Makefile.inc1 Wed Jul 27 05:17:55 2016 (r303359) @@ -80,50 +80,68 @@ MK_CROSS_COMPILER= no .include "share/mk/src.opts.mk" # Check if there is a local compiler that can satisfy as an external compiler. -.if ${MK_SYSTEM_COMPILER} == "yes" && ${MK_CROSS_COMPILER} == "yes" && \ - (${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \ - !make(showconfig) && !make(native-xtools) && !make(xdev*) # Which compiler is expected to be used? .if ${MK_CLANG_BOOTSTRAP} == "yes" -_expected_compiler_type= clang +WANT_COMPILER_TYPE= clang .elif ${MK_GCC_BOOTSTRAP} == "yes" -_expected_compiler_type= gcc +WANT_COMPILER_TYPE= gcc +.else +WANT_COMPILER_TYPE= .endif -# If the expected vs CC is different then we can't skip. -# GCC cannot be used for cross-arch yet. For clang we pass -target later if -# TARGET_ARCH!=MACHINE_ARCH. -.if ${_expected_compiler_type} == ${COMPILER_TYPE} && \ - (${COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) -# It needs to be the same revision as we would build for the bootstrap. -.if !defined(CROSS_COMPILER_FREEBSD_VERSION) -.if ${_expected_compiler_type} == "clang" -CROSS_COMPILER_FREEBSD_VERSION!= \ +.if !defined(WANT_COMPILER_FREEBSD_VERSION) +.if ${WANT_COMPILER_TYPE} == "clang" +WANT_COMPILER_FREEBSD_VERSION_FILE= lib/clang/freebsd_cc_version.h +WANT_COMPILER_FREEBSD_VERSION!= \ awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \ - ${SRCDIR}/lib/clang/freebsd_cc_version.h || echo unknown -CROSS_COMPILER_VERSION!= \ + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown +WANT_COMPILER_VERSION_FILE= lib/clang/include/clang/Basic/Version.inc +WANT_COMPILER_VERSION!= \ awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ - ${SRCDIR}/lib/clang/include/clang/Basic/Version.inc || echo unknown -.elif ${_expected_compiler_type} == "gcc" -CROSS_COMPILER_FREEBSD_VERSION!= \ + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE} || echo unknown +.elif ${WANT_COMPILER_TYPE} == "gcc" +WANT_COMPILER_FREEBSD_VERSION_FILE= gnu/usr.bin/cc/cc_tools/freebsd-native.h +WANT_COMPILER_FREEBSD_VERSION!= \ awk '$$2 == "FBSD_CC_VER" {printf("%d\n", $$3)}' \ - ${SRCDIR}/gnu/usr.bin/cc/cc_tools/freebsd-native.h || echo unknown -CROSS_COMPILER_VERSION!= \ + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown +WANT_COMPILER_VERSION_FILE= contrib/gcc/BASE-VER +WANT_COMPILER_VERSION!= \ awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3}' \ - ${SRCDIR}/contrib/gcc/BASE-VER || echo unknown + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE} || echo unknown .endif -.export CROSS_COMPILER_FREEBSD_VERSION CROSS_COMPILER_VERSION -.endif # !defined(CROSS_COMPILER_FREEBSD_VERSION) -.if ${COMPILER_VERSION} == ${CROSS_COMPILER_VERSION} && \ - ${COMPILER_FREEBSD_VERSION} == ${CROSS_COMPILER_FREEBSD_VERSION} +.export WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_VERSION +.endif # !defined(WANT_COMPILER_FREEBSD_VERSION) +# It needs to be the same revision as we would build for the bootstrap. +# If the expected vs CC is different then we can't skip. +# GCC cannot be used for cross-arch yet. For clang we pass -target later if +# TARGET_ARCH!=MACHINE_ARCH. +.if ${MK_SYSTEM_COMPILER} == "yes" && ${MK_CROSS_COMPILER} == "yes" && \ + (${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \ + !make(showconfig) && !make(native-xtools) && !make(xdev*) && \ + ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} && \ + (${COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ + ${COMPILER_VERSION} == ${WANT_COMPILER_VERSION} && \ + ${COMPILER_FREEBSD_VERSION} == ${WANT_COMPILER_FREEBSD_VERSION} # Everything matches, disable the bootstrap compiler. MK_CLANG_BOOTSTRAP= no MK_GCC_BOOTSTRAP= no -.if make(buildworld) +USING_SYSTEM_COMPILER= yes +.endif # ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} +USING_SYSTEM_COMPILER?= no +TEST_SYSTEM_COMPILER_VARS= \ + USING_SYSTEM_COMPILER MK_SYSTEM_COMPILER \ + MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP MK_GCC_BOOTSTRAP \ + WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \ + WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ + CC COMPILER_TYPE COMPILER_VERSION COMPILER_FREEBSD_VERSION +test-system-compiler: .PHONY +.for v in ${TEST_SYSTEM_COMPILER_VARS} + ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}" +.endfor +.if ${USING_SYSTEM_COMPILER} == "yes" && \ + (make(buildworld) || make(buildkernel) || make(kernel-toolchain) || \ + make(toolchain) || make(_cross-tools)) .info SYSTEM_COMPILER: Determined that CC=${CC} matches the source tree. Not bootstrapping a cross-compiler. .endif -.endif # ${COMPILER_VERSION} == ${CROSS_COMPILER_VERSION} -.endif # ${_expected_compiler_type} == ${COMPILER_TYPE} -.endif # ${XCC:N${CCACHE_BIN}:M/*} # For installworld need to ensure that the looked-up compiler metadata is # passed along rather than trying to run cc from the restricted From owner-svn-src-all@freebsd.org Wed Jul 27 05:38:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED50DBA6167; Wed, 27 Jul 2016 05:38:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBDE615C4; Wed, 27 Jul 2016 05:38:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R5c9n3051359; Wed, 27 Jul 2016 05:38:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R5c9tm051357; Wed, 27 Jul 2016 05:38:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607270538.u6R5c9tm051357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jul 2016 05:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303360 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 05:38:11 -0000 Author: bdrewery Date: Wed Jul 27 05:38:09 2016 New Revision: 303360 URL: https://svnweb.freebsd.org/changeset/base/303360 Log: MFC r303274: Don't disable binutils/elftoolchain bootstrapping with external compiler. Approved by: re (kib) Modified: stable/11/Makefile.inc1 stable/11/Makefile.libcompat Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Wed Jul 27 05:17:55 2016 (r303359) +++ stable/11/Makefile.inc1 Wed Jul 27 05:38:09 2016 (r303360) @@ -72,7 +72,8 @@ X${COMPILER}?= ${${COMPILER}} # If a full path to an external cross compiler is given, don't build # a cross compiler. .if ${XCC:N${CCACHE_BIN}:M/*} -MK_CROSS_COMPILER= no +MK_CLANG_BOOTSTRAP= no +MK_GCC_BOOTSTRAP= no .endif # Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. @@ -114,7 +115,7 @@ WANT_COMPILER_VERSION!= \ # If the expected vs CC is different then we can't skip. # GCC cannot be used for cross-arch yet. For clang we pass -target later if # TARGET_ARCH!=MACHINE_ARCH. -.if ${MK_SYSTEM_COMPILER} == "yes" && ${MK_CROSS_COMPILER} == "yes" && \ +.if ${MK_SYSTEM_COMPILER} == "yes" && \ (${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \ !make(showconfig) && !make(native-xtools) && !make(xdev*) && \ ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} && \ @@ -548,8 +549,7 @@ BFLAGS+= -B${CROSS_BINUTILS_PREFIX} .endif # External compiler needs sysroot and target flags. -.if ${MK_CROSS_COMPILER} == "no" || \ - (${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no") +.if ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no" .if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX}) BFLAGS+= -B${WORLDTMP}/usr/bin .endif @@ -577,7 +577,7 @@ TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x8 XCFLAGS+= -target ${TARGET_TRIPLE} .endif XCFLAGS+= --sysroot=${WORLDTMP} -.endif # ${MK_CROSS_COMPILER} == "no" +.endif # ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no" .if !empty(BFLAGS) XCFLAGS+= ${BFLAGS} @@ -1818,7 +1818,6 @@ _elftctools= lib/libelftc \ usr.bin/elfcopy .endif -.if ${MK_CROSS_COMPILER} != "no" .if ${MK_CLANG_BOOTSTRAP} != "no" _clang= usr.bin/clang _clang_libs= lib/clang @@ -1826,7 +1825,6 @@ _clang_libs= lib/clang .if ${MK_GCC_BOOTSTRAP} != "no" _cc= gnu/usr.bin/cc .endif -.endif .if ${MK_USB} != "no" _usb_tools= sys/boot/usb/tools .endif Modified: stable/11/Makefile.libcompat ============================================================================== --- stable/11/Makefile.libcompat Wed Jul 27 05:17:55 2016 (r303359) +++ stable/11/Makefile.libcompat Wed Jul 27 05:38:09 2016 (r303360) @@ -81,8 +81,8 @@ LIBCOMPATCFLAGS+= -B${LIBCOMPATTMP}/usr/ LIBCOMPATCFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include # Force using libc++ for external GCC. # XXX: This should be checking MK_GNUCXX == no -.if ${X_COMPILER_VERSION} >= 40800 && (${MK_CROSS_COMPILER} == "no" || \ - (${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no")) +.if ${X_COMPILER_VERSION} >= 40800 && \ + (${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no") LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \ -nostdinc++ -L${LIBCOMPAT_OBJTREE}${.CURDIR}/lib/libc++ .endif From owner-svn-src-all@freebsd.org Wed Jul 27 05:47:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 233BEBA6367; Wed, 27 Jul 2016 05:47:34 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00EFD1AE6; Wed, 27 Jul 2016 05:47:33 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R5lXGt055237; Wed, 27 Jul 2016 05:47:33 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R5lXNW055234; Wed, 27 Jul 2016 05:47:33 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607270547.u6R5lXNW055234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 27 Jul 2016 05:47:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303361 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 05:47:34 -0000 Author: sephe Date: Wed Jul 27 05:47:32 2016 New Revision: 303361 URL: https://svnweb.freebsd.org/changeset/base/303361 Log: hyperv/vmbus: Initialize RX/TX bufring mutex at channel creation time MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7312 Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c head/sys/dev/hyperv/vmbus/vmbus_brvar.h head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Wed Jul 27 05:38:09 2016 (r303360) +++ head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Wed Jul 27 05:47:32 2016 (r303361) @@ -198,20 +198,24 @@ hv_ring_buffer_needsig_on_write(uint32_t /** * @brief Initialize the ring buffer. */ -int +void hv_vmbus_ring_buffer_init(hv_vmbus_ring_buffer_info *ring_info, void *buffer, uint32_t buffer_len) { - memset(ring_info, 0, sizeof(hv_vmbus_ring_buffer_info)); - ring_info->ring_buffer = buffer; - ring_info->ring_buffer->br_rindex = 0; - ring_info->ring_buffer->br_windex = 0; - ring_info->ring_data_size = buffer_len - sizeof(struct vmbus_bufring); - mtx_init(&ring_info->ring_lock, "vmbus ring buffer", NULL, MTX_SPIN); +} - return (0); +void +vmbus_br_init(hv_vmbus_ring_buffer_info *ring_info) +{ + mtx_init(&ring_info->ring_lock, "vmbus_br", NULL, MTX_SPIN); +} + +void +vmbus_br_deinit(hv_vmbus_ring_buffer_info *ring_info) +{ + mtx_destroy(&ring_info->ring_lock); } /** @@ -220,7 +224,7 @@ hv_vmbus_ring_buffer_init(hv_vmbus_ring_ void hv_ring_buffer_cleanup(hv_vmbus_ring_buffer_info *ring_info) { - mtx_destroy(&ring_info->ring_lock); + /* Do nothing */ } /** Modified: head/sys/dev/hyperv/vmbus/vmbus_brvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_brvar.h Wed Jul 27 05:38:09 2016 (r303360) +++ head/sys/dev/hyperv/vmbus/vmbus_brvar.h Wed Jul 27 05:47:32 2016 (r303361) @@ -49,11 +49,13 @@ void vmbus_br_sysctl_create(struct sysct struct sysctl_oid *br_tree, hv_vmbus_ring_buffer_info *br, const char *name); -int hv_vmbus_ring_buffer_init( +void vmbus_br_init(hv_vmbus_ring_buffer_info *ring_info); +void vmbus_br_deinit(hv_vmbus_ring_buffer_info *ring_info); + +void hv_vmbus_ring_buffer_init( hv_vmbus_ring_buffer_info *ring_info, void *buffer, uint32_t buffer_len); - void hv_ring_buffer_cleanup( hv_vmbus_ring_buffer_info *ring_info); Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Jul 27 05:38:09 2016 (r303360) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Jul 27 05:47:32 2016 (r303361) @@ -914,6 +914,8 @@ vmbus_chan_alloc(struct vmbus_softc *sc) mtx_init(&chan->ch_subchan_lock, "vmbus subchan", NULL, MTX_DEF); TAILQ_INIT(&chan->ch_subchans); TASK_INIT(&chan->ch_detach_task, 0, vmbus_chan_detach_task, chan); + vmbus_br_init(&chan->ch_rxbr); + vmbus_br_init(&chan->ch_txbr); return chan; } @@ -926,6 +928,8 @@ vmbus_chan_free(struct vmbus_channel *ch /* TODO: asset no longer on the vmbus channel list */ hyperv_dmamem_free(&chan->ch_monprm_dma, chan->ch_monprm); mtx_destroy(&chan->ch_subchan_lock); + vmbus_br_deinit(&chan->ch_rxbr); + vmbus_br_deinit(&chan->ch_txbr); free(chan, M_DEVBUF); } From owner-svn-src-all@freebsd.org Wed Jul 27 06:12:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBB79BA6831; Wed, 27 Jul 2016 06:12:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (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 889C81672; Wed, 27 Jul 2016 06:12:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id h186so1222339pfg.2; Tue, 26 Jul 2016 23:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=QWQv/oqB9P9b9Dyvyk4WRFWEJjasJrpk5qViZa2Kehg=; b=BbC1ZwJTc7peRRkcWKOOdcA2V/etgIKUl5MiZgupRDzCksbxWy0HdPiQr1lmlLvYhW 2J+MWzeW5R+RYb4ruEio8mtk/LfRh1/U3Q9NDnm/vMXJ4vsnozBb4/eISu3YE9DJ2sp1 oL6yM4N3ikHY9uATPtc7EnIZNkFlLr92yOyFA9B8rTyzYRAlVdc9jkTUtO4yazqdhJRS vvvQmmH1aFpN4cyQt8eqGGa8v8aPknvhOip5IKoFiC3HpLw39nIBd8vKQxy6qbo+zw3S IE2ESu6dne677MjP0EP5wTIooksn9zETQEoe1SInlxiGrEUWGK83xOQZ0jv32Podb3qc kLGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=QWQv/oqB9P9b9Dyvyk4WRFWEJjasJrpk5qViZa2Kehg=; b=UVFN+aNxX88rALDtI0VxxVkZ55/54Ga1kJAqt/Bsl3qVS7Mu1+Jt8eBtAuWp+V6ham 2aFvqaYnF52DRyfxEpkZH3+gpjX//9qxLdV/Hezw2vn+RSEWLUXChhUMbKnbZFeF0FPj 88rONFPRXyq3JOt9zy4UGptqa7J24J4DRiAQrzzsR0+9JobimPCthMuYjeAnY2xRq/XM CcYC4QyV81OxFaA/LhbjJ9r7Qn26zvu9rGGVBfvgggMT5g/N4rEM12oOvpErilZXYcXQ FhSrrzALT2ArMtsZe2FcdJy29+8N/+jToXbgObMRg5TyM4h94ZCfWuWaVNfaYNzFAxmy 3dFw== X-Gm-Message-State: AEkoouv7r9GeSPi+XJTvw9K82V4Q7LqazCk4Ld92fvE1HvM+/5sgjoyhy2m1FhEN/iTMXg== X-Received: by 10.98.133.10 with SMTP id u10mr29236710pfd.134.1469599929996; Tue, 26 Jul 2016 23:12:09 -0700 (PDT) Received: from [10.236.47.233] ([73.109.56.213]) by smtp.gmail.com with ESMTPSA id ee3sm5662799pac.25.2016.07.26.23.12.08 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Jul 2016 23:12:09 -0700 (PDT) Subject: Re: svn commit: r303047 - head/usr.bin/sed Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4D8CC49C-8E44-4867-99F2-E41CFAF2DDC0"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <8816e889-4e10-e936-2cdc-78e7243648c6@FreeBSD.org> Date: Tue, 26 Jul 2016 23:12:07 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201607192256.u6JMuewv007503@repo.freebsd.org> <1F81EA99-0498-4B8E-996A-D330EE6D770D@gmail.com> <8816e889-4e10-e936-2cdc-78e7243648c6@FreeBSD.org> To: Pedro Giffuni X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 06:12:10 -0000 --Apple-Mail=_4D8CC49C-8E44-4867-99F2-E41CFAF2DDC0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 > On Jul 26, 2016, at 21:33, Pedro Giffuni wrote: >=20 >=20 >=20 > On 07/26/16 22:19, Ngie Cooper (yaneurabeya) wrote: >>=20 >>> On Jul 19, 2016, at 15:56, Pedro F. Giffuni wrote: >>>=20 >>> Author: pfg >>> Date: Tue Jul 19 22:56:40 2016 >>> New Revision: 303047 >>> URL: https://svnweb.freebsd.org/changeset/base/303047 >>>=20 >>> Log: >>> sed(1): Assorted cleanups and simplifications. >>>=20 >>> Const-ify several variables, make it build cleanly with WARNS level = 5. >>>=20 >>> Submitted by: mi >>> PR: 195929 >>> MFC after: 1 month >>>=20 >>> Modified: >>> head/usr.bin/sed/Makefile >>> head/usr.bin/sed/compile.c >>> head/usr.bin/sed/defs.h >>> head/usr.bin/sed/extern.h >>> head/usr.bin/sed/main.c >>> head/usr.bin/sed/misc.c >>> head/usr.bin/sed/process.c >>=20 >> This breaks the etcupdate tests: = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211399 . >> Thanks, >=20 > I am OK with reverting but I would like more details. Is there a way = to > get a diff between the pass vs. failing tests? I added more info to the bug. It looks like it=92s swallowing a newline = with the www group/password entry when used with /i. Thanks, -Ngie --Apple-Mail=_4D8CC49C-8E44-4867-99F2-E41CFAF2DDC0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJXmFC3AAoJEPWDqSZpMIYVI/IQAM3Qyh1WZH5S+es3qUb1S5Qh cq/xaREFIB2zrs7cSsygq74Tsgeg/QTms1BnZa35mFwp8JULdSGS7XfdOi5IExvq jnnZ3xdy+uq8J269UZYNQ7NEPsBEM4KBSrzJ8go+oQ9t/ok8Xcjfr4lSyZYhbvOm elmwmCwnBIuzK2a3QS/yphFOMxoscADXQqJCiwewn7Ch38gW0m9qfG6yQtZfdItF G+6qgIvqRtUy2VwUjJrepmfF0p3/3v1Whz8hutPYcTx31GH9yzZ4j8BheWMse+1m WqL/nDTQlDx5yeWZj8UywXjF7LZdhwiC8tDM8242LcEylOXgdG6fVBG00m7gWJ3d N+f4r+30koOY5Eyifb766VZTGMTaViL0qplMpHHjk/e+DsWw7MINtiWIyJiyKm/t 1BbyCFnB0xb90/6rLgxlr8WJxpXzla54ZP0WdU7Agpg1xRgRm7c7aRoyS+uScj5D 7reOc1kKogLNTIRLb6AWG2EEptGXwpsWhciaz+45RULQ5ZTCFhOW89f2f7OvM+C4 k+HZL7ranaMO95p+CVx9v0Opl+91snxtDALeFP+iiNUNBnGLqBgFcYFJH33Eum3K HbTGwnTnNY42noWsr+DiEeRGcHii3aXN5Ko8cL39J1KustCfjDN8ig8tSCcy0zfs 7NvpY5Ez4qxbXstzFtJ/ =TTXK -----END PGP SIGNATURE----- --Apple-Mail=_4D8CC49C-8E44-4867-99F2-E41CFAF2DDC0-- From owner-svn-src-all@freebsd.org Wed Jul 27 06:17:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 975D2BA6926; Wed, 27 Jul 2016 06:17:21 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 672821989; Wed, 27 Jul 2016 06:17:21 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R6HKg8066262; Wed, 27 Jul 2016 06:17:20 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R6HKoT066258; Wed, 27 Jul 2016 06:17:20 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607270617.u6R6HKoT066258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 27 Jul 2016 06:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303362 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 06:17:21 -0000 Author: sephe Date: Wed Jul 27 06:17:20 2016 New Revision: 303362 URL: https://svnweb.freebsd.org/changeset/base/303362 Log: hyperv/vmbus: Use different struct for RX/TX bufring. So that they can use suitable MP synchronization mechanism. While I'm here change the bufring init/read/write function names. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7313 Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c head/sys/dev/hyperv/vmbus/vmbus_brvar.h head/sys/dev/hyperv/vmbus/vmbus_chan.c head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Wed Jul 27 05:47:32 2016 (r303361) +++ head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Wed Jul 27 06:17:20 2016 (r303362) @@ -34,32 +34,32 @@ #include #include -/* Amount of space to write to */ -#define HV_BYTES_AVAIL_TO_WRITE(r, w, z) \ - ((w) >= (r)) ? ((z) - ((w) - (r))) : ((r) - (w)) +/* Amount of space available for write */ +#define VMBUS_BR_WAVAIL(r, w, z) \ + (((w) >= (r)) ? ((z) - ((w) - (r))) : ((r) - (w))) -static uint32_t copy_to_ring_buffer(hv_vmbus_ring_buffer_info *ring_info, +static uint32_t copy_to_ring_buffer(const struct vmbus_txbr *tbr, uint32_t start_write_offset, const uint8_t *src, uint32_t src_len); -static uint32_t copy_from_ring_buffer(hv_vmbus_ring_buffer_info *ring_info, +static uint32_t copy_from_ring_buffer(const struct vmbus_rxbr *rbr, char *dest, uint32_t dest_len, uint32_t start_read_offset); static int vmbus_br_sysctl_state(SYSCTL_HANDLER_ARGS) { - const hv_vmbus_ring_buffer_info *br = arg1; - uint32_t rindex, windex, intr_mask, ravail, wavail; + const struct vmbus_br *br = arg1; + uint32_t rindex, windex, imask, ravail, wavail; char state[256]; - rindex = br->ring_buffer->br_rindex; - windex = br->ring_buffer->br_windex; - intr_mask = br->ring_buffer->br_imask; - wavail = HV_BYTES_AVAIL_TO_WRITE(rindex, windex, br->ring_data_size); - ravail = br->ring_data_size - wavail; + rindex = br->vbr_rindex; + windex = br->vbr_windex; + imask = br->vbr_imask; + wavail = VMBUS_BR_WAVAIL(rindex, windex, br->vbr_dsize); + ravail = br->vbr_dsize - wavail; snprintf(state, sizeof(state), - "rindex:%u windex:%u intr_mask:%u ravail:%u wavail:%u", - rindex, windex, intr_mask, ravail, wavail); + "rindex:%u windex:%u imask:%u ravail:%u wavail:%u", + rindex, windex, imask, ravail, wavail); return sysctl_handle_string(oidp, state, sizeof(state), req); } @@ -76,25 +76,25 @@ vmbus_br_sysctl_state_bin(SYSCTL_HANDLER #define BR_STATE_WSPC 4 #define BR_STATE_MAX 5 - const hv_vmbus_ring_buffer_info *br = arg1; + const struct vmbus_br *br = arg1; uint32_t rindex, windex, wavail, state[BR_STATE_MAX]; - rindex = br->ring_buffer->br_rindex; - windex = br->ring_buffer->br_windex; - wavail = HV_BYTES_AVAIL_TO_WRITE(rindex, windex, br->ring_data_size); + rindex = br->vbr_rindex; + windex = br->vbr_windex; + wavail = VMBUS_BR_WAVAIL(rindex, windex, br->vbr_dsize); state[BR_STATE_RIDX] = rindex; state[BR_STATE_WIDX] = windex; - state[BR_STATE_IMSK] = br->ring_buffer->br_imask; + state[BR_STATE_IMSK] = br->vbr_imask; state[BR_STATE_WSPC] = wavail; - state[BR_STATE_RSPC] = br->ring_data_size - wavail; + state[BR_STATE_RSPC] = br->vbr_dsize - wavail; return sysctl_handle_opaque(oidp, state, sizeof(state), req); } void vmbus_br_sysctl_create(struct sysctl_ctx_list *ctx, struct sysctl_oid *br_tree, - hv_vmbus_ring_buffer_info *br, const char *name) + struct vmbus_br *br, const char *name) { struct sysctl_oid *tree; char desc[64]; @@ -115,40 +115,30 @@ vmbus_br_sysctl_create(struct sysctl_ctx br, 0, vmbus_br_sysctl_state_bin, "IU", desc); } -/** - * @brief Get number of bytes available to read and to write to - * for the specified ring buffer - */ -static __inline void -get_ring_buffer_avail_bytes(hv_vmbus_ring_buffer_info *rbi, uint32_t *read, - uint32_t *write) +void +vmbus_rxbr_intr_mask(struct vmbus_rxbr *rbr) { - uint32_t read_loc, write_loc; - - /* - * Capture the read/write indices before they changed - */ - read_loc = rbi->ring_buffer->br_rindex; - write_loc = rbi->ring_buffer->br_windex; - - *write = HV_BYTES_AVAIL_TO_WRITE(read_loc, write_loc, - rbi->ring_data_size); - *read = rbi->ring_data_size - *write; + rbr->rxbr_imask = 1; + mb(); } -void -hv_ring_buffer_read_begin(hv_vmbus_ring_buffer_info *ring_info) +static __inline uint32_t +vmbus_rxbr_avail(const struct vmbus_rxbr *rbr) { - ring_info->ring_buffer->br_imask = 1; - mb(); + uint32_t rindex, windex; + + /* Get snapshot */ + rindex = rbr->rxbr_rindex; + windex = rbr->rxbr_windex; + + return (rbr->rxbr_dsize - + VMBUS_BR_WAVAIL(rindex, windex, rbr->rxbr_dsize)); } uint32_t -hv_ring_buffer_read_end(hv_vmbus_ring_buffer_info *ring_info) +vmbus_rxbr_intr_unmask(struct vmbus_rxbr *rbr) { - uint32_t read, write; - - ring_info->ring_buffer->br_imask = 0; + rbr->rxbr_imask = 0; mb(); /* @@ -156,8 +146,7 @@ hv_ring_buffer_read_end(hv_vmbus_ring_bu * If it is not, we raced and we need to process new * incoming messages. */ - get_ring_buffer_avail_bytes(ring_info, &read, &write); - return (read); + return vmbus_rxbr_avail(rbr); } /* @@ -177,10 +166,10 @@ hv_ring_buffer_read_end(hv_vmbus_ring_bu */ static boolean_t hv_ring_buffer_needsig_on_write(uint32_t old_write_location, - hv_vmbus_ring_buffer_info *rbi) + const struct vmbus_txbr *tbr) { mb(); - if (rbi->ring_buffer->br_imask) + if (tbr->txbr_imask) return (FALSE); /* Read memory barrier */ @@ -189,54 +178,73 @@ hv_ring_buffer_needsig_on_write(uint32_t * This is the only case we need to signal when the * ring transitions from being empty to non-empty. */ - if (old_write_location == rbi->ring_buffer->br_rindex) + if (old_write_location == tbr->txbr_rindex) return (TRUE); return (FALSE); } -/** - * @brief Initialize the ring buffer. - */ +static void +vmbus_br_setup(struct vmbus_br *br, void *buf, int blen) +{ + br->vbr = buf; + br->vbr_dsize = blen - sizeof(struct vmbus_bufring); +} + void -hv_vmbus_ring_buffer_init(hv_vmbus_ring_buffer_info *ring_info, void *buffer, - uint32_t buffer_len) +vmbus_rxbr_init(struct vmbus_rxbr *rbr) { - ring_info->ring_buffer = buffer; - ring_info->ring_data_size = buffer_len - sizeof(struct vmbus_bufring); + mtx_init(&rbr->rxbr_lock, "vmbus_rxbr", NULL, MTX_SPIN); } void -vmbus_br_init(hv_vmbus_ring_buffer_info *ring_info) +vmbus_rxbr_deinit(struct vmbus_rxbr *rbr) { - mtx_init(&ring_info->ring_lock, "vmbus_br", NULL, MTX_SPIN); + mtx_destroy(&rbr->rxbr_lock); } void -vmbus_br_deinit(hv_vmbus_ring_buffer_info *ring_info) +vmbus_rxbr_setup(struct vmbus_rxbr *rbr, void *buf, int blen) { - mtx_destroy(&ring_info->ring_lock); + vmbus_br_setup(&rbr->rxbr, buf, blen); } -/** - * @brief Cleanup the ring buffer. - */ void -hv_ring_buffer_cleanup(hv_vmbus_ring_buffer_info *ring_info) +vmbus_txbr_init(struct vmbus_txbr *tbr) { - /* Do nothing */ + mtx_init(&tbr->txbr_lock, "vmbus_txbr", NULL, MTX_SPIN); +} + +void +vmbus_txbr_deinit(struct vmbus_txbr *tbr) +{ + mtx_destroy(&tbr->txbr_lock); +} + +void +vmbus_txbr_setup(struct vmbus_txbr *tbr, void *buf, int blen) +{ + vmbus_br_setup(&tbr->txbr, buf, blen); +} + +static __inline uint32_t +vmbus_txbr_avail(const struct vmbus_txbr *tbr) +{ + uint32_t rindex, windex; + + /* Get snapshot */ + rindex = tbr->txbr_rindex; + windex = tbr->txbr_windex; + + return VMBUS_BR_WAVAIL(rindex, windex, tbr->txbr_dsize); } -/** - * @brief Write to the ring buffer. - */ int -hv_ring_buffer_write(hv_vmbus_ring_buffer_info *out_ring_info, - const struct iovec iov[], uint32_t iovlen, boolean_t *need_sig) +vmbus_txbr_write(struct vmbus_txbr *tbr, const struct iovec iov[], int iovlen, + boolean_t *need_sig) { int i = 0; uint32_t byte_avail_to_write; - uint32_t byte_avail_to_read; uint32_t old_write_location; uint32_t total_bytes_to_write = 0; volatile uint32_t next_write_location; @@ -247,10 +255,9 @@ hv_ring_buffer_write(hv_vmbus_ring_buffe total_bytes_to_write += sizeof(uint64_t); - mtx_lock_spin(&out_ring_info->ring_lock); + mtx_lock_spin(&tbr->txbr_lock); - get_ring_buffer_avail_bytes(out_ring_info, &byte_avail_to_read, - &byte_avail_to_write); + byte_avail_to_write = vmbus_txbr_avail(tbr); /* * If there is only room for the packet, assume it is full. @@ -258,28 +265,28 @@ hv_ring_buffer_write(hv_vmbus_ring_buffe * is empty since the read index == write index */ if (byte_avail_to_write <= total_bytes_to_write) { - mtx_unlock_spin(&out_ring_info->ring_lock); + mtx_unlock_spin(&tbr->txbr_lock); return (EAGAIN); } /* * Write to the ring buffer */ - next_write_location = out_ring_info->ring_buffer->br_windex; + next_write_location = tbr->txbr_windex; old_write_location = next_write_location; for (i = 0; i < iovlen; i++) { - next_write_location = copy_to_ring_buffer(out_ring_info, + next_write_location = copy_to_ring_buffer(tbr, next_write_location, iov[i].iov_base, iov[i].iov_len); } /* * Set previous packet start */ - prev_indices = ((uint64_t)out_ring_info->ring_buffer->br_windex) << 32; + prev_indices = ((uint64_t)tbr->txbr_windex) << 32; - next_write_location = copy_to_ring_buffer(out_ring_info, + next_write_location = copy_to_ring_buffer(tbr, next_write_location, (char *)&prev_indices, sizeof(uint64_t)); /* @@ -290,88 +297,73 @@ hv_ring_buffer_write(hv_vmbus_ring_buffe /* * Now, update the write location */ - out_ring_info->ring_buffer->br_windex = next_write_location; + tbr->txbr_windex = next_write_location; - mtx_unlock_spin(&out_ring_info->ring_lock); + mtx_unlock_spin(&tbr->txbr_lock); - *need_sig = hv_ring_buffer_needsig_on_write(old_write_location, - out_ring_info); + *need_sig = hv_ring_buffer_needsig_on_write(old_write_location, tbr); return (0); } -/** - * @brief Read without advancing the read index. - */ int -hv_ring_buffer_peek(hv_vmbus_ring_buffer_info *in_ring_info, void *buffer, - uint32_t buffer_len) +vmbus_rxbr_peek(struct vmbus_rxbr *rbr, void *data, int dlen) { - uint32_t bytesAvailToWrite; uint32_t bytesAvailToRead; uint32_t nextReadLocation = 0; - mtx_lock_spin(&in_ring_info->ring_lock); + mtx_lock_spin(&rbr->rxbr_lock); - get_ring_buffer_avail_bytes(in_ring_info, &bytesAvailToRead, - &bytesAvailToWrite); + bytesAvailToRead = vmbus_rxbr_avail(rbr); /* * Make sure there is something to read */ - if (bytesAvailToRead < buffer_len) { - mtx_unlock_spin(&in_ring_info->ring_lock); + if (bytesAvailToRead < dlen) { + mtx_unlock_spin(&rbr->rxbr_lock); return (EAGAIN); } /* * Convert to byte offset */ - nextReadLocation = in_ring_info->ring_buffer->br_rindex; + nextReadLocation = rbr->rxbr_rindex; - nextReadLocation = copy_from_ring_buffer(in_ring_info, - (char *)buffer, buffer_len, nextReadLocation); + nextReadLocation = copy_from_ring_buffer(rbr, data, dlen, + nextReadLocation); - mtx_unlock_spin(&in_ring_info->ring_lock); + mtx_unlock_spin(&rbr->rxbr_lock); return (0); } -/** - * @brief Read and advance the read index. - */ int -hv_ring_buffer_read(hv_vmbus_ring_buffer_info *in_ring_info, void *buffer, - uint32_t buffer_len, uint32_t offset) +vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t offset) { - uint32_t bytes_avail_to_write; uint32_t bytes_avail_to_read; uint32_t next_read_location = 0; uint64_t prev_indices = 0; - if (buffer_len <= 0) - return (EINVAL); + KASSERT(dlen > 0, ("invalid dlen %d", dlen)); - mtx_lock_spin(&in_ring_info->ring_lock); + mtx_lock_spin(&rbr->rxbr_lock); - get_ring_buffer_avail_bytes(in_ring_info, &bytes_avail_to_read, - &bytes_avail_to_write); + bytes_avail_to_read = vmbus_rxbr_avail(rbr); /* * Make sure there is something to read */ - if (bytes_avail_to_read < buffer_len) { - mtx_unlock_spin(&in_ring_info->ring_lock); + if (bytes_avail_to_read < dlen) { + mtx_unlock_spin(&rbr->rxbr_lock); return (EAGAIN); } - next_read_location = (in_ring_info->ring_buffer->br_rindex + offset) % - in_ring_info->ring_data_size; + next_read_location = (rbr->rxbr_rindex + offset) % rbr->rxbr_dsize; - next_read_location = copy_from_ring_buffer(in_ring_info, (char *)buffer, - buffer_len, next_read_location); + next_read_location = copy_from_ring_buffer(rbr, data, dlen, + next_read_location); - next_read_location = copy_from_ring_buffer(in_ring_info, + next_read_location = copy_from_ring_buffer(rbr, (char *)&prev_indices, sizeof(uint64_t), next_read_location); /* @@ -384,9 +376,9 @@ hv_ring_buffer_read(hv_vmbus_ring_buffer /* * Update the read index */ - in_ring_info->ring_buffer->br_rindex = next_read_location; + rbr->rxbr_rindex = next_read_location; - mtx_unlock_spin(&in_ring_info->ring_lock); + mtx_unlock_spin(&rbr->rxbr_lock); return (0); } @@ -397,11 +389,11 @@ hv_ring_buffer_read(hv_vmbus_ring_buffer * Assume there is enough room. Handles wrap-around in dest case only! */ static uint32_t -copy_to_ring_buffer(hv_vmbus_ring_buffer_info *ring_info, +copy_to_ring_buffer(const struct vmbus_txbr *tbr, uint32_t start_write_offset, const uint8_t *src, uint32_t src_len) { - char *ring_buffer = ring_info->ring_buffer->br_data; - uint32_t ring_buffer_size = ring_info->ring_data_size; + char *ring_buffer = tbr->txbr_data; + uint32_t ring_buffer_size = tbr->txbr_dsize; uint32_t fragLen; if (src_len > ring_buffer_size - start_write_offset) { @@ -425,12 +417,12 @@ copy_to_ring_buffer(hv_vmbus_ring_buffer * Assume there is enough room. Handles wrap-around in src case only! */ static uint32_t -copy_from_ring_buffer(hv_vmbus_ring_buffer_info *ring_info, char *dest, +copy_from_ring_buffer(const struct vmbus_rxbr *rbr, char *dest, uint32_t dest_len, uint32_t start_read_offset) { uint32_t fragLen; - char *ring_buffer = ring_info->ring_buffer->br_data; - uint32_t ring_buffer_size = ring_info->ring_data_size; + char *ring_buffer = rbr->rxbr_data; + uint32_t ring_buffer_size = rbr->rxbr_dsize; if (dest_len > ring_buffer_size - start_read_offset) { /* wrap-around detected at the src */ Modified: head/sys/dev/hyperv/vmbus/vmbus_brvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_brvar.h Wed Jul 27 05:47:32 2016 (r303361) +++ head/sys/dev/hyperv/vmbus/vmbus_brvar.h Wed Jul 27 06:17:20 2016 (r303362) @@ -36,50 +36,58 @@ #include #include -typedef struct { - struct vmbus_bufring *ring_buffer; - struct mtx ring_lock; - uint32_t ring_data_size; /* ring_size */ -} hv_vmbus_ring_buffer_info; +struct vmbus_br { + struct vmbus_bufring *vbr; + uint32_t vbr_dsize; /* total data size */ +}; + +#define vbr_windex vbr->br_windex +#define vbr_rindex vbr->br_rindex +#define vbr_imask vbr->br_imask +#define vbr_data vbr->br_data + +struct vmbus_rxbr { + struct mtx rxbr_lock; + struct vmbus_br rxbr; +}; + +#define rxbr_windex rxbr.vbr_windex +#define rxbr_rindex rxbr.vbr_rindex +#define rxbr_imask rxbr.vbr_imask +#define rxbr_data rxbr.vbr_data +#define rxbr_dsize rxbr.vbr_dsize + +struct vmbus_txbr { + struct mtx txbr_lock; + struct vmbus_br txbr; +}; + +#define txbr_windex txbr.vbr_windex +#define txbr_rindex txbr.vbr_rindex +#define txbr_imask txbr.vbr_imask +#define txbr_data txbr.vbr_data +#define txbr_dsize txbr.vbr_dsize struct sysctl_ctx_list; struct sysctl_oid; -void vmbus_br_sysctl_create(struct sysctl_ctx_list *ctx, - struct sysctl_oid *br_tree, hv_vmbus_ring_buffer_info *br, - const char *name); - -void vmbus_br_init(hv_vmbus_ring_buffer_info *ring_info); -void vmbus_br_deinit(hv_vmbus_ring_buffer_info *ring_info); - -void hv_vmbus_ring_buffer_init( - hv_vmbus_ring_buffer_info *ring_info, - void *buffer, - uint32_t buffer_len); -void hv_ring_buffer_cleanup( - hv_vmbus_ring_buffer_info *ring_info); - -int hv_ring_buffer_write( - hv_vmbus_ring_buffer_info *ring_info, - const struct iovec iov[], - uint32_t iovlen, - boolean_t *need_sig); - -int hv_ring_buffer_peek( - hv_vmbus_ring_buffer_info *ring_info, - void *buffer, - uint32_t buffer_len); - -int hv_ring_buffer_read( - hv_vmbus_ring_buffer_info *ring_info, - void *buffer, - uint32_t buffer_len, - uint32_t offset); - -void hv_ring_buffer_read_begin( - hv_vmbus_ring_buffer_info *ring_info); - -uint32_t hv_ring_buffer_read_end( - hv_vmbus_ring_buffer_info *ring_info); +void vmbus_br_sysctl_create(struct sysctl_ctx_list *ctx, + struct sysctl_oid *br_tree, struct vmbus_br *br, + const char *name); + +void vmbus_rxbr_init(struct vmbus_rxbr *rbr); +void vmbus_rxbr_deinit(struct vmbus_rxbr *rbr); +void vmbus_rxbr_setup(struct vmbus_rxbr *rbr, void *buf, int blen); +int vmbus_rxbr_peek(struct vmbus_rxbr *rbr, void *data, int dlen); +int vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, + uint32_t offset); +void vmbus_rxbr_intr_mask(struct vmbus_rxbr *rbr); +uint32_t vmbus_rxbr_intr_unmask(struct vmbus_rxbr *rbr); + +void vmbus_txbr_init(struct vmbus_txbr *tbr); +void vmbus_txbr_deinit(struct vmbus_txbr *tbr); +void vmbus_txbr_setup(struct vmbus_txbr *tbr, void *buf, int blen); +int vmbus_txbr_write(struct vmbus_txbr *tbr, + const struct iovec iov[], int iovlen, boolean_t *need_sig); #endif /* _VMBUS_BRVAR_H_ */ Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Jul 27 05:47:32 2016 (r303361) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Jul 27 06:17:20 2016 (r303362) @@ -178,11 +178,11 @@ vmbus_chan_sysctl_create(struct vmbus_ch /* * Create sysctl tree for RX bufring. */ - vmbus_br_sysctl_create(ctx, br_tree, &chan->ch_rxbr, "rx"); + vmbus_br_sysctl_create(ctx, br_tree, &chan->ch_rxbr.rxbr, "rx"); /* * Create sysctl tree for TX bufring. */ - vmbus_br_sysctl_create(ctx, br_tree, &chan->ch_txbr, "tx"); + vmbus_br_sysctl_create(ctx, br_tree, &chan->ch_txbr.txbr, "tx"); } } @@ -239,9 +239,9 @@ vmbus_chan_open(struct vmbus_channel *ch chan->ch_bufring = br; /* TX bufring comes first */ - hv_vmbus_ring_buffer_init(&chan->ch_txbr, br, txbr_size); + vmbus_txbr_setup(&chan->ch_txbr, br, txbr_size); /* RX bufring immediately follows TX bufring */ - hv_vmbus_ring_buffer_init(&chan->ch_rxbr, br + txbr_size, rxbr_size); + vmbus_rxbr_setup(&chan->ch_rxbr, br + txbr_size, rxbr_size); /* Create sysctl tree for this channel */ vmbus_chan_sysctl_create(chan); @@ -549,8 +549,6 @@ vmbus_chan_close_internal(struct vmbus_c /* * Destroy the TX+RX bufrings. */ - hv_ring_buffer_cleanup(&chan->ch_txbr); - hv_ring_buffer_cleanup(&chan->ch_rxbr); if (chan->ch_bufring != NULL) { hyperv_dmamem_free(&chan->ch_bufring_dma, chan->ch_bufring); chan->ch_bufring = NULL; @@ -620,7 +618,7 @@ vmbus_chan_send(struct vmbus_channel *ch iov[2].iov_base = &pad; iov[2].iov_len = pad_pktlen - pktlen; - error = hv_ring_buffer_write(&chan->ch_txbr, iov, 3, &send_evt); + error = vmbus_txbr_write(&chan->ch_txbr, iov, 3, &send_evt); if (!error && send_evt) vmbus_chan_signal_tx(chan); return error; @@ -660,7 +658,7 @@ vmbus_chan_send_sglist(struct vmbus_chan iov[3].iov_base = &pad; iov[3].iov_len = pad_pktlen - pktlen; - error = hv_ring_buffer_write(&chan->ch_txbr, iov, 4, &send_evt); + error = vmbus_txbr_write(&chan->ch_txbr, iov, 4, &send_evt); if (!error && send_evt) vmbus_chan_signal_tx(chan); return error; @@ -702,7 +700,7 @@ vmbus_chan_send_prplist(struct vmbus_cha iov[3].iov_base = &pad; iov[3].iov_len = pad_pktlen - pktlen; - error = hv_ring_buffer_write(&chan->ch_txbr, iov, 4, &send_evt); + error = vmbus_txbr_write(&chan->ch_txbr, iov, 4, &send_evt); if (!error && send_evt) vmbus_chan_signal_tx(chan); return error; @@ -715,7 +713,7 @@ vmbus_chan_recv(struct vmbus_channel *ch struct vmbus_chanpkt_hdr pkt; int error, dlen, hlen; - error = hv_ring_buffer_peek(&chan->ch_rxbr, &pkt, sizeof(pkt)); + error = vmbus_rxbr_peek(&chan->ch_rxbr, &pkt, sizeof(pkt)); if (error) return error; @@ -732,8 +730,8 @@ vmbus_chan_recv(struct vmbus_channel *ch *dlen0 = dlen; /* Skip packet header */ - error = hv_ring_buffer_read(&chan->ch_rxbr, data, dlen, hlen); - KASSERT(!error, ("hv_ring_buffer_read failed")); + error = vmbus_rxbr_read(&chan->ch_rxbr, data, dlen, hlen); + KASSERT(!error, ("vmbus_rxbr_read failed")); return 0; } @@ -745,7 +743,7 @@ vmbus_chan_recv_pkt(struct vmbus_channel struct vmbus_chanpkt_hdr pkt; int error, pktlen; - error = hv_ring_buffer_peek(&chan->ch_rxbr, &pkt, sizeof(pkt)); + error = vmbus_rxbr_peek(&chan->ch_rxbr, &pkt, sizeof(pkt)); if (error) return error; @@ -758,8 +756,8 @@ vmbus_chan_recv_pkt(struct vmbus_channel *pktlen0 = pktlen; /* Include packet header */ - error = hv_ring_buffer_read(&chan->ch_rxbr, pkt0, pktlen, 0); - KASSERT(!error, ("hv_ring_buffer_read failed")); + error = vmbus_rxbr_read(&chan->ch_rxbr, pkt0, pktlen, 0); + KASSERT(!error, ("vmbus_rxbr_read failed")); return 0; } @@ -788,12 +786,12 @@ vmbus_chan_task(void *xchan, int pending cb(chan, cbarg); - left = hv_ring_buffer_read_end(&chan->ch_rxbr); + left = vmbus_rxbr_intr_unmask(&chan->ch_rxbr); if (left == 0) { /* No more data in RX bufring; done */ break; } - hv_ring_buffer_read_begin(&chan->ch_rxbr); + vmbus_rxbr_intr_mask(&chan->ch_rxbr); } } @@ -835,7 +833,7 @@ vmbus_event_flags_proc(struct vmbus_soft continue; if (chan->ch_flags & VMBUS_CHAN_FLAG_BATCHREAD) - hv_ring_buffer_read_begin(&chan->ch_rxbr); + vmbus_rxbr_intr_mask(&chan->ch_rxbr); taskqueue_enqueue(chan->ch_tq, &chan->ch_task); } } @@ -914,8 +912,8 @@ vmbus_chan_alloc(struct vmbus_softc *sc) mtx_init(&chan->ch_subchan_lock, "vmbus subchan", NULL, MTX_DEF); TAILQ_INIT(&chan->ch_subchans); TASK_INIT(&chan->ch_detach_task, 0, vmbus_chan_detach_task, chan); - vmbus_br_init(&chan->ch_rxbr); - vmbus_br_init(&chan->ch_txbr); + vmbus_rxbr_init(&chan->ch_rxbr); + vmbus_txbr_init(&chan->ch_txbr); return chan; } @@ -928,8 +926,8 @@ vmbus_chan_free(struct vmbus_channel *ch /* TODO: asset no longer on the vmbus channel list */ hyperv_dmamem_free(&chan->ch_monprm_dma, chan->ch_monprm); mtx_destroy(&chan->ch_subchan_lock); - vmbus_br_deinit(&chan->ch_rxbr); - vmbus_br_deinit(&chan->ch_txbr); + vmbus_rxbr_deinit(&chan->ch_rxbr); + vmbus_txbr_deinit(&chan->ch_txbr); free(chan, M_DEVBUF); } Modified: head/sys/dev/hyperv/vmbus/vmbus_chanvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Wed Jul 27 05:47:32 2016 (r303361) +++ head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Wed Jul 27 06:17:20 2016 (r303362) @@ -52,7 +52,7 @@ struct vmbus_channel { /* * RX bufring; immediately following ch_txbr. */ - hv_vmbus_ring_buffer_info ch_rxbr; + struct vmbus_rxbr ch_rxbr; struct taskqueue *ch_tq; struct task ch_task; @@ -71,7 +71,7 @@ struct vmbus_channel { * TX bufring and following MNF/evtflags do _not_ fit in * one 64B cacheline. */ - hv_vmbus_ring_buffer_info ch_txbr __aligned(CACHE_LINE_SIZE); + struct vmbus_txbr ch_txbr __aligned(CACHE_LINE_SIZE); uint32_t ch_txflags; /* VMBUS_CHAN_TXF_ */ /* From owner-svn-src-all@freebsd.org Wed Jul 27 06:29:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 121E2BA6ABF; Wed, 27 Jul 2016 06:29:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B26841E23; Wed, 27 Jul 2016 06:29:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R6TQZ7069997; Wed, 27 Jul 2016 06:29:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R6TQ79069996; Wed, 27 Jul 2016 06:29:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607270629.u6R6TQ79069996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 27 Jul 2016 06:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303363 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 06:29:28 -0000 Author: ngie Date: Wed Jul 27 06:29:26 2016 New Revision: 303363 URL: https://svnweb.freebsd.org/changeset/base/303363 Log: MFC r302842: Don't delete usr/share/local/kk_KZ.UTF-8 with "make delete-old" after r302329 kk_KZ.UTF-8 was originally removed in r290494, but restored as an alias to en_US.UTF-8 in r302329 Approved by: re (kib) PR: 211046 Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Wed Jul 27 06:29:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50B66BA6AFE; Wed, 27 Jul 2016 06:29:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 208321F74; Wed, 27 Jul 2016 06:29:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R6TfPV070063; Wed, 27 Jul 2016 06:29:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R6TfUF070062; Wed, 27 Jul 2016 06:29:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607270629.u6R6TfUF070062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 27 Jul 2016 06:29:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303364 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 06:29:42 -0000 Author: ngie Date: Wed Jul 27 06:29:41 2016 New Revision: 303364 URL: https://svnweb.freebsd.org/changeset/base/303364 Log: MFC r302842: Don't delete usr/share/local/kk_KZ.UTF-8 with "make delete-old" after r302329 kk_KZ.UTF-8 was originally removed in r290494, but restored as an alias to en_US.UTF-8 in r302329 Approved by: re (kib) PR: 211046 Modified: stable/11/ObsoleteFiles.inc Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Wed Jul 27 06:29:26 2016 (r303363) +++ stable/11/ObsoleteFiles.inc Wed Jul 27 06:29:41 2016 (r303364) @@ -460,13 +460,6 @@ OLD_FILES+=usr/share/locale/kk_KZ.PT154/ OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_NUMERIC OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_TIME OLD_DIRS+=usr/share/locale/kk_KZ.PT154/ -OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_COLLATE -OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_CTYPE -OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_MESSAGES -OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_MONETARY -OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_NUMERIC -OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_TIME -OLD_DIRS+=usr/share/locale/kk_KZ.UTF-8 OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_COLLATE OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_CTYPE OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_TIME From owner-svn-src-all@freebsd.org Wed Jul 27 06:31:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0964BA6C1D; Wed, 27 Jul 2016 06:31:41 +0000 (UTC) (envelope-from jch@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 709A11346; Wed, 27 Jul 2016 06:31:41 +0000 (UTC) (envelope-from jch@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R6VeP8070852; Wed, 27 Jul 2016 06:31:40 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R6Venc070851; Wed, 27 Jul 2016 06:31:40 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201607270631.u6R6Venc070851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Wed, 27 Jul 2016 06:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303365 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 06:31:41 -0000 Author: jch Date: Wed Jul 27 06:31:40 2016 New Revision: 303365 URL: https://svnweb.freebsd.org/changeset/base/303365 Log: MFC r273014: A connection in TIME_WAIT state before calling close() actually did not received any RST packet. Do not set error to ECONNRESET in this case. Differential Revision: https://reviews.freebsd.org/D879 Reviewed by: rpaulo, adrian Approved by: jhb (mentor) Sponsored by: Verisign, Inc. Modified: stable/10/sys/netinet/tcp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/10/sys/netinet/tcp_usrreq.c Wed Jul 27 06:29:41 2016 (r303364) +++ stable/10/sys/netinet/tcp_usrreq.c Wed Jul 27 06:31:40 2016 (r303365) @@ -625,7 +625,9 @@ tcp_usr_disconnect(struct socket *so) inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_disconnect: inp == NULL")); INP_WLOCK(inp); - if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { + if (inp->inp_flags & INP_TIMEWAIT) + goto out; + if (inp->inp_flags & INP_DROPPED) { error = ECONNRESET; goto out; } From owner-svn-src-all@freebsd.org Wed Jul 27 06:36:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 312C4BA6D78; Wed, 27 Jul 2016 06:36:59 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3E3816D3; Wed, 27 Jul 2016 06:36:58 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R6awjn073665; Wed, 27 Jul 2016 06:36:58 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R6awvA073664; Wed, 27 Jul 2016 06:36:58 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607270636.u6R6awvA073664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 27 Jul 2016 06:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303366 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 06:36:59 -0000 Author: sephe Date: Wed Jul 27 06:36:57 2016 New Revision: 303366 URL: https://svnweb.freebsd.org/changeset/base/303366 Log: hyperv/vmbus: Update comment for bufring MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7314 Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Wed Jul 27 06:31:40 2016 (r303365) +++ head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Wed Jul 27 06:36:57 2016 (r303366) @@ -144,25 +144,23 @@ vmbus_rxbr_intr_unmask(struct vmbus_rxbr /* * Now check to see if the ring buffer is still empty. * If it is not, we raced and we need to process new - * incoming messages. + * incoming channel packets. */ return vmbus_rxbr_avail(rbr); } /* - * When we write to the ring buffer, check if the host needs to - * be signaled. Here is the details of this protocol: + * When we write to the ring buffer, check if the host needs to be + * signaled. * - * 1. The host guarantees that while it is draining the - * ring buffer, it will set the interrupt_mask to - * indicate it does not need to be interrupted when - * new data is placed. - * - * 2. The host guarantees that it will completely drain - * the ring buffer before exiting the read loop. Further, - * once the ring buffer is empty, it will clear the - * interrupt_mask and re-check to see if new data has - * arrived. + * The contract: + * - The host guarantees that while it is draining the TX bufring, + * it will set the br_imask to indicate it does not need to be + * interrupted when new data are added. + * - The host guarantees that it will completely drain the TX bufring + * before exiting the read loop. Further, once the TX bufring is + * empty, it will clear the br_imask and re-check to see if new + * data have arrived. */ static boolean_t hv_ring_buffer_needsig_on_write(uint32_t old_write_location, @@ -172,8 +170,10 @@ hv_ring_buffer_needsig_on_write(uint32_t if (tbr->txbr_imask) return (FALSE); + /* XXX only compiler fence is needed */ /* Read memory barrier */ rmb(); + /* * This is the only case we need to signal when the * ring transitions from being empty to non-empty. @@ -252,7 +252,6 @@ vmbus_txbr_write(struct vmbus_txbr *tbr, for (i = 0; i < iovlen; i++) total_bytes_to_write += iov[i].iov_len; - total_bytes_to_write += sizeof(uint64_t); mtx_lock_spin(&tbr->txbr_lock); @@ -260,9 +259,11 @@ vmbus_txbr_write(struct vmbus_txbr *tbr, byte_avail_to_write = vmbus_txbr_avail(tbr); /* - * If there is only room for the packet, assume it is full. - * Otherwise, the next time around, we think the ring buffer - * is empty since the read index == write index + * NOTE: + * If this write is going to make br_windex same as br_rindex, + * i.e. the available space for write is same as the write size, + * we can't do it then, since br_windex == br_rindex means that + * the bufring is empty. */ if (byte_avail_to_write <= total_bytes_to_write) { mtx_unlock_spin(&tbr->txbr_lock); @@ -270,7 +271,7 @@ vmbus_txbr_write(struct vmbus_txbr *tbr, } /* - * Write to the ring buffer + * Copy the scattered channel packet to the TX bufring. */ next_write_location = tbr->txbr_windex; @@ -282,20 +283,20 @@ vmbus_txbr_write(struct vmbus_txbr *tbr, } /* - * Set previous packet start + * Set the offset of the current channel packet. */ prev_indices = ((uint64_t)tbr->txbr_windex) << 32; - next_write_location = copy_to_ring_buffer(tbr, next_write_location, (char *)&prev_indices, sizeof(uint64_t)); /* + * XXX only compiler fence is needed. * Full memory barrier before upding the write index. */ mb(); /* - * Now, update the write location + * Now, update the write index. */ tbr->txbr_windex = next_write_location; @@ -315,20 +316,12 @@ vmbus_rxbr_peek(struct vmbus_rxbr *rbr, mtx_lock_spin(&rbr->rxbr_lock); bytesAvailToRead = vmbus_rxbr_avail(rbr); - - /* - * Make sure there is something to read - */ if (bytesAvailToRead < dlen) { mtx_unlock_spin(&rbr->rxbr_lock); return (EAGAIN); } - /* - * Convert to byte offset - */ nextReadLocation = rbr->rxbr_rindex; - nextReadLocation = copy_from_ring_buffer(rbr, data, dlen, nextReadLocation); @@ -349,24 +342,27 @@ vmbus_rxbr_read(struct vmbus_rxbr *rbr, mtx_lock_spin(&rbr->rxbr_lock); bytes_avail_to_read = vmbus_rxbr_avail(rbr); - - /* - * Make sure there is something to read - */ if (bytes_avail_to_read < dlen) { mtx_unlock_spin(&rbr->rxbr_lock); return (EAGAIN); } + /* + * Copy channel packet from RX bufring. + */ next_read_location = (rbr->rxbr_rindex + offset) % rbr->rxbr_dsize; - next_read_location = copy_from_ring_buffer(rbr, data, dlen, next_read_location); + /* + * Discard this channel packet's start offset, which is useless + * for us. + */ next_read_location = copy_from_ring_buffer(rbr, (char *)&prev_indices, sizeof(uint64_t), next_read_location); /* + * XXX only compiler fence is needed. * Make sure all reads are done before we update the read index since * the writer may start writing to the read area once the read index * is updated. @@ -383,11 +379,6 @@ vmbus_rxbr_read(struct vmbus_rxbr *rbr, return (0); } -/** - * @brief Helper routine to copy from source to ring buffer. - * - * Assume there is enough room. Handles wrap-around in dest case only! - */ static uint32_t copy_to_ring_buffer(const struct vmbus_txbr *tbr, uint32_t start_write_offset, const uint8_t *src, uint32_t src_len) @@ -397,7 +388,7 @@ copy_to_ring_buffer(const struct vmbus_t uint32_t fragLen; if (src_len > ring_buffer_size - start_write_offset) { - /* wrap-around detected! */ + /* Wrap-around detected! */ fragLen = ring_buffer_size - start_write_offset; memcpy(ring_buffer + start_write_offset, src, fragLen); memcpy(ring_buffer, src + fragLen, src_len - fragLen); @@ -411,11 +402,6 @@ copy_to_ring_buffer(const struct vmbus_t return (start_write_offset); } -/** - * @brief Helper routine to copy to source from ring buffer. - * - * Assume there is enough room. Handles wrap-around in src case only! - */ static uint32_t copy_from_ring_buffer(const struct vmbus_rxbr *rbr, char *dest, uint32_t dest_len, uint32_t start_read_offset) @@ -425,7 +411,7 @@ copy_from_ring_buffer(const struct vmbus uint32_t ring_buffer_size = rbr->rxbr_dsize; if (dest_len > ring_buffer_size - start_read_offset) { - /* wrap-around detected at the src */ + /* Wrap-around detected at the src */ fragLen = ring_buffer_size - start_read_offset; memcpy(dest, ring_buffer + start_read_offset, fragLen); memcpy(dest + fragLen, ring_buffer, dest_len - fragLen); From owner-svn-src-all@freebsd.org Wed Jul 27 06:49:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F89FBA5212; Wed, 27 Jul 2016 06:49:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6069C1E52; Wed, 27 Jul 2016 06:49:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R6nGCq077367; Wed, 27 Jul 2016 06:49:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R6nG87077366; Wed, 27 Jul 2016 06:49:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607270649.u6R6nG87077366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 27 Jul 2016 06:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303367 - head/usr.bin/sed/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 06:49:17 -0000 Author: ngie Date: Wed Jul 27 06:49:16 2016 New Revision: 303367 URL: https://svnweb.freebsd.org/changeset/base/303367 Log: Testcase 7.8 no longer needs to be marked TODO It passes out of the box today MFC after: 2 months Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/sed/tests/multi_test.sh Modified: head/usr.bin/sed/tests/multi_test.sh ============================================================================== --- head/usr.bin/sed/tests/multi_test.sh Wed Jul 27 06:36:57 2016 (r303366) +++ head/usr.bin/sed/tests/multi_test.sh Wed Jul 27 06:49:16 2016 (r303367) @@ -383,7 +383,6 @@ test_print() mark '7.8' echo line1 > lines3 echo "" >> lines3 - TODO=1 $SED -n -e '$p' lines3 /dev/null } From owner-svn-src-all@freebsd.org Wed Jul 27 06:52:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 904CBBA53EE; Wed, 27 Jul 2016 06:52:44 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51C0B1362; Wed, 27 Jul 2016 06:52:44 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R6qhna080750; Wed, 27 Jul 2016 06:52:43 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R6qht5080749; Wed, 27 Jul 2016 06:52:43 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607270652.u6R6qht5080749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 27 Jul 2016 06:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303368 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 06:52:44 -0000 Author: sephe Date: Wed Jul 27 06:52:43 2016 New Revision: 303368 URL: https://svnweb.freebsd.org/changeset/base/303368 Log: hyperv/vmbus: Cleanup TX bufring write process. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7315 Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Wed Jul 27 06:49:16 2016 (r303367) +++ head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Wed Jul 27 06:52:43 2016 (r303368) @@ -38,9 +38,6 @@ #define VMBUS_BR_WAVAIL(r, w, z) \ (((w) >= (r)) ? ((z) - ((w) - (r))) : ((r) - (w))) -static uint32_t copy_to_ring_buffer(const struct vmbus_txbr *tbr, - uint32_t start_write_offset, const uint8_t *src, - uint32_t src_len); static uint32_t copy_from_ring_buffer(const struct vmbus_rxbr *rbr, char *dest, uint32_t dest_len, uint32_t start_read_offset); @@ -149,41 +146,6 @@ vmbus_rxbr_intr_unmask(struct vmbus_rxbr return vmbus_rxbr_avail(rbr); } -/* - * When we write to the ring buffer, check if the host needs to be - * signaled. - * - * The contract: - * - The host guarantees that while it is draining the TX bufring, - * it will set the br_imask to indicate it does not need to be - * interrupted when new data are added. - * - The host guarantees that it will completely drain the TX bufring - * before exiting the read loop. Further, once the TX bufring is - * empty, it will clear the br_imask and re-check to see if new - * data have arrived. - */ -static boolean_t -hv_ring_buffer_needsig_on_write(uint32_t old_write_location, - const struct vmbus_txbr *tbr) -{ - mb(); - if (tbr->txbr_imask) - return (FALSE); - - /* XXX only compiler fence is needed */ - /* Read memory barrier */ - rmb(); - - /* - * This is the only case we need to signal when the - * ring transitions from being empty to non-empty. - */ - if (old_write_location == tbr->txbr_rindex) - return (TRUE); - - return (FALSE); -} - static void vmbus_br_setup(struct vmbus_br *br, void *buf, int blen) { @@ -227,6 +189,40 @@ vmbus_txbr_setup(struct vmbus_txbr *tbr, vmbus_br_setup(&tbr->txbr, buf, blen); } +/* + * When we write to the ring buffer, check if the host needs to be + * signaled. + * + * The contract: + * - The host guarantees that while it is draining the TX bufring, + * it will set the br_imask to indicate it does not need to be + * interrupted when new data are added. + * - The host guarantees that it will completely drain the TX bufring + * before exiting the read loop. Further, once the TX bufring is + * empty, it will clear the br_imask and re-check to see if new + * data have arrived. + */ +static __inline boolean_t +vmbus_txbr_need_signal(const struct vmbus_txbr *tbr, uint32_t old_windex) +{ + mb(); + if (tbr->txbr_imask) + return (FALSE); + + /* XXX only compiler fence is needed */ + /* Read memory barrier */ + rmb(); + + /* + * This is the only case we need to signal when the + * ring transitions from being empty to non-empty. + */ + if (old_windex == tbr->txbr_rindex) + return (TRUE); + + return (FALSE); +} + static __inline uint32_t vmbus_txbr_avail(const struct vmbus_txbr *tbr) { @@ -239,25 +235,52 @@ vmbus_txbr_avail(const struct vmbus_txbr return VMBUS_BR_WAVAIL(rindex, windex, tbr->txbr_dsize); } +static __inline uint32_t +vmbus_txbr_copyto(const struct vmbus_txbr *tbr, uint32_t windex, + const void *src0, uint32_t cplen) +{ + const uint8_t *src = src0; + uint8_t *br_data = tbr->txbr_data; + uint32_t br_dsize = tbr->txbr_dsize; + + if (cplen > br_dsize - windex) { + uint32_t fraglen; + + /* Wrap-around detected! */ + fraglen = br_dsize - windex; + memcpy(br_data + windex, src, fraglen); + memcpy(br_data, src + fraglen, cplen - fraglen); + } else { + memcpy(br_data + windex, src, cplen); + } + + windex += cplen; + windex %= br_dsize; + + return windex; +} + +/* + * Write scattered channel packet to TX bufring. + * + * The offset of this channel packet is written as a 64bits value + * immediately after this channel packet. + */ int vmbus_txbr_write(struct vmbus_txbr *tbr, const struct iovec iov[], int iovlen, boolean_t *need_sig) { - int i = 0; - uint32_t byte_avail_to_write; - uint32_t old_write_location; - uint32_t total_bytes_to_write = 0; - volatile uint32_t next_write_location; - uint64_t prev_indices = 0; + uint32_t old_windex, windex, total; + uint64_t save_windex; + int i; + total = 0; for (i = 0; i < iovlen; i++) - total_bytes_to_write += iov[i].iov_len; - total_bytes_to_write += sizeof(uint64_t); + total += iov[i].iov_len; + total += sizeof(save_windex); mtx_lock_spin(&tbr->txbr_lock); - byte_avail_to_write = vmbus_txbr_avail(tbr); - /* * NOTE: * If this write is going to make br_windex same as br_rindex, @@ -265,29 +288,29 @@ vmbus_txbr_write(struct vmbus_txbr *tbr, * we can't do it then, since br_windex == br_rindex means that * the bufring is empty. */ - if (byte_avail_to_write <= total_bytes_to_write) { + if (vmbus_txbr_avail(tbr) <= total) { mtx_unlock_spin(&tbr->txbr_lock); return (EAGAIN); } + /* Save br_windex for later use */ + old_windex = tbr->txbr_windex; + /* * Copy the scattered channel packet to the TX bufring. */ - next_write_location = tbr->txbr_windex; - - old_write_location = next_write_location; - + windex = old_windex; for (i = 0; i < iovlen; i++) { - next_write_location = copy_to_ring_buffer(tbr, - next_write_location, iov[i].iov_base, iov[i].iov_len); + windex = vmbus_txbr_copyto(tbr, windex, + iov[i].iov_base, iov[i].iov_len); } /* * Set the offset of the current channel packet. */ - prev_indices = ((uint64_t)tbr->txbr_windex) << 32; - next_write_location = copy_to_ring_buffer(tbr, - next_write_location, (char *)&prev_indices, sizeof(uint64_t)); + save_windex = ((uint64_t)old_windex) << 32; + windex = vmbus_txbr_copyto(tbr, windex, &save_windex, + sizeof(save_windex)); /* * XXX only compiler fence is needed. @@ -296,13 +319,14 @@ vmbus_txbr_write(struct vmbus_txbr *tbr, mb(); /* - * Now, update the write index. + * Update the write index _after_ the channel packet + * is copied. */ - tbr->txbr_windex = next_write_location; + tbr->txbr_windex = windex; mtx_unlock_spin(&tbr->txbr_lock); - *need_sig = hv_ring_buffer_needsig_on_write(old_write_location, tbr); + *need_sig = vmbus_txbr_need_signal(tbr, old_windex); return (0); } @@ -380,29 +404,6 @@ vmbus_rxbr_read(struct vmbus_rxbr *rbr, } static uint32_t -copy_to_ring_buffer(const struct vmbus_txbr *tbr, - uint32_t start_write_offset, const uint8_t *src, uint32_t src_len) -{ - char *ring_buffer = tbr->txbr_data; - uint32_t ring_buffer_size = tbr->txbr_dsize; - uint32_t fragLen; - - if (src_len > ring_buffer_size - start_write_offset) { - /* Wrap-around detected! */ - fragLen = ring_buffer_size - start_write_offset; - memcpy(ring_buffer + start_write_offset, src, fragLen); - memcpy(ring_buffer, src + fragLen, src_len - fragLen); - } else { - memcpy(ring_buffer + start_write_offset, src, src_len); - } - - start_write_offset += src_len; - start_write_offset %= ring_buffer_size; - - return (start_write_offset); -} - -static uint32_t copy_from_ring_buffer(const struct vmbus_rxbr *rbr, char *dest, uint32_t dest_len, uint32_t start_read_offset) { From owner-svn-src-all@freebsd.org Wed Jul 27 07:19:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1959BA5AEB; Wed, 27 Jul 2016 07:19:07 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E5CB1EB4; Wed, 27 Jul 2016 07:19:07 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R7J6oa088646; Wed, 27 Jul 2016 07:19:06 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R7J6Sc088645; Wed, 27 Jul 2016 07:19:06 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607270719.u6R7J6Sc088645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 27 Jul 2016 07:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303369 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 07:19:07 -0000 Author: sephe Date: Wed Jul 27 07:19:06 2016 New Revision: 303369 URL: https://svnweb.freebsd.org/changeset/base/303369 Log: hyperv/vmbus: Stringent RX bufring data length checks. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7316 Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Wed Jul 27 06:52:43 2016 (r303368) +++ head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Wed Jul 27 07:19:06 2016 (r303369) @@ -339,8 +339,12 @@ vmbus_rxbr_peek(struct vmbus_rxbr *rbr, mtx_lock_spin(&rbr->rxbr_lock); + /* + * The requested data and the 64bits channel packet + * offset should be there at least. + */ bytesAvailToRead = vmbus_rxbr_avail(rbr); - if (bytesAvailToRead < dlen) { + if (bytesAvailToRead < dlen + sizeof(uint64_t)) { mtx_unlock_spin(&rbr->rxbr_lock); return (EAGAIN); } @@ -366,7 +370,7 @@ vmbus_rxbr_read(struct vmbus_rxbr *rbr, mtx_lock_spin(&rbr->rxbr_lock); bytes_avail_to_read = vmbus_rxbr_avail(rbr); - if (bytes_avail_to_read < dlen) { + if (bytes_avail_to_read < dlen + offset + sizeof(prev_indices)) { mtx_unlock_spin(&rbr->rxbr_lock); return (EAGAIN); } From owner-svn-src-all@freebsd.org Wed Jul 27 07:36:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 808B6BA614A; Wed, 27 Jul 2016 07:36:55 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5421518C9; Wed, 27 Jul 2016 07:36:55 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R7asJm095722; Wed, 27 Jul 2016 07:36:54 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R7as13095720; Wed, 27 Jul 2016 07:36:54 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607270736.u6R7as13095720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 27 Jul 2016 07:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303370 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 07:36:55 -0000 Author: sephe Date: Wed Jul 27 07:36:54 2016 New Revision: 303370 URL: https://svnweb.freebsd.org/changeset/base/303370 Log: hyperv/vmbus: Cleanup RX bufring read process. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7317 Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c head/sys/dev/hyperv/vmbus/vmbus_brvar.h Modified: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Wed Jul 27 07:19:06 2016 (r303369) +++ head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Wed Jul 27 07:36:54 2016 (r303370) @@ -38,8 +38,8 @@ #define VMBUS_BR_WAVAIL(r, w, z) \ (((w) >= (r)) ? ((z) - ((w) - (r))) : ((r) - (w))) -static uint32_t copy_from_ring_buffer(const struct vmbus_rxbr *rbr, - char *dest, uint32_t dest_len, uint32_t start_read_offset); +/* Increase bufing index */ +#define VMBUS_BR_IDXINC(idx, inc, sz) (((idx) + (inc)) % (sz)) static int vmbus_br_sysctl_state(SYSCTL_HANDLER_ARGS) @@ -244,20 +244,15 @@ vmbus_txbr_copyto(const struct vmbus_txb uint32_t br_dsize = tbr->txbr_dsize; if (cplen > br_dsize - windex) { - uint32_t fraglen; + uint32_t fraglen = br_dsize - windex; - /* Wrap-around detected! */ - fraglen = br_dsize - windex; + /* Wrap-around detected */ memcpy(br_data + windex, src, fraglen); memcpy(br_data, src + fraglen, cplen - fraglen); } else { memcpy(br_data + windex, src, cplen); } - - windex += cplen; - windex %= br_dsize; - - return windex; + return VMBUS_BR_IDXINC(windex, cplen, br_dsize); } /* @@ -331,46 +326,60 @@ vmbus_txbr_write(struct vmbus_txbr *tbr, return (0); } +static __inline uint32_t +vmbus_rxbr_copyfrom(const struct vmbus_rxbr *rbr, uint32_t rindex, + void *dst0, int cplen) +{ + uint8_t *dst = dst0; + const uint8_t *br_data = rbr->rxbr_data; + uint32_t br_dsize = rbr->rxbr_dsize; + + if (cplen > br_dsize - rindex) { + uint32_t fraglen = br_dsize - rindex; + + /* Wrap-around detected. */ + memcpy(dst, br_data + rindex, fraglen); + memcpy(dst + fraglen, br_data, cplen - fraglen); + } else { + memcpy(dst, br_data + rindex, cplen); + } + return VMBUS_BR_IDXINC(rindex, cplen, br_dsize); +} + int vmbus_rxbr_peek(struct vmbus_rxbr *rbr, void *data, int dlen) { - uint32_t bytesAvailToRead; - uint32_t nextReadLocation = 0; - mtx_lock_spin(&rbr->rxbr_lock); /* * The requested data and the 64bits channel packet * offset should be there at least. */ - bytesAvailToRead = vmbus_rxbr_avail(rbr); - if (bytesAvailToRead < dlen + sizeof(uint64_t)) { + if (vmbus_rxbr_avail(rbr) < dlen + sizeof(uint64_t)) { mtx_unlock_spin(&rbr->rxbr_lock); return (EAGAIN); } - - nextReadLocation = rbr->rxbr_rindex; - nextReadLocation = copy_from_ring_buffer(rbr, data, dlen, - nextReadLocation); + vmbus_rxbr_copyfrom(rbr, rbr->rxbr_rindex, data, dlen); mtx_unlock_spin(&rbr->rxbr_lock); return (0); } +/* + * NOTE: + * We assume (dlen + skip) == sizeof(channel packet). + */ int -vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t offset) +vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t skip) { - uint32_t bytes_avail_to_read; - uint32_t next_read_location = 0; - uint64_t prev_indices = 0; + uint32_t rindex, br_dsize = rbr->rxbr_dsize; - KASSERT(dlen > 0, ("invalid dlen %d", dlen)); + KASSERT(dlen + skip > 0, ("invalid dlen %d, offset %u", dlen, skip)); mtx_lock_spin(&rbr->rxbr_lock); - bytes_avail_to_read = vmbus_rxbr_avail(rbr); - if (bytes_avail_to_read < dlen + offset + sizeof(prev_indices)) { + if (vmbus_rxbr_avail(rbr) < dlen + skip + sizeof(uint64_t)) { mtx_unlock_spin(&rbr->rxbr_lock); return (EAGAIN); } @@ -378,16 +387,13 @@ vmbus_rxbr_read(struct vmbus_rxbr *rbr, /* * Copy channel packet from RX bufring. */ - next_read_location = (rbr->rxbr_rindex + offset) % rbr->rxbr_dsize; - next_read_location = copy_from_ring_buffer(rbr, data, dlen, - next_read_location); + rindex = VMBUS_BR_IDXINC(rbr->rxbr_rindex, skip, br_dsize); + rindex = vmbus_rxbr_copyfrom(rbr, rindex, data, dlen); /* - * Discard this channel packet's start offset, which is useless - * for us. + * Discard this channel packet's 64bits offset, which is useless to us. */ - next_read_location = copy_from_ring_buffer(rbr, - (char *)&prev_indices, sizeof(uint64_t), next_read_location); + rindex = VMBUS_BR_IDXINC(rindex, sizeof(uint64_t), br_dsize); /* * XXX only compiler fence is needed. @@ -398,34 +404,11 @@ vmbus_rxbr_read(struct vmbus_rxbr *rbr, wmb(); /* - * Update the read index + * Update the read index _after_ the channel packet is fetched. */ - rbr->rxbr_rindex = next_read_location; + rbr->rxbr_rindex = rindex; mtx_unlock_spin(&rbr->rxbr_lock); return (0); } - -static uint32_t -copy_from_ring_buffer(const struct vmbus_rxbr *rbr, char *dest, - uint32_t dest_len, uint32_t start_read_offset) -{ - uint32_t fragLen; - char *ring_buffer = rbr->rxbr_data; - uint32_t ring_buffer_size = rbr->rxbr_dsize; - - if (dest_len > ring_buffer_size - start_read_offset) { - /* Wrap-around detected at the src */ - fragLen = ring_buffer_size - start_read_offset; - memcpy(dest, ring_buffer + start_read_offset, fragLen); - memcpy(dest + fragLen, ring_buffer, dest_len - fragLen); - } else { - memcpy(dest, ring_buffer + start_read_offset, dest_len); - } - - start_read_offset += dest_len; - start_read_offset %= ring_buffer_size; - - return (start_read_offset); -} Modified: head/sys/dev/hyperv/vmbus/vmbus_brvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_brvar.h Wed Jul 27 07:19:06 2016 (r303369) +++ head/sys/dev/hyperv/vmbus/vmbus_brvar.h Wed Jul 27 07:36:54 2016 (r303370) @@ -80,7 +80,7 @@ void vmbus_rxbr_deinit(struct vmbus_rxb void vmbus_rxbr_setup(struct vmbus_rxbr *rbr, void *buf, int blen); int vmbus_rxbr_peek(struct vmbus_rxbr *rbr, void *data, int dlen); int vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, - uint32_t offset); + uint32_t skip); void vmbus_rxbr_intr_mask(struct vmbus_rxbr *rbr); uint32_t vmbus_rxbr_intr_unmask(struct vmbus_rxbr *rbr); From owner-svn-src-all@freebsd.org Wed Jul 27 07:51:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4FC3BA65F6; Wed, 27 Jul 2016 07:51:59 +0000 (UTC) (envelope-from jch@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 762EB12E8; Wed, 27 Jul 2016 07:51:59 +0000 (UTC) (envelope-from jch@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R7pwsh001014; Wed, 27 Jul 2016 07:51:58 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R7pwEu001011; Wed, 27 Jul 2016 07:51:58 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201607270751.u6R7pwEu001011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Wed, 27 Jul 2016 07:51:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303371 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 07:51:59 -0000 Author: jch Date: Wed Jul 27 07:51:58 2016 New Revision: 303371 URL: https://svnweb.freebsd.org/changeset/base/303371 Log: MFC r271119, r272081: r271119: In tcp_input(), don't acquire the pcbinfo global write lock for SYN packets targeting a listening socket. Permit to reduce TCP input processing starvation in context of high SYN load (e.g. short-lived TCP connections or SYN flood). Submitted by: Julien Charbon Reviewed by: adrian, hiren, jhb, Mike Bentkofsky r272081: Catch up with r271119. Modified: stable/10/sys/netinet/tcp_input.c stable/10/sys/netinet/tcp_syncache.c stable/10/sys/netinet/toecore.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_input.c ============================================================================== --- stable/10/sys/netinet/tcp_input.c Wed Jul 27 07:36:54 2016 (r303370) +++ stable/10/sys/netinet/tcp_input.c Wed Jul 27 07:51:58 2016 (r303371) @@ -751,12 +751,12 @@ tcp_input(struct mbuf *m, int off0) /* * Locate pcb for segment; if we're likely to add or remove a - * connection then first acquire pcbinfo lock. There are two cases + * connection then first acquire pcbinfo lock. There are three cases * where we might discover later we need a write lock despite the - * flags: ACKs moving a connection out of the syncache, and ACKs for - * a connection in TIMEWAIT. + * flags: ACKs moving a connection out of the syncache, ACKs for a + * connection in TIMEWAIT and SYNs not targeting a listening socket. */ - if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0) { + if ((thflags & (TH_FIN | TH_RST)) != 0) { INP_INFO_WLOCK(&V_tcbinfo); ti_locked = TI_WLOCKED; } else @@ -983,10 +983,12 @@ relocked: * now be in TIMEWAIT. */ #ifdef INVARIANTS - if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0) + if ((thflags & (TH_FIN | TH_RST)) != 0) INP_INFO_WLOCK_ASSERT(&V_tcbinfo); #endif - if (tp->t_state != TCPS_ESTABLISHED) { + if (!((tp->t_state == TCPS_ESTABLISHED && (thflags & TH_SYN) == 0) || + (tp->t_state == TCPS_LISTEN && (thflags & TH_SYN) && + !(tp->t_flags & TF_FASTOPEN)))) { if (ti_locked == TI_UNLOCKED) { if (INP_INFO_TRY_WLOCK(&V_tcbinfo) == 0) { in_pcbref(inp); @@ -1027,17 +1029,13 @@ relocked: /* * When the socket is accepting connections (the INPCB is in LISTEN * state) we look into the SYN cache if this is a new connection - * attempt or the completion of a previous one. Because listen - * sockets are never in TCPS_ESTABLISHED, the V_tcbinfo lock will be - * held in this case. + * attempt or the completion of a previous one. */ if (so->so_options & SO_ACCEPTCONN) { struct in_conninfo inc; KASSERT(tp->t_state == TCPS_LISTEN, ("%s: so accepting but " "tp not listening", __func__)); - INP_INFO_WLOCK_ASSERT(&V_tcbinfo); - bzero(&inc, sizeof(inc)); #ifdef INET6 if (isipv6) { @@ -1060,6 +1058,8 @@ relocked: * socket appended to the listen queue in SYN_RECEIVED state. */ if ((thflags & (TH_RST|TH_ACK|TH_SYN)) == TH_ACK) { + + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); /* * Parse the TCP options here because * syncookies need access to the reflected @@ -1348,8 +1348,12 @@ new_tfo_socket: #endif /* * Entry added to syncache and mbuf consumed. - * Everything already unlocked by syncache_add(). + * Only the listen socket is unlocked by syncache_add(). */ + if (ti_locked == TI_WLOCKED) { + INP_INFO_WUNLOCK(&V_tcbinfo); + ti_locked = TI_UNLOCKED; + } INP_INFO_UNLOCK_ASSERT(&V_tcbinfo); return; } else if (tp->t_state == TCPS_LISTEN) { Modified: stable/10/sys/netinet/tcp_syncache.c ============================================================================== --- stable/10/sys/netinet/tcp_syncache.c Wed Jul 27 07:36:54 2016 (r303370) +++ stable/10/sys/netinet/tcp_syncache.c Wed Jul 27 07:51:58 2016 (r303371) @@ -1107,7 +1107,7 @@ syncache_tfo_expand(struct syncache *sc, * Global TCP locks are held because we manipulate the PCB lists * and create a new socket. */ - INP_INFO_RLOCK_ASSERT(&V_tcbinfo); + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); pending_counter = intotcpcb(sotoinpcb(*lsop))->t_tfo_pending; *lsop = syncache_socket(sc, *lsop, m); @@ -1175,7 +1175,6 @@ syncache_add(struct in_conninfo *inc, st int tfo_response_cookie_valid = 0; #endif - INP_INFO_WLOCK_ASSERT(&V_tcbinfo); INP_WLOCK_ASSERT(inp); /* listen socket */ KASSERT((th->th_flags & (TH_RST|TH_ACK|TH_SYN)) == TH_SYN, ("%s: unexpected tcp flags", __func__)); @@ -1229,21 +1228,15 @@ syncache_add(struct in_conninfo *inc, st #ifdef MAC if (mac_syncache_init(&maclabel) != 0) { INP_WUNLOCK(inp); - INP_INFO_WUNLOCK(&V_tcbinfo); goto done; } else mac_syncache_create(maclabel, inp); #endif #ifdef TCP_RFC7413 - if (!tfo_cookie_valid) { - INP_WUNLOCK(inp); - INP_INFO_WUNLOCK(&V_tcbinfo); - } -#else - INP_WUNLOCK(inp); - INP_INFO_WUNLOCK(&V_tcbinfo); + if (!tfo_cookie_valid) #endif - + INP_WUNLOCK(inp); + /* * Remember the IP options, if any. */ @@ -1272,10 +1265,8 @@ syncache_add(struct in_conninfo *inc, st SCH_LOCK_ASSERT(sch); if (sc != NULL) { #ifdef TCP_RFC7413 - if (tfo_cookie_valid) { + if (tfo_cookie_valid) INP_WUNLOCK(inp); - INP_INFO_WUNLOCK(&V_tcbinfo); - } #endif TCPSTAT_INC(tcps_sc_dupsyn); if (ipopts) { Modified: stable/10/sys/netinet/toecore.c ============================================================================== --- stable/10/sys/netinet/toecore.c Wed Jul 27 07:36:54 2016 (r303370) +++ stable/10/sys/netinet/toecore.c Wed Jul 27 07:51:58 2016 (r303371) @@ -328,7 +328,6 @@ toe_syncache_add(struct in_conninfo *inc { struct socket *lso = inp->inp_socket; - INP_INFO_WLOCK_ASSERT(&V_tcbinfo); INP_WLOCK_ASSERT(inp); syncache_add(inc, to, th, inp, &lso, NULL, tod, todctx); From owner-svn-src-all@freebsd.org Wed Jul 27 08:08:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53184BA6CF3; Wed, 27 Jul 2016 08:08:47 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 231CE1B9A; Wed, 27 Jul 2016 08:08:47 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R88k8W007357; Wed, 27 Jul 2016 08:08:46 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R88kqm007355; Wed, 27 Jul 2016 08:08:46 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201607270808.u6R88kqm007355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 27 Jul 2016 08:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303372 - in head/tools/tools/locale: . tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 08:08:47 -0000 Author: kevlo Date: Wed Jul 27 08:08:46 2016 New Revision: 303372 URL: https://svnweb.freebsd.org/changeset/base/303372 Log: Fix cldr2def.pl script to add weekday to the date format of zh_TW locales. While here, mention dependency on textproc/p5-XML-Parser in README. Reviewed by: bapt Modified: head/tools/tools/locale/README head/tools/tools/locale/tools/cldr2def.pl Modified: head/tools/tools/locale/README ============================================================================== --- head/tools/tools/locale/README Wed Jul 27 07:51:58 2016 (r303371) +++ head/tools/tools/locale/README Wed Jul 27 08:08:46 2016 (r303372) @@ -2,7 +2,8 @@ To generate the locales: -Tools needed: java, perl, devel/p5-Tie-IxHash and converters/p5-Text-Iconv +Tools needed: java, perl, devel/p5-Tie-IxHash, converters/p5-Text-Iconv and +textproc/p5-XML-Parser fetch cldr data from: http://cldr.unicode.org extract in a directory ~/unicode/cldr/v27.0.1 for example Modified: head/tools/tools/locale/tools/cldr2def.pl ============================================================================== --- head/tools/tools/locale/tools/cldr2def.pl Wed Jul 27 07:51:58 2016 (r303371) +++ head/tools/tools/locale/tools/cldr2def.pl Wed Jul 27 08:08:46 2016 (r303372) @@ -240,6 +240,8 @@ sub callback_dtformat { if ($nl eq 'ja_JP') { $s =~ s/(> )(%H)/$1%A $2/; + } elsif ($nl eq 'zh_TW') { + $s =~ s/(> )(%p)/$1%A $2/; } $s =~ s/\.,/\./; $s =~ s/^"%e\./%A %e/; From owner-svn-src-all@freebsd.org Wed Jul 27 08:11:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96BCABA6D5E; Wed, 27 Jul 2016 08:11:09 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69A271EA9; Wed, 27 Jul 2016 08:11:09 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R8B86P007538; Wed, 27 Jul 2016 08:11:08 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R8B808007536; Wed, 27 Jul 2016 08:11:08 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201607270811.u6R8B808007536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 27 Jul 2016 08:11:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303373 - head/share/timedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 08:11:09 -0000 Author: kevlo Date: Wed Jul 27 08:11:08 2016 New Revision: 303373 URL: https://svnweb.freebsd.org/changeset/base/303373 Log: Regenerate timedef for zh_TW. Reviewed by: bapt Modified: head/share/timedef/zh_TW.Big5.src head/share/timedef/zh_TW.UTF-8.src Modified: head/share/timedef/zh_TW.Big5.src ============================================================================== --- head/share/timedef/zh_TW.Big5.src Wed Jul 27 08:08:46 2016 (r303372) +++ head/share/timedef/zh_TW.Big5.src Wed Jul 27 08:11:08 2016 (r303373) @@ -63,7 +63,7 @@ ¤U¤È # # date_fmt -%Y¦~%m¤ë%e¤é %p%I:%M:%S [%Z] +%Y¦~%m¤ë%e¤é %A %p%I:%M:%S [%Z] # # Long month names (without case ending) ¢°¤ë Modified: head/share/timedef/zh_TW.UTF-8.src ============================================================================== --- head/share/timedef/zh_TW.UTF-8.src Wed Jul 27 08:08:46 2016 (r303372) +++ head/share/timedef/zh_TW.UTF-8.src Wed Jul 27 08:11:08 2016 (r303373) @@ -56,14 +56,14 @@ %Y/%m/%d # # c_fmt -%Yå¹´%m月%eæ—¥%A %p%I:%M:%S [%Z] +%Yå¹´%m月%eæ—¥ %A %p%I:%M:%S [%Z] # # AM/PM ä¸Šåˆ ä¸‹åˆ # # date_fmt -%Yå¹´%m月%eæ—¥%A %p%I:%M:%S [%Z] +%Yå¹´%m月%eæ—¥ %A %p%I:%M:%S [%Z] # # Long month names (without case ending) 1月 From owner-svn-src-all@freebsd.org Wed Jul 27 08:14:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0133FBA6E86; Wed, 27 Jul 2016 08:14:39 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 591D312D0; Wed, 27 Jul 2016 08:14:39 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.15.2/8.15.2) with ESMTPS id u6R8EJbd068103 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 27 Jul 2016 16:14:19 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.15.2/8.15.2/Submit) id u6R8EJfv068102; Wed, 27 Jul 2016 16:14:19 +0800 (CST) (envelope-from kevlo) Date: Wed, 27 Jul 2016 16:14:18 +0800 From: Kevin Lo To: Andrey Chernov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303354 - head/share/timedef Message-ID: <20160727081418.GA68095@ns.kevlo.org> References: <201607270046.u6R0kmWK045150@repo.freebsd.org> <81134a98-b8ff-fba9-1d8d-eed2cc1253db@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <81134a98-b8ff-fba9-1d8d-eed2cc1253db@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 08:14:40 -0000 On Wed, Jul 27, 2016 at 03:55:44AM +0300, Andrey Chernov wrote: > > On 27.07.2016 3:46, Kevin Lo wrote: > > Author: kevlo > > Date: Wed Jul 27 00:46:48 2016 > > New Revision: 303354 > > URL: https://svnweb.freebsd.org/changeset/base/303354 > > > > Log: > > Add weekday to the date format. > > This file is generated, so this change will be lost after next > generation. It will be better to fix generation script instead. Fair enough. Fixed in r303372, thanks. > > > > Modified: > > head/share/timedef/zh_TW.UTF-8.src > > > > Modified: head/share/timedef/zh_TW.UTF-8.src > > ============================================================================== > > --- head/share/timedef/zh_TW.UTF-8.src Wed Jul 27 00:08:01 2016 (r303353) > > +++ head/share/timedef/zh_TW.UTF-8.src Wed Jul 27 00:46:48 2016 (r303354) > > @@ -56,14 +56,14 @@ > > %Y/%m/%d > > # > > # c_fmt > > -%Yå¹´%m月%eæ—¥ %p%I:%M:%S [%Z] > > +%Yå¹´%m月%eæ—¥%A %p%I:%M:%S [%Z] > > # > > # AM/PM > > ä¸Šåˆ > > ä¸‹åˆ > > # > > # date_fmt > > -%Yå¹´%m月%eæ—¥ %p%I:%M:%S [%Z] > > +%Yå¹´%m月%eæ—¥%A %p%I:%M:%S [%Z] > > # > > # Long month names (without case ending) > > 1月 > > > > From owner-svn-src-all@freebsd.org Wed Jul 27 08:26:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63578BA5489; Wed, 27 Jul 2016 08:26:36 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12B241AE6; Wed, 27 Jul 2016 08:26:35 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R8QZSn014880; Wed, 27 Jul 2016 08:26:35 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R8QZgk014879; Wed, 27 Jul 2016 08:26:35 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201607270826.u6R8QZgk014879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 27 Jul 2016 08:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303374 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 08:26:36 -0000 Author: ae Date: Wed Jul 27 08:26:34 2016 New Revision: 303374 URL: https://svnweb.freebsd.org/changeset/base/303374 Log: Due to dropped mbuf in netisr queue route(8) can fall into infinity loop of reading the rtsock's feed. When it used by some scripts, this leads to growing number of not finished route(8) instances and thus growing number of rtsock consumers. Add SIGALRM handler to prevent this. Reviewed by: melifaro Obtained from: Yandex LLC MFC after: 2 weeks Sponsored by: Yandex LLC Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Wed Jul 27 08:11:08 2016 (r303373) +++ head/sbin/route/route.c Wed Jul 27 08:26:34 2016 (r303374) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -144,6 +145,16 @@ static int fiboptlist_range(const char * static void usage(const char *) __dead2; +#define READ_TIMEOUT 10 +static volatile sig_atomic_t stop_read; + +static void +stopit(int sig __unused) +{ + + stop_read = 1; +} + static void usage(const char *cp) { @@ -776,6 +787,7 @@ set_metric(char *value, int key) static void newroute(int argc, char **argv) { + struct sigaction sa; struct hostent *hp; struct fibl *fl; char *cmd; @@ -791,6 +803,12 @@ newroute(int argc, char **argv) hp = NULL; TAILQ_INIT(&fibl_head); + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sa.sa_handler = stopit; + if (sigaction(SIGALRM, &sa, 0) == -1) + warn("sigaction SIGALRM"); + cmd = argv[0]; if (*cmd != 'g' && *cmd != 's') shutdown(s, SHUT_RD); /* Don't want to read back our messages */ @@ -1541,9 +1559,17 @@ rtmsg(int cmd, int flags, int fib) return (-1); } if (cmd == RTM_GET) { + stop_read = 0; + alarm(READ_TIMEOUT); do { l = read(s, (char *)&m_rtmsg, sizeof(m_rtmsg)); - } while (l > 0 && (rtm.rtm_seq != rtm_seq || rtm.rtm_pid != pid)); + } while (l > 0 && stop_read == 0 && + (rtm.rtm_seq != rtm_seq || rtm.rtm_pid != pid)); + if (stop_read != 0) { + warnx("read from routing socket timed out"); + return (-1); + } else + alarm(0); if (l < 0) warn("read from routing socket"); else From owner-svn-src-all@freebsd.org Wed Jul 27 08:47:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9929CBA59B2; Wed, 27 Jul 2016 08:47:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F0AC1501; Wed, 27 Jul 2016 08:47:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R8lO6O022044; Wed, 27 Jul 2016 08:47:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R8lOID022042; Wed, 27 Jul 2016 08:47:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607270847.u6R8lOID022042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jul 2016 08:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303375 - stable/11/sys/ufs/ufs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 08:47:25 -0000 Author: kib Date: Wed Jul 27 08:47:24 2016 New Revision: 303375 URL: https://svnweb.freebsd.org/changeset/base/303375 Log: MFC r303090: Ensure that the UFS directory vnode' vm_object is properly sized before UFS_BALLOC() is called. Approved by: re (delphij) Modified: stable/11/sys/ufs/ufs/ufs_lookup.c stable/11/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_lookup.c Wed Jul 27 08:26:34 2016 (r303374) +++ stable/11/sys/ufs/ufs/ufs_lookup.c Wed Jul 27 08:47:24 2016 (r303375) @@ -881,6 +881,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir struct buf *bp; u_int dsize; struct direct *ep, *nep; + u_int64_t old_isize; int error, ret, blkoff, loc, spacefree, flags, namlen; char *dirbuf; @@ -909,16 +910,18 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir return (error); } #endif + old_isize = dp->i_size; + vnode_pager_setsize(dvp, (u_long)dp->i_offset + DIRBLKSIZ); if ((error = UFS_BALLOC(dvp, (off_t)dp->i_offset, DIRBLKSIZ, cr, flags, &bp)) != 0) { if (DOINGSOFTDEP(dvp) && newdirbp != NULL) bdwrite(newdirbp); + vnode_pager_setsize(dvp, (u_long)old_isize); return (error); } dp->i_size = dp->i_offset + DIRBLKSIZ; DIP_SET(dp, i_size, dp->i_size); dp->i_flag |= IN_CHANGE | IN_UPDATE; - vnode_pager_setsize(dvp, (u_long)dp->i_size); dirp->d_reclen = DIRBLKSIZ; blkoff = dp->i_offset & (VFSTOUFS(dvp->v_mount)->um_mountp->mnt_stat.f_iosize - 1); Modified: stable/11/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_vnops.c Wed Jul 27 08:26:34 2016 (r303374) +++ stable/11/sys/ufs/ufs/ufs_vnops.c Wed Jul 27 08:47:24 2016 (r303375) @@ -1913,13 +1913,13 @@ ufs_mkdir(ap) dirtemplate = *dtp; dirtemplate.dot_ino = ip->i_number; dirtemplate.dotdot_ino = dp->i_number; + vnode_pager_setsize(tvp, DIRBLKSIZ); if ((error = UFS_BALLOC(tvp, (off_t)0, DIRBLKSIZ, cnp->cn_cred, BA_CLRBUF, &bp)) != 0) goto bad; ip->i_size = DIRBLKSIZ; DIP_SET(ip, i_size, DIRBLKSIZ); ip->i_flag |= IN_CHANGE | IN_UPDATE; - vnode_pager_setsize(tvp, (u_long)ip->i_size); bcopy((caddr_t)&dirtemplate, (caddr_t)bp->b_data, sizeof dirtemplate); if (DOINGSOFTDEP(tvp)) { /* From owner-svn-src-all@freebsd.org Wed Jul 27 08:53:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 850A7BA5E36; Wed, 27 Jul 2016 08:53:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F3991B37; Wed, 27 Jul 2016 08:53:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R8rBW0025706; Wed, 27 Jul 2016 08:53:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R8rBoZ025703; Wed, 27 Jul 2016 08:53:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607270853.u6R8rBoZ025703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jul 2016 08:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303376 - stable/10/sys/ufs/ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 08:53:12 -0000 Author: kib Date: Wed Jul 27 08:53:11 2016 New Revision: 303376 URL: https://svnweb.freebsd.org/changeset/base/303376 Log: MFC r303090: Ensure that the UFS directory vnode' vm_object is properly sized before UFS_BALLOC() is called. Modified: stable/10/sys/ufs/ufs/ufs_lookup.c stable/10/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_lookup.c Wed Jul 27 08:47:24 2016 (r303375) +++ stable/10/sys/ufs/ufs/ufs_lookup.c Wed Jul 27 08:53:11 2016 (r303376) @@ -881,6 +881,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir struct buf *bp; u_int dsize; struct direct *ep, *nep; + u_int64_t old_isize; int error, ret, blkoff, loc, spacefree, flags, namlen; char *dirbuf; @@ -909,16 +910,18 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir return (error); } #endif + old_isize = dp->i_size; + vnode_pager_setsize(dvp, (u_long)dp->i_offset + DIRBLKSIZ); if ((error = UFS_BALLOC(dvp, (off_t)dp->i_offset, DIRBLKSIZ, cr, flags, &bp)) != 0) { if (DOINGSOFTDEP(dvp) && newdirbp != NULL) bdwrite(newdirbp); + vnode_pager_setsize(dvp, (u_long)old_isize); return (error); } dp->i_size = dp->i_offset + DIRBLKSIZ; DIP_SET(dp, i_size, dp->i_size); dp->i_flag |= IN_CHANGE | IN_UPDATE; - vnode_pager_setsize(dvp, (u_long)dp->i_size); dirp->d_reclen = DIRBLKSIZ; blkoff = dp->i_offset & (VFSTOUFS(dvp->v_mount)->um_mountp->mnt_stat.f_iosize - 1); Modified: stable/10/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_vnops.c Wed Jul 27 08:47:24 2016 (r303375) +++ stable/10/sys/ufs/ufs/ufs_vnops.c Wed Jul 27 08:53:11 2016 (r303376) @@ -1914,13 +1914,13 @@ ufs_mkdir(ap) dirtemplate = *dtp; dirtemplate.dot_ino = ip->i_number; dirtemplate.dotdot_ino = dp->i_number; + vnode_pager_setsize(tvp, DIRBLKSIZ); if ((error = UFS_BALLOC(tvp, (off_t)0, DIRBLKSIZ, cnp->cn_cred, BA_CLRBUF, &bp)) != 0) goto bad; ip->i_size = DIRBLKSIZ; DIP_SET(ip, i_size, DIRBLKSIZ); ip->i_flag |= IN_CHANGE | IN_UPDATE; - vnode_pager_setsize(tvp, (u_long)ip->i_size); bcopy((caddr_t)&dirtemplate, (caddr_t)bp->b_data, sizeof dirtemplate); if (DOINGSOFTDEP(tvp)) { /* From owner-svn-src-all@freebsd.org Wed Jul 27 09:27:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D746BA6905; Wed, 27 Jul 2016 09:27:09 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C8F812A8; Wed, 27 Jul 2016 09:27:09 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R9R8qS037040; Wed, 27 Jul 2016 09:27:08 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R9R829037036; Wed, 27 Jul 2016 09:27:08 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607270927.u6R9R829037036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 27 Jul 2016 09:27:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303379 - in head/sys: conf dev/hyperv/vmbus modules/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 09:27:09 -0000 Author: sephe Date: Wed Jul 27 09:27:08 2016 New Revision: 303379 URL: https://svnweb.freebsd.org/changeset/base/303379 Log: hyperv/vmbus: Rename cleaned up bufring code MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7318 Added: head/sys/dev/hyperv/vmbus/vmbus_br.c - copied unchanged from r303378, head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Deleted: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/modules/hyperv/vmbus/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Jul 27 09:26:46 2016 (r303378) +++ head/sys/conf/files.amd64 Wed Jul 27 09:27:08 2016 (r303379) @@ -270,10 +270,10 @@ dev/hyperv/utilities/hv_kvp.c optiona dev/hyperv/utilities/hv_shutdown.c optional hyperv dev/hyperv/utilities/hv_timesync.c optional hyperv dev/hyperv/utilities/hv_util.c optional hyperv -dev/hyperv/vmbus/hv_ring_buffer.c optional hyperv dev/hyperv/vmbus/hyperv.c optional hyperv dev/hyperv/vmbus/hyperv_busdma.c optional hyperv dev/hyperv/vmbus/vmbus.c optional hyperv +dev/hyperv/vmbus/vmbus_br.c optional hyperv dev/hyperv/vmbus/vmbus_chan.c optional hyperv dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/vmbus_if.m optional hyperv Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Jul 27 09:26:46 2016 (r303378) +++ head/sys/conf/files.i386 Wed Jul 27 09:27:08 2016 (r303379) @@ -246,10 +246,10 @@ dev/hyperv/utilities/hv_kvp.c optiona dev/hyperv/utilities/hv_shutdown.c optional hyperv dev/hyperv/utilities/hv_timesync.c optional hyperv dev/hyperv/utilities/hv_util.c optional hyperv -dev/hyperv/vmbus/hv_ring_buffer.c optional hyperv dev/hyperv/vmbus/hyperv.c optional hyperv dev/hyperv/vmbus/hyperv_busdma.c optional hyperv dev/hyperv/vmbus/vmbus.c optional hyperv +dev/hyperv/vmbus/vmbus_br.c optional hyperv dev/hyperv/vmbus/vmbus_chan.c optional hyperv dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/vmbus_if.m optional hyperv Copied: head/sys/dev/hyperv/vmbus/vmbus_br.c (from r303378, head/sys/dev/hyperv/vmbus/hv_ring_buffer.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hyperv/vmbus/vmbus_br.c Wed Jul 27 09:27:08 2016 (r303379, copy of r303378, head/sys/dev/hyperv/vmbus/hv_ring_buffer.c) @@ -0,0 +1,414 @@ +/*- + * Copyright (c) 2009-2012,2016 Microsoft Corp. + * Copyright (c) 2012 NetApp Inc. + * Copyright (c) 2012 Citrix Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include + +#include +#include + +/* Amount of space available for write */ +#define VMBUS_BR_WAVAIL(r, w, z) \ + (((w) >= (r)) ? ((z) - ((w) - (r))) : ((r) - (w))) + +/* Increase bufing index */ +#define VMBUS_BR_IDXINC(idx, inc, sz) (((idx) + (inc)) % (sz)) + +static int +vmbus_br_sysctl_state(SYSCTL_HANDLER_ARGS) +{ + const struct vmbus_br *br = arg1; + uint32_t rindex, windex, imask, ravail, wavail; + char state[256]; + + rindex = br->vbr_rindex; + windex = br->vbr_windex; + imask = br->vbr_imask; + wavail = VMBUS_BR_WAVAIL(rindex, windex, br->vbr_dsize); + ravail = br->vbr_dsize - wavail; + + snprintf(state, sizeof(state), + "rindex:%u windex:%u imask:%u ravail:%u wavail:%u", + rindex, windex, imask, ravail, wavail); + return sysctl_handle_string(oidp, state, sizeof(state), req); +} + +/* + * Binary bufring states. + */ +static int +vmbus_br_sysctl_state_bin(SYSCTL_HANDLER_ARGS) +{ +#define BR_STATE_RIDX 0 +#define BR_STATE_WIDX 1 +#define BR_STATE_IMSK 2 +#define BR_STATE_RSPC 3 +#define BR_STATE_WSPC 4 +#define BR_STATE_MAX 5 + + const struct vmbus_br *br = arg1; + uint32_t rindex, windex, wavail, state[BR_STATE_MAX]; + + rindex = br->vbr_rindex; + windex = br->vbr_windex; + wavail = VMBUS_BR_WAVAIL(rindex, windex, br->vbr_dsize); + + state[BR_STATE_RIDX] = rindex; + state[BR_STATE_WIDX] = windex; + state[BR_STATE_IMSK] = br->vbr_imask; + state[BR_STATE_WSPC] = wavail; + state[BR_STATE_RSPC] = br->vbr_dsize - wavail; + + return sysctl_handle_opaque(oidp, state, sizeof(state), req); +} + +void +vmbus_br_sysctl_create(struct sysctl_ctx_list *ctx, struct sysctl_oid *br_tree, + struct vmbus_br *br, const char *name) +{ + struct sysctl_oid *tree; + char desc[64]; + + tree = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(br_tree), OID_AUTO, + name, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, ""); + if (tree == NULL) + return; + + snprintf(desc, sizeof(desc), "%s state", name); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "state", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + br, 0, vmbus_br_sysctl_state, "A", desc); + + snprintf(desc, sizeof(desc), "%s binary state", name); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "state_bin", + CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, + br, 0, vmbus_br_sysctl_state_bin, "IU", desc); +} + +void +vmbus_rxbr_intr_mask(struct vmbus_rxbr *rbr) +{ + rbr->rxbr_imask = 1; + mb(); +} + +static __inline uint32_t +vmbus_rxbr_avail(const struct vmbus_rxbr *rbr) +{ + uint32_t rindex, windex; + + /* Get snapshot */ + rindex = rbr->rxbr_rindex; + windex = rbr->rxbr_windex; + + return (rbr->rxbr_dsize - + VMBUS_BR_WAVAIL(rindex, windex, rbr->rxbr_dsize)); +} + +uint32_t +vmbus_rxbr_intr_unmask(struct vmbus_rxbr *rbr) +{ + rbr->rxbr_imask = 0; + mb(); + + /* + * Now check to see if the ring buffer is still empty. + * If it is not, we raced and we need to process new + * incoming channel packets. + */ + return vmbus_rxbr_avail(rbr); +} + +static void +vmbus_br_setup(struct vmbus_br *br, void *buf, int blen) +{ + br->vbr = buf; + br->vbr_dsize = blen - sizeof(struct vmbus_bufring); +} + +void +vmbus_rxbr_init(struct vmbus_rxbr *rbr) +{ + mtx_init(&rbr->rxbr_lock, "vmbus_rxbr", NULL, MTX_SPIN); +} + +void +vmbus_rxbr_deinit(struct vmbus_rxbr *rbr) +{ + mtx_destroy(&rbr->rxbr_lock); +} + +void +vmbus_rxbr_setup(struct vmbus_rxbr *rbr, void *buf, int blen) +{ + vmbus_br_setup(&rbr->rxbr, buf, blen); +} + +void +vmbus_txbr_init(struct vmbus_txbr *tbr) +{ + mtx_init(&tbr->txbr_lock, "vmbus_txbr", NULL, MTX_SPIN); +} + +void +vmbus_txbr_deinit(struct vmbus_txbr *tbr) +{ + mtx_destroy(&tbr->txbr_lock); +} + +void +vmbus_txbr_setup(struct vmbus_txbr *tbr, void *buf, int blen) +{ + vmbus_br_setup(&tbr->txbr, buf, blen); +} + +/* + * When we write to the ring buffer, check if the host needs to be + * signaled. + * + * The contract: + * - The host guarantees that while it is draining the TX bufring, + * it will set the br_imask to indicate it does not need to be + * interrupted when new data are added. + * - The host guarantees that it will completely drain the TX bufring + * before exiting the read loop. Further, once the TX bufring is + * empty, it will clear the br_imask and re-check to see if new + * data have arrived. + */ +static __inline boolean_t +vmbus_txbr_need_signal(const struct vmbus_txbr *tbr, uint32_t old_windex) +{ + mb(); + if (tbr->txbr_imask) + return (FALSE); + + /* XXX only compiler fence is needed */ + /* Read memory barrier */ + rmb(); + + /* + * This is the only case we need to signal when the + * ring transitions from being empty to non-empty. + */ + if (old_windex == tbr->txbr_rindex) + return (TRUE); + + return (FALSE); +} + +static __inline uint32_t +vmbus_txbr_avail(const struct vmbus_txbr *tbr) +{ + uint32_t rindex, windex; + + /* Get snapshot */ + rindex = tbr->txbr_rindex; + windex = tbr->txbr_windex; + + return VMBUS_BR_WAVAIL(rindex, windex, tbr->txbr_dsize); +} + +static __inline uint32_t +vmbus_txbr_copyto(const struct vmbus_txbr *tbr, uint32_t windex, + const void *src0, uint32_t cplen) +{ + const uint8_t *src = src0; + uint8_t *br_data = tbr->txbr_data; + uint32_t br_dsize = tbr->txbr_dsize; + + if (cplen > br_dsize - windex) { + uint32_t fraglen = br_dsize - windex; + + /* Wrap-around detected */ + memcpy(br_data + windex, src, fraglen); + memcpy(br_data, src + fraglen, cplen - fraglen); + } else { + memcpy(br_data + windex, src, cplen); + } + return VMBUS_BR_IDXINC(windex, cplen, br_dsize); +} + +/* + * Write scattered channel packet to TX bufring. + * + * The offset of this channel packet is written as a 64bits value + * immediately after this channel packet. + */ +int +vmbus_txbr_write(struct vmbus_txbr *tbr, const struct iovec iov[], int iovlen, + boolean_t *need_sig) +{ + uint32_t old_windex, windex, total; + uint64_t save_windex; + int i; + + total = 0; + for (i = 0; i < iovlen; i++) + total += iov[i].iov_len; + total += sizeof(save_windex); + + mtx_lock_spin(&tbr->txbr_lock); + + /* + * NOTE: + * If this write is going to make br_windex same as br_rindex, + * i.e. the available space for write is same as the write size, + * we can't do it then, since br_windex == br_rindex means that + * the bufring is empty. + */ + if (vmbus_txbr_avail(tbr) <= total) { + mtx_unlock_spin(&tbr->txbr_lock); + return (EAGAIN); + } + + /* Save br_windex for later use */ + old_windex = tbr->txbr_windex; + + /* + * Copy the scattered channel packet to the TX bufring. + */ + windex = old_windex; + for (i = 0; i < iovlen; i++) { + windex = vmbus_txbr_copyto(tbr, windex, + iov[i].iov_base, iov[i].iov_len); + } + + /* + * Set the offset of the current channel packet. + */ + save_windex = ((uint64_t)old_windex) << 32; + windex = vmbus_txbr_copyto(tbr, windex, &save_windex, + sizeof(save_windex)); + + /* + * XXX only compiler fence is needed. + * Full memory barrier before upding the write index. + */ + mb(); + + /* + * Update the write index _after_ the channel packet + * is copied. + */ + tbr->txbr_windex = windex; + + mtx_unlock_spin(&tbr->txbr_lock); + + *need_sig = vmbus_txbr_need_signal(tbr, old_windex); + + return (0); +} + +static __inline uint32_t +vmbus_rxbr_copyfrom(const struct vmbus_rxbr *rbr, uint32_t rindex, + void *dst0, int cplen) +{ + uint8_t *dst = dst0; + const uint8_t *br_data = rbr->rxbr_data; + uint32_t br_dsize = rbr->rxbr_dsize; + + if (cplen > br_dsize - rindex) { + uint32_t fraglen = br_dsize - rindex; + + /* Wrap-around detected. */ + memcpy(dst, br_data + rindex, fraglen); + memcpy(dst + fraglen, br_data, cplen - fraglen); + } else { + memcpy(dst, br_data + rindex, cplen); + } + return VMBUS_BR_IDXINC(rindex, cplen, br_dsize); +} + +int +vmbus_rxbr_peek(struct vmbus_rxbr *rbr, void *data, int dlen) +{ + mtx_lock_spin(&rbr->rxbr_lock); + + /* + * The requested data and the 64bits channel packet + * offset should be there at least. + */ + if (vmbus_rxbr_avail(rbr) < dlen + sizeof(uint64_t)) { + mtx_unlock_spin(&rbr->rxbr_lock); + return (EAGAIN); + } + vmbus_rxbr_copyfrom(rbr, rbr->rxbr_rindex, data, dlen); + + mtx_unlock_spin(&rbr->rxbr_lock); + + return (0); +} + +/* + * NOTE: + * We assume (dlen + skip) == sizeof(channel packet). + */ +int +vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t skip) +{ + uint32_t rindex, br_dsize = rbr->rxbr_dsize; + + KASSERT(dlen + skip > 0, ("invalid dlen %d, offset %u", dlen, skip)); + + mtx_lock_spin(&rbr->rxbr_lock); + + if (vmbus_rxbr_avail(rbr) < dlen + skip + sizeof(uint64_t)) { + mtx_unlock_spin(&rbr->rxbr_lock); + return (EAGAIN); + } + + /* + * Copy channel packet from RX bufring. + */ + rindex = VMBUS_BR_IDXINC(rbr->rxbr_rindex, skip, br_dsize); + rindex = vmbus_rxbr_copyfrom(rbr, rindex, data, dlen); + + /* + * Discard this channel packet's 64bits offset, which is useless to us. + */ + rindex = VMBUS_BR_IDXINC(rindex, sizeof(uint64_t), br_dsize); + + /* + * XXX only compiler fence is needed. + * Make sure all reads are done before we update the read index since + * the writer may start writing to the read area once the read index + * is updated. + */ + wmb(); + + /* + * Update the read index _after_ the channel packet is fetched. + */ + rbr->rxbr_rindex = rindex; + + mtx_unlock_spin(&rbr->rxbr_lock); + + return (0); +} Modified: head/sys/modules/hyperv/vmbus/Makefile ============================================================================== --- head/sys/modules/hyperv/vmbus/Makefile Wed Jul 27 09:26:46 2016 (r303378) +++ head/sys/modules/hyperv/vmbus/Makefile Wed Jul 27 09:27:08 2016 (r303379) @@ -4,11 +4,11 @@ ${.CURDIR}/../../../dev/hyperv/vmbus/${MACHINE_CPUARCH} KMOD= hv_vmbus -SRCS= hv_ring_buffer.c \ - hyperv.c \ +SRCS= hyperv.c \ hyperv_busdma.c \ hyperv_machdep.c \ vmbus.c \ + vmbus_br.c \ vmbus_chan.c \ vmbus_et.c SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h vmbus_if.h From owner-svn-src-all@freebsd.org Wed Jul 27 10:33:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80DCFBA35FC; Wed, 27 Jul 2016 10:33:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7CB41F10; Wed, 27 Jul 2016 10:33:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RAXoiA063476; Wed, 27 Jul 2016 10:33:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RAXkeI063443; Wed, 27 Jul 2016 10:33:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607271033.u6RAXkeI063443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 27 Jul 2016 10:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r303380 - in vendor/device-tree/dist: Bindings Bindings/arc Bindings/arm Bindings/arm/altera Bindings/arm/bcm Bindings/arm/hisilicon Bindings/arm/keystone Bindings/arm/marvell Bindings/... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 10:33:51 -0000 Author: andrew Date: Wed Jul 27 10:33:45 2016 New Revision: 303380 URL: https://svnweb.freebsd.org/changeset/base/303380 Log: Import the updated devicetree files from https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git Added: vendor/device-tree/dist/Bindings/arc/eznps.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/altera/socfpga-eccmgr.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/axis.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/bcm/brcm,vulcan-soc.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/ vendor/device-tree/dist/Bindings/arm/marvell/ap806-system-controller.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/armada-370-xp-pmsu.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/armada-370-xp.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/armada-375.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/armada-37xx.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/armada-380-mpcore-soc-ctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/armada-38x.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/armada-39x.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/armada-7k-8k.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/armada-cpu-reset.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/coherency-fabric.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/cp110-system-controller0.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/kirkwood.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/marvell,berlin.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/marvell,dove.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/marvell,kirkwood.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/mvebu-cpu-config.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell/mvebu-system-controller.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/nxp/ vendor/device-tree/dist/Bindings/arm/nxp/lpc32xx.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/oxnas.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/qcom.txt (contents, props changed) vendor/device-tree/dist/Bindings/ata/nvidia,tegra124-ahci.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/artpec6.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/axs10x-i2s-pll-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/hi3519-crg.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/lpc1850-creg-clk.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/microchip,pic32.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/oxnas,stdclk.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/rockchip,rk3399-cru.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/ti/adpll.txt (contents, props changed) vendor/device-tree/dist/Bindings/cpufreq/nvidia,tegra124-cpufreq.txt (contents, props changed) vendor/device-tree/dist/Bindings/crypto/fsl-imx-scc.txt (contents, props changed) vendor/device-tree/dist/Bindings/devfreq/event/exynos-nocp.txt (contents, props changed) vendor/device-tree/dist/Bindings/devfreq/exynos-bus.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/arm,hdlcd.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/bridge/analogix_dp.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/fsl,tcon.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/hisilicon/ vendor/device-tree/dist/Bindings/display/hisilicon/dw-dsi.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/hisilicon/hisi-ade.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/mediatek/ vendor/device-tree/dist/Bindings/display/mediatek/mediatek,disp.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/mediatek/mediatek,dpi.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/mediatek/mediatek,dsi.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/innolux,at070tn92.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/lg,lp120up1.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/olimex,lcd-olinuxino-43-ts.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/ontat,yx700wv03.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/tpk,f07a-0102.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/tpk,f10a-0102.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/urt,umsh-8596md.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/rockchip/analogix_dp-rockchip.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/rockchip/inno_hdmi-rockchip.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/snps,arcpgu.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/sunxi/ vendor/device-tree/dist/Bindings/display/sunxi/sun4i-drm.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/nvidia,tegra20-apbdma.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/nvidia,tegra210-adma.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/qcom_hidma_mgmt.txt (contents, props changed) vendor/device-tree/dist/Bindings/goldfish/ vendor/device-tree/dist/Bindings/goldfish/audio.txt (contents, props changed) vendor/device-tree/dist/Bindings/goldfish/battery.txt (contents, props changed) vendor/device-tree/dist/Bindings/goldfish/events.txt (contents, props changed) vendor/device-tree/dist/Bindings/goldfish/pipe.txt (contents, props changed) vendor/device-tree/dist/Bindings/goldfish/tty.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/gpio-pisosr.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/gpio-ts4800.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/ibm,ppc4xx-gpio.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/microchip,pic32-gpio.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/nvidia,tegra186-gpio.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/wd,mbl-gpio.txt (contents, props changed) vendor/device-tree/dist/Bindings/hwmon/nsa320-mcu.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-demux-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/at91-sama5d2_adc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/fsl,imx25-gcq.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/lpc1850-adc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/mxs-lradc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/ti-adc0832.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/chemical/ vendor/device-tree/dist/Bindings/iio/chemical/atlas,ph-sm.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/dac/ad5592r.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/dac/lpc1850-dac.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/dac/vf610-dac.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/health/afe4403.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/health/afe4404.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/light/opt3001.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/potentiometer/ vendor/device-tree/dist/Bindings/iio/potentiometer/ds1803.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/potentiometer/mcp4131.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/pressure/hp03.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/pressure/ms5611.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/rmi4/ vendor/device-tree/dist/Bindings/input/rmi4/rmi_2d_sensor.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/rmi4/rmi_f01.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/rmi4/rmi_i2c.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/rmi4/rmi_spi.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/touchscreen/ad7879.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/touchscreen/cyttsp.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/touchscreen/fsl-mx25-tcq.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/al,alpine-msix.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/brcm,bcm6345-l1-intc.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/ezchip,nps400-ic.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/fsl,ls-scfg-msi.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/marvell,odmi-controller.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/nvidia,tegra20-ictlr.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/sigma,smp8642-intc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iommu/mediatek,iommu.txt (contents, props changed) vendor/device-tree/dist/Bindings/leds/leds-is31fl32xx.txt (contents, props changed) vendor/device-tree/dist/Bindings/mailbox/hisilicon,hi6220-mailbox.txt (contents, props changed) vendor/device-tree/dist/Bindings/mailbox/rockchip-mailbox.txt (contents, props changed) vendor/device-tree/dist/Bindings/mailbox/ti,message-manager.txt (contents, props changed) vendor/device-tree/dist/Bindings/mailbox/xgene-slimpro-mailbox.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/i2c/adv7180.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/i2c/tvp5150.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/ti-cal.txt (contents, props changed) vendor/device-tree/dist/Bindings/memory-controllers/exynos-srom.txt (contents, props changed) vendor/device-tree/dist/Bindings/memory-controllers/mediatek,smi-common.txt (contents, props changed) vendor/device-tree/dist/Bindings/memory-controllers/mediatek,smi-larb.txt (contents, props changed) vendor/device-tree/dist/Bindings/memory-controllers/nvidia,tegra124-emc.txt (contents, props changed) vendor/device-tree/dist/Bindings/memory-controllers/nvidia,tegra30-mc.txt (contents, props changed) vendor/device-tree/dist/Bindings/memory-controllers/omap-gpmc.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/act8945a.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/fsl-imx25-tsadc.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/hisilicon,hi655x.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/max77620.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/tps65086.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/tps65912.txt (contents, props changed) vendor/device-tree/dist/Bindings/mips/cavium/ciu3.txt (contents, props changed) vendor/device-tree/dist/Bindings/mips/cavium/sata-uctl.txt (contents, props changed) vendor/device-tree/dist/Bindings/misc/eeprom-93xx46.txt (contents, props changed) vendor/device-tree/dist/Bindings/mmc/microchip,sdhci-pic32.txt (contents, props changed) vendor/device-tree/dist/Bindings/mtd/qcom_nandc.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/can/ifi_canfd.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/dsa/marvell.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/marvell-bt-sd8xxx.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/marvell-neta-bm.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/mediatek-net.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/micrel-ks8995.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/microchip,enc28j60.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/nfc/pn533-i2c.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/wireless/marvell-sd8xxx.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/wireless/ti,wlcore,spi.txt (contents, props changed) vendor/device-tree/dist/Bindings/numa.txt (contents, props changed) vendor/device-tree/dist/Bindings/nvmem/lpc1857-eeprom.txt (contents, props changed) vendor/device-tree/dist/Bindings/nvmem/mtk-efuse.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/pci-armada8k.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/pci-thunder-ecam.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/pci-thunder-pem.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/xilinx-nwl-pcie.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/bcm-ns-usb2-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/brcm-sata-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/nvidia,tegra124-xusb-padctl.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/rockchip-dp-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/rockchip-emmc-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/brcm,ns2-pinmux.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/microchip,pic32-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/qcom,ipq4019-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/st,stm32-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/act8945a-charger.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/renesas,rcar-sysc.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/reset/gpio-poweroff.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/reset/gpio-restart.txt (contents, props changed) vendor/device-tree/dist/Bindings/property-units.txt (contents, props changed) vendor/device-tree/dist/Bindings/regulator/act8945a-regulator.txt (contents, props changed) vendor/device-tree/dist/Bindings/regulator/hisilicon,hi655x-regulator.txt (contents, props changed) vendor/device-tree/dist/Bindings/regulator/pv88080.txt (contents, props changed) vendor/device-tree/dist/Bindings/regulator/regulator-max77620.txt (contents, props changed) vendor/device-tree/dist/Bindings/remoteproc/st-rproc.txt (contents, props changed) vendor/device-tree/dist/Bindings/reset/img,pistachio-reset.txt (contents, props changed) vendor/device-tree/dist/Bindings/reset/oxnas,reset.txt (contents, props changed) vendor/device-tree/dist/Bindings/rng/brcm,bcm6368.txt (contents, props changed) vendor/device-tree/dist/Bindings/rng/hisi-rng.txt (contents, props changed) vendor/device-tree/dist/Bindings/rng/microchip,pic32-rng.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/alphascale,asm9260-rtc.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/epson,rx6110.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/maxim,ds3231.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/maxim,mcp795.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/maxim-ds1302.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/microchip,pic32-rtc.txt (contents, props changed) vendor/device-tree/dist/Bindings/serial/arm,mps2-uart.txt (contents, props changed) vendor/device-tree/dist/Bindings/serial/brcm,bcm2835-aux-uart.txt (contents, props changed) vendor/device-tree/dist/Bindings/serial/microchip,pic32-uart.txt (contents, props changed) vendor/device-tree/dist/Bindings/serial/mvebu-uart.txt (contents, props changed) vendor/device-tree/dist/Bindings/serial/serial.txt (contents, props changed) vendor/device-tree/dist/Bindings/soc/fsl/rcpm.txt (contents, props changed) vendor/device-tree/dist/Bindings/soc/mediatek/auxadc.txt (contents, props changed) vendor/device-tree/dist/Bindings/soc/rockchip/grf.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/adi,adau17x1.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/davinci-mcbsp.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/max98371.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/max9867.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/max98926.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/mt8173-rt5650-rt5514.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/mt8173-rt5650.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/pcm5102a.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/rt5514.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/sunxi,sun4i-spdif.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/tas5720.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/ti,ads117x.txt (contents, props changed) vendor/device-tree/dist/Bindings/sparc_sun_oracle_rng.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/adi,axi-spi-engine.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/icpdas-lp8841-spi-rtc.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/microchip,spi-pic32.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/spi-xilinx.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/sqi-pic32.txt (contents, props changed) vendor/device-tree/dist/Bindings/thermal/mediatek-thermal.txt (contents, props changed) vendor/device-tree/dist/Bindings/thermal/nvidia,tegra124-soctherm.txt (contents, props changed) vendor/device-tree/dist/Bindings/thermal/tango-thermal.txt (contents, props changed) vendor/device-tree/dist/Bindings/thermal/thermal-generic-adc.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/arm,mps2-timer.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/ezchip,nps400-timer.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/snps,arc-timer.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/snps,archs-gfrc.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/snps,archs-rtc.txt (contents, props changed) vendor/device-tree/dist/Bindings/usb/nvidia,tegra124-xusb.txt (contents, props changed) vendor/device-tree/dist/Bindings/usb/usb-device.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/ vendor/device-tree/dist/Bindings/video/bridge/ vendor/device-tree/dist/Bindings/video/bridge/anx7814.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/arm,sp805.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/microchip,pic32-dmt.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/microchip,pic32-wdt.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/renesas-wdt.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/sbsa-gwdt.txt (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/ath79-clk.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/axis,artpec6-clkctrl.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/hi3519-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/microchip,pic32-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-ipq4019.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/rk3399-cru.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/gpio/meson-gxbb-gpio.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/gpio/tegra186-gpio.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/iio/adc/ vendor/device-tree/dist/include/dt-bindings/iio/adc/fsl-imx25-gcq.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/iio/adi,ad5592r.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/media/tvp5150.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/memory/mt8173-larb-port.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/mfd/max77620.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/pinctrl/hisi.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/pinctrl/mt7623-pinfunc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/pinctrl/stm32f429-pinfunc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/r8a7779-sysc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/r8a7790-sysc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/r8a7791-sysc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/r8a7793-sysc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/r8a7794-sysc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/r8a7795-sysc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/rk3368-power.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/rk3399-power.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/pistachio-resets.h (contents, props changed) vendor/device-tree/dist/src/arm/am335x-baltos-ir2110.dts (contents, props changed) vendor/device-tree/dist/src/arm/am335x-baltos-ir3220.dts (contents, props changed) vendor/device-tree/dist/src/arm/am335x-baltos.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/am335x-icev2.dts (contents, props changed) vendor/device-tree/dist/src/arm/am572x-idk.dts (contents, props changed) vendor/device-tree/dist/src/arm/am57xx-commercial-grade.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/am57xx-idk-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/am57xx-industrial-grade.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/arm-realview-eb-11mp-revb.dts (contents, props changed) vendor/device-tree/dist/src/arm/arm-realview-eb-11mp.dts (contents, props changed) vendor/device-tree/dist/src/arm/arm-realview-eb-a9mp.dts (contents, props changed) vendor/device-tree/dist/src/arm/arm-realview-eb-mp.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/arm-realview-eb.dts (contents, props changed) vendor/device-tree/dist/src/arm/arm-realview-eb.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/arm-realview-pba8.dts (contents, props changed) vendor/device-tree/dist/src/arm/arm-realview-pbx-a9.dts (contents, props changed) vendor/device-tree/dist/src/arm/arm-realview-pbx.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/artpec6-devboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/artpec6.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/aspeed-ast2500-evb.dts (contents, props changed) vendor/device-tree/dist/src/arm/aspeed-bmc-opp-palmetto.dts (contents, props changed) vendor/device-tree/dist/src/arm/aspeed-g4.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/aspeed-g5.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/bcm2835-rpi-a.dts (contents, props changed) vendor/device-tree/dist/src/arm/bcm47094-dlink-dir-885l.dts (contents, props changed) vendor/device-tree/dist/src/arm/dra7-dspeve-thermal.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/dra7-iva-thermal.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/dra72-evm-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/dra72-evm-revc.dts (contents, props changed) vendor/device-tree/dist/src/arm/exynos-syscon-restart.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/exynos3250-artik5-eval.dts (contents, props changed) vendor/device-tree/dist/src/arm/exynos3250-artik5.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/exynos4412-ppmu-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/exynos5410-pinctrl.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/exynos5420-cpus.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-tx6s-8034.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-tx6s-8035.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-tx6u-8033.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-tx6u-81xx-mb7.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-apalis-ixora.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-b450v3.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-b650v3.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-b850v3.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-ba16.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-bx50v3.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-evi.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-icore-rqs.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-marsboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-tx6q-1036.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-tx6q-11x0-mb7.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-apalis.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-icore-rqs.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qp-nitrogen6_max.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6qp-sabreauto.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6qp-sabresd.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6qp.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6sx-nitrogen6sx.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6sx-sdb-sai.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-pico-hobbit.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-tx6ul-0010.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-tx6ul-0011.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-tx6ul-mainboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-tx6ul.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx7d-nitrogen7.dts (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2e-clocks.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2e-evm.dts (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2e-netcp.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2e.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2g-evm.dts (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2g.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2hk-clocks.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2hk-evm.dts (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2hk-netcp.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2hk.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2l-clocks.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2l-evm.dts (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2l-netcp.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/keystone-k2l.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-linkstation-6282.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-linkstation-duo-6281.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-linkstation-lsqvl.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-linkstation-lsvl.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-linkstation-lswsxl.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-linkstation-lswvl.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-linkstation-lswxl.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-linkstation.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-linksys-viper.dts (contents, props changed) vendor/device-tree/dist/src/arm/logicpd-som-lv-37xx-devkit.dts (contents, props changed) vendor/device-tree/dist/src/arm/logicpd-som-lv.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/lpc3250-ea3250.dts (contents, props changed) vendor/device-tree/dist/src/arm/lpc3250-phy3250.dts (contents, props changed) vendor/device-tree/dist/src/arm/mps2-an385.dts (contents, props changed) vendor/device-tree/dist/src/arm/mps2-an399.dts (contents, props changed) vendor/device-tree/dist/src/arm/mps2.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/mt2701-pinfunc.h (contents, props changed) vendor/device-tree/dist/src/arm/mt7623-evb.dts (contents, props changed) vendor/device-tree/dist/src/arm/mt7623.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/mvebu-linkstation-fan.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/mvebu-linkstation-gpio-simple.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-sniper.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap4-kc1.dts (contents, props changed) vendor/device-tree/dist/src/arm/orion5x-kuroboxpro.dts (contents, props changed) vendor/device-tree/dist/src/arm/orion5x-linkstation-lsgl.dts (contents, props changed) vendor/device-tree/dist/src/arm/orion5x-linkstation.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/ox810se.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/qcom-apq8064-arrow-db600c-pins.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/qcom-apq8064-arrow-db600c.dts (contents, props changed) vendor/device-tree/dist/src/arm/qcom-apq8064-asus-nexus7-flo.dts (contents, props changed) vendor/device-tree/dist/src/arm/qcom-apq8064-pins.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk01.1-c1.dts (contents, props changed) vendor/device-tree/dist/src/arm/qcom-ipq4019-ap.dk01.1.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/qcom-ipq4019.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/rk3288-miqi.dts (contents, props changed) vendor/device-tree/dist/src/arm/socfpga_cyclone5_vining_fpga.dts (contents, props changed) vendor/device-tree/dist/src/arm/stm32f469-disco.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun4i-a10-dserve-dsrv9703c.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun5i-a13-difrnce-dit4350.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun6i-a31s-colorfly-e708-q1.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun7i-a20-itead-ibox.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun7i-a20-lamobo-r1.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun7i-a20-olinuxino-lime2-emmc.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-a23-polaroid-mid2809pxe04.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-a83t-allwinner-h8homlet-v2.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-a83t-cubietruck-plus.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-a83t.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-2.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-one.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-pc.dts (contents, props changed) vendor/device-tree/dist/src/arm/sunxi-itead-core-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/tps65217.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/uniphier-ph1-pro4-ace.dts (contents, props changed) vendor/device-tree/dist/src/arm/uniphier-ph1-pro4-sanji.dts (contents, props changed) vendor/device-tree/dist/src/arm/vf610-zii-dev-rev-b.dts (contents, props changed) vendor/device-tree/dist/src/arm/wd-mbwe.dts (contents, props changed) vendor/device-tree/dist/src/arm64/al/ vendor/device-tree/dist/src/arm64/al/alpine-v2-evp.dts (contents, props changed) vendor/device-tree/dist/src/arm64/al/alpine-v2.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/amd/amd-overdrive-rev-b0.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amd/amd-overdrive-rev-b1.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amd/amd-seattle-xgbe-b.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/amd/husky.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/ vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-odroidc2.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-p200.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-p201.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-p20x.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-vega-s95-meta.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-vega-s95-pro.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-vega-s95-telos.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-vega-s95.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/arm/foundation-v8-gicv3.dts (contents, props changed) vendor/device-tree/dist/src/arm64/arm/foundation-v8.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/arm/juno-r2.dts (contents, props changed) vendor/device-tree/dist/src/arm64/broadcom/ns2-clock.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/broadcom/vulcan-eval.dts (contents, props changed) vendor/device-tree/dist/src/arm64/broadcom/vulcan.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/exynos/exynos7-tmu-sensor-conf.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/exynos/exynos7-trip-points.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/freescale/fsl-ls1043a-qds.dts (contents, props changed) vendor/device-tree/dist/src/arm64/hisilicon/hikey-pinctrl.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/hisilicon/hip06-d03.dts (contents, props changed) vendor/device-tree/dist/src/arm64/hisilicon/hip06.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/lg/ vendor/device-tree/dist/src/arm64/lg/lg1312-ref.dts (contents, props changed) vendor/device-tree/dist/src/arm64/lg/lg1312.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-371x.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-3720-db.dts (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-372x.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-37xx.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-7020.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-7040-db.dts (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-7040.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-8020.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-8040.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-ap806-dual.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-ap806-quad.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-ap806.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-cp110-master.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/nvidia/tegra210-smaug.dts (contents, props changed) vendor/device-tree/dist/src/arm64/qcom/msm8996-mtp.dts (contents, props changed) vendor/device-tree/dist/src/arm64/qcom/msm8996-mtp.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/qcom/msm8996.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/qcom/pm8004.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/qcom/pm8994.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/qcom/pmi8994.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/rockchip/rk3368-geekbox.dts (contents, props changed) vendor/device-tree/dist/src/arm64/rockchip/rk3399-evb.dts (contents, props changed) vendor/device-tree/dist/src/arm64/rockchip/rk3399.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/socionext/uniphier-ph1-ld20-ref.dts (contents, props changed) vendor/device-tree/dist/src/arm64/socionext/uniphier-ph1-ld20.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/socionext/uniphier-ref-daughter.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/xilinx/zynqmp-ep108-clk.dtsi (contents, props changed) vendor/device-tree/dist/src/mips/brcm/bcm6358.dtsi (contents, props changed) vendor/device-tree/dist/src/mips/brcm/bcm96358nb4ser.dts (contents, props changed) vendor/device-tree/dist/src/mips/cavium-octeon/dlink_dsr-1000n.dts (contents, props changed) vendor/device-tree/dist/src/mips/cavium-octeon/octeon_3xxx.dtsi (contents, props changed) vendor/device-tree/dist/src/mips/cavium-octeon/ubnt_e100.dts (contents, props changed) vendor/device-tree/dist/src/mips/qca/ar9331.dtsi (contents, props changed) vendor/device-tree/dist/src/mips/qca/ar9331_dpt_module.dts (contents, props changed) vendor/device-tree/dist/src/mips/qca/ar9331_dragino_ms14.dts (contents, props changed) vendor/device-tree/dist/src/mips/qca/ar9331_omega.dts (contents, props changed) vendor/device-tree/dist/src/mips/qca/ar9331_tl_mr3020.dts (contents, props changed) Deleted: vendor/device-tree/dist/Bindings/arm/armada-370-xp-pmsu.txt vendor/device-tree/dist/Bindings/arm/armada-370-xp.txt vendor/device-tree/dist/Bindings/arm/armada-375.txt vendor/device-tree/dist/Bindings/arm/armada-380-mpcore-soc-ctrl.txt vendor/device-tree/dist/Bindings/arm/armada-38x.txt vendor/device-tree/dist/Bindings/arm/armada-39x.txt vendor/device-tree/dist/Bindings/arm/armada-cpu-reset.txt vendor/device-tree/dist/Bindings/arm/coherency-fabric.txt vendor/device-tree/dist/Bindings/arm/kirkwood.txt vendor/device-tree/dist/Bindings/arm/lpc32xx.txt vendor/device-tree/dist/Bindings/arm/marvell,berlin.txt vendor/device-tree/dist/Bindings/arm/marvell,dove.txt vendor/device-tree/dist/Bindings/arm/marvell,kirkwood.txt vendor/device-tree/dist/Bindings/arm/mvebu-cpu-config.txt vendor/device-tree/dist/Bindings/arm/mvebu-system-controller.txt vendor/device-tree/dist/Bindings/ata/tegra-sata.txt vendor/device-tree/dist/Bindings/btmrvl.txt vendor/device-tree/dist/Bindings/bus/ti-gpmc.txt vendor/device-tree/dist/Bindings/cpufreq/tegra124-cpufreq.txt vendor/device-tree/dist/Bindings/dma/tegra20-apbdma.txt vendor/device-tree/dist/Bindings/gpio/gpio-poweroff.txt vendor/device-tree/dist/Bindings/gpio/gpio-restart.txt vendor/device-tree/dist/Bindings/interrupt-controller/nvidia,tegra-ictlr.txt vendor/device-tree/dist/Bindings/memory-controllers/nvidia,tegra-mc.txt vendor/device-tree/dist/Bindings/memory-controllers/tegra-emc.txt vendor/device-tree/dist/Bindings/phy/brcm,brcmstb-sata-phy.txt vendor/device-tree/dist/Bindings/staging/iio/adc/mxs-lradc.txt vendor/device-tree/dist/Bindings/thermal/tegra-soctherm.txt vendor/device-tree/dist/src/arm/ea3250.dts vendor/device-tree/dist/src/arm/k2e-clocks.dtsi vendor/device-tree/dist/src/arm/k2e-evm.dts vendor/device-tree/dist/src/arm/k2e-netcp.dtsi vendor/device-tree/dist/src/arm/k2e.dtsi vendor/device-tree/dist/src/arm/k2hk-clocks.dtsi vendor/device-tree/dist/src/arm/k2hk-evm.dts vendor/device-tree/dist/src/arm/k2hk-netcp.dtsi vendor/device-tree/dist/src/arm/k2hk.dtsi vendor/device-tree/dist/src/arm/k2l-clocks.dtsi vendor/device-tree/dist/src/arm/k2l-evm.dts vendor/device-tree/dist/src/arm/k2l-netcp.dtsi vendor/device-tree/dist/src/arm/k2l.dtsi vendor/device-tree/dist/src/arm/kirkwood-lswvl.dts vendor/device-tree/dist/src/arm/kirkwood-lswxl.dts vendor/device-tree/dist/src/arm/phy3250.dts vendor/device-tree/dist/src/arm/rk3288-thermal.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3368-thermal.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-ph1-ld10-ref.dts vendor/device-tree/dist/src/arm64/socionext/uniphier-ph1-ld10.dtsi vendor/device-tree/dist/src/mips/pic32/pic32mzda-clk.dtsi Modified: vendor/device-tree/dist/Bindings/arc/archs-pct.txt vendor/device-tree/dist/Bindings/arc/pct.txt vendor/device-tree/dist/Bindings/arm/amlogic.txt vendor/device-tree/dist/Bindings/arm/arm-boards vendor/device-tree/dist/Bindings/arm/atmel-at91.txt vendor/device-tree/dist/Bindings/arm/cci.txt vendor/device-tree/dist/Bindings/arm/coresight.txt vendor/device-tree/dist/Bindings/arm/cpus.txt vendor/device-tree/dist/Bindings/arm/fsl.txt vendor/device-tree/dist/Bindings/arm/fw-cfg.txt vendor/device-tree/dist/Bindings/arm/hisilicon/hisilicon.txt vendor/device-tree/dist/Bindings/arm/keystone/keystone.txt vendor/device-tree/dist/Bindings/arm/l2c2x0.txt vendor/device-tree/dist/Bindings/arm/mediatek.txt vendor/device-tree/dist/Bindings/arm/omap/crossbar.txt vendor/device-tree/dist/Bindings/arm/omap/omap.txt vendor/device-tree/dist/Bindings/arm/pmu.txt vendor/device-tree/dist/Bindings/arm/rockchip.txt vendor/device-tree/dist/Bindings/arm/samsung/samsung-boards.txt vendor/device-tree/dist/Bindings/arm/spear-misc.txt vendor/device-tree/dist/Bindings/arm/sunxi.txt vendor/device-tree/dist/Bindings/arm/tegra/nvidia,tegra20-pmc.txt vendor/device-tree/dist/Bindings/arm/ux500/boards.txt vendor/device-tree/dist/Bindings/ata/ahci-platform.txt vendor/device-tree/dist/Bindings/clock/axi-clkgen.txt vendor/device-tree/dist/Bindings/clock/brcm,iproc-clocks.txt vendor/device-tree/dist/Bindings/clock/imx35-clock.txt vendor/device-tree/dist/Bindings/clock/nvidia,tegra124-dfll.txt vendor/device-tree/dist/Bindings/clock/qca,ath79-pll.txt vendor/device-tree/dist/Bindings/clock/qcom,gcc.txt vendor/device-tree/dist/Bindings/clock/renesas,cpg-mssr.txt vendor/device-tree/dist/Bindings/clock/rockchip,rk3036-cru.txt vendor/device-tree/dist/Bindings/clock/rockchip,rk3188-cru.txt vendor/device-tree/dist/Bindings/clock/rockchip,rk3288-cru.txt vendor/device-tree/dist/Bindings/clock/st/st,clkgen.txt vendor/device-tree/dist/Bindings/clock/sunxi.txt vendor/device-tree/dist/Bindings/clock/xgene.txt vendor/device-tree/dist/Bindings/crypto/samsung-sss.txt vendor/device-tree/dist/Bindings/display/brcm,bcm-vc4.txt vendor/device-tree/dist/Bindings/display/exynos/exynos5433-decon.txt vendor/device-tree/dist/Bindings/display/exynos/exynos_dp.txt vendor/device-tree/dist/Bindings/display/exynos/exynos_dsim.txt vendor/device-tree/dist/Bindings/display/exynos/exynos_hdmi.txt vendor/device-tree/dist/Bindings/display/exynos/samsung-fimd.txt vendor/device-tree/dist/Bindings/display/fsl,dcu.txt vendor/device-tree/dist/Bindings/display/imx/ldb.txt vendor/device-tree/dist/Bindings/display/msm/dsi.txt vendor/device-tree/dist/Bindings/display/msm/hdmi.txt vendor/device-tree/dist/Bindings/display/renesas,du.txt vendor/device-tree/dist/Bindings/dma/arm-pl330.txt vendor/device-tree/dist/Bindings/dma/brcm,bcm2835-dma.txt vendor/device-tree/dist/Bindings/dma/fsl-imx-sdma.txt vendor/device-tree/dist/Bindings/dma/mmp-dma.txt vendor/device-tree/dist/Bindings/dma/mv-xor.txt vendor/device-tree/dist/Bindings/dma/qcom_bam_dma.txt vendor/device-tree/dist/Bindings/dma/snps-dma.txt vendor/device-tree/dist/Bindings/dma/xilinx/xilinx_dma.txt vendor/device-tree/dist/Bindings/dma/xilinx/xilinx_vdma.txt vendor/device-tree/dist/Bindings/edac/apm-xgene-edac.txt vendor/device-tree/dist/Bindings/gpio/gpio-74x164.txt vendor/device-tree/dist/Bindings/gpio/gpio-altera.txt vendor/device-tree/dist/Bindings/gpio/gpio-mcp23s08.txt vendor/device-tree/dist/Bindings/gpio/gpio-mpc8xxx.txt vendor/device-tree/dist/Bindings/gpio/gpio-xgene-sb.txt vendor/device-tree/dist/Bindings/gpio/gpio-xlp.txt vendor/device-tree/dist/Bindings/gpio/gpio.txt vendor/device-tree/dist/Bindings/gpu/nvidia,gk20a.txt vendor/device-tree/dist/Bindings/hsi/nokia-modem.txt vendor/device-tree/dist/Bindings/hwmon/ina2xx.txt vendor/device-tree/dist/Bindings/hwmon/ltc2978.txt vendor/device-tree/dist/Bindings/hwmon/ntc_thermistor.txt vendor/device-tree/dist/Bindings/i2c/i2c-arb-gpio-challenge.txt vendor/device-tree/dist/Bindings/i2c/i2c-imx.txt vendor/device-tree/dist/Bindings/i2c/i2c-mux-gpio.txt vendor/device-tree/dist/Bindings/i2c/i2c-mux-pinctrl.txt vendor/device-tree/dist/Bindings/i2c/i2c-mux-reg.txt vendor/device-tree/dist/Bindings/i2c/i2c-octeon.txt vendor/device-tree/dist/Bindings/i2c/i2c-rcar.txt vendor/device-tree/dist/Bindings/i2c/i2c-rk3x.txt vendor/device-tree/dist/Bindings/i2c/i2c-sirf.txt vendor/device-tree/dist/Bindings/i2c/i2c-xiic.txt vendor/device-tree/dist/Bindings/iio/accel/mma8452.txt vendor/device-tree/dist/Bindings/iio/adc/mcp3422.txt vendor/device-tree/dist/Bindings/iio/adc/rockchip-saradc.txt vendor/device-tree/dist/Bindings/iio/health/max30100.txt vendor/device-tree/dist/Bindings/iio/iio-bindings.txt vendor/device-tree/dist/Bindings/iio/imu/inv_mpu6050.txt vendor/device-tree/dist/Bindings/iio/magnetometer/ak8975.txt vendor/device-tree/dist/Bindings/iio/st-sensors.txt vendor/device-tree/dist/Bindings/input/ads7846.txt vendor/device-tree/dist/Bindings/input/gpio-keys.txt vendor/device-tree/dist/Bindings/input/rotary-encoder.txt vendor/device-tree/dist/Bindings/input/touchscreen/brcm,iproc-touchscreen.txt vendor/device-tree/dist/Bindings/input/touchscreen/touchscreen.txt vendor/device-tree/dist/Bindings/interrupt-controller/arm,gic-v3.txt vendor/device-tree/dist/Bindings/interrupt-controller/arm,gic.txt vendor/device-tree/dist/Bindings/interrupt-controller/arm,versatile-fpga-irq.txt vendor/device-tree/dist/Bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt vendor/device-tree/dist/Bindings/interrupt-controller/hisilicon,mbigen-v2.txt vendor/device-tree/dist/Bindings/interrupt-controller/mediatek,sysirq.txt vendor/device-tree/dist/Bindings/interrupt-controller/mips-gic.txt vendor/device-tree/dist/Bindings/interrupt-controller/nxp,lpc3220-mic.txt vendor/device-tree/dist/Bindings/interrupt-controller/ti,omap4-wugen-mpu vendor/device-tree/dist/Bindings/iommu/arm,smmu.txt vendor/device-tree/dist/Bindings/iommu/renesas,ipmmu-vmsa.txt vendor/device-tree/dist/Bindings/iommu/samsung,sysmmu.txt vendor/device-tree/dist/Bindings/leds/common.txt vendor/device-tree/dist/Bindings/leds/leds-gpio.txt vendor/device-tree/dist/Bindings/mailbox/sti-mailbox.txt vendor/device-tree/dist/Bindings/media/i2c/mt9v032.txt vendor/device-tree/dist/Bindings/media/rcar_vin.txt vendor/device-tree/dist/Bindings/media/renesas,jpu.txt vendor/device-tree/dist/Bindings/media/renesas,vsp1.txt vendor/device-tree/dist/Bindings/media/xilinx/video.txt vendor/device-tree/dist/Bindings/mfd/arizona.txt vendor/device-tree/dist/Bindings/mfd/axp20x.txt vendor/device-tree/dist/Bindings/mfd/mt6397.txt vendor/device-tree/dist/Bindings/mfd/qcom-rpm.txt vendor/device-tree/dist/Bindings/mips/brcm/soc.txt vendor/device-tree/dist/Bindings/mips/cpu_irq.txt vendor/device-tree/dist/Bindings/misc/fsl,qoriq-mc.txt vendor/device-tree/dist/Bindings/mmc/arasan,sdhci.txt vendor/device-tree/dist/Bindings/mmc/brcm,sdhci-iproc.txt vendor/device-tree/dist/Bindings/mmc/mmc-pwrseq-emmc.txt vendor/device-tree/dist/Bindings/mmc/rockchip-dw-mshc.txt vendor/device-tree/dist/Bindings/mmc/sdhci-st.txt vendor/device-tree/dist/Bindings/mmc/tmio_mmc.txt vendor/device-tree/dist/Bindings/mmc/usdhi6rol0.txt vendor/device-tree/dist/Bindings/mtd/arm-versatile.txt vendor/device-tree/dist/Bindings/mtd/atmel-nand.txt vendor/device-tree/dist/Bindings/mtd/brcm,brcmnand.txt vendor/device-tree/dist/Bindings/mtd/fsl-quadspi.txt vendor/device-tree/dist/Bindings/mtd/gpmc-nand.txt vendor/device-tree/dist/Bindings/mtd/nand.txt vendor/device-tree/dist/Bindings/net/apm-xgene-enet.txt vendor/device-tree/dist/Bindings/net/arc_emac.txt vendor/device-tree/dist/Bindings/net/brcm,bcmgenet.txt vendor/device-tree/dist/Bindings/net/can/rcar_can.txt vendor/device-tree/dist/Bindings/net/can/sja1000.txt vendor/device-tree/dist/Bindings/net/cavium-mdio.txt vendor/device-tree/dist/Bindings/net/cpsw.txt vendor/device-tree/dist/Bindings/net/dsa/dsa.txt vendor/device-tree/dist/Bindings/net/emac_rockchip.txt vendor/device-tree/dist/Bindings/net/fsl-fec.txt vendor/device-tree/dist/Bindings/net/hisilicon-hns-dsaf.txt vendor/device-tree/dist/Bindings/net/hisilicon-hns-nic.txt vendor/device-tree/dist/Bindings/net/macb.txt vendor/device-tree/dist/Bindings/net/marvell-armada-370-neta.txt vendor/device-tree/dist/Bindings/net/mdio-mux-gpio.txt vendor/device-tree/dist/Bindings/net/mdio-mux.txt vendor/device-tree/dist/Bindings/net/phy.txt vendor/device-tree/dist/Bindings/net/renesas,ravb.txt vendor/device-tree/dist/Bindings/net/stmmac.txt vendor/device-tree/dist/Bindings/net/ti,dp83867.txt vendor/device-tree/dist/Bindings/net/wireless/qcom,ath10k.txt vendor/device-tree/dist/Bindings/opp/opp.txt vendor/device-tree/dist/Bindings/pci/designware-pcie.txt vendor/device-tree/dist/Bindings/pci/fsl,imx6q-pcie.txt vendor/device-tree/dist/Bindings/pci/hisilicon-pcie.txt vendor/device-tree/dist/Bindings/pci/layerscape-pci.txt vendor/device-tree/dist/Bindings/pci/nvidia,tegra20-pcie.txt vendor/device-tree/dist/Bindings/pci/pci-keystone.txt vendor/device-tree/dist/Bindings/pci/pci-rcar-gen2.txt vendor/device-tree/dist/Bindings/pci/rcar-pci.txt vendor/device-tree/dist/Bindings/pci/xilinx-pcie.txt vendor/device-tree/dist/Bindings/phy/phy-lpc18xx-usb-otg.txt vendor/device-tree/dist/Bindings/phy/phy-mt65xx-usb.txt vendor/device-tree/dist/Bindings/phy/phy-stih41x-usb.txt vendor/device-tree/dist/Bindings/phy/rcar-gen2-phy.txt vendor/device-tree/dist/Bindings/phy/rcar-gen3-phy-usb2.txt vendor/device-tree/dist/Bindings/phy/samsung-phy.txt vendor/device-tree/dist/Bindings/pinctrl/allwinner,sunxi-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/img,pistachio-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/marvell,armada-370-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/meson,pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/nvidia,tegra124-xusb-padctl.txt vendor/device-tree/dist/Bindings/pinctrl/nxp,lpc1850-scu.txt vendor/device-tree/dist/Bindings/pinctrl/pinctrl-mt65xx.txt vendor/device-tree/dist/Bindings/pinctrl/qcom,pmic-gpio.txt vendor/device-tree/dist/Bindings/pinctrl/renesas,pfc-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/rockchip,pinctrl.txt vendor/device-tree/dist/Bindings/power/qcom,coincell-charger.txt vendor/device-tree/dist/Bindings/power/rockchip-io-domain.txt vendor/device-tree/dist/Bindings/power_supply/ti,bq24735.txt vendor/device-tree/dist/Bindings/powerpc/fsl/fman.txt vendor/device-tree/dist/Bindings/regmap/regmap.txt vendor/device-tree/dist/Bindings/regulator/lp872x.txt vendor/device-tree/dist/Bindings/regulator/max77802.txt vendor/device-tree/dist/Bindings/regulator/max8973-regulator.txt vendor/device-tree/dist/Bindings/regulator/palmas-pmic.txt vendor/device-tree/dist/Bindings/regulator/qcom,spmi-regulator.txt vendor/device-tree/dist/Bindings/regulator/regulator.txt vendor/device-tree/dist/Bindings/regulator/ti-abb-regulator.txt vendor/device-tree/dist/Bindings/regulator/tps65217.txt vendor/device-tree/dist/Bindings/regulator/twl-regulator.txt vendor/device-tree/dist/Bindings/rtc/rtc-palmas.txt vendor/device-tree/dist/Bindings/rtc/s3c-rtc.txt vendor/device-tree/dist/Bindings/rtc/sa1100-rtc.txt vendor/device-tree/dist/Bindings/scsi/hisilicon-sas.txt vendor/device-tree/dist/Bindings/serial/fsl-imx-uart.txt vendor/device-tree/dist/Bindings/serial/fsl-mxs-auart.txt vendor/device-tree/dist/Bindings/serial/mtk-uart.txt vendor/device-tree/dist/Bindings/serial/renesas,sci-serial.txt vendor/device-tree/dist/Bindings/serial/sirf-uart.txt vendor/device-tree/dist/Bindings/soc/mediatek/pwrap.txt vendor/device-tree/dist/Bindings/soc/rockchip/power_domain.txt vendor/device-tree/dist/Bindings/soc/ti/keystone-navigator-qmss.txt vendor/device-tree/dist/Bindings/sound/cs4271.txt vendor/device-tree/dist/Bindings/sound/fsl-asoc-card.txt vendor/device-tree/dist/Bindings/sound/fsl-sai.txt vendor/device-tree/dist/Bindings/sound/mt8173-rt5650-rt5676.txt vendor/device-tree/dist/Bindings/sound/nvidia,tegra30-hda.txt vendor/device-tree/dist/Bindings/sound/pcm179x.txt vendor/device-tree/dist/Bindings/sound/renesas,rsnd.txt vendor/device-tree/dist/Bindings/sound/renesas,rsrc-card.txt vendor/device-tree/dist/Bindings/sound/rockchip-i2s.txt vendor/device-tree/dist/Bindings/sound/rockchip-spdif.txt vendor/device-tree/dist/Bindings/sound/rt5616.txt vendor/device-tree/dist/Bindings/sound/rt5640.txt vendor/device-tree/dist/Bindings/sound/st,sti-asoc-card.txt vendor/device-tree/dist/Bindings/sound/tas571x.txt vendor/device-tree/dist/Bindings/spi/spi-bus.txt vendor/device-tree/dist/Bindings/spi/spi-fsl-dspi.txt vendor/device-tree/dist/Bindings/spi/spi-rockchip.txt vendor/device-tree/dist/Bindings/spi/ti_qspi.txt vendor/device-tree/dist/Bindings/sram/sram.txt vendor/device-tree/dist/Bindings/thermal/exynos-thermal.txt vendor/device-tree/dist/Bindings/thermal/rcar-thermal.txt vendor/device-tree/dist/Bindings/timer/mediatek,mtk-timer.txt vendor/device-tree/dist/Bindings/ufs/ufshcd-pltfrm.txt vendor/device-tree/dist/Bindings/usb/ci-hdrc-usb2.txt vendor/device-tree/dist/Bindings/usb/dwc2.txt vendor/device-tree/dist/Bindings/usb/dwc3.txt vendor/device-tree/dist/Bindings/usb/qcom,dwc3.txt vendor/device-tree/dist/Bindings/usb/usb-xhci.txt vendor/device-tree/dist/Bindings/vendor-prefixes.txt vendor/device-tree/dist/Bindings/watchdog/fsl-imx-wdt.txt vendor/device-tree/dist/include/dt-bindings/clock/bcm-cygnus.h vendor/device-tree/dist/include/dt-bindings/clock/bcm2835.h vendor/device-tree/dist/include/dt-bindings/clock/exynos3250.h vendor/device-tree/dist/include/dt-bindings/clock/exynos5420.h vendor/device-tree/dist/include/dt-bindings/clock/exynos5433.h vendor/device-tree/dist/include/dt-bindings/clock/imx6qdl-clock.h vendor/device-tree/dist/include/dt-bindings/clock/imx6ul-clock.h vendor/device-tree/dist/include/dt-bindings/clock/imx7d-clock.h vendor/device-tree/dist/include/dt-bindings/clock/lpc32xx-clock.h vendor/device-tree/dist/include/dt-bindings/clock/mt8173-clk.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-msm8916.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-msm8996.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,mmcc-msm8996.h vendor/device-tree/dist/include/dt-bindings/clock/r8a7790-clock.h vendor/device-tree/dist/include/dt-bindings/clock/r8a7793-clock.h vendor/device-tree/dist/include/dt-bindings/clock/r8a7794-clock.h vendor/device-tree/dist/include/dt-bindings/clock/rk3036-cru.h vendor/device-tree/dist/include/dt-bindings/clock/rk3188-cru-common.h vendor/device-tree/dist/include/dt-bindings/clock/rk3228-cru.h vendor/device-tree/dist/include/dt-bindings/clock/tegra210-car.h vendor/device-tree/dist/include/dt-bindings/clock/vf610-clock.h vendor/device-tree/dist/include/dt-bindings/gpio/tegra-gpio.h vendor/device-tree/dist/include/dt-bindings/input/linux-event-codes.h vendor/device-tree/dist/include/dt-bindings/mfd/arizona.h vendor/device-tree/dist/include/dt-bindings/thermal/tegra124-soctherm.h vendor/device-tree/dist/src/arm/alpine.dtsi vendor/device-tree/dist/src/arm/am335x-baltos-ir5221.dts vendor/device-tree/dist/src/arm/am335x-bone-common.dtsi vendor/device-tree/dist/src/arm/am335x-chiliboard.dts vendor/device-tree/dist/src/arm/am335x-chilisom.dtsi vendor/device-tree/dist/src/arm/am335x-cm-t335.dts vendor/device-tree/dist/src/arm/am335x-evm.dts vendor/device-tree/dist/src/arm/am335x-igep0033.dtsi vendor/device-tree/dist/src/arm/am335x-nano.dts vendor/device-tree/dist/src/arm/am335x-pepper.dts vendor/device-tree/dist/src/arm/am335x-phycore-som.dtsi vendor/device-tree/dist/src/arm/am335x-shc.dts vendor/device-tree/dist/src/arm/am335x-sl50.dts vendor/device-tree/dist/src/arm/am33xx-clocks.dtsi vendor/device-tree/dist/src/arm/am33xx.dtsi vendor/device-tree/dist/src/arm/am35xx-clocks.dtsi vendor/device-tree/dist/src/arm/am4372.dtsi vendor/device-tree/dist/src/arm/am437x-cm-t43.dts vendor/device-tree/dist/src/arm/am437x-gp-evm.dts vendor/device-tree/dist/src/arm/am437x-sk-evm.dts vendor/device-tree/dist/src/arm/am43x-epos-evm.dts vendor/device-tree/dist/src/arm/am43xx-clocks.dtsi vendor/device-tree/dist/src/arm/am57xx-beagle-x15.dts vendor/device-tree/dist/src/arm/am57xx-cl-som-am57x.dts vendor/device-tree/dist/src/arm/am57xx-sbc-am57x.dts vendor/device-tree/dist/src/arm/arm-realview-pb1176.dts vendor/device-tree/dist/src/arm/arm-realview-pb11mp.dts vendor/device-tree/dist/src/arm/armada-370-db.dts vendor/device-tree/dist/src/arm/armada-370-mirabox.dts vendor/device-tree/dist/src/arm/armada-370-netgear-rn104.dts vendor/device-tree/dist/src/arm/armada-370-synology-ds213j.dts vendor/device-tree/dist/src/arm/armada-375.dtsi vendor/device-tree/dist/src/arm/armada-385-db-ap.dts vendor/device-tree/dist/src/arm/armada-385-linksys.dtsi vendor/device-tree/dist/src/arm/armada-388-clearfog.dts vendor/device-tree/dist/src/arm/armada-388-db.dts vendor/device-tree/dist/src/arm/armada-388-gp.dts vendor/device-tree/dist/src/arm/armada-38x-solidrun-microsom.dtsi vendor/device-tree/dist/src/arm/armada-38x.dtsi vendor/device-tree/dist/src/arm/armada-xp-axpwifiap.dts vendor/device-tree/dist/src/arm/armada-xp-db.dts vendor/device-tree/dist/src/arm/armada-xp-gp.dts vendor/device-tree/dist/src/arm/armada-xp-lenovo-ix4-300d.dts vendor/device-tree/dist/src/arm/armada-xp-linksys-mamba.dts vendor/device-tree/dist/src/arm/armada-xp-matrix.dts vendor/device-tree/dist/src/arm/armada-xp-netgear-rn2120.dts vendor/device-tree/dist/src/arm/armada-xp-openblocks-ax3-4.dts vendor/device-tree/dist/src/arm/armada-xp-synology-ds414.dts vendor/device-tree/dist/src/arm/armada-xp.dtsi vendor/device-tree/dist/src/arm/armv7-m.dtsi vendor/device-tree/dist/src/arm/at91-sama5d2_xplained.dts vendor/device-tree/dist/src/arm/at91-sama5d3_xplained.dts vendor/device-tree/dist/src/arm/at91-sama5d4_xplained.dts vendor/device-tree/dist/src/arm/at91-sama5d4ek.dts vendor/device-tree/dist/src/arm/at91-vinco.dts vendor/device-tree/dist/src/arm/at91sam9g45.dtsi vendor/device-tree/dist/src/arm/at91sam9n12ek.dts vendor/device-tree/dist/src/arm/at91sam9x5.dtsi vendor/device-tree/dist/src/arm/axm55xx.dtsi vendor/device-tree/dist/src/arm/bcm-cygnus-clock.dtsi vendor/device-tree/dist/src/arm/bcm-cygnus.dtsi vendor/device-tree/dist/src/arm/bcm-nsp.dtsi vendor/device-tree/dist/src/arm/bcm2835-rpi-a-plus.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-b-plus.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-b-rev2.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-b.dts vendor/device-tree/dist/src/arm/bcm2835-rpi.dtsi vendor/device-tree/dist/src/arm/bcm2835.dtsi vendor/device-tree/dist/src/arm/bcm2836-rpi-2-b.dts vendor/device-tree/dist/src/arm/bcm283x.dtsi vendor/device-tree/dist/src/arm/bcm4708-buffalo-wzr-1750dhp.dts vendor/device-tree/dist/src/arm/bcm4708-luxul-xwc-1000.dts vendor/device-tree/dist/src/arm/bcm4708-netgear-r6250.dts vendor/device-tree/dist/src/arm/bcm4708-smartrg-sr400ac.dts vendor/device-tree/dist/src/arm/bcm47081-buffalo-wzr-600dhp2.dts vendor/device-tree/dist/src/arm/bcm4709-buffalo-wxr-1900dhp.dts vendor/device-tree/dist/src/arm/bcm4709-netgear-r8000.dts vendor/device-tree/dist/src/arm/bcm5301x.dtsi vendor/device-tree/dist/src/arm/cros-adc-thermistors.dtsi vendor/device-tree/dist/src/arm/cros-ec-keyboard.dtsi vendor/device-tree/dist/src/arm/da850-enbw-cmc.dts vendor/device-tree/dist/src/arm/da850-evm.dts vendor/device-tree/dist/src/arm/da850.dtsi vendor/device-tree/dist/src/arm/dm8148-evm.dts vendor/device-tree/dist/src/arm/dm8148-t410.dts vendor/device-tree/dist/src/arm/dm814x-clocks.dtsi vendor/device-tree/dist/src/arm/dm814x.dtsi vendor/device-tree/dist/src/arm/dm8168-evm.dts vendor/device-tree/dist/src/arm/dm816x-clocks.dtsi vendor/device-tree/dist/src/arm/dm816x.dtsi vendor/device-tree/dist/src/arm/dra62x-clocks.dtsi vendor/device-tree/dist/src/arm/dra62x-j5eco-evm.dts vendor/device-tree/dist/src/arm/dra7-evm.dts vendor/device-tree/dist/src/arm/dra7.dtsi vendor/device-tree/dist/src/arm/dra72-evm.dts vendor/device-tree/dist/src/arm/dra74x.dtsi vendor/device-tree/dist/src/arm/dra7xx-clocks.dtsi vendor/device-tree/dist/src/arm/emev2-kzm9d.dts vendor/device-tree/dist/src/arm/emev2.dtsi vendor/device-tree/dist/src/arm/exynos3250-monk.dts vendor/device-tree/dist/src/arm/exynos3250-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos3250-rinato.dts vendor/device-tree/dist/src/arm/exynos3250.dtsi vendor/device-tree/dist/src/arm/exynos4.dtsi vendor/device-tree/dist/src/arm/exynos4210-origen.dts vendor/device-tree/dist/src/arm/exynos4210-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos4210-smdkv310.dts vendor/device-tree/dist/src/arm/exynos4210-trats.dts vendor/device-tree/dist/src/arm/exynos4210-universal_c210.dts vendor/device-tree/dist/src/arm/exynos4210.dtsi vendor/device-tree/dist/src/arm/exynos4412-odroid-common.dtsi vendor/device-tree/dist/src/arm/exynos4412-odroidx.dts vendor/device-tree/dist/src/arm/exynos4412-origen.dts vendor/device-tree/dist/src/arm/exynos4412-smdk4412.dts vendor/device-tree/dist/src/arm/exynos4412-trats2.dts vendor/device-tree/dist/src/arm/exynos4415.dtsi vendor/device-tree/dist/src/arm/exynos4x12-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos4x12.dtsi vendor/device-tree/dist/src/arm/exynos5.dtsi vendor/device-tree/dist/src/arm/exynos5250-arndale.dts vendor/device-tree/dist/src/arm/exynos5250-smdk5250.dts vendor/device-tree/dist/src/arm/exynos5250-snow-common.dtsi vendor/device-tree/dist/src/arm/exynos5250-spring.dts vendor/device-tree/dist/src/arm/exynos5250.dtsi vendor/device-tree/dist/src/arm/exynos5410-smdk5410.dts vendor/device-tree/dist/src/arm/exynos5410.dtsi vendor/device-tree/dist/src/arm/exynos5420-arndale-octa.dts vendor/device-tree/dist/src/arm/exynos5420-peach-pit.dts vendor/device-tree/dist/src/arm/exynos5420-smdk5420.dts vendor/device-tree/dist/src/arm/exynos5420.dtsi vendor/device-tree/dist/src/arm/exynos5422-cpu-thermal.dtsi vendor/device-tree/dist/src/arm/exynos5422-cpus.dtsi vendor/device-tree/dist/src/arm/exynos5422-odroidxu3-common.dtsi vendor/device-tree/dist/src/arm/exynos5440.dtsi vendor/device-tree/dist/src/arm/exynos5800-peach-pi.dts vendor/device-tree/dist/src/arm/exynos5800.dtsi vendor/device-tree/dist/src/arm/hi3620.dtsi vendor/device-tree/dist/src/arm/hip01.dtsi vendor/device-tree/dist/src/arm/hisi-x5hd2.dtsi vendor/device-tree/dist/src/arm/imx23.dtsi vendor/device-tree/dist/src/arm/imx25-eukrea-mbimxsd25-baseboard.dts vendor/device-tree/dist/src/arm/imx25-pinfunc.h vendor/device-tree/dist/src/arm/imx25.dtsi vendor/device-tree/dist/src/arm/imx28-apf28dev.dts vendor/device-tree/dist/src/arm/imx28-eukrea-mbmx28lc.dtsi vendor/device-tree/dist/src/arm/imx28-m28.dtsi vendor/device-tree/dist/src/arm/imx28-tx28.dts vendor/device-tree/dist/src/arm/imx28.dtsi vendor/device-tree/dist/src/arm/imx31.dtsi vendor/device-tree/dist/src/arm/imx35-eukrea-mbimxsd35-baseboard.dts vendor/device-tree/dist/src/arm/imx35.dtsi vendor/device-tree/dist/src/arm/imx51-babbage.dts vendor/device-tree/dist/src/arm/imx51-digi-connectcore-som.dtsi vendor/device-tree/dist/src/arm/imx51-eukrea-mbimxsd51-baseboard.dts vendor/device-tree/dist/src/arm/imx51-pinfunc.h vendor/device-tree/dist/src/arm/imx53-ard.dts vendor/device-tree/dist/src/arm/imx53-m53evk.dts vendor/device-tree/dist/src/arm/imx53-qsb-common.dtsi vendor/device-tree/dist/src/arm/imx53-tx53-x03x.dts vendor/device-tree/dist/src/arm/imx53-tx53-x13x.dts vendor/device-tree/dist/src/arm/imx53-tx53.dtsi vendor/device-tree/dist/src/arm/imx6dl-riotboard.dts vendor/device-tree/dist/src/arm/imx6dl-tx6dl-comtft.dts vendor/device-tree/dist/src/arm/imx6dl-tx6u-801x.dts vendor/device-tree/dist/src/arm/imx6dl-tx6u-811x.dts vendor/device-tree/dist/src/arm/imx6dl-wandboard-revb1.dts vendor/device-tree/dist/src/arm/imx6dl.dtsi vendor/device-tree/dist/src/arm/imx6q-gk802.dts vendor/device-tree/dist/src/arm/imx6q-gw5400-a.dts vendor/device-tree/dist/src/arm/imx6q-tbs2910.dts vendor/device-tree/dist/src/arm/imx6q-tx6q-1010-comtft.dts vendor/device-tree/dist/src/arm/imx6q-tx6q-1010.dts vendor/device-tree/dist/src/arm/imx6q-tx6q-1020-comtft.dts vendor/device-tree/dist/src/arm/imx6q-tx6q-1020.dts vendor/device-tree/dist/src/arm/imx6q-tx6q-1110.dts vendor/device-tree/dist/src/arm/imx6q-wandboard-revb1.dts vendor/device-tree/dist/src/arm/imx6q.dtsi vendor/device-tree/dist/src/arm/imx6qdl-apf6dev.dtsi vendor/device-tree/dist/src/arm/imx6qdl-gw51xx.dtsi vendor/device-tree/dist/src/arm/imx6qdl-gw52xx.dtsi vendor/device-tree/dist/src/arm/imx6qdl-gw53xx.dtsi vendor/device-tree/dist/src/arm/imx6qdl-gw54xx.dtsi vendor/device-tree/dist/src/arm/imx6qdl-gw552x.dtsi vendor/device-tree/dist/src/arm/imx6qdl-hummingboard.dtsi vendor/device-tree/dist/src/arm/imx6qdl-microsom.dtsi vendor/device-tree/dist/src/arm/imx6qdl-nit6xlite.dtsi vendor/device-tree/dist/src/arm/imx6qdl-nitrogen6_max.dtsi vendor/device-tree/dist/src/arm/imx6qdl-nitrogen6x.dtsi vendor/device-tree/dist/src/arm/imx6qdl-rex.dtsi vendor/device-tree/dist/src/arm/imx6qdl-sabrelite.dtsi vendor/device-tree/dist/src/arm/imx6qdl-sabresd.dtsi vendor/device-tree/dist/src/arm/imx6qdl-tx6.dtsi vendor/device-tree/dist/src/arm/imx6qdl-udoo.dtsi vendor/device-tree/dist/src/arm/imx6qdl-wandboard.dtsi vendor/device-tree/dist/src/arm/imx6qdl.dtsi vendor/device-tree/dist/src/arm/imx6sl-warp.dts vendor/device-tree/dist/src/arm/imx6sx-sabreauto.dts vendor/device-tree/dist/src/arm/imx6sx-sdb.dts vendor/device-tree/dist/src/arm/imx6sx-sdb.dtsi vendor/device-tree/dist/src/arm/imx6sx.dtsi vendor/device-tree/dist/src/arm/imx6ul-14x14-evk.dts vendor/device-tree/dist/src/arm/imx6ul-pinfunc.h vendor/device-tree/dist/src/arm/imx6ul.dtsi vendor/device-tree/dist/src/arm/imx7d-sbc-imx7.dts vendor/device-tree/dist/src/arm/imx7d-sdb.dts vendor/device-tree/dist/src/arm/imx7d.dtsi vendor/device-tree/dist/src/arm/integrator.dtsi vendor/device-tree/dist/src/arm/keystone.dtsi vendor/device-tree/dist/src/arm/kirkwood-6192.dtsi vendor/device-tree/dist/src/arm/kirkwood-6281.dtsi vendor/device-tree/dist/src/arm/kirkwood-6282.dtsi vendor/device-tree/dist/src/arm/kirkwood-98dx4122.dtsi vendor/device-tree/dist/src/arm/kirkwood-b3.dts vendor/device-tree/dist/src/arm/kirkwood-blackarmor-nas220.dts vendor/device-tree/dist/src/arm/kirkwood-cloudbox.dts vendor/device-tree/dist/src/arm/kirkwood-db-88f6281.dts vendor/device-tree/dist/src/arm/kirkwood-db-88f6282.dts vendor/device-tree/dist/src/arm/kirkwood-dir665.dts vendor/device-tree/dist/src/arm/kirkwood-dnskw.dtsi vendor/device-tree/dist/src/arm/kirkwood-ds111.dts vendor/device-tree/dist/src/arm/kirkwood-ds112.dts vendor/device-tree/dist/src/arm/kirkwood-ds212.dts vendor/device-tree/dist/src/arm/kirkwood-ds411.dts vendor/device-tree/dist/src/arm/kirkwood-ds411slim.dts vendor/device-tree/dist/src/arm/kirkwood-ib62x0.dts vendor/device-tree/dist/src/arm/kirkwood-iconnect.dts vendor/device-tree/dist/src/arm/kirkwood-km_common.dtsi vendor/device-tree/dist/src/arm/kirkwood-laplug.dts vendor/device-tree/dist/src/arm/kirkwood-lsxl.dtsi vendor/device-tree/dist/src/arm/kirkwood-mplcec4.dts vendor/device-tree/dist/src/arm/kirkwood-mv88f6281gtw-ge.dts vendor/device-tree/dist/src/arm/kirkwood-nas2big.dts vendor/device-tree/dist/src/arm/kirkwood-netgear_readynas_duo_v2.dts vendor/device-tree/dist/src/arm/kirkwood-netgear_readynas_nv+_v2.dts vendor/device-tree/dist/src/arm/kirkwood-netxbig.dtsi vendor/device-tree/dist/src/arm/kirkwood-ns2-common.dtsi vendor/device-tree/dist/src/arm/kirkwood-nsa310.dts vendor/device-tree/dist/src/arm/kirkwood-nsa320.dts vendor/device-tree/dist/src/arm/kirkwood-nsa325.dts vendor/device-tree/dist/src/arm/kirkwood-nsa3x0-common.dtsi vendor/device-tree/dist/src/arm/kirkwood-openblocks_a6.dts vendor/device-tree/dist/src/arm/kirkwood-openblocks_a7.dts vendor/device-tree/dist/src/arm/kirkwood-openrd-client.dts vendor/device-tree/dist/src/arm/kirkwood-openrd.dtsi vendor/device-tree/dist/src/arm/kirkwood-pogoplug-series-4.dts vendor/device-tree/dist/src/arm/kirkwood-rd88f6192.dts vendor/device-tree/dist/src/arm/kirkwood-rd88f6281-a.dts vendor/device-tree/dist/src/arm/kirkwood-rd88f6281-z0.dts vendor/device-tree/dist/src/arm/kirkwood-rd88f6281.dtsi vendor/device-tree/dist/src/arm/kirkwood-rs212.dts vendor/device-tree/dist/src/arm/kirkwood-synology.dtsi vendor/device-tree/dist/src/arm/kirkwood-t5325.dts vendor/device-tree/dist/src/arm/kirkwood-ts219-6281.dts vendor/device-tree/dist/src/arm/kirkwood-ts219-6282.dts vendor/device-tree/dist/src/arm/kirkwood-ts219.dtsi vendor/device-tree/dist/src/arm/kirkwood-ts419-6282.dts vendor/device-tree/dist/src/arm/kirkwood-ts419.dtsi vendor/device-tree/dist/src/arm/kirkwood.dtsi vendor/device-tree/dist/src/arm/logicpd-torpedo-37xx-devkit.dts vendor/device-tree/dist/src/arm/logicpd-torpedo-som.dtsi vendor/device-tree/dist/src/arm/lpc18xx.dtsi vendor/device-tree/dist/src/arm/lpc32xx.dtsi vendor/device-tree/dist/src/arm/lpc4350-hitex-eval.dts vendor/device-tree/dist/src/arm/lpc4357-ea4357-devkit.dts vendor/device-tree/dist/src/arm/ls1021a.dtsi vendor/device-tree/dist/src/arm/meson8.dtsi vendor/device-tree/dist/src/arm/meson8b.dtsi vendor/device-tree/dist/src/arm/mt2701.dtsi vendor/device-tree/dist/src/arm/omap2420-clocks.dtsi vendor/device-tree/dist/src/arm/omap2420-n8x0-common.dtsi vendor/device-tree/dist/src/arm/omap2420.dtsi vendor/device-tree/dist/src/arm/omap2430-clocks.dtsi vendor/device-tree/dist/src/arm/omap2430.dtsi vendor/device-tree/dist/src/arm/omap24xx-clocks.dtsi vendor/device-tree/dist/src/arm/omap3-beagle.dts vendor/device-tree/dist/src/arm/omap3-cm-t3x.dtsi vendor/device-tree/dist/src/arm/omap3-devkit8000-common.dtsi vendor/device-tree/dist/src/arm/omap3-evm-37xx.dts vendor/device-tree/dist/src/arm/omap3-gta04.dtsi vendor/device-tree/dist/src/arm/omap3-igep.dtsi vendor/device-tree/dist/src/arm/omap3-igep0020-common.dtsi vendor/device-tree/dist/src/arm/omap3-igep0030-common.dtsi vendor/device-tree/dist/src/arm/omap3-ldp.dts vendor/device-tree/dist/src/arm/omap3-lilly-a83x.dtsi vendor/device-tree/dist/src/arm/omap3-n9.dts vendor/device-tree/dist/src/arm/omap3-n900.dts vendor/device-tree/dist/src/arm/omap3-n950-n9.dtsi vendor/device-tree/dist/src/arm/omap3-n950.dts vendor/device-tree/dist/src/arm/omap3-overo-base.dtsi vendor/device-tree/dist/src/arm/omap3-pandora-common.dtsi vendor/device-tree/dist/src/arm/omap3-tao3530.dtsi vendor/device-tree/dist/src/arm/omap3-zoom3.dts vendor/device-tree/dist/src/arm/omap3.dtsi vendor/device-tree/dist/src/arm/omap3430-sdp.dts vendor/device-tree/dist/src/arm/omap3430es1-clocks.dtsi vendor/device-tree/dist/src/arm/omap34xx-omap36xx-clocks.dtsi vendor/device-tree/dist/src/arm/omap34xx.dtsi vendor/device-tree/dist/src/arm/omap36xx-am35xx-omap3430es2plus-clocks.dtsi vendor/device-tree/dist/src/arm/omap36xx-clocks.dtsi vendor/device-tree/dist/src/arm/omap36xx-omap3430es2plus-clocks.dtsi vendor/device-tree/dist/src/arm/omap36xx.dtsi vendor/device-tree/dist/src/arm/omap3xxx-clocks.dtsi vendor/device-tree/dist/src/arm/omap4-var-som-om44.dtsi vendor/device-tree/dist/src/arm/omap4.dtsi vendor/device-tree/dist/src/arm/omap443x-clocks.dtsi vendor/device-tree/dist/src/arm/omap443x.dtsi vendor/device-tree/dist/src/arm/omap4460.dtsi vendor/device-tree/dist/src/arm/omap446x-clocks.dtsi vendor/device-tree/dist/src/arm/omap44xx-clocks.dtsi vendor/device-tree/dist/src/arm/omap5-board-common.dtsi vendor/device-tree/dist/src/arm/omap5-cm-t54.dts vendor/device-tree/dist/src/arm/omap5-igep0050.dts vendor/device-tree/dist/src/arm/omap5-uevm.dts vendor/device-tree/dist/src/arm/omap5.dtsi vendor/device-tree/dist/src/arm/omap54xx-clocks.dtsi vendor/device-tree/dist/src/arm/orion5x-linkstation-lswtgl.dts vendor/device-tree/dist/src/arm/pxa27x.dtsi vendor/device-tree/dist/src/arm/pxa3xx.dtsi vendor/device-tree/dist/src/arm/qcom-apq8064-cm-qs600.dts vendor/device-tree/dist/src/arm/qcom-apq8064-ifc6410.dts vendor/device-tree/dist/src/arm/qcom-apq8064.dtsi vendor/device-tree/dist/src/arm/qcom-apq8084.dtsi vendor/device-tree/dist/src/arm/qcom-ipq8064.dtsi vendor/device-tree/dist/src/arm/qcom-msm8660.dtsi vendor/device-tree/dist/src/arm/qcom-msm8960.dtsi vendor/device-tree/dist/src/arm/qcom-msm8974.dtsi vendor/device-tree/dist/src/arm/qcom-pm8841.dtsi vendor/device-tree/dist/src/arm/qcom-pm8941.dtsi vendor/device-tree/dist/src/arm/r7s72100.dtsi vendor/device-tree/dist/src/arm/r8a73a4-ape6evm.dts vendor/device-tree/dist/src/arm/r8a73a4.dtsi vendor/device-tree/dist/src/arm/r8a7740-armadillo800eva.dts vendor/device-tree/dist/src/arm/r8a7740.dtsi vendor/device-tree/dist/src/arm/r8a7778-bockw.dts vendor/device-tree/dist/src/arm/r8a7778.dtsi vendor/device-tree/dist/src/arm/r8a7779-marzen.dts vendor/device-tree/dist/src/arm/r8a7779.dtsi vendor/device-tree/dist/src/arm/r8a7790-lager.dts vendor/device-tree/dist/src/arm/r8a7790.dtsi vendor/device-tree/dist/src/arm/r8a7791-koelsch.dts vendor/device-tree/dist/src/arm/r8a7791-porter.dts vendor/device-tree/dist/src/arm/r8a7791.dtsi vendor/device-tree/dist/src/arm/r8a7793-gose.dts vendor/device-tree/dist/src/arm/r8a7793.dtsi vendor/device-tree/dist/src/arm/r8a7794-alt.dts vendor/device-tree/dist/src/arm/r8a7794-silk.dts vendor/device-tree/dist/src/arm/r8a7794.dtsi vendor/device-tree/dist/src/arm/rk3036-evb.dts vendor/device-tree/dist/src/arm/rk3036-kylin.dts vendor/device-tree/dist/src/arm/rk3036.dtsi vendor/device-tree/dist/src/arm/rk3066a-bqcurie2.dts vendor/device-tree/dist/src/arm/rk3066a-marsboard.dts vendor/device-tree/dist/src/arm/rk3066a-rayeager.dts vendor/device-tree/dist/src/arm/rk3066a.dtsi vendor/device-tree/dist/src/arm/rk3188-radxarock.dts vendor/device-tree/dist/src/arm/rk3188.dtsi vendor/device-tree/dist/src/arm/rk3228-evb.dts vendor/device-tree/dist/src/arm/rk3228.dtsi vendor/device-tree/dist/src/arm/rk3288-evb.dtsi vendor/device-tree/dist/src/arm/rk3288-firefly.dtsi vendor/device-tree/dist/src/arm/rk3288-popmetal.dts vendor/device-tree/dist/src/arm/rk3288-r89.dts vendor/device-tree/dist/src/arm/rk3288-rock2-som.dtsi vendor/device-tree/dist/src/arm/rk3288-rock2-square.dts vendor/device-tree/dist/src/arm/rk3288-veyron-chromebook.dtsi vendor/device-tree/dist/src/arm/rk3288-veyron-jaq.dts vendor/device-tree/dist/src/arm/rk3288-veyron-jerry.dts vendor/device-tree/dist/src/arm/rk3288-veyron-minnie.dts vendor/device-tree/dist/src/arm/rk3288-veyron-pinky.dts vendor/device-tree/dist/src/arm/rk3288-veyron-speedy.dts vendor/device-tree/dist/src/arm/rk3288-veyron.dtsi vendor/device-tree/dist/src/arm/rk3288.dtsi vendor/device-tree/dist/src/arm/rk3xxx.dtsi vendor/device-tree/dist/src/arm/s5pv210-aquila.dts vendor/device-tree/dist/src/arm/s5pv210-goni.dts vendor/device-tree/dist/src/arm/s5pv210-smdkv210.dts vendor/device-tree/dist/src/arm/s5pv210.dtsi vendor/device-tree/dist/src/arm/sama5d2-pinfunc.h vendor/device-tree/dist/src/arm/sama5d2.dtsi vendor/device-tree/dist/src/arm/sama5d3.dtsi vendor/device-tree/dist/src/arm/sama5d4.dtsi vendor/device-tree/dist/src/arm/sh73a0-kzm9g.dts vendor/device-tree/dist/src/arm/sh73a0.dtsi vendor/device-tree/dist/src/arm/socfpga.dtsi vendor/device-tree/dist/src/arm/socfpga_arria10.dtsi vendor/device-tree/dist/src/arm/socfpga_arria10_socdk_sdmmc.dts vendor/device-tree/dist/src/arm/socfpga_cyclone5.dtsi vendor/device-tree/dist/src/arm/socfpga_cyclone5_sockit.dts vendor/device-tree/dist/src/arm/socfpga_cyclone5_socrates.dts vendor/device-tree/dist/src/arm/spear1310-evb.dts vendor/device-tree/dist/src/arm/spear1340-evb.dts vendor/device-tree/dist/src/arm/spear13xx.dtsi vendor/device-tree/dist/src/arm/spear320-hmi.dts vendor/device-tree/dist/src/arm/ste-ccu9540.dts vendor/device-tree/dist/src/arm/ste-dbx5x0.dtsi vendor/device-tree/dist/src/arm/ste-href-stuib.dtsi vendor/device-tree/dist/src/arm/ste-href-tvk1281618.dtsi vendor/device-tree/dist/src/arm/ste-hrefprev60.dtsi vendor/device-tree/dist/src/arm/ste-hrefv60plus.dtsi vendor/device-tree/dist/src/arm/ste-nomadik-nhk15.dts vendor/device-tree/dist/src/arm/ste-nomadik-stn8815.dtsi vendor/device-tree/dist/src/arm/ste-snowball.dts vendor/device-tree/dist/src/arm/ste-u300.dts vendor/device-tree/dist/src/arm/stih407-family.dtsi vendor/device-tree/dist/src/arm/stm32429i-eval.dts vendor/device-tree/dist/src/arm/stm32f429-disco.dts vendor/device-tree/dist/src/arm/stm32f429.dtsi vendor/device-tree/dist/src/arm/sun4i-a10-a1000.dts vendor/device-tree/dist/src/arm/sun4i-a10-chuwi-v7-cw0825.dts vendor/device-tree/dist/src/arm/sun4i-a10-hyundai-a7hd.dts vendor/device-tree/dist/src/arm/sun4i-a10-inet97fv2.dts vendor/device-tree/dist/src/arm/sun4i-a10-inet9f-rev03.dts vendor/device-tree/dist/src/arm/sun4i-a10-itead-iteaduino-plus.dts vendor/device-tree/dist/src/arm/sun4i-a10-mk802.dts vendor/device-tree/dist/src/arm/sun4i-a10.dtsi vendor/device-tree/dist/src/arm/sun5i-a10s.dtsi vendor/device-tree/dist/src/arm/sun5i-a13-empire-electronix-d709.dts vendor/device-tree/dist/src/arm/sun5i-a13-inet-98v-rev2.dts vendor/device-tree/dist/src/arm/sun5i-a13-olinuxino-micro.dts vendor/device-tree/dist/src/arm/sun5i-a13.dtsi vendor/device-tree/dist/src/arm/sun5i-r8-chip.dts vendor/device-tree/dist/src/arm/sun5i-r8.dtsi vendor/device-tree/dist/src/arm/sun5i.dtsi vendor/device-tree/dist/src/arm/sun6i-a31.dtsi vendor/device-tree/dist/src/arm/sun6i-a31s-primo81.dts vendor/device-tree/dist/src/arm/sun6i-a31s-sina31s-core.dtsi vendor/device-tree/dist/src/arm/sun6i-a31s-yones-toptech-bs1078-v2.dts vendor/device-tree/dist/src/arm/sun7i-a20-cubietruck.dts vendor/device-tree/dist/src/arm/sun7i-a20-mk808c.dts vendor/device-tree/dist/src/arm/sun7i-a20-olimex-som-evb.dts vendor/device-tree/dist/src/arm/sun7i-a20.dtsi vendor/device-tree/dist/src/arm/sun8i-a23-a33.dtsi vendor/device-tree/dist/src/arm/sun8i-a23-gt90h-v4.dts vendor/device-tree/dist/src/arm/sun8i-a33-sinlinx-sina33.dts vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-plus.dts vendor/device-tree/dist/src/arm/sun8i-h3.dtsi vendor/device-tree/dist/src/arm/sun8i-q8-common.dtsi vendor/device-tree/dist/src/arm/sun9i-a80-cubieboard4.dts vendor/device-tree/dist/src/arm/sun9i-a80-optimus.dts vendor/device-tree/dist/src/arm/sun9i-a80.dtsi vendor/device-tree/dist/src/arm/tango4-common.dtsi vendor/device-tree/dist/src/arm/tango4-smp8758.dtsi vendor/device-tree/dist/src/arm/tango4-vantage-1172.dts vendor/device-tree/dist/src/arm/tegra114-dalmore.dts vendor/device-tree/dist/src/arm/tegra114-roth.dts vendor/device-tree/dist/src/arm/tegra114-tn7.dts vendor/device-tree/dist/src/arm/tegra114.dtsi vendor/device-tree/dist/src/arm/tegra124-jetson-tk1.dts vendor/device-tree/dist/src/arm/tegra124-nyan.dtsi vendor/device-tree/dist/src/arm/tegra124-venice2.dts vendor/device-tree/dist/src/arm/tegra124.dtsi vendor/device-tree/dist/src/arm/tegra20-harmony.dts vendor/device-tree/dist/src/arm/tegra20-iris-512.dts vendor/device-tree/dist/src/arm/tegra20-medcom-wide.dts vendor/device-tree/dist/src/arm/tegra20-paz00.dts vendor/device-tree/dist/src/arm/tegra20-seaboard.dts vendor/device-tree/dist/src/arm/tegra20-tamonten.dtsi vendor/device-tree/dist/src/arm/tegra20-trimslice.dts vendor/device-tree/dist/src/arm/tegra20-ventana.dts vendor/device-tree/dist/src/arm/tegra20-whistler.dts vendor/device-tree/dist/src/arm/tegra20.dtsi vendor/device-tree/dist/src/arm/tegra30-apalis-eval.dts vendor/device-tree/dist/src/arm/tegra30-beaver.dts vendor/device-tree/dist/src/arm/tegra30-cardhu.dtsi vendor/device-tree/dist/src/arm/tegra30-colibri-eval-v3.dts vendor/device-tree/dist/src/arm/tegra30.dtsi vendor/device-tree/dist/src/arm/twl6030.dtsi vendor/device-tree/dist/src/arm/uniphier-common32.dtsi vendor/device-tree/dist/src/arm/uniphier-ph1-ld4-ref.dts vendor/device-tree/dist/src/arm/uniphier-ph1-ld4.dtsi vendor/device-tree/dist/src/arm/uniphier-ph1-ld6b-ref.dts vendor/device-tree/dist/src/arm/uniphier-ph1-pro4-ref.dts vendor/device-tree/dist/src/arm/uniphier-ph1-pro4.dtsi vendor/device-tree/dist/src/arm/uniphier-ph1-pro5.dtsi vendor/device-tree/dist/src/arm/uniphier-ph1-sld3-ref.dts vendor/device-tree/dist/src/arm/uniphier-ph1-sld3.dtsi vendor/device-tree/dist/src/arm/uniphier-ph1-sld8-ref.dts vendor/device-tree/dist/src/arm/uniphier-ph1-sld8.dtsi vendor/device-tree/dist/src/arm/uniphier-pinctrl.dtsi vendor/device-tree/dist/src/arm/uniphier-proxstream2-gentil.dts vendor/device-tree/dist/src/arm/uniphier-proxstream2.dtsi vendor/device-tree/dist/src/arm/uniphier-ref-daughter.dtsi vendor/device-tree/dist/src/arm/uniphier-support-card.dtsi vendor/device-tree/dist/src/arm/versatile-ab.dts vendor/device-tree/dist/src/arm/vexpress-v2m-rs1.dtsi vendor/device-tree/dist/src/arm/vexpress-v2m.dtsi vendor/device-tree/dist/src/arm/vexpress-v2p-ca15-tc1.dts vendor/device-tree/dist/src/arm/vexpress-v2p-ca15_a7.dts vendor/device-tree/dist/src/arm/vexpress-v2p-ca5s.dts vendor/device-tree/dist/src/arm/vexpress-v2p-ca9.dts vendor/device-tree/dist/src/arm/vf-colibri-eval-v3.dtsi vendor/device-tree/dist/src/arm/vf-colibri.dtsi vendor/device-tree/dist/src/arm/vf500-colibri-eval-v3.dts vendor/device-tree/dist/src/arm/vf500-colibri.dtsi vendor/device-tree/dist/src/arm/vf500.dtsi vendor/device-tree/dist/src/arm/vf610-colibri-eval-v3.dts vendor/device-tree/dist/src/arm/vf610-colibri.dtsi vendor/device-tree/dist/src/arm/vf610-twr.dts vendor/device-tree/dist/src/arm/vf610.dtsi vendor/device-tree/dist/src/arm/vfxxx.dtsi vendor/device-tree/dist/src/arm/zynq-parallella.dts vendor/device-tree/dist/src/arm/zynq-zc702.dts vendor/device-tree/dist/src/arm/zynq-zc706.dts vendor/device-tree/dist/src/arm/zynq-zed.dts vendor/device-tree/dist/src/arm/zynq-zybo.dts vendor/device-tree/dist/src/arm64/amd/amd-seattle-soc.dtsi vendor/device-tree/dist/src/arm64/apm/apm-merlin.dts vendor/device-tree/dist/src/arm64/apm/apm-mustang.dts vendor/device-tree/dist/src/arm64/apm/apm-shadowcat.dtsi vendor/device-tree/dist/src/arm64/apm/apm-storm.dtsi vendor/device-tree/dist/src/arm64/arm/foundation-v8.dts vendor/device-tree/dist/src/arm64/arm/juno-base.dtsi vendor/device-tree/dist/src/arm64/arm/juno-motherboard.dtsi vendor/device-tree/dist/src/arm64/arm/juno-r1.dts vendor/device-tree/dist/src/arm64/arm/rtsm_ve-aemv8a.dts vendor/device-tree/dist/src/arm64/arm/rtsm_ve-motherboard.dtsi vendor/device-tree/dist/src/arm64/arm/vexpress-v2f-1xv7-ca53x2.dts vendor/device-tree/dist/src/arm64/arm/vexpress-v2m-rs1.dtsi vendor/device-tree/dist/src/arm64/broadcom/ns2-svk.dts vendor/device-tree/dist/src/arm64/broadcom/ns2.dtsi vendor/device-tree/dist/src/arm64/cavium/thunder-88xx.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos7.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-ls1043a-rdb.dts vendor/device-tree/dist/src/arm64/freescale/fsl-ls1043a.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-ls2080a-qds.dts vendor/device-tree/dist/src/arm64/freescale/fsl-ls2080a.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hi6220-hikey.dts vendor/device-tree/dist/src/arm64/hisilicon/hi6220.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hip05-d02.dts vendor/device-tree/dist/src/arm64/hisilicon/hip05.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hip05_hns.dtsi vendor/device-tree/dist/src/arm64/mediatek/mt8173-evb.dts vendor/device-tree/dist/src/arm64/mediatek/mt8173.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra132-norrin.dts vendor/device-tree/dist/src/arm64/nvidia/tegra132.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra210-p2180.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra210-p2530.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra210-p2571.dts vendor/device-tree/dist/src/arm64/nvidia/tegra210-p2595.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra210-p2597.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra210.dtsi vendor/device-tree/dist/src/arm64/qcom/apq8016-sbc-pmic-pins.dtsi vendor/device-tree/dist/src/arm64/qcom/apq8016-sbc-soc-pins.dtsi vendor/device-tree/dist/src/arm64/qcom/apq8016-sbc.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8916-pins.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8916.dtsi vendor/device-tree/dist/src/arm64/qcom/pm8916.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a7795-salvator-x.dts vendor/device-tree/dist/src/arm64/renesas/r8a7795.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3368-evb.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3368-r88.dts vendor/device-tree/dist/src/arm64/rockchip/rk3368.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-pinctrl.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-support-card.dtsi vendor/device-tree/dist/src/arm64/xilinx/zynqmp-ep108.dts vendor/device-tree/dist/src/arm64/xilinx/zynqmp.dtsi vendor/device-tree/dist/src/mips/brcm/bcm6328.dtsi vendor/device-tree/dist/src/mips/brcm/bcm6368.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7125.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7346.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7358.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7360.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7362.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7420.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7425.dtsi vendor/device-tree/dist/src/mips/brcm/bcm7435.dtsi vendor/device-tree/dist/src/mips/brcm/bcm96368mvwg.dts vendor/device-tree/dist/src/mips/brcm/bcm97125cbmb.dts vendor/device-tree/dist/src/mips/brcm/bcm97360svmb.dts vendor/device-tree/dist/src/mips/brcm/bcm97420c.dts vendor/device-tree/dist/src/mips/brcm/bcm97425svmb.dts vendor/device-tree/dist/src/mips/brcm/bcm97435svmb.dts vendor/device-tree/dist/src/mips/cavium-octeon/octeon_3xxx.dts vendor/device-tree/dist/src/mips/ingenic/jz4740.dtsi vendor/device-tree/dist/src/mips/lantiq/easy50712.dts vendor/device-tree/dist/src/mips/pic32/pic32mzda.dtsi vendor/device-tree/dist/src/mips/pic32/pic32mzda_sk.dts vendor/device-tree/dist/src/mips/qca/ar9132.dtsi vendor/device-tree/dist/src/mips/qca/ar9132_tl_wr1043nd_v1.dts vendor/device-tree/dist/src/mips/ralink/mt7620a.dtsi vendor/device-tree/dist/src/mips/ralink/rt2880.dtsi vendor/device-tree/dist/src/mips/ralink/rt3050.dtsi vendor/device-tree/dist/src/mips/ralink/rt3883.dtsi vendor/device-tree/dist/src/mips/xilfpga/nexys4ddr.dts Modified: vendor/device-tree/dist/Bindings/arc/archs-pct.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arc/archs-pct.txt Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arc/archs-pct.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -2,7 +2,7 @@ The ARC HS can be configured with a pipeline performance monitor for counting CPU and cache events like cache misses and hits. Like conventional PCT there -are 100+ hardware conditions dynamically mapped to upto 32 counters. +are 100+ hardware conditions dynamically mapped to up to 32 counters. It also supports overflow interrupts. Required properties: Added: vendor/device-tree/dist/Bindings/arc/eznps.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arc/eznps.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,7 @@ +EZchip NPS Network Processor Platforms Device Tree Bindings +--------------------------------------------------------------------------- + +Appliance main board with NPS400 ASIC. + +Required root node properties: + - compatible = "ezchip,arc-nps"; Modified: vendor/device-tree/dist/Bindings/arc/pct.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arc/pct.txt Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arc/pct.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -2,7 +2,7 @@ The ARC700 can be configured with a pipeline performance monitor for counting CPU and cache events like cache misses and hits. Like conventional PCT there -are 100+ hardware conditions dynamically mapped to upto 32 counters +are 100+ hardware conditions dynamically mapped to up to 32 counters Note that: * The ARC 700 PCT does not support interrupts; although HW events may be Added: vendor/device-tree/dist/Bindings/arm/altera/socfpga-eccmgr.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/altera/socfpga-eccmgr.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,99 @@ +Altera SoCFPGA ECC Manager +This driver uses the EDAC framework to implement the SOCFPGA ECC Manager. +The ECC Manager counts and corrects single bit errors and counts/handles +double bit errors which are uncorrectable. + +Cyclone5 and Arria5 ECC Manager +Required Properties: +- compatible : Should be "altr,socfpga-ecc-manager" +- #address-cells: must be 1 +- #size-cells: must be 1 +- ranges : standard definition, should translate from local addresses + +Subcomponents: + +L2 Cache ECC +Required Properties: +- compatible : Should be "altr,socfpga-l2-ecc" +- reg : Address and size for ECC error interrupt clear registers. +- interrupts : Should be single bit error interrupt, then double bit error + interrupt. Note the rising edge type. + +On Chip RAM ECC +Required Properties: +- compatible : Should be "altr,socfpga-ocram-ecc" +- reg : Address and size for ECC error interrupt clear registers. +- iram : phandle to On-Chip RAM definition. +- interrupts : Should be single bit error interrupt, then double bit error + interrupt. Note the rising edge type. + +Example: + + eccmgr: eccmgr@ffd08140 { + compatible = "altr,socfpga-ecc-manager"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + l2-ecc@ffd08140 { + compatible = "altr,socfpga-l2-ecc"; + reg = <0xffd08140 0x4>; + interrupts = <0 36 1>, <0 37 1>; + }; + + ocram-ecc@ffd08144 { + compatible = "altr,socfpga-ocram-ecc"; + reg = <0xffd08144 0x4>; + iram = <&ocram>; + interrupts = <0 178 1>, <0 179 1>; + }; + }; + +Arria10 SoCFPGA ECC Manager +The Arria10 SoC ECC Manager handles the IRQs for each peripheral +in a shared register instead of individual IRQs like the Cyclone5 +and Arria5. Therefore the device tree is different as well. + +Required Properties: +- compatible : Should be "altr,socfpga-a10-ecc-manager" +- altr,sysgr-syscon : phandle to Arria10 System Manager Block + containing the ECC manager registers. +- #address-cells: must be 1 +- #size-cells: must be 1 +- interrupts : Should be single bit error interrupt, then double bit error + interrupt. Note the rising edge type. +- ranges : standard definition, should translate from local addresses + +Subcomponents: + +L2 Cache ECC +Required Properties: +- compatible : Should be "altr,socfpga-a10-l2-ecc" +- reg : Address and size for ECC error interrupt clear registers. + +On-Chip RAM ECC +Required Properties: +- compatible : Should be "altr,socfpga-a10-ocram-ecc" +- reg : Address and size for ECC block registers. + +Example: + + eccmgr: eccmgr@ffd06000 { + compatible = "altr,socfpga-a10-ecc-manager"; + altr,sysmgr-syscon = <&sysmgr>; + #address-cells = <1>; + #size-cells = <1>; + interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>, + <0 0 IRQ_TYPE_LEVEL_HIGH>; + ranges; + + l2-ecc@ffd06010 { + compatible = "altr,socfpga-a10-l2-ecc"; + reg = <0xffd06010 0x4>; + }; + + ocram-ecc@ff8c3000 { + compatible = "altr,socfpga-a10-ocram-ecc"; + reg = <0xff8c3000 0x90>; + }; + }; Modified: vendor/device-tree/dist/Bindings/arm/amlogic.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/amlogic.txt Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arm/amlogic.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -13,8 +13,18 @@ Boards with the Amlogic Meson8b SoC shal Required root node property: compatible: "amlogic,meson8b"; +Boards with the Amlogic Meson GXBaby SoC shall have the following properties: + Required root node property: + compatible: "amlogic,meson-gxbb"; + Board compatible values: - "geniatech,atv1200" (Meson6) - "minix,neo-x8" (Meson8) - "tronfy,mxq" (Meson8b) - "hardkernel,odroid-c1" (Meson8b) + - "tronsmart,vega-s95-pro", "tronsmart,vega-s95" (Meson gxbb) + - "tronsmart,vega-s95-meta", "tronsmart,vega-s95" (Meson gxbb) + - "tronsmart,vega-s95-telos", "tronsmart,vega-s95" (Meson gxbb) + - "hardkernel,odroid-c2" (Meson gxbb) + - "amlogic,p200" (Meson gxbb) + - "amlogic,p201" (Meson gxbb) Modified: vendor/device-tree/dist/Bindings/arm/arm-boards ============================================================================== --- vendor/device-tree/dist/Bindings/arm/arm-boards Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arm/arm-boards Wed Jul 27 10:33:45 2016 (r303380) @@ -93,6 +93,14 @@ Required nodes: a core-module with regs and the compatible strings "arm,core-module-versatile", "syscon" +Optional nodes: + +- arm,versatile-ib2-syscon : if the Versatile has an IB2 interface + board mounted, this has a separate system controller that is + defined in this node. + Required properties: + compatible = "arm,versatile-ib2-syscon", "syscon" + ARM RealView Boards ------------------- The RealView boards cover tailored evaluation boards that are used to explore @@ -123,7 +131,9 @@ Required nodes: - syscon: some subnode of the RealView SoC node must be a system controller node pointing to the control registers, - with the compatible string set to one of these tuples: + with the compatible string set to one of these: + "arm,realview-eb11mp-revb-syscon", "arm,realview-eb-syscon", "syscon" + "arm,realview-eb11mp-revc-syscon", "arm,realview-eb-syscon", "syscon" "arm,realview-eb-syscon", "syscon" "arm,realview-pb1176-syscon", "syscon" "arm,realview-pb11mp-syscon", "syscon" @@ -180,6 +190,7 @@ described under the RS1 memory mapping. Required properties (in root node): compatible = "arm,juno"; /* For Juno r0 board */ compatible = "arm,juno-r1"; /* For Juno r1 board */ + compatible = "arm,juno-r2"; /* For Juno r2 board */ Required nodes: The description for the board must include: Modified: vendor/device-tree/dist/Bindings/arm/atmel-at91.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/atmel-at91.txt Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arm/atmel-at91.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -41,6 +41,10 @@ compatible: must be one of: - "atmel,sama5d43" - "atmel,sama5d44" +Chipid required properties: +- compatible: Should be "atmel,sama5d2-chipid" +- reg : Should contain registers location and length + PIT Timer required properties: - compatible: Should be "atmel,at91sam9260-pit" - reg: Should contain registers location and length @@ -147,6 +151,65 @@ Example: clocks = <&clk32k>; }; +SHDWC SAMA5D2-Compatible Shutdown Controller + +1) shdwc node + +required properties: +- compatible: should be "atmel,sama5d2-shdwc". +- reg: should contain registers location and length +- clocks: phandle to input clock. +- #address-cells: should be one. The cell is the wake-up input index. +- #size-cells: should be zero. + +optional properties: + +- debounce-delay-us: minimum wake-up inputs debouncer period in + microseconds. It's usually a board-related property. +- atmel,wakeup-rtc-timer: boolean to enable Real-Time Clock wake-up. + +The node contains child nodes for each wake-up input that the platform uses. + +2) input nodes + +Wake-up input nodes are usually described in the "board" part of the Device +Tree. Note also that input 0 is linked to the wake-up pin and is frequently +used. + +Required properties: +- reg: should contain the wake-up input index [0 - 15]. + +Optional properties: +- atmel,wakeup-active-high: boolean, the corresponding wake-up input described + by the child, forces the wake-up of the core power supply on a high level. + The default is to be active low. + +Example: + +On the SoC side: + shdwc@f8048010 { + compatible = "atmel,sama5d2-shdwc"; + reg = <0xf8048010 0x10>; + clocks = <&clk32k>; + #address-cells = <1>; + #size-cells = <0>; + atmel,wakeup-rtc-timer; + }; + +On the board side: + shdwc@f8048010 { + debounce-delay-us = <976>; + + input@0 { + reg = <0>; + }; + + input@1 { + reg = <1>; + atmel,wakeup-active-high; + }; + }; + Special Function Registers (SFR) Special Function Registers (SFR) manage specific aspects of the integrated @@ -155,7 +218,7 @@ elsewhere. required properties: - compatible: Should be "atmel,-sfr", "syscon". - can be "sama5d3" or "sama5d4". + can be "sama5d3", "sama5d4" or "sama5d2". - reg: Should contain registers location and length sfr@f0038000 { Added: vendor/device-tree/dist/Bindings/arm/axis.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/axis.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,29 @@ +Axis Communications AB +ARTPEC series SoC Device Tree Bindings + +ARTPEC-6 ARM SoC +================ + +Required root node properties: +- compatible = "axis,artpec6"; + +ARTPEC-6 System Controller +-------------------------- + +The ARTPEC-6 has a system controller with mixed functions controlling DMA, PCIe +and resets. + +Required properties: +- compatible: "axis,artpec6-syscon", "syscon" +- reg: Address and length of the register bank. + +Example: + syscon { + compatible = "axis,artpec6-syscon", "syscon"; + reg = <0xf8000000 0x48>; + }; + +ARTPEC-6 Development board: +--------------------------- +Required root node properties: +- compatible = "axis,artpec6-dev-board", "axis,artpec6"; Added: vendor/device-tree/dist/Bindings/arm/bcm/brcm,vulcan-soc.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/bcm/brcm,vulcan-soc.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,10 @@ +Broadcom Vulcan device tree bindings +------------------------------------ + +Boards with Broadcom Vulcan shall have the following root property: + +Broadcom Vulcan Evaluation Board: + compatible = "brcm,vulcan-eval", "brcm,vulcan-soc"; + +Generic Vulcan board: + compatible = "brcm,vulcan-soc"; Modified: vendor/device-tree/dist/Bindings/arm/cci.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/cci.txt Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arm/cci.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -34,6 +34,7 @@ specific to ARM. Definition: must contain one of the following: "arm,cci-400" "arm,cci-500" + "arm,cci-550" - reg Usage: required @@ -99,8 +100,9 @@ specific to ARM. "arm,cci-400-pmu,r0" "arm,cci-400-pmu,r1" "arm,cci-400-pmu" - DEPRECATED, permitted only where OS has - secure acces to CCI registers + secure access to CCI registers "arm,cci-500-pmu,r0" + "arm,cci-550-pmu,r0" - reg: Usage: required Value type: Integer cells. A register entry, expressed Modified: vendor/device-tree/dist/Bindings/arm/coresight.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/coresight.txt Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arm/coresight.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -19,6 +19,7 @@ its hardware characteristcs. - "arm,coresight-etm3x", "arm,primecell"; - "arm,coresight-etm4x", "arm,primecell"; - "qcom,coresight-replicator1x", "arm,primecell"; + - "arm,coresight-stm", "arm,primecell"; [1] * reg: physical base address and length of the register set(s) of the component. @@ -36,6 +37,14 @@ its hardware characteristcs. layout using the generic DT graph presentation found in "bindings/graph.txt". +* Additional required properties for System Trace Macrocells (STM): + * reg: along with the physical base address and length of the register + set as described above, another entry is required to describe the + mapping of the extended stimulus port area. + + * reg-names: the only acceptable values are "stm-base" and + "stm-stimulus-base", each corresponding to the areas defined in "reg". + * Required properties for devices that don't show up on the AMBA bus, such as non-configurable replicators: @@ -202,3 +211,22 @@ Example: }; }; }; + +4. STM + stm@20100000 { + compatible = "arm,coresight-stm", "arm,primecell"; + reg = <0 0x20100000 0 0x1000>, + <0 0x28000000 0 0x180000>; + reg-names = "stm-base", "stm-stimulus-base"; + + clocks = <&soc_smc50mhz>; + clock-names = "apb_pclk"; + port { + stm_out_port: endpoint { + remote-endpoint = <&main_funnel_in_port2>; + }; + }; + }; + +[1]. There is currently two version of STM: STM32 and STM500. Both +have the same HW interface and as such don't need an explicit binding name. Modified: vendor/device-tree/dist/Bindings/arm/cpus.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/cpus.txt Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arm/cpus.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -167,6 +167,7 @@ nodes to be present and contain the prop "arm,cortex-r5" "arm,cortex-r7" "brcm,brahma-b15" + "brcm,vulcan" "cavium,thunder" "faraday,fa526" "intel,sa110" @@ -178,6 +179,7 @@ nodes to be present and contain the prop "marvell,sheeva-v5" "nvidia,tegra132-denver" "qcom,krait" + "qcom,kryo" "qcom,scorpion" - enable-method Value type: @@ -190,7 +192,6 @@ nodes to be present and contain the prop can be one of: "allwinner,sun6i-a31" "allwinner,sun8i-a23" - "arm,psci" "arm,realview-smp" "brcm,bcm-nsp-smp" "brcm,brahma-b15" @@ -250,7 +251,7 @@ nodes to be present and contain the prop Usage: optional Value type: Definition: A u32 value that represents the running time dynamic - power coefficient in units of mW/MHz/uVolt^2. The + power coefficient in units of mW/MHz/uV^2. The coefficient can either be calculated from power measurements or derived by analysis. Modified: vendor/device-tree/dist/Bindings/arm/fsl.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/fsl.txt Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arm/fsl.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -135,6 +135,10 @@ LS1043A ARMv8 based RDB Board Required root node properties: - compatible = "fsl,ls1043a-rdb", "fsl,ls1043a"; +LS1043A ARMv8 based QDS Board +Required root node properties: + - compatible = "fsl,ls1043a-qds", "fsl,ls1043a"; + LS2080A ARMv8 based Simulator model Required root node properties: - compatible = "fsl,ls2080a-simu", "fsl,ls2080a"; Modified: vendor/device-tree/dist/Bindings/arm/fw-cfg.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/fw-cfg.txt Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arm/fw-cfg.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -11,43 +11,9 @@ QEMU exposes the control and data regist registers; their location is communicated to the guest's UEFI firmware in the DTB that QEMU places at the bottom of the guest's DRAM. -The guest writes a selector value (a key) to the selector register, and then -can read the corresponding data (produced by QEMU) via the data register. If -the selected entry is writable, the guest can rewrite it through the data -register. - -The selector register takes keys in big endian byte order. - -The data register allows accesses with 8, 16, 32 and 64-bit width (only at -offset 0 of the register). Accesses larger than a byte are interpreted as -arrays, bundled together only for better performance. The bytes constituting -such a word, in increasing address order, correspond to the bytes that would -have been transferred by byte-wide accesses in chronological order. - -The interface allows guest firmware to download various parameters and blobs -that affect how the firmware works and what tables it installs for the guest -OS. For example, boot order of devices, ACPI tables, SMBIOS tables, kernel and -initrd images for direct kernel booting, virtual machine UUID, SMP information, -virtual NUMA topology, and so on. - -The authoritative registry of the valid selector values and their meanings is -the QEMU source code; the structure of the data blobs corresponding to the -individual key values is also defined in the QEMU source code. - -The presence of the registers can be verified by selecting the "signature" blob -with key 0x0000, and reading four bytes from the data register. The returned -signature is "QEMU". - -The outermost protocol (involving the write / read sequences of the control and -data registers) is expected to be versioned, and/or described by feature bits. -The interface revision / feature bitmap can be retrieved with key 0x0001. The -blob to be read from the data register has size 4, and it is to be interpreted -as a uint32_t value in little endian byte order. The current value -(corresponding to the above outer protocol) is zero. - -The guest kernel is not expected to use these registers (although it is -certainly allowed to); the device tree bindings are documented here because -this is where device tree bindings reside in general. +The authoritative guest-side hardware interface documentation to the fw_cfg +device can be found in "docs/specs/fw_cfg.txt" in the QEMU source tree. + Required properties: Modified: vendor/device-tree/dist/Bindings/arm/hisilicon/hisilicon.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/hisilicon/hisilicon.txt Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arm/hisilicon/hisilicon.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -1,29 +1,33 @@ Hisilicon Platforms Device Tree Bindings ---------------------------------------------------- -Hi6220 SoC -Required root node properties: - - compatible = "hisilicon,hi6220"; - Hi4511 Board Required root node properties: - compatible = "hisilicon,hi3620-hi4511"; -HiP04 D01 Board +Hi6220 SoC Required root node properties: - - compatible = "hisilicon,hip04-d01"; + - compatible = "hisilicon,hi6220"; + +HiKey Board +Required root node properties: + - compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220"; HiP01 ca9x2 Board Required root node properties: - compatible = "hisilicon,hip01-ca9x2"; -HiKey Board +HiP04 D01 Board Required root node properties: - - compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220"; + - compatible = "hisilicon,hip04-d01"; HiP05 D02 Board Required root node properties: - compatible = "hisilicon,hip05-d02"; +HiP06 D03 Board +Required root node properties: + - compatible = "hisilicon,hip06-d03"; + Hisilicon system controller Required properties: Modified: vendor/device-tree/dist/Bindings/arm/keystone/keystone.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/keystone/keystone.txt Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arm/keystone/keystone.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -22,6 +22,8 @@ SoCs: compatible = "ti,k2l", "ti,keystone" - Keystone 2 Edison compatible = "ti,k2e", "ti,keystone" +- K2G + compatible = "ti,k2g", "ti,keystone" Boards: - Keystone 2 Hawking/Kepler EVM @@ -32,3 +34,6 @@ Boards: - Keystone 2 Edison EVM compatible = "ti,k2e-evm", "ti,k2e", "ti,keystone" + +- K2G EVM + compatible = "ti,k2g-evm", "ti,k2g", "ti-keystone" Modified: vendor/device-tree/dist/Bindings/arm/l2c2x0.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/l2c2x0.txt Wed Jul 27 09:27:08 2016 (r303379) +++ vendor/device-tree/dist/Bindings/arm/l2c2x0.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -84,6 +84,12 @@ Optional properties: - prefetch-instr : Instruction prefetch. Value: <0> (forcibly disable), <1> (forcibly enable), property absent (retain settings set by firmware) +- arm,dynamic-clock-gating : L2 dynamic clock gating. Value: <0> (forcibly + disable), <1> (forcibly enable), property absent (OS specific behavior, + preferrably retain firmware settings) +- arm,standby-mode: L2 standby mode enable. Value <0> (forcibly disable), + <1> (forcibly enable), property absent (OS specific behavior, + preferrably retain firmware settings) Example: Added: vendor/device-tree/dist/Bindings/arm/marvell/ap806-system-controller.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/ap806-system-controller.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,35 @@ +Marvell Armada AP806 System Controller +====================================== + +The AP806 is one of the two core HW blocks of the Marvell Armada 7K/8K +SoCs. It contains a system controller, which provides a number +registers giving access to numerous features: clocks, pin-muxing and +many other SoC configuration items. This DT binding allows to describe +this system controller. + +The Device Tree node representing the AP806 system controller provides +a number of clocks: + + - 0: clock of CPU cluster 0 + - 1: clock of CPU cluster 1 + - 2: fixed PLL at 1200 Mhz + - 3: MSS clock, derived from the fixed PLL + +Required properties: + + - compatible: must be: + "marvell,ap806-system-controller", "syscon" + - reg: register area of the AP806 system controller + - #clock-cells: must be set to 1 + - clock-output-names: must be defined to: + "ap-cpu-cluster-0", "ap-cpu-cluster-1", "ap-fixed", "ap-mss" + +Example: + + syscon: system-controller@6f4000 { + compatible = "marvell,ap806-system-controller", "syscon"; + #clock-cells = <1>; + clock-output-names = "ap-cpu-cluster-0", "ap-cpu-cluster-1", + "ap-fixed", "ap-mss"; + reg = <0x6f4000 0x1000>; + }; Added: vendor/device-tree/dist/Bindings/arm/marvell/armada-370-xp-pmsu.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/armada-370-xp-pmsu.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,21 @@ +Power Management Service Unit(PMSU) +----------------------------------- +Available on Marvell SOCs: Armada 370, Armada 38x and Armada XP + +Required properties: + +- compatible: should be one of: + - "marvell,armada-370-pmsu" for Armada 370 or Armada XP + - "marvell,armada-380-pmsu" for Armada 38x + - "marvell,armada-370-xp-pmsu" was used for Armada 370/XP but is now + deprecated and will be removed + +- reg: Should contain PMSU registers location and length. + +Example: + +armada-370-xp-pmsu@22000 { + compatible = "marvell,armada-370-pmsu"; + reg = <0x22000 0x1000>; +}; + Added: vendor/device-tree/dist/Bindings/arm/marvell/armada-370-xp.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/armada-370-xp.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,24 @@ +Marvell Armada 370 and Armada XP Platforms Device Tree Bindings +--------------------------------------------------------------- + +Boards with a SoC of the Marvell Armada 370 and Armada XP families +shall have the following property: + +Required root node property: + +compatible: must contain "marvell,armada-370-xp" + +In addition, boards using the Marvell Armada 370 SoC shall have the +following property: + +Required root node property: + +compatible: must contain "marvell,armada370" + +In addition, boards using the Marvell Armada XP SoC shall have the +following property: + +Required root node property: + +compatible: must contain "marvell,armadaxp" + Added: vendor/device-tree/dist/Bindings/arm/marvell/armada-375.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/armada-375.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,9 @@ +Marvell Armada 375 Platforms Device Tree Bindings +------------------------------------------------- + +Boards with a SoC of the Marvell Armada 375 family shall have the +following property: + +Required root node property: + +compatible: must contain "marvell,armada375" Added: vendor/device-tree/dist/Bindings/arm/marvell/armada-37xx.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/armada-37xx.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,16 @@ +Marvell Armada 37xx Platforms Device Tree Bindings +-------------------------------------------------- + +Boards using a SoC of the Marvell Armada 37xx family must carry the +following root node property: + + - compatible: must contain "marvell,armada3710" + +In addition, boards using the Marvell Armada 3720 SoC shall have the +following property before the previous one: + + - compatible: must contain "marvell,armada3720" + +Example: + +compatible = "marvell,armada-3720-db", "marvell,armada3720", "marvell,armada3710"; Added: vendor/device-tree/dist/Bindings/arm/marvell/armada-380-mpcore-soc-ctrl.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/armada-380-mpcore-soc-ctrl.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,14 @@ +Marvell Armada 38x CA9 MPcore SoC Controller +============================================ + +Required properties: + +- compatible: Should be "marvell,armada-380-mpcore-soc-ctrl". + +- reg: should be the register base and length as documented in the + datasheet for the CA9 MPcore SoC Control registers + +mpcore-soc-ctrl@20d20 { + compatible = "marvell,armada-380-mpcore-soc-ctrl"; + reg = <0x20d20 0x6c>; +}; Added: vendor/device-tree/dist/Bindings/arm/marvell/armada-38x.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/armada-38x.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,27 @@ +Marvell Armada 38x Platforms Device Tree Bindings +------------------------------------------------- + +Boards with a SoC of the Marvell Armada 38x family shall have the +following property: + +Required root node property: + + - compatible: must contain "marvell,armada380" + +In addition, boards using the Marvell Armada 385 SoC shall have the +following property before the previous one: + +Required root node property: + +compatible: must contain "marvell,armada385" + +In addition, boards using the Marvell Armada 388 SoC shall have the +following property before the previous one: + +Required root node property: + +compatible: must contain "marvell,armada388" + +Example: + +compatible = "marvell,a385-rd", "marvell,armada385", "marvell,armada380"; Added: vendor/device-tree/dist/Bindings/arm/marvell/armada-39x.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/armada-39x.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,20 @@ +Marvell Armada 39x Platforms Device Tree Bindings +------------------------------------------------- + +Boards with a SoC of the Marvell Armada 39x family shall have the +following property: + +Required root node property: + + - compatible: must contain "marvell,armada390" + +In addition, boards using the Marvell Armada 398 SoC shall have the +following property before the previous one: + +Required root node property: + +compatible: must contain "marvell,armada398" + +Example: + +compatible = "marvell,a398-db", "marvell,armada398", "marvell,armada390"; Added: vendor/device-tree/dist/Bindings/arm/marvell/armada-7k-8k.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/armada-7k-8k.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,24 @@ +Marvell Armada 7K/8K Platforms Device Tree Bindings +--------------------------------------------------- + +Boards using a SoC of the Marvell Armada 7K or 8K families must carry +the following root node property: + + - compatible, with one of the following values: + + - "marvell,armada7020", "marvell,armada-ap806-dual", "marvell,armada-ap806" + when the SoC being used is the Armada 7020 + + - "marvell,armada7040", "marvell,armada-ap806-quad", "marvell,armada-ap806" + when the SoC being used is the Armada 7040 + + - "marvell,armada8020", "marvell,armada-ap806-dual", "marvell,armada-ap806" + when the SoC being used is the Armada 8020 + + - "marvell,armada8040", "marvell,armada-ap806-quad", "marvell,armada-ap806" + when the SoC being used is the Armada 8040 + +Example: + +compatible = "marvell,armada7040-db", "marvell,armada7040", + "marvell,armada-ap806-quad", "marvell,armada-ap806"; Added: vendor/device-tree/dist/Bindings/arm/marvell/armada-cpu-reset.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/armada-cpu-reset.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,14 @@ +Marvell Armada CPU reset controller +=================================== + +Required properties: + +- compatible: Should be "marvell,armada-370-cpu-reset". + +- reg: should be register base and length as documented in the + datasheet for the CPU reset registers + +cpurst: cpurst@20800 { + compatible = "marvell,armada-370-cpu-reset"; + reg = <0x20800 0x20>; +}; Added: vendor/device-tree/dist/Bindings/arm/marvell/coherency-fabric.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/coherency-fabric.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,48 @@ +Coherency fabric +---------------- +Available on Marvell SOCs: Armada 370, Armada 375, Armada 38x and Armada XP + +Required properties: + +- compatible: the possible values are: + + * "marvell,coherency-fabric", to be used for the coherency fabric of + the Armada 370 and Armada XP. + + * "marvell,armada-375-coherency-fabric", for the Armada 375 coherency + fabric. + + * "marvell,armada-380-coherency-fabric", for the Armada 38x coherency + fabric. + +- reg: Should contain coherency fabric registers location and + length. + + * For "marvell,coherency-fabric", the first pair for the coherency + fabric registers, second pair for the per-CPU fabric registers. + + * For "marvell,armada-375-coherency-fabric", only one pair is needed + for the per-CPU fabric registers. + + * For "marvell,armada-380-coherency-fabric", only one pair is needed + for the per-CPU fabric registers. + +Optional properties: + +- broken-idle: boolean to set when the Idle mode is not supported by the + hardware. + +Examples: + +coherency-fabric@d0020200 { + compatible = "marvell,coherency-fabric"; + reg = <0xd0020200 0xb0>, + <0xd0021810 0x1c>; + +}; + +coherency-fabric@21810 { + compatible = "marvell,armada-375-coherency-fabric"; + reg = <0x21810 0x1c>; +}; + Added: vendor/device-tree/dist/Bindings/arm/marvell/cp110-system-controller0.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/cp110-system-controller0.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,83 @@ +Marvell Armada CP110 System Controller 0 +======================================== + +The CP110 is one of the two core HW blocks of the Marvell Armada 7K/8K +SoCs. It contains two sets of system control registers, System +Controller 0 and System Controller 1. This Device Tree binding allows +to describe the first system controller, which provides registers to +configure various aspects of the SoC. + +The Device Tree node representing this System Controller 0 provides a +number of clocks: + + - a set of core clocks + - a set of gatable clocks + +Those clocks can be referenced by other Device Tree nodes using two +cells: + - The first cell must be 0 or 1. 0 for the core clocks and 1 for the + gatable clocks. + - The second cell identifies the particular core clock or gatable + clocks. + +The following clocks are available: + - Core clocks + - 0 0 APLL + - 0 1 PPv2 core + - 0 2 EIP + - 0 3 Core + - 0 4 NAND core + - Gatable clocks + - 1 0 Audio + - 1 1 Comm Unit + - 1 2 NAND + - 1 3 PPv2 + - 1 4 SDIO + - 1 5 MG Domain + - 1 6 MG Core + - 1 7 XOR1 + - 1 8 XOR0 + - 1 9 GOP DP + - 1 11 PCIe x1 0 + - 1 12 PCIe x1 1 + - 1 13 PCIe x4 + - 1 14 PCIe / XOR + - 1 15 SATA + - 1 16 SATA USB + - 1 17 Main + - 1 18 SD/MMC + - 1 21 Slow IO (SPI, NOR, BootROM, I2C, UART) + - 1 22 USB3H0 + - 1 23 USB3H1 + - 1 24 USB3 Device + - 1 25 EIP150 + - 1 26 EIP197 + +Required properties: + + - compatible: must be: + "marvell,cp110-system-controller0", "syscon"; + - reg: register area of the CP110 system controller 0 + - #clock-cells: must be set to 2 + - core-clock-output-names must be set to: + "cpm-apll", "cpm-ppv2-core", "cpm-eip", "cpm-core", "cpm-nand-core" + - gate-clock-output-names must be set to: + "cpm-audio", "cpm-communit", "cpm-nand", "cpm-ppv2", "cpm-sdio", + "cpm-mg-domain", "cpm-mg-core", "cpm-xor1", "cpm-xor0", "cpm-gop-dp", "none", + "cpm-pcie_x10", "cpm-pcie_x11", "cpm-pcie_x4", "cpm-pcie-xor", "cpm-sata", + "cpm-sata-usb", "cpm-main", "cpm-sd-mmc", "none", "none", "cpm-slow-io", + "cpm-usb3h0", "cpm-usb3h1", "cpm-usb3dev", "cpm-eip150", "cpm-eip197"; + +Example: + + cpm_syscon0: system-controller@440000 { + compatible = "marvell,cp110-system-controller0", "syscon"; + reg = <0x440000 0x1000>; + #clock-cells = <2>; + core-clock-output-names = "cpm-apll", "cpm-ppv2-core", "cpm-eip", "cpm-core", "cpm-nand-core"; + gate-clock-output-names = "cpm-audio", "cpm-communit", "cpm-nand", "cpm-ppv2", "cpm-sdio", + "cpm-mg-domain", "cpm-mg-core", "cpm-xor1", "cpm-xor0", "cpm-gop-dp", "none", + "cpm-pcie_x10", "cpm-pcie_x11", "cpm-pcie_x4", "cpm-pcie-xor", "cpm-sata", + "cpm-sata-usb", "cpm-main", "cpm-sd-mmc", "none", "none", "cpm-slow-io", + "cpm-usb3h0", "cpm-usb3h1", "cpm-usb3dev", "cpm-eip150", "cpm-eip197"; + }; Added: vendor/device-tree/dist/Bindings/arm/marvell/kirkwood.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/kirkwood.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,27 @@ +Marvell Kirkwood Platforms Device Tree Bindings +----------------------------------------------- + +Boards with a SoC of the Marvell Kirkwood +shall have the following property: + +Required root node property: + +compatible: must contain "marvell,kirkwood"; + +In order to support the kirkwood cpufreq driver, there must be a node +cpus/cpu@0 with three clocks, "cpu_clk", "ddrclk" and "powersave", +where the "powersave" clock is a gating clock used to switch the CPU +between the "cpu_clk" and the "ddrclk". + +Example: + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "marvell,sheeva-88SV131"; + clocks = <&core_clk 1>, <&core_clk 3>, <&gate_clk 11>; + clock-names = "cpu_clk", "ddrclk", "powersave"; + }; Added: vendor/device-tree/dist/Bindings/arm/marvell/marvell,berlin.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell/marvell,berlin.txt Wed Jul 27 10:33:45 2016 (r303380) @@ -0,0 +1,96 @@ +Marvell Berlin SoC Family Device Tree Bindings +--------------------------------------------------------------- + +Work in progress statement: + +Device tree files and bindings applying to Marvell Berlin SoCs and boards are +considered "unstable". Any Marvell Berlin device tree binding may change at any +time. Be sure to use a device tree binary and a kernel image generated from the +same source tree. + +Please refer to Documentation/devicetree/bindings/ABI.txt for a definition of a +stable binding/ABI. + +--------------------------------------------------------------- + +Boards with a SoC of the Marvell Berlin family, e.g. Armada 1500 +shall have the following properties: + +* Required root node properties: +compatible: must contain "marvell,berlin" + +In addition, the above compatible shall be extended with the specific +SoC and board used. Currently known SoC compatibles are: + "marvell,berlin2" for Marvell Armada 1500 (BG2, 88DE3100), + "marvell,berlin2cd" for Marvell Armada 1500-mini (BG2CD, 88DE3005) + "marvell,berlin2ct" for Marvell Armada ? (BG2CT, 88DE????) + "marvell,berlin2q" for Marvell Armada 1500-pro (BG2Q, 88DE3114) + "marvell,berlin3" for Marvell Armada ? (BG3, 88DE????) + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jul 27 10:43:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55462BA37EE; Wed, 27 Jul 2016 10:43:37 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08AE31517; Wed, 27 Jul 2016 10:43:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RAhaXV067206; Wed, 27 Jul 2016 10:43:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RAhaG8067205; Wed, 27 Jul 2016 10:43:36 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607271043.u6RAhaG8067205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 27 Jul 2016 10:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r303381 - vendor/device-tree/devicetree-965f3718 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 10:43:37 -0000 Author: andrew Date: Wed Jul 27 10:43:36 2016 New Revision: 303381 URL: https://svnweb.freebsd.org/changeset/base/303381 Log: Tag the devicetree source import Added: vendor/device-tree/devicetree-965f3718/ - copied from r303380, vendor/device-tree/dist/ From owner-svn-src-all@freebsd.org Wed Jul 27 11:09:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2E3EBA3E5D; Wed, 27 Jul 2016 11:09:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDDD11233; Wed, 27 Jul 2016 11:09:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RB91uo074946; Wed, 27 Jul 2016 11:09:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RB8xQh074927; Wed, 27 Jul 2016 11:08:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607271108.u6RB8xQh074927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jul 2016 11:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303382 - in head/sys: compat/linprocfs fs/devfs fs/fdescfs fs/nfs fs/procfs kern net net/altq netpfil/ipfw nfs rpc/rpcsec_gss sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 11:09:02 -0000 Author: kib Date: Wed Jul 27 11:08:59 2016 New Revision: 303382 URL: https://svnweb.freebsd.org/changeset/base/303382 Log: Hide the boottime and bootimebin globals, provide the getboottime(9) and getboottimebin(9) KPI. Change consumers of boottime to use the KPI. The variables were renamed to avoid shadowing issues with local variables of the same name. Issue is that boottime* should be adjusted from tc_windup(), which requires them to be members of the timehands structure. As a preparation, this commit only introduces the interface. Some uses of boottime were found doubtful, e.g. NLM uses boottime to identify the system boot instance. Arguably the identity should not change on the leap second adjustment, but the commit is about the timekeeping code and the consumers were kept bug-to-bug compatible. Tested by: pho (as part of the bigger patch) Reviewed by: jhb (same) Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 month X-Differential revision: https://reviews.freebsd.org/D7302 Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/fs/devfs/devfs_vnops.c head/sys/fs/fdescfs/fdesc_vnops.c head/sys/fs/nfs/nfsport.h head/sys/fs/procfs/procfs_status.c head/sys/kern/kern_acct.c head/sys/kern/kern_proc.c head/sys/kern/kern_tc.c head/sys/kern/sys_procdesc.c head/sys/net/altq/altq_subr.c head/sys/net/bpf.c head/sys/netpfil/ipfw/ip_fw_sockopt.c head/sys/nfs/nfs_lock.c head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c head/sys/sys/time.h Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/compat/linprocfs/linprocfs.c Wed Jul 27 11:08:59 2016 (r303382) @@ -447,9 +447,11 @@ linprocfs_dostat(PFS_FILL_ARGS) struct pcpu *pcpu; long cp_time[CPUSTATES]; long *cp; + struct timeval boottime; int i; read_cpu_time(cp_time); + getboottime(&boottime); sbuf_printf(sb, "cpu %ld %ld %ld %ld\n", T2J(cp_time[CP_USER]), T2J(cp_time[CP_NICE]), @@ -624,10 +626,12 @@ static int linprocfs_doprocstat(PFS_FILL_ARGS) { struct kinfo_proc kp; + struct timeval boottime; char state; static int ratelimit = 0; vm_offset_t startcode, startdata; + getboottime(&boottime); sx_slock(&proctree_lock); PROC_LOCK(p); fill_kinfo_proc(p, &kp); Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/fs/devfs/devfs_vnops.c Wed Jul 27 11:08:59 2016 (r303382) @@ -707,10 +707,11 @@ devfs_getattr(struct vop_getattr_args *a { struct vnode *vp = ap->a_vp; struct vattr *vap = ap->a_vap; - int error; struct devfs_dirent *de; struct devfs_mount *dmp; struct cdev *dev; + struct timeval boottime; + int error; error = devfs_populate_vp(vp); if (error != 0) @@ -740,6 +741,7 @@ devfs_getattr(struct vop_getattr_args *a vap->va_blocksize = DEV_BSIZE; vap->va_type = vp->v_type; + getboottime(&boottime); #define fix(aa) \ do { \ if ((aa).tv_sec <= 3600) { \ Modified: head/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vnops.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/fs/fdescfs/fdesc_vnops.c Wed Jul 27 11:08:59 2016 (r303382) @@ -394,7 +394,9 @@ fdesc_getattr(struct vop_getattr_args *a { struct vnode *vp = ap->a_vp; struct vattr *vap = ap->a_vap; + struct timeval boottime; + getboottime(&boottime); vap->va_mode = S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH; vap->va_fileid = VTOFDESC(vp)->fd_ix; vap->va_uid = 0; Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/fs/nfs/nfsport.h Wed Jul 27 11:08:59 2016 (r303382) @@ -872,7 +872,7 @@ int newnfs_realign(struct mbuf **, int); /* * Set boottime. */ -#define NFSSETBOOTTIME(b) ((b) = boottime) +#define NFSSETBOOTTIME(b) (getboottime(&b)) /* * The size of directory blocks in the buffer cache. Modified: head/sys/fs/procfs/procfs_status.c ============================================================================== --- head/sys/fs/procfs/procfs_status.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/fs/procfs/procfs_status.c Wed Jul 27 11:08:59 2016 (r303382) @@ -70,6 +70,7 @@ procfs_doprocstatus(PFS_FILL_ARGS) const char *wmesg; char *pc; char *sep; + struct timeval boottime; int pid, ppid, pgid, sid; int i; @@ -129,6 +130,7 @@ procfs_doprocstatus(PFS_FILL_ARGS) calcru(p, &ut, &st); PROC_STATUNLOCK(p); start = p->p_stats->p_start; + getboottime(&boottime); timevaladd(&start, &boottime); sbuf_printf(sb, " %jd,%ld %jd,%ld %jd,%ld", (intmax_t)start.tv_sec, start.tv_usec, Modified: head/sys/kern/kern_acct.c ============================================================================== --- head/sys/kern/kern_acct.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/kern/kern_acct.c Wed Jul 27 11:08:59 2016 (r303382) @@ -389,7 +389,7 @@ acct_process(struct thread *td) acct.ac_stime = encode_timeval(st); /* (4) The elapsed time the command ran (and its starting time) */ - tmp = boottime; + getboottime(&tmp); timevaladd(&tmp, &p->p_stats->p_start); acct.ac_btime = tmp.tv_sec; microuptime(&tmp); Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/kern/kern_proc.c Wed Jul 27 11:08:59 2016 (r303382) @@ -872,6 +872,7 @@ fill_kinfo_proc_only(struct proc *p, str struct session *sp; struct ucred *cred; struct sigacts *ps; + struct timeval boottime; /* For proc_realparent. */ sx_assert(&proctree_lock, SX_LOCKED); @@ -953,6 +954,7 @@ fill_kinfo_proc_only(struct proc *p, str kp->ki_nice = p->p_nice; kp->ki_fibnum = p->p_fibnum; kp->ki_start = p->p_stats->p_start; + getboottime(&boottime); timevaladd(&kp->ki_start, &boottime); PROC_STATLOCK(p); rufetch(p, &kp->ki_rusage); Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/kern/kern_tc.c Wed Jul 27 11:08:59 2016 (r303382) @@ -106,8 +106,8 @@ int tc_min_ticktock_freq = 1; volatile time_t time_second = 1; volatile time_t time_uptime = 1; -struct bintime boottimebin; -struct timeval boottime; +static struct bintime boottimebin_x; +static struct timeval boottime_x; static int sysctl_kern_boottime(SYSCTL_HANDLER_ARGS); SYSCTL_PROC(_kern, KERN_BOOTTIME, boottime, CTLTYPE_STRUCT|CTLFLAG_RD, NULL, 0, sysctl_kern_boottime, "S,timeval", "System boottime"); @@ -143,6 +143,10 @@ void dtrace_getnanotime(struct timespec static int sysctl_kern_boottime(SYSCTL_HANDLER_ARGS) { + struct timeval boottime; + + getboottime(&boottime); + #ifndef __mips__ #ifdef SCTL_MASK32 int tv[2]; @@ -150,11 +154,11 @@ sysctl_kern_boottime(SYSCTL_HANDLER_ARGS if (req->flags & SCTL_MASK32) { tv[0] = boottime.tv_sec; tv[1] = boottime.tv_usec; - return SYSCTL_OUT(req, tv, sizeof(tv)); - } else + return (SYSCTL_OUT(req, tv, sizeof(tv))); + } #endif #endif - return SYSCTL_OUT(req, &boottime, sizeof(boottime)); + return (SYSCTL_OUT(req, &boottime, sizeof(boottime))); } static int @@ -236,7 +240,7 @@ fbclock_bintime(struct bintime *bt) { fbclock_binuptime(bt); - bintime_add(bt, &boottimebin); + bintime_add(bt, &boottimebin_x); } void @@ -311,7 +315,7 @@ fbclock_getbintime(struct bintime *bt) *bt = th->th_offset; atomic_thread_fence_acq(); } while (gen == 0 || gen != th->th_generation); - bintime_add(bt, &boottimebin); + bintime_add(bt, &boottimebin_x); } void @@ -380,7 +384,7 @@ bintime(struct bintime *bt) { binuptime(bt); - bintime_add(bt, &boottimebin); + bintime_add(bt, &boottimebin_x); } void @@ -455,7 +459,7 @@ getbintime(struct bintime *bt) *bt = th->th_offset; atomic_thread_fence_acq(); } while (gen == 0 || gen != th->th_generation); - bintime_add(bt, &boottimebin); + bintime_add(bt, &boottimebin_x); } void @@ -487,6 +491,20 @@ getmicrotime(struct timeval *tvp) } #endif /* FFCLOCK */ +void +getboottime(struct timeval *boottime) +{ + + *boottime = boottime_x; +} + +void +getboottimebin(struct bintime *boottimebin) +{ + + *boottimebin = boottimebin_x; +} + #ifdef FFCLOCK /* * Support for feed-forward synchronization algorithms. This is heavily inspired @@ -1103,6 +1121,7 @@ int sysclock_snap2bintime(struct sysclock_snap *cs, struct bintime *bt, int whichclock, uint32_t flags) { + struct bintime boottimebin; #ifdef FFCLOCK struct bintime bt2; uint64_t period; @@ -1116,8 +1135,10 @@ sysclock_snap2bintime(struct sysclock_sn if (cs->delta > 0) bintime_addx(bt, cs->fb_info.th_scale * cs->delta); - if ((flags & FBCLOCK_UPTIME) == 0) + if ((flags & FBCLOCK_UPTIME) == 0) { + getboottimebin(&boottimebin); bintime_add(bt, &boottimebin); + } break; #ifdef FFCLOCK case SYSCLOCK_FFWD: @@ -1242,9 +1263,9 @@ tc_setclock(struct timespec *ts) timespec2bintime(ts, &bt); binuptime(&bt2); bintime_sub(&bt, &bt2); - bintime_add(&bt2, &boottimebin); - boottimebin = bt; - bintime2timeval(&bt, &boottime); + bintime_add(&bt2, &boottimebin_x); + boottimebin_x = bt; + bintime2timeval(&bt, &boottime_x); /* XXX fiddle all the little crinkly bits around the fiords... */ tc_windup(); @@ -1338,7 +1359,7 @@ tc_windup(void) * case we missed a leap second. */ bt = th->th_offset; - bintime_add(&bt, &boottimebin); + bintime_add(&bt, &boottimebin_x); i = bt.sec - tho->th_microtime.tv_sec; if (i > LARGE_STEP) i = 2; @@ -1346,7 +1367,7 @@ tc_windup(void) t = bt.sec; ntp_update_second(&th->th_adjustment, &bt.sec); if (bt.sec != t) - boottimebin.sec += bt.sec - t; + boottimebin_x.sec += bt.sec - t; } /* Update the UTC timestamps used by the get*() functions. */ /* XXX shouldn't do this here. Should force non-`get' versions. */ @@ -1769,7 +1790,7 @@ pps_event(struct pps_state *pps, int eve tcount &= pps->capth->th_counter->tc_counter_mask; bt = pps->capth->th_offset; bintime_addx(&bt, pps->capth->th_scale * tcount); - bintime_add(&bt, &boottimebin); + bintime_add(&bt, &boottimebin_x); bintime2timespec(&bt, &ts); /* If the timecounter was wound up underneath us, bail out. */ @@ -2095,7 +2116,7 @@ tc_fill_vdso_timehands(struct vdso_timeh vdso_th->th_offset_count = th->th_offset_count; vdso_th->th_counter_mask = th->th_counter->tc_counter_mask; vdso_th->th_offset = th->th_offset; - vdso_th->th_boottime = boottimebin; + vdso_th->th_boottime = boottimebin_x; enabled = cpu_fill_vdso_timehands(vdso_th, th->th_counter); if (!vdso_th_enable) enabled = 0; @@ -2116,8 +2137,8 @@ tc_fill_vdso_timehands32(struct vdso_tim vdso_th32->th_counter_mask = th->th_counter->tc_counter_mask; vdso_th32->th_offset.sec = th->th_offset.sec; *(uint64_t *)&vdso_th32->th_offset.frac[0] = th->th_offset.frac; - vdso_th32->th_boottime.sec = boottimebin.sec; - *(uint64_t *)&vdso_th32->th_boottime.frac[0] = boottimebin.frac; + vdso_th32->th_boottime.sec = boottimebin_x.sec; + *(uint64_t *)&vdso_th32->th_boottime.frac[0] = boottimebin_x.frac; enabled = cpu_fill_vdso_timehands32(vdso_th32, th->th_counter); if (!vdso_th_enable) enabled = 0; Modified: head/sys/kern/sys_procdesc.c ============================================================================== --- head/sys/kern/sys_procdesc.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/kern/sys_procdesc.c Wed Jul 27 11:08:59 2016 (r303382) @@ -523,7 +523,7 @@ procdesc_stat(struct file *fp, struct st struct thread *td) { struct procdesc *pd; - struct timeval pstart; + struct timeval pstart, boottime; /* * XXXRW: Perhaps we should cache some more information from the @@ -539,6 +539,7 @@ procdesc_stat(struct file *fp, struct st /* Set birth and [acm] times to process start time. */ pstart = pd->pd_proc->p_stats->p_start; + getboottime(&boottime); timevaladd(&pstart, &boottime); TIMEVAL_TO_TIMESPEC(&pstart, &sb->st_birthtim); sb->st_atim = sb->st_birthtim; Modified: head/sys/net/altq/altq_subr.c ============================================================================== --- head/sys/net/altq/altq_subr.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/net/altq/altq_subr.c Wed Jul 27 11:08:59 2016 (r303382) @@ -1027,9 +1027,10 @@ read_machclk(void) panic("read_machclk"); #endif } else { - struct timeval tv; + struct timeval tv, boottime; microtime(&tv); + getboottime(&boottime); val = (((u_int64_t)(tv.tv_sec - boottime.tv_sec) * 1000000 + tv.tv_usec) << MACHCLK_SHIFT); } Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/net/bpf.c Wed Jul 27 11:08:59 2016 (r303382) @@ -2328,12 +2328,13 @@ bpf_hdrlen(struct bpf_d *d) static void bpf_bintime2ts(struct bintime *bt, struct bpf_ts *ts, int tstype) { - struct bintime bt2; + struct bintime bt2, boottimebin; struct timeval tsm; struct timespec tsn; if ((tstype & BPF_T_MONOTONIC) == 0) { bt2 = *bt; + getboottimebin(&boottimebin); bintime_add(&bt2, &boottimebin); bt = &bt2; } Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Jul 27 11:08:59 2016 (r303382) @@ -395,6 +395,7 @@ swap_map(struct ip_fw_chain *chain, stru static void export_cntr1_base(struct ip_fw *krule, struct ip_fw_bcounter *cntr) { + struct timeval boottime; cntr->size = sizeof(*cntr); @@ -403,21 +404,26 @@ export_cntr1_base(struct ip_fw *krule, s cntr->bcnt = counter_u64_fetch(krule->cntr + 1); cntr->timestamp = krule->timestamp; } - if (cntr->timestamp > 0) + if (cntr->timestamp > 0) { + getboottime(&boottime); cntr->timestamp += boottime.tv_sec; + } } static void export_cntr0_base(struct ip_fw *krule, struct ip_fw_bcounter0 *cntr) { + struct timeval boottime; if (krule->cntr != NULL) { cntr->pcnt = counter_u64_fetch(krule->cntr); cntr->bcnt = counter_u64_fetch(krule->cntr + 1); cntr->timestamp = krule->timestamp; } - if (cntr->timestamp > 0) + if (cntr->timestamp > 0) { + getboottime(&boottime); cntr->timestamp += boottime.tv_sec; + } } /* @@ -2055,11 +2061,13 @@ ipfw_getrules(struct ip_fw_chain *chain, char *ep = bp + space; struct ip_fw *rule; struct ip_fw_rule0 *dst; + struct timeval boottime; int error, i, l, warnflag; time_t boot_seconds; warnflag = 0; + getboottime(&boottime); boot_seconds = boottime.tv_sec; for (i = 0; i < chain->n_rules; i++) { rule = chain->map[i]; Modified: head/sys/nfs/nfs_lock.c ============================================================================== --- head/sys/nfs/nfs_lock.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/nfs/nfs_lock.c Wed Jul 27 11:08:59 2016 (r303382) @@ -241,6 +241,7 @@ nfs_dolock(struct vop_advlock_args *ap) struct flock *fl; struct proc *p; struct nfsmount *nmp; + struct timeval boottime; td = curthread; p = td->td_proc; @@ -284,6 +285,7 @@ nfs_dolock(struct vop_advlock_args *ap) p->p_nlminfo = malloc(sizeof(struct nlminfo), M_NLMINFO, M_WAITOK | M_ZERO); p->p_nlminfo->pid_start = p->p_stats->p_start; + getboottime(&boottime); timevaladd(&p->p_nlminfo->pid_start, &boottime); } msg.lm_msg_ident.pid_start = p->p_nlminfo->pid_start; Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Wed Jul 27 11:08:59 2016 (r303382) @@ -504,11 +504,13 @@ svc_rpc_gss_find_client(struct svc_rpc_g { struct svc_rpc_gss_client *client; struct svc_rpc_gss_client_list *list; + struct timeval boottime; unsigned long hostid; rpc_gss_log_debug("in svc_rpc_gss_find_client(%d)", id->ci_id); getcredhostid(curthread->td_ucred, &hostid); + getboottime(&boottime); if (id->ci_hostid != hostid || id->ci_boottime != boottime.tv_sec) return (NULL); @@ -537,6 +539,7 @@ svc_rpc_gss_create_client(void) { struct svc_rpc_gss_client *client; struct svc_rpc_gss_client_list *list; + struct timeval boottime; unsigned long hostid; rpc_gss_log_debug("in svc_rpc_gss_create_client()"); @@ -547,6 +550,7 @@ svc_rpc_gss_create_client(void) sx_init(&client->cl_lock, "GSS-client"); getcredhostid(curthread->td_ucred, &hostid); client->cl_id.ci_hostid = hostid; + getboottime(&boottime); client->cl_id.ci_boottime = boottime.tv_sec; client->cl_id.ci_id = svc_rpc_gss_next_clientid++; list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % CLIENT_HASH_SIZE]; Modified: head/sys/sys/time.h ============================================================================== --- head/sys/sys/time.h Wed Jul 27 10:43:36 2016 (r303381) +++ head/sys/sys/time.h Wed Jul 27 11:08:59 2016 (r303382) @@ -372,8 +372,6 @@ void resettodr(void); extern volatile time_t time_second; extern volatile time_t time_uptime; -extern struct bintime boottimebin; -extern struct timeval boottime; extern struct bintime tc_tick_bt; extern sbintime_t tc_tick_sbt; extern struct bintime tick_bt; @@ -440,6 +438,9 @@ void getbintime(struct bintime *bt); void getnanotime(struct timespec *tsp); void getmicrotime(struct timeval *tvp); +void getboottime(struct timeval *boottime); +void getboottimebin(struct bintime *boottimebin); + /* Other functions */ int itimerdecr(struct itimerval *itp, int usec); int itimerfix(struct timeval *tv); From owner-svn-src-all@freebsd.org Wed Jul 27 11:27:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F387BA4365; Wed, 27 Jul 2016 11:27:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 473A51AFB; Wed, 27 Jul 2016 11:27:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RBRqrU082117; Wed, 27 Jul 2016 11:27:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RBRqEM082116; Wed, 27 Jul 2016 11:27:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607271127.u6RBRqEM082116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jul 2016 11:27:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303383 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 11:27:53 -0000 Author: kib Date: Wed Jul 27 11:27:52 2016 New Revision: 303383 URL: https://svnweb.freebsd.org/changeset/base/303383 Log: Reduce number of timehands to just two. This is useful because consumers can now be only one tc_windup() call late. Use C99 initialization. Tested by: pho (as part of the whole patch) Reviewed by: jhb (same) Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 month X-Differential revision: https://reviews.freebsd.org/D7302 Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Wed Jul 27 11:08:59 2016 (r303382) +++ head/sys/kern/kern_tc.c Wed Jul 27 11:27:52 2016 (r303383) @@ -76,25 +76,15 @@ struct timehands { }; static struct timehands th0; -static struct timehands th9 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th0}; -static struct timehands th8 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th9}; -static struct timehands th7 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th8}; -static struct timehands th6 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th7}; -static struct timehands th5 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th6}; -static struct timehands th4 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th5}; -static struct timehands th3 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th4}; -static struct timehands th2 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th3}; -static struct timehands th1 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th2}; +static struct timehands th1 = { + .th_next = &th0 +}; static struct timehands th0 = { - &dummy_timecounter, - 0, - (uint64_t)-1 / 1000000, - 0, - {1, 0}, - {0, 0}, - {0, 0}, - 1, - &th1 + .th_counter = &dummy_timecounter, + .th_scale = (uint64_t)-1 / 1000000, + .th_offset = { .sec = 1 }, + .th_generation = 1, + .th_next = &th1 }; static struct timehands *volatile timehands = &th0; From owner-svn-src-all@freebsd.org Wed Jul 27 11:33:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 819AEBA44EF; Wed, 27 Jul 2016 11:33:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47B691EFF; Wed, 27 Jul 2016 11:33:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RBXX2v085646; Wed, 27 Jul 2016 11:33:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RBXX19085645; Wed, 27 Jul 2016 11:33:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607271133.u6RBXX19085645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jul 2016 11:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303384 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 11:33:34 -0000 Author: kib Date: Wed Jul 27 11:33:33 2016 New Revision: 303384 URL: https://svnweb.freebsd.org/changeset/base/303384 Log: Style. Sponsored by: The FreeBSD Foundation MFC after: 1 month X-Differential revision: https://reviews.freebsd.org/D7302 Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Wed Jul 27 11:27:52 2016 (r303383) +++ head/sys/kern/kern_tc.c Wed Jul 27 11:33:33 2016 (r303384) @@ -158,7 +158,7 @@ sysctl_kern_timecounter_get(SYSCTL_HANDL struct timecounter *tc = arg1; ncount = tc->tc_get_timecount(tc); - return sysctl_handle_int(oidp, &ncount, 0, req); + return (sysctl_handle_int(oidp, &ncount, 0, req)); } static int @@ -168,7 +168,7 @@ sysctl_kern_timecounter_freq(SYSCTL_HAND struct timecounter *tc = arg1; freq = tc->tc_frequency; - return sysctl_handle_64(oidp, &freq, 0, req); + return (sysctl_handle_64(oidp, &freq, 0, req)); } /* From owner-svn-src-all@freebsd.org Wed Jul 27 11:34:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4989BA459B; Wed, 27 Jul 2016 11:34:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A17E412C6; Wed, 27 Jul 2016 11:34:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RBYPLp085717; Wed, 27 Jul 2016 11:34:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RBYPPO085716; Wed, 27 Jul 2016 11:34:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607271134.u6RBYPPO085716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jul 2016 11:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303385 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 11:34:26 -0000 Author: kib Date: Wed Jul 27 11:34:25 2016 New Revision: 303385 URL: https://svnweb.freebsd.org/changeset/base/303385 Log: Reduce the resettodr_lock scope to only CLOCK_SETTIME() call. Tested by: pho (as part of the whole patch) Reviewed by: jhb (same) Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 month X-Differential revision: https://reviews.freebsd.org/D7302 Modified: head/sys/kern/subr_rtc.c Modified: head/sys/kern/subr_rtc.c ============================================================================== --- head/sys/kern/subr_rtc.c Wed Jul 27 11:33:33 2016 (r303384) +++ head/sys/kern/subr_rtc.c Wed Jul 27 11:34:25 2016 (r303385) @@ -172,11 +172,11 @@ resettodr(void) if (disable_rtc_set || clock_dev == NULL) return; - mtx_lock(&resettodr_lock); getnanotime(&ts); timespecadd(&ts, &clock_adj); ts.tv_sec -= utc_offset(); /* XXX: We should really set all registered RTCs */ + mtx_lock(&resettodr_lock); error = CLOCK_SETTIME(clock_dev, &ts); mtx_unlock(&resettodr_lock); if (error != 0) From owner-svn-src-all@freebsd.org Wed Jul 27 11:40:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCABCBA4715; Wed, 27 Jul 2016 11:40:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7F161634; Wed, 27 Jul 2016 11:40:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RBe6BA085964; Wed, 27 Jul 2016 11:40:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RBe6oE085963; Wed, 27 Jul 2016 11:40:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607271140.u6RBe6oE085963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jul 2016 11:40:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303386 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 11:40:07 -0000 Author: kib Date: Wed Jul 27 11:40:06 2016 New Revision: 303386 URL: https://svnweb.freebsd.org/changeset/base/303386 Log: Fix a bug in r302252. Change ntpadj_lock to spinlock always, and rename stuff removing ADJ/adj from the names. ntp_update_second() requires ntp_lock and is called from the tc_windup(), so ntp_lock must be a spinlock. Add missed lock to ntp_update_second(). Tested by: pho (as part of the whole patch) Reviewed by: jhb (same) Noted by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 month X-Differential revision: https://reviews.freebsd.org/D7302 Modified: head/sys/kern/kern_ntptime.c Modified: head/sys/kern/kern_ntptime.c ============================================================================== --- head/sys/kern/kern_ntptime.c Wed Jul 27 11:34:25 2016 (r303385) +++ head/sys/kern/kern_ntptime.c Wed Jul 27 11:40:06 2016 (r303386) @@ -162,29 +162,12 @@ static l_fp time_adj; /* tick adjust ( static int64_t time_adjtime; /* correction from adjtime(2) (usec) */ -static struct mtx ntpadj_lock; -MTX_SYSINIT(ntpadj, &ntpadj_lock, "ntpadj", -#ifdef PPS_SYNC - MTX_SPIN -#else - MTX_DEF -#endif -); +static struct mtx ntp_lock; +MTX_SYSINIT(ntp, &ntp_lock, "ntp", MTX_SPIN); -/* - * When PPS_SYNC is defined, hardpps() function is provided which can - * be legitimately called from interrupt filters. Due to this, use - * spinlock for ntptime state protection, otherwise sleepable mutex is - * adequate. - */ -#ifdef PPS_SYNC -#define NTPADJ_LOCK() mtx_lock_spin(&ntpadj_lock) -#define NTPADJ_UNLOCK() mtx_unlock_spin(&ntpadj_lock) -#else -#define NTPADJ_LOCK() mtx_lock(&ntpadj_lock) -#define NTPADJ_UNLOCK() mtx_unlock(&ntpadj_lock) -#endif -#define NTPADJ_ASSERT_LOCKED() mtx_assert(&ntpadj_lock, MA_OWNED) +#define NTP_LOCK() mtx_lock_spin(&ntp_lock) +#define NTP_UNLOCK() mtx_unlock_spin(&ntp_lock) +#define NTP_ASSERT_LOCKED() mtx_assert(&ntp_lock, MA_OWNED) #ifdef PPS_SYNC /* @@ -271,7 +254,7 @@ ntp_gettime1(struct ntptimeval *ntvp) { struct timespec atv; /* nanosecond time */ - NTPADJ_ASSERT_LOCKED(); + NTP_ASSERT_LOCKED(); nanotime(&atv); ntvp->time.tv_sec = atv.tv_sec; @@ -302,9 +285,9 @@ sys_ntp_gettime(struct thread *td, struc { struct ntptimeval ntv; - NTPADJ_LOCK(); + NTP_LOCK(); ntp_gettime1(&ntv); - NTPADJ_UNLOCK(); + NTP_UNLOCK(); td->td_retval[0] = ntv.time_state; return (copyout(&ntv, uap->ntvp, sizeof(ntv))); @@ -315,9 +298,9 @@ ntp_sysctl(SYSCTL_HANDLER_ARGS) { struct ntptimeval ntv; /* temporary structure */ - NTPADJ_LOCK(); + NTP_LOCK(); ntp_gettime1(&ntv); - NTPADJ_UNLOCK(); + NTP_UNLOCK(); return (sysctl_handle_opaque(oidp, &ntv, sizeof(ntv), req)); } @@ -382,7 +365,7 @@ sys_ntp_adjtime(struct thread *td, struc error = priv_check(td, PRIV_NTP_ADJTIME); if (error != 0) return (error); - NTPADJ_LOCK(); + NTP_LOCK(); if (modes & MOD_MAXERROR) time_maxerror = ntv.maxerror; if (modes & MOD_ESTERROR) @@ -484,7 +467,7 @@ sys_ntp_adjtime(struct thread *td, struc ntv.stbcnt = pps_stbcnt; #endif /* PPS_SYNC */ retval = ntp_is_time_error(time_status) ? TIME_ERROR : time_state; - NTPADJ_UNLOCK(); + NTP_UNLOCK(); error = copyout((caddr_t)&ntv, (caddr_t)uap->tp, sizeof(ntv)); if (error == 0) @@ -506,6 +489,8 @@ ntp_update_second(int64_t *adjustment, t int tickrate; l_fp ftemp; /* 32/64-bit temporary */ + NTP_LOCK(); + /* * On rollover of the second both the nanosecond and microsecond * clocks are updated and the state machine cranked as @@ -627,6 +612,8 @@ ntp_update_second(int64_t *adjustment, t else time_status &= ~STA_PPSSIGNAL; #endif /* PPS_SYNC */ + + NTP_UNLOCK(); } /* @@ -690,7 +677,7 @@ hardupdate(offset) long mtemp; l_fp ftemp; - NTPADJ_ASSERT_LOCKED(); + NTP_ASSERT_LOCKED(); /* * Select how the phase is to be controlled and from which @@ -772,7 +759,7 @@ hardpps(tsp, nsec) long u_sec, u_nsec, v_nsec; /* temps */ l_fp ftemp; - NTPADJ_LOCK(); + NTP_LOCK(); /* * The signal is first processed by a range gate and frequency @@ -956,7 +943,7 @@ hardpps(tsp, nsec) time_freq = pps_freq; out: - NTPADJ_UNLOCK(); + NTP_UNLOCK(); } #endif /* PPS_SYNC */ @@ -999,11 +986,11 @@ kern_adjtime(struct thread *td, struct t return (error); ltw = (int64_t)delta->tv_sec * 1000000 + delta->tv_usec; } - NTPADJ_LOCK(); + NTP_LOCK(); ltr = time_adjtime; if (delta != NULL) time_adjtime = ltw; - NTPADJ_UNLOCK(); + NTP_UNLOCK(); if (olddelta != NULL) { atv.tv_sec = ltr / 1000000; atv.tv_usec = ltr % 1000000; From owner-svn-src-all@freebsd.org Wed Jul 27 11:49:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45144BA49B2; Wed, 27 Jul 2016 11:49:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 071731B02; Wed, 27 Jul 2016 11:49:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RBng49089542; Wed, 27 Jul 2016 11:49:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RBngu3089540; Wed, 27 Jul 2016 11:49:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607271149.u6RBngu3089540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jul 2016 11:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303387 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 11:49:43 -0000 Author: kib Date: Wed Jul 27 11:49:41 2016 New Revision: 303387 URL: https://svnweb.freebsd.org/changeset/base/303387 Log: Prevent parallel tc_windup() calls, both parallel top-level calls from setclock() and from simultaneous top-level and interrupt. For this, tc_windup() is protected with a tc_setclock_mtx spinlock, in the try mode when called from hardclock interrupt. If spinlock cannot be obtained without spinning from the interrupt context, this means that top-level executes tc_windup() on other core and our try may be avoided. The boottimebin and boottime variables should be adjusted from tc_windup(). To be correct, they must be part of the timehands and read using lockless protocol. Remove the globals and reimplement the getboottime(9)/getboottimebin(9) KPI using the timehands read protocol. Tested by: pho (as part of the whole patch) Reviewed by: jhb (same) Discussed wit: bde Sponsored by: The FreeBSD Foundation MFC after: 1 month X-Differential revision: https://reviews.freebsd.org/D7302 Modified: head/sys/kern/kern_clock.c head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Wed Jul 27 11:40:06 2016 (r303386) +++ head/sys/kern/kern_clock.c Wed Jul 27 11:49:41 2016 (r303387) @@ -381,7 +381,9 @@ volatile int ticks; int psratio; static DPCPU_DEFINE(int, pcputicks); /* Per-CPU version of ticks. */ -static int global_hardclock_run = 0; +#ifdef DEVICE_POLLING +static int devpoll_run = 0; +#endif /* * Initialize clock frequencies and start both clocks running. @@ -584,15 +586,15 @@ hardclock_cnt(int cnt, int usermode) #endif /* We are in charge to handle this tick duty. */ if (newticks > 0) { - /* Dangerous and no need to call these things concurrently. */ - if (atomic_cmpset_acq_int(&global_hardclock_run, 0, 1)) { - tc_ticktock(newticks); + tc_ticktock(newticks); #ifdef DEVICE_POLLING + /* Dangerous and no need to call these things concurrently. */ + if (atomic_cmpset_acq_int(&devpoll_run, 0, 1)) { /* This is very short and quick. */ hardclock_device_poll(); -#endif /* DEVICE_POLLING */ - atomic_store_rel_int(&global_hardclock_run, 0); + atomic_store_rel_int(&devpoll_run, 0); } +#endif /* DEVICE_POLLING */ #ifdef SW_WATCHDOG if (watchdog_enabled > 0) { i = atomic_fetchadd_int(&watchdog_ticks, -newticks); Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Wed Jul 27 11:40:06 2016 (r303386) +++ head/sys/kern/kern_tc.c Wed Jul 27 11:49:41 2016 (r303387) @@ -70,6 +70,7 @@ struct timehands { struct bintime th_offset; struct timeval th_microtime; struct timespec th_nanotime; + struct bintime th_boottime; /* Fields not to be copied in tc_windup start with th_generation. */ u_int th_generation; struct timehands *th_next; @@ -96,8 +97,6 @@ int tc_min_ticktock_freq = 1; volatile time_t time_second = 1; volatile time_t time_uptime = 1; -static struct bintime boottimebin_x; -static struct timeval boottime_x; static int sysctl_kern_boottime(SYSCTL_HANDLER_ARGS); SYSCTL_PROC(_kern, KERN_BOOTTIME, boottime, CTLTYPE_STRUCT|CTLFLAG_RD, NULL, 0, sysctl_kern_boottime, "S,timeval", "System boottime"); @@ -125,7 +124,7 @@ SYSCTL_PROC(_kern_timecounter, OID_AUTO, static int tc_chosen; /* Non-zero if a specific tc was chosen via sysctl. */ -static void tc_windup(void); +static void tc_windup(struct bintime *new_boottimebin); static void cpu_tick_calibrate(int); void dtrace_getnanotime(struct timespec *tsp); @@ -228,9 +227,17 @@ fbclock_microuptime(struct timeval *tvp) void fbclock_bintime(struct bintime *bt) { + struct timehands *th; + unsigned int gen; - fbclock_binuptime(bt); - bintime_add(bt, &boottimebin_x); + do { + th = timehands; + gen = atomic_load_acq_int(&th->th_generation); + *bt = th->th_offset; + bintime_addx(bt, th->th_scale * tc_delta(th)); + bintime_add(bt, &th->th_boottime); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } void @@ -303,9 +310,9 @@ fbclock_getbintime(struct bintime *bt) th = timehands; gen = atomic_load_acq_int(&th->th_generation); *bt = th->th_offset; + bintime_add(bt, &th->th_boottime); atomic_thread_fence_acq(); } while (gen == 0 || gen != th->th_generation); - bintime_add(bt, &boottimebin_x); } void @@ -372,9 +379,17 @@ microuptime(struct timeval *tvp) void bintime(struct bintime *bt) { + struct timehands *th; + u_int gen; - binuptime(bt); - bintime_add(bt, &boottimebin_x); + do { + th = timehands; + gen = atomic_load_acq_int(&th->th_generation); + *bt = th->th_offset; + bintime_addx(bt, th->th_scale * tc_delta(th)); + bintime_add(bt, &th->th_boottime); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } void @@ -447,9 +462,9 @@ getbintime(struct bintime *bt) th = timehands; gen = atomic_load_acq_int(&th->th_generation); *bt = th->th_offset; + bintime_add(bt, &th->th_boottime); atomic_thread_fence_acq(); } while (gen == 0 || gen != th->th_generation); - bintime_add(bt, &boottimebin_x); } void @@ -484,15 +499,24 @@ getmicrotime(struct timeval *tvp) void getboottime(struct timeval *boottime) { + struct bintime boottimebin; - *boottime = boottime_x; + getboottimebin(&boottimebin); + bintime2timeval(&boottimebin, boottime); } void getboottimebin(struct bintime *boottimebin) { + struct timehands *th; + u_int gen; - *boottimebin = boottimebin_x; + do { + th = timehands; + gen = atomic_load_acq_int(&th->th_generation); + *boottimebin = th->th_boottime; + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } #ifdef FFCLOCK @@ -1237,10 +1261,12 @@ tc_getfrequency(void) return (timehands->th_counter->tc_frequency); } +static struct mtx tc_setclock_mtx; +MTX_SYSINIT(tc_setclock_init, &tc_setclock_mtx, "tcsetc", MTX_SPIN); + /* * Step our concept of UTC. This is done by modifying our estimate of * when we booted. - * XXX: not locked. */ void tc_setclock(struct timespec *ts) @@ -1248,26 +1274,24 @@ tc_setclock(struct timespec *ts) struct timespec tbef, taft; struct bintime bt, bt2; - cpu_tick_calibrate(1); - nanotime(&tbef); timespec2bintime(ts, &bt); + nanotime(&tbef); + mtx_lock_spin(&tc_setclock_mtx); + cpu_tick_calibrate(1); binuptime(&bt2); bintime_sub(&bt, &bt2); - bintime_add(&bt2, &boottimebin_x); - boottimebin_x = bt; - bintime2timeval(&bt, &boottime_x); /* XXX fiddle all the little crinkly bits around the fiords... */ - tc_windup(); - nanotime(&taft); + tc_windup(&bt); + mtx_unlock_spin(&tc_setclock_mtx); if (timestepwarnings) { + nanotime(&taft); log(LOG_INFO, "Time stepped from %jd.%09ld to %jd.%09ld (%jd.%09ld)\n", (intmax_t)tbef.tv_sec, tbef.tv_nsec, (intmax_t)taft.tv_sec, taft.tv_nsec, (intmax_t)ts->tv_sec, ts->tv_nsec); } - cpu_tick_calibrate(1); } /* @@ -1276,7 +1300,7 @@ tc_setclock(struct timespec *ts) * timecounter and/or do seconds processing in NTP. Slightly magic. */ static void -tc_windup(void) +tc_windup(struct bintime *new_boottimebin) { struct bintime bt; struct timehands *th, *tho; @@ -1300,6 +1324,8 @@ tc_windup(void) th->th_generation = 0; atomic_thread_fence_rel(); bcopy(tho, th, offsetof(struct timehands, th_generation)); + if (new_boottimebin != NULL) + th->th_boottime = *new_boottimebin; /* * Capture a timecounter delta on the current timecounter and if @@ -1349,7 +1375,7 @@ tc_windup(void) * case we missed a leap second. */ bt = th->th_offset; - bintime_add(&bt, &boottimebin_x); + bintime_add(&bt, &th->th_boottime); i = bt.sec - tho->th_microtime.tv_sec; if (i > LARGE_STEP) i = 2; @@ -1357,7 +1383,7 @@ tc_windup(void) t = bt.sec; ntp_update_second(&th->th_adjustment, &bt.sec); if (bt.sec != t) - boottimebin_x.sec += bt.sec - t; + th->th_boottime.sec += bt.sec - t; } /* Update the UTC timestamps used by the get*() functions. */ /* XXX shouldn't do this here. Should force non-`get' versions. */ @@ -1780,7 +1806,7 @@ pps_event(struct pps_state *pps, int eve tcount &= pps->capth->th_counter->tc_counter_mask; bt = pps->capth->th_offset; bintime_addx(&bt, pps->capth->th_scale * tcount); - bintime_add(&bt, &boottimebin_x); + bintime_add(&bt, &pps->capth->th_boottime); bintime2timespec(&bt, &ts); /* If the timecounter was wound up underneath us, bail out. */ @@ -1853,11 +1879,14 @@ tc_ticktock(int cnt) { static int count; - count += cnt; - if (count < tc_tick) - return; - count = 0; - tc_windup(); + if (mtx_trylock_spin(&tc_setclock_mtx)) { + count += cnt; + if (count >= tc_tick) { + count = 0; + tc_windup(NULL); + } + mtx_unlock_spin(&tc_setclock_mtx); + } } static void __inline @@ -1932,7 +1961,9 @@ inittimecounter(void *dummy) /* warm up new timecounter (again) and get rolling. */ (void)timecounter->tc_get_timecount(timecounter); (void)timecounter->tc_get_timecount(timecounter); - tc_windup(); + mtx_lock_spin(&tc_setclock_mtx); + tc_windup(NULL); + mtx_unlock_spin(&tc_setclock_mtx); } SYSINIT(timecounter, SI_SUB_CLOCKS, SI_ORDER_SECOND, inittimecounter, NULL); @@ -2106,7 +2137,7 @@ tc_fill_vdso_timehands(struct vdso_timeh vdso_th->th_offset_count = th->th_offset_count; vdso_th->th_counter_mask = th->th_counter->tc_counter_mask; vdso_th->th_offset = th->th_offset; - vdso_th->th_boottime = boottimebin_x; + vdso_th->th_boottime = th->th_boottime; enabled = cpu_fill_vdso_timehands(vdso_th, th->th_counter); if (!vdso_th_enable) enabled = 0; @@ -2127,8 +2158,8 @@ tc_fill_vdso_timehands32(struct vdso_tim vdso_th32->th_counter_mask = th->th_counter->tc_counter_mask; vdso_th32->th_offset.sec = th->th_offset.sec; *(uint64_t *)&vdso_th32->th_offset.frac[0] = th->th_offset.frac; - vdso_th32->th_boottime.sec = boottimebin_x.sec; - *(uint64_t *)&vdso_th32->th_boottime.frac[0] = boottimebin_x.frac; + vdso_th32->th_boottime.sec = th->th_boottime.sec; + *(uint64_t *)&vdso_th32->th_boottime.frac[0] = th->th_boottime.frac; enabled = cpu_fill_vdso_timehands32(vdso_th32, th->th_counter); if (!vdso_th_enable) enabled = 0; From owner-svn-src-all@freebsd.org Wed Jul 27 11:54:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A43B1BA4CA5; Wed, 27 Jul 2016 11:54:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CFBA107A; Wed, 27 Jul 2016 11:54:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RBsOnQ092959; Wed, 27 Jul 2016 11:54:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RBsOqA092958; Wed, 27 Jul 2016 11:54:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607271154.u6RBsOqA092958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jul 2016 11:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303388 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 11:54:25 -0000 Author: kib Date: Wed Jul 27 11:54:24 2016 New Revision: 303388 URL: https://svnweb.freebsd.org/changeset/base/303388 Log: Remove Giant from settime(), tc_setclock_mtx guards tc_windup() calls, and there is no other issues with parallel settime(). Remove spl() vestiges there as well. Tested by: pho (as part of the whole patch) Reviewed by: jhb (same) Discussed wit: bde Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D7302 Modified: head/sys/kern/kern_time.c Modified: head/sys/kern/kern_time.c ============================================================================== --- head/sys/kern/kern_time.c Wed Jul 27 11:49:41 2016 (r303387) +++ head/sys/kern/kern_time.c Wed Jul 27 11:54:24 2016 (r303388) @@ -120,9 +120,7 @@ settime(struct thread *td, struct timeva struct timeval delta, tv1, tv2; static struct timeval maxtime, laststep; struct timespec ts; - int s; - s = splclock(); microtime(&tv1); delta = *tv; timevalsub(&delta, &tv1); @@ -152,10 +150,8 @@ settime(struct thread *td, struct timeva printf("Time adjustment clamped to -1 second\n"); } } else { - if (tv1.tv_sec == laststep.tv_sec) { - splx(s); + if (tv1.tv_sec == laststep.tv_sec) return (EPERM); - } if (delta.tv_sec > 1) { tv->tv_sec = tv1.tv_sec + 1; printf("Time adjustment clamped to +1 second\n"); @@ -166,10 +162,8 @@ settime(struct thread *td, struct timeva ts.tv_sec = tv->tv_sec; ts.tv_nsec = tv->tv_usec * 1000; - mtx_lock(&Giant); tc_setclock(&ts); resettodr(); - mtx_unlock(&Giant); return (0); } From owner-svn-src-all@freebsd.org Wed Jul 27 13:53:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6671BA62B4; Wed, 27 Jul 2016 13:53:16 +0000 (UTC) (envelope-from jch@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53B0B1710; Wed, 27 Jul 2016 13:53:16 +0000 (UTC) (envelope-from jch@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RDrFho037251; Wed, 27 Jul 2016 13:53:15 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RDrFd4037250; Wed, 27 Jul 2016 13:53:15 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201607271353.u6RDrFd4037250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Wed, 27 Jul 2016 13:53:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303389 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 13:53:16 -0000 Author: jch Date: Wed Jul 27 13:53:15 2016 New Revision: 303389 URL: https://svnweb.freebsd.org/changeset/base/303389 Log: MFC r286873: Make clear that TIME_WAIT timeout expiration is managed solely by tcp_tw_2msl_scan(). Sponsored by: Verisign, Inc. Modified: stable/10/sys/netinet/tcp_timer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_timer.c ============================================================================== --- stable/10/sys/netinet/tcp_timer.c Wed Jul 27 11:54:24 2016 (r303388) +++ stable/10/sys/netinet/tcp_timer.c Wed Jul 27 13:53:15 2016 (r303389) @@ -292,21 +292,29 @@ tcp_timer_2msl(void *xtp) /* * 2 MSL timeout in shutdown went off. If we're closed but * still waiting for peer to close and connection has been idle - * too long, or if 2MSL time is up from TIME_WAIT, delete connection - * control block. Otherwise, check again in a bit. + * too long delete connection control block. Otherwise, check + * again in a bit. + * + * If in TIME_WAIT state just ignore as this timeout is handled in + * tcp_tw_2msl_scan(). * * If fastrecycle of FIN_WAIT_2, in FIN_WAIT_2 and receiver has closed, * there's no point in hanging onto FIN_WAIT_2 socket. Just close it. * Ignore fact that there were recent incoming segments. */ + if ((inp->inp_flags & INP_TIMEWAIT) != 0) { + INP_WUNLOCK(inp); + INP_INFO_WUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); + return; + } if (tcp_fast_finwait2_recycle && tp->t_state == TCPS_FIN_WAIT_2 && tp->t_inpcb && tp->t_inpcb->inp_socket && (tp->t_inpcb->inp_socket->so_rcv.sb_state & SBS_CANTRCVMORE)) { TCPSTAT_INC(tcps_finwait2_drops); tp = tcp_close(tp); } else { - if (tp->t_state != TCPS_TIME_WAIT && - ticks - tp->t_rcvtime <= TP_MAXIDLE(tp)) { + if (ticks - tp->t_rcvtime <= TP_MAXIDLE(tp)) { if (!callout_reset(&tp->t_timers->tt_2msl, TP_KEEPINTVL(tp), tcp_timer_2msl, tp)) { tp->t_timers->tt_flags &= ~TT_2MSL_RST; From owner-svn-src-all@freebsd.org Wed Jul 27 14:12:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C176BA65EC; Wed, 27 Jul 2016 14:12:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18C831E7F; Wed, 27 Jul 2016 14:12:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6REC5qC042022; Wed, 27 Jul 2016 14:12:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6REC5Jh042020; Wed, 27 Jul 2016 14:12:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607271412.u6REC5Jh042020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 27 Jul 2016 14:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303390 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 14:12:06 -0000 Author: emaste Date: Wed Jul 27 14:12:04 2016 New Revision: 303390 URL: https://svnweb.freebsd.org/changeset/base/303390 Log: syscons,vt: improve phrasing in kern.vty man page description Submitted by: wblock Modified: head/share/man/man4/syscons.4 head/share/man/man4/vt.4 Modified: head/share/man/man4/syscons.4 ============================================================================== --- head/share/man/man4/syscons.4 Wed Jul 27 13:53:15 2016 (r303389) +++ head/share/man/man4/syscons.4 Wed Jul 27 14:12:04 2016 (r303390) @@ -468,10 +468,11 @@ be selected by setting this variable to .Ql sc or .Ql vt . -If not set, the default console in the +The .Pa GENERIC -kernel is -.Xr vt 4 . +kernel uses +.Xr vt 4 +when this value is not set. .El .Sh FILES .Bl -tag -width /usr/share/syscons/xxxxyyyyzzz -compact Modified: head/share/man/man4/vt.4 ============================================================================== --- head/share/man/man4/vt.4 Wed Jul 27 13:53:15 2016 (r303389) +++ head/share/man/man4/vt.4 Wed Jul 27 14:12:04 2016 (r303390) @@ -201,10 +201,11 @@ Set this value to or .Ql sc to choose a specific system console, overriding the default. -If not set, the default in the +The .Pa GENERIC -kernel is -.Nm . +kernel uses +.Nm +when this value is not set. .It Va kern.vt.fb.default_mode Set this value to a graphic mode to override the default mode picked by the .Nm From owner-svn-src-all@freebsd.org Wed Jul 27 14:27:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A63DABA6874; Wed, 27 Jul 2016 14:27:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EF8F1784; Wed, 27 Jul 2016 14:27:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RER8VY048538; Wed, 27 Jul 2016 14:27:08 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RER8C0048537; Wed, 27 Jul 2016 14:27:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607271427.u6RER8C0048537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 27 Jul 2016 14:27:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303391 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 14:27:09 -0000 Author: emaste Date: Wed Jul 27 14:27:08 2016 New Revision: 303391 URL: https://svnweb.freebsd.org/changeset/base/303391 Log: ANSIfy kern_proc.c and delete register keyword Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6478 Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Wed Jul 27 14:12:04 2016 (r303390) +++ head/sys/kern/kern_proc.c Wed Jul 27 14:27:08 2016 (r303391) @@ -354,10 +354,9 @@ found: * The caller must hold proctree_lock. */ struct pgrp * -pgfind(pgid) - register pid_t pgid; +pgfind(pid_t pgid) { - register struct pgrp *pgrp; + struct pgrp *pgrp; sx_assert(&proctree_lock, SX_LOCKED); @@ -435,11 +434,7 @@ errout: * Begin a new session if required. */ int -enterpgrp(p, pgid, pgrp, sess) - register struct proc *p; - pid_t pgid; - struct pgrp *pgrp; - struct session *sess; +enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess) { sx_assert(&proctree_lock, SX_XLOCKED); @@ -500,9 +495,7 @@ enterpgrp(p, pgid, pgrp, sess) * Move p to an existing process group */ int -enterthispgrp(p, pgrp) - register struct proc *p; - struct pgrp *pgrp; +enterthispgrp(struct proc *p, struct pgrp *pgrp) { sx_assert(&proctree_lock, SX_XLOCKED); @@ -527,9 +520,7 @@ enterthispgrp(p, pgrp) * Move p to a process group */ static void -doenterpgrp(p, pgrp) - struct proc *p; - struct pgrp *pgrp; +doenterpgrp(struct proc *p, struct pgrp *pgrp) { struct pgrp *savepgrp; @@ -566,8 +557,7 @@ doenterpgrp(p, pgrp) * remove process from process group */ int -leavepgrp(p) - register struct proc *p; +leavepgrp(struct proc *p) { struct pgrp *savepgrp; @@ -588,8 +578,7 @@ leavepgrp(p) * delete a process group */ static void -pgdelete(pgrp) - register struct pgrp *pgrp; +pgdelete(struct pgrp *pgrp) { struct session *savesess; struct tty *tp; @@ -622,9 +611,7 @@ pgdelete(pgrp) } static void -pgadjustjobc(pgrp, entering) - struct pgrp *pgrp; - int entering; +pgadjustjobc(struct pgrp *pgrp, int entering) { PGRP_LOCK(pgrp); @@ -764,10 +751,9 @@ killjobc(void) * hang-up all process in that group. */ static void -orphanpg(pg) - struct pgrp *pg; +orphanpg(struct pgrp *pg) { - register struct proc *p; + struct proc *p; PGRP_LOCK_ASSERT(pg, MA_OWNED); @@ -812,9 +798,9 @@ sess_release(struct session *s) DB_SHOW_COMMAND(pgrpdump, pgrpdump) { - register struct pgrp *pgrp; - register struct proc *p; - register int i; + struct pgrp *pgrp; + struct proc *p; + int i; for (i = 0; i <= pgrphash; i++) { if (!LIST_EMPTY(&pgrphashtbl[i])) { From owner-svn-src-all@freebsd.org Wed Jul 27 14:58:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6B8FBA6EE3; Wed, 27 Jul 2016 14:58:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C8D91741; Wed, 27 Jul 2016 14:58:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6REwFaL059659; Wed, 27 Jul 2016 14:58:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6REwF1r059656; Wed, 27 Jul 2016 14:58:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607271458.u6REwF1r059656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 27 Jul 2016 14:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303392 - in 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 14:58:16 -0000 Author: emaste Date: Wed Jul 27 14:58:15 2016 New Revision: 303392 URL: https://svnweb.freebsd.org/changeset/base/303392 Log: Remove ${OBJDUMP} as it is not used by the base system It was added to sys.mk relatively recently (r274503) for EFI builds but is no longer used by the base system. The in-tree binutils are outdated, will not be updated, and will be removed in the future. Remove it from the toolchain build now to slightly simplify the build and make sure we don't grow an accidental dependency. Note that this affects only the toolchain build, and does not affect /usr/bin/objdump in the built world. Reviewed by: bdrewery Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6460 Modified: head/Makefile.inc1 head/share/mk/local.meta.sys.mk head/share/mk/sys.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jul 27 14:27:08 2016 (r303391) +++ head/Makefile.inc1 Wed Jul 27 14:58:15 2016 (r303392) @@ -178,7 +178,7 @@ CROSS_BINUTILS_PREFIX=/usr/local/${TARGE .endif .endif .endif -XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB SIZE STRINGS +XBINUTILS= AS AR LD NM OBJCOPY RANLIB SIZE STRINGS .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) && \ exists(${CROSS_BINUTILS_PREFIX}${${BINUTIL}}) @@ -539,7 +539,7 @@ HMAKE+= PATH=${TMPPATH} METALOG=${METAL CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCXXFLAGS} ${XCFLAGS}" \ CPP="${XCPP} ${XCFLAGS}" \ AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \ - OBJDUMP=${XOBJDUMP} OBJCOPY="${XOBJCOPY}" \ + OBJCOPY="${XOBJCOPY}" \ RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ SIZE="${XSIZE}" Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Wed Jul 27 14:27:08 2016 (r303391) +++ head/share/mk/local.meta.sys.mk Wed Jul 27 14:58:15 2016 (r303392) @@ -222,7 +222,7 @@ WITH_META_STATS= t .if ${MACHINE} == "host" MK_SHARED_TOOLCHAIN= no .endif -TOOLCHAIN_VARS= AS AR CC CLANG_TBLGEN CXX CPP LD NM OBJDUMP OBJCOPY RANLIB \ +TOOLCHAIN_VARS= AS AR CC CLANG_TBLGEN CXX CPP LD NM OBJCOPY RANLIB \ STRINGS SIZE LLVM_TBLGEN _toolchain_bin_CLANG_TBLGEN= /usr/bin/clang-tblgen _toolchain_bin_LLVM_TBLGEN= /usr/bin/llvm-tblgen Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Wed Jul 27 14:27:08 2016 (r303391) +++ head/share/mk/sys.mk Wed Jul 27 14:58:15 2016 (r303392) @@ -237,8 +237,6 @@ OBJCFLAGS ?= ${OBJCINCLUDES} ${CFLAGS} - OBJCOPY ?= objcopy -OBJDUMP ?= objdump - PC ?= pc PFLAGS ?= From owner-svn-src-all@freebsd.org Wed Jul 27 15:14:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2A81BA24AF; Wed, 27 Jul 2016 15:14:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 958DA15D9; Wed, 27 Jul 2016 15:14:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RFEBlS068948; Wed, 27 Jul 2016 15:14:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RFEBGP068945; Wed, 27 Jul 2016 15:14:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607271514.u6RFEBGP068945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jul 2016 15:14:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303393 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 15:14:13 -0000 Author: kib Date: Wed Jul 27 15:14:11 2016 New Revision: 303393 URL: https://svnweb.freebsd.org/changeset/base/303393 Log: Remove empty initializer for the once facility. It was not needed since r179417. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libthr/thread/thr_init.c head/lib/libthr/thread/thr_once.c head/lib/libthr/thread/thr_private.h Modified: head/lib/libthr/thread/thr_init.c ============================================================================== --- head/lib/libthr/thread/thr_init.c Wed Jul 27 14:58:15 2016 (r303392) +++ head/lib/libthr/thread/thr_init.c Wed Jul 27 15:14:11 2016 (r303393) @@ -447,7 +447,6 @@ init_private(void) _thr_urwlock_init(&_thr_atfork_lock); _thr_umutex_init(&_thr_event_lock); _thr_umutex_init(&_suspend_all_lock); - _thr_once_init(); _thr_spinlock_init(); _thr_list_init(); _thr_wake_addr_init(); Modified: head/lib/libthr/thread/thr_once.c ============================================================================== --- head/lib/libthr/thread/thr_once.c Wed Jul 27 14:58:15 2016 (r303392) +++ head/lib/libthr/thread/thr_once.c Wed Jul 27 15:14:11 2016 (r303393) @@ -101,8 +101,3 @@ _pthread_once(pthread_once_t *once_contr _thr_umtx_wake(&once_control->state, INT_MAX, 0); return (0); } - -void -_thr_once_init(void) -{ -} Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Wed Jul 27 14:58:15 2016 (r303392) +++ head/lib/libthr/thread/thr_private.h Wed Jul 27 15:14:11 2016 (r303393) @@ -811,7 +811,6 @@ void _thr_link(struct pthread *, struct void _thr_unlink(struct pthread *, struct pthread *) __hidden; void _thr_assert_lock_level(void) __hidden __dead2; void _thr_ast(struct pthread *) __hidden; -void _thr_once_init(void) __hidden; void _thr_report_creation(struct pthread *curthread, struct pthread *newthread) __hidden; void _thr_report_death(struct pthread *curthread) __hidden; From owner-svn-src-all@freebsd.org Wed Jul 27 15:31:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99B31BA2C3E; Wed, 27 Jul 2016 15:31:27 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::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 31A051F51; Wed, 27 Jul 2016 15:31:27 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by mail-wm0-x22e.google.com with SMTP id q128so217481527wma.1; Wed, 27 Jul 2016 08:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zdbMMXD+1agVTop68qjIz0tnG+h05pv8nyJgz+UILjc=; b=SANeeVfmNIegeL1ksus1eVAf7WqGMVEavWmmPJgE0dHUqbYgBjFZVlh7a/gr5rbC6D xV/ICoYEtw4iNYU6Xh4UIQCoCNvgSQItLgs1htt2IcfUvFFyXRYblkR7BihOEEjve6bT p49MuYZ8BOJ16vrRxkiqHeVW/ThtdGJe62wd8jhm+4wVpGEgIQlFkZzJzzfyv1YFkLp8 ENsDbbobwegkGn/3Qcc9L/45nZ9U+czDnsaR9ycgeevbmN4bB/ghoUpTtu53hpiL/r4H 8kjYYETI/8NrryqazmbsVqUnnp7VKNwZwKDjPQElD2T02AjCCGDrf9bxVPqdUO6HNlr+ B/NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zdbMMXD+1agVTop68qjIz0tnG+h05pv8nyJgz+UILjc=; b=XLKMBxBf/aobvikDQExK8mjEEzOZqDKmub3EItLo1s/BY3Vp+pYDj9UFqCd388qRRN ZAWfExoNWmU1vShYu/JHEhsy4APosiLCjqd7vkHeOPJZekz4VnPSMFhQgmd9uR/Zr8ZJ uoXbXwp0iwYCCZQsLeor55UNuApTJBz8wd7tJj8Hu7OHDUwPhqvRHHOMx8+5BV7TKFCK vbjXJT7YVBtu4/C+94mCc++UEDKCuOPmY7F50wVdw/9l/hBOoccUjewVTYea4nKvMNV3 wHv801J5TQvhW8QquqWsgovlCNcthRrCDglvmhDLfZmtrZzO5dKMIlApbnk+J4jVmj4n s+rw== X-Gm-Message-State: AEkooutn9jFybmrcZ0aQzOaEQus2/kpltY7sJJ3ejG/GQ9zG8cw2/45WbsK74q0ofNx8lqH3zr4vhsoa07nRlQ== X-Received: by 10.28.4.77 with SMTP id 74mr34135633wme.84.1469633484709; Wed, 27 Jul 2016 08:31:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.105.104 with HTTP; Wed, 27 Jul 2016 08:31:24 -0700 (PDT) In-Reply-To: <201511181752.tAIHqcdF006755@repo.freebsd.org> References: <201511181752.tAIHqcdF006755@repo.freebsd.org> From: Sergey Kandaurov Date: Wed, 27 Jul 2016 18:31:24 +0300 Message-ID: Subject: Re: svn commit: r291021 - in head: sbin usr.sbin To: Bryan Drewery 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 15:31:27 -0000 On 18 November 2015 at 20:52, Bryan Drewery wrote: > Author: bdrewery > Date: Wed Nov 18 17:52:38 2015 > New Revision: 291021 > URL: https://svnweb.freebsd.org/changeset/base/291021 > > Log: > Convert to SUBDIR.yes format. > > Reviewed by: imp > Sponsored by: EMC / Isilon Storage Division > Differential Revision: https://reviews.freebsd.org/D4182 > Looks like this change lost pmcstudy by an accident. > - > -# XXX MK_TOOLCHAIN? > -.if ${MK_PMC} != "no" > -SUBDIR+= pmcannotate > -SUBDIR+= pmccontrol > -SUBDIR+= pmcstat > -SUBDIR+= pmcstudy > -.endif > - [...] > +SUBDIR.${MK_PMC}+= pmcannotate > +SUBDIR.${MK_PMC}+= pmccontrol > +SUBDIR.${MK_PMC}+= pmcstat -- wbr, pluknet From owner-svn-src-all@freebsd.org Wed Jul 27 15:58:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 213D8BA6620; Wed, 27 Jul 2016 15:58:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id ED9EC12B3; Wed, 27 Jul 2016 15:58:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id E427E1BFD; Wed, 27 Jul 2016 15:58:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 803422358D; Wed, 27 Jul 2016 15:58:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id ti-82R_6Dj_M; Wed, 27 Jul 2016 15:58:12 +0000 (UTC) Subject: Re: svn commit: r291021 - in head: sbin usr.sbin DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 63B8023587 To: Sergey Kandaurov References: <201511181752.tAIHqcdF006755@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <10fff636-d896-d0b4-3cb5-4bf3d0159706@FreeBSD.org> Date: Wed, 27 Jul 2016 08:58:12 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LniQoJ8l2RdFvdNFeerbp2acrxV8hPnfE" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 15:58:20 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LniQoJ8l2RdFvdNFeerbp2acrxV8hPnfE Content-Type: multipart/mixed; boundary="IeQPVxGk5pQLk9k7rBLKjIf8ixSLImLcA" From: Bryan Drewery To: Sergey Kandaurov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <10fff636-d896-d0b4-3cb5-4bf3d0159706@FreeBSD.org> Subject: Re: svn commit: r291021 - in head: sbin usr.sbin References: <201511181752.tAIHqcdF006755@repo.freebsd.org> In-Reply-To: --IeQPVxGk5pQLk9k7rBLKjIf8ixSLImLcA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 7/27/2016 8:31 AM, Sergey Kandaurov wrote: > On 18 November 2015 at 20:52, Bryan Drewery wrot= e: >> Author: bdrewery >> Date: Wed Nov 18 17:52:38 2015 >> New Revision: 291021 >> URL: https://svnweb.freebsd.org/changeset/base/291021 >> >> Log: >> Convert to SUBDIR.yes format. >> >> Reviewed by: imp >> Sponsored by: EMC / Isilon Storage Division >> Differential Revision: https://reviews.freebsd.org/D4182 >> >=20 > Looks like this change lost pmcstudy by an accident. >=20 >> - >> -# XXX MK_TOOLCHAIN? >> -.if ${MK_PMC} !=3D "no" >> -SUBDIR+=3D pmcannotate >> -SUBDIR+=3D pmccontrol >> -SUBDIR+=3D pmcstat >> -SUBDIR+=3D pmcstudy >> -.endif >> - > [...] >> +SUBDIR.${MK_PMC}+=3D pmcannotate >> +SUBDIR.${MK_PMC}+=3D pmccontrol >> +SUBDIR.${MK_PMC}+=3D pmcstat >=20 >=20 >=20 Nice catch. I'm doing a build test now and will get it in soon. --=20 Regards, Bryan Drewery --IeQPVxGk5pQLk9k7rBLKjIf8ixSLImLcA-- --LniQoJ8l2RdFvdNFeerbp2acrxV8hPnfE 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 iQEcBAEBAgAGBQJXmNoUAAoJEDXXcbtuRpfPadEH/RQdFk2+DKMW51qhrIvl/Un6 un2O497cS5XYbVPlSNR5eGClHVWwNL09YiZf7G641QYalTIcOMklTp/PX8h3dTMw nw/d/2t4Vk0CJVE4p9V59hwmkr8laIC9xWB9AMh6/qlBDGb5f13iIYg3yzSpMGFt DQ/B2+imLzO/BIoUlsuLjqd/wcgboAkeAZDgwZIUAuExUY3hbJ+0uZ44aSyptPBp priBrRtwJGqnUhh7BgacF5FaQikwJKIm2T5hnn1e4TqOWapWMn8ML/4qiHLKe56W HYl8SQhjyZlv8vUCM0Zo8QH1NYlPxmRtRUbfrfi4neq/hDCrLLNrRCi4kViEVfs= =FvY6 -----END PGP SIGNATURE----- --LniQoJ8l2RdFvdNFeerbp2acrxV8hPnfE-- From owner-svn-src-all@freebsd.org Wed Jul 27 16:01:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48F3BBA6785; Wed, 27 Jul 2016 16:01:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BD321656; Wed, 27 Jul 2016 16:01:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RG1iUC087333; Wed, 27 Jul 2016 16:01:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RG1iks087332; Wed, 27 Jul 2016 16:01:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607271601.u6RG1iks087332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 27 Jul 2016 16:01:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303394 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 16:01:45 -0000 Author: emaste Date: Wed Jul 27 16:01:44 2016 New Revision: 303394 URL: https://svnweb.freebsd.org/changeset/base/303394 Log: Enable LLVM libunwind by default on amd64 and i386 It is a maintained and updated runtime exception stack unwinder that should be a drop-in replacement. It can be disabled by setting WITHOUT_LLVM_LIBUNWIND in src.conf. PR: 206039 [exp-run] 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 Wed Jul 27 15:14:11 2016 (r303393) +++ head/share/mk/src.opts.mk Wed Jul 27 16:01:44 2016 (r303394) @@ -235,15 +235,18 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTST # In-tree binutils/gcc are older versions without modern architecture support. .if ${__T} == "aarch64" || ${__T} == "riscv64" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB -__DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND -.else -__DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND .endif .if ${__T} == "riscv64" BROKEN_OPTIONS+=PROFILE # "sorry, unimplemented: profiler support for RISC-V" BROKEN_OPTIONS+=TESTS # "undefined reference to `_Unwind_Resume'" BROKEN_OPTIONS+=CXX # "libcxxrt.so: undefined reference to `_Unwind_Resume_or_Rethrow'" .endif +.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ + ${__T} == "riscv64" +__DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND +.else +__DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND +.endif .if ${__T} == "aarch64" || ${__T} == "amd64" __DEFAULT_YES_OPTIONS+=LLDB .else From owner-svn-src-all@freebsd.org Wed Jul 27 16:27:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91F53BA6E77; Wed, 27 Jul 2016 16:27:42 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B0971784; Wed, 27 Jul 2016 16:27:42 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RGRfp4096295; Wed, 27 Jul 2016 16:27:41 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RGRfAD096294; Wed, 27 Jul 2016 16:27:41 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201607271627.u6RGRfAD096294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Wed, 27 Jul 2016 16:27:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303395 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 16:27:42 -0000 Author: julian Date: Wed Jul 27 16:27:41 2016 New Revision: 303395 URL: https://svnweb.freebsd.org/changeset/base/303395 Log: MFH: r303287 Split MAKE_SYSENT into two parts so that the initializer part can be used separately if one wants to embed the sysent into a larger structure. Modified: stable/10/sys/sys/sysent.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/sysent.h ============================================================================== --- stable/10/sys/sys/sysent.h Wed Jul 27 16:01:44 2016 (r303394) +++ stable/10/sys/sys/sysent.h Wed Jul 27 16:27:41 2016 (r303395) @@ -173,13 +173,21 @@ struct syscall_module_data { struct sysent old_sysent; /* old sysent */ }; -#define MAKE_SYSENT(syscallname) \ -static struct sysent syscallname##_sysent = { \ - (sizeof(struct syscallname ## _args ) \ +/* separate initialization vector so it can be used in a substructure */ +#define SYSENT_INIT_VALS(_syscallname) { \ + .sy_narg = (sizeof(struct _syscallname ## _args ) \ / sizeof(register_t)), \ - (sy_call_t *)& sys_##syscallname, \ - SYS_AUE_##syscallname \ -} + .sy_call = (sy_call_t *)&sys_##_syscallname, \ + .sy_auevent = SYS_AUE_##_syscallname, \ + .sy_systrace_args_func = NULL, \ + .sy_entry = 0, \ + .sy_return = 0, \ + .sy_flags = 0, \ + .sy_thrcnt = 0 \ +} + +#define MAKE_SYSENT(syscallname) \ +static struct sysent syscallname##_sysent = SYSENT_INIT_VALS(syscallname); #define MAKE_SYSENT_COMPAT(syscallname) \ static struct sysent syscallname##_sysent = { \ From owner-svn-src-all@freebsd.org Wed Jul 27 16:34:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15A27BA6166; Wed, 27 Jul 2016 16:34:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB4AC1D3C; Wed, 27 Jul 2016 16:34:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RGYKPF099789; Wed, 27 Jul 2016 16:34:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RGYJHx099787; Wed, 27 Jul 2016 16:34:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607271634.u6RGYJHx099787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 27 Jul 2016 16:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303396 - in head: contrib/gcc/config/arm gnu/lib/libgcc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 16:34:21 -0000 Author: emaste Date: Wed Jul 27 16:34:19 2016 New Revision: 303396 URL: https://svnweb.freebsd.org/changeset/base/303396 Log: rename ARM's libunwind.S to to avoid conflict with llvm libunwind llvm libunwind includes a libunwind.cpp, but on ARM libunwind.S is found first in .PATH. Rename the latter one, since it is not going to be updated again. Reviewed by: andrew MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7162 Added: head/contrib/gcc/config/arm/libunwind-arm.S - copied unchanged from r303395, head/contrib/gcc/config/arm/libunwind.S Deleted: head/contrib/gcc/config/arm/libunwind.S Modified: head/gnu/lib/libgcc/Makefile Copied: head/contrib/gcc/config/arm/libunwind-arm.S (from r303395, head/contrib/gcc/config/arm/libunwind.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcc/config/arm/libunwind-arm.S Wed Jul 27 16:34:19 2016 (r303396, copy of r303395, head/contrib/gcc/config/arm/libunwind.S) @@ -0,0 +1,136 @@ +/* Support functions for the unwinder. + Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Contributed by Paul Brook + + This file is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + In addition to the permissions in the GNU General Public License, the + Free Software Foundation gives you unlimited permission to link the + compiled version of this file into combinations with other programs, + and to distribute those combinations without any restriction coming + from the use of this file. (The General Public License restrictions + do apply in other respects; for example, they cover modification of + the file, and distribution when not linked into a combine + executable.) + + This file is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +#include + +/* Allow the use of VFP instructions */ +#if __ARM_ARCH >= 7 +.fpu vfp +#endif + +#ifndef __symbian__ + +#include "lib1funcs.asm" + +.macro UNPREFIX name + .global SYM (\name) + EQUIV SYM (\name), SYM (__\name) +.endm + +/* r0 points to a 16-word block. Upload these values to the actual core + state. */ +ARM_FUNC_START restore_core_regs + /* We must use sp as the base register when restoring sp. Push the + last 3 registers onto the top of the current stack to achieve + this. */ + add r1, r0, #52 + ldmia r1, {r3, r4, r5} /* {sp, lr, pc}. */ +#ifdef __INTERWORKING__ + /* Restore pc into ip. */ + mov r2, r5 + stmfd sp!, {r2, r3, r4} +#else + stmfd sp!, {r3, r4, r5} +#endif + /* Don't bother restoring ip. */ + ldmia r0, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp} + /* Pop the three registers we pushed earlier. */ +#ifdef __INTERWORKING__ + ldmfd sp, {ip, sp, lr} + bx ip +#else + ldmfd sp, {sp, lr, pc} +#endif + FUNC_END restore_core_regs + UNPREFIX restore_core_regs + +/* Load VFP registers d0-d15 from the address in r0. */ +ARM_FUNC_START gnu_Unwind_Restore_VFP + /* Use the generic coprocessor form so that gas doesn't complain + on soft-float targets. */ +#if __ARM_ARCH >= 7 + fldmiax r0, {d0-d15} +#else + ldc p11,cr0,[r0],{0x21} /* fldmiax r0, {d0-d15} */ +#endif + RET + +/* Store VFR regsters d0-d15 to the address in r0. */ +ARM_FUNC_START gnu_Unwind_Save_VFP + /* Use the generic coprocessor form so that gas doesn't complain + on soft-float targets. */ +#if __ARM_ARCH >= 7 + fstmiax r0, {d0-d15} +#else + stc p11,cr0,[r0],{0x21} /* fstmiax r0, {d0-d15} */ +#endif + RET + +/* Wrappers to save core registers, then call the real routine. */ + +.macro UNWIND_WRAPPER name nargs + ARM_FUNC_START \name + /* Create a phase2_vrs structure. */ + /* Split reg push in two to ensure the correct value for sp. */ + stmfd sp!, {sp, lr, pc} + stmfd sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip} + + /* Demand-save flags, plus an extra word for alignment. */ + mov r3, #0 + stmfd sp!, {r2, r3} + + /* Point r1 at the block. Pass r[0..nargs) unchanged. */ + add r\nargs, sp, #4 +#if defined(__thumb__) + /* Switch back to thumb mode to avoid interworking hassle. */ + adr ip, .L1_\name + orr ip, ip, #1 + bx ip + .thumb +.L1_\name: + bl SYM (__gnu\name) __PLT__ + ldr r3, [sp, #64] + add sp, #72 + bx r3 +#else + bl SYM (__gnu\name) __PLT__ + ldr lr, [sp, #64] + add sp, sp, #72 + RET +#endif + FUNC_END \name + UNPREFIX \name +.endm + +UNWIND_WRAPPER _Unwind_RaiseException 1 +UNWIND_WRAPPER _Unwind_Resume 1 +UNWIND_WRAPPER _Unwind_Resume_or_Rethrow 1 +UNWIND_WRAPPER _Unwind_ForcedUnwind 3 +UNWIND_WRAPPER _Unwind_Backtrace 2 + +#endif /* ndef __symbian__ */ Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Wed Jul 27 16:27:41 2016 (r303395) +++ head/gnu/lib/libgcc/Makefile Wed Jul 27 16:34:19 2016 (r303396) @@ -99,7 +99,7 @@ STATIC_CXXFLAGS+= -fvisibility=hidden -f .else # MK_LLVM_LIBUNWIND .if ${TARGET_CPUARCH} == "arm" -LIB2ADDEH = unwind-arm.c libunwind.S pr-support.c unwind-c.c +LIB2ADDEH = unwind-arm.c libunwind-arm.S pr-support.c unwind-c.c .else LIB2ADDEH = unwind-dw2.c unwind-dw2-fde-glibc.c unwind-sjlj.c gthr-gnat.c \ unwind-c.c From owner-svn-src-all@freebsd.org Wed Jul 27 17:10:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17623BA6B7F; Wed, 27 Jul 2016 17:10:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB345166B; Wed, 27 Jul 2016 17:10:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RHAA4T011781; Wed, 27 Jul 2016 17:10:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RHAAGw011780; Wed, 27 Jul 2016 17:10:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607271710.u6RHAAGw011780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 27 Jul 2016 17:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303398 - stable/11/contrib/elftoolchain/libelftc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 17:10:11 -0000 Author: emaste Date: Wed Jul 27 17:10:09 2016 New Revision: 303398 URL: https://svnweb.freebsd.org/changeset/base/303398 Log: MFC r303279: libelftc: fix demangling of wchar_t "wchar_t" is 7 characters long, not 6. PR: 208661 Submitted by: Daniel McRobb Approved by: re (kib) Obtained from: ELF Tool Chain r3480 Modified: stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c ============================================================================== --- stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Wed Jul 27 16:46:48 2016 (r303397) +++ stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Wed Jul 27 17:10:09 2016 (r303398) @@ -2551,7 +2551,7 @@ again: case 'w': /* wchar_t */ - if (!cpp_demangle_push_str(ddata, "wchar_t", 6)) + if (!cpp_demangle_push_str(ddata, "wchar_t", 7)) goto clean; ++ddata->cur; goto rtn; From owner-svn-src-all@freebsd.org Wed Jul 27 17:11:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FD66BA6BE8; Wed, 27 Jul 2016 17:11:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 357A51845; Wed, 27 Jul 2016 17:11:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RHB3tF012535; Wed, 27 Jul 2016 17:11:03 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RHB3uB012534; Wed, 27 Jul 2016 17:11:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607271711.u6RHB3uB012534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 27 Jul 2016 17:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303399 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 17:11:04 -0000 Author: markj Date: Wed Jul 27 17:11:03 2016 New Revision: 303399 URL: https://svnweb.freebsd.org/changeset/base/303399 Log: De-pluralize "queues" where appropriate in the pagedaemon code. MFC after: 1 week Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Wed Jul 27 17:10:09 2016 (r303398) +++ head/sys/vm/vm_pageout.c Wed Jul 27 17:11:03 2016 (r303399) @@ -885,7 +885,7 @@ vm_pageout_scan(struct vm_domain *vmd, i int act_delta, addl_page_shortage, deficit, error, maxlaunder, maxscan; int page_shortage, scan_tick, scanned, starting_page_shortage; int vnodes_skipped; - boolean_t pageout_ok, queues_locked; + boolean_t pageout_ok, queue_locked; /* * If we need to reclaim memory ask kernel caches to return @@ -952,12 +952,12 @@ vm_pageout_scan(struct vm_domain *vmd, i pq = &vmd->vmd_pagequeues[PQ_INACTIVE]; maxscan = pq->pq_cnt; vm_pagequeue_lock(pq); - queues_locked = TRUE; + queue_locked = TRUE; for (m = TAILQ_FIRST(&pq->pq_pl); m != NULL && maxscan-- > 0 && page_shortage > 0; m = next) { vm_pagequeue_assert_locked(pq); - KASSERT(queues_locked, ("unlocked queues")); + KASSERT(queue_locked, ("unlocked inactive queue")); KASSERT(m->queue == PQ_INACTIVE, ("Inactive queue %p", m)); PCPU_INC(cnt.v_pdpages); @@ -1027,7 +1027,7 @@ unlock_page: */ TAILQ_INSERT_AFTER(&pq->pq_pl, m, &vmd->vmd_marker, plinks.q); vm_pagequeue_unlock(pq); - queues_locked = FALSE; + queue_locked = FALSE; /* * Invalid pages can be easily freed. They cannot be @@ -1115,7 +1115,7 @@ free_page: m->flags |= PG_WINATCFLS; requeue_page: vm_pagequeue_lock(pq); - queues_locked = TRUE; + queue_locked = TRUE; vm_page_requeue_locked(m); } else if (maxlaunder > 0) { /* @@ -1153,15 +1153,15 @@ requeue_page: addl_page_shortage++; } vm_page_lock_assert(m, MA_NOTOWNED); - goto relock_queues; + goto relock_queue; } drop_page: vm_page_unlock(m); VM_OBJECT_WUNLOCK(object); -relock_queues: - if (!queues_locked) { +relock_queue: + if (!queue_locked) { vm_pagequeue_lock(pq); - queues_locked = TRUE; + queue_locked = TRUE; } next = TAILQ_NEXT(&vmd->vmd_marker, plinks.q); TAILQ_REMOVE(&pq->pq_pl, &vmd->vmd_marker, plinks.q); From owner-svn-src-all@freebsd.org Wed Jul 27 17:18:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9502BBA6D79; Wed, 27 Jul 2016 17:18:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 678561CCD; Wed, 27 Jul 2016 17:18:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RHI8jV015581; Wed, 27 Jul 2016 17:18:08 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RHI8Xg015580; Wed, 27 Jul 2016 17:18:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607271718.u6RHI8Xg015580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 27 Jul 2016 17:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303400 - head/contrib/libcxxrt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 17:18:09 -0000 Author: emaste Date: Wed Jul 27 17:18:08 2016 New Revision: 303400 URL: https://svnweb.freebsd.org/changeset/base/303400 Log: libcxxrt: fix demangling of wchar_t 'wchar_t' is 7 characters long, not 6. r303297 fixed this in libelftc, but not the second copy of this file that we have in libcxxrt. PR: 208661 Submitted by: Daniel McRobb Obtained from: ELF Tool Chain r3480 MFC after: 3 days Modified: head/contrib/libcxxrt/libelftc_dem_gnu3.c Modified: head/contrib/libcxxrt/libelftc_dem_gnu3.c ============================================================================== --- head/contrib/libcxxrt/libelftc_dem_gnu3.c Wed Jul 27 17:11:03 2016 (r303399) +++ head/contrib/libcxxrt/libelftc_dem_gnu3.c Wed Jul 27 17:18:08 2016 (r303400) @@ -2842,7 +2842,7 @@ again: case 'w': /* wchar_t */ - if (!cpp_demangle_push_str(ddata, "wchar_t", 6)) + if (!cpp_demangle_push_str(ddata, "wchar_t", 7)) goto clean; ++ddata->cur; goto rtn; From owner-svn-src-all@freebsd.org Wed Jul 27 17:55:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52326BA6778; Wed, 27 Jul 2016 17:55:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 165FD1472; Wed, 27 Jul 2016 17:55:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RHtEIc030518; Wed, 27 Jul 2016 17:55:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RHtEim030517; Wed, 27 Jul 2016 17:55:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607271755.u6RHtEim030517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 27 Jul 2016 17:55:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303402 - stable/11/usr.sbin/crashinfo X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 17:55:15 -0000 Author: jhb Date: Wed Jul 27 17:55:14 2016 New Revision: 303402 URL: https://svnweb.freebsd.org/changeset/base/303402 Log: MFC 303109: Update crashinfo to work with newer gdb from ports. If gdb from ports is installed, use it instead of the base system gdb to extract variables from a kernel. Note that base gdb and ports gdb do not support the same options for invoking a single command in batch mode, so a wrapper shell function is used. In addition, prefer kgdb from ports when generating a backtrace if present. PR: 193335 Approved by: re (gjb) Modified: stable/11/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- stable/11/usr.sbin/crashinfo/crashinfo.sh Wed Jul 27 17:21:24 2016 (r303401) +++ stable/11/usr.sbin/crashinfo/crashinfo.sh Wed Jul 27 17:55:14 2016 (r303402) @@ -35,6 +35,22 @@ usage() exit 1 } +# Run a single gdb command against a kernel file in batch mode. +# The kernel file is specified as the first argument and the command +# is given in the remaining arguments. +gdb_command() +{ + local k + + k=$1 ; shift + + if [ -x /usr/local/bin/gdb ]; then + /usr/local/bin/gdb -batch -ex "$@" $k + else + echo -e "$@" | /usr/bin/gdb -x /dev/stdin -batch $k + fi +} + find_kernel() { local ivers k kvers @@ -55,8 +71,8 @@ find_kernel() # Look for a matching kernel version. for k in `sysctl -n kern.bootfile` $(ls -t /boot/*/kernel); do - kvers=$(echo 'printf " Version String: %s", version' | \ - gdb -x /dev/stdin -batch $k 2>/dev/null) + kvers=$(gdb_command $k 'printf " Version String: %s", version' \ + 2>/dev/null) if [ "$ivers" = "$kvers" ]; then KERNEL=$k break @@ -151,11 +167,10 @@ echo "Writing crash summary to $FILE." umask 077 # Simulate uname -ostype=$(echo -e printf '"%s", ostype' | gdb -x /dev/stdin -batch $KERNEL) -osrelease=$(echo -e printf '"%s", osrelease' | gdb -x /dev/stdin -batch $KERNEL) -version=$(echo -e printf '"%s", version' | gdb -x /dev/stdin -batch $KERNEL | \ - tr '\t\n' ' ') -machine=$(echo -e printf '"%s", machine' | gdb -x /dev/stdin -batch $KERNEL) +ostype=$(gdb_command $KERNEL 'printf "%s", ostype') +osrelease=$(gdb_command $KERNEL 'printf "%s", osrelease') +version=$(gdb_command $KERNEL 'printf "%s", version' | tr '\t\n' ' ') +machine=$(gdb_command $KERNEL 'printf "%s", machine') exec > $FILE 2>&1 @@ -174,7 +189,11 @@ file=`mktemp /tmp/crashinfo.XXXXXX` if [ $? -eq 0 ]; then echo "bt" >> $file echo "quit" >> $file - kgdb $KERNEL $VMCORE < $file + if [ -x /usr/local/bin/kgdb ]; then + /usr/local/bin/kgdb $KERNEL $VMCORE < $file + else + kgdb $KERNEL $VMCORE < $file + fi rm -f $file echo fi From owner-svn-src-all@freebsd.org Wed Jul 27 17:55:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78069BA67D8; Wed, 27 Jul 2016 17:55:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DBDF160B; Wed, 27 Jul 2016 17:55:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RHteFc030596; Wed, 27 Jul 2016 17:55:40 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RHteZk030595; Wed, 27 Jul 2016 17:55:40 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607271755.u6RHteZk030595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 27 Jul 2016 17:55:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r303403 - in stable: 10/usr.sbin/crashinfo 9/usr.sbin/crashinfo X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 17:55:41 -0000 Author: jhb Date: Wed Jul 27 17:55:40 2016 New Revision: 303403 URL: https://svnweb.freebsd.org/changeset/base/303403 Log: MFC 303109: Update crashinfo to work with newer gdb from ports. If gdb from ports is installed, use it instead of the base system gdb to extract variables from a kernel. Note that base gdb and ports gdb do not support the same options for invoking a single command in batch mode, so a wrapper shell function is used. In addition, prefer kgdb from ports when generating a backtrace if present. PR: 193335 Modified: stable/9/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/9/usr.sbin/crashinfo/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/10/ (props changed) Modified: stable/9/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- stable/9/usr.sbin/crashinfo/crashinfo.sh Wed Jul 27 17:55:14 2016 (r303402) +++ stable/9/usr.sbin/crashinfo/crashinfo.sh Wed Jul 27 17:55:40 2016 (r303403) @@ -35,6 +35,22 @@ usage() exit 1 } +# Run a single gdb command against a kernel file in batch mode. +# The kernel file is specified as the first argument and the command +# is given in the remaining arguments. +gdb_command() +{ + local k + + k=$1 ; shift + + if [ -x /usr/local/bin/gdb ]; then + /usr/local/bin/gdb -batch -ex "$@" $k + else + echo -e "$@" | /usr/bin/gdb -x /dev/stdin -batch $k + fi +} + find_kernel() { local ivers k kvers @@ -55,8 +71,8 @@ find_kernel() # Look for a matching kernel version. for k in `sysctl -n kern.bootfile` $(ls -t /boot/*/kernel); do - kvers=$(echo 'printf " Version String: %s", version' | \ - gdb -x /dev/stdin -batch $k 2>/dev/null) + kvers=$(gdb_command $k 'printf " Version String: %s", version' \ + 2>/dev/null) if [ "$ivers" = "$kvers" ]; then KERNEL=$k break @@ -151,11 +167,10 @@ echo "Writing crash summary to $FILE." umask 077 # Simulate uname -ostype=$(echo -e printf '"%s", ostype' | gdb -x /dev/stdin -batch $KERNEL) -osrelease=$(echo -e printf '"%s", osrelease' | gdb -x /dev/stdin -batch $KERNEL) -version=$(echo -e printf '"%s", version' | gdb -x /dev/stdin -batch $KERNEL | \ - tr '\t\n' ' ') -machine=$(echo -e printf '"%s", machine' | gdb -x /dev/stdin -batch $KERNEL) +ostype=$(gdb_command $KERNEL 'printf "%s", ostype') +osrelease=$(gdb_command $KERNEL 'printf "%s", osrelease') +version=$(gdb_command $KERNEL 'printf "%s", version' | tr '\t\n' ' ') +machine=$(gdb_command $KERNEL 'printf "%s", machine') exec > $FILE 2>&1 @@ -174,7 +189,11 @@ file=`mktemp /tmp/crashinfo.XXXXXX` if [ $? -eq 0 ]; then echo "bt" >> $file echo "quit" >> $file - kgdb $KERNEL $VMCORE < $file + if [ -x /usr/local/bin/kgdb ]; then + /usr/local/bin/kgdb $KERNEL $VMCORE < $file + else + kgdb $KERNEL $VMCORE < $file + fi rm -f $file echo fi From owner-svn-src-all@freebsd.org Wed Jul 27 17:55:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4222EBA67D3; Wed, 27 Jul 2016 17:55:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07D31160A; Wed, 27 Jul 2016 17:55:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RHteLf030590; Wed, 27 Jul 2016 17:55:40 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RHtekp030589; Wed, 27 Jul 2016 17:55:40 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607271755.u6RHtekp030589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 27 Jul 2016 17:55:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303403 - in stable: 10/usr.sbin/crashinfo 9/usr.sbin/crashinfo X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 17:55:41 -0000 Author: jhb Date: Wed Jul 27 17:55:40 2016 New Revision: 303403 URL: https://svnweb.freebsd.org/changeset/base/303403 Log: MFC 303109: Update crashinfo to work with newer gdb from ports. If gdb from ports is installed, use it instead of the base system gdb to extract variables from a kernel. Note that base gdb and ports gdb do not support the same options for invoking a single command in batch mode, so a wrapper shell function is used. In addition, prefer kgdb from ports when generating a backtrace if present. PR: 193335 Modified: stable/10/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/9/usr.sbin/crashinfo/ (props changed) Modified: stable/10/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- stable/10/usr.sbin/crashinfo/crashinfo.sh Wed Jul 27 17:55:14 2016 (r303402) +++ stable/10/usr.sbin/crashinfo/crashinfo.sh Wed Jul 27 17:55:40 2016 (r303403) @@ -35,6 +35,22 @@ usage() exit 1 } +# Run a single gdb command against a kernel file in batch mode. +# The kernel file is specified as the first argument and the command +# is given in the remaining arguments. +gdb_command() +{ + local k + + k=$1 ; shift + + if [ -x /usr/local/bin/gdb ]; then + /usr/local/bin/gdb -batch -ex "$@" $k + else + echo -e "$@" | /usr/bin/gdb -x /dev/stdin -batch $k + fi +} + find_kernel() { local ivers k kvers @@ -55,8 +71,8 @@ find_kernel() # Look for a matching kernel version. for k in `sysctl -n kern.bootfile` $(ls -t /boot/*/kernel); do - kvers=$(echo 'printf " Version String: %s", version' | \ - gdb -x /dev/stdin -batch $k 2>/dev/null) + kvers=$(gdb_command $k 'printf " Version String: %s", version' \ + 2>/dev/null) if [ "$ivers" = "$kvers" ]; then KERNEL=$k break @@ -151,11 +167,10 @@ echo "Writing crash summary to $FILE." umask 077 # Simulate uname -ostype=$(echo -e printf '"%s", ostype' | gdb -x /dev/stdin -batch $KERNEL) -osrelease=$(echo -e printf '"%s", osrelease' | gdb -x /dev/stdin -batch $KERNEL) -version=$(echo -e printf '"%s", version' | gdb -x /dev/stdin -batch $KERNEL | \ - tr '\t\n' ' ') -machine=$(echo -e printf '"%s", machine' | gdb -x /dev/stdin -batch $KERNEL) +ostype=$(gdb_command $KERNEL 'printf "%s", ostype') +osrelease=$(gdb_command $KERNEL 'printf "%s", osrelease') +version=$(gdb_command $KERNEL 'printf "%s", version' | tr '\t\n' ' ') +machine=$(gdb_command $KERNEL 'printf "%s", machine') exec > $FILE 2>&1 @@ -174,7 +189,11 @@ file=`mktemp /tmp/crashinfo.XXXXXX` if [ $? -eq 0 ]; then echo "bt" >> $file echo "quit" >> $file - kgdb $KERNEL $VMCORE < $file + if [ -x /usr/local/bin/kgdb ]; then + /usr/local/bin/kgdb $KERNEL $VMCORE < $file + else + kgdb $KERNEL $VMCORE < $file + fi rm -f $file echo fi From owner-svn-src-all@freebsd.org Wed Jul 27 18:12:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85894BA6E60; Wed, 27 Jul 2016 18:12:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E89E1283; Wed, 27 Jul 2016 18:12:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RICac0037687; Wed, 27 Jul 2016 18:12:36 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RICa1V037684; Wed, 27 Jul 2016 18:12:36 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201607271812.u6RICa1V037684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 27 Jul 2016 18:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303404 - in head: share/timedef tools/tools/locale/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 18:12:37 -0000 Author: jkim Date: Wed Jul 27 18:12:36 2016 New Revision: 303404 URL: https://svnweb.freebsd.org/changeset/base/303404 Log: Add a hack to add weekday to date format for ko_KR locale. Modified: head/share/timedef/ko_KR.UTF-8.src head/share/timedef/ko_KR.eucKR.src head/tools/tools/locale/tools/cldr2def.pl Modified: head/share/timedef/ko_KR.UTF-8.src ============================================================================== --- head/share/timedef/ko_KR.UTF-8.src Wed Jul 27 17:55:40 2016 (r303403) +++ head/share/timedef/ko_KR.UTF-8.src Wed Jul 27 18:12:36 2016 (r303404) @@ -56,14 +56,14 @@ %y. %m. %e. # # c_fmt -%Yë…„ %mì›” %eì¼ %p %Iì‹œ %M분 %Sì´ˆ +%Yë…„ %mì›” %eì¼ %A %p %Iì‹œ %M분 %Sì´ˆ # # AM/PM 오전 오후 # # date_fmt -%Yë…„ %mì›” %eì¼ %p %Iì‹œ %M분 %Sì´ˆ %Z +%Yë…„ %mì›” %eì¼ %A %p %Iì‹œ %M분 %Sì´ˆ %Z # # Long month names (without case ending) 1ì›” Modified: head/share/timedef/ko_KR.eucKR.src ============================================================================== --- head/share/timedef/ko_KR.eucKR.src Wed Jul 27 17:55:40 2016 (r303403) +++ head/share/timedef/ko_KR.eucKR.src Wed Jul 27 18:12:36 2016 (r303404) @@ -56,14 +56,14 @@ %y. %m. %e. # # c_fmt -%Y³â %m¿ù %eÀÏ %p %I½Ã %MºÐ %SÃÊ +%Y³â %m¿ù %eÀÏ %A %p %I½Ã %MºÐ %SÃÊ # # AM/PM ¿ÀÀü ¿ÀÈÄ # # date_fmt -%Y³â %m¿ù %eÀÏ %p %I½Ã %MºÐ %SÃÊ %Z +%Y³â %m¿ù %eÀÏ %A %p %I½Ã %MºÐ %SÃÊ %Z # # Long month names (without case ending) 1¿ù Modified: head/tools/tools/locale/tools/cldr2def.pl ============================================================================== --- head/tools/tools/locale/tools/cldr2def.pl Wed Jul 27 17:55:40 2016 (r303403) +++ head/tools/tools/locale/tools/cldr2def.pl Wed Jul 27 18:12:36 2016 (r303404) @@ -217,6 +217,9 @@ sub callback_cformat { my $s = shift; my $nl = $callback{data}{l} . "_" . $callback{data}{c}; + if ($nl eq 'ko_KR') { + $s =~ s/(> )(%p)/$1%A $2/; + } $s =~ s/\.,/\./; $s =~ s/ %Z//; $s =~ s/ %z//; @@ -240,7 +243,7 @@ sub callback_dtformat { if ($nl eq 'ja_JP') { $s =~ s/(> )(%H)/$1%A $2/; - } elsif ($nl eq 'zh_TW') { + } elsif ($nl eq 'ko_KR' || $nl eq 'zh_TW') { $s =~ s/(> )(%p)/$1%A $2/; } $s =~ s/\.,/\./; From owner-svn-src-all@freebsd.org Wed Jul 27 18:29:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0A35BA5328; Wed, 27 Jul 2016 18:29:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CC391ABD; Wed, 27 Jul 2016 18:29:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RITZSL041715; Wed, 27 Jul 2016 18:29:35 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RITZlx041710; Wed, 27 Jul 2016 18:29:35 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607271829.u6RITZlx041710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 27 Jul 2016 18:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303405 - in head/sys/dev/cxgbe: . tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 18:29:36 -0000 Author: jhb Date: Wed Jul 27 18:29:35 2016 New Revision: 303405 URL: https://svnweb.freebsd.org/changeset/base/303405 Log: Add support for zero-copy aio_write() on TOE sockets. AIO write requests for a TOE socket on a Chelsio T4+ adapter can now DMA directly from the user-supplied buffer. This is implemented by wiring the pages backing the user-supplied buffer and queueing special mbufs backed by raw VM pages to the socket buffer. The TOE code recognizes these special mbufs and builds a sglist from the VM page array associated with the mbuf when queueing a work request to the TOE. Because these mbufs do not have an associated virtual address, m_data is not valid. Thus, the AIO handler does not invoke sosend() directly for these mbufs but instead inlines portions of sosend_generic() and tcp_usr_send(). An aiotx_buffer structure is used to describe the user buffer (e.g. it holds the array of VM pages and a reference to the AIO job). The special mbufs reference this structure via m_ext. Note that a single job might be split across multiple mbufs (e.g. if it is larger than the socket buffer size). The 'ext_arg2' member of each mbuf gives an offset relative to the backing aiotx_buffer. The AIO job associated with an aiotx_buffer structure is completed when the last reference to the structure is released. Zero-copy aio_write()'s for connections associated with a given adapter can be enabled/disabled at runtime via the 'dev.t[45]nex.N.toe.tx_zcopy' sysctl. MFC after: 1 month Relnotes: yes Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/offload.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/offload.h ============================================================================== --- head/sys/dev/cxgbe/offload.h Wed Jul 27 18:12:36 2016 (r303404) +++ head/sys/dev/cxgbe/offload.h Wed Jul 27 18:29:35 2016 (r303405) @@ -147,6 +147,7 @@ struct tom_tunables { int ddp; int rx_coalesce; int tx_align; + int tx_zcopy; }; #ifdef TCP_OFFLOAD Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Jul 27 18:12:36 2016 (r303404) +++ head/sys/dev/cxgbe/t4_main.c Wed Jul 27 18:29:35 2016 (r303405) @@ -4864,6 +4864,11 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_align", CTLFLAG_RW, &sc->tt.tx_align, 0, "chop and align payload"); + sc->tt.tx_zcopy = 0; + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_zcopy", + CTLFLAG_RW, &sc->tt.tx_zcopy, 0, + "Enable zero-copy aio_write(2)"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "timer_tick", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, sysctl_tp_tick, "A", "TP timer tick (us)"); Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Jul 27 18:12:36 2016 (r303404) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Jul 27 18:29:35 2016 (r303405) @@ -32,15 +32,18 @@ __FBSDID("$FreeBSD$"); #ifdef TCP_OFFLOAD #include -#include +#include +#include #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -51,6 +54,14 @@ __FBSDID("$FreeBSD$"); #include #include +#include + +#include +#include +#include +#include +#include + #include "common/common.h" #include "common/t4_msg.h" #include "common/t4_regs.h" @@ -71,6 +82,34 @@ VNET_DECLARE(int, tcp_autorcvbuf_inc); VNET_DECLARE(int, tcp_autorcvbuf_max); #define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) +#define IS_AIOTX_MBUF(m) \ + ((m)->m_flags & M_EXT && (m)->m_ext.ext_flags & EXT_FLAG_AIOTX) + +static void t4_aiotx_cancel(struct kaiocb *job); +static void t4_aiotx_queue_toep(struct toepcb *toep); + +static size_t +aiotx_mbuf_pgoff(struct mbuf *m) +{ + struct aiotx_buffer *ab; + + MPASS(IS_AIOTX_MBUF(m)); + ab = m->m_ext.ext_arg1; + return ((ab->ps.offset + (uintptr_t)m->m_ext.ext_arg2) % PAGE_SIZE); +} + +static vm_page_t * +aiotx_mbuf_pages(struct mbuf *m) +{ + struct aiotx_buffer *ab; + int npages; + + MPASS(IS_AIOTX_MBUF(m)); + ab = m->m_ext.ext_arg1; + npages = (ab->ps.offset + (uintptr_t)m->m_ext.ext_arg2) / PAGE_SIZE; + return (ab->ps.pages + npages); +} + void send_flowc_wr(struct toepcb *toep, struct flowc_tx_params *ftxp) { @@ -519,7 +558,11 @@ write_tx_sgl(void *dst, struct mbuf *sta i = -1; for (m = start; m != stop; m = m->m_next) { - rc = sglist_append(&sg, mtod(m, void *), m->m_len); + if (IS_AIOTX_MBUF(m)) + rc = sglist_append_vmpages(&sg, aiotx_mbuf_pages(m), + aiotx_mbuf_pgoff(m), m->m_len); + else + rc = sglist_append(&sg, mtod(m, void *), m->m_len); if (__predict_false(rc != 0)) panic("%s: sglist_append %d", __func__, rc); @@ -579,6 +622,7 @@ t4_push_frames(struct adapter *sc, struc struct sockbuf *sb = &so->so_snd; int tx_credits, shove, compl, sowwakeup; struct ofld_tx_sdesc *txsd = &toep->txsd[toep->txsd_pidx]; + bool aiotx_mbuf_seen; INP_WLOCK_ASSERT(inp); KASSERT(toep->flags & TPF_FLOWC_WR_SENT, @@ -589,6 +633,10 @@ t4_push_frames(struct adapter *sc, struc toep->ulp_mode == ULP_MODE_RDMA, ("%s: ulp_mode %u for toep %p", __func__, toep->ulp_mode, toep)); +#ifdef VERBOSE_TRACES + CTR4(KTR_CXGBE, "%s: tid %d toep flags %#x tp flags %#x drop %d", + __func__, toep->tid, toep->flags, tp->t_flags); +#endif if (__predict_false(toep->flags & TPF_ABORT_SHUTDOWN)) return; @@ -618,8 +666,15 @@ t4_push_frames(struct adapter *sc, struc plen = 0; nsegs = 0; max_nsegs_1mbuf = 0; /* max # of SGL segments in any one mbuf */ + aiotx_mbuf_seen = false; for (m = sndptr; m != NULL; m = m->m_next) { - int n = sglist_count(mtod(m, void *), m->m_len); + int n; + + if (IS_AIOTX_MBUF(m)) + n = sglist_count_vmpages(aiotx_mbuf_pages(m), + aiotx_mbuf_pgoff(m), m->m_len); + else + n = sglist_count(mtod(m, void *), m->m_len); nsegs += n; plen += m->m_len; @@ -631,9 +686,13 @@ t4_push_frames(struct adapter *sc, struc if (plen == 0) { /* Too few credits */ toep->flags |= TPF_TX_SUSPENDED; - if (sowwakeup) + if (sowwakeup) { + if (!TAILQ_EMPTY( + &toep->aiotx_jobq)) + t4_aiotx_queue_toep( + toep); sowwakeup_locked(so); - else + } else SOCKBUF_UNLOCK(sb); SOCKBUF_UNLOCK_ASSERT(sb); return; @@ -641,6 +700,8 @@ t4_push_frames(struct adapter *sc, struc break; } + if (IS_AIOTX_MBUF(m)) + aiotx_mbuf_seen = true; if (max_nsegs_1mbuf < n) max_nsegs_1mbuf = n; sb_sndptr = m; /* new sb->sb_sndptr if all goes well */ @@ -670,9 +731,11 @@ t4_push_frames(struct adapter *sc, struc else sowwakeup = 1; /* room available */ } - if (sowwakeup) + if (sowwakeup) { + if (!TAILQ_EMPTY(&toep->aiotx_jobq)) + t4_aiotx_queue_toep(toep); sowwakeup_locked(so); - else + } else SOCKBUF_UNLOCK(sb); SOCKBUF_UNLOCK_ASSERT(sb); @@ -687,7 +750,7 @@ t4_push_frames(struct adapter *sc, struc panic("%s: excess tx.", __func__); shove = m == NULL && !(tp->t_flags & TF_MORETOCOME); - if (plen <= max_imm) { + if (plen <= max_imm && !aiotx_mbuf_seen) { /* Immediate data tx */ @@ -1616,6 +1679,9 @@ do_fw4_ack(struct sge_iq *iq, const stru } } +#ifdef VERBOSE_TRACES + CTR3(KTR_CXGBE, "%s: tid %d credits %u", __func__, tid, credits); +#endif so = inp->inp_socket; txsd = &toep->txsd[toep->txsd_cidx]; plen = 0; @@ -1642,6 +1708,10 @@ do_fw4_ack(struct sge_iq *iq, const stru if (toep->flags & TPF_TX_SUSPENDED && toep->tx_credits >= toep->tx_total / 4) { +#ifdef VERBOSE_TRACES + CTR2(KTR_CXGBE, "%s: tid %d calling t4_push_frames", __func__, + tid); +#endif toep->flags &= ~TPF_TX_SUSPENDED; if (toep->ulp_mode == ULP_MODE_ISCSI) t4_push_pdus(sc, toep, plen); @@ -1668,7 +1738,13 @@ do_fw4_ack(struct sge_iq *iq, const stru sowwakeup_locked(so); /* unlocks so_snd */ rqdrop_locked(&toep->ulp_pdu_reclaimq, plen); } else { +#ifdef VERBOSE_TRACES + CTR3(KTR_CXGBE, "%s: tid %d dropped %d bytes", __func__, + tid, plen); +#endif sbdrop_locked(sb, plen); + if (!TAILQ_EMPTY(&toep->aiotx_jobq)) + t4_aiotx_queue_toep(toep); sowwakeup_locked(so); /* unlocks so_snd */ } SOCKBUF_UNLOCK_ASSERT(sb); @@ -1768,4 +1844,397 @@ t4_uninit_cpl_io_handlers(void) t4_register_cpl_handler(CPL_RX_DATA, do_rx_data); t4_register_cpl_handler(CPL_FW4_ACK, do_fw4_ack); } + +/* + * Use the 'backend3' field in AIO jobs to store the amount of data + * sent by the AIO job so far and the 'backend4' field to hold an + * error that should be reported when the job is completed. + */ +#define aio_sent backend3 +#define aio_error backend4 + +#define jobtotid(job) \ + (((struct toepcb *)(so_sototcpcb((job)->fd_file->f_data)->t_toe))->tid) + +static void +free_aiotx_buffer(struct aiotx_buffer *ab) +{ + struct kaiocb *job; + long status; + int error; + + if (refcount_release(&ab->refcount) == 0) + return; + + job = ab->job; + error = job->aio_error; + status = job->aio_sent; + vm_page_unhold_pages(ab->ps.pages, ab->ps.npages); + free(ab, M_CXGBE); +#ifdef VERBOSE_TRACES + CTR5(KTR_CXGBE, "%s: tid %d completed %p len %ld, error %d", __func__, + jobtotid(job), job, status, error); +#endif + if (error == ECANCELED && status != 0) + error = 0; + if (error == ECANCELED) + aio_cancel(job); + else if (error) + aio_complete(job, -1, error); + else + aio_complete(job, status, 0); +} + +static void +t4_aiotx_mbuf_free(struct mbuf *m, void *buffer, void *arg) +{ + struct aiotx_buffer *ab = buffer; + +#ifdef VERBOSE_TRACES + CTR3(KTR_CXGBE, "%s: completed %d bytes for tid %d", __func__, + m->m_len, jobtotid(ab->job)); +#endif + free_aiotx_buffer(ab); +} + +/* + * Hold the buffer backing an AIO request and return an AIO transmit + * buffer. + */ +static int +hold_aio(struct kaiocb *job) +{ + struct aiotx_buffer *ab; + struct vmspace *vm; + vm_map_t map; + vm_offset_t start, end, pgoff; + int n; + + MPASS(job->backend1 == NULL); + + /* + * The AIO subsystem will cancel and drain all requests before + * permitting a process to exit or exec, so p_vmspace should + * be stable here. + */ + vm = job->userproc->p_vmspace; + map = &vm->vm_map; + start = (uintptr_t)job->uaiocb.aio_buf; + pgoff = start & PAGE_MASK; + end = round_page(start + job->uaiocb.aio_nbytes); + start = trunc_page(start); + n = atop(end - start); + + ab = malloc(sizeof(*ab) + n * sizeof(vm_page_t), M_CXGBE, M_WAITOK | + M_ZERO); + refcount_init(&ab->refcount, 1); + ab->ps.pages = (vm_page_t *)(ab + 1); + ab->ps.npages = vm_fault_quick_hold_pages(map, start, end - start, + VM_PROT_WRITE, ab->ps.pages, n); + if (ab->ps.npages < 0) { + free(ab, M_CXGBE); + return (EFAULT); + } + + KASSERT(ab->ps.npages == n, + ("hold_aio: page count mismatch: %d vs %d", ab->ps.npages, n)); + + ab->ps.offset = pgoff; + ab->ps.len = job->uaiocb.aio_nbytes; + ab->job = job; + job->backend1 = ab; +#ifdef VERBOSE_TRACES + CTR5(KTR_CXGBE, "%s: tid %d, new pageset %p for job %p, npages %d", + __func__, jobtotid(job), &ab->ps, job, ab->ps.npages); +#endif + return (0); +} + +static void +t4_aiotx_process_job(struct toepcb *toep, struct socket *so, struct kaiocb *job) +{ + struct adapter *sc; + struct sockbuf *sb; + struct file *fp; + struct aiotx_buffer *ab; + struct inpcb *inp; + struct tcpcb *tp; + struct mbuf *m; + int error; + bool moretocome, sendmore; + + sc = td_adapter(toep->td); + sb = &so->so_snd; + SOCKBUF_UNLOCK(sb); + fp = job->fd_file; + ab = job->backend1; + m = NULL; + +#ifdef MAC + error = mac_socket_check_send(fp->f_cred, so); + if (error != 0) + goto out; +#endif + + if (ab == NULL) { + error = hold_aio(job); + if (error != 0) + goto out; + ab = job->backend1; + } + + /* Inline sosend_generic(). */ + + job->msgsnd = 1; + + error = sblock(sb, SBL_WAIT); + MPASS(error == 0); + +sendanother: + m = m_get(M_WAITOK, MT_DATA); + + SOCKBUF_LOCK(sb); + if (so->so_snd.sb_state & SBS_CANTSENDMORE) { + SOCKBUF_UNLOCK(sb); + sbunlock(sb); + if ((so->so_options & SO_NOSIGPIPE) == 0) { + PROC_LOCK(job->userproc); + kern_psignal(job->userproc, SIGPIPE); + PROC_UNLOCK(job->userproc); + } + error = EPIPE; + goto out; + } + if (so->so_error) { + error = so->so_error; + so->so_error = 0; + SOCKBUF_UNLOCK(sb); + sbunlock(sb); + goto out; + } + if ((so->so_state & SS_ISCONNECTED) == 0) { + SOCKBUF_UNLOCK(sb); + sbunlock(sb); + error = ENOTCONN; + goto out; + } + if (sbspace(sb) < sb->sb_lowat) { + MPASS(job->aio_sent == 0 || !(so->so_state & SS_NBIO)); + + /* + * Don't block if there is too little room in the socket + * buffer. Instead, requeue the request. + */ + if (!aio_set_cancel_function(job, t4_aiotx_cancel)) { + SOCKBUF_UNLOCK(sb); + sbunlock(sb); + error = ECANCELED; + goto out; + } + TAILQ_INSERT_HEAD(&toep->aiotx_jobq, job, list); + SOCKBUF_UNLOCK(sb); + sbunlock(sb); + goto out; + } + + /* + * Write as much data as the socket permits, but no more than a + * a single sndbuf at a time. + */ + m->m_len = sbspace(sb); + if (m->m_len > ab->ps.len - job->aio_sent) { + m->m_len = ab->ps.len - job->aio_sent; + moretocome = false; + } else + moretocome = true; + if (m->m_len > sc->tt.sndbuf) { + m->m_len = sc->tt.sndbuf; + sendmore = true; + } else + sendmore = false; + + if (!TAILQ_EMPTY(&toep->aiotx_jobq)) + moretocome = true; + SOCKBUF_UNLOCK(sb); + MPASS(m->m_len != 0); + + /* Inlined tcp_usr_send(). */ + + inp = toep->inp; + INP_WLOCK(inp); + if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { + INP_WUNLOCK(inp); + sbunlock(sb); + error = ECONNRESET; + goto out; + } + + refcount_acquire(&ab->refcount); + m_extadd(m, NULL, ab->ps.len, t4_aiotx_mbuf_free, ab, + (void *)(uintptr_t)job->aio_sent, 0, EXT_NET_DRV); + m->m_ext.ext_flags |= EXT_FLAG_AIOTX; + job->aio_sent += m->m_len; + + sbappendstream(sb, m, 0); + m = NULL; + + if (!(inp->inp_flags & INP_DROPPED)) { + tp = intotcpcb(inp); + if (moretocome) + tp->t_flags |= TF_MORETOCOME; + error = tp->t_fb->tfb_tcp_output(tp); + if (moretocome) + tp->t_flags &= ~TF_MORETOCOME; + } + + INP_WUNLOCK(inp); + if (sendmore) + goto sendanother; + sbunlock(sb); + + if (error) + goto out; + + /* + * If this is a non-blocking socket and the request has not + * been fully completed, requeue it until the socket is ready + * again. + */ + if (job->aio_sent < job->uaiocb.aio_nbytes && + !(so->so_state & SS_NBIO)) { + SOCKBUF_LOCK(sb); + if (!aio_set_cancel_function(job, t4_aiotx_cancel)) { + SOCKBUF_UNLOCK(sb); + error = ECANCELED; + goto out; + } + TAILQ_INSERT_HEAD(&toep->aiotx_jobq, job, list); + return; + } + + /* + * If the request will not be requeued, drop a reference on + * the the aiotx buffer. Any mbufs in flight should still + * contain a reference, but this drops the reference that the + * job owns while it is waiting to queue mbufs to the socket. + */ + free_aiotx_buffer(ab); + +out: + if (error) { + if (ab != NULL) { + job->aio_error = error; + free_aiotx_buffer(ab); + } else { + MPASS(job->aio_sent == 0); + aio_complete(job, -1, error); + } + } + if (m != NULL) + m_free(m); + SOCKBUF_LOCK(sb); +} + +static void +t4_aiotx_task(void *context, int pending) +{ + struct toepcb *toep = context; + struct inpcb *inp = toep->inp; + struct socket *so = inp->inp_socket; + struct kaiocb *job; + + CURVNET_SET(so->so_vnet); + SOCKBUF_LOCK(&so->so_snd); + while (!TAILQ_EMPTY(&toep->aiotx_jobq) && sowriteable(so)) { + job = TAILQ_FIRST(&toep->aiotx_jobq); + TAILQ_REMOVE(&toep->aiotx_jobq, job, list); + if (!aio_clear_cancel_function(job)) + continue; + + t4_aiotx_process_job(toep, so, job); + } + toep->aiotx_task_active = false; + SOCKBUF_UNLOCK(&so->so_snd); + CURVNET_RESTORE(); + + free_toepcb(toep); +} + +static void +t4_aiotx_queue_toep(struct toepcb *toep) +{ + + SOCKBUF_LOCK_ASSERT(&toep->inp->inp_socket->so_snd); +#ifdef VERBOSE_TRACES + CTR3(KTR_CXGBE, "%s: queueing aiotx task for tid %d, active = %s", + __func__, toep->tid, toep->aiotx_task_active ? "true" : "false"); +#endif + if (toep->aiotx_task_active) + return; + toep->aiotx_task_active = true; + hold_toepcb(toep); + soaio_enqueue(&toep->aiotx_task); +} + +static void +t4_aiotx_cancel(struct kaiocb *job) +{ + struct aiotx_buffer *ab; + struct socket *so; + struct sockbuf *sb; + struct tcpcb *tp; + struct toepcb *toep; + + so = job->fd_file->f_data; + tp = so_sototcpcb(so); + toep = tp->t_toe; + MPASS(job->uaiocb.aio_lio_opcode == LIO_WRITE); + sb = &so->so_snd; + + SOCKBUF_LOCK(sb); + if (!aio_cancel_cleared(job)) + TAILQ_REMOVE(&toep->aiotx_jobq, job, list); + SOCKBUF_UNLOCK(sb); + + ab = job->backend1; + if (ab != NULL) + free_aiotx_buffer(ab); + else + aio_cancel(job); +} + +int +t4_aio_queue_aiotx(struct socket *so, struct kaiocb *job) +{ + struct tcpcb *tp = so_sototcpcb(so); + struct toepcb *toep = tp->t_toe; + struct adapter *sc = td_adapter(toep->td); + + /* This only handles writes. */ + if (job->uaiocb.aio_lio_opcode != LIO_WRITE) + return (EOPNOTSUPP); + + if (!sc->tt.tx_zcopy) + return (EOPNOTSUPP); + + SOCKBUF_LOCK(&so->so_snd); +#ifdef VERBOSE_TRACES + CTR2(KTR_CXGBE, "%s: queueing %p", __func__, job); +#endif + if (!aio_set_cancel_function(job, t4_aiotx_cancel)) + panic("new job was cancelled"); + TAILQ_INSERT_TAIL(&toep->aiotx_jobq, job, list); + if (sowriteable(so)) + t4_aiotx_queue_toep(toep); + SOCKBUF_UNLOCK(&so->so_snd); + return (0); +} + +void +aiotx_init_toep(struct toepcb *toep) +{ + + TAILQ_INIT(&toep->aiotx_jobq); + TASK_INIT(&toep->aiotx_task, 0, t4_aiotx_task, toep); +} #endif Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Wed Jul 27 18:12:36 2016 (r303404) +++ head/sys/dev/cxgbe/tom/t4_tom.c Wed Jul 27 18:29:35 2016 (r303405) @@ -68,11 +68,11 @@ __FBSDID("$FreeBSD$"); #include "tom/t4_tom_l2t.h" #include "tom/t4_tom.h" -static struct protosw ddp_protosw; -static struct pr_usrreqs ddp_usrreqs; +static struct protosw toe_protosw; +static struct pr_usrreqs toe_usrreqs; -static struct protosw ddp6_protosw; -static struct pr_usrreqs ddp6_usrreqs; +static struct protosw toe6_protosw; +static struct pr_usrreqs toe6_usrreqs; /* Module ops */ static int t4_tom_mod_load(void); @@ -167,6 +167,7 @@ alloc_toepcb(struct vi_info *vi, int txq toep->txsd_avail = txsd_total; toep->txsd_pidx = 0; toep->txsd_cidx = 0; + aiotx_init_toep(toep); ddp_init_toep(toep); return (toep); @@ -217,12 +218,10 @@ offload_socket(struct socket *so, struct sb = &so->so_rcv; SOCKBUF_LOCK(sb); sb->sb_flags |= SB_NOCOALESCE; - if (toep->ulp_mode == ULP_MODE_TCPDDP) { - if (inp->inp_vflag & INP_IPV6) - so->so_proto = &ddp6_protosw; - else - so->so_proto = &ddp_protosw; - } + if (inp->inp_vflag & INP_IPV6) + so->so_proto = &toe6_protosw; + else + so->so_proto = &toe_protosw; SOCKBUF_UNLOCK(sb); /* Update TCP PCB */ @@ -1120,6 +1119,22 @@ t4_tom_ifaddr_event(void *arg __unused, } static int +t4_aio_queue_tom(struct socket *so, struct kaiocb *job) +{ + struct tcpcb *tp = so_sototcpcb(so); + struct toepcb *toep = tp->t_toe; + int error; + + if (toep->ulp_mode == ULP_MODE_TCPDDP) { + error = t4_aio_queue_ddp(so, job); + if (error != EOPNOTSUPP) + return (error); + } + + return (t4_aio_queue_aiotx(so, job)); +} + +static int t4_tom_mod_load(void) { int rc; @@ -1137,18 +1152,18 @@ t4_tom_mod_load(void) tcp_protosw = pffindproto(PF_INET, IPPROTO_TCP, SOCK_STREAM); if (tcp_protosw == NULL) return (ENOPROTOOPT); - bcopy(tcp_protosw, &ddp_protosw, sizeof(ddp_protosw)); - bcopy(tcp_protosw->pr_usrreqs, &ddp_usrreqs, sizeof(ddp_usrreqs)); - ddp_usrreqs.pru_aio_queue = t4_aio_queue_ddp; - ddp_protosw.pr_usrreqs = &ddp_usrreqs; + bcopy(tcp_protosw, &toe_protosw, sizeof(toe_protosw)); + bcopy(tcp_protosw->pr_usrreqs, &toe_usrreqs, sizeof(toe_usrreqs)); + toe_usrreqs.pru_aio_queue = t4_aio_queue_tom; + toe_protosw.pr_usrreqs = &toe_usrreqs; tcp6_protosw = pffindproto(PF_INET6, IPPROTO_TCP, SOCK_STREAM); if (tcp6_protosw == NULL) return (ENOPROTOOPT); - bcopy(tcp6_protosw, &ddp6_protosw, sizeof(ddp6_protosw)); - bcopy(tcp6_protosw->pr_usrreqs, &ddp6_usrreqs, sizeof(ddp6_usrreqs)); - ddp6_usrreqs.pru_aio_queue = t4_aio_queue_ddp; - ddp6_protosw.pr_usrreqs = &ddp6_usrreqs; + bcopy(tcp6_protosw, &toe6_protosw, sizeof(toe6_protosw)); + bcopy(tcp6_protosw->pr_usrreqs, &toe6_usrreqs, sizeof(toe6_usrreqs)); + toe6_usrreqs.pru_aio_queue = t4_aio_queue_tom; + toe6_protosw.pr_usrreqs = &toe6_usrreqs; TIMEOUT_TASK_INIT(taskqueue_thread, &clip_task, 0, t4_clip_task, NULL); ifaddr_evhandler = EVENTHANDLER_REGISTER(ifaddr_event, Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Wed Jul 27 18:12:36 2016 (r303404) +++ head/sys/dev/cxgbe/tom/t4_tom.h Wed Jul 27 18:29:35 2016 (r303405) @@ -102,6 +102,8 @@ TAILQ_HEAD(pagesetq, pageset); #define PS_WIRED 0x0001 /* Pages wired rather than held. */ #define PS_PPODS_WRITTEN 0x0002 /* Page pods written to the card. */ +#define EXT_FLAG_AIOTX EXT_FLAG_VENDOR1 + struct ddp_buffer { struct pageset *ps; @@ -109,6 +111,12 @@ struct ddp_buffer { int cancel_pending; }; +struct aiotx_buffer { + struct pageset ps; + struct kaiocb *job; + int refcount; +}; + struct toepcb { TAILQ_ENTRY(toepcb) link; /* toep_list */ u_int flags; /* miscellaneous flags */ @@ -151,6 +159,10 @@ struct toepcb { struct kaiocb *ddp_queueing; struct mtx ddp_lock; + TAILQ_HEAD(, kaiocb) aiotx_jobq; + struct task aiotx_task; + bool aiotx_task_active; + /* Tx software descriptor */ uint8_t txsd_total; uint8_t txsd_pidx; @@ -313,6 +325,8 @@ int do_abort_rpl_synqe(struct sge_iq *, void t4_offload_socket(struct toedev *, void *, struct socket *); /* t4_cpl_io.c */ +void aiotx_init_toep(struct toepcb *); +int t4_aio_queue_aiotx(struct socket *, struct kaiocb *); void t4_init_cpl_io_handlers(void); void t4_uninit_cpl_io_handlers(void); void send_abort_rpl(struct adapter *, struct sge_wrq *, int , int); From owner-svn-src-all@freebsd.org Wed Jul 27 19:22:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01B49BA5EC7; Wed, 27 Jul 2016 19:22:14 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 D19E612FF; Wed, 27 Jul 2016 19:22:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E56A1B999; Wed, 27 Jul 2016 15:22:12 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303405 - in head/sys/dev/cxgbe: . tom Date: Wed, 27 Jul 2016 12:11:06 -0700 Message-ID: <3422795.rot3cCl2OH@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201607271829.u6RITZlx041710@repo.freebsd.org> References: <201607271829.u6RITZlx041710@repo.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, 27 Jul 2016 15:22:13 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 19:22:14 -0000 On Wednesday, July 27, 2016 06:29:35 PM John Baldwin wrote: > Author: jhb > Date: Wed Jul 27 18:29:35 2016 > New Revision: 303405 > URL: https://svnweb.freebsd.org/changeset/base/303405 > > Log: > Add support for zero-copy aio_write() on TOE sockets. > > AIO write requests for a TOE socket on a Chelsio T4+ adapter can now > DMA directly from the user-supplied buffer. This is implemented by > wiring the pages backing the user-supplied buffer and queueing special > mbufs backed by raw VM pages to the socket buffer. The TOE code > recognizes these special mbufs and builds a sglist from the VM page > array associated with the mbuf when queueing a work request to the TOE. > > Because these mbufs do not have an associated virtual address, m_data > is not valid. Thus, the AIO handler does not invoke sosend() directly > for these mbufs but instead inlines portions of sosend_generic() and > tcp_usr_send(). > > An aiotx_buffer structure is used to describe the user buffer (e.g. > it holds the array of VM pages and a reference to the AIO job). The > special mbufs reference this structure via m_ext. Note that a single > job might be split across multiple mbufs (e.g. if it is larger than > the socket buffer size). The 'ext_arg2' member of each mbuf gives an > offset relative to the backing aiotx_buffer. The AIO job associated > with an aiotx_buffer structure is completed when the last reference to > the structure is released. > > Zero-copy aio_write()'s for connections associated with a given > adapter can be enabled/disabled at runtime via the > 'dev.t[45]nex.N.toe.tx_zcopy' sysctl. In theory if our stack was able to safely cope with unmapped buffers, this could be used for aio_write() on sockets in general rather than only with TOE engines (in particular it is probably safe on adapters with checksum offload enabled assuming you aren't using some sort of packet filter that wants to inspect packet payloads rather than just headers). Compared to the changes for zerocopy receive with TOE, these are simpler and also less dramatic in terms of performance. For benchmarking I used netperf's TCP_STREAM (write(2) and aio_write(2)) and TCP_SENDFILE (sendfile(2)) tests comparing CPU usage and throughput. Without TOE, write(2) uses 138-158% of a single CPU, sendfile(2) uses 117-145%, and aio_write(2) uses 139-202% to send a single 40G stream. At the default write size (32k) for netperf, aio_write() and write() have the largest divergence, but for other write sizes I tested (256k, 512k, 1m) they were within a few percentage points of each other. Enabling TOE reduced CPU usage for all three (in this case zero-copy aio_write() is not enabled): write(2) - 81-87%, sendfile(2) - 58-69%, aio_write(2) - 83-142%. Again, aio_write() was comparable for larger write sizes, but diverged from write(2) for 32k writes. One other thing to note however, is that the sendfile(2) test did not achieve full 40G with 32k and 256k write sizes. The larger tests sizes that did achieve 40G with sendfile(2) used 66-69% CPU. The zero-copy aio_write(2) with TOE used 23-54% of a single core. As with sendfile(2), the 32k write size did not achieve 40G. The remaining test sizes that did used 23-24%. There are still some wrinkles I need to iron out with the zero-copy case. In certain edge cases I can force it to transmit a dismally low 1G or so instead of 40G, but only if socket buffer autosizing is enabled. The reason smaller write sizes don't get to line rate with sendfile/aio_write (I think) is that non-zero copy writes can accumulate data from multiple calls into the socket buffer allowing the socket buffer autosizing code to notice and kick in sooner / faster. One could ameliorate this by queueing more writes, though queueing larger writes has the same effect and probably less overhead. -- John Baldwin From owner-svn-src-all@freebsd.org Wed Jul 27 19:31:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1735BA618A; Wed, 27 Jul 2016 19:31:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 830301959; Wed, 27 Jul 2016 19:31:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RJVPUL064152; Wed, 27 Jul 2016 19:31:25 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RJVPUf064151; Wed, 27 Jul 2016 19:31:25 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607271931.u6RJVPUf064151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 27 Jul 2016 19:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303406 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 19:31:26 -0000 Author: jhb Date: Wed Jul 27 19:31:25 2016 New Revision: 303406 URL: https://svnweb.freebsd.org/changeset/base/303406 Log: Adjust tests in fsync job scheduling loop to reduce indentation. Modified: head/sys/kern/vfs_aio.c Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Wed Jul 27 18:29:35 2016 (r303405) +++ head/sys/kern/vfs_aio.c Wed Jul 27 19:31:25 2016 (r303406) @@ -913,18 +913,16 @@ notification_done: if (job->jobflags & KAIOCB_CHECKSYNC) { schedule_fsync = false; TAILQ_FOREACH_SAFE(sjob, &ki->kaio_syncqueue, list, sjobn) { - if (job->fd_file == sjob->fd_file && - job->seqno < sjob->seqno) { - if (--sjob->pending == 0) { - TAILQ_REMOVE(&ki->kaio_syncqueue, sjob, - list); - if (!aio_clear_cancel_function(sjob)) - continue; - TAILQ_INSERT_TAIL(&ki->kaio_syncready, - sjob, list); - schedule_fsync = true; - } - } + if (job->fd_file != sjob->fd_file || + job->seqno >= sjob->seqno) + continue; + if (--sjob->pending > 0) + continue; + TAILQ_REMOVE(&ki->kaio_syncqueue, sjob, list); + if (!aio_clear_cancel_function(sjob)) + continue; + TAILQ_INSERT_TAIL(&ki->kaio_syncready, sjob, list); + schedule_fsync = true; } if (schedule_fsync) taskqueue_enqueue(taskqueue_aiod_kick, From owner-svn-src-all@freebsd.org Wed Jul 27 19:39:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEDE6BA6588; Wed, 27 Jul 2016 19:39:26 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACC2E1F89; Wed, 27 Jul 2016 19:39:26 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RJdPge067872; Wed, 27 Jul 2016 19:39:25 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RJdPhE067871; Wed, 27 Jul 2016 19:39:25 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201607271939.u6RJdPhE067871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 27 Jul 2016 19:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303407 - stable/11/etc/ntp X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 19:39:27 -0000 Author: cy Date: Wed Jul 27 19:39:25 2016 New Revision: 303407 URL: https://svnweb.freebsd.org/changeset/base/303407 Log: MFC r303160. Update leap-seconds to leap-seconds.3676752000. As per https://datacenter.iers.org/web/guest/eop/-/somos/5Rgv/latest/16: UTC TIME STEP on the 1st of January 2017 A positive leap second will be introduced at the end of December 2016. The sequence of dates of the UTC second markers will be: 2016 December 31, 23h 59m 59s 2016 December 31, 23h 59m 60s 2017 January 1, 0h 0m 0s The difference between UTC and the International Atomic Time TAI is: from 2015 July 1, 0h UTC, to 2017 January 1 0h UTC : UTC-TAI = - 36s from 2017 January 1, 0h UTC, until further notice : UTC-TAI = - 37s Obtained from: ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.3676752000 See also: https://www.iers.org/SharedDocs/News/EN/BulletinC.html https://datacenter.iers.org/web/guest/eop/-/somos/5Rgv/latest/16 Relnotes: yes Approved by: re@ (delphij@) Modified: stable/11/etc/ntp/leap-seconds Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/ntp/leap-seconds ============================================================================== --- stable/11/etc/ntp/leap-seconds Wed Jul 27 19:31:25 2016 (r303406) +++ stable/11/etc/ntp/leap-seconds Wed Jul 27 19:39:25 2016 (r303407) @@ -130,7 +130,7 @@ # Washington, DC # jeffrey.prillaman@usno.navy.mil # -# Last Update of leap second values: 11 Jan 2016 +# Last Update of leap second values: 6 Jul 2016 # # The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to @@ -138,7 +138,7 @@ # be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3661459200 +#$ 3676752000 # # The data in this file will be updated periodically as new leap # seconds are announced. In addition to being entered on the line @@ -170,10 +170,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C 51 -# File expires on: 1 Dec 2016 +# Updated through IERS Bulletin C 52 +# File expires on: 1 Jun 2017 # -#@ 3689539200 +#@ 3705264000 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -202,6 +202,7 @@ 3439756800 34 # 1 Jan 2009 3550089600 35 # 1 Jul 2012 3644697600 36 # 1 Jul 2015 +3692217600 37 # 1 Jan 2017 # # the following special comment contains the # hash value of the data in this file computed @@ -217,5 +218,5 @@ # the hash line is also ignored in the # computation. # -#h 63b4df04 0907d94f 2dadb7a1 684f7767 2a372421 +#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 # From owner-svn-src-all@freebsd.org Wed Jul 27 19:40:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFAF6BA6603; Wed, 27 Jul 2016 19:40:26 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73AFF1247; Wed, 27 Jul 2016 19:40:26 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RJePnD067969; Wed, 27 Jul 2016 19:40:25 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RJePgL067968; Wed, 27 Jul 2016 19:40:25 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201607271940.u6RJePgL067968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 27 Jul 2016 19:40:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303408 - stable/10/etc/ntp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 19:40:26 -0000 Author: cy Date: Wed Jul 27 19:40:25 2016 New Revision: 303408 URL: https://svnweb.freebsd.org/changeset/base/303408 Log: MFC r303160. Update leap-seconds to leap-seconds.3676752000. As per https://datacenter.iers.org/web/guest/eop/-/somos/5Rgv/latest/16: UTC TIME STEP on the 1st of January 2017 A positive leap second will be introduced at the end of December 2016. The sequence of dates of the UTC second markers will be: 2016 December 31, 23h 59m 59s 2016 December 31, 23h 59m 60s 2017 January 1, 0h 0m 0s The difference between UTC and the International Atomic Time TAI is: from 2015 July 1, 0h UTC, to 2017 January 1 0h UTC : UTC-TAI = - 36s from 2017 January 1, 0h UTC, until further notice : UTC-TAI = - 37s Obtained from: ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.3676752000 See also: https://www.iers.org/SharedDocs/News/EN/BulletinC.html https://datacenter.iers.org/web/guest/eop/-/somos/5Rgv/latest/16 Relnotes: yes Modified: stable/10/etc/ntp/leap-seconds Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/ntp/leap-seconds ============================================================================== --- stable/10/etc/ntp/leap-seconds Wed Jul 27 19:39:25 2016 (r303407) +++ stable/10/etc/ntp/leap-seconds Wed Jul 27 19:40:25 2016 (r303408) @@ -130,7 +130,7 @@ # Washington, DC # jeffrey.prillaman@usno.navy.mil # -# Last Update of leap second values: 11 Jan 2016 +# Last Update of leap second values: 6 Jul 2016 # # The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to @@ -138,7 +138,7 @@ # be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3661459200 +#$ 3676752000 # # The data in this file will be updated periodically as new leap # seconds are announced. In addition to being entered on the line @@ -170,10 +170,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C 51 -# File expires on: 1 Dec 2016 +# Updated through IERS Bulletin C 52 +# File expires on: 1 Jun 2017 # -#@ 3689539200 +#@ 3705264000 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -202,6 +202,7 @@ 3439756800 34 # 1 Jan 2009 3550089600 35 # 1 Jul 2012 3644697600 36 # 1 Jul 2015 +3692217600 37 # 1 Jan 2017 # # the following special comment contains the # hash value of the data in this file computed @@ -217,5 +218,5 @@ # the hash line is also ignored in the # computation. # -#h 63b4df04 0907d94f 2dadb7a1 684f7767 2a372421 +#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 # From owner-svn-src-all@freebsd.org Wed Jul 27 19:41:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A8D9BA6751; Wed, 27 Jul 2016 19:41:09 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0BEA145B; Wed, 27 Jul 2016 19:41:08 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RJf8EM068611; Wed, 27 Jul 2016 19:41:08 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RJf8SE068610; Wed, 27 Jul 2016 19:41:08 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201607271941.u6RJf8SE068610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 27 Jul 2016 19:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r303409 - stable/9/etc/ntp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 19:41:09 -0000 Author: cy Date: Wed Jul 27 19:41:07 2016 New Revision: 303409 URL: https://svnweb.freebsd.org/changeset/base/303409 Log: MFC r303160. Update leap-seconds to leap-seconds.3676752000. As per https://datacenter.iers.org/web/guest/eop/-/somos/5Rgv/latest/16: UTC TIME STEP on the 1st of January 2017 A positive leap second will be introduced at the end of December 2016. The sequence of dates of the UTC second markers will be: 2016 December 31, 23h 59m 59s 2016 December 31, 23h 59m 60s 2017 January 1, 0h 0m 0s The difference between UTC and the International Atomic Time TAI is: from 2015 July 1, 0h UTC, to 2017 January 1 0h UTC : UTC-TAI = - 36s from 2017 January 1, 0h UTC, until further notice : UTC-TAI = - 37s Obtained from: ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.3676752000 See also: https://www.iers.org/SharedDocs/News/EN/BulletinC.html https://datacenter.iers.org/web/guest/eop/-/somos/5Rgv/latest/16 Relnotes: yes Modified: stable/9/etc/ntp/leap-seconds Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/ntp/leap-seconds ============================================================================== --- stable/9/etc/ntp/leap-seconds Wed Jul 27 19:40:25 2016 (r303408) +++ stable/9/etc/ntp/leap-seconds Wed Jul 27 19:41:07 2016 (r303409) @@ -130,7 +130,7 @@ # Washington, DC # jeffrey.prillaman@usno.navy.mil # -# Last Update of leap second values: 11 Jan 2016 +# Last Update of leap second values: 6 Jul 2016 # # The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to @@ -138,7 +138,7 @@ # be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3661459200 +#$ 3676752000 # # The data in this file will be updated periodically as new leap # seconds are announced. In addition to being entered on the line @@ -170,10 +170,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C 51 -# File expires on: 1 Dec 2016 +# Updated through IERS Bulletin C 52 +# File expires on: 1 Jun 2017 # -#@ 3689539200 +#@ 3705264000 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -202,6 +202,7 @@ 3439756800 34 # 1 Jan 2009 3550089600 35 # 1 Jul 2012 3644697600 36 # 1 Jul 2015 +3692217600 37 # 1 Jan 2017 # # the following special comment contains the # hash value of the data in this file computed @@ -217,5 +218,5 @@ # the hash line is also ignored in the # computation. # -#h 63b4df04 0907d94f 2dadb7a1 684f7767 2a372421 +#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 # From owner-svn-src-all@freebsd.org Wed Jul 27 19:44:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B643BA6833; Wed, 27 Jul 2016 19:44:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::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 D9C3A183B; Wed, 27 Jul 2016 19:44:52 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x233.google.com with SMTP id b62so79980036iod.3; Wed, 27 Jul 2016 12:44:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=H9rhgFC2elknqbUzHBLOGCGBtdJRXdxey2lDayd0Hpc=; b=i66JB/DUsc1AS1RwUzr4HF1WLK5tr/LnrnBlbjdKX4hW9yLREyKhGvIcElHWVk1J7b G6xymaOjy703xgAlToDiUY73zkGUW6HIpT2x4VZyDgciWyOclWXdHPS3Ldv4WCl7aiFK Nh4dCyAscgv4Ty1dIHQxZKGE9G1bzVFAetWxtaLnWUD2P1GMZPDe/LRlJHawek7IDxww znqpJUZu4IgwBSJ+AvBwPbvW8jE3+oimhNY57ioewN9J0rk/Q43P1pOMkqI8qONckej1 X5BWdx7PJdfnSGd02XrRwnQVww51Gaw8CwHayodfd6bik5B4BFswrRx3g/LpAVBpDNc5 M3og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=H9rhgFC2elknqbUzHBLOGCGBtdJRXdxey2lDayd0Hpc=; b=XLJ9IfJ1FtaSrzxgb9R0RN2BY/HvNxzcChsmUj/Ly8RViCteVHNEDDPeiadk8CUUy0 dIB3VAJomxZgUL7q3cD+iKoC5Kj+ceu/2ntlXCVWNdywb3m0EC+++QtS0n37k17hDki0 jKLzr/arrES/hrXVhZpgeSlLM2KXsTJsU57jGaHaUcnU/3NelrJ679i3XekV5AcVQ0k4 iiES1K5HOriFAAQVasI6vnriorCTV3dluOt4YG+fVzq3v10fKjzcBzrjoy/2BVdyjRg+ amGSWvzrv/VbMpwBJZNBQT3IbZ7hIo5DcZRIpa25vdVN2BtyukO1ftvVYjRo9UbzUHc2 RJnQ== X-Gm-Message-State: AEkoout24VdiGUuUZidIa8xHg+qfjjP1KreWLk4sTctRv9X1Bet2Xq9qoRflkJ9h4nB/HBvTep1PEYN9sOjE8w== X-Received: by 10.107.15.157 with SMTP id 29mr33161186iop.123.1469648692155; Wed, 27 Jul 2016 12:44:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.141.129 with HTTP; Wed, 27 Jul 2016 12:44:51 -0700 (PDT) In-Reply-To: <3422795.rot3cCl2OH@ralph.baldwin.cx> References: <201607271829.u6RITZlx041710@repo.freebsd.org> <3422795.rot3cCl2OH@ralph.baldwin.cx> From: Adrian Chadd Date: Wed, 27 Jul 2016 12:44:51 -0700 Message-ID: Subject: Re: svn commit: r303405 - in head/sys/dev/cxgbe: . tom To: John Baldwin 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 19:44:53 -0000 [snip] When we had my kqueue sendfile stuff in tree to handle notifications, I was getting 40g across what, 64k sockets on 8 cores using SHM sendfile + kqueue sendfile completion. it worked pretty well. One core could get 40g if I pre-seeded enough data into it (ie, multiple sendfile transactions on a socket) so I kept the socket buffer full. Otherwise there'd be dead time where the socket buffer was empty. It was very sensitive to the TCP segment size - ie, if for some reason the TCP TX path passed up less than 32k chunks, it would end up chewing way too much CPU in tcp_output(). That was very sensitive to the TX write() size and latency to the receiver. It wasn't running out of data either; it was just some side effect of how big the writes were and how quickly the TX socket buffer was being topped off. I .. well, never got to finish instrumenting the full relationship going on there (between TSO and buffer sizes/latency) to see if that could be better engineered so we always kept the TSO full if we could. -adrian From owner-svn-src-all@freebsd.org Wed Jul 27 20:28:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C37D1BA6F29; Wed, 27 Jul 2016 20:28:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9637C1CC8; Wed, 27 Jul 2016 20:28:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RKSSrF086226; Wed, 27 Jul 2016 20:28:28 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RKSSkC086225; Wed, 27 Jul 2016 20:28:28 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607272028.u6RKSSkC086225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jul 2016 20:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303410 - head/usr.sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 20:28:29 -0000 Author: bdrewery Date: Wed Jul 27 20:28:28 2016 New Revision: 303410 URL: https://svnweb.freebsd.org/changeset/base/303410 Log: Reconnect pmcstudy, lost in r291021 Reported by: pluknet MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Wed Jul 27 19:41:07 2016 (r303409) +++ head/usr.sbin/Makefile Wed Jul 27 20:28:28 2016 (r303410) @@ -181,6 +181,7 @@ SUBDIR.${MK_PKGBOOTSTRAP}+= pkg SUBDIR.${MK_PMC}+= pmcannotate SUBDIR.${MK_PMC}+= pmccontrol SUBDIR.${MK_PMC}+= pmcstat +SUBDIR.${MK_PMC}+= pmcstudy SUBDIR.${MK_PORTSNAP}+= portsnap SUBDIR.${MK_PPP}+= ppp SUBDIR.${MK_QUOTAS}+= edquota From owner-svn-src-all@freebsd.org Wed Jul 27 20:34:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68A74BA63AA; Wed, 27 Jul 2016 20:34:11 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 256391305; Wed, 27 Jul 2016 20:34:11 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RKYAN3089716; Wed, 27 Jul 2016 20:34:10 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RKY9nd089710; Wed, 27 Jul 2016 20:34:09 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201607272034.u6RKY9nd089710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Wed, 27 Jul 2016 20:34:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303411 - in head/sys: conf kern netinet netinet6 sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 20:34:11 -0000 Author: stevek Date: Wed Jul 27 20:34:09 2016 New Revision: 303411 URL: https://svnweb.freebsd.org/changeset/base/303411 Log: Prepare for network stack as a module - Move cr_canseeinpcb to sys/netinet/in_prot.c in order to separate the INET and INET6-specific code from the rest of the prot code (It is only used by the network stack, so it makes sense for it to live with the other network stack code.) - Move cr_canseeinpcb prototype from sys/systm.h to netinet/in_systm.h - Rename cr_seeotheruids to cr_canseeotheruids and cr_seeothergids to cr_canseeothergids, make them non-static, and add prototypes (so they can be seen/called by in_prot.c functions.) - Remove sw_csum variable from ip6_forward in ip6_forward.c, as it is an unused variable. Reviewed by: gnn, jtl Approved by: sjg (mentor) Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D2901 Added: head/sys/netinet/in_prot.c (contents, props changed) Modified: head/sys/conf/files head/sys/kern/kern_prot.c head/sys/netinet/in_systm.h head/sys/netinet6/ip6_forward.c head/sys/sys/systm.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Jul 27 20:28:28 2016 (r303410) +++ head/sys/conf/files Wed Jul 27 20:34:09 2016 (r303411) @@ -3750,6 +3750,7 @@ netinet/ip_id.c optional inet netinet/in_mcast.c optional inet netinet/in_pcb.c optional inet | inet6 netinet/in_pcbgroup.c optional inet pcbgroup | inet6 pcbgroup +netinet/in_prot.c optional inet | inet6 netinet/in_proto.c optional inet | inet6 netinet/in_rmx.c optional inet netinet/in_rss.c optional inet rss Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Wed Jul 27 20:28:28 2016 (r303410) +++ head/sys/kern/kern_prot.c Wed Jul 27 20:34:09 2016 (r303411) @@ -76,11 +76,6 @@ FEATURE(regression, "Kernel support for interfaces necessary for regression testing (SECURITY RISK!)"); #endif -#if defined(INET) || defined(INET6) -#include -#include -#endif - #include #include @@ -1342,8 +1337,8 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_ * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -static int -cr_seeotheruids(struct ucred *u1, struct ucred *u2) +int +cr_canseeotheruids(struct ucred *u1, struct ucred *u2) { if (!see_other_uids && u1->cr_ruid != u2->cr_ruid) { @@ -1372,8 +1367,8 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_ * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -static int -cr_seeothergids(struct ucred *u1, struct ucred *u2) +int +cr_canseeothergids(struct ucred *u1, struct ucred *u2) { int i, match; @@ -1411,9 +1406,9 @@ cr_cansee(struct ucred *u1, struct ucred if ((error = mac_cred_check_visible(u1, u2))) return (error); #endif - if ((error = cr_seeotheruids(u1, u2))) + if ((error = cr_canseeotheruids(u1, u2))) return (error); - if ((error = cr_seeothergids(u1, u2))) + if ((error = cr_canseeothergids(u1, u2))) return (error); return (0); } @@ -1472,9 +1467,9 @@ cr_cansignal(struct ucred *cred, struct if ((error = mac_proc_check_signal(cred, proc, signum))) return (error); #endif - if ((error = cr_seeotheruids(cred, proc->p_ucred))) + if ((error = cr_canseeotheruids(cred, proc->p_ucred))) return (error); - if ((error = cr_seeothergids(cred, proc->p_ucred))) + if ((error = cr_canseeothergids(cred, proc->p_ucred))) return (error); /* @@ -1589,9 +1584,9 @@ p_cansched(struct thread *td, struct pro if ((error = mac_proc_check_sched(td->td_ucred, p))) return (error); #endif - if ((error = cr_seeotheruids(td->td_ucred, p->p_ucred))) + if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) return (error); - if ((error = cr_seeothergids(td->td_ucred, p->p_ucred))) + if ((error = cr_canseeothergids(td->td_ucred, p->p_ucred))) return (error); if (td->td_ucred->cr_ruid != p->p_ucred->cr_ruid && td->td_ucred->cr_uid != p->p_ucred->cr_ruid) { @@ -1646,9 +1641,9 @@ p_candebug(struct thread *td, struct pro if ((error = mac_proc_check_debug(td->td_ucred, p))) return (error); #endif - if ((error = cr_seeotheruids(td->td_ucred, p->p_ucred))) + if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) return (error); - if ((error = cr_seeothergids(td->td_ucred, p->p_ucred))) + if ((error = cr_canseeothergids(td->td_ucred, p->p_ucred))) return (error); /* @@ -1740,42 +1735,14 @@ cr_canseesocket(struct ucred *cred, stru if (error) return (error); #endif - if (cr_seeotheruids(cred, so->so_cred)) + if (cr_canseeotheruids(cred, so->so_cred)) return (ENOENT); - if (cr_seeothergids(cred, so->so_cred)) + if (cr_canseeothergids(cred, so->so_cred)) return (ENOENT); return (0); } -#if defined(INET) || defined(INET6) -/*- - * Determine whether the subject represented by cred can "see" a socket. - * Returns: 0 for permitted, ENOENT otherwise. - */ -int -cr_canseeinpcb(struct ucred *cred, struct inpcb *inp) -{ - int error; - - error = prison_check(cred, inp->inp_cred); - if (error) - return (ENOENT); -#ifdef MAC - INP_LOCK_ASSERT(inp); - error = mac_inpcb_check_visible(cred, inp); - if (error) - return (error); -#endif - if (cr_seeotheruids(cred, inp->inp_cred)) - return (ENOENT); - if (cr_seeothergids(cred, inp->inp_cred)) - return (ENOENT); - - return (0); -} -#endif - /*- * Determine whether td can wait for the exit of p. * Returns: 0 for permitted, an errno value otherwise @@ -1800,7 +1767,7 @@ p_canwait(struct thread *td, struct proc #endif #if 0 /* XXXMAC: This could have odd effects on some shells. */ - if ((error = cr_seeotheruids(td->td_ucred, p->p_ucred))) + if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) return (error); #endif Added: head/sys/netinet/in_prot.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netinet/in_prot.c Wed Jul 27 20:34:09 2016 (r303411) @@ -0,0 +1,91 @@ +/*- + * Copyright (c) 1982, 1986, 1989, 1990, 1991, 1993 + * The Regents of the University of California. + * (c) UNIX System Laboratories, Inc. + * Copyright (c) 2000-2001 Robert N. M. Watson. + * All rights reserved. + * + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)kern_prot.c 8.6 (Berkeley) 1/21/94 + */ + +/* + * System calls related to processes and protection + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_compat.h" +#include "opt_inet.h" +#include "opt_inet6.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +/*- + * Determine whether the subject represented by cred can "see" a socket. + * Returns: 0 for permitted, ENOENT otherwise. + */ +int +cr_canseeinpcb(struct ucred *cred, struct inpcb *inp) +{ + int error; + + error = prison_check(cred, inp->inp_cred); + if (error) + return (ENOENT); +#ifdef MAC + INP_LOCK_ASSERT(inp); + error = mac_inpcb_check_visible(cred, inp); + if (error) + return (error); +#endif + if (cr_canseeotheruids(cred, inp->inp_cred)) + return (ENOENT); + if (cr_canseeothergids(cred, inp->inp_cred)) + return (ENOENT); + + return (0); +} Modified: head/sys/netinet/in_systm.h ============================================================================== --- head/sys/netinet/in_systm.h Wed Jul 27 20:28:28 2016 (r303410) +++ head/sys/netinet/in_systm.h Wed Jul 27 20:34:09 2016 (r303411) @@ -55,6 +55,11 @@ typedef u_int32_t n_long; /* long as re typedef u_int32_t n_time; /* ms since 00:00 UTC, byte rev */ #ifdef _KERNEL +struct inpcb; +struct ucred; + +int cr_canseeinpcb(struct ucred *cred, struct inpcb *inp); + uint32_t iptime(void); #endif Modified: head/sys/netinet6/ip6_forward.c ============================================================================== --- head/sys/netinet6/ip6_forward.c Wed Jul 27 20:28:28 2016 (r303410) +++ head/sys/netinet6/ip6_forward.c Wed Jul 27 20:34:09 2016 (r303411) @@ -103,9 +103,6 @@ ip6_forward(struct mbuf *m, int srcrt) #ifdef IPSEC struct secpolicy *sp = NULL; #endif -#ifdef SCTP - int sw_csum; -#endif struct m_tag *fwd_tag; char ip6bufs[INET6_ADDRSTRLEN], ip6bufd[INET6_ADDRSTRLEN]; Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Wed Jul 27 20:28:28 2016 (r303410) +++ head/sys/sys/systm.h Wed Jul 27 20:34:09 2016 (r303411) @@ -315,7 +315,8 @@ extern int cpu_disable_c3_sleep; int cr_cansee(struct ucred *u1, struct ucred *u2); int cr_canseesocket(struct ucred *cred, struct socket *so); -int cr_canseeinpcb(struct ucred *cred, struct inpcb *inp); +int cr_canseeothergids(struct ucred *u1, struct ucred *u2); +int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); char *kern_getenv(const char *name); void freeenv(char *env); From owner-svn-src-all@freebsd.org Wed Jul 27 20:37:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE909BA646C; Wed, 27 Jul 2016 20:37:33 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FE9415A4; Wed, 27 Jul 2016 20:37:33 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RKbWH8089889; Wed, 27 Jul 2016 20:37:32 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RKbWdx089888; Wed, 27 Jul 2016 20:37:32 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201607272037.u6RKbWdx089888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 27 Jul 2016 20:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303412 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 20:37:33 -0000 Author: rrs Date: Wed Jul 27 20:37:32 2016 New Revision: 303412 URL: https://svnweb.freebsd.org/changeset/base/303412 Log: Remove myself from kern_timeout.c yeah! Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Wed Jul 27 20:34:09 2016 (r303411) +++ head/MAINTAINERS Wed Jul 27 20:37:32 2016 (r303412) @@ -37,7 +37,6 @@ subsystem login notes ----------------------------- atf freebsd-testing,jmmv,ngie Pre-commit review requested. ath(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org -callout_*(9) rrs Pre-commit review requested -- becareful its tricksy code :o. contrib/compiler-rt dim Pre-commit review preferred. contrib/libc++ dim Pre-commit review preferred. contrib/libcxxrt dim Pre-commit review preferred. From owner-svn-src-all@freebsd.org Wed Jul 27 20:43:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 434E9BA666B; Wed, 27 Jul 2016 20:43:09 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15E1E1AE8; Wed, 27 Jul 2016 20:43:09 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RKh8N4093442; Wed, 27 Jul 2016 20:43:08 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RKh8P5093441; Wed, 27 Jul 2016 20:43:08 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201607272043.u6RKh8P5093441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Wed, 27 Jul 2016 20:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303413 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 20:43:09 -0000 Author: ivadasz Date: Wed Jul 27 20:43:08 2016 New Revision: 303413 URL: https://svnweb.freebsd.org/changeset/base/303413 Log: [iwm] Fix inverted logic in iwm_tx(). The PROT_REQUIRE flag in should be set for data frames above a certain length, but we were setting it for !data frames above a certain length, which makes no sense at all. Taken-From: OpenBSD, Linux iwlwifi Approved by: adrian (mentor) Obtained from: DragonFlyBSD git 8cc03924a36c572c2908e659e624f44636dc2b33 Differential Revision: https://reviews.freebsd.org/D7323 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Jul 27 20:37:32 2016 (r303412) +++ head/sys/dev/iwm/if_iwm.c Wed Jul 27 20:43:08 2016 (r303413) @@ -3344,7 +3344,7 @@ iwm_tx(struct iwm_softc *sc, struct mbuf flags |= IWM_TX_CMD_FLG_ACK; } - if (type != IEEE80211_FC0_TYPE_DATA + if (type == IEEE80211_FC0_TYPE_DATA && (totlen + IEEE80211_CRC_LEN > vap->iv_rtsthreshold) && !IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= IWM_TX_CMD_FLG_PROT_REQUIRE; From owner-svn-src-all@freebsd.org Wed Jul 27 20:44:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63916BA66D4; Wed, 27 Jul 2016 20:44:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 364F81CA3; Wed, 27 Jul 2016 20:44:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RKirIs093559; Wed, 27 Jul 2016 20:44:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RKirg8093558; Wed, 27 Jul 2016 20:44:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607272044.u6RKirg8093558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jul 2016 20:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303414 - head/sys/modules/mlx5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 20:44:54 -0000 Author: bdrewery Date: Wed Jul 27 20:44:53 2016 New Revision: 303414 URL: https://svnweb.freebsd.org/changeset/base/303414 Log: opt_random.h was removed in r287558 for opt_global.h MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/sys/modules/mlx5/Makefile Modified: head/sys/modules/mlx5/Makefile ============================================================================== --- head/sys/modules/mlx5/Makefile Wed Jul 27 20:43:08 2016 (r303413) +++ head/sys/modules/mlx5/Makefile Wed Jul 27 20:44:53 2016 (r303414) @@ -25,7 +25,7 @@ mlx5_uar.c \ mlx5_vport.c \ mlx5_wq.c \ device_if.h bus_if.h vnode_if.h pci_if.h \ - opt_inet.h opt_inet6.h opt_random.h opt_rss.h + opt_inet.h opt_inet6.h opt_rss.h CFLAGS+= -I${.CURDIR}/../../ofed/include CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include From owner-svn-src-all@freebsd.org Wed Jul 27 20:45:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1257BA670B; Wed, 27 Jul 2016 20:45:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82B711DF2; Wed, 27 Jul 2016 20:45:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RKj04j093618; Wed, 27 Jul 2016 20:45:00 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RKj0Fc093616; Wed, 27 Jul 2016 20:45:00 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607272045.u6RKj0Fc093616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jul 2016 20:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303415 - in head/sys/modules: hyperv/vmbus linux64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 20:45:01 -0000 Author: bdrewery Date: Wed Jul 27 20:45:00 2016 New Revision: 303415 URL: https://svnweb.freebsd.org/changeset/base/303415 Log: opt_apic.h is only used on i386. MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/sys/modules/hyperv/vmbus/Makefile head/sys/modules/linux64/Makefile Modified: head/sys/modules/hyperv/vmbus/Makefile ============================================================================== --- head/sys/modules/hyperv/vmbus/Makefile Wed Jul 27 20:44:53 2016 (r303414) +++ head/sys/modules/hyperv/vmbus/Makefile Wed Jul 27 20:45:00 2016 (r303415) @@ -14,7 +14,10 @@ SRCS= hyperv.c \ SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h vmbus_if.h # XXX: for assym.s -SRCS+= opt_kstack_pages.h opt_nfs.h opt_apic.h opt_hwpmc_hooks.h opt_compat.h +SRCS+= opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h opt_compat.h +.if ${MACHINE_CPUARCH} == "i386" +SRCS+= opt_apic.h +.endif SRCS+= assym.s \ vmbus_vector.S Modified: head/sys/modules/linux64/Makefile ============================================================================== --- head/sys/modules/linux64/Makefile Wed Jul 27 20:44:53 2016 (r303414) +++ head/sys/modules/linux64/Makefile Wed Jul 27 20:45:00 2016 (r303415) @@ -16,7 +16,10 @@ SRCS= linux_fork.c linux_dummy.c linux_f DPSRCS= linux_genassym.c # XXX: for assym.s -SRCS+= opt_kstack_pages.h opt_nfs.h opt_apic.h opt_hwpmc_hooks.h +SRCS+= opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h +.if ${MACHINE_CPUARCH} == "i386" +SRCS+= opt_apic.h +.endif CLEANFILES= linux_assym.h linux_genassym.o linux_locore.o From owner-svn-src-all@freebsd.org Wed Jul 27 20:46:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C812BA6835; Wed, 27 Jul 2016 20:46:53 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E95581293; Wed, 27 Jul 2016 20:46:52 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RKkqSw093828; Wed, 27 Jul 2016 20:46:52 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RKkqPJ093825; Wed, 27 Jul 2016 20:46:52 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201607272046.u6RKkqPJ093825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Wed, 27 Jul 2016 20:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303416 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 20:46:53 -0000 Author: ivadasz Date: Wed Jul 27 20:46:51 2016 New Revision: 303416 URL: https://svnweb.freebsd.org/changeset/base/303416 Log: [iwm] Set different pm_timeout for action frames. When building a Tx Command for management frames, we are lacking a check for action frames, for which we should set a different pm_timeout. This cause the fw to stay awake for 100TU after each such frame is transmitted, resulting an excessive power consumption. Taken-From: Linux iwlwifi (git b084a35663c3f1f7) Approved by: adrian (mentor) Obtained from: Linux git b084a35663c3f1f7de1c45c4ae3006864c940fe7 Obtained from: DragonFlyBSD git ba00f0e3ae873d6f0d5743e22c3ebc49c44dfdac Differential Revision: https://reviews.freebsd.org/D7324 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Jul 27 20:45:00 2016 (r303415) +++ head/sys/dev/iwm/if_iwm.c Wed Jul 27 20:46:51 2016 (r303416) @@ -3360,12 +3360,15 @@ iwm_tx(struct iwm_softc *sc, struct mbuf uint8_t subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; if (subtype == IEEE80211_FC0_SUBTYPE_ASSOC_REQ || - subtype == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) - tx->pm_frame_timeout = htole16(3); - else - tx->pm_frame_timeout = htole16(2); + subtype == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) { + tx->pm_frame_timeout = htole16(IWM_PM_FRAME_ASSOC); + } else if (subtype == IEEE80211_FC0_SUBTYPE_ACTION) { + tx->pm_frame_timeout = htole16(IWM_PM_FRAME_NONE); + } else { + tx->pm_frame_timeout = htole16(IWM_PM_FRAME_MGMT); + } } else { - tx->pm_frame_timeout = htole16(0); + tx->pm_frame_timeout = htole16(IWM_PM_FRAME_NONE); } if (hdrlen & 3) { Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Wed Jul 27 20:45:00 2016 (r303415) +++ head/sys/dev/iwm/if_iwmreg.h Wed Jul 27 20:46:51 2016 (r303416) @@ -4244,6 +4244,18 @@ enum iwm_tx_flags { IWM_TX_CMD_FLG_HCCA_CHUNK = (1 << 31) }; /* IWM_TX_FLAGS_BITS_API_S_VER_1 */ +/** + * enum iwm_tx_pm_timeouts - pm timeout values in TX command + * @IWM_PM_FRAME_NONE: no need to suspend sleep mode + * @IWM_PM_FRAME_MGMT: fw suspend sleep mode for 100TU + * @IWM_PM_FRAME_ASSOC: fw suspend sleep mode for 10sec + */ +enum iwm_tx_pm_timeouts { + IWM_PM_FRAME_NONE = 0, + IWM_PM_FRAME_MGMT = 2, + IWM_PM_FRAME_ASSOC = 3, +}; + /* * TX command security control */ From owner-svn-src-all@freebsd.org Wed Jul 27 20:48:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66270BA68BD; Wed, 27 Jul 2016 20:48:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3233A144F; Wed, 27 Jul 2016 20:48:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RKmFAl093916; Wed, 27 Jul 2016 20:48:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RKmFJR093914; Wed, 27 Jul 2016 20:48:15 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607272048.u6RKmFJR093914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jul 2016 20:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303417 - in head/sys/modules: ixl ixlv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 20:48:16 -0000 Author: bdrewery Date: Wed Jul 27 20:48:15 2016 New Revision: 303417 URL: https://svnweb.freebsd.org/changeset/base/303417 Log: opt_bdg.h was removed in r150636. MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/sys/modules/ixl/Makefile head/sys/modules/ixlv/Makefile Modified: head/sys/modules/ixl/Makefile ============================================================================== --- head/sys/modules/ixl/Makefile Wed Jul 27 20:46:51 2016 (r303416) +++ head/sys/modules/ixl/Makefile Wed Jul 27 20:48:15 2016 (r303417) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../dev/ixl KMOD = if_ixl -SRCS = device_if.h bus_if.h pci_if.h pci_iov_if.h opt_bdg.h +SRCS = device_if.h bus_if.h pci_if.h pci_iov_if.h SRCS += opt_inet.h opt_inet6.h opt_rss.h SRCS += if_ixl.c ixl_txrx.c i40e_osdep.c Modified: head/sys/modules/ixlv/Makefile ============================================================================== --- head/sys/modules/ixlv/Makefile Wed Jul 27 20:46:51 2016 (r303416) +++ head/sys/modules/ixlv/Makefile Wed Jul 27 20:48:15 2016 (r303417) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../dev/ixl KMOD = if_ixlv -SRCS = device_if.h bus_if.h pci_if.h pci_iov_if.h opt_bdg.h +SRCS = device_if.h bus_if.h pci_if.h pci_iov_if.h SRCS += opt_inet.h opt_inet6.h opt_rss.h SRCS += if_ixlv.c ixlvc.c ixl_txrx.c i40e_osdep.c From owner-svn-src-all@freebsd.org Wed Jul 27 20:51:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEAEABA6A81; Wed, 27 Jul 2016 20:51:32 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77770183A; Wed, 27 Jul 2016 20:51:32 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RKpVjJ094695; Wed, 27 Jul 2016 20:51:31 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RKpVPE094694; Wed, 27 Jul 2016 20:51:31 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201607272051.u6RKpVPE094694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Wed, 27 Jul 2016 20:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303418 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 20:51:32 -0000 Author: ivadasz Date: Wed Jul 27 20:51:31 2016 New Revision: 303418 URL: https://svnweb.freebsd.org/changeset/base/303418 Log: [iwm] When stopping TX DMA, wait for all channels at once. * Makes the TX DMA stopping more similar to Linux code, and potentially a bit faster. Also, output an error message when TX DMA idling fails. Taken-From: Linux iwlwifi Tested: * AC3165, STA mode Approved by: adrian (mentor) Obtained from: DragonFlyBSD git 2ee486ddff973ac552ff787c17e8d83e8ae0f24c Differential Revision: https://reviews.freebsd.org/D7325 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Jul 27 20:48:15 2016 (r303417) +++ head/sys/dev/iwm/if_iwm.c Wed Jul 27 20:51:31 2016 (r303418) @@ -911,12 +911,9 @@ iwm_free_fwmem(struct iwm_softc *sc) static int iwm_alloc_sched(struct iwm_softc *sc) { - int rv; - /* TX scheduler rings must be aligned on a 1KB boundary. */ - rv = iwm_dma_contig_alloc(sc->sc_dmat, &sc->sched_dma, + return iwm_dma_contig_alloc(sc->sc_dmat, &sc->sched_dma, nitems(sc->txq) * sizeof(struct iwm_agn_scd_bc_tbl), 1024); - return rv; } static void @@ -1281,8 +1278,8 @@ iwm_stop_device(struct iwm_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - int chnl, ntries; - int qid; + int chnl, qid; + uint32_t mask = 0; /* tell the device to stop sending interrupts */ iwm_disable_interrupts(sc); @@ -1304,20 +1301,20 @@ iwm_stop_device(struct iwm_softc *sc) iwm_write_prph(sc, IWM_SCD_TXFACT, 0); - /* Stop all DMA channels. */ if (iwm_nic_lock(sc)) { + /* Stop each Tx DMA channel */ for (chnl = 0; chnl < IWM_FH_TCSR_CHNL_NUM; chnl++) { IWM_WRITE(sc, IWM_FH_TCSR_CHNL_TX_CONFIG_REG(chnl), 0); - for (ntries = 0; ntries < 200; ntries++) { - uint32_t r; + mask |= IWM_FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(chnl); + } - r = IWM_READ(sc, IWM_FH_TSSR_TX_STATUS_REG); - if (r & IWM_FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE( - chnl)) - break; - DELAY(20); - } + /* Wait for DMA channels to be idle */ + if (iwm_poll_bit(sc, IWM_FH_TSSR_TX_STATUS_REG, mask, mask, + 5000) < 0) { + device_printf(sc->sc_dev, + "Failing on timeout while stopping DMA channel: [0x%08x]\n", + IWM_READ(sc, IWM_FH_TSSR_TX_STATUS_REG)); } iwm_nic_unlock(sc); } From owner-svn-src-all@freebsd.org Wed Jul 27 21:45:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE8F4BA6798; Wed, 27 Jul 2016 21:45:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A04C313DC; Wed, 27 Jul 2016 21:45:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RLjBd4016328; Wed, 27 Jul 2016 21:45:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RLjBZO016327; Wed, 27 Jul 2016 21:45:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607272145.u6RLjBZO016327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jul 2016 21:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303419 - head/usr.sbin/pmcstudy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 21:45:12 -0000 Author: bdrewery Date: Wed Jul 27 21:45:11 2016 New Revision: 303419 URL: https://svnweb.freebsd.org/changeset/base/303419 Log: Fix non-amd64 build from r292043 after reconnecting in r303410. MFC after: 3 days X-MFC-With: r303410 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/pmcstudy/pmcstudy.c Modified: head/usr.sbin/pmcstudy/pmcstudy.c ============================================================================== --- head/usr.sbin/pmcstudy/pmcstudy.c Wed Jul 27 20:51:31 2016 (r303418) +++ head/usr.sbin/pmcstudy/pmcstudy.c Wed Jul 27 21:45:11 2016 (r303419) @@ -2322,11 +2322,7 @@ do_cpuid(u_int ax, u_int cx, u_int *p) #else #define cpuid(in, a, b, c, d) -static __inline void -do_cpuid(u_int ax, u_int cx, u_int *p) -{ -} - +#define do_cpuid(ax, cx, p) #endif static void From owner-svn-src-all@freebsd.org Thu Jul 28 02:49:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2B7BBA6568; Thu, 28 Jul 2016 02:49:26 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 66E8317CF; Thu, 28 Jul 2016 02:49:25 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id SbNtbf2aExBmMSbNubBhL0; Wed, 27 Jul 2016 20:49:18 -0600 X-Authority-Analysis: v=2.2 cv=DLzN2GFb c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=cAmyUtKerLwA:10 a=6I5d2MoRAAAA:8 a=VwQbUJbxAAAA:8 a=YxBL1-UpAAAA:8 a=NNLQ3VG0lDboyx6LFJ8A:9 a=IjZwj45LgO3ly-622nXo:22 a=AjGcO6oz07-iQ99wixmX:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id C996113753; Wed, 27 Jul 2016 19:49:16 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u6S2nGWT005937; Wed, 27 Jul 2016 19:49:16 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201607280249.u6S2nGWT005937@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Andrew Turner cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r303380 - in vendor/device-tree/dist: Bindings Bindings/arc Bindings/arm Bindings/arm/altera Bindings/arm/bcm Bindings/arm/hisilicon Bindings/arm/keystone Bindings/arm/marvell Bindings/... In-Reply-To: Message from Andrew Turner of "Wed, 27 Jul 2016 10:33:46 -0000." <201607271033.u6RAXkeI063443@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 27 Jul 2016 19:49:16 -0700 X-CMAE-Envelope: MS4wfOs9PKHwhzWM354z4AbKkMVQCw52t+F7taKFezDAgxUBWhfS9eocyrxFwxZ3U0bjDaCI20+QjTzvRFsqhZ0MDzoH5rmQSbROnpq66wafsVFWu6/UTrfm e4mulyU09aEbopARFCa59kMiJZb6UkqHWsQt5o2yTgJWlhpOuwXnnmZ7KxVwr6stfsDPwHHNBwOyQkEWuM4NFQ58I/bLNNhd+7nLGeVFcoTomW5XpxK3NPgI YbyXAYgFqhPGm63DLiUMpY17towq18a415MHisgqK+kNq6o+rXH91JoJ1uOshh4h X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 02:49:26 -0000 In message <201607271033.u6RAXkeI063443@repo.freebsd.org>, Andrew Turner writes : > Author: andrew > Date: Wed Jul 27 10:33:45 2016 > New Revision: 303380 > URL: https://svnweb.freebsd.org/changeset/base/303380 > > Log: > Import the updated devicetree files from > https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebas > ing.git I don't see this used anywhere in head (though I must admit I haven't looked that hard). Considering this is GPL, what do we intend to do with this? (Once again, I haven't really looked that hard but I can't see it used anywhere.) -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Thu Jul 28 03:21:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 195B6BA6FA2; Thu, 28 Jul 2016 03:21:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id F399D1329; Thu, 28 Jul 2016 03:21:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id EB0551866; Thu, 28 Jul 2016 03:21:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 8DBBA24250; Thu, 28 Jul 2016 03:21:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id IW-f6Aowma81; Thu, 28 Jul 2016 03:21:21 +0000 (UTC) Subject: Re: svn commit: r303382 - in head/sys: compat/linprocfs fs/devfs fs/fdescfs fs/nfs fs/procfs kern net net/altq netpfil/ipfw nfs rpc/rpcsec_gss sys DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com CC7C02424B To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607271108.u6RB8xQh074927@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <408dac83-72d2-65f2-880b-bb887069acf9@FreeBSD.org> Date: Wed, 27 Jul 2016 20:21:21 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201607271108.u6RB8xQh074927@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4tR4GdtrRfljohgWcQCB1IIoFibuTnd3S" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 03:21:24 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4tR4GdtrRfljohgWcQCB1IIoFibuTnd3S Content-Type: multipart/mixed; boundary="j0f9ojFxVk8gEUwwpgRqah4uwRsoPJSdN" From: Bryan Drewery To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <408dac83-72d2-65f2-880b-bb887069acf9@FreeBSD.org> Subject: Re: svn commit: r303382 - in head/sys: compat/linprocfs fs/devfs fs/fdescfs fs/nfs fs/procfs kern net net/altq netpfil/ipfw nfs rpc/rpcsec_gss sys References: <201607271108.u6RB8xQh074927@repo.freebsd.org> In-Reply-To: <201607271108.u6RB8xQh074927@repo.freebsd.org> --j0f9ojFxVk8gEUwwpgRqah4uwRsoPJSdN Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 7/27/2016 4:08 AM, Konstantin Belousov wrote: > +void > +getboottime(struct timeval *boottime) > +{ > + > + *boottime =3D boottime_x; > +} > + > +void > +getboottimebin(struct bintime *boottimebin) > +{ > + > + *boottimebin =3D boottimebin_x; > +} Is there benefit to moving these to a header and making them explicitly inline? --=20 Regards, Bryan Drewery --j0f9ojFxVk8gEUwwpgRqah4uwRsoPJSdN-- --4tR4GdtrRfljohgWcQCB1IIoFibuTnd3S 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 iQEcBAEBAgAGBQJXmXoxAAoJEDXXcbtuRpfP0bkIAJy0fk1GTl4IUuwcvCGducR1 bGAdjYTphLlqB/JW02LaTUffPexDXUEwlCumEcP7N71q1b/QN2cqJItZBs20LiN1 UrLEEZWwtn7oggwODdPkeHAZ85ozXnKR7r8QU+8tu8p92scyIwob7887iWjR5I1a bO1YqAtZk0qC4qAR9liWQ2hRLzJrh2eILUpiFQ37YThc080o4KULdqoID5Csbx9y cTJyy/IK4WnxME6hkosukihu3OI5rOREXRAfokJ8qIkKTBphl0A/XdywWT0Dmq1q sKQFno7Hplejm+Tlitihuxfja+ZZUOS9er7M5F3z6McNb6N38ZBzAh7e9MiuOmU= =D2K2 -----END PGP SIGNATURE----- --4tR4GdtrRfljohgWcQCB1IIoFibuTnd3S-- From owner-svn-src-all@freebsd.org Thu Jul 28 05:59:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D283BA6ECD; Thu, 28 Jul 2016 05:59:58 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23A4A1B3A; Thu, 28 Jul 2016 05:59:58 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6S5xvgx096718; Thu, 28 Jul 2016 05:59:57 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6S5xvdp096715; Thu, 28 Jul 2016 05:59:57 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201607280559.u6S5xvdp096715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 28 Jul 2016 05:59:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303420 - in head/sys: arm/altera/socfpga arm/ti conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 05:59:58 -0000 Author: loos Date: Thu Jul 28 05:59:56 2016 New Revision: 303420 URL: https://svnweb.freebsd.org/changeset/base/303420 Log: Enable the build of micphy as part of generic miibus build, but only for FDT enabled systems. Sponsored by: Rubicon Communications (Netgate) Modified: head/sys/arm/altera/socfpga/files.socfpga head/sys/arm/ti/files.ti head/sys/conf/files Modified: head/sys/arm/altera/socfpga/files.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/files.socfpga Wed Jul 27 21:45:11 2016 (r303419) +++ head/sys/arm/altera/socfpga/files.socfpga Thu Jul 28 05:59:56 2016 (r303420) @@ -9,7 +9,6 @@ arm/altera/socfpga/socfpga_rstmgr.c sta arm/altera/socfpga/socfpga_mp.c optional smp arm/altera/socfpga/socfpga_gpio.c optional gpio -dev/mii/micphy.c optional micphy dev/mmc/host/dwmmc.c optional dwmmc # BERI specific Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Wed Jul 27 21:45:11 2016 (r303419) +++ head/sys/arm/ti/files.ti Thu Jul 28 05:59:56 2016 (r303420) @@ -20,7 +20,6 @@ arm/ti/ti_i2c.c optional ti_i2c arm/ti/ti_sdhci.c optional sdhci arm/ti/ti_spi.c optional ti_spi -dev/mii/micphy.c optional micphy dev/uart/uart_dev_ti8250.c optional uart dev/uart/uart_dev_ns8250.c optional uart Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Jul 27 21:45:11 2016 (r303419) +++ head/sys/conf/files Thu Jul 28 05:59:56 2016 (r303420) @@ -2045,6 +2045,7 @@ dev/mii/icsphy.c optional miibus | icsp dev/mii/ip1000phy.c optional miibus | ip1000phy dev/mii/jmphy.c optional miibus | jmphy dev/mii/lxtphy.c optional miibus | lxtphy +dev/mii/micphy.c optional miibus fdt | micphy fdt dev/mii/mii.c optional miibus | mii dev/mii/mii_bitbang.c optional miibus | mii_bitbang dev/mii/mii_physubr.c optional miibus | mii From owner-svn-src-all@freebsd.org Thu Jul 28 06:30:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 546C8BA65AD; Thu, 28 Jul 2016 06:30:30 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A1D21786; Thu, 28 Jul 2016 06:30:30 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6S6UTZs008006; Thu, 28 Jul 2016 06:30:29 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6S6UTnR008005; Thu, 28 Jul 2016 06:30:29 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607280630.u6S6UTnR008005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 28 Jul 2016 06:30:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303421 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 06:30:30 -0000 Author: sephe Date: Thu Jul 28 06:30:29 2016 New Revision: 303421 URL: https://svnweb.freebsd.org/changeset/base/303421 Log: hyperv/vmbus: Avoid unnecessary mb() MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7333 Modified: head/sys/dev/hyperv/vmbus/vmbus_br.c Modified: head/sys/dev/hyperv/vmbus/vmbus_br.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_br.c Thu Jul 28 05:59:56 2016 (r303420) +++ head/sys/dev/hyperv/vmbus/vmbus_br.c Thu Jul 28 06:30:29 2016 (r303421) @@ -209,9 +209,7 @@ vmbus_txbr_need_signal(const struct vmbu if (tbr->txbr_imask) return (FALSE); - /* XXX only compiler fence is needed */ - /* Read memory barrier */ - rmb(); + __compiler_membar(); /* * This is the only case we need to signal when the @@ -308,15 +306,10 @@ vmbus_txbr_write(struct vmbus_txbr *tbr, sizeof(save_windex)); /* - * XXX only compiler fence is needed. - * Full memory barrier before upding the write index. - */ - mb(); - - /* * Update the write index _after_ the channel packet * is copied. */ + __compiler_membar(); tbr->txbr_windex = windex; mtx_unlock_spin(&tbr->txbr_lock); @@ -396,16 +389,9 @@ vmbus_rxbr_read(struct vmbus_rxbr *rbr, rindex = VMBUS_BR_IDXINC(rindex, sizeof(uint64_t), br_dsize); /* - * XXX only compiler fence is needed. - * Make sure all reads are done before we update the read index since - * the writer may start writing to the read area once the read index - * is updated. - */ - wmb(); - - /* * Update the read index _after_ the channel packet is fetched. */ + __compiler_membar(); rbr->rxbr_rindex = rindex; mtx_unlock_spin(&rbr->rxbr_lock); From owner-svn-src-all@freebsd.org Thu Jul 28 06:46:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 157ACBA6938; Thu, 28 Jul 2016 06:46:13 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E21041F90; Thu, 28 Jul 2016 06:46:12 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6S6kCMi015649; Thu, 28 Jul 2016 06:46:12 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6S6kAvQ015635; Thu, 28 Jul 2016 06:46:10 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607280646.u6S6kAvQ015635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 28 Jul 2016 06:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303422 - in head/sys/dev/hyperv: include netvsc storvsc utilities vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 06:46:13 -0000 Author: sephe Date: Thu Jul 28 06:46:10 2016 New Revision: 303422 URL: https://svnweb.freebsd.org/changeset/base/303422 Log: hyperv/vmbus: Inclusion cleanup MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7334 Modified: head/sys/dev/hyperv/include/hyperv.h head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c head/sys/dev/hyperv/utilities/hv_heartbeat.c head/sys/dev/hyperv/utilities/hv_shutdown.c head/sys/dev/hyperv/utilities/hv_timesync.c head/sys/dev/hyperv/vmbus/hyperv.c head/sys/dev/hyperv/vmbus/vmbus.c head/sys/dev/hyperv/vmbus/vmbus_chan.c head/sys/dev/hyperv/vmbus/vmbus_et.c head/sys/dev/hyperv/vmbus/vmbus_var.h Modified: head/sys/dev/hyperv/include/hyperv.h ============================================================================== --- head/sys/dev/hyperv/include/hyperv.h Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/include/hyperv.h Thu Jul 28 06:46:10 2016 (r303422) @@ -28,36 +28,14 @@ * $FreeBSD$ */ -/** - * HyperV definitions for messages that are sent between instances of the - * Channel Management Library in separate partitions, or in some cases, - * back to itself. - */ - -#ifndef __HYPERV_H__ -#define __HYPERV_H__ +#ifndef _HYPERV_H_ +#define _HYPERV_H_ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include + #include -#include #include -#include -#include -#include - struct hyperv_guid { uint8_t hv_guid[16]; } __packed; @@ -77,4 +55,4 @@ hv_get_phys_addr(void *virt) return (ret); } -#endif /* __HYPERV_H__ */ +#endif /* _HYPERV_H_ */ Modified: head/sys/dev/hyperv/include/vmbus.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus.h Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/include/vmbus.h Thu Jul 28 06:46:10 2016 (r303422) @@ -30,6 +30,7 @@ #define _VMBUS_H_ #include +#include /* * VMBUS version is 32 bit, upper 16 bit for major_number and lower Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Thu Jul 28 06:46:10 2016 (r303422) @@ -44,6 +44,7 @@ #include #include #include +#include #include #include Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Jul 28 06:46:10 2016 (r303422) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Thu Jul 28 06:46:10 2016 (r303422) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/hyperv/utilities/hv_heartbeat.c ============================================================================== --- head/sys/dev/hyperv/utilities/hv_heartbeat.c Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/utilities/hv_heartbeat.c Thu Jul 28 06:46:10 2016 (r303422) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include Modified: head/sys/dev/hyperv/utilities/hv_shutdown.c ============================================================================== --- head/sys/dev/hyperv/utilities/hv_shutdown.c Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/utilities/hv_shutdown.c Thu Jul 28 06:46:10 2016 (r303422) @@ -38,6 +38,7 @@ #include #include #include +#include #include #include Modified: head/sys/dev/hyperv/utilities/hv_timesync.c ============================================================================== --- head/sys/dev/hyperv/utilities/hv_timesync.c Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/utilities/hv_timesync.c Thu Jul 28 06:46:10 2016 (r303422) @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include #include Modified: head/sys/dev/hyperv/vmbus/hyperv.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hyperv.c Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/vmbus/hyperv.c Thu Jul 28 06:46:10 2016 (r303422) @@ -34,23 +34,14 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include #include -#include -#include -#include -#include -#include #include #include #include #include #include -#if 0 -#include -#endif #define HYPERV_FREEBSD_BUILD 0ULL #define HYPERV_FREEBSD_VERSION ((uint64_t)__FreeBSD_version) Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/vmbus/vmbus.c Thu Jul 28 06:46:10 2016 (r303422) @@ -38,26 +38,16 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include +#include #include -#include #include -#include -#include -#include #include -#include -#include -#include -#include - -#include #include -#include -#include -#include -#include +#include + +#include #include #include @@ -66,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include "acpi_if.h" #include "vmbus_if.h" Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Thu Jul 28 06:46:10 2016 (r303422) @@ -31,19 +31,14 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include #include +#include #include +#include #include +#include #include -#include - -#include -#include -#include #include #include Modified: head/sys/dev/hyperv/vmbus/vmbus_et.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_et.c Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/vmbus/vmbus_et.c Thu Jul 28 06:46:10 2016 (r303422) @@ -32,9 +32,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include +#include #include #include Modified: head/sys/dev/hyperv/vmbus/vmbus_var.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_var.h Thu Jul 28 06:30:29 2016 (r303421) +++ head/sys/dev/hyperv/vmbus/vmbus_var.h Thu Jul 28 06:46:10 2016 (r303422) @@ -30,7 +30,6 @@ #define _VMBUS_VAR_H_ #include -#include #include #include From owner-svn-src-all@freebsd.org Thu Jul 28 08:20:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 276B5BA5DC4; Thu, 28 Jul 2016 08:20:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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 B4B2B16CE; Thu, 28 Jul 2016 08:20:43 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u6S8KYTr063577 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 28 Jul 2016 11:20:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u6S8KYTr063577 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u6S8KYJT063572; Thu, 28 Jul 2016 11:20:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 28 Jul 2016 11:20:34 +0300 From: Konstantin Belousov To: Bryan Drewery Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303382 - in head/sys: compat/linprocfs fs/devfs fs/fdescfs fs/nfs fs/procfs kern net net/altq netpfil/ipfw nfs rpc/rpcsec_gss sys Message-ID: <20160728082034.GQ38613@kib.kiev.ua> References: <201607271108.u6RB8xQh074927@repo.freebsd.org> <408dac83-72d2-65f2-880b-bb887069acf9@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <408dac83-72d2-65f2-880b-bb887069acf9@FreeBSD.org> User-Agent: Mutt/1.6.1 (2016-04-27) 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.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 08:20:44 -0000 On Wed, Jul 27, 2016 at 08:21:21PM -0700, Bryan Drewery wrote: > On 7/27/2016 4:08 AM, Konstantin Belousov wrote: > > +void > > +getboottime(struct timeval *boottime) > > +{ > > + > > + *boottime = boottime_x; > > +} > > + > > +void > > +getboottimebin(struct bintime *boottimebin) > > +{ > > + > > + *boottimebin = boottimebin_x; > > +} > > Is there benefit to moving these to a header and making them explicitly > inline? > No. See r303387. From owner-svn-src-all@freebsd.org Thu Jul 28 08:30:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B817BA60F9; Thu, 28 Jul 2016 08:30:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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 C8B381D08; Thu, 28 Jul 2016 08:30:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u6S8UgXS066088 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 28 Jul 2016 11:30:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u6S8UgXS066088 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u6S8UgRP066087; Thu, 28 Jul 2016 11:30:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 28 Jul 2016 11:30:42 +0300 From: Konstantin Belousov To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303419 - head/usr.sbin/pmcstudy Message-ID: <20160728083042.GR38613@kib.kiev.ua> References: <201607272145.u6RLjBZO016327@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201607272145.u6RLjBZO016327@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) 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.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 08:30:48 -0000 On Wed, Jul 27, 2016 at 09:45:11PM +0000, Bryan Drewery wrote: > Author: bdrewery > Date: Wed Jul 27 21:45:11 2016 > New Revision: 303419 > URL: https://svnweb.freebsd.org/changeset/base/303419 > > Log: > Fix non-amd64 build from r292043 after reconnecting in r303410. > > MFC after: 3 days > X-MFC-With: r303410 > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/usr.sbin/pmcstudy/pmcstudy.c > > Modified: head/usr.sbin/pmcstudy/pmcstudy.c > ============================================================================== > --- head/usr.sbin/pmcstudy/pmcstudy.c Wed Jul 27 20:51:31 2016 (r303418) > +++ head/usr.sbin/pmcstudy/pmcstudy.c Wed Jul 27 21:45:11 2016 (r303419) > @@ -2322,11 +2322,7 @@ do_cpuid(u_int ax, u_int cx, u_int *p) > > #else > #define cpuid(in, a, b, c, d) > -static __inline void > -do_cpuid(u_int ax, u_int cx, u_int *p) > -{ > -} > - > +#define do_cpuid(ax, cx, p) > #endif > > static void Should the same code be enabled for i386 as well ? From owner-svn-src-all@freebsd.org Thu Jul 28 08:41:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34DF4BA6382; Thu, 28 Jul 2016 08:41:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E75CA13A8; Thu, 28 Jul 2016 08:41:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6S8fEA6057882; Thu, 28 Jul 2016 08:41:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6S8fDj1057663; Thu, 28 Jul 2016 08:41:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607280841.u6S8fDj1057663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Jul 2016 08:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303423 - in head: bin/ps 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 08:41:15 -0000 Author: kib Date: Thu Jul 28 08:41:13 2016 New Revision: 303423 URL: https://svnweb.freebsd.org/changeset/base/303423 Log: When a debugger attaches to the process, SIGSTOP is sent to the target. Due to a way issignal() selects the next signal to deliver and report, if the simultaneous or already pending another signal exists, that signal might be reported by the next waitpid(2) call. This causes minor annoyance for debuggers, which must be prepared to take any signal as the first event, then filter SIGSTOP later. More importantly, for tools like gcore(1), which attach and then detach without processing events, SIGSTOP might leak to be delivered after PT_DETACH. This results in the process being unintentionally stopped after detach, which is fatal for automatic tools. The solution is to force SIGSTOP to be the first signal reported after the attach. Attach code is modified to set P2_PTRACE_FSTP to indicate that the attaching ritual was not yet finished, and issignal() prefers SIGSTOP in that condition. Also, the thread which handles P2_PTRACE_FSTP is made to guarantee to own p_xthread during the first waitpid(2). All that ensures that SIGSTOP is consumed first. Additionally, if P2_PTRACE_FSTP is still set on detach, which means that waitpid(2) was not called at all, SIGSTOP is removed from the queue, ensuring that the process is resumed on detach. In issignal(), when acting on STOPing signals, remove the signal from queue before suspending. Otherwise parallel attach could result in ptracestop() acting on that STOP as if it was the STOP signal from the attach. Then SIGSTOP from attach leaks again. As a minor refactoring, some bits of the common attach code is moved to new helper proc_set_traced(). Reported by: markj Reviewed by: jhb, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D7256 Modified: head/bin/ps/ps.1 head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c head/sys/kern/kern_sig.c head/sys/kern/sys_process.c head/sys/sys/proc.h Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Thu Jul 28 06:46:10 2016 (r303422) +++ head/bin/ps/ps.1 Thu Jul 28 08:41:13 2016 (r303423) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd December 1, 2015 +.Dd July 28, 2016 .Dt PS 1 .Os .Sh NAME @@ -360,6 +360,7 @@ the include file .It Dv "P2_NOTRACE" Ta No "0x00000002" Ta "No ptrace(2) attach or coredumps" .It Dv "P2_NOTRACE_EXEC" Ta No "0x00000004" Ta "Keep P2_NOPTRACE on exec(2)" .It Dv "P2_AST_SU" Ta No "0x00000008" Ta "Handles SU ast for kthreads" +.It Dv "P2_PTRACE_FSTP" Ta No "0x00000010" Ta "SIGSTOP from PT_ATTACH not yet handled" .El .It Cm label The MAC label of the process. Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Thu Jul 28 06:46:10 2016 (r303422) +++ head/sys/kern/kern_exit.c Thu Jul 28 08:41:13 2016 (r303423) @@ -476,9 +476,12 @@ exit1(struct thread *td, int rval, int s */ clear_orphan(q); q->p_flag &= ~(P_TRACED | P_STOPPED_TRACE); + q->p_flag2 &= ~P2_PTRACE_FSTP; q->p_ptevents = 0; - FOREACH_THREAD_IN_PROC(q, tdt) - tdt->td_dbgflags &= ~TDB_SUSPEND; + FOREACH_THREAD_IN_PROC(q, tdt) { + tdt->td_dbgflags &= ~(TDB_SUSPEND | TDB_XSIG | + TDB_FSTP); + } kern_psignal(q, SIGKILL); } PROC_UNLOCK(q); Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Thu Jul 28 06:46:10 2016 (r303422) +++ head/sys/kern/kern_fork.c Thu Jul 28 08:41:13 2016 (r303423) @@ -1074,15 +1074,13 @@ fork_return(struct thread *td, struct tr * parent's children, do it now. */ dbg = p->p_pptr->p_pptr; - p->p_flag |= P_TRACED; - p->p_ptevents = PTRACE_DEFAULT; - p->p_oppid = p->p_pptr->p_pid; + proc_set_traced(p); CTR2(KTR_PTRACE, "fork_return: attaching to new child pid %d: oppid %d", p->p_pid, p->p_oppid); proc_reparent(p, dbg); sx_xunlock(&proctree_lock); - td->td_dbgflags |= TDB_CHILD | TDB_SCX; + td->td_dbgflags |= TDB_CHILD | TDB_SCX | TDB_FSTP; ptracestop(td, SIGSTOP); td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX); } else { Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Thu Jul 28 06:46:10 2016 (r303422) +++ head/sys/kern/kern_sig.c Thu Jul 28 08:41:13 2016 (r303423) @@ -2526,14 +2526,26 @@ ptracestop(struct thread *td, int sig) PROC_SUNLOCK(p); return (sig); } + /* - * Just make wait() to work, the last stopped thread - * will win. + * Make wait(2) work. Ensure that right after the + * attach, the thread which was decided to become the + * leader of attach gets reported to the waiter. + * Otherwise, just avoid overwriting another thread's + * assignment to p_xthread. If another thread has + * already set p_xthread, the current thread will get + * a chance to report itself upon the next iteration. */ - p->p_xsig = sig; - p->p_xthread = td; - p->p_flag |= (P_STOPPED_SIG|P_STOPPED_TRACE); - sig_suspend_threads(td, p, 0); + if ((td->td_dbgflags & TDB_FSTP) != 0 || + ((p->p_flag & P2_PTRACE_FSTP) == 0 && + p->p_xthread == NULL)) { + p->p_xsig = sig; + p->p_xthread = td; + td->td_dbgflags &= ~TDB_FSTP; + p->p_flag2 &= ~P2_PTRACE_FSTP; + p->p_flag |= P_STOPPED_SIG | P_STOPPED_TRACE; + sig_suspend_threads(td, p, 0); + } if ((td->td_dbgflags & TDB_STOPATFORK) != 0) { td->td_dbgflags &= ~TDB_STOPATFORK; cv_broadcast(&p->p_dbgwait); @@ -2726,7 +2738,20 @@ issignal(struct thread *td) SIG_STOPSIGMASK(sigpending); if (SIGISEMPTY(sigpending)) /* no signal to send */ return (0); - sig = sig_ffs(&sigpending); + if ((p->p_flag & (P_TRACED | P_PPTRACE)) == P_TRACED && + (p->p_flag2 & P2_PTRACE_FSTP) != 0 && + SIGISMEMBER(sigpending, SIGSTOP)) { + /* + * If debugger just attached, always consume + * SIGSTOP from ptrace(PT_ATTACH) first, to + * execute the debugger attach ritual in + * order. + */ + sig = SIGSTOP; + td->td_dbgflags |= TDB_FSTP; + } else { + sig = sig_ffs(&sigpending); + } if (p->p_stops & S_SIG) { mtx_unlock(&ps->ps_mtx); @@ -2743,7 +2768,7 @@ issignal(struct thread *td) sigqueue_delete(&p->p_sigqueue, sig); continue; } - if (p->p_flag & P_TRACED && (p->p_flag & P_PPTRACE) == 0) { + if ((p->p_flag & (P_TRACED | P_PPTRACE)) == P_TRACED) { /* * If traced, always stop. * Remove old signal from queue before the stop. @@ -2846,6 +2871,8 @@ issignal(struct thread *td) mtx_unlock(&ps->ps_mtx); WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &p->p_mtx.lock_object, "Catching SIGSTOP"); + sigqueue_delete(&td->td_sigqueue, sig); + sigqueue_delete(&p->p_sigqueue, sig); p->p_flag |= P_STOPPED_SIG; p->p_xsig = sig; PROC_SLOCK(p); @@ -2853,7 +2880,7 @@ issignal(struct thread *td) thread_suspend_switch(td, p); PROC_SUNLOCK(p); mtx_lock(&ps->ps_mtx); - break; + goto next; } else if (prop & SA_IGNORE) { /* * Except for SIGCONT, shouldn't get here. @@ -2884,6 +2911,7 @@ issignal(struct thread *td) } sigqueue_delete(&td->td_sigqueue, sig); /* take the signal! */ sigqueue_delete(&p->p_sigqueue, sig); +next:; } /* NOTREACHED */ } Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Thu Jul 28 06:46:10 2016 (r303422) +++ head/sys/kern/sys_process.c Thu Jul 28 08:41:13 2016 (r303423) @@ -692,6 +692,17 @@ sys_ptrace(struct thread *td, struct ptr #define PROC_WRITE(w, t, a) proc_write_ ## w (t, a) #endif +void +proc_set_traced(struct proc *p) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + p->p_flag |= P_TRACED; + p->p_flag2 |= P2_PTRACE_FSTP; + p->p_ptevents = PTRACE_DEFAULT; + p->p_oppid = p->p_pptr->p_pid; +} + int kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data) { @@ -899,11 +910,9 @@ kern_ptrace(struct thread *td, int req, switch (req) { case PT_TRACE_ME: /* set my trace flag and "owner" so it can read/write me */ - p->p_flag |= P_TRACED; - p->p_ptevents = PTRACE_DEFAULT; + proc_set_traced(p); if (p->p_flag & P_PPWAIT) p->p_flag |= P_PPTRACE; - p->p_oppid = p->p_pptr->p_pid; CTR1(KTR_PTRACE, "PT_TRACE_ME: pid %d", p->p_pid); break; @@ -918,9 +927,7 @@ kern_ptrace(struct thread *td, int req, * The old parent is remembered so we can put things back * on a "detach". */ - p->p_flag |= P_TRACED; - p->p_ptevents = PTRACE_DEFAULT; - p->p_oppid = p->p_pptr->p_pid; + proc_set_traced(p); if (p->p_pptr != td->td_proc) { proc_reparent(p, td->td_proc); } @@ -1088,6 +1095,17 @@ kern_ptrace(struct thread *td, int req, p->p_pid, data); p->p_oppid = 0; p->p_ptevents = 0; + FOREACH_THREAD_IN_PROC(p, td3) { + if ((td3->td_dbgflags & TDB_FSTP) != 0) { + sigqueue_delete(&td3->td_sigqueue, + SIGSTOP); + } + td3->td_dbgflags &= ~(TDB_XSIG | TDB_FSTP); + } + if ((p->p_flag2 & P2_PTRACE_FSTP) != 0) { + sigqueue_delete(&p->p_sigqueue, SIGSTOP); + p->p_flag2 &= ~P2_PTRACE_FSTP; + } /* should we send SIGCHLD? */ /* childproc_continued(p); */ @@ -1108,7 +1126,7 @@ kern_ptrace(struct thread *td, int req, if (req == PT_DETACH) { FOREACH_THREAD_IN_PROC(p, td3) - td3->td_dbgflags &= ~TDB_SUSPEND; + td3->td_dbgflags &= ~TDB_SUSPEND; } /* * unsuspend all threads, to not let a thread run, Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Jul 28 06:46:10 2016 (r303422) +++ head/sys/sys/proc.h Thu Jul 28 08:41:13 2016 (r303423) @@ -423,6 +423,7 @@ do { \ #define TDB_BORN 0x00000200 /* New LWP indicator for ptrace() */ #define TDB_EXIT 0x00000400 /* Exiting LWP indicator for ptrace() */ #define TDB_VFORK 0x00000800 /* vfork indicator for ptrace() */ +#define TDB_FSTP 0x00001000 /* The thread is PT_ATTACH leader */ /* * "Private" flags kept in td_pflags: @@ -713,6 +714,7 @@ struct proc { #define P2_NOTRACE 0x00000002 /* No ptrace(2) attach or coredumps. */ #define P2_NOTRACE_EXEC 0x00000004 /* Keep P2_NOPTRACE on exec(2). */ #define P2_AST_SU 0x00000008 /* Handles SU ast for kthreads. */ +#define P2_PTRACE_FSTP 0x00000010 /* SIGSTOP from PT_ATTACH not yet handled. */ /* Flags protected by proctree_lock, kept in p_treeflags. */ #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ @@ -1003,6 +1005,7 @@ void proc_linkup(struct proc *p, struct struct proc *proc_realparent(struct proc *child); void proc_reap(struct thread *td, struct proc *p, int *status, int options); void proc_reparent(struct proc *child, struct proc *newparent); +void proc_set_traced(struct proc *p); struct pstats *pstats_alloc(void); void pstats_fork(struct pstats *src, struct pstats *dst); void pstats_free(struct pstats *ps); From owner-svn-src-all@freebsd.org Thu Jul 28 08:53:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59AD7BA669A; Thu, 28 Jul 2016 08:53:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F0EA1AAF; Thu, 28 Jul 2016 08:53:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6S8rcSB062547; Thu, 28 Jul 2016 08:53:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6S8rc9n062546; Thu, 28 Jul 2016 08:53:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607280853.u6S8rc9n062546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Jul 2016 08:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303424 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 08:53:39 -0000 Author: kib Date: Thu Jul 28 08:53:38 2016 New Revision: 303424 URL: https://svnweb.freebsd.org/changeset/base/303424 Log: Fix typo in comment. MFC after: 3 days Modified: head/sys/sys/proc.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Jul 28 08:41:13 2016 (r303423) +++ head/sys/sys/proc.h Thu Jul 28 08:53:38 2016 (r303424) @@ -742,7 +742,7 @@ struct proc { #define SW_TYPE_MASK 0xff /* First 8 bits are switch type */ #define SWT_NONE 0 /* Unspecified switch. */ #define SWT_PREEMPT 1 /* Switching due to preemption. */ -#define SWT_OWEPREEMPT 2 /* Switching due to opepreempt. */ +#define SWT_OWEPREEMPT 2 /* Switching due to owepreempt. */ #define SWT_TURNSTILE 3 /* Turnstile contention. */ #define SWT_SLEEPQ 4 /* Sleepq wait. */ #define SWT_SLEEPQTIMO 5 /* Sleepq timeout wait. */ From owner-svn-src-all@freebsd.org Thu Jul 28 08:57:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0250FBA670E; Thu, 28 Jul 2016 08:57:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD8F91C55; Thu, 28 Jul 2016 08:57:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6S8v1uW062726; Thu, 28 Jul 2016 08:57:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6S8v1w3062722; Thu, 28 Jul 2016 08:57:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607280857.u6S8v1w3062722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Jul 2016 08:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303425 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 08:57:03 -0000 Author: kib Date: Thu Jul 28 08:57:01 2016 New Revision: 303425 URL: https://svnweb.freebsd.org/changeset/base/303425 Log: Extract the calculation of the callout fire time into the new function callout_when(9). See the man page update for the description of the intended use. Tested by: pho Reviewed by: jhb, bjk (man page updates) Sponsored by: The FreeBSD Foundation MFC after: 1 month X-Differential revision: https://reviews.freebsd.org/D7137 Modified: head/share/man/man9/Makefile head/share/man/man9/timeout.9 head/sys/kern/kern_timeout.c head/sys/sys/callout.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Jul 28 08:53:38 2016 (r303424) +++ head/share/man/man9/Makefile Thu Jul 28 08:57:01 2016 (r303425) @@ -1766,6 +1766,7 @@ MLINKS+=timeout.9 callout.9 \ timeout.9 callout_schedule_sbt_curcpu.9 \ timeout.9 callout_schedule_sbt_on.9 \ timeout.9 callout_stop.9 \ + timeout.9 callout_when.9 \ timeout.9 untimeout.9 MLINKS+=ucred.9 cred_update_thread.9 \ ucred.9 crcopy.9 \ Modified: head/share/man/man9/timeout.9 ============================================================================== --- head/share/man/man9/timeout.9 Thu Jul 28 08:53:38 2016 (r303424) +++ head/share/man/man9/timeout.9 Thu Jul 28 08:57:01 2016 (r303425) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2016 +.Dd July 27, 2016 .Dt TIMEOUT 9 .Os .Sh NAME @@ -56,6 +56,7 @@ .Nm callout_schedule_sbt_curcpu , .Nm callout_schedule_sbt_on , .Nm callout_stop , +.Nm callout_when , .Nm timeout , .Nm untimeout .Nd execute a function after a specified length of time @@ -91,20 +92,48 @@ struct callout_handle handle = CALLOUT_H .Ft int .Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg" .Ft int -.Fn callout_reset_curcpu "struct callout *c" "int ticks" "timeout_t *func" \ -"void *arg" -.Ft int -.Fn callout_reset_on "struct callout *c" "int ticks" "timeout_t *func" \ -"void *arg" "int cpu" -.Ft int -.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" -.Ft int -.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" -.Ft int -.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "timeout_t *func" "void *arg" "int cpu" "int flags" +.Fo callout_reset_curcpu +.Fa "struct callout *c" +.Fa "int ticks" +.Fa "timeout_t *func" +.Fa "void *arg" +.Fc +.Ft int +.Fo callout_reset_on +.Fa "struct callout *c" +.Fa "int ticks" +.Fa "timeout_t *func" +.Fa "void *arg" +.Fa "int cpu" +.Fc +.Ft int +.Fo callout_reset_sbt +.Fa "struct callout *c" +.Fa "sbintime_t sbt" +.Fa "sbintime_t pr" +.Fa "timeout_t *func" +.Fa "void *arg" +.Fa "int flags" +.Fc +.Ft int +.Fo callout_reset_sbt_curcpu +.Fa "struct callout *c" +.Fa "sbintime_t sbt" +.Fa "sbintime_t pr" +.Fa "timeout_t *func" +.Fa "void *arg" +.Fa "int flags" +.Fc +.Ft int +.Fo callout_reset_sbt_on +.Fa "struct callout *c" +.Fa "sbintime_t sbt" +.Fa "sbintime_t pr" +.Fa "timeout_t *func" +.Fa "void *arg" +.Fa "int cpu" +.Fa "int flags" +.Fc .Ft int .Fn callout_schedule "struct callout *c" "int ticks" .Ft int @@ -112,16 +141,37 @@ struct callout_handle handle = CALLOUT_H .Ft int .Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" .Ft int -.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "int flags" -.Ft int -.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "int flags" -.Ft int -.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "int cpu" "int flags" +.Fo callout_schedule_sbt +.Fa "struct callout *c" +.Fa "sbintime_t sbt" +.Fa "sbintime_t pr" +.Fa "int flags" +.Fc +.Ft int +.Fo callout_schedule_sbt_curcpu +.Fa "struct callout *c" +.Fa "sbintime_t sbt" +.Fa "sbintime_t pr" +.Fa "int flags" +.Fc +.Ft int +.Fo callout_schedule_sbt_on +.Fa "struct callout *c" +.Fa "sbintime_t sbt" +.Fa "sbintime_t pr" +.Fa "int cpu" +.Fa "int flags" +.Fc .Ft int .Fn callout_stop "struct callout *c" +.Ft sbintime_t +.Fo callout_when +.Fa "sbintime_t sbt" +.Fa "sbintime_t precision" +.Fa "int flags" +.Fa "sbintime_t *sbt_res" +.Fa "sbintime_t *precision_res" +.Fc .Ft struct callout_handle .Fn timeout "timeout_t *func" "void *arg" "int ticks" .Ft void @@ -387,6 +437,26 @@ or this value is used as the length of t Smaller values .Pq which result in larger time intervals allow the callout subsystem to aggregate more events in one timer interrupt. +.It Dv C_PRECALC +The +.Fa sbt +argument specifies the absolute time at which the callout should be run, +and the +.Fa pr +argument specifies the requested precision, which will not be +adjusted during the scheduling process. +The +.Fa sbt +and +.Fa pr +values should be calculated by an earlier call to +.Fn callout_when +which uses the user-supplied +.Fa sbt , +.Fa pr , +and +.Fa flags +values. .It Dv C_HARDCLOCK Align the timeouts to .Fn hardclock @@ -503,6 +573,39 @@ but it .Em does not clear it when a callout expires normally via the execution of the callout function. +.Pp +The +.Fn callout_when +function may be used to pre-calculate the absolute time at which the +timeout should be run and the precision of the scheduled run time +according to the required time +.Fa sbt , +precision +.Fa precision , +and additional adjustments requested by the +.Fa flags +argument. +Flags accepted by the +.Fn callout_when +function are the same as flags for the +.Fn callout_reset +function. +The resulting time is assigned to the variable pointed to by the +.Fa sbt_res +argument, and the resulting precision is assigned to +.Fa *precision_res . +When passing the results to +.Fa callout_reset , +add the +.Va C_PRECALC +flag to +.Fa flags , +to avoid incorrect re-adjustment. +The function is intended for situations where precise time of the callout +run should be known in advance, since +trying to read this time from the callout structure itself after a +.Fn callout_reset +call is racy. .Ss "Avoiding Race Conditions" The callout subsystem invokes callout functions from its own thread context. Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Thu Jul 28 08:53:38 2016 (r303424) +++ head/sys/kern/kern_timeout.c Thu Jul 28 08:57:01 2016 (r303425) @@ -945,6 +945,56 @@ callout_handle_init(struct callout_handl handle->callout = NULL; } +void +callout_when(sbintime_t sbt, sbintime_t precision, int flags, + sbintime_t *res, sbintime_t *prec_res) +{ + sbintime_t to_sbt, to_pr; + + if ((flags & (C_ABSOLUTE | C_PRECALC)) != 0) { + *res = sbt; + *prec_res = precision; + return; + } + if ((flags & C_HARDCLOCK) != 0 && sbt < tick_sbt) + sbt = tick_sbt; + if ((flags & C_HARDCLOCK) != 0 || +#ifdef NO_EVENTTIMERS + sbt >= sbt_timethreshold) { + to_sbt = getsbinuptime(); + + /* Add safety belt for the case of hz > 1000. */ + to_sbt += tc_tick_sbt - tick_sbt; +#else + sbt >= sbt_tickthreshold) { + /* + * Obtain the time of the last hardclock() call on + * this CPU directly from the kern_clocksource.c. + * This value is per-CPU, but it is equal for all + * active ones. + */ +#ifdef __LP64__ + to_sbt = DPCPU_GET(hardclocktime); +#else + spinlock_enter(); + to_sbt = DPCPU_GET(hardclocktime); + spinlock_exit(); +#endif +#endif + if ((flags & C_HARDCLOCK) == 0) + to_sbt += tick_sbt; + } else + to_sbt = sbinuptime(); + if (SBT_MAX - to_sbt < sbt) + to_sbt = SBT_MAX; + else + to_sbt += sbt; + *res = to_sbt; + to_pr = ((C_PRELGET(flags) < 0) ? sbt >> tc_precexp : + sbt >> C_PRELGET(flags)); + *prec_res = to_pr > precision ? to_pr : precision; +} + /* * New interface; clients allocate their own callout structures. * @@ -962,10 +1012,10 @@ callout_handle_init(struct callout_handl * callout_deactivate() - marks the callout as having been serviced */ int -callout_reset_sbt_on(struct callout *c, sbintime_t sbt, sbintime_t precision, +callout_reset_sbt_on(struct callout *c, sbintime_t sbt, sbintime_t prec, void (*ftn)(void *), void *arg, int cpu, int flags) { - sbintime_t to_sbt, pr; + sbintime_t to_sbt, precision; struct callout_cpu *cc; int cancelled, direct; int ignore_cpu=0; @@ -978,47 +1028,8 @@ callout_reset_sbt_on(struct callout *c, /* Invalid CPU spec */ panic("Invalid CPU in callout %d", cpu); } - if (flags & C_ABSOLUTE) { - to_sbt = sbt; - } else { - if ((flags & C_HARDCLOCK) && (sbt < tick_sbt)) - sbt = tick_sbt; - if ((flags & C_HARDCLOCK) || -#ifdef NO_EVENTTIMERS - sbt >= sbt_timethreshold) { - to_sbt = getsbinuptime(); + callout_when(sbt, prec, flags, &to_sbt, &precision); - /* Add safety belt for the case of hz > 1000. */ - to_sbt += tc_tick_sbt - tick_sbt; -#else - sbt >= sbt_tickthreshold) { - /* - * Obtain the time of the last hardclock() call on - * this CPU directly from the kern_clocksource.c. - * This value is per-CPU, but it is equal for all - * active ones. - */ -#ifdef __LP64__ - to_sbt = DPCPU_GET(hardclocktime); -#else - spinlock_enter(); - to_sbt = DPCPU_GET(hardclocktime); - spinlock_exit(); -#endif -#endif - if ((flags & C_HARDCLOCK) == 0) - to_sbt += tick_sbt; - } else - to_sbt = sbinuptime(); - if (SBT_MAX - to_sbt < sbt) - to_sbt = SBT_MAX; - else - to_sbt += sbt; - pr = ((C_PRELGET(flags) < 0) ? sbt >> tc_precexp : - sbt >> C_PRELGET(flags)); - if (pr > precision) - precision = pr; - } /* * This flag used to be added by callout_cc_add, but the * first time you call this we could end up with the Modified: head/sys/sys/callout.h ============================================================================== --- head/sys/sys/callout.h Thu Jul 28 08:53:38 2016 (r303424) +++ head/sys/sys/callout.h Thu Jul 28 08:57:01 2016 (r303425) @@ -57,6 +57,7 @@ #define C_PRELGET(x) (int)((((x) >> 1) & C_PRELRANGE) - 1) #define C_HARDCLOCK 0x0100 /* align to hardclock() calls */ #define C_ABSOLUTE 0x0200 /* event time is absolute. */ +#define C_PRECALC 0x0400 /* event time is pre-calculated. */ struct callout_handle { struct callout *callout; @@ -129,6 +130,8 @@ int _callout_stop_safe(struct callout *, void callout_process(sbintime_t now); #define callout_async_drain(c, d) \ _callout_stop_safe(c, 0, d) +void callout_when(sbintime_t sbt, sbintime_t precision, int flags, + sbintime_t *sbt_res, sbintime_t *prec_res); #endif #endif /* _SYS_CALLOUT_H_ */ From owner-svn-src-all@freebsd.org Thu Jul 28 09:09:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C57D5BA6C22; Thu, 28 Jul 2016 09:09:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 965171310; Thu, 28 Jul 2016 09:09:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6S99t71066659; Thu, 28 Jul 2016 09:09:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6S99t01066655; Thu, 28 Jul 2016 09:09:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607280909.u6S99t01066655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Jul 2016 09:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303426 - in head/sys: ddb 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 09:09:56 -0000 Author: kib Date: Thu Jul 28 09:09:55 2016 New Revision: 303426 URL: https://svnweb.freebsd.org/changeset/base/303426 Log: Rewrite subr_sleepqueue.c use of callouts to not depend on the specifics of callout KPI. Esp., do not depend on the exact interface of callout_stop(9) return values. The main change is that instead of requiring precise callouts, code maintains absolute time to wake up. Callouts now should ensure that a wake occurs at the requested moment, but we can tolerate both run-away callout, and callout_stop(9) lying about running callout either way. As consequence, it removes the constant source of the bugs where sleepq_check_timeout() causes uninterruptible thread state where the thread is detached from CPU, see e.g. r234952 and r296320. Patch also removes dual meaning of the TDF_TIMEOUT flag, making code (IMO much) simpler to reason about. Tested by: pho Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D7137 Modified: head/sys/ddb/db_ps.c head/sys/kern/kern_thread.c head/sys/kern/subr_sleepqueue.c head/sys/sys/proc.h Modified: head/sys/ddb/db_ps.c ============================================================================== --- head/sys/ddb/db_ps.c Thu Jul 28 08:57:01 2016 (r303425) +++ head/sys/ddb/db_ps.c Thu Jul 28 09:09:55 2016 (r303426) @@ -375,8 +375,13 @@ DB_SHOW_COMMAND(thread, db_show_thread) db_printf(" lock: %s turnstile: %p\n", td->td_lockname, td->td_blocked); if (TD_ON_SLEEPQ(td)) - db_printf(" wmesg: %s wchan: %p\n", td->td_wmesg, - td->td_wchan); + db_printf( + " wmesg: %s wchan: %p sleeptimo %lx. %jx (curr %lx. %jx)\n", + td->td_wmesg, td->td_wchan, + (long)sbttobt(td->td_sleeptimo).sec, + (uintmax_t)sbttobt(td->td_sleeptimo).frac, + (long)sbttobt(sbinuptime()).sec, + (uintmax_t)sbttobt(sbinuptime()).frac); db_printf(" priority: %d\n", td->td_priority); db_printf(" container lock: %s (%p)\n", lock->lo_name, lock); if (td->td_swvoltick != 0) { Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Thu Jul 28 08:57:01 2016 (r303425) +++ head/sys/kern/kern_thread.c Thu Jul 28 09:09:55 2016 (r303426) @@ -318,7 +318,7 @@ thread_reap(void) /* * Don't even bother to lock if none at this instant, - * we really don't care about the next instant.. + * we really don't care about the next instant. */ if (!TAILQ_EMPTY(&zombie_threads)) { mtx_lock_spin(&zombie_lock); @@ -383,6 +383,7 @@ thread_free(struct thread *td) if (td->td_kstack != 0) vm_thread_dispose(td); vm_domain_policy_cleanup(&td->td_vm_dom_policy); + callout_drain(&td->td_slpcallout); uma_zfree(thread_zone, td); } @@ -580,6 +581,7 @@ thread_wait(struct proc *p) td->td_cpuset = NULL; cpu_thread_clean(td); thread_cow_free(td); + callout_drain(&td->td_slpcallout); thread_reap(); /* check for zombie threads etc. */ } Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Thu Jul 28 08:57:01 2016 (r303425) +++ head/sys/kern/subr_sleepqueue.c Thu Jul 28 09:09:55 2016 (r303426) @@ -378,6 +378,7 @@ sleepq_set_timeout_sbt(void *wchan, sbin { struct sleepqueue_chain *sc; struct thread *td; + sbintime_t pr1; td = curthread; sc = SC_LOOKUP(wchan); @@ -387,8 +388,14 @@ sleepq_set_timeout_sbt(void *wchan, sbin MPASS(wchan != NULL); if (cold) panic("timed sleep before timers are working"); - callout_reset_sbt_on(&td->td_slpcallout, sbt, pr, - sleepq_timeout, td, PCPU_GET(cpuid), flags | C_DIRECT_EXEC); + KASSERT(td->td_sleeptimo == 0, ("td %d %p td_sleeptimo %jx", + td->td_tid, td, (uintmax_t)td->td_sleeptimo)); + thread_lock(td); + callout_when(sbt, pr, flags, &td->td_sleeptimo, &pr1); + thread_unlock(td); + callout_reset_sbt_on(&td->td_slpcallout, td->td_sleeptimo, pr1, + sleepq_timeout, td, PCPU_GET(cpuid), flags | C_PRECALC | + C_DIRECT_EXEC); } /* @@ -576,37 +583,36 @@ static int sleepq_check_timeout(void) { struct thread *td; + int res; td = curthread; THREAD_LOCK_ASSERT(td, MA_OWNED); /* - * If TDF_TIMEOUT is set, we timed out. + * If TDF_TIMEOUT is set, we timed out. But recheck + * td_sleeptimo anyway. */ - if (td->td_flags & TDF_TIMEOUT) { - td->td_flags &= ~TDF_TIMEOUT; - return (EWOULDBLOCK); + res = 0; + if (td->td_sleeptimo != 0) { + if (td->td_sleeptimo <= sbinuptime()) + res = EWOULDBLOCK; + td->td_sleeptimo = 0; } - - /* - * If TDF_TIMOFAIL is set, the timeout ran after we had - * already been woken up. - */ - if (td->td_flags & TDF_TIMOFAIL) - td->td_flags &= ~TDF_TIMOFAIL; - - /* - * If callout_stop() fails, then the timeout is running on - * another CPU, so synchronize with it to avoid having it - * accidentally wake up a subsequent sleep. - */ - else if (_callout_stop_safe(&td->td_slpcallout, CS_EXECUTING, NULL) - == 0) { - td->td_flags |= TDF_TIMEOUT; - TD_SET_SLEEPING(td); - mi_switch(SW_INVOL | SWT_SLEEPQTIMO, NULL); - } - return (0); + if (td->td_flags & TDF_TIMEOUT) + td->td_flags &= ~TDF_TIMEOUT; + else + /* + * We ignore the situation where timeout subsystem was + * unable to stop our callout. The struct thread is + * type-stable, the callout will use the correct + * memory when running. The checks of the + * td_sleeptimo value in this function and in + * sleepq_timeout() ensure that the thread does not + * get spurious wakeups, even if the callout was reset + * or thread reused. + */ + callout_stop(&td->td_slpcallout); + return (res); } /* @@ -914,12 +920,17 @@ sleepq_timeout(void *arg) CTR3(KTR_PROC, "sleepq_timeout: thread %p (pid %ld, %s)", (void *)td, (long)td->td_proc->p_pid, (void *)td->td_name); - /* - * First, see if the thread is asleep and get the wait channel if - * it is. - */ thread_lock(td); - if (TD_IS_SLEEPING(td) && TD_ON_SLEEPQ(td)) { + + if (td->td_sleeptimo > sbinuptime() || td->td_sleeptimo == 0) { + /* + * The thread does not want a timeout (yet). + */ + } else if (TD_IS_SLEEPING(td) && TD_ON_SLEEPQ(td)) { + /* + * See if the thread is asleep and get the wait + * channel if it is. + */ wchan = td->td_wchan; sc = SC_LOOKUP(wchan); THREAD_LOCKPTR_ASSERT(td, &sc->sc_lock); @@ -927,40 +938,16 @@ sleepq_timeout(void *arg) MPASS(sq != NULL); td->td_flags |= TDF_TIMEOUT; wakeup_swapper = sleepq_resume_thread(sq, td, 0); - thread_unlock(td); - if (wakeup_swapper) - kick_proc0(); - return; - } - - /* - * If the thread is on the SLEEPQ but isn't sleeping yet, it - * can either be on another CPU in between sleepq_add() and - * one of the sleepq_*wait*() routines or it can be in - * sleepq_catch_signals(). - */ - if (TD_ON_SLEEPQ(td)) { + } else if (TD_ON_SLEEPQ(td)) { + /* + * If the thread is on the SLEEPQ but isn't sleeping + * yet, it can either be on another CPU in between + * sleepq_add() and one of the sleepq_*wait*() + * routines or it can be in sleepq_catch_signals(). + */ td->td_flags |= TDF_TIMEOUT; - thread_unlock(td); - return; } - /* - * Now check for the edge cases. First, if TDF_TIMEOUT is set, - * then the other thread has already yielded to us, so clear - * the flag and resume it. If TDF_TIMEOUT is not set, then the - * we know that the other thread is not on a sleep queue, but it - * hasn't resumed execution yet. In that case, set TDF_TIMOFAIL - * to let it know that the timeout has already run and doesn't - * need to be canceled. - */ - if (td->td_flags & TDF_TIMEOUT) { - MPASS(TD_IS_SLEEPING(td)); - td->td_flags &= ~TDF_TIMEOUT; - TD_CLR_SLEEPING(td); - wakeup_swapper = setrunnable(td); - } else - td->td_flags |= TDF_TIMOFAIL; thread_unlock(td); if (wakeup_swapper) kick_proc0(); Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Jul 28 08:57:01 2016 (r303425) +++ head/sys/sys/proc.h Thu Jul 28 09:09:55 2016 (r303426) @@ -282,6 +282,7 @@ struct thread { int td_no_sleeping; /* (k) Sleeping disabled count. */ int td_dom_rr_idx; /* (k) RR Numa domain selection. */ void *td_su; /* (k) FFS SU private */ + sbintime_t td_sleeptimo; /* (t) Sleep timeout. */ #define td_endzero td_sigmask /* Copied during fork1() or create_thread(). */ @@ -388,7 +389,7 @@ do { \ #define TDF_ALLPROCSUSP 0x00000200 /* suspended by SINGLE_ALLPROC */ #define TDF_BOUNDARY 0x00000400 /* Thread suspended at user boundary */ #define TDF_ASTPENDING 0x00000800 /* Thread has some asynchronous events. */ -#define TDF_TIMOFAIL 0x00001000 /* Timeout from sleep after we were awake. */ +#define TDF_UNUSED12 0x00001000 /* --available-- */ #define TDF_SBDRY 0x00002000 /* Stop only on usermode boundary. */ #define TDF_UPIBLOCKED 0x00004000 /* Thread blocked on user PI mutex. */ #define TDF_NEEDSUSPCHK 0x00008000 /* Thread may need to suspend. */ From owner-svn-src-all@freebsd.org Thu Jul 28 09:50:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AECB8BA7731; Thu, 28 Jul 2016 09:50:20 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BC19189E; Thu, 28 Jul 2016 09:50:20 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6S9oJYF081488; Thu, 28 Jul 2016 09:50:19 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6S9oJ2E081486; Thu, 28 Jul 2016 09:50:19 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607280950.u6S9oJ2E081486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Jul 2016 09:50:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303427 - in head/include: . xlocale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 09:50:20 -0000 Author: ed Date: Thu Jul 28 09:50:19 2016 New Revision: 303427 URL: https://svnweb.freebsd.org/changeset/base/303427 Log: Change type of MB_CUR_MAX and MB_CUR_MAX_L() to size_t. POSIX requires that MB_CUR_MAX expands to an expression of type size_t. It currently expands to an int. As these are already macros, don't change the underlying type of these functions. There is no ned to touch those. Differential Revision: https://reviews.freebsd.org/D6645 Modified: head/include/stdlib.h head/include/xlocale/_stdlib.h Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Thu Jul 28 09:09:55 2016 (r303426) +++ head/include/stdlib.h Thu Jul 28 09:50:19 2016 (r303427) @@ -77,7 +77,7 @@ __BEGIN_DECLS #endif extern int __mb_cur_max; extern int ___mb_cur_max(void); -#define MB_CUR_MAX (___mb_cur_max()) +#define MB_CUR_MAX ((size_t)___mb_cur_max()) _Noreturn void abort(void); int abs(int) __pure2; Modified: head/include/xlocale/_stdlib.h ============================================================================== --- head/include/xlocale/_stdlib.h Thu Jul 28 09:09:55 2016 (r303426) +++ head/include/xlocale/_stdlib.h Thu Jul 28 09:50:19 2016 (r303427) @@ -55,5 +55,5 @@ size_t wcstombs_l(char * __restrict, int wctomb_l(char *, wchar_t, locale_t); int ___mb_cur_max_l(locale_t); -#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) +#define MB_CUR_MAX_L(x) ((size_t)___mb_cur_max_l(x)) From owner-svn-src-all@freebsd.org Thu Jul 28 10:05:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBDBBBA7E61; Thu, 28 Jul 2016 10:05:42 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7157215E7; Thu, 28 Jul 2016 10:05:42 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SA5fA9088614; Thu, 28 Jul 2016 10:05:41 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SA5frW088611; Thu, 28 Jul 2016 10:05:41 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607281005.u6SA5frW088611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Jul 2016 10:05:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303428 - in head: include 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 10:05:42 -0000 Author: ed Date: Thu Jul 28 10:05:41 2016 New Revision: 303428 URL: https://svnweb.freebsd.org/changeset/base/303428 Log: Add NI_NUMERICSCOPE. POSIX also declares NI_NUMERICSCOPE, which makes getnameinfo() return a numerical scope identifier. The interesting thing is that support for this is already present in code, but #ifdef disabled. Expose this functionality by placing a definition for it in . While there, remove references to NI_WITHSCOPEID, as that got removed 11 years ago. Modified: head/include/netdb.h head/lib/libc/net/getnameinfo.3 head/lib/libc/net/getnameinfo.c Modified: head/include/netdb.h ============================================================================== --- head/include/netdb.h Thu Jul 28 09:50:19 2016 (r303427) +++ head/include/netdb.h Thu Jul 28 10:05:41 2016 (r303428) @@ -214,9 +214,7 @@ struct addrinfo { #define NI_NAMEREQD 0x00000004 #define NI_NUMERICSERV 0x00000008 #define NI_DGRAM 0x00000010 -#if 0 /* obsolete */ -#define NI_WITHSCOPEID 0x00000020 -#endif +#define NI_NUMERICSCOPE 0x00000020 /* * Scope delimit character Modified: head/lib/libc/net/getnameinfo.3 ============================================================================== --- head/lib/libc/net/getnameinfo.3 Thu Jul 28 09:50:19 2016 (r303427) +++ head/lib/libc/net/getnameinfo.3 Thu Jul 28 10:05:41 2016 (r303428) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 20, 2015 +.Dd July 28, 2016 .Dt GETNAMEINFO 3 .Os .Sh NAME @@ -111,7 +111,7 @@ The argument is formed by .Tn OR Ns 'ing the following values: -.Bl -tag -width "NI_NUMERICHOSTXX" +.Bl -tag -width "NI_NUMERICSCOPEXX" .It Dv NI_NOFQDN A fully qualified domain name is not required for local hosts. The local part of the fully qualified domain name is returned instead. @@ -127,6 +127,8 @@ If the host name is not found and the fl address is returned in numeric form. .It NI_NUMERICSERV The service name is returned as a digit string representing the port number. +.It NI_NUMERICSCOPE +The scope identifier is returned as a digit string. .It NI_DGRAM Specifies that the service being looked up is a datagram service, and causes Modified: head/lib/libc/net/getnameinfo.c ============================================================================== --- head/lib/libc/net/getnameinfo.c Thu Jul 28 09:50:19 2016 (r303427) +++ head/lib/libc/net/getnameinfo.c Thu Jul 28 10:05:41 2016 (r303428) @@ -378,7 +378,6 @@ ip6_sa2str(const struct sockaddr_in6 *sa ifindex = (unsigned int)sa6->sin6_scope_id; a6 = &sa6->sin6_addr; -#ifdef NI_NUMERICSCOPE if ((flags & NI_NUMERICSCOPE) != 0) { n = snprintf(buf, bufsiz, "%u", sa6->sin6_scope_id); if (n < 0 || n >= bufsiz) @@ -386,7 +385,6 @@ ip6_sa2str(const struct sockaddr_in6 *sa else return n; } -#endif /* if_indextoname() does not take buffer size. not a good api... */ if ((IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6) || From owner-svn-src-all@freebsd.org Thu Jul 28 10:10:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8456ABA7FB9; Thu, 28 Jul 2016 10:10:20 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 545591852; Thu, 28 Jul 2016 10:10:20 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from zapp (bcdf0033.skybroadband.com [188.223.0.51]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id AABABD78E6; Thu, 28 Jul 2016 10:10:13 +0000 (UTC) Date: Thu, 28 Jul 2016 11:10:10 +0100 From: Andrew Turner To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r303380 - in vendor/device-tree/dist: Bindings Bindings/arc Bindings/arm Bindings/arm/altera Bindings/arm/bcm Bindings/arm/hisilicon Bindings/arm/keystone Bindings/arm/marvell Bindings/... Message-ID: <20160728111010.05dd2c38@zapp> In-Reply-To: <201607280249.u6S2nGWT005937@slippy.cwsent.com> References: <201607271033.u6RAXkeI063443@repo.freebsd.org> <201607280249.u6S2nGWT005937@slippy.cwsent.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 10:10:20 -0000 On Wed, 27 Jul 2016 19:49:16 -0700 Cy Schubert wrote: > In message <201607271033.u6RAXkeI063443@repo.freebsd.org>, Andrew > Turner writes > : > > Author: andrew > > Date: Wed Jul 27 10:33:45 2016 > > New Revision: 303380 > > URL: https://svnweb.freebsd.org/changeset/base/303380 > > > > Log: > > Import the updated devicetree files from > > https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebas > > ing.git > > I don't see this used anywhere in head (though I must admit I haven't > looked that hard). Considering this is GPL, what do we intend to do > with this? (Once again, I haven't really looked that hard but I can't > see it used anywhere.) It is used in sys/gnu/dts. Andrew From owner-svn-src-all@freebsd.org Thu Jul 28 10:48:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7F4DBA7ABC; Thu, 28 Jul 2016 10:48:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7289A13DE; Thu, 28 Jul 2016 10:48:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SAmKYF004067; Thu, 28 Jul 2016 10:48:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SAmK3l004061; Thu, 28 Jul 2016 10:48:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607281048.u6SAmK3l004061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 28 Jul 2016 10:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303429 - in head: share/man/man4 sys/dev/ntb sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 10:48:22 -0000 Author: mav Date: Thu Jul 28 10:48:20 2016 New Revision: 303429 URL: https://svnweb.freebsd.org/changeset/base/303429 Log: Once more refactor KPI between NTB hardware and consumers. New design allows hardware resources to be split between several consumers. For example, one BAR can be dedicated for remote memory access, while other resources can be used for packet transport for virtual Ethernet interface. And even without resource split, this code allows to specify which consumer driver should attach the hardware. From some points this makes the code even closer to Linux one, even though Linux does not provide the described flexibility. Modified: head/share/man/man4/ntb_hw.4 head/sys/dev/ntb/ntb.c head/sys/dev/ntb/ntb.h head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_if.m head/sys/dev/ntb/ntb_transport.c Modified: head/share/man/man4/ntb_hw.4 ============================================================================== --- head/share/man/man4/ntb_hw.4 Thu Jul 28 10:05:41 2016 (r303428) +++ head/share/man/man4/ntb_hw.4 Thu Jul 28 10:48:20 2016 (r303429) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 10, 2016 +.Dd July 28, 2016 .Dt NTB_HW 4 .Os .Sh NAME @@ -51,6 +51,20 @@ The following tunables are settable from .It Va hw.ntb.debug_level Driver debug level. The default value is 0, higher means more verbose. +.It Va hint.ntb_hw. Ns Ar X Ns Va .config +Configures NTB resources split between several consumer devices. +Configuration of multiple consumer devices separated by commas. +Each device can be configured as: "[:[:[:]]]", where: +.Va name +is a name of the driver which should attach the device (empty means any), +.Va mw +is a number of memory windows to allocate (empty means all available), +.Va spad +is a number of scratchpad registers to allocate (empty means all available), +.Va db +is a number of doorbells to allocate (empty means all available). +The default configuration is empty string, which means single device +with all available resources allowing any driver attachment. .El .Sh DESCRIPTION The NTB allows you to connect two computer systems using a PCIe link if they @@ -69,7 +83,7 @@ The hardware provides 2-3 memory windows On Xeon processors one of memory windows is typically consumed by the driver to workaround multiple hardware erratas. .Sh CONFIGURATION -Tne NTB configuration should be set by BIOS. +The NTB configuration should be set by BIOS. It includes enabling NTB, choosing between NTB-to-NTB or NTB-to-Root Port mode, enabling split BAR mode (one of two 64-bit BARs can be split into two 32-bit ones) and configuring BAR sizes in bits (from 12 to 29/39) for both NTB sides. Modified: head/sys/dev/ntb/ntb.c ============================================================================== --- head/sys/dev/ntb/ntb.c Thu Jul 28 10:05:41 2016 (r303428) +++ head/sys/dev/ntb/ntb.c Thu Jul 28 10:48:20 2016 (r303429) @@ -31,6 +31,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -39,4 +41,422 @@ __FBSDID("$FreeBSD$"); devclass_t ntb_hw_devclass; SYSCTL_NODE(_hw, OID_AUTO, ntb, CTLFLAG_RW, 0, "NTB sysctls"); +struct ntb_child { + device_t dev; + int enabled; + int mwoff; + int mwcnt; + int spadoff; + int spadcnt; + int dboff; + int dbmask; + void *ctx; + const struct ntb_ctx_ops *ctx_ops; + struct rmlock ctx_lock; + struct ntb_child *next; +}; + +int +ntb_register_device(device_t dev) +{ + struct ntb_child **cpp = device_get_softc(dev); + struct ntb_child *nc; + int i, mw, mwu, mwt, spad, spadu, spadt, db, dbu, dbt; + char cfg[128] = ""; + char buf[32]; + char *n, *np, *c, *p, *name; + + mwu = 0; + mwt = NTB_MW_COUNT(dev); + spadu = 0; + spadt = NTB_SPAD_COUNT(dev); + dbu = 0; + dbt = flsll(NTB_DB_VALID_MASK(dev)); + + device_printf(dev, "%d memory windows, %d scratchpads, " + "%d doorbells\n", mwt, spadt, dbt); + + snprintf(buf, sizeof(buf), "hint.%s.%d.config", device_get_name(dev), + device_get_unit(dev)); + TUNABLE_STR_FETCH(buf, cfg, sizeof(cfg)); + n = cfg; + i = 0; + while ((c = strsep(&n, ",")) != NULL) { + np = c; + name = strsep(&np, ":"); + if (name != NULL && name[0] == 0) + name = NULL; + p = strsep(&np, ":"); + mw = (p && p[0] != 0) ? strtol(p, NULL, 10) : mwt - mwu; + p = strsep(&np, ":"); + spad = (p && p[0] != 0) ? strtol(p, NULL, 10) : spadt - spadu; + db = (np && np[0] != 0) ? strtol(np, NULL, 10) : dbt - dbu; + + if (mw > mwt - mwu || spad > spadt - spadu || db > dbt - dbu) { + device_printf(dev, "Not enough resources for config\n"); + break; + } + + nc = malloc(sizeof(*nc), M_DEVBUF, M_WAITOK | M_ZERO); + nc->mwoff = mwu; + nc->mwcnt = mw; + nc->spadoff = spadu; + nc->spadcnt = spad; + nc->dboff = dbu; + nc->dbmask = (db == 0) ? 0 : (0xffffffffffffffff >> (64 - db)); + rm_init(&nc->ctx_lock, "ntb ctx"); + nc->dev = device_add_child(dev, name, -1); + if (nc->dev == NULL) { + ntb_unregister_device(dev); + return (ENOMEM); + } + device_set_ivars(nc->dev, nc); + *cpp = nc; + cpp = &nc->next; + + if (bootverbose) { + device_printf(dev, "%d \"%s\":", i, name); + if (mw > 0) { + printf(" memory windows %d", mwu); + if (mw > 1) + printf("-%d", mwu + mw - 1); + } + if (spad > 0) { + printf(" scratchpads %d", spadu); + if (spad > 1) + printf("-%d", spadu + spad - 1); + } + if (db > 0) { + printf(" doorbells %d", dbu); + if (db > 1) + printf("-%d", dbu + db - 1); + } + printf("\n"); + } + + mwu += mw; + spadu += spad; + dbu += db; + i++; + } + + bus_generic_attach(dev); + return (0); +} + +int +ntb_unregister_device(device_t dev) +{ + struct ntb_child **cpp = device_get_softc(dev); + struct ntb_child *nc; + int error = 0; + + while ((nc = *cpp) != NULL) { + *cpp = (*cpp)->next; + error = device_delete_child(dev, nc->dev); + if (error) + break; + rm_destroy(&nc->ctx_lock); + free(nc, M_DEVBUF); + } + return (error); +} + +void +ntb_link_event(device_t dev) +{ + struct ntb_child **cpp = device_get_softc(dev); + struct ntb_child *nc; + struct rm_priotracker ctx_tracker; + + for (nc = *cpp; nc != NULL; nc = nc->next) { + rm_rlock(&nc->ctx_lock, &ctx_tracker); + if (nc->ctx_ops != NULL && nc->ctx_ops->link_event != NULL) + nc->ctx_ops->link_event(nc->ctx); + rm_runlock(&nc->ctx_lock, &ctx_tracker); + } +} + +void +ntb_db_event(device_t dev, uint32_t vec) +{ + struct ntb_child **cpp = device_get_softc(dev); + struct ntb_child *nc; + struct rm_priotracker ctx_tracker; + + for (nc = *cpp; nc != NULL; nc = nc->next) { + rm_rlock(&nc->ctx_lock, &ctx_tracker); + if (nc->ctx_ops != NULL && nc->ctx_ops->db_event != NULL) + nc->ctx_ops->db_event(nc->ctx, vec); + rm_runlock(&nc->ctx_lock, &ctx_tracker); + } +} + +bool +ntb_link_is_up(device_t ntb, enum ntb_speed *speed, enum ntb_width *width) +{ + + return (NTB_LINK_IS_UP(device_get_parent(ntb), speed, width)); +} + +int +ntb_link_enable(device_t ntb, enum ntb_speed speed, enum ntb_width width) +{ + struct ntb_child *nc = device_get_ivars(ntb); + struct ntb_child **cpp = device_get_softc(device_get_parent(nc->dev)); + struct ntb_child *nc1; + + for (nc1 = *cpp; nc1 != NULL; nc1 = nc->next) { + if (nc1->enabled) { + nc->enabled = 1; + return (0); + } + } + nc->enabled = 1; + return (NTB_LINK_ENABLE(device_get_parent(ntb), speed, width)); +} + +int +ntb_link_disable(device_t ntb) +{ + struct ntb_child *nc = device_get_ivars(ntb); + struct ntb_child **cpp = device_get_softc(device_get_parent(nc->dev)); + struct ntb_child *nc1; + + if (!nc->enabled) + return (0); + nc->enabled = 0; + for (nc1 = *cpp; nc1 != NULL; nc1 = nc->next) { + if (nc1->enabled) + return (0); + } + return (NTB_LINK_DISABLE(device_get_parent(ntb))); +} + +bool +ntb_link_enabled(device_t ntb) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (nc->enabled && NTB_LINK_ENABLED(device_get_parent(ntb))); +} + +int +ntb_set_ctx(device_t ntb, void *ctx, const struct ntb_ctx_ops *ctx_ops) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + if (ctx == NULL || ctx_ops == NULL) + return (EINVAL); + + rm_wlock(&nc->ctx_lock); + if (nc->ctx_ops != NULL) { + rm_wunlock(&nc->ctx_lock); + return (EINVAL); + } + nc->ctx = ctx; + nc->ctx_ops = ctx_ops; + rm_wunlock(&nc->ctx_lock); + + return (0); +} + +void * +ntb_get_ctx(device_t ntb, const struct ntb_ctx_ops **ctx_ops) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + KASSERT(nc->ntb_ctx != NULL && nc->ctx_ops != NULL, ("bogus")); + if (ctx_ops != NULL) + *ctx_ops = nc->ctx_ops; + return (nc->ctx); +} + +void +ntb_clear_ctx(device_t ntb) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + rm_wlock(&nc->ctx_lock); + nc->ctx = NULL; + nc->ctx_ops = NULL; + rm_wunlock(&nc->ctx_lock); +} + +uint8_t +ntb_mw_count(device_t ntb) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (nc->mwcnt); +} + +int +ntb_mw_get_range(device_t ntb, unsigned mw_idx, vm_paddr_t *base, + caddr_t *vbase, size_t *size, size_t *align, size_t *align_size, + bus_addr_t *plimit) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_MW_GET_RANGE(device_get_parent(ntb), mw_idx + nc->mwoff, + base, vbase, size, align, align_size, plimit)); +} + +int +ntb_mw_set_trans(device_t ntb, unsigned mw_idx, bus_addr_t addr, size_t size) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_MW_SET_TRANS(device_get_parent(ntb), mw_idx + nc->mwoff, + addr, size)); +} + +int +ntb_mw_clear_trans(device_t ntb, unsigned mw_idx) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_MW_CLEAR_TRANS(device_get_parent(ntb), mw_idx + nc->mwoff)); +} + +int +ntb_mw_get_wc(device_t ntb, unsigned mw_idx, vm_memattr_t *mode) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_MW_GET_WC(device_get_parent(ntb), mw_idx + nc->mwoff, mode)); +} + +int +ntb_mw_set_wc(device_t ntb, unsigned mw_idx, vm_memattr_t mode) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_MW_SET_WC(device_get_parent(ntb), mw_idx + nc->mwoff, mode)); +} + +uint8_t +ntb_spad_count(device_t ntb) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (nc->spadcnt); +} + +void +ntb_spad_clear(device_t ntb) +{ + struct ntb_child *nc = device_get_ivars(ntb); + unsigned i; + + for (i = 0; i < nc->spadcnt; i++) + NTB_SPAD_WRITE(device_get_parent(ntb), i + nc->spadoff, 0); +} + +int +ntb_spad_write(device_t ntb, unsigned int idx, uint32_t val) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_SPAD_WRITE(device_get_parent(ntb), idx + nc->spadoff, val)); +} + +int +ntb_spad_read(device_t ntb, unsigned int idx, uint32_t *val) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_SPAD_READ(device_get_parent(ntb), idx + nc->spadoff, val)); +} + +int +ntb_peer_spad_write(device_t ntb, unsigned int idx, uint32_t val) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_PEER_SPAD_WRITE(device_get_parent(ntb), idx + nc->spadoff, + val)); +} + +int +ntb_peer_spad_read(device_t ntb, unsigned int idx, uint32_t *val) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_PEER_SPAD_READ(device_get_parent(ntb), idx + nc->spadoff, + val)); +} + +uint64_t +ntb_db_valid_mask(device_t ntb) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (nc->dbmask); +} + +int +ntb_db_vector_count(device_t ntb) +{ + + return (NTB_DB_VECTOR_COUNT(device_get_parent(ntb))); +} + +uint64_t +ntb_db_vector_mask(device_t ntb, uint32_t vector) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return ((NTB_DB_VECTOR_MASK(device_get_parent(ntb), vector) + >> nc->dboff) & nc->dbmask); +} + +int +ntb_peer_db_addr(device_t ntb, bus_addr_t *db_addr, vm_size_t *db_size) +{ + + return (NTB_PEER_DB_ADDR(device_get_parent(ntb), db_addr, db_size)); +} + +void +ntb_db_clear(device_t ntb, uint64_t bits) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_DB_CLEAR(device_get_parent(ntb), bits << nc->dboff)); +} + +void +ntb_db_clear_mask(device_t ntb, uint64_t bits) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_DB_CLEAR_MASK(device_get_parent(ntb), bits << nc->dboff)); +} + +uint64_t +ntb_db_read(device_t ntb) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return ((NTB_DB_READ(device_get_parent(ntb)) >> nc->dboff) + & nc->dbmask); +} + +void +ntb_db_set_mask(device_t ntb, uint64_t bits) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_DB_SET_MASK(device_get_parent(ntb), bits << nc->dboff)); +} + +void +ntb_peer_db_set(device_t ntb, uint64_t bits) +{ + struct ntb_child *nc = device_get_ivars(ntb); + + return (NTB_PEER_DB_SET(device_get_parent(ntb), bits << nc->dboff)); +} + MODULE_VERSION(ntb, 1); Modified: head/sys/dev/ntb/ntb.h ============================================================================== --- head/sys/dev/ntb/ntb.h Thu Jul 28 10:05:41 2016 (r303428) +++ head/sys/dev/ntb/ntb.h Thu Jul 28 10:48:20 2016 (r303429) @@ -34,4 +34,376 @@ extern devclass_t ntb_hw_devclass; SYSCTL_DECL(_hw_ntb); +int ntb_register_device(device_t ntb); +int ntb_unregister_device(device_t ntb); + +/* + * ntb_link_event() - notify driver context of a change in link status + * @ntb: NTB device context + * + * Notify the driver context that the link status may have changed. The driver + * should call intb_link_is_up() to get the current status. + */ +void ntb_link_event(device_t ntb); + +/* + * ntb_db_event() - notify driver context of a doorbell event + * @ntb: NTB device context + * @vector: Interrupt vector number + * + * Notify the driver context of a doorbell event. If hardware supports + * multiple interrupt vectors for doorbells, the vector number indicates which + * vector received the interrupt. The vector number is relative to the first + * vector used for doorbells, starting at zero, and must be less than + * ntb_db_vector_count(). The driver may call ntb_db_read() to check which + * doorbell bits need service, and ntb_db_vector_mask() to determine which of + * those bits are associated with the vector number. + */ +void ntb_db_event(device_t ntb, uint32_t vec); + +/* + * ntb_link_is_up() - get the current ntb link state + * @ntb: NTB device context + * @speed: OUT - The link speed expressed as PCIe generation number + * @width: OUT - The link width expressed as the number of PCIe lanes + * + * RETURNS: true or false based on the hardware link state + */ +bool ntb_link_is_up(device_t ntb, enum ntb_speed *speed, enum ntb_width *width); + +/* + * ntb_link_enable() - enable the link on the secondary side of the ntb + * @ntb: NTB device context + * @max_speed: The maximum link speed expressed as PCIe generation number[0] + * @max_width: The maximum link width expressed as the number of PCIe lanes[0] + * + * Enable the link on the secondary side of the ntb. This can only be done + * from the primary side of the ntb in primary or b2b topology. The ntb device + * should train the link to its maximum speed and width, or the requested speed + * and width, whichever is smaller, if supported. + * + * Return: Zero on success, otherwise an error number. + * + * [0]: Only NTB_SPEED_AUTO and NTB_WIDTH_AUTO are valid inputs; other speed + * and width input will be ignored. + */ +int ntb_link_enable(device_t ntb, enum ntb_speed speed, enum ntb_width width); + +/* + * ntb_link_disable() - disable the link on the secondary side of the ntb + * @ntb: NTB device context + * + * Disable the link on the secondary side of the ntb. This can only be done + * from the primary side of the ntb in primary or b2b topology. The ntb device + * should disable the link. Returning from this call must indicate that a + * barrier has passed, though with no more writes may pass in either direction + * across the link, except if this call returns an error number. + * + * Return: Zero on success, otherwise an error number. + */ +int ntb_link_disable(device_t ntb); + +/* + * get enable status of the link on the secondary side of the ntb + */ +bool ntb_link_enabled(device_t ntb); + +/* + * ntb_set_ctx() - associate a driver context with an ntb device + * @ntb: NTB device context + * @ctx: Driver context + * @ctx_ops: Driver context operations + * + * Associate a driver context and operations with a ntb device. The context is + * provided by the client driver, and the driver may associate a different + * context with each ntb device. + * + * Return: Zero if the context is associated, otherwise an error number. + */ +int ntb_set_ctx(device_t ntb, void *ctx, const struct ntb_ctx_ops *ctx_ops); + +/* + * ntb_set_ctx() - get a driver context associated with an ntb device + * @ntb: NTB device context + * @ctx_ops: Driver context operations + * + * Get a driver context and operations associated with a ntb device. + */ +void * ntb_get_ctx(device_t ntb, const struct ntb_ctx_ops **ctx_ops); + +/* + * ntb_clear_ctx() - disassociate any driver context from an ntb device + * @ntb: NTB device context + * + * Clear any association that may exist between a driver context and the ntb + * device. + */ +void ntb_clear_ctx(device_t ntb); + +/* + * ntb_mw_count() - Get the number of memory windows available for KPI + * consumers. + * + * (Excludes any MW wholly reserved for register access.) + */ +uint8_t ntb_mw_count(device_t ntb); + +/* + * ntb_mw_get_range() - get the range of a memory window + * @ntb: NTB device context + * @idx: Memory window number + * @base: OUT - the base address for mapping the memory window + * @size: OUT - the size for mapping the memory window + * @align: OUT - the base alignment for translating the memory window + * @align_size: OUT - the size alignment for translating the memory window + * + * Get the range of a memory window. NULL may be given for any output + * parameter if the value is not needed. The base and size may be used for + * mapping the memory window, to access the peer memory. The alignment and + * size may be used for translating the memory window, for the peer to access + * memory on the local system. + * + * Return: Zero on success, otherwise an error number. + */ +int ntb_mw_get_range(device_t ntb, unsigned mw_idx, vm_paddr_t *base, + caddr_t *vbase, size_t *size, size_t *align, size_t *align_size, + bus_addr_t *plimit); + +/* + * ntb_mw_set_trans() - set the translation of a memory window + * @ntb: NTB device context + * @idx: Memory window number + * @addr: The dma address local memory to expose to the peer + * @size: The size of the local memory to expose to the peer + * + * Set the translation of a memory window. The peer may access local memory + * through the window starting at the address, up to the size. The address + * must be aligned to the alignment specified by ntb_mw_get_range(). The size + * must be aligned to the size alignment specified by ntb_mw_get_range(). The + * address must be below the plimit specified by ntb_mw_get_range() (i.e. for + * 32-bit BARs). + * + * Return: Zero on success, otherwise an error number. + */ +int ntb_mw_set_trans(device_t ntb, unsigned mw_idx, bus_addr_t addr, + size_t size); + +/* + * ntb_mw_clear_trans() - clear the translation of a memory window + * @ntb: NTB device context + * @idx: Memory window number + * + * Clear the translation of a memory window. The peer may no longer access + * local memory through the window. + * + * Return: Zero on success, otherwise an error number. + */ +int ntb_mw_clear_trans(device_t ntb, unsigned mw_idx); + +/* + * ntb_mw_get_wc - Get the write-combine status of a memory window + * + * Returns: Zero on success, setting *wc; otherwise an error number (e.g. if + * idx is an invalid memory window). + * + * Mode is a VM_MEMATTR_* type. + */ +int ntb_mw_get_wc(device_t ntb, unsigned mw_idx, vm_memattr_t *mode); + +/* + * ntb_mw_set_wc - Set the write-combine status of a memory window + * + * If 'mode' matches the current status, this does nothing and succeeds. Mode + * is a VM_MEMATTR_* type. + * + * Returns: Zero on success, setting the caching attribute on the virtual + * mapping of the BAR; otherwise an error number (e.g. if idx is an invalid + * memory window, or if changing the caching attribute fails). + */ +int ntb_mw_set_wc(device_t ntb, unsigned mw_idx, vm_memattr_t mode); + +/* + * ntb_spad_count() - get the total scratch regs usable + * @ntb: pointer to ntb_softc instance + * + * This function returns the max 32bit scratchpad registers usable by the + * upper layer. + * + * RETURNS: total number of scratch pad registers available + */ +uint8_t ntb_spad_count(device_t ntb); + +/* + * ntb_get_max_spads() - zero local scratch registers + * @ntb: pointer to ntb_softc instance + * + * This functions overwrites all local scratchpad registers with zeroes. + */ +void ntb_spad_clear(device_t ntb); + +/* + * ntb_spad_write() - write to the secondary scratchpad register + * @ntb: pointer to ntb_softc instance + * @idx: index to the scratchpad register, 0 based + * @val: the data value to put into the register + * + * This function allows writing of a 32bit value to the indexed scratchpad + * register. The register resides on the secondary (external) side. + * + * RETURNS: An appropriate ERRNO error value on error, or zero for success. + */ +int ntb_spad_write(device_t ntb, unsigned int idx, uint32_t val); + +/* + * ntb_spad_read() - read from the primary scratchpad register + * @ntb: pointer to ntb_softc instance + * @idx: index to scratchpad register, 0 based + * @val: pointer to 32bit integer for storing the register value + * + * This function allows reading of the 32bit scratchpad register on + * the primary (internal) side. + * + * RETURNS: An appropriate ERRNO error value on error, or zero for success. + */ +int ntb_spad_read(device_t ntb, unsigned int idx, uint32_t *val); + +/* + * ntb_peer_spad_write() - write to the secondary scratchpad register + * @ntb: pointer to ntb_softc instance + * @idx: index to the scratchpad register, 0 based + * @val: the data value to put into the register + * + * This function allows writing of a 32bit value to the indexed scratchpad + * register. The register resides on the secondary (external) side. + * + * RETURNS: An appropriate ERRNO error value on error, or zero for success. + */ +int ntb_peer_spad_write(device_t ntb, unsigned int idx, uint32_t val); + +/* + * ntb_peer_spad_read() - read from the primary scratchpad register + * @ntb: pointer to ntb_softc instance + * @idx: index to scratchpad register, 0 based + * @val: pointer to 32bit integer for storing the register value + * + * This function allows reading of the 32bit scratchpad register on + * the primary (internal) side. + * + * RETURNS: An appropriate ERRNO error value on error, or zero for success. + */ +int ntb_peer_spad_read(device_t ntb, unsigned int idx, uint32_t *val); + +/* + * ntb_db_valid_mask() - get a mask of doorbell bits supported by the ntb + * @ntb: NTB device context + * + * Hardware may support different number or arrangement of doorbell bits. + * + * Return: A mask of doorbell bits supported by the ntb. + */ +uint64_t ntb_db_valid_mask(device_t ntb); + +/* + * ntb_db_vector_count() - get the number of doorbell interrupt vectors + * @ntb: NTB device context. + * + * Hardware may support different number of interrupt vectors. + * + * Return: The number of doorbell interrupt vectors. + */ +int ntb_db_vector_count(device_t ntb); + +/* + * ntb_db_vector_mask() - get a mask of doorbell bits serviced by a vector + * @ntb: NTB device context + * @vector: Doorbell vector number + * + * Each interrupt vector may have a different number or arrangement of bits. + * + * Return: A mask of doorbell bits serviced by a vector. + */ +uint64_t ntb_db_vector_mask(device_t ntb, uint32_t vector); + +/* + * ntb_peer_db_addr() - address and size of the peer doorbell register + * @ntb: NTB device context. + * @db_addr: OUT - The address of the peer doorbell register. + * @db_size: OUT - The number of bytes to write the peer doorbell register. + * + * Return the address of the peer doorbell register. This may be used, for + * example, by drivers that offload memory copy operations to a dma engine. + * The drivers may wish to ring the peer doorbell at the completion of memory + * copy operations. For efficiency, and to simplify ordering of operations + * between the dma memory copies and the ringing doorbell, the driver may + * append one additional dma memory copy with the doorbell register as the + * destination, after the memory copy operations. + * + * Return: Zero on success, otherwise an error number. + * + * Note that writing the peer doorbell via a memory window will *not* generate + * an interrupt on the remote host; that must be done separately. + */ +int ntb_peer_db_addr(device_t ntb, bus_addr_t *db_addr, vm_size_t *db_size); + +/* + * ntb_db_clear() - clear bits in the local doorbell register + * @ntb: NTB device context. + * @db_bits: Doorbell bits to clear. + * + * Clear bits in the local doorbell register, arming the bits for the next + * doorbell. + * + * Return: Zero on success, otherwise an error number. + */ +void ntb_db_clear(device_t ntb, uint64_t bits); + +/* + * ntb_db_clear_mask() - clear bits in the local doorbell mask + * @ntb: NTB device context. + * @db_bits: Doorbell bits to clear. + * + * Clear bits in the local doorbell mask register, allowing doorbell interrupts + * from being generated for those doorbell bits. If a doorbell bit is already + * set at the time the mask is cleared, and the corresponding mask bit is + * changed from set to clear, then the ntb driver must ensure that + * ntb_db_event() is called. If the hardware does not generate the interrupt + * on clearing the mask bit, then the driver must call ntb_db_event() anyway. + * + * Return: Zero on success, otherwise an error number. + */ +void ntb_db_clear_mask(device_t ntb, uint64_t bits); + +/* + * ntb_db_read() - read the local doorbell register + * @ntb: NTB device context. + * + * Read the local doorbell register, and return the bits that are set. + * + * Return: The bits currently set in the local doorbell register. + */ +uint64_t ntb_db_read(device_t ntb); + +/* + * ntb_db_set_mask() - set bits in the local doorbell mask + * @ntb: NTB device context. + * @db_bits: Doorbell mask bits to set. + * + * Set bits in the local doorbell mask register, preventing doorbell interrupts + * from being generated for those doorbell bits. Bits that were already set + * must remain set. + * + * Return: Zero on success, otherwise an error number. + */ +void ntb_db_set_mask(device_t ntb, uint64_t bits); + +/* + * ntb_peer_db_set() - Set the doorbell on the secondary/external side + * @ntb: pointer to ntb_softc instance + * @bit: doorbell bits to ring + * + * This function allows triggering of a doorbell on the secondary/external + * side that will initiate an interrupt on the remote host + */ +void ntb_peer_db_set(device_t ntb, uint64_t bits); + #endif /* _NTB_H_ */ Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Jul 28 10:05:41 2016 (r303428) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Jul 28 10:48:20 2016 (r303429) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -201,6 +200,9 @@ struct ntb_msix_data { }; struct ntb_softc { + /* ntb.c context. Do not move! Must go first! */ + void *ntb_store; + device_t device; enum ntb_device_type type; uint32_t features; @@ -219,10 +221,7 @@ struct ntb_softc { struct callout heartbeat_timer; struct callout lr_timer; - void *ntb_ctx; - const struct ntb_ctx_ops *ctx_ops; struct ntb_vec *msix_vec; - struct rmlock ctx_lock; uint32_t ppd; enum ntb_conn_type conn_type; @@ -284,72 +283,74 @@ bus_space_write_8(bus_space_tag_t tag, b } #endif -#define ntb_bar_read(SIZE, bar, offset) \ +#define intel_ntb_bar_read(SIZE, bar, offset) \ bus_space_read_ ## SIZE (ntb->bar_info[(bar)].pci_bus_tag, \ ntb->bar_info[(bar)].pci_bus_handle, (offset)) -#define ntb_bar_write(SIZE, bar, offset, val) \ +#define intel_ntb_bar_write(SIZE, bar, offset, val) \ bus_space_write_ ## SIZE (ntb->bar_info[(bar)].pci_bus_tag, \ ntb->bar_info[(bar)].pci_bus_handle, (offset), (val)) -#define ntb_reg_read(SIZE, offset) ntb_bar_read(SIZE, NTB_CONFIG_BAR, offset) -#define ntb_reg_write(SIZE, offset, val) \ - ntb_bar_write(SIZE, NTB_CONFIG_BAR, offset, val) -#define ntb_mw_read(SIZE, offset) \ - ntb_bar_read(SIZE, ntb_mw_to_bar(ntb, ntb->b2b_mw_idx), offset) -#define ntb_mw_write(SIZE, offset, val) \ - ntb_bar_write(SIZE, ntb_mw_to_bar(ntb, ntb->b2b_mw_idx), \ +#define intel_ntb_reg_read(SIZE, offset) \ + intel_ntb_bar_read(SIZE, NTB_CONFIG_BAR, offset) +#define intel_ntb_reg_write(SIZE, offset, val) \ + intel_ntb_bar_write(SIZE, NTB_CONFIG_BAR, offset, val) +#define intel_ntb_mw_read(SIZE, offset) \ + intel_ntb_bar_read(SIZE, intel_ntb_mw_to_bar(ntb, ntb->b2b_mw_idx), \ + offset) +#define intel_ntb_mw_write(SIZE, offset, val) \ + intel_ntb_bar_write(SIZE, intel_ntb_mw_to_bar(ntb, ntb->b2b_mw_idx), \ offset, val) -static int ntb_probe(device_t device); -static int ntb_attach(device_t device); -static int ntb_detach(device_t device); -static uint64_t ntb_db_valid_mask(device_t dev); -static void ntb_spad_clear(device_t dev); -static uint64_t ntb_db_vector_mask(device_t dev, uint32_t vector); -static bool ntb_link_is_up(device_t dev, enum ntb_speed *speed, +static int intel_ntb_probe(device_t device); +static int intel_ntb_attach(device_t device); +static int intel_ntb_detach(device_t device); +static uint64_t intel_ntb_db_valid_mask(device_t dev); +static void intel_ntb_spad_clear(device_t dev); +static uint64_t intel_ntb_db_vector_mask(device_t dev, uint32_t vector); +static bool intel_ntb_link_is_up(device_t dev, enum ntb_speed *speed, enum ntb_width *width); -static int ntb_link_enable(device_t dev, enum ntb_speed speed, +static int intel_ntb_link_enable(device_t dev, enum ntb_speed speed, enum ntb_width width); -static int ntb_link_disable(device_t dev); -static int ntb_spad_read(device_t dev, unsigned int idx, uint32_t *val); -static int ntb_peer_spad_write(device_t dev, unsigned int idx, uint32_t val); +static int intel_ntb_link_disable(device_t dev); +static int intel_ntb_spad_read(device_t dev, unsigned int idx, uint32_t *val); +static int intel_ntb_peer_spad_write(device_t dev, unsigned int idx, uint32_t val); -static unsigned ntb_user_mw_to_idx(struct ntb_softc *, unsigned uidx); -static inline enum ntb_bar ntb_mw_to_bar(struct ntb_softc *, unsigned mw); +static unsigned intel_ntb_user_mw_to_idx(struct ntb_softc *, unsigned uidx); +static inline enum ntb_bar intel_ntb_mw_to_bar(struct ntb_softc *, unsigned mw); static inline bool bar_is_64bit(struct ntb_softc *, enum ntb_bar); static inline void bar_get_xlat_params(struct ntb_softc *, enum ntb_bar, uint32_t *base, uint32_t *xlat, uint32_t *lmt); -static int ntb_map_pci_bars(struct ntb_softc *ntb); -static int ntb_mw_set_wc_internal(struct ntb_softc *, unsigned idx, +static int intel_ntb_map_pci_bars(struct ntb_softc *ntb); +static int intel_ntb_mw_set_wc_internal(struct ntb_softc *, unsigned idx, vm_memattr_t); static void print_map_success(struct ntb_softc *, struct ntb_pci_bar_info *, const char *); static int map_mmr_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar); static int map_memory_window_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar); -static void ntb_unmap_pci_bar(struct ntb_softc *ntb); -static int ntb_remap_msix(device_t, uint32_t desired, uint32_t avail); -static int ntb_init_isr(struct ntb_softc *ntb); -static int ntb_setup_legacy_interrupt(struct ntb_softc *ntb); -static int ntb_setup_msix(struct ntb_softc *ntb, uint32_t num_vectors); -static void ntb_teardown_interrupts(struct ntb_softc *ntb); -static inline uint64_t ntb_vec_mask(struct ntb_softc *, uint64_t db_vector); -static void ntb_interrupt(struct ntb_softc *, uint32_t vec); +static void intel_ntb_unmap_pci_bar(struct ntb_softc *ntb); +static int intel_ntb_remap_msix(device_t, uint32_t desired, uint32_t avail); +static int intel_ntb_init_isr(struct ntb_softc *ntb); +static int intel_ntb_setup_legacy_interrupt(struct ntb_softc *ntb); +static int intel_ntb_setup_msix(struct ntb_softc *ntb, uint32_t num_vectors); +static void intel_ntb_teardown_interrupts(struct ntb_softc *ntb); +static inline uint64_t intel_ntb_vec_mask(struct ntb_softc *, uint64_t db_vector); +static void intel_ntb_interrupt(struct ntb_softc *, uint32_t vec); static void ndev_vec_isr(void *arg); static void ndev_irq_isr(void *arg); static inline uint64_t db_ioread(struct ntb_softc *, uint64_t regoff); static inline void db_iowrite(struct ntb_softc *, uint64_t regoff, uint64_t); static inline void db_iowrite_raw(struct ntb_softc *, uint64_t regoff, uint64_t); -static int ntb_create_msix_vec(struct ntb_softc *ntb, uint32_t num_vectors); -static void ntb_free_msix_vec(struct ntb_softc *ntb); -static void ntb_get_msix_info(struct ntb_softc *ntb); -static void ntb_exchange_msix(void *); -static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id); -static void ntb_detect_max_mw(struct ntb_softc *ntb); -static int ntb_detect_xeon(struct ntb_softc *ntb); -static int ntb_detect_atom(struct ntb_softc *ntb); -static int ntb_xeon_init_dev(struct ntb_softc *ntb); -static int ntb_atom_init_dev(struct ntb_softc *ntb); -static void ntb_teardown_xeon(struct ntb_softc *ntb); +static int intel_ntb_create_msix_vec(struct ntb_softc *ntb, uint32_t num_vectors); +static void intel_ntb_free_msix_vec(struct ntb_softc *ntb); +static void intel_ntb_get_msix_info(struct ntb_softc *ntb); +static void intel_ntb_exchange_msix(void *); +static struct ntb_hw_info *intel_ntb_get_device_info(uint32_t device_id); +static void intel_ntb_detect_max_mw(struct ntb_softc *ntb); +static int intel_ntb_detect_xeon(struct ntb_softc *ntb); +static int intel_ntb_detect_atom(struct ntb_softc *ntb); +static int intel_ntb_xeon_init_dev(struct ntb_softc *ntb); +static int intel_ntb_atom_init_dev(struct ntb_softc *ntb); +static void intel_ntb_teardown_xeon(struct ntb_softc *ntb); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 28 11:27:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F390BA58F0; Thu, 28 Jul 2016 11:27:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 53BB41C89; Thu, 28 Jul 2016 11:27:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 4C27716E4; Thu, 28 Jul 2016 11:27:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id C136524640; Thu, 28 Jul 2016 11:27:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id DqoiUGoxz0PY; Thu, 28 Jul 2016 11:27:34 +0000 (UTC) Subject: Re: svn commit: r303419 - head/usr.sbin/pmcstudy DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 62BF12463B To: Konstantin Belousov References: <201607272145.u6RLjBZO016327@repo.freebsd.org> <20160728083042.GR38613@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5f26182c-c69b-af45-db8d-88de6c8e0ff0@FreeBSD.org> Date: Thu, 28 Jul 2016 04:27:35 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160728083042.GR38613@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RGOE6cSWlF13FRXV4rpV9oHpm92WQnvMH" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 11:27:42 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --RGOE6cSWlF13FRXV4rpV9oHpm92WQnvMH Content-Type: multipart/mixed; boundary="J4TVRX84w6V7GRIWPpjEvE1gnlenwx8vQ" From: Bryan Drewery To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <5f26182c-c69b-af45-db8d-88de6c8e0ff0@FreeBSD.org> Subject: Re: svn commit: r303419 - head/usr.sbin/pmcstudy References: <201607272145.u6RLjBZO016327@repo.freebsd.org> <20160728083042.GR38613@kib.kiev.ua> In-Reply-To: <20160728083042.GR38613@kib.kiev.ua> --J4TVRX84w6V7GRIWPpjEvE1gnlenwx8vQ Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 7/28/2016 1:30 AM, Konstantin Belousov wrote: > On Wed, Jul 27, 2016 at 09:45:11PM +0000, Bryan Drewery wrote: >> Author: bdrewery >> Date: Wed Jul 27 21:45:11 2016 >> New Revision: 303419 >> URL: https://svnweb.freebsd.org/changeset/base/303419 >> >> Log: >> Fix non-amd64 build from r292043 after reconnecting in r303410. >> =20 >> MFC after: 3 days >> X-MFC-With: r303410 >> Sponsored by: EMC / Isilon Storage Division >> >> Modified: >> head/usr.sbin/pmcstudy/pmcstudy.c >> >> Modified: head/usr.sbin/pmcstudy/pmcstudy.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/usr.sbin/pmcstudy/pmcstudy.c Wed Jul 27 20:51:31 2016 (r30341= 8) >> +++ head/usr.sbin/pmcstudy/pmcstudy.c Wed Jul 27 21:45:11 2016 (r30341= 9) >> @@ -2322,11 +2322,7 @@ do_cpuid(u_int ax, u_int cx, u_int *p) >> =20 >> #else >> #define cpuid(in, a, b, c, d)=20 >> -static __inline void >> -do_cpuid(u_int ax, u_int cx, u_int *p) >> -{ >> -} >> - >> +#define do_cpuid(ax, cx, p) >> #endif >> =20 >> static void > Should the same code be enabled for i386 as well ? >=20 I don't know. I just know I accidentally disconnected it and when reconnecting it revealed a bug introduced while disconnected. --=20 Regards, Bryan Drewery --J4TVRX84w6V7GRIWPpjEvE1gnlenwx8vQ-- --RGOE6cSWlF13FRXV4rpV9oHpm92WQnvMH 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 iQEcBAEBAgAGBQJXmewnAAoJEDXXcbtuRpfPFOgH/2U/wKceSMEjL/nXOVyGpEB1 Nga3GfXEIqewwnEIifddoZYIv/dwJOjFiocLlkzTsZGIwYB9R5GeNLdM886D2/vI jEuJpFFmp6javpi8VpC2yJpR6M9SfOJLSMDinAFEJcAldNh57rMqxjCRurtCefdn CL9TGLwqJ6OXZp48Sl3a0BzhaaoawsVO1oOe/VkJK27MnOjo/m8EBweLxgob1fMc XJJKcJlOGXult8etYz1mO1mhSK7hQYPydD6zoVGG8EZnT3fe3dg5INY09Y9RNhEU C04/ohzoGMwDnMgHdNPxSoYAEK8ftjLxWXDFwpO9GVM5qbu2D1LqrEmeO/c8esQ= =ADZC -----END PGP SIGNATURE----- --RGOE6cSWlF13FRXV4rpV9oHpm92WQnvMH-- From owner-svn-src-all@freebsd.org Thu Jul 28 11:43:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66EE6BA5DFA; Thu, 28 Jul 2016 11:43:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A2D219BB; Thu, 28 Jul 2016 11:43:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SBhQs2026648; Thu, 28 Jul 2016 11:43:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SBhPQD026645; Thu, 28 Jul 2016 11:43:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607281143.u6SBhPQD026645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Jul 2016 11:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303432 - in stable/11/sys: dev/pty kern sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 11:43:27 -0000 Author: kib Date: Thu Jul 28 11:43:25 2016 New Revision: 303432 URL: https://svnweb.freebsd.org/changeset/base/303432 Log: MFC r303151: Provide counter_warning(9) KPI. MFC r303155: Hide counted_warning(9) under #ifdef _KERNEL braces. Approved by: re (gjb) Modified: stable/11/sys/dev/pty/pty.c stable/11/sys/kern/subr_prf.c stable/11/sys/sys/systm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pty/pty.c ============================================================================== --- stable/11/sys/dev/pty/pty.c Thu Jul 28 11:10:13 2016 (r303431) +++ stable/11/sys/dev/pty/pty.c Thu Jul 28 11:43:25 2016 (r303432) @@ -52,10 +52,10 @@ __FBSDID("$FreeBSD$"); * binary emulation. */ -static unsigned int pty_warningcnt = 1; +static unsigned pty_warningcnt = 1; SYSCTL_UINT(_kern, OID_AUTO, tty_pty_warningcnt, CTLFLAG_RW, - &pty_warningcnt, 0, - "Warnings that will be triggered upon legacy PTY allocation"); + &pty_warningcnt, 0, + "Warnings that will be triggered upon legacy PTY allocation"); static int ptydev_fdopen(struct cdev *dev, int fflags, struct thread *td, struct file *fp) @@ -77,12 +77,7 @@ ptydev_fdopen(struct cdev *dev, int ffla } /* Raise a warning when a legacy PTY has been allocated. */ - if (pty_warningcnt > 0) { - pty_warningcnt--; - log(LOG_INFO, "pid %d (%s) is using legacy pty devices%s\n", - td->td_proc->p_pid, td->td_name, - pty_warningcnt ? "" : " - not logging anymore"); - } + counted_warning(&pty_warningcnt, "is using legacy pty devices"); return (0); } Modified: stable/11/sys/kern/subr_prf.c ============================================================================== --- stable/11/sys/kern/subr_prf.c Thu Jul 28 11:10:13 2016 (r303431) +++ stable/11/sys/kern/subr_prf.c Thu Jul 28 11:43:25 2016 (r303432) @@ -1196,3 +1196,24 @@ sbuf_hexdump(struct sbuf *sb, const void } } +#ifdef _KERNEL +void +counted_warning(unsigned *counter, const char *msg) +{ + struct thread *td; + unsigned c; + + for (;;) { + c = *counter; + if (c == 0) + break; + if (atomic_cmpset_int(counter, c, c - 1)) { + td = curthread; + log(LOG_INFO, "pid %d (%s) %s%s\n", + td->td_proc->p_pid, td->td_name, msg, + c > 1 ? "" : " - not logging anymore"); + break; + } + } +} +#endif Modified: stable/11/sys/sys/systm.h ============================================================================== --- stable/11/sys/sys/systm.h Thu Jul 28 11:10:13 2016 (r303431) +++ stable/11/sys/sys/systm.h Thu Jul 28 11:43:25 2016 (r303432) @@ -447,4 +447,6 @@ void intr_prof_stack_use(struct thread * extern void (*softdep_ast_cleanup)(void); +void counted_warning(unsigned *counter, const char *msg); + #endif /* !_SYS_SYSTM_H_ */ From owner-svn-src-all@freebsd.org Thu Jul 28 11:51:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 986B4BA5F5D; Thu, 28 Jul 2016 11:51:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B8F31C6A; Thu, 28 Jul 2016 11:51:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SBpK2i030385; Thu, 28 Jul 2016 11:51:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SBpKFK030382; Thu, 28 Jul 2016 11:51:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607281151.u6SBpKFK030382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Jul 2016 11:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303433 - in stable/10/sys: dev/pty kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 11:51:21 -0000 Author: kib Date: Thu Jul 28 11:51:20 2016 New Revision: 303433 URL: https://svnweb.freebsd.org/changeset/base/303433 Log: MFC r303151: Provide counter_warning(9) KPI. MFC r303155: Hide counted_warning(9) under #ifdef _KERNEL braces. Modified: stable/10/sys/dev/pty/pty.c stable/10/sys/kern/subr_prf.c stable/10/sys/sys/systm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pty/pty.c ============================================================================== --- stable/10/sys/dev/pty/pty.c Thu Jul 28 11:43:25 2016 (r303432) +++ stable/10/sys/dev/pty/pty.c Thu Jul 28 11:51:20 2016 (r303433) @@ -52,10 +52,10 @@ __FBSDID("$FreeBSD$"); * binary emulation. */ -static unsigned int pty_warningcnt = 1; +static unsigned pty_warningcnt = 1; SYSCTL_UINT(_kern, OID_AUTO, tty_pty_warningcnt, CTLFLAG_RW, - &pty_warningcnt, 0, - "Warnings that will be triggered upon legacy PTY allocation"); + &pty_warningcnt, 0, + "Warnings that will be triggered upon legacy PTY allocation"); static int ptydev_fdopen(struct cdev *dev, int fflags, struct thread *td, struct file *fp) @@ -77,12 +77,7 @@ ptydev_fdopen(struct cdev *dev, int ffla } /* Raise a warning when a legacy PTY has been allocated. */ - if (pty_warningcnt > 0) { - pty_warningcnt--; - log(LOG_INFO, "pid %d (%s) is using legacy pty devices%s\n", - td->td_proc->p_pid, td->td_name, - pty_warningcnt ? "" : " - not logging anymore"); - } + counted_warning(&pty_warningcnt, "is using legacy pty devices"); return (0); } Modified: stable/10/sys/kern/subr_prf.c ============================================================================== --- stable/10/sys/kern/subr_prf.c Thu Jul 28 11:43:25 2016 (r303432) +++ stable/10/sys/kern/subr_prf.c Thu Jul 28 11:51:20 2016 (r303433) @@ -1185,3 +1185,24 @@ sbuf_hexdump(struct sbuf *sb, const void } } +#ifdef _KERNEL +void +counted_warning(unsigned *counter, const char *msg) +{ + struct thread *td; + unsigned c; + + for (;;) { + c = *counter; + if (c == 0) + break; + if (atomic_cmpset_int(counter, c, c - 1)) { + td = curthread; + log(LOG_INFO, "pid %d (%s) %s%s\n", + td->td_proc->p_pid, td->td_name, msg, + c > 1 ? "" : " - not logging anymore"); + break; + } + } +} +#endif Modified: stable/10/sys/sys/systm.h ============================================================================== --- stable/10/sys/sys/systm.h Thu Jul 28 11:43:25 2016 (r303432) +++ stable/10/sys/sys/systm.h Thu Jul 28 11:51:20 2016 (r303433) @@ -434,4 +434,6 @@ void intr_prof_stack_use(struct thread * extern void (*softdep_ast_cleanup)(void); +void counted_warning(unsigned *counter, const char *msg); + #endif /* !_SYS_SYSTM_H_ */ From owner-svn-src-all@freebsd.org Thu Jul 28 12:06:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B265BA7D32; Thu, 28 Jul 2016 12:06:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B1131A12; Thu, 28 Jul 2016 12:06:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SC6egG034196; Thu, 28 Jul 2016 12:06:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SC6eWI034195; Thu, 28 Jul 2016 12:06:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607281206.u6SC6eWI034195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Jul 2016 12:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303434 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 12:06:41 -0000 Author: kib Date: Thu Jul 28 12:06:40 2016 New Revision: 303434 URL: https://svnweb.freebsd.org/changeset/base/303434 Log: MFC r303154: Declare aio requests on files from local filesystems safe. Approved by: re (gjb) Modified: stable/11/sys/kern/vfs_aio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_aio.c ============================================================================== --- stable/11/sys/kern/vfs_aio.c Thu Jul 28 11:51:20 2016 (r303433) +++ stable/11/sys/kern/vfs_aio.c Thu Jul 28 12:06:40 2016 (r303434) @@ -1664,7 +1664,10 @@ aio_queue_file(struct file *fp, struct k struct aioliojob *lj; struct kaioinfo *ki; struct kaiocb *job2; + struct vnode *vp; + struct mount *mp; int error, opcode; + bool safe; lj = job->lio; ki = job->userproc->p_aioinfo; @@ -1685,7 +1688,16 @@ aio_queue_file(struct file *fp, struct k goto done; #endif queueit: - if (!enable_aio_unsafe) + safe = false; + if (fp->f_type == DTYPE_VNODE) { + vp = fp->f_vnode; + if (vp->v_type == VREG || vp->v_type == VDIR) { + mp = fp->f_vnode->v_mount; + if (mp == NULL || (mp->mnt_flag & MNT_LOCAL) != 0) + safe = true; + } + } + if (!(safe || enable_aio_unsafe)) return (EOPNOTSUPP); if (opcode == LIO_SYNC) { From owner-svn-src-all@freebsd.org Thu Jul 28 12:22:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0137BA518A; Thu, 28 Jul 2016 12:22:02 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9268B14A1; Thu, 28 Jul 2016 12:22:02 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SCM1h2040988; Thu, 28 Jul 2016 12:22:01 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SCM1lI040985; Thu, 28 Jul 2016 12:22:01 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607281222.u6SCM1lI040985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Jul 2016 12:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303435 - in head: lib/libc/sys 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 12:22:03 -0000 Author: ed Date: Thu Jul 28 12:22:01 2016 New Revision: 303435 URL: https://svnweb.freebsd.org/changeset/base/303435 Log: Change the return type of msgrcv() to ssize_t as required by POSIX. It looks like the msgrcv() system call is already written in such a way that the size is internally computed as a size_t and written into all of td_retval[0]. This means that it is effectively already returning ssize_t. It's just that the userspace prototype doesn't match up. Modified: head/lib/libc/sys/msgrcv.2 head/sys/kern/syscalls.master head/sys/sys/msg.h Modified: head/lib/libc/sys/msgrcv.2 ============================================================================== --- head/lib/libc/sys/msgrcv.2 Thu Jul 28 12:06:40 2016 (r303434) +++ head/lib/libc/sys/msgrcv.2 Thu Jul 28 12:22:01 2016 (r303435) @@ -31,7 +31,7 @@ .\" $FreeBSD$ .\" .\"/ -.Dd July 9, 2009 +.Dd July 28, 2016 .Dt MSGRCV 2 .Os .Sh NAME @@ -43,7 +43,7 @@ .In sys/types.h .In sys/ipc.h .In sys/msg.h -.Ft int +.Ft ssize_t .Fn msgrcv "int msqid" "void *msgp" "size_t msgsz" "long msgtyp" "int msgflg" .Sh DESCRIPTION The Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Thu Jul 28 12:06:40 2016 (r303434) +++ head/sys/kern/syscalls.master Thu Jul 28 12:22:01 2016 (r303435) @@ -428,7 +428,7 @@ 225 AUE_MSGGET NOSTD { int msgget(key_t key, int msgflg); } 226 AUE_MSGSND NOSTD { int msgsnd(int msqid, const void *msgp, \ size_t msgsz, int msgflg); } -227 AUE_MSGRCV NOSTD { int msgrcv(int msqid, void *msgp, \ +227 AUE_MSGRCV NOSTD { ssize_t msgrcv(int msqid, void *msgp, \ size_t msgsz, long msgtyp, int msgflg); } 228 AUE_SHMAT NOSTD { int shmat(int shmid, const void *shmaddr, \ int shmflg); } Modified: head/sys/sys/msg.h ============================================================================== --- head/sys/sys/msg.h Thu Jul 28 12:06:40 2016 (r303434) +++ head/sys/sys/msg.h Thu Jul 28 12:22:01 2016 (r303435) @@ -169,8 +169,7 @@ struct msqid_kernel { __BEGIN_DECLS int msgctl(int, int, struct msqid_ds *); int msgget(key_t, int); -/* XXX return value should be ssize_t. */ -int msgrcv(int, void *, size_t, long, int); +ssize_t msgrcv(int, void *, size_t, long, int); int msgsnd(int, const void *, size_t, int); #if __BSD_VISIBLE int msgsys(int, ...); From owner-svn-src-all@freebsd.org Thu Jul 28 12:22:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60D4ABA5208; Thu, 28 Jul 2016 12:22:36 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6A81693; Thu, 28 Jul 2016 12:22:36 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SCMZDU041627; Thu, 28 Jul 2016 12:22:35 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SCMYtF041621; Thu, 28 Jul 2016 12:22:34 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607281222.u6SCMYtF041621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Jul 2016 12:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303436 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 12:22:36 -0000 Author: ed Date: Thu Jul 28 12:22:34 2016 New Revision: 303436 URL: https://svnweb.freebsd.org/changeset/base/303436 Log: Regenerate system call table for r303435. Modified: head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Thu Jul 28 12:22:01 2016 (r303435) +++ head/sys/kern/init_sysent.c Thu Jul 28 12:22:34 2016 (r303436) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 302094 2016-06-22 21:15:59Z brooks + * created from FreeBSD: head/sys/kern/syscalls.master 303435 2016-07-28 12:22:01Z ed */ #include "opt_compat.h" Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Thu Jul 28 12:22:01 2016 (r303435) +++ head/sys/kern/syscalls.c Thu Jul 28 12:22:34 2016 (r303436) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 302094 2016-06-22 21:15:59Z brooks + * created from FreeBSD: head/sys/kern/syscalls.master 303435 2016-07-28 12:22:01Z ed */ const char *syscallnames[] = { Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Thu Jul 28 12:22:01 2016 (r303435) +++ head/sys/kern/systrace_args.c Thu Jul 28 12:22:34 2016 (r303436) @@ -9534,7 +9534,7 @@ systrace_return_setargdesc(int sysnum, i /* msgrcv */ case 227: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* shmat */ case 228: Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Thu Jul 28 12:22:01 2016 (r303435) +++ head/sys/sys/syscall.h Thu Jul 28 12:22:34 2016 (r303436) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 302094 2016-06-22 21:15:59Z brooks + * created from FreeBSD: head/sys/kern/syscalls.master 303435 2016-07-28 12:22:01Z ed */ #define SYS_syscall 0 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Thu Jul 28 12:22:01 2016 (r303435) +++ head/sys/sys/syscall.mk Thu Jul 28 12:22:34 2016 (r303436) @@ -1,7 +1,7 @@ # FreeBSD system call object files. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 302094 2016-06-22 21:15:59Z brooks +# created from FreeBSD: head/sys/kern/syscalls.master 303435 2016-07-28 12:22:01Z ed MIASM = \ syscall.o \ exit.o \ Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Thu Jul 28 12:22:01 2016 (r303435) +++ head/sys/sys/sysproto.h Thu Jul 28 12:22:34 2016 (r303436) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 302094 2016-06-22 21:15:59Z brooks + * created from FreeBSD: head/sys/kern/syscalls.master 303435 2016-07-28 12:22:01Z ed */ #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-all@freebsd.org Thu Jul 28 12:25:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85E5DBA5355; Thu, 28 Jul 2016 12:25:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58E5F18E0; Thu, 28 Jul 2016 12:25:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SCPwfn041780; Thu, 28 Jul 2016 12:25:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SCPwMb041779; Thu, 28 Jul 2016 12:25:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607281225.u6SCPwMb041779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 28 Jul 2016 12:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303437 - head/sys/dev/ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 12:25:59 -0000 Author: mav Date: Thu Jul 28 12:25:58 2016 New Revision: 303437 URL: https://svnweb.freebsd.org/changeset/base/303437 Log: Fix r303429 build with invariants. Modified: head/sys/dev/ntb/ntb.c Modified: head/sys/dev/ntb/ntb.c ============================================================================== --- head/sys/dev/ntb/ntb.c Thu Jul 28 12:22:34 2016 (r303436) +++ head/sys/dev/ntb/ntb.c Thu Jul 28 12:25:58 2016 (r303437) @@ -266,7 +266,7 @@ ntb_get_ctx(device_t ntb, const struct n { struct ntb_child *nc = device_get_ivars(ntb); - KASSERT(nc->ntb_ctx != NULL && nc->ctx_ops != NULL, ("bogus")); + KASSERT(nc->ctx != NULL && nc->ctx_ops != NULL, ("bogus")); if (ctx_ops != NULL) *ctx_ops = nc->ctx_ops; return (nc->ctx); From owner-svn-src-all@freebsd.org Thu Jul 28 12:53:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36F45BA5B08; Thu, 28 Jul 2016 12:53:35 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E9D5C1AA2; Thu, 28 Jul 2016 12:53:34 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id SkoWbpKGMeXEcSkoXbeGgI; Thu, 28 Jul 2016 06:53:27 -0600 X-Authority-Analysis: v=2.2 cv=T/3OdLCQ c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=cAmyUtKerLwA:10 a=BWvPGDcYAAAA:8 a=6I5d2MoRAAAA:8 a=VwQbUJbxAAAA:8 a=YxBL1-UpAAAA:8 a=41SXhP_Wu43H9jiB8J8A:9 a=pxhY87DP9d2VeQe4joPk:22 a=IjZwj45LgO3ly-622nXo:22 a=AjGcO6oz07-iQ99wixmX:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id E7D2813753; Thu, 28 Jul 2016 05:53:23 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u6SCrNVq040716; Thu, 28 Jul 2016 05:53:23 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201607281253.u6SCrNVq040716@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Andrew Turner cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r303380 - in vendor/device-tree/dist: Bindings Bindings/arc Bindings/arm Bindings/arm/altera Bindings/arm/bcm Bindings/arm/hisilicon Bindings/arm/keystone Bindings/arm/marvell Bindings/... In-Reply-To: Message from Andrew Turner of "Thu, 28 Jul 2016 11:10:10 +0100." <20160728111010.05dd2c38@zapp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 28 Jul 2016 05:53:23 -0700 X-CMAE-Envelope: MS4wfIpi+7NaLOghFo90xEThS/B3FWvGyM/tZ4uADhLznT3+EPWQjVZzsJxi0GFO0M8RjKhB12pitTAHz8RNvR7AoqPiOY0cAF+CkJFmybTmKP/mq2hkRzRD 300+Vzpi0BNnoIHb4zt/TIBGGRqoEQJ9+sZZ9tyDogcDSQUhoD2047OyQrKAK3DqFz10CDzvT+iofjlP/15gkILun9QjzT9DsRNCw8Ijs1UZSKqO6YlWQxsb ih8+S0KBHACA3cUrOCeVN4ZTKTv5646tSEFCJcpxu6attkXemNdjx8GwYjlloWzb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 12:53:35 -0000 In message <20160728111010.05dd2c38@zapp>, Andrew Turner writes: > On Wed, 27 Jul 2016 19:49:16 -0700 > Cy Schubert wrote: > > > In message <201607271033.u6RAXkeI063443@repo.freebsd.org>, Andrew > > Turner writes > > : > > > Author: andrew > > > Date: Wed Jul 27 10:33:45 2016 > > > New Revision: 303380 > > > URL: https://svnweb.freebsd.org/changeset/base/303380 > > > > > > Log: > > > Import the updated devicetree files from > > > https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-r > ebas > > > ing.git > > > > I don't see this used anywhere in head (though I must admit I haven't > > looked that hard). Considering this is GPL, what do we intend to do > > with this? (Once again, I haven't really looked that hard but I can't > > see it used anywhere.) > > It is used in sys/gnu/dts. Thanks. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Thu Jul 28 13:02:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FF81BA5DBA for ; Thu, 28 Jul 2016 13:02:58 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x235.google.com (mail-yw0-x235.google.com [IPv6:2607:f8b0:4002:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18F43128D for ; Thu, 28 Jul 2016 13:02:57 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x235.google.com with SMTP id z8so85659980ywa.1 for ; Thu, 28 Jul 2016 06:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DucLEfkw/d2TNgZMEZsK38h0bH6dQ4zgnD2YfItKC5c=; b=cUr3JtP92FIgz4d/oOki1oBi+vz8gf3NG+h/HZsDDwhQi8lKpqWjdtInWBFzA7e5kL OqvHuGr6b189r9huthti/ZOSHWqB5atoO56RxXmFLMwr33ww7IqbBrAFI1OyWZTyngTH QGfLxYgo+e3Pohxdzyt/50KTZbcIPm9cgZ6+6acHDKbfZsvsApqyB2Y9vwPUY5niD/fm hBSa5uqQS3vXKxDj2i2C+U9FxbtWJ1ZtsIbr6wxIp8SNZVe3MQZrIEQR7NqsOnzHNMs7 jCs9R3hdOY7Wovb0ZPXsgj2UNK6THn1YwLGDy9xSwruoLpsKK2T11r7dNIxBwc8xobl3 kPyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DucLEfkw/d2TNgZMEZsK38h0bH6dQ4zgnD2YfItKC5c=; b=A+oBk/IAHxJ93O9zz2ZVKI7UCrT4rrHJb7L4U5jQqDrHfxm7326w8hIcrlkghCht6u Dl/nsXnUde/B4qvRPdHoyU+8nnVdqjCWQmSVsTgCdIZDsaKE5bJKndHeJ1/zJY42WlH6 /DA8WueJvFRezVOxsXbtKvVr4MIJZ/MR+ZorJkUto9gWEMzd0FXKQ1g+cP+lrCMXhuL/ NvrbgtyJILBp0IPao6Trp7Z1qNcOjV0ZFaZajWr7ekSqTy/LYMK0N8ww0CklVxf6hf1Z oB3x71IK4nQFsy1WN2jtRUxHgvbtsC1WCU14spNhIMmao4jarjQmpv7Ki+V2nxguE0YA Srkg== X-Gm-Message-State: AEkoouvm8QHX9UA4cW+pgpoSCAUVeu+Gq1wjVTv68VGoQv9qfCzwjMead9SBumM2PnnRadpyyyLE8B4rVl9clA== X-Received: by 10.13.253.134 with SMTP id n128mr28278352ywf.20.1469710977114; Thu, 28 Jul 2016 06:02:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Thu, 28 Jul 2016 06:02:56 -0700 (PDT) In-Reply-To: <20160727091654.P1485@besplex.bde.org> References: <201607262011.u6QKBTDp043256@repo.freebsd.org> <20160727091654.P1485@besplex.bde.org> From: Ed Schouten Date: Thu, 28 Jul 2016 15:02:56 +0200 Message-ID: Subject: Re: svn commit: r303342 - in head: include lib/libc/stdlib To: Bruce Evans Cc: Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 13:02:58 -0000 Hi Bruce, 2016-07-27 2:44 GMT+02:00 Bruce Evans : > This might work here since the type is unsigned, but it wouldn't work to > change from int to long. Yes. That's a pretty good remark. What makes this pretty safe in this case is that srandom() discard the top bits anyway. The first thing it does is cast the argument to an uint32_t, so even if we didn't properly zero/size extend this, it wouldn't end up being used. Best regards, -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Thu Jul 28 13:15:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D24D0BA63E3; Thu, 28 Jul 2016 13:15:24 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2BF51AB2; Thu, 28 Jul 2016 13:15:24 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SDFN7m060627; Thu, 28 Jul 2016 13:15:23 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SDFNih060626; Thu, 28 Jul 2016 13:15:23 GMT (envelope-from br@FreeBSD.org) Message-Id: <201607281315.u6SDFNih060626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 28 Jul 2016 13:15:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303438 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 13:15:24 -0000 Author: br Date: Thu Jul 28 13:15:23 2016 New Revision: 303438 URL: https://svnweb.freebsd.org/changeset/base/303438 Log: o Add warn flags required to build modules with GCC 6.1; o Sort GCC 4.8 warn flags. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Thu Jul 28 12:25:58 2016 (r303437) +++ head/sys/conf/kern.mk Thu Jul 28 13:15:23 2016 (r303438) @@ -45,13 +45,23 @@ CLANG_NO_IAS34= -no-integrated-as .if ${COMPILER_VERSION} >= 40800 # Catch-all for all the things that are in our tree, but for which we're # not yet ready for this compiler. -CWARNEXTRA?= -Wno-error=inline -Wno-error=enum-compare -Wno-error=unused-but-set-variable \ - -Wno-error=aggressive-loop-optimizations -Wno-error=maybe-uninitialized \ - -Wno-error=array-bounds -Wno-error=address \ - -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes \ - -Wno-error=strict-overflow -Wno-error=overflow +CWARNEXTRA?= -Wno-error=address \ + -Wno-error=aggressive-loop-optimizations \ + -Wno-error=array-bounds \ + -Wno-error=attributes \ + -Wno-error=cast-qual \ + -Wno-error=enum-compare \ + -Wno-error=inline \ + -Wno-error=maybe-uninitialized \ + -Wno-error=overflow \ + -Wno-error=sequence-point \ + -Wno-error=strict-overflow \ + -Wno-error=unused-but-set-variable .if ${COMPILER_VERSION} >= 60100 -CWARNEXTRA+= -Wno-error=nonnull-compare -Wno-error=shift-overflow +CWARNEXTRA+= -Wno-error=misleading-indentation \ + -Wno-error=nonnull-compare \ + -Wno-error=shift-overflow \ + -Wno-error=tautological-compare .endif .else # For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars. From owner-svn-src-all@freebsd.org Thu Jul 28 13:18:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49649BA649E; Thu, 28 Jul 2016 13:18:11 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19EE81C8B; Thu, 28 Jul 2016 13:18:11 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SDIA2d060759; Thu, 28 Jul 2016 13:18:10 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SDIA8J060758; Thu, 28 Jul 2016 13:18:10 GMT (envelope-from br@FreeBSD.org) Message-Id: <201607281318.u6SDIA8J060758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 28 Jul 2016 13:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303439 - head/sys/modules/dtrace/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 13:18:11 -0000 Author: br Date: Thu Jul 28 13:18:10 2016 New Revision: 303439 URL: https://svnweb.freebsd.org/changeset/base/303439 Log: Build DTrace assym.o with -msoft-float flag for RISC-V so we have correct flag in ELF file. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sys/modules/dtrace/dtrace/Makefile Modified: head/sys/modules/dtrace/dtrace/Makefile ============================================================================== --- head/sys/modules/dtrace/dtrace/Makefile Thu Jul 28 13:15:23 2016 (r303438) +++ head/sys/modules/dtrace/dtrace/Makefile Thu Jul 28 13:18:10 2016 (r303439) @@ -58,6 +58,11 @@ assym.o: assym.s ${AS} -meabi=5 -o assym.o assym.s .endif +.if ${MACHINE_CPUARCH} == "riscv" +assym.o: assym.s + ${AS} -msoft-float -o assym.o assym.s +.endif + .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h From owner-svn-src-all@freebsd.org Thu Jul 28 13:21:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0247ABA657B; Thu, 28 Jul 2016 13:21:47 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C98A81F83; Thu, 28 Jul 2016 13:21:46 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SDLk5u063565; Thu, 28 Jul 2016 13:21:46 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SDLjan063563; Thu, 28 Jul 2016 13:21:45 GMT (envelope-from br@FreeBSD.org) Message-Id: <201607281321.u6SDLjan063563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 28 Jul 2016 13:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303440 - in head/sys/modules: i2c/iicbb uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 13:21:47 -0000 Author: br Date: Thu Jul 28 13:21:45 2016 New Revision: 303440 URL: https://svnweb.freebsd.org/changeset/base/303440 Log: Build ofw_bus_if.h for modules for RISC-V. Modified: head/sys/modules/i2c/iicbb/Makefile head/sys/modules/uart/Makefile Modified: head/sys/modules/i2c/iicbb/Makefile ============================================================================== --- head/sys/modules/i2c/iicbb/Makefile Thu Jul 28 13:18:10 2016 (r303439) +++ head/sys/modules/i2c/iicbb/Makefile Thu Jul 28 13:21:45 2016 (r303440) @@ -2,7 +2,8 @@ .PATH: ${.CURDIR}/../../../dev/iicbus .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ - ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" + ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" || \ + ${MACHINE_CPUARCH} == "riscv" ofw_bus_if= ofw_bus_if.h .endif KMOD = iicbb Modified: head/sys/modules/uart/Makefile ============================================================================== --- head/sys/modules/uart/Makefile Thu Jul 28 13:18:10 2016 (r303439) +++ head/sys/modules/uart/Makefile Thu Jul 28 13:21:45 2016 (r303440) @@ -11,7 +11,8 @@ uart_dev_lpc= uart_dev_lpc.c .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ - ${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "powerpc" + ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "riscv" || \ + ${MACHINE_CPUARCH} == "sparc64" ofw_bus_if= ofw_bus_if.h .endif From owner-svn-src-all@freebsd.org Thu Jul 28 13:35:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36FB1BA6A76; Thu, 28 Jul 2016 13:35:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F05541991; Thu, 28 Jul 2016 13:35:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SDZk0w068273; Thu, 28 Jul 2016 13:35:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SDZk2Q068272; Thu, 28 Jul 2016 13:35:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607281335.u6SDZk2Q068272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 28 Jul 2016 13:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303441 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 13:35:47 -0000 Author: emaste Date: Thu Jul 28 13:35:46 2016 New Revision: 303441 URL: https://svnweb.freebsd.org/changeset/base/303441 Log: Regenerate src.conf.5 after r303394 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Jul 28 13:21:45 2016 (r303440) +++ head/share/man/man5/src.conf.5 Thu Jul 28 13:35:46 2016 (r303441) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery .\" $FreeBSD$ -.Dd June 28, 2016 +.Dd July 28, 2016 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1002,13 +1002,13 @@ amd64/amd64 and arm64/aarch64. Set to use GCC's stack unwinder (instead of LLVM's libunwind). .Pp It is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +arm/arm, arm/armeb, arm/armv6, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_LLVM_LIBUNWIND .\" from FreeBSD: head/tools/build/options/WITH_LLVM_LIBUNWIND 293450 2016-01-09 00:42:07Z emaste Set to use LLVM's libunwind stack unwinder (instead of GCC's unwinder). .Pp It is a default setting on -arm64/aarch64. +amd64/amd64, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITHOUT_LOCALES .\" from FreeBSD: head/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru Set to not build localization files; see From owner-svn-src-all@freebsd.org Thu Jul 28 13:54:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 817A9BA6E90; Thu, 28 Jul 2016 13:54:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CB671369; Thu, 28 Jul 2016 13:54:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SDslxW075433; Thu, 28 Jul 2016 13:54:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SDskEb075421; Thu, 28 Jul 2016 13:54:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607281354.u6SDskEb075421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 28 Jul 2016 13:54:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303442 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 13:54:48 -0000 Author: emaste Date: Thu Jul 28 13:54:46 2016 New Revision: 303442 URL: https://svnweb.freebsd.org/changeset/base/303442 Log: remove CONSTRUCTORS from kernel linker scripts The linker script CONSTRUCTORS keyword is only meaningful "when linking object file formats which do not support arbitrary sections, such as ECOFF and XCOFF"[1] and is ignored for other object file formats. LLVM's lld does not yet accept (and ignore) CONSTRUCTORS, so just remove CONSTRUCTORS from the linker scripts as it has no effect. [1] https://sourceware.org/binutils/docs/ld/Output-Section-Keywords.html Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7343 Modified: head/sys/conf/ldscript.amd64 head/sys/conf/ldscript.arm head/sys/conf/ldscript.arm64 head/sys/conf/ldscript.i386 head/sys/conf/ldscript.mips head/sys/conf/ldscript.mips.cfe head/sys/conf/ldscript.mips.mips64 head/sys/conf/ldscript.mips.octeon1 head/sys/conf/ldscript.powerpc head/sys/conf/ldscript.powerpc64 head/sys/conf/ldscript.riscv head/sys/conf/ldscript.sparc64 Modified: head/sys/conf/ldscript.amd64 ============================================================================== --- head/sys/conf/ldscript.amd64 Thu Jul 28 13:35:46 2016 (r303441) +++ head/sys/conf/ldscript.amd64 Thu Jul 28 13:54:46 2016 (r303442) @@ -149,7 +149,6 @@ SECTIONS { *(.data .data.* .gnu.linkonce.d.*) KEEP (*(.gnu.linkonce.d.*personality*)) - SORT(CONSTRUCTORS) } .data1 : { *(.data1) } _edata = .; PROVIDE (edata = .); Modified: head/sys/conf/ldscript.arm ============================================================================== --- head/sys/conf/ldscript.arm Thu Jul 28 13:35:46 2016 (r303441) +++ head/sys/conf/ldscript.arm Thu Jul 28 13:54:46 2016 (r303442) @@ -76,7 +76,6 @@ SECTIONS { *(.data) *(.gnu.linkonce.d*) - CONSTRUCTORS } .data1 : { *(.data1) } . = ALIGN(32 / 8); Modified: head/sys/conf/ldscript.arm64 ============================================================================== --- head/sys/conf/ldscript.arm64 Thu Jul 28 13:35:46 2016 (r303441) +++ head/sys/conf/ldscript.arm64 Thu Jul 28 13:54:46 2016 (r303442) @@ -76,7 +76,6 @@ SECTIONS { *(.data) *(.gnu.linkonce.d*) - CONSTRUCTORS } .data1 : { *(.data1) } . = ALIGN(32 / 8); Modified: head/sys/conf/ldscript.i386 ============================================================================== --- head/sys/conf/ldscript.i386 Thu Jul 28 13:35:46 2016 (r303441) +++ head/sys/conf/ldscript.i386 Thu Jul 28 13:54:46 2016 (r303442) @@ -137,7 +137,6 @@ SECTIONS { *(.data .data.* .gnu.linkonce.d.*) KEEP (*(.gnu.linkonce.d.*personality*)) - SORT(CONSTRUCTORS) } .data1 : { *(.data1) } _edata = .; PROVIDE (edata = .); Modified: head/sys/conf/ldscript.mips ============================================================================== --- head/sys/conf/ldscript.mips Thu Jul 28 13:35:46 2016 (r303441) +++ head/sys/conf/ldscript.mips Thu Jul 28 13:54:46 2016 (r303442) @@ -184,7 +184,6 @@ SECTIONS *(.data) *(.data.*) *(.gnu.linkonce.d.*) - SORT(CONSTRUCTORS) } .data1 : { *(.data1) } .eh_frame : { KEEP (*(.eh_frame)) } Modified: head/sys/conf/ldscript.mips.cfe ============================================================================== --- head/sys/conf/ldscript.mips.cfe Thu Jul 28 13:35:46 2016 (r303441) +++ head/sys/conf/ldscript.mips.cfe Thu Jul 28 13:54:46 2016 (r303442) @@ -201,7 +201,6 @@ SECTIONS *(.data) *(.data.*) *(.gnu.linkonce.d.*) - SORT(CONSTRUCTORS) } :data .data1 : { *(.data1) } .eh_frame : { KEEP (*(.eh_frame)) } Modified: head/sys/conf/ldscript.mips.mips64 ============================================================================== --- head/sys/conf/ldscript.mips.mips64 Thu Jul 28 13:35:46 2016 (r303441) +++ head/sys/conf/ldscript.mips.mips64 Thu Jul 28 13:54:46 2016 (r303442) @@ -185,7 +185,6 @@ SECTIONS *(.data) *(.data.*) *(.gnu.linkonce.d.*) - SORT(CONSTRUCTORS) } .data1 : { *(.data1) } .eh_frame : { KEEP (*(.eh_frame)) } Modified: head/sys/conf/ldscript.mips.octeon1 ============================================================================== --- head/sys/conf/ldscript.mips.octeon1 Thu Jul 28 13:35:46 2016 (r303441) +++ head/sys/conf/ldscript.mips.octeon1 Thu Jul 28 13:54:46 2016 (r303442) @@ -28,7 +28,6 @@ SECTIONS { _rwdata = .; *(.data) . = ALIGN(32); - CONSTRUCTORS; } _gp = (. + 0x8000); Modified: head/sys/conf/ldscript.powerpc ============================================================================== --- head/sys/conf/ldscript.powerpc Thu Jul 28 13:35:46 2016 (r303441) +++ head/sys/conf/ldscript.powerpc Thu Jul 28 13:54:46 2016 (r303442) @@ -63,7 +63,6 @@ SECTIONS { *(.data) *(.gnu.linkonce.d*) - CONSTRUCTORS } .data1 : { *(.data1) } .got1 : { *(.got1) } Modified: head/sys/conf/ldscript.powerpc64 ============================================================================== --- head/sys/conf/ldscript.powerpc64 Thu Jul 28 13:35:46 2016 (r303441) +++ head/sys/conf/ldscript.powerpc64 Thu Jul 28 13:54:46 2016 (r303442) @@ -63,7 +63,6 @@ SECTIONS { *(.data) *(.gnu.linkonce.d*) - CONSTRUCTORS } .data1 : { *(.data1) } .toc1 : ALIGN(8) { *(.toc1) } Modified: head/sys/conf/ldscript.riscv ============================================================================== --- head/sys/conf/ldscript.riscv Thu Jul 28 13:35:46 2016 (r303441) +++ head/sys/conf/ldscript.riscv Thu Jul 28 13:54:46 2016 (r303442) @@ -63,7 +63,6 @@ SECTIONS { *(.data) *(.gnu.linkonce.d*) - CONSTRUCTORS } .data1 : { *(.data1) } . = ALIGN(32 / 8); Modified: head/sys/conf/ldscript.sparc64 ============================================================================== --- head/sys/conf/ldscript.sparc64 Thu Jul 28 13:35:46 2016 (r303441) +++ head/sys/conf/ldscript.sparc64 Thu Jul 28 13:54:46 2016 (r303442) @@ -154,7 +154,6 @@ SECTIONS *(.data) *(.data.*) *(.gnu.linkonce.d.*) - SORT(CONSTRUCTORS) } .data1 : { *(.data1) } .eh_frame : { KEEP (*(.eh_frame)) } From owner-svn-src-all@freebsd.org Thu Jul 28 15:17:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E83DBA6197; Thu, 28 Jul 2016 15:17:13 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E9821EC2; Thu, 28 Jul 2016 15:17:13 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SFHCne005617; Thu, 28 Jul 2016 15:17:12 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SFHC6S005616; Thu, 28 Jul 2016 15:17:12 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607281517.u6SFHC6S005616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Jul 2016 15:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303443 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 15:17:13 -0000 Author: ed Date: Thu Jul 28 15:17:12 2016 New Revision: 303443 URL: https://svnweb.freebsd.org/changeset/base/303443 Log: Don't call basename() and dirname() in an unportable way. POSIX allows these functions to modify their input buffer, so that they have storage for the return value. Pull copies of the filename before calling these utility functions. Modified: head/usr.bin/sed/main.c Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Thu Jul 28 13:54:46 2016 (r303442) +++ head/usr.bin/sed/main.c Thu Jul 28 15:17:12 2016 (r303443) @@ -301,6 +301,7 @@ mf_fgets(SPACE *sp, enum e_spflag spflag { struct stat sb; ssize_t len; + char *dirbuf, *basebuf; static char *p = NULL; static size_t plen = 0; int c; @@ -389,9 +390,14 @@ mf_fgets(SPACE *sp, enum e_spflag spflag if ((size_t)len > sizeof(oldfname)) errx(1, "%s: name too long", fname); } + if ((dirbuf = strdup(fname)) == NULL || + (basebuf = strdup(fname)) == NULL) + err(1, "strdup"); len = snprintf(tmpfname, sizeof(tmpfname), - "%s/.!%ld!%s", dirname(fname), (long)getpid(), - basename(fname)); + "%s/.!%ld!%s", dirname(dirbuf), (long)getpid(), + basename(basebuf)); + free(dirbuf); + free(basebuf); if ((size_t)len >= sizeof(tmpfname)) errx(1, "%s: name too long", fname); unlink(tmpfname); From owner-svn-src-all@freebsd.org Thu Jul 28 15:19:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26839BA6245; Thu, 28 Jul 2016 15:19:49 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7BD3121F; Thu, 28 Jul 2016 15:19:48 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SFJmk5005732; Thu, 28 Jul 2016 15:19:48 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SFJmij005731; Thu, 28 Jul 2016 15:19:48 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607281519.u6SFJmij005731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Jul 2016 15:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303444 - head/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 15:19:49 -0000 Author: ed Date: Thu Jul 28 15:19:47 2016 New Revision: 303444 URL: https://svnweb.freebsd.org/changeset/base/303444 Log: Call basename() in a portable way. Pull a copy of the filename string before calling basename(). Change the loop to not return on its own, so we can put a free() statement at the bottom. Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Thu Jul 28 15:17:12 2016 (r303443) +++ head/usr.bin/grep/util.c Thu Jul 28 15:19:47 2016 (r303444) @@ -58,21 +58,26 @@ static int procline(struct str *l, int) bool file_matching(const char *fname) { - char *fname_base; + char *fname_base, *fname_buf; bool ret; ret = finclude ? false : true; - fname_base = basename(fname); + fname_buf = strdup(fname); + if (fname_buf == NULL) + err(2, "strdup"); + fname_base = basename(fname_buf); for (unsigned int i = 0; i < fpatterns; ++i) { if (fnmatch(fpattern[i].pat, fname, 0) == 0 || fnmatch(fpattern[i].pat, fname_base, 0) == 0) { - if (fpattern[i].mode == EXCL_PAT) - return (false); - else + if (fpattern[i].mode == EXCL_PAT) { + ret = false; + break; + } else ret = true; } } + free(fname_buf); return (ret); } From owner-svn-src-all@freebsd.org Thu Jul 28 15:33:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2E69BA6712; Thu, 28 Jul 2016 15:33:20 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B37CA1A87; Thu, 28 Jul 2016 15:33:20 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SFXJhb012673; Thu, 28 Jul 2016 15:33:19 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SFXJLU012672; Thu, 28 Jul 2016 15:33:19 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607281533.u6SFXJLU012672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Jul 2016 15:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303445 - head/usr.sbin/uathload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 15:33:21 -0000 Author: ed Date: Thu Jul 28 15:33:19 2016 New Revision: 303445 URL: https://svnweb.freebsd.org/changeset/base/303445 Log: Call basename() and dirname() in the POSIXly correct way. Pull copies of the input string, as these functions are allowed to modify them. Free the copies after creating the new pathname string. Modified: head/usr.sbin/uathload/uathload.c Modified: head/usr.sbin/uathload/uathload.c ============================================================================== --- head/usr.sbin/uathload/uathload.c Thu Jul 28 15:19:47 2016 (r303444) +++ head/usr.sbin/uathload/uathload.c Thu Jul 28 15:33:19 2016 (r303445) @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -84,19 +85,30 @@ extern uint8_t _binary_ar5523_bin_end; static int getdevname(const char *devname, char *msgdev, char *datadev) { - char *bn, *dn; + char *bn, *bnbuf, *dn, *dnbuf; - dn = dirname(devname); - if (dn == NULL) + dnbuf = strdup(devname); + if (dnbuf == NULL) return (-1); - bn = basename(devname); - if (bn == NULL || strncmp(bn, "ugen", 4)) + dn = dirname(dnbuf); + bnbuf = strdup(devname); + if (bnbuf == NULL) { + free(dnbuf); return (-1); + } + bn = basename(bnbuf); + if (strncmp(bn, "ugen", 4) != 0) { + free(dnbuf); + free(bnbuf); + return (-1); + } bn += 4; /* NB: pipes are hardcoded */ snprintf(msgdev, 256, "%s/usb/%s.1", dn, bn); snprintf(datadev, 256, "%s/usb/%s.2", dn, bn); + free(dnbuf); + free(bnbuf); return (0); } From owner-svn-src-all@freebsd.org Thu Jul 28 15:49:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E0E5BA7310; Thu, 28 Jul 2016 15:49:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D53911612; Thu, 28 Jul 2016 15:49:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SFnqdo016698; Thu, 28 Jul 2016 15:49:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SFnqQK016697; Thu, 28 Jul 2016 15:49:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607281549.u6SFnqQK016697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Jul 2016 15:49:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303446 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 15:49:53 -0000 Author: kib Date: Thu Jul 28 15:49:51 2016 New Revision: 303446 URL: https://svnweb.freebsd.org/changeset/base/303446 Log: Fix style and typo. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Thu Jul 28 15:33:19 2016 (r303445) +++ head/sys/vm/swap_pager.c Thu Jul 28 15:49:51 2016 (r303446) @@ -390,8 +390,8 @@ static int dmmax; static int nswap_lowat = 128; /* in pages, swap_pager_almost_full warn */ static int nswap_hiwat = 512; /* in pages, swap_pager_almost_full warn */ -SYSCTL_INT(_vm, OID_AUTO, dmmax, - CTLFLAG_RD, &dmmax, 0, "Maximum size of a swap block"); +SYSCTL_INT(_vm, OID_AUTO, dmmax, CTLFLAG_RD, &dmmax, 0, + "Maximum size of a swap block"); static void swp_sizecheck(void); static void swp_pager_async_iodone(struct buf *bp); @@ -2432,7 +2432,7 @@ swapgeom_acquire(struct g_consumer *cp) /* * Remove a reference from the g_consumer. Post a close event if - * all referneces go away. + * all references go away. */ static void swapgeom_release(struct g_consumer *cp, struct swdevt *sp) @@ -2598,7 +2598,7 @@ swapongeom_ev(void *arg, int flags) if (gp == NULL) gp = g_new_geomf(&g_swap_class, "swap"); cp = g_new_consumer(gp); - cp->index = 1; /* Number of active I/Os, plus one for being active. */ + cp->index = 1; /* Number of active I/Os, plus one for being active. */ cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; g_attach(cp, pp); /* From owner-svn-src-all@freebsd.org Thu Jul 28 15:54:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62967BA74AA; Thu, 28 Jul 2016 15:54:19 +0000 (UTC) (envelope-from robak@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5483D1A28; Thu, 28 Jul 2016 15:54:18 +0000 (UTC) (envelope-from robak@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SFsHDj020114; Thu, 28 Jul 2016 15:54:17 GMT (envelope-from robak@FreeBSD.org) Received: (from robak@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SFsHVJ020110; Thu, 28 Jul 2016 15:54:17 GMT (envelope-from robak@FreeBSD.org) Message-Id: <201607281554.u6SFsHVJ020110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: robak set sender to robak@FreeBSD.org using -f From: Bartek Rutkowski Date: Thu, 28 Jul 2016 15:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303447 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 15:54:19 -0000 Author: robak (ports committer) Date: Thu Jul 28 15:54:17 2016 New Revision: 303447 URL: https://svnweb.freebsd.org/changeset/base/303447 Log: MFC r302897: Add new System Hardening menu and options to bsdinstall. This patch add new 'hardening' file responsible for new bsdinstall 'System Hardening' menu allowing users to set some sane and carefully picked system security options (like random process id's, hiding other users/groups processes and others). All options are OFF by default in this patch due to POLA principle with intention to turn change some of them to ON by default in future. Reviewed by: adrian, allanjude, bdrewery, nwhitehorn Approved by: re@, adrian, allanjude Added: stable/11/usr.sbin/bsdinstall/scripts/hardening - copied unchanged from r302897, head/usr.sbin/bsdinstall/scripts/hardening Modified: stable/11/usr.sbin/bsdinstall/scripts/Makefile stable/11/usr.sbin/bsdinstall/scripts/auto stable/11/usr.sbin/bsdinstall/scripts/config Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/Makefile ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/Makefile Thu Jul 28 15:49:51 2016 (r303446) +++ stable/11/usr.sbin/bsdinstall/scripts/Makefile Thu Jul 28 15:54:17 2016 (r303447) @@ -1,6 +1,6 @@ # $FreeBSD$ -SCRIPTS= auto adduser checksum config docsinstall entropy hostname jail \ +SCRIPTS= auto adduser checksum config docsinstall entropy hardening hostname jail \ keymap mirrorselect mount netconfig netconfig_ipv4 netconfig_ipv6 \ rootpass script services time umount wlanconfig zfsboot BINDIR= ${LIBEXECDIR}/bsdinstall Modified: stable/11/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/auto Thu Jul 28 15:49:51 2016 (r303446) +++ stable/11/usr.sbin/bsdinstall/scripts/auto Thu Jul 28 15:54:17 2016 (r303447) @@ -385,6 +385,7 @@ if [ "$NETCONFIG_DONE" != yes ]; then fi bsdinstall time bsdinstall services +bsdinstall hardening dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \ "Would you like to add users to the installed system now?" 0 0 && \ @@ -401,6 +402,7 @@ finalconfig() { "Hostname" "Set system hostname" \ "Network" "Networking configuration" \ "Services" "Set daemons to run on startup" \ + "System Hardening" "Set security options" \ "Time Zone" "Set system timezone" \ "Handbook" "Install FreeBSD Handbook (requires network)" 2>&1 1>&3) exec 3>&- @@ -426,6 +428,10 @@ finalconfig() { bsdinstall services finalconfig ;; + "System Hardening") + bsdinstall hardening + finalconfig + ;; "Time Zone") bsdinstall time finalconfig Modified: stable/11/usr.sbin/bsdinstall/scripts/config ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/config Thu Jul 28 15:49:51 2016 (r303446) +++ stable/11/usr.sbin/bsdinstall/scripts/config Thu Jul 28 15:54:17 2016 (r303447) @@ -32,6 +32,9 @@ cat $BSDINSTALL_TMPETC/rc.conf.* >> $BSDINSTALL_TMPETC/rc.conf rm $BSDINSTALL_TMPETC/rc.conf.* +cat $BSDINSTALL_CHROOT/etc/sysctl.conf $BSDINSTALL_TMPETC/sysctl.conf.hardening >> $BSDINSTALL_TMPETC/sysctl.conf +rm $BSDINSTALL_TMPETC/sysctl.conf.* + cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHROOT/etc cat $BSDINSTALL_TMPBOOT/loader.conf.* >> $BSDINSTALL_TMPBOOT/loader.conf Copied: stable/11/usr.sbin/bsdinstall/scripts/hardening (from r302897, head/usr.sbin/bsdinstall/scripts/hardening) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.sbin/bsdinstall/scripts/hardening Thu Jul 28 15:54:17 2016 (r303447, copy of r302897, head/usr.sbin/bsdinstall/scripts/hardening) @@ -0,0 +1,79 @@ +#!/bin/sh +#- +# Copyright (c) 2016 Bartek Rutkowski +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +: ${DIALOG_OK=0} + +echo -n > $BSDINSTALL_TMPETC/rc.conf.services + +exec 3>&1 +FEATURES=$( dialog --backtitle "FreeBSD Installer" \ + --title "System Hardening" --nocancel --notags --separate-output \ + --checklist "Choose system security hardening options:" \ + 0 0 0 \ + "hide_uids" "Hide processes running as other users" ${hide_uids:-off} \ + "hide_gids" "Hide processes running as other groups" ${hide_gids:-off} \ + "read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-off} \ + "proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-off} \ + "random_pid" "Randomize the PID of newly created processes" ${random_id:-off} \ + "stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-off} \ + "clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-off} \ + "disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ + "disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ +2>&1 1>&3 ) +exec 3>&- + +for feature in $FEATURES; do + if [ "$feature" = "hide_uids" ]; then + echo security.bsd.see_other_uids=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "hide_gids" ]; then + echo security.bsd.see_other_gids=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "read_msgbuf" ]; then + echo security.bsd.unprivileged_read_msgbuf=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "proc_debug" ]; then + echo security.bsd.unprivileged_proc_debug=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "random_id" ]; then + echo kern.randompid=$(jot -r 1 9999) >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "stack_guard" ]; then + echo security.bsd.stack_guard_page=1 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "clear_tmp" ]; then + echo 'clear_tmp_enable="YES"' >> $BSDINSTALL_TMPETC/rc.conf.hardening + fi + if [ "$feature" = "disable_syslogd" ]; then + echo 'syslogd_flags="-ss"' >> $BSDINSTALL_TMPETC/rc.conf.hardening + fi + if [ "$feature" = "disable_sendmail" ]; then + echo 'sendmail_enable="NONE"' >> $BSDINSTALL_TMPETC/rc.conf.hardening + fi +done + From owner-svn-src-all@freebsd.org Thu Jul 28 15:57:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEB45BA7529; Thu, 28 Jul 2016 15:57:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCBB81BD5; Thu, 28 Jul 2016 15:57:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SFv1mR020277; Thu, 28 Jul 2016 15:57:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SFv1aE020276; Thu, 28 Jul 2016 15:57:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607281557.u6SFv1aE020276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Jul 2016 15:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303448 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 15:57:03 -0000 Author: kib Date: Thu Jul 28 15:57:01 2016 New Revision: 303448 URL: https://svnweb.freebsd.org/changeset/base/303448 Log: Do not delegate a work to geom event thread which can be done inline. In particular, swapongeom_ev() needed event thread context when swap pager configuration was performed under Giant and geom asserted that Giant is not owned. Now both of the reason went away. On the other hand, note that swpageom_release() is called from the bio_done context, and possible close cannot be performed inline. Also fix some minor issues. The swapgeom() function does not use the td argument, remove it. Recheck that the vnode passed is still VCHR and not reclaimed after the lock. Reviewed by: mav Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Thu Jul 28 15:54:17 2016 (r303447) +++ head/sys/vm/swap_pager.c Thu Jul 28 15:57:01 2016 (r303448) @@ -395,7 +395,7 @@ SYSCTL_INT(_vm, OID_AUTO, dmmax, CTLFLAG static void swp_sizecheck(void); static void swp_pager_async_iodone(struct buf *bp); -static int swapongeom(struct thread *, struct vnode *); +static int swapongeom(struct vnode *); static int swaponvp(struct thread *, struct vnode *, u_long); static int swapoff_one(struct swdevt *sp, struct ucred *cred); @@ -2019,7 +2019,7 @@ sys_swapon(struct thread *td, struct swa vp = nd.ni_vp; if (vn_isdisk(vp, &error)) { - error = swapongeom(td, vp); + error = swapongeom(vp); } else if (vp->v_type == VREG && (vp->v_mount->mnt_vfc->vfc_flags & VFCF_NETWORK) != 0 && (error = VOP_GETATTR(vp, &attr, td->td_ucred)) == 0) { @@ -2560,17 +2560,9 @@ swapgeom_close(struct thread *td, struct g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); } - -struct swh0h0 { - struct cdev *dev; - struct vnode *vp; - int error; -}; - -static void -swapongeom_ev(void *arg, int flags) +static int +swapongeom_locked(struct cdev *dev, struct vnode *vp) { - struct swh0h0 *swh; struct g_provider *pp; struct g_consumer *cp; static struct g_geom *gp; @@ -2578,20 +2570,15 @@ swapongeom_ev(void *arg, int flags) u_long nblks; int error; - swh = arg; - swh->error = 0; - pp = g_dev_getprovider(swh->dev); - if (pp == NULL) { - swh->error = ENODEV; - return; - } + pp = g_dev_getprovider(dev); + if (pp == NULL) + return (ENODEV); mtx_lock(&sw_dev_mtx); TAILQ_FOREACH(sp, &swtailq, sw_list) { cp = sp->sw_id; if (cp != NULL && cp->provider == pp) { mtx_unlock(&sw_dev_mtx); - swh->error = EBUSY; - return; + return (EBUSY); } } mtx_unlock(&sw_dev_mtx); @@ -2608,34 +2595,31 @@ swapongeom_ev(void *arg, int flags) * set an exclusive count :-( */ error = g_access(cp, 1, 1, 0); - if (error) { + if (error != 0) { g_detach(cp); g_destroy_consumer(cp); - swh->error = error; - return; + return (error); } nblks = pp->mediasize / DEV_BSIZE; - swaponsomething(swh->vp, cp, nblks, swapgeom_strategy, - swapgeom_close, dev2udev(swh->dev), + swaponsomething(vp, cp, nblks, swapgeom_strategy, + swapgeom_close, dev2udev(dev), (pp->flags & G_PF_ACCEPT_UNMAPPED) != 0 ? SW_UNMAPPED : 0); - swh->error = 0; + return (0); } static int -swapongeom(struct thread *td, struct vnode *vp) +swapongeom(struct vnode *vp) { int error; - struct swh0h0 swh; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - - swh.dev = vp->v_rdev; - swh.vp = vp; - swh.error = 0; - /* XXX: direct call when Giant untangled */ - error = g_waitfor_event(swapongeom_ev, &swh, M_WAITOK, NULL); - if (!error) - error = swh.error; + if (vp->v_type != VCHR || (vp->v_iflag & VI_DOOMED) != 0) { + error = ENOENT; + } else { + g_topology_lock(); + error = swapongeom_locked(vp->v_rdev, vp); + g_topology_unlock(); + } VOP_UNLOCK(vp, 0); return (error); } From owner-svn-src-all@freebsd.org Thu Jul 28 16:02:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB201BA7758; Thu, 28 Jul 2016 16:02:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EE411278; Thu, 28 Jul 2016 16:02:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SG2Urp023729; Thu, 28 Jul 2016 16:02:30 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SG2U3V023728; Thu, 28 Jul 2016 16:02:30 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607281602.u6SG2U3V023728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Jul 2016 16:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303449 - head/usr.sbin/newsyslog X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 16:02:31 -0000 Author: ed Date: Thu Jul 28 16:02:30 2016 New Revision: 303449 URL: https://svnweb.freebsd.org/changeset/base/303449 Log: Clean up use of basename() and dirname(). Pull copies of the input pathname string before calling basename() and dirname() to make this comply to POSIX. Free these copies at the end of this function. While there, remove the duplication of the 's' -> 'logfname' string. There is no need for this. Modified: head/usr.sbin/newsyslog/newsyslog.c Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Thu Jul 28 15:57:01 2016 (r303448) +++ head/usr.sbin/newsyslog/newsyslog.c Thu Jul 28 16:02:30 2016 (r303449) @@ -2286,26 +2286,29 @@ mtime_old_timelog(const char *file) time_t t; struct dirent *dp; DIR *dirp; - char *s, *logfname, *dir; + char *logfname, *logfnamebuf, *dir, *dirbuf; t = -1; - if ((dir = dirname(file)) == NULL) { - warn("dirname() of '%s'", file); + if ((dirbuf = strdup(file)) == NULL) { + warn("strdup() of '%s'", file); return (t); } - if ((s = basename(file)) == NULL) { - warn("basename() of '%s'", file); + dir = dirname(dirbuf); + if ((logfnamebuf = strdup(file)) == NULL) { + warn("strdup() of '%s'", file); + free(dirbuf); return (t); - } else if (s[0] == '/') { - warnx("Invalid log filename '%s'", s); - return (t); - } else if ((logfname = strdup(s)) == NULL) - err(1, "strdup()"); + } + logfname = basename(logfnamebuf); + if (logfname[0] == '/') { + warnx("Invalid log filename '%s'", logfname); + goto out; + } if ((dirp = opendir(dir)) == NULL) { warn("Cannot open log directory '%s'", dir); - return (t); + goto out; } dir_fd = dirfd(dirp); /* Open the archive dir and find the most recent archive of logfname. */ @@ -2322,6 +2325,9 @@ mtime_old_timelog(const char *file) } closedir(dirp); +out: + free(dirbuf); + free(logfnamebuf); return (t); } From owner-svn-src-all@freebsd.org Thu Jul 28 16:06:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3CE2BA78F1; Thu, 28 Jul 2016 16:06:39 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76EB71577; Thu, 28 Jul 2016 16:06:39 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SG6bZH023912; Thu, 28 Jul 2016 16:06:37 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SG6bEx023911; Thu, 28 Jul 2016 16:06:37 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607281606.u6SG6bEx023911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Jul 2016 16:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303450 - head/usr.bin/xinstall X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 16:06:39 -0000 Author: ed Date: Thu Jul 28 16:06:37 2016 New Revision: 303450 URL: https://svnweb.freebsd.org/changeset/base/303450 Log: Pull a copy of the input string before calling basename() and dirname(). POSIX allows implementations of these functions to modify their input. Modified: head/usr.bin/xinstall/xinstall.c Modified: head/usr.bin/xinstall/xinstall.c ============================================================================== --- head/usr.bin/xinstall/xinstall.c Thu Jul 28 16:02:30 2016 (r303449) +++ head/usr.bin/xinstall/xinstall.c Thu Jul 28 16:06:37 2016 (r303450) @@ -656,7 +656,7 @@ makelink(const char *from_name, const ch } if (dolink & LN_RELATIVE) { - char *cp, *d, *s; + char *to_name_copy, *cp, *d, *s; if (*from_name != '/') { /* this is already a relative link */ @@ -674,7 +674,10 @@ makelink(const char *from_name, const ch * The last component of to_name may be a symlink, * so use realpath to resolve only the directory. */ - cp = dirname(to_name); + to_name_copy = strdup(to_name); + if (to_name_copy == NULL) + err(EX_OSERR, "%s: strdup", to_name); + cp = dirname(to_name_copy); if (realpath(cp, dst) == NULL) err(EX_OSERR, "%s: realpath", cp); /* .. and add the last component. */ @@ -682,9 +685,11 @@ makelink(const char *from_name, const ch if (strlcat(dst, "/", sizeof(dst)) > sizeof(dst)) errx(1, "resolved pathname too long"); } - cp = basename(to_name); + strcpy(to_name_copy, to_name); + cp = basename(to_name_copy); if (strlcat(dst, cp, sizeof(dst)) > sizeof(dst)) errx(1, "resolved pathname too long"); + free(to_name_copy); /* Trim common path components. */ for (s = src, d = dst; *s == *d; s++, d++) From owner-svn-src-all@freebsd.org Thu Jul 28 16:20:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA19CBA7C0B; Thu, 28 Jul 2016 16:20:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 855B11E05; Thu, 28 Jul 2016 16:20:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SGKRNB027764; Thu, 28 Jul 2016 16:20:27 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SGKRAp027759; Thu, 28 Jul 2016 16:20:27 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607281620.u6SGKRAp027759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Jul 2016 16:20:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303451 - in head: include 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 16:20:28 -0000 Author: ed Date: Thu Jul 28 16:20:27 2016 New Revision: 303451 URL: https://svnweb.freebsd.org/changeset/base/303451 Log: Fix up prototypes of basename(3) and dirname(3) to comply to POSIX. POSIX allows these functions to be implemented in a way that the resulting string is stored in the input buffer. Though some may find this annoying, this has the advantage that it makes it possible to implement this function in a thread-safe way. It also means that they can be implemented in a way that they work for paths of arbitrary length, as the output string of these functions is never longer than max(1, len(input)). Portable code already needs to be written with this in mind, so in my opinion it makes very little sense to allow the existing behaviour. Prevent the base system from falling back to this by switching over to POSIX prototypes. I'm not going to bump the __FreeBSD_version for this. The reason is that it's possible to account for this change in a portable way, without depending on a specific version of FreeBSD. An exp-run was done some time ago. As far as I know, all regressions as a result of this have already been fixed. I'll give this change some time to settle. In the long run I want to replace our copies by ones that are thread-safe and don't depend on PATH_MAX/MAXPATHLEN. Modified: head/include/libgen.h head/lib/libc/gen/basename.3 head/lib/libc/gen/basename.c head/lib/libc/gen/dirname.3 head/lib/libc/gen/dirname.c Modified: head/include/libgen.h ============================================================================== --- head/include/libgen.h Thu Jul 28 16:06:37 2016 (r303450) +++ head/include/libgen.h Thu Jul 28 16:20:27 2016 (r303451) @@ -34,9 +34,9 @@ #include __BEGIN_DECLS -char *basename(const char *); +char *basename(char *); char *basename_r(const char *, char *); -char *dirname(const char *); +char *dirname(char *); __END_DECLS #endif /* !_LIBGEN_H_ */ Modified: head/lib/libc/gen/basename.3 ============================================================================== --- head/lib/libc/gen/basename.3 Thu Jul 28 16:06:37 2016 (r303450) +++ head/lib/libc/gen/basename.3 Thu Jul 28 16:20:27 2016 (r303451) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 31, 2010 +.Dd July 28, 2016 .Dt BASENAME 3 .Os .Sh NAME @@ -25,7 +25,7 @@ .Sh SYNOPSIS .In libgen.h .Ft char * -.Fn basename "const char *path" +.Fn basename "char *path" .Ft char * .Fn basename_r "const char *path" "char *bname" .Sh DESCRIPTION Modified: head/lib/libc/gen/basename.c ============================================================================== --- head/lib/libc/gen/basename.c Thu Jul 28 16:06:37 2016 (r303450) +++ head/lib/libc/gen/basename.c Thu Jul 28 16:20:27 2016 (r303451) @@ -66,7 +66,7 @@ basename_r(const char *path, char *bname } char * -basename(const char *path) +basename(char *path) { static char *bname = NULL; Modified: head/lib/libc/gen/dirname.3 ============================================================================== --- head/lib/libc/gen/dirname.3 Thu Jul 28 16:06:37 2016 (r303450) +++ head/lib/libc/gen/dirname.3 Thu Jul 28 16:20:27 2016 (r303451) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2006 +.Dd July 28, 2016 .Dt DIRNAME 3 .Os .Sh NAME @@ -25,7 +25,7 @@ .Sh SYNOPSIS .In libgen.h .Ft char * -.Fn dirname "const char *path" +.Fn dirname "char *path" .Sh DESCRIPTION The .Fn dirname Modified: head/lib/libc/gen/dirname.c ============================================================================== --- head/lib/libc/gen/dirname.c Thu Jul 28 16:06:37 2016 (r303450) +++ head/lib/libc/gen/dirname.c Thu Jul 28 16:20:27 2016 (r303451) @@ -26,7 +26,7 @@ __FBSDID("$FreeBSD$"); #include char * -dirname(const char *path) +dirname(char *path) { static char *dname = NULL; size_t len; From owner-svn-src-all@freebsd.org Thu Jul 28 16:54:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22A3ABA72DC; Thu, 28 Jul 2016 16:54:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E36B41FE3; Thu, 28 Jul 2016 16:54:13 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SGsDFq042664; Thu, 28 Jul 2016 16:54:13 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SGsDI0042663; Thu, 28 Jul 2016 16:54:13 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607281654.u6SGsDI0042663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 28 Jul 2016 16:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303452 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 16:54:14 -0000 Author: pfg Date: Thu Jul 28 16:54:12 2016 New Revision: 303452 URL: https://svnweb.freebsd.org/changeset/base/303452 Log: indent: avoid calling write(2) with a negative second parameter. negative_returns: n is passed to a parameter that cannot be negative. Fix a style issue while here. CID: 1008107 Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Thu Jul 28 16:20:27 2016 (r303451) +++ head/usr.bin/indent/indent.c Thu Jul 28 16:54:12 2016 (r303452) @@ -1213,7 +1213,7 @@ bakcopy(void) bakchn = creat(bakfile, 0600); if (bakchn < 0) err(1, "%s", bakfile); - while ((n = read(fileno(input), buff, sizeof buff)) != 0) + while ((n = read(fileno(input), buff, sizeof(buff))) > 0) if (write(bakchn, buff, n) != n) err(1, "%s", bakfile); if (n < 0) From owner-svn-src-all@freebsd.org Thu Jul 28 17:18:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC7FABA77DB; Thu, 28 Jul 2016 17:18:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CA9E1D47; Thu, 28 Jul 2016 17:18:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SHI2hw050257; Thu, 28 Jul 2016 17:18:02 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SHI2oB050255; Thu, 28 Jul 2016 17:18:02 GMT (envelope-from br@FreeBSD.org) Message-Id: <201607281718.u6SHI2oB050255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 28 Jul 2016 17:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303453 - in head: share/mk sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 17:18:03 -0000 Author: br Date: Thu Jul 28 17:18:02 2016 New Revision: 303453 URL: https://svnweb.freebsd.org/changeset/base/303453 Log: Normalise the CWARNFLAGS inter-word spacing: remove all leading and trailing space, and convert multiple consecutive spaces to single space. This helps to keep build output looking good. Modified: head/share/mk/bsd.sys.mk head/sys/conf/kern.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Thu Jul 28 16:54:12 2016 (r303452) +++ head/share/mk/bsd.sys.mk Thu Jul 28 17:18:02 2016 (r303453) @@ -190,7 +190,7 @@ CFLAGS+= ${SSP_CFLAGS} # Allow user-specified additional warning flags, plus compiler and file # specific flag overrides, unless we've overriden this... .if ${MK_WARNS} != "no" -CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${COMPILER_TYPE}} +CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}} CFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} .endif Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Thu Jul 28 16:54:12 2016 (r303452) +++ head/sys/conf/kern.mk Thu Jul 28 17:18:02 2016 (r303453) @@ -214,7 +214,7 @@ CFLAGS+= -fstack-protector CFLAGS+= -gdwarf-2 .endif -CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${.IMPSRC:T}} +CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${.IMPSRC:T}} CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} ${CFLAGS.${.IMPSRC:T}} # Tell bmake not to mistake standard targets for things to be searched for From owner-svn-src-all@freebsd.org Thu Jul 28 17:37:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49A15BA7CD2; Thu, 28 Jul 2016 17:37:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18F0419F1; Thu, 28 Jul 2016 17:37:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SHbCiA057752; Thu, 28 Jul 2016 17:37:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SHbCa5057751; Thu, 28 Jul 2016 17:37:12 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607281737.u6SHbCa5057751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 28 Jul 2016 17:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303454 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 17:37:13 -0000 Author: jhb Date: Thu Jul 28 17:37:12 2016 New Revision: 303454 URL: https://svnweb.freebsd.org/changeset/base/303454 Log: Mark spg_len and fl_pktshift static. These variables are no longer exported to t4_netmap.c after r296478. Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu Jul 28 17:18:02 2016 (r303453) +++ head/sys/dev/cxgbe/t4_sge.c Thu Jul 28 17:37:12 2016 (r303454) @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); * Ethernet frames are DMA'd at this byte offset into the freelist buffer. * 0-7 are valid values. */ -int fl_pktshift = 2; +static int fl_pktshift = 2; TUNABLE_INT("hw.cxgbe.fl_pktshift", &fl_pktshift); /* @@ -98,7 +98,7 @@ TUNABLE_INT("hw.cxgbe.fl_pad", &fl_pad); * -1: driver should figure out a good value. * 64 or 128 are the only other valid values. */ -int spg_len = -1; +static int spg_len = -1; TUNABLE_INT("hw.cxgbe.spg_len", &spg_len); /* From owner-svn-src-all@freebsd.org Thu Jul 28 18:39:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 877C6BA7B99; Thu, 28 Jul 2016 18:39:31 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62AC417C1; Thu, 28 Jul 2016 18:39:31 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SIdUms079820; Thu, 28 Jul 2016 18:39:30 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SIdUVf079817; Thu, 28 Jul 2016 18:39:30 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201607281839.u6SIdUVf079817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Thu, 28 Jul 2016 18:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303455 - in head/sys: netinet sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 18:39:31 -0000 Author: stevek Date: Thu Jul 28 18:39:30 2016 New Revision: 303455 URL: https://svnweb.freebsd.org/changeset/base/303455 Log: Remove BSD and USL copyright and update license block in in_prot.c, as the code in this file was written by Robert N. M. Waston. Move cr_can* prototypes from sys/systm.h to sys/proc.h Reported by: rwatson Reviewed by: rwatson Approved by: sjg (mentor) Differential Revision: https://reviews.freebsd.org/D7345 Modified: head/sys/netinet/in_prot.c head/sys/sys/proc.h head/sys/sys/systm.h Modified: head/sys/netinet/in_prot.c ============================================================================== --- head/sys/netinet/in_prot.c Thu Jul 28 17:37:12 2016 (r303454) +++ head/sys/netinet/in_prot.c Thu Jul 28 18:39:30 2016 (r303455) @@ -1,15 +1,7 @@ /*- - * Copyright (c) 1982, 1986, 1989, 1990, 1991, 1993 - * The Regents of the University of California. - * (c) UNIX System Laboratories, Inc. * Copyright (c) 2000-2001 Robert N. M. Watson. * All rights reserved. * - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -18,14 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -34,7 +23,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)kern_prot.c 8.6 (Berkeley) 1/21/94 */ /* Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Jul 28 17:37:12 2016 (r303454) +++ head/sys/sys/proc.h Thu Jul 28 18:39:30 2016 (r303455) @@ -971,6 +971,10 @@ int pget(pid_t pid, int flags, struct pr void ast(struct trapframe *framep); struct thread *choosethread(void); +int cr_cansee(struct ucred *u1, struct ucred *u2); +int cr_canseesocket(struct ucred *cred, struct socket *so); +int cr_canseeothergids(struct ucred *u1, struct ucred *u2); +int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); int cr_cansignal(struct ucred *cred, struct proc *proc, int signum); int enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess); Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Thu Jul 28 17:37:12 2016 (r303454) +++ head/sys/sys/systm.h Thu Jul 28 18:39:30 2016 (r303455) @@ -313,11 +313,6 @@ extern int cpu_deepest_sleep; extern int cpu_disable_c2_sleep; extern int cpu_disable_c3_sleep; -int cr_cansee(struct ucred *u1, struct ucred *u2); -int cr_canseesocket(struct ucred *cred, struct socket *so); -int cr_canseeothergids(struct ucred *u1, struct ucred *u2); -int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); - char *kern_getenv(const char *name); void freeenv(char *env); int getenv_int(const char *name, int *data); From owner-svn-src-all@freebsd.org Thu Jul 28 18:40:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D7D6BA7D09; Thu, 28 Jul 2016 18:40:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E2CF19DE; Thu, 28 Jul 2016 18:40:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SIehA3080676; Thu, 28 Jul 2016 18:40:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SIehtJ080675; Thu, 28 Jul 2016 18:40:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201607281840.u6SIehtJ080675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 28 Jul 2016 18:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303456 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 18:40:44 -0000 Author: dim Date: Thu Jul 28 18:40:43 2016 New Revision: 303456 URL: https://svnweb.freebsd.org/changeset/base/303456 Log: Add tblgen to ObsoleteFiles.inc, as it was renamed to llvm-tblgen. Noticed by: pluknet MFC after: 3 days Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Jul 28 18:39:30 2016 (r303455) +++ head/ObsoleteFiles.inc Thu Jul 28 18:40:43 2016 (r303456) @@ -229,6 +229,7 @@ OLD_LIBS+=usr/lib/libdevinfo.so.5 OLD_LIBS+=usr/lib32/libdevinfo.so.5 # 20160305: new clang import which bumps version from 3.7.1 to 3.8.0. OLD_FILES+=usr/bin/macho-dump +OLD_FILES+=usr/bin/tblgen OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/asan_interface.h OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/common_interface_defs.h From owner-svn-src-all@freebsd.org Thu Jul 28 19:32:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C00FBA7911; Thu, 28 Jul 2016 19:32:26 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2ECC41768; Thu, 28 Jul 2016 19:32:26 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SJWP0i001610; Thu, 28 Jul 2016 19:32:25 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SJWPCX001609; Thu, 28 Jul 2016 19:32:25 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <201607281932.u6SJWPCX001609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Thu, 28 Jul 2016 19:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303457 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 19:32:26 -0000 Author: gallatin Date: Thu Jul 28 19:32:25 2016 New Revision: 303457 URL: https://svnweb.freebsd.org/changeset/base/303457 Log: Call tcp_notify() directly to shoot down routes, rather than calling in_pcbnotifyall(). This avoids lock contention on tcbinfo due to in_pcbnotifyall() holding the tcbinfo write lock while walking all connections. Reviewed by: rrs, karels MFC after: 2 weeks Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D7251 Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Thu Jul 28 18:40:43 2016 (r303456) +++ head/sys/netinet/tcp_subr.c Thu Jul 28 19:32:25 2016 (r303457) @@ -1950,11 +1950,7 @@ tcp_ctlinput(int cmd, struct sockaddr *s else if (V_icmp_may_rst && (cmd == PRC_UNREACH_ADMIN_PROHIB || cmd == PRC_UNREACH_PORT || cmd == PRC_TIMXCEED_INTRANS) && ip) notify = tcp_drop_syn_sent; - else if (PRC_IS_REDIRECT(cmd)) { - /* signal EHOSTDOWN, as it flushes the cached route */ - in_pcbnotifyall(&V_tcbinfo, faddr, EHOSTDOWN, notify); - return; - } + /* * Hostdead is ugly because it goes linearly through all PCBs. * XXX: We never get this from ICMP, otherwise it makes an @@ -1975,7 +1971,12 @@ tcp_ctlinput(int cmd, struct sockaddr *s INP_INFO_RLOCK(&V_tcbinfo); inp = in_pcblookup(&V_tcbinfo, faddr, th->th_dport, ip->ip_src, th->th_sport, INPLOOKUP_WLOCKPCB, NULL); - if (inp != NULL) { + if (inp != NULL && PRC_IS_REDIRECT(cmd)) { + /* signal EHOSTDOWN, as it flushes the cached route */ + inp = (*notify)(inp, EHOSTDOWN); + if (inp != NULL) + INP_WUNLOCK(inp); + } else if (inp != NULL) { if (!(inp->inp_flags & INP_TIMEWAIT) && !(inp->inp_flags & INP_DROPPED) && !(inp->inp_socket == NULL)) { From owner-svn-src-all@freebsd.org Thu Jul 28 20:08:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD42CBA70B1; Thu, 28 Jul 2016 20:08:02 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 791861A8B; Thu, 28 Jul 2016 20:08:02 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SK81wY012741; Thu, 28 Jul 2016 20:08:01 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SK81AE012736; Thu, 28 Jul 2016 20:08:01 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201607282008.u6SK81AE012736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 28 Jul 2016 20:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303458 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 20:08:02 -0000 Author: sbruno Date: Thu Jul 28 20:08:01 2016 New Revision: 303458 URL: https://svnweb.freebsd.org/changeset/base/303458 Log: MFC r296063 r297397 r299213 296063: Lock the NDP default router list and count defrouter references. This addresses a number of race conditions that can cause crashes as a result of unsynchronized access to the list. 297397 Modify nd6_llinfo_timer() to acquire the nd6 lock before the LLE lock. When expiring a neighbour cache entry we may need to look up the associated default router, which requires the nd6 read lock. To avoid an LOR, the nd6 lock should be acquired first. 299213 Clean up callers of nd6_prelist_add(). nd6_prelist_add() sets *newp if and only if it is successful, so there's no need for code that handles the case where the return value is 0 and *newp == NULL. Fix some style bugs in nd6_prelist_add() while here. Submitted by: Jason Wolfe Modified: stable/10/sys/netinet6/in6.c stable/10/sys/netinet6/nd6.c stable/10/sys/netinet6/nd6.h stable/10/sys/netinet6/nd6_nbr.c stable/10/sys/netinet6/nd6_rtr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6.c ============================================================================== --- stable/10/sys/netinet6/in6.c Thu Jul 28 19:32:25 2016 (r303457) +++ stable/10/sys/netinet6/in6.c Thu Jul 28 20:08:01 2016 (r303458) @@ -732,14 +732,6 @@ in6_control(struct socket *so, u_long cm (*carp_detach_p)(&ia->ia_ifa); goto out; } - if (pr == NULL) { - if (carp_attached) - (*carp_detach_p)(&ia->ia_ifa); - log(LOG_ERR, "nd6_prelist_add succeeded but " - "no prefix\n"); - error = EINVAL; - goto out; - } } /* relate the address to the prefix */ Modified: stable/10/sys/netinet6/nd6.c ============================================================================== --- stable/10/sys/netinet6/nd6.c Thu Jul 28 19:32:25 2016 (r303457) +++ stable/10/sys/netinet6/nd6.c Thu Jul 28 20:08:01 2016 (r303458) @@ -114,6 +114,7 @@ VNET_DEFINE(int, nd6_debug) = 0; VNET_DEFINE(struct nd_drhead, nd_defrouter); VNET_DEFINE(struct nd_prhead, nd_prefix); +VNET_DEFINE(struct rwlock, nd6_lock); VNET_DEFINE(int, nd6_recalc_reachtm_interval) = ND6_RECALC_REACHTM_INTERVAL; #define V_nd6_recalc_reachtm_interval VNET(nd6_recalc_reachtm_interval) @@ -125,7 +126,7 @@ static int nd6_is_new_addr_neighbor(stru static void nd6_setmtu0(struct ifnet *, struct nd_ifinfo *); static void nd6_slowtimo(void *); static int regen_tmpaddr(struct in6_ifaddr *); -static struct llentry *nd6_free(struct llentry *, int); +static struct llentry *nd6_free(struct llentry **, int); static void nd6_llinfo_timer(void *); static void clear_llinfo_pqueue(struct llentry *); static int nd6_output_lle(struct ifnet *, struct ifnet *, struct mbuf *, @@ -142,6 +143,8 @@ void nd6_init(void) { + rw_init(&V_nd6_lock, "nd6"); + LIST_INIT(&V_nd_prefix); /* initialization of the default router list */ @@ -162,6 +165,7 @@ nd6_destroy() callout_drain(&V_nd6_slowtimo_ch); callout_drain(&V_nd6_timer_ch); + rw_destroy(&V_nd6_lock); } #endif @@ -466,10 +470,14 @@ nd6_llinfo_timer(void *arg) struct llentry *ln; struct in6_addr *dst; struct ifnet *ifp; - struct nd_ifinfo *ndi = NULL; + struct nd_ifinfo *ndi; KASSERT(arg != NULL, ("%s: arg NULL", __func__)); ln = (struct llentry *)arg; + ifp = ln->lle_tbl->llt_ifp; + CURVNET_SET(ifp->if_vnet); + + ND6_RLOCK(); LLE_WLOCK(ln); if (callout_pending(&ln->la_timer)) { /* @@ -489,10 +497,10 @@ nd6_llinfo_timer(void *arg) * would have been 1. */ LLE_WUNLOCK(ln); + ND6_RUNLOCK(); + CURVNET_RESTORE(); return; } - ifp = ln->lle_tbl->llt_ifp; - CURVNET_SET(ifp->if_vnet); if (ln->ln_ntick > 0) { if (ln->ln_ntick > INT_MAX) { @@ -512,8 +520,7 @@ nd6_llinfo_timer(void *arg) } if (ln->la_flags & LLE_DELETED) { - (void)nd6_free(ln, 0); - ln = NULL; + (void)nd6_free(&ln, 0); goto done; } @@ -539,9 +546,7 @@ nd6_llinfo_timer(void *arg) ln->la_hold = m0; clear_llinfo_pqueue(ln); } - EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_TIMEDOUT); - (void)nd6_free(ln, 0); - ln = NULL; + (void)nd6_free(&ln, 0); if (m != NULL) icmp6_error2(m, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADDR, 0, ifp); @@ -558,7 +563,7 @@ nd6_llinfo_timer(void *arg) /* Garbage Collection(RFC 2461 5.3) */ if (!ND6_LLINFO_PERMANENT(ln)) { EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_EXPIRED); - (void)nd6_free(ln, 1); + (void)nd6_free(&ln, 1); ln = NULL; } break; @@ -585,9 +590,7 @@ nd6_llinfo_timer(void *arg) nd6_ns_output(ifp, dst, dst, ln, NULL); LLE_WLOCK(ln); } else { - EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_EXPIRED); - (void)nd6_free(ln, 0); - ln = NULL; + (void)nd6_free(&ln, 0); } break; default: @@ -595,8 +598,10 @@ nd6_llinfo_timer(void *arg) __func__, ln->ln_state); } done: - if (ln != NULL) + if (ln != NULL) { + ND6_RUNLOCK(); LLE_FREE_LOCKED(ln); + } CURVNET_RESTORE(); } @@ -608,6 +613,7 @@ void nd6_timer(void *arg) { CURVNET_SET((struct vnet *) arg); + struct nd_drhead drq; struct nd_defrouter *dr, *ndr; struct nd_prefix *pr, *npr; struct in6_ifaddr *ia6, *nia6; @@ -615,10 +621,18 @@ nd6_timer(void *arg) callout_reset(&V_nd6_timer_ch, V_nd6_prune * hz, nd6_timer, curvnet); + TAILQ_INIT(&drq); + /* expire default router list */ - TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { + ND6_WLOCK(); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) if (dr->expire && dr->expire < time_uptime) - defrtrlist_del(dr); + defrouter_unlink(dr, &drq); + ND6_WUNLOCK(); + + while ((dr = TAILQ_FIRST(&drq)) != NULL) { + TAILQ_REMOVE(&drq, dr, dr_entry); + defrouter_del(dr); } /* @@ -813,29 +827,37 @@ regen_tmpaddr(struct in6_ifaddr *ia6) void nd6_purge(struct ifnet *ifp) { + struct nd_drhead drq; struct nd_defrouter *dr, *ndr; struct nd_prefix *pr, *npr; + TAILQ_INIT(&drq); + /* * Nuke default router list entries toward ifp. * We defer removal of default router list entries that is installed * in the routing table, in order to keep additional side effects as * small as possible. */ + ND6_WLOCK(); TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { if (dr->installed) continue; - if (dr->ifp == ifp) - defrtrlist_del(dr); + defrouter_unlink(dr, &drq); } TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { if (!dr->installed) continue; - if (dr->ifp == ifp) - defrtrlist_del(dr); + defrouter_unlink(dr, &drq); + } + ND6_WUNLOCK(); + + while ((dr = TAILQ_FIRST(&drq)) != NULL) { + TAILQ_REMOVE(&drq, dr, dr_entry); + defrouter_del(dr); } /* Nuke prefix list entries toward ifp */ @@ -1046,13 +1068,27 @@ nd6_is_addr_neighbor(struct sockaddr_in6 * that the change is safe. */ static struct llentry * -nd6_free(struct llentry *ln, int gc) +nd6_free(struct llentry **lnp, int gc) { - struct llentry *next; - struct nd_defrouter *dr; struct ifnet *ifp; + struct llentry *ln, *next; + struct nd_defrouter *dr; + + ln = *lnp; + *lnp = NULL; LLE_WLOCK_ASSERT(ln); + ND6_RLOCK_ASSERT(); + + ifp = ln->lle_tbl->llt_ifp; + if ((ND_IFINFO(ifp)->flags & ND6_IFF_ACCEPT_RTADV) != 0) + dr = defrouter_lookup_locked(&L3_ADDR_SIN6(ln)->sin6_addr, ifp); + else + dr = NULL; + ND6_RUNLOCK(); + + if ((ln->la_flags & LLE_DELETED) == 0) + EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_EXPIRED); /* * we used to have pfctlinput(PRC_HOSTDEAD) here. @@ -1062,11 +1098,7 @@ nd6_free(struct llentry *ln, int gc) /* cancel timer */ nd6_llinfo_settimer_locked(ln, -1); - ifp = ln->lle_tbl->llt_ifp; - if (ND_IFINFO(ifp)->flags & ND6_IFF_ACCEPT_RTADV) { - dr = defrouter_lookup(&L3_ADDR_SIN6(ln)->sin6_addr, ifp); - if (dr != NULL && dr->expire && ln->ln_state == ND6_LLINFO_STALE && gc) { /* @@ -1091,6 +1123,7 @@ nd6_free(struct llentry *ln, int gc) next = LIST_NEXT(ln, lle_next); LLE_REMREF(ln); LLE_WUNLOCK(ln); + defrouter_rele(dr); return (next); } @@ -1173,6 +1206,8 @@ nd6_free(struct llentry *ln, int gc) IF_AFDATA_UNLOCK(ifp); + if (dr != NULL) + defrouter_rele(dr); return (next); } @@ -1251,12 +1286,13 @@ nd6_rtrequest(int req, struct rtentry *r /* * check for default route */ - if (IN6_ARE_ADDR_EQUAL(&in6addr_any, - &SIN6(rt_key(rt))->sin6_addr)) { - + if (IN6_ARE_ADDR_EQUAL(&in6addr_any, + &SIN6(rt_key(rt))->sin6_addr)) { dr = defrouter_lookup(&gateway->sin6_addr, ifp); - if (dr != NULL) + if (dr != NULL) { dr->installed = 0; + defrouter_rele(dr); + } } break; } @@ -1444,12 +1480,22 @@ nd6_ioctl(u_long cmd, caddr_t data, stru case SIOCSRTRFLUSH_IN6: { /* flush all the default routers */ - struct nd_defrouter *dr, *next; + struct nd_drhead drq; + struct nd_defrouter *dr; + + TAILQ_INIT(&drq); defrouter_reset(); - TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, next) { - defrtrlist_del(dr); + + ND6_WLOCK(); + while ((dr = TAILQ_FIRST(&V_nd_defrouter)) != NULL) + defrouter_unlink(dr, &drq); + ND6_WUNLOCK(); + while ((dr = TAILQ_FIRST(&drq)) != NULL) { + TAILQ_REMOVE(&drq, dr, dr_entry); + defrouter_del(dr); } + defrouter_select(); break; } @@ -2200,30 +2246,33 @@ nd6_sysctl_drlist(SYSCTL_HANDLER_ARGS) struct nd_defrouter *dr; int error; - if (req->newptr) + if (req->newptr != NULL) return (EPERM); + error = sysctl_wire_old_buffer(req, 0); + if (error != 0) + return (error); + bzero(&d, sizeof(d)); d.rtaddr.sin6_family = AF_INET6; d.rtaddr.sin6_len = sizeof(d.rtaddr); - /* - * XXX locking - */ + ND6_RLOCK(); TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { d.rtaddr.sin6_addr = dr->rtaddr; error = sa6_recoverscope(&d.rtaddr); if (error != 0) - return (error); + break; d.flags = dr->raflags; d.rtlifetime = dr->rtlifetime; d.expire = dr->expire + (time_second - time_uptime); d.if_index = dr->ifp->if_index; error = SYSCTL_OUT(req, &d, sizeof(d)); if (error != 0) - return (error); + break; } - return (0); + ND6_RUNLOCK(); + return (error); } static int Modified: stable/10/sys/netinet6/nd6.h ============================================================================== --- stable/10/sys/netinet6/nd6.h Thu Jul 28 19:32:25 2016 (r303457) +++ stable/10/sys/netinet6/nd6.h Thu Jul 28 20:08:01 2016 (r303458) @@ -243,6 +243,7 @@ struct nd_defrouter { u_long expire; struct ifnet *ifp; int installed; /* is installed into kernel routing table */ + u_int refcnt; }; struct nd_prefixctl { @@ -342,6 +343,19 @@ VNET_DECLARE(int, nd6_onlink_ns_rfc4861) #define V_nd6_debug VNET(nd6_debug) #define V_nd6_onlink_ns_rfc4861 VNET(nd6_onlink_ns_rfc4861) +/* Lock for the prefix and default router lists. */ +VNET_DECLARE(struct rwlock, nd6_lock); +#define V_nd6_lock VNET(nd6_lock) + +#define ND6_RLOCK() rw_rlock(&V_nd6_lock) +#define ND6_RUNLOCK() rw_runlock(&V_nd6_lock) +#define ND6_WLOCK() rw_wlock(&V_nd6_lock) +#define ND6_WUNLOCK() rw_wunlock(&V_nd6_lock) +#define ND6_WLOCK_ASSERT() rw_assert(&V_nd6_lock, RA_WLOCKED) +#define ND6_RLOCK_ASSERT() rw_assert(&V_nd6_lock, RA_RLOCKED) +#define ND6_LOCK_ASSERT() rw_assert(&V_nd6_lock, RA_LOCKED) +#define ND6_UNLOCK_ASSERT() rw_assert(&V_nd6_lock, RA_UNLOCKED) + #define nd6log(x) do { if (V_nd6_debug) log x; } while (/*CONSTCOND*/ 0) VNET_DECLARE(struct callout, nd6_timer_ch); @@ -447,12 +461,17 @@ void nd6_rs_input(struct mbuf *, int, in void nd6_ra_input(struct mbuf *, int, int); void defrouter_reset(void); void defrouter_select(void); -void defrtrlist_del(struct nd_defrouter *); +void defrouter_ref(struct nd_defrouter *); +void defrouter_rele(struct nd_defrouter *); +bool defrouter_remove(struct in6_addr *, struct ifnet *); +void defrouter_unlink(struct nd_defrouter *, struct nd_drhead *); +void defrouter_del(struct nd_defrouter *); void prelist_remove(struct nd_prefix *); int nd6_prelist_add(struct nd_prefixctl *, struct nd_defrouter *, struct nd_prefix **); void pfxlist_onlink_check(void); struct nd_defrouter *defrouter_lookup(struct in6_addr *, struct ifnet *); +struct nd_defrouter *defrouter_lookup_locked(struct in6_addr *, struct ifnet *); struct nd_prefix *nd6_prefix_lookup(struct nd_prefixctl *); void rt6_flush(struct in6_addr *, struct ifnet *); int nd6_setdefaultiface(int); Modified: stable/10/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/10/sys/netinet6/nd6_nbr.c Thu Jul 28 19:32:25 2016 (r303457) +++ stable/10/sys/netinet6/nd6_nbr.c Thu Jul 28 20:08:01 2016 (r303458) @@ -895,25 +895,17 @@ nd6_na_input(struct mbuf *m, int off, in * Remove the sender from the Default Router List and * update the Destination Cache entries. */ - struct nd_defrouter *dr; - struct in6_addr *in6; - - in6 = &L3_ADDR_SIN6(ln)->sin6_addr; - - dr = defrouter_lookup(in6, ln->lle_tbl->llt_ifp); - if (dr) - defrtrlist_del(dr); - else if (ND_IFINFO(ln->lle_tbl->llt_ifp)->flags & - ND6_IFF_ACCEPT_RTADV) { + if (!defrouter_remove(&L3_ADDR_SIN6(ln)->sin6_addr, + ln->lle_tbl->llt_ifp) && + (ND_IFINFO(ln->lle_tbl->llt_ifp)->flags & + ND6_IFF_ACCEPT_RTADV) != 0) /* * Even if the neighbor is not in the default - * router list, the neighbor may be used - * as a next hop for some destinations - * (e.g. redirect case). So we must - * call rt6_flush explicitly. + * router list, the neighbor may be used as a + * next hop for some destinations (e.g. redirect + * case). So we must call rt6_flush explicitly. */ rt6_flush(&ip6->ip6_src, ifp); - } } ln->ln_router = is_router; } Modified: stable/10/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/10/sys/netinet6/nd6_rtr.c Thu Jul 28 19:32:25 2016 (r303457) +++ stable/10/sys/netinet6/nd6_rtr.c Thu Jul 28 20:08:01 2016 (r303458) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -218,6 +219,8 @@ nd6_ra_input(struct mbuf *m, int off, in struct nd_defrouter *dr; char ip6bufs[INET6_ADDRSTRLEN], ip6bufd[INET6_ADDRSTRLEN]; + dr = NULL; + /* * We only accept RAs only when the per-interface flag * ND6_IFF_ACCEPT_RTADV is on the receiving interface. @@ -367,6 +370,10 @@ nd6_ra_input(struct mbuf *m, int off, in (void)prelist_update(&pr, dr, m, mcast); } } + if (dr != NULL) { + defrouter_rele(dr); + dr = NULL; + } /* * MTU @@ -444,10 +451,6 @@ nd6_ra_input(struct mbuf *m, int off, in m_freem(m); } -/* - * default router list proccessing sub routines - */ - /* tell the change to user processes watching the routing socket. */ static void nd6_rtmsg(int cmd, struct rtentry *rt) @@ -476,6 +479,10 @@ nd6_rtmsg(int cmd, struct rtentry *rt) ifa_free(ifa); } +/* + * default router list proccessing sub routines + */ + static void defrouter_addreq(struct nd_defrouter *new) { @@ -504,16 +511,43 @@ defrouter_addreq(struct nd_defrouter *ne } struct nd_defrouter * -defrouter_lookup(struct in6_addr *addr, struct ifnet *ifp) +defrouter_lookup_locked(struct in6_addr *addr, struct ifnet *ifp) { struct nd_defrouter *dr; - TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { - if (dr->ifp == ifp && IN6_ARE_ADDR_EQUAL(addr, &dr->rtaddr)) + ND6_LOCK_ASSERT(); + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) + if (dr->ifp == ifp && IN6_ARE_ADDR_EQUAL(addr, &dr->rtaddr)) { + defrouter_ref(dr); return (dr); - } + } + return (NULL); +} + +struct nd_defrouter * +defrouter_lookup(struct in6_addr *addr, struct ifnet *ifp) +{ + struct nd_defrouter *dr; - return (NULL); /* search failed */ + ND6_RLOCK(); + dr = defrouter_lookup_locked(addr, ifp); + ND6_RUNLOCK(); + return (dr); +} + +void +defrouter_ref(struct nd_defrouter *dr) +{ + + refcount_acquire(&dr->refcnt); +} + +void +defrouter_rele(struct nd_defrouter *dr) +{ + + if (refcount_release(&dr->refcnt)) + free(dr, M_IP6NDP); } /* @@ -548,15 +582,41 @@ defrouter_delreq(struct nd_defrouter *dr } /* - * remove all default routes from default router list + * Remove all default routes from default router list. */ void defrouter_reset(void) { - struct nd_defrouter *dr; + struct nd_defrouter *dr, **dra; + int count, i; + + count = i = 0; + /* + * We can't delete routes with the ND lock held, so make a copy of the + * current default router list and use that when deleting routes. + */ + ND6_RLOCK(); TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) - defrouter_delreq(dr); + count++; + ND6_RUNLOCK(); + + dra = malloc(count * sizeof(*dra), M_TEMP, M_WAITOK | M_ZERO); + + ND6_RLOCK(); + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { + if (i == count) + break; + defrouter_ref(dr); + dra[i++] = dr; + } + ND6_RUNLOCK(); + + for (i = 0; i < count && dra[i] != NULL; i++) { + defrouter_delreq(dra[i]); + defrouter_rele(dra[i]); + } + free(dra, M_TEMP); /* * XXX should we also nuke any default routers in the kernel, by @@ -564,12 +624,53 @@ defrouter_reset(void) */ } +/* + * Look up a matching default router list entry and remove it. Returns true if a + * matching entry was found, false otherwise. + */ +bool +defrouter_remove(struct in6_addr *addr, struct ifnet *ifp) +{ + struct nd_defrouter *dr; + + ND6_WLOCK(); + dr = defrouter_lookup_locked(addr, ifp); + if (dr == NULL) { + ND6_WUNLOCK(); + return (false); + } + + defrouter_unlink(dr, NULL); + ND6_WUNLOCK(); + defrouter_del(dr); + defrouter_rele(dr); + return (true); +} + +/* + * Remove a router from the global list and optionally stash it in a + * caller-supplied queue. + * + * The ND lock must be held. + */ void -defrtrlist_del(struct nd_defrouter *dr) +defrouter_unlink(struct nd_defrouter *dr, struct nd_drhead *drq) +{ + + ND6_WLOCK_ASSERT(); + TAILQ_REMOVE(&V_nd_defrouter, dr, dr_entry); + if (drq != NULL) + TAILQ_INSERT_TAIL(drq, dr, dr_entry); +} + +void +defrouter_del(struct nd_defrouter *dr) { struct nd_defrouter *deldr = NULL; struct nd_prefix *pr; + ND6_UNLOCK_ASSERT(); + /* * Flush all the routing table entries that use the router * as a next hop. @@ -581,7 +682,6 @@ defrtrlist_del(struct nd_defrouter *dr) deldr = dr; defrouter_delreq(dr); } - TAILQ_REMOVE(&V_nd_defrouter, dr, dr_entry); /* * Also delete all the pointers to the router in each prefix lists. @@ -601,7 +701,10 @@ defrtrlist_del(struct nd_defrouter *dr) if (deldr) defrouter_select(); - free(dr, M_IP6NDP); + /* + * Release the list reference. + */ + defrouter_rele(dr); } /* @@ -628,27 +731,32 @@ defrtrlist_del(struct nd_defrouter *dr) void defrouter_select(void) { - struct nd_defrouter *dr, *selected_dr = NULL, *installed_dr = NULL; + struct nd_defrouter *dr, *selected_dr, *installed_dr; struct llentry *ln = NULL; + ND6_RLOCK(); /* * Let's handle easy case (3) first: * If default router list is empty, there's nothing to be done. */ - if (TAILQ_EMPTY(&V_nd_defrouter)) + if (TAILQ_EMPTY(&V_nd_defrouter)) { + ND6_RUNLOCK(); return; + } /* * Search for a (probably) reachable router from the list. * We just pick up the first reachable one (if any), assuming that * the ordering rule of the list described in defrtrlist_update(). */ + selected_dr = installed_dr = NULL; TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { IF_AFDATA_RLOCK(dr->ifp); if (selected_dr == NULL && (ln = nd6_lookup(&dr->rtaddr, 0, dr->ifp)) && ND6_IS_LLINFO_PROBREACH(ln)) { selected_dr = dr; + defrouter_ref(selected_dr); } IF_AFDATA_RUNLOCK(dr->ifp); if (ln != NULL) { @@ -656,12 +764,15 @@ defrouter_select(void) ln = NULL; } - if (dr->installed && installed_dr == NULL) - installed_dr = dr; - else if (dr->installed && installed_dr) { - /* this should not happen. warn for diagnosis. */ - log(LOG_ERR, "defrouter_select: more than one router" - " is installed\n"); + if (dr->installed) { + if (installed_dr == NULL) { + installed_dr = dr; + defrouter_ref(installed_dr); + } else { + /* this should not happen. warn for diagnosis. */ + log(LOG_ERR, + "defrouter_select: more than one router is installed\n"); + } } } /* @@ -673,21 +784,25 @@ defrouter_select(void) * or when the new one has a really higher preference value. */ if (selected_dr == NULL) { - if (installed_dr == NULL || !TAILQ_NEXT(installed_dr, dr_entry)) + if (installed_dr == NULL || + TAILQ_NEXT(installed_dr, dr_entry) == NULL) selected_dr = TAILQ_FIRST(&V_nd_defrouter); else selected_dr = TAILQ_NEXT(installed_dr, dr_entry); - } else if (installed_dr) { + defrouter_ref(selected_dr); + } else if (installed_dr != NULL) { IF_AFDATA_RLOCK(installed_dr->ifp); if ((ln = nd6_lookup(&installed_dr->rtaddr, 0, installed_dr->ifp)) && ND6_IS_LLINFO_PROBREACH(ln) && rtpref(selected_dr) <= rtpref(installed_dr)) { + defrouter_rele(selected_dr); selected_dr = installed_dr; } IF_AFDATA_RUNLOCK(installed_dr->ifp); if (ln != NULL) LLE_RUNLOCK(ln); } + ND6_RUNLOCK(); /* * If the selected router is different than the installed one, @@ -695,10 +810,13 @@ defrouter_select(void) * Note that the selected router is never NULL here. */ if (installed_dr != selected_dr) { - if (installed_dr) + if (installed_dr != NULL) { defrouter_delreq(installed_dr); + defrouter_rele(installed_dr); + } defrouter_addreq(selected_dr); } + defrouter_rele(selected_dr); } /* @@ -734,13 +852,14 @@ defrtrlist_update(struct nd_defrouter *n struct nd_defrouter *dr, *n; int oldpref; - if ((dr = defrouter_lookup(&new->rtaddr, new->ifp)) != NULL) { - /* entry exists */ - if (new->rtlifetime == 0) { - defrtrlist_del(dr); - return (NULL); - } + if (new->rtlifetime == 0) { + defrouter_remove(&new->rtaddr, new->ifp); + return (NULL); + } + ND6_WLOCK(); + dr = defrouter_lookup_locked(&new->rtaddr, new->ifp); + if (dr != NULL) { oldpref = rtpref(dr); /* override */ @@ -753,8 +872,10 @@ defrtrlist_update(struct nd_defrouter *n * to sort the entries. Also make sure the selected * router is still installed in the kernel. */ - if (dr->installed && rtpref(new) == oldpref) + if (dr->installed && rtpref(new) == oldpref) { + ND6_WUNLOCK(); return (dr); + } /* * The preferred router may have changed, so relocate this @@ -762,19 +883,17 @@ defrtrlist_update(struct nd_defrouter *n */ TAILQ_REMOVE(&V_nd_defrouter, dr, dr_entry); n = dr; - goto insert; + } else { + n = malloc(sizeof(*n), M_IP6NDP, M_NOWAIT | M_ZERO); + if (n == NULL) { + ND6_WUNLOCK(); + return (NULL); + } + memcpy(n, new, sizeof(*n)); + /* Initialize with an extra reference for the caller. */ + refcount_init(&n->refcnt, 2); } - /* entry does not exist */ - if (new->rtlifetime == 0) - return (NULL); - - n = malloc(sizeof(*n), M_IP6NDP, M_NOWAIT | M_ZERO); - if (n == NULL) - return (NULL); - memcpy(n, new, sizeof(*n)); - -insert: /* * Insert the new router in the Default Router List; * The Default Router List should be in the descending order @@ -787,10 +906,11 @@ insert: if (rtpref(n) > rtpref(dr)) break; } - if (dr) + if (dr != NULL) TAILQ_INSERT_BEFORE(dr, n, dr_entry); else TAILQ_INSERT_TAIL(&V_nd_defrouter, n, dr_entry); + ND6_WUNLOCK(); defrouter_select(); @@ -819,6 +939,7 @@ pfxrtr_add(struct nd_prefix *pr, struct if (new == NULL) return; new->router = dr; + defrouter_ref(dr); LIST_INSERT_HEAD(&pr->ndpr_advrtrs, new, pfr_entry); @@ -828,7 +949,9 @@ pfxrtr_add(struct nd_prefix *pr, struct static void pfxrtr_del(struct nd_pfxrouter *pfr) { + LIST_REMOVE(pfr, pfr_entry); + defrouter_rele(pfr->router); free(pfr, M_IP6NDP); } @@ -869,11 +992,9 @@ nd6_prelist_add(struct nd_prefixctl *pr, new->ndpr_flags = pr->ndpr_flags; if ((error = in6_init_prefix_ltimes(new)) != 0) { free(new, M_IP6NDP); - return(error); + return (error); } new->ndpr_lastupdate = time_uptime; - if (newp != NULL) - *newp = new; /* initialization */ LIST_INIT(&new->ndpr_advrtrs); @@ -899,10 +1020,11 @@ nd6_prelist_add(struct nd_prefixctl *pr, } } - if (dr) + if (dr != NULL) pfxrtr_add(new, dr); - - return 0; + if (newp != NULL) + *newp = new; + return (0); } void @@ -959,7 +1081,6 @@ prelist_update(struct nd_prefixctl *new, struct ifnet *ifp = new->ndpr_ifp; struct nd_prefix *pr; int error = 0; - int newprefix = 0; int auth; struct in6_addrlifetime lt6_tmp; char ip6buf[INET6_ADDRSTRLEN]; @@ -1017,23 +1138,17 @@ prelist_update(struct nd_prefixctl *new, if (dr && pfxrtr_lookup(pr, dr) == NULL) pfxrtr_add(pr, dr); } else { - struct nd_prefix *newpr = NULL; - - newprefix = 1; - if (new->ndpr_vltime == 0) goto end; if (new->ndpr_raf_onlink == 0 && new->ndpr_raf_auto == 0) goto end; - error = nd6_prelist_add(new, dr, &newpr); - if (error != 0 || newpr == NULL) { + error = nd6_prelist_add(new, dr, &pr); + if (error != 0) { nd6log((LOG_NOTICE, "prelist_update: " - "nd6_prelist_add failed for %s/%d on %s " - "errno=%d, returnpr=%p\n", + "nd6_prelist_add failed for %s/%d on %s errno=%d\n", ip6_sprintf(ip6buf, &new->ndpr_prefix.sin6_addr), - new->ndpr_plen, if_name(new->ndpr_ifp), - error, newpr)); + new->ndpr_plen, if_name(new->ndpr_ifp), error)); goto end; /* we should just give up in this case. */ } @@ -1044,13 +1159,11 @@ prelist_update(struct nd_prefixctl *new, * addresses. Thus, we explicitly make sure that the prefix * itself expires now. */ - if (newpr->ndpr_raf_onlink == 0) { - newpr->ndpr_vltime = 0; - newpr->ndpr_pltime = 0; - in6_init_prefix_ltimes(newpr); + if (pr->ndpr_raf_onlink == 0) { + pr->ndpr_vltime = 0; + pr->ndpr_pltime = 0; + in6_init_prefix_ltimes(pr); } - - pr = newpr; } /* @@ -1346,6 +1459,7 @@ pfxlist_onlink_check() * that does not advertise any prefixes. */ if (pr == NULL) { + ND6_RLOCK(); TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { struct nd_prefix *pr0; @@ -1356,6 +1470,7 @@ pfxlist_onlink_check() if (pfxrtr != NULL) break; } + ND6_RUNLOCK(); } if (pr != NULL || (!TAILQ_EMPTY(&V_nd_defrouter) && pfxrtr == NULL)) { /* From owner-svn-src-all@freebsd.org Thu Jul 28 20:11:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B6CCBA74EA; Thu, 28 Jul 2016 20:11:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C0DD1170; Thu, 28 Jul 2016 20:11:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SKBYP1013547; Thu, 28 Jul 2016 20:11:34 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SKBY05013546; Thu, 28 Jul 2016 20:11:34 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201607282011.u6SKBY05013546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 28 Jul 2016 20:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303459 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 20:11:35 -0000 Author: sbruno Date: Thu Jul 28 20:11:34 2016 New Revision: 303459 URL: https://svnweb.freebsd.org/changeset/base/303459 Log: MFC r299829 Use Node Information flag names instead of hard-coding their values. Modified: stable/10/sys/netinet6/icmp6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/icmp6.c ============================================================================== --- stable/10/sys/netinet6/icmp6.c Thu Jul 28 20:08:01 2016 (r303458) +++ stable/10/sys/netinet6/icmp6.c Thu Jul 28 20:11:34 2016 (r303459) @@ -679,7 +679,9 @@ icmp6_input(struct mbuf **mp, int *offp, * XXX: this combination of flags is pointless, * but should we keep this for compatibility? */ - if ((V_icmp6_nodeinfo & 5) != 5) + if ((V_icmp6_nodeinfo & (ICMP6_NODEINFO_FQDNOK | + ICMP6_NODEINFO_TMPADDROK)) != + (ICMP6_NODEINFO_FQDNOK | ICMP6_NODEINFO_TMPADDROK)) break; if (code != 0) From owner-svn-src-all@freebsd.org Thu Jul 28 20:31:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE2ADBA7800; Thu, 28 Jul 2016 20:31:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 838DC18D1; Thu, 28 Jul 2016 20:31:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SKVVer021428; Thu, 28 Jul 2016 20:31:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SKVVZK020781; Thu, 28 Jul 2016 20:31:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607282031.u6SKVVZK020781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 28 Jul 2016 20:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303460 - in stable/11: lib/libc/sys share/man/man4 sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 20:31:32 -0000 Author: jhb Date: Thu Jul 28 20:31:30 2016 New Revision: 303460 URL: https://svnweb.freebsd.org/changeset/base/303460 Log: MFC 303164: Add more documentation regarding unsafe AIO requests. The asynchronous I/O changes made previously result in different behavior out of the box. Previously all AIO requests failed with ENOSYS / SIGSYS unless aio.ko was explicitly loaded. Now, some AIO requests complete and others ("unsafe" requests) fail with EOPNOTSUPP. Reword the introductory paragraph in aio(4) to add a general description of AIO before describing the vfs.aio.enable_unsafe sysctl. Remove the ENOSYS error description from aio_fsync(2), aio_read(2), and aio_write(2) and replace it with a description of EOPNOTSUPP. Remove the ENOSYS error description from aio_mlock(2). Log a message to the system log the first time a process requests an "unsafe" AIO request that fails with EOPNOTSUPP. This is modeled on the log message used for processes using the legacy pty devices. Approved by: re (gjb) Modified: stable/11/lib/libc/sys/aio_fsync.2 stable/11/lib/libc/sys/aio_mlock.2 stable/11/lib/libc/sys/aio_read.2 stable/11/lib/libc/sys/aio_write.2 stable/11/share/man/man4/aio.4 stable/11/sys/kern/vfs_aio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/aio_fsync.2 ============================================================================== --- stable/11/lib/libc/sys/aio_fsync.2 Thu Jul 28 20:11:34 2016 (r303459) +++ stable/11/lib/libc/sys/aio_fsync.2 Thu Jul 28 20:31:30 2016 (r303460) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2016 +.Dd July 21, 2016 .Dt AIO_FSYNC 2 .Os .Sh NAME @@ -107,10 +107,10 @@ The request was not queued because of sy The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. -.It Bq Er ENOSYS -The -.Fn aio_fsync -system call is not supported. +.It Bq Er EOPNOTSUPP +Asynchronous file synchronization operations on the file descriptor +.Fa iocb->aio_fildes +are unsafe and unsafe asynchronous I/O operations are disabled. .It Bq Er EINVAL A value of the .Fa op Modified: stable/11/lib/libc/sys/aio_mlock.2 ============================================================================== --- stable/11/lib/libc/sys/aio_mlock.2 Thu Jul 28 20:11:34 2016 (r303459) +++ stable/11/lib/libc/sys/aio_mlock.2 Thu Jul 28 20:31:30 2016 (r303460) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2016 +.Dd July 21, 2016 .Dt AIO_MLOCK 2 .Os .Sh NAME @@ -102,10 +102,6 @@ The request was not queued because of sy The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. -.It Bq Er ENOSYS -The -.Fn aio_mlock -system call is not supported. .El .Pp If the request is successfully enqueued, but subsequently cancelled Modified: stable/11/lib/libc/sys/aio_read.2 ============================================================================== --- stable/11/lib/libc/sys/aio_read.2 Thu Jul 28 20:11:34 2016 (r303459) +++ stable/11/lib/libc/sys/aio_read.2 Thu Jul 28 20:31:30 2016 (r303460) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2016 +.Dd July 21, 2016 .Dt AIO_READ 2 .Os .Sh NAME @@ -125,10 +125,10 @@ The request was not queued because of sy The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. -.It Bq Er ENOSYS -The -.Fn aio_read -system call is not supported. +.It Bq Er EOPNOTSUPP +Asynchronous read operations on the file descriptor +.Fa iocb->aio_fildes +are unsafe and unsafe asynchronous I/O operations are disabled. .El .Pp The following conditions may be synchronously detected when the Modified: stable/11/lib/libc/sys/aio_write.2 ============================================================================== --- stable/11/lib/libc/sys/aio_write.2 Thu Jul 28 20:11:34 2016 (r303459) +++ stable/11/lib/libc/sys/aio_write.2 Thu Jul 28 20:31:30 2016 (r303460) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2016 +.Dd July 21, 2016 .Dt AIO_WRITE 2 .Os .Sh NAME @@ -129,10 +129,10 @@ The request was not queued because of sy The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. -.It Bq Er ENOSYS -The -.Fn aio_write -system call is not supported. +.It Bq Er EOPNOTSUPP +Asynchronous write operations on the file descriptor +.Fa iocb->aio_fildes +are unsafe and unsafe asynchronous I/O operations are disabled. .El .Pp The following conditions may be synchronously detected when the Modified: stable/11/share/man/man4/aio.4 ============================================================================== --- stable/11/share/man/man4/aio.4 Thu Jul 28 20:11:34 2016 (r303459) +++ stable/11/share/man/man4/aio.4 Thu Jul 28 20:31:30 2016 (r303460) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2016 +.Dd July 21, 2016 .Dt AIO 4 .Os .Sh NAME @@ -37,17 +37,25 @@ The .Nm facility provides system calls for asynchronous I/O. -However, asynchronous I/O operations are only enabled for certain file -types by default. -Asynchronous I/O operations for other file types may block an AIO daemon -indefinitely resulting in process and/or system hangs. -Asynchronous I/O operations can be enabled for all file types by setting +Asynchronous I/O operations are not completed synchronously by the +calling thread. +Instead, the calling thread invokes one system call to request an +asynchronous I/O operation. +The status of a completed request is retrieved later via a separate +system call. +.Pp +Asynchronous I/O operations on some file descriptor types may block an +AIO daemon indefinitely resulting in process and/or system hangs. +Operations on these file descriptor types are considered +.Dq unsafe +and disabled by default. +They can be enabled by setting the .Va vfs.aio.enable_unsafe sysctl node to a non-zero value. .Pp Asynchronous I/O operations on sockets and raw disk devices do not block -indefinitely and are enabled by default. +indefinitely and are always enabled. .Pp The .Nm Modified: stable/11/sys/kern/vfs_aio.c ============================================================================== --- stable/11/sys/kern/vfs_aio.c Thu Jul 28 20:11:34 2016 (r303459) +++ stable/11/sys/kern/vfs_aio.c Thu Jul 28 20:31:30 2016 (r303460) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -110,6 +111,11 @@ static int enable_aio_unsafe = 0; SYSCTL_INT(_vfs_aio, OID_AUTO, enable_unsafe, CTLFLAG_RW, &enable_aio_unsafe, 0, "Permit asynchronous IO on all file types, not just known-safe types"); +static unsigned int unsafe_warningcnt = 1; +SYSCTL_UINT(_vfs_aio, OID_AUTO, unsafe_warningcnt, CTLFLAG_RW, + &unsafe_warningcnt, 0, + "Warnings that will be triggered upon failed IO requests on unsafe files"); + static int max_aio_procs = MAX_AIO_PROCS; SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_procs, CTLFLAG_RW, &max_aio_procs, 0, "Maximum number of kernel processes to use for handling async IO "); @@ -1697,8 +1703,11 @@ queueit: safe = true; } } - if (!(safe || enable_aio_unsafe)) + if (!(safe || enable_aio_unsafe)) { + counted_warning(&unsafe_warningcnt, + "is attempting to use unsafe AIO requests"); return (EOPNOTSUPP); + } if (opcode == LIO_SYNC) { AIO_LOCK(ki); From owner-svn-src-all@freebsd.org Thu Jul 28 20:51:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB65EBA7C6F; Thu, 28 Jul 2016 20:51:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE7A7138F; Thu, 28 Jul 2016 20:51:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SKpTBs030804; Thu, 28 Jul 2016 20:51:29 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SKpTpx030803; Thu, 28 Jul 2016 20:51:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607282051.u6SKpTpx030803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 28 Jul 2016 20:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303461 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 20:51:31 -0000 Author: jhb Date: Thu Jul 28 20:51:29 2016 New Revision: 303461 URL: https://svnweb.freebsd.org/changeset/base/303461 Log: Note that not all optional ptrace events use SIGTRAP. New child processes attached due to PTRACE_FORK use SIGSTOP instead of SIGTRAP. All other ptrace events use SIGTRAP. Modified: head/lib/libc/sys/ptrace.2 Modified: head/lib/libc/sys/ptrace.2 ============================================================================== --- head/lib/libc/sys/ptrace.2 Thu Jul 28 20:31:30 2016 (r303460) +++ head/lib/libc/sys/ptrace.2 Thu Jul 28 20:51:29 2016 (r303461) @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd July 18, 2016 +.Dd July 28, 2016 .Dt PTRACE 2 .Os .Sh NAME @@ -74,11 +74,15 @@ A traced process may report additional s events in the traced process. These additional signal stops are reported as .Dv SIGTRAP +or +.Dv SIGSTOP signals. The tracing process can use the .Dv PT_LWPINFO request to determine which events are associated with a .Dv SIGTRAP +or +.Dv SIGSTOP signal. Note that multiple events may be associated with a single signal. For example, events indicated by the @@ -88,10 +92,16 @@ and .Dv PL_FLAG_EXEC flags are also reported as a system call exit event .Pq Dv PL_FLAG_SCX . +The signal stop for a new child process enabled via +.Dv PTRACE_FORK +will report a +.Dv SIGSTOP +signal. +All other additional signal stops use +.Dv SIGTRAP . .Pp Each traced process has a tracing event mask. An event in the traced process only reports a -.Dv SIGTRAP signal stop if the corresponding flag is set in the tracing event mask. The current set of tracing event flags include: .Bl -tag -width ".Dv PTRACE_SYSCALL" From owner-svn-src-all@freebsd.org Thu Jul 28 21:16:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05030BA719A; Thu, 28 Jul 2016 21:16:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C57F211BF; Thu, 28 Jul 2016 21:16:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SLGIwR038467; Thu, 28 Jul 2016 21:16:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SLGIR3038466; Thu, 28 Jul 2016 21:16:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607282116.u6SLGIR3038466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 28 Jul 2016 21:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303462 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 21:16:20 -0000 Author: jhb Date: Thu Jul 28 21:16:18 2016 New Revision: 303462 URL: https://svnweb.freebsd.org/changeset/base/303462 Log: MFC 303202: Update to note that operations on local files are safe. Approved by: re (gjb) Modified: stable/11/share/man/man4/aio.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/aio.4 ============================================================================== --- stable/11/share/man/man4/aio.4 Thu Jul 28 20:51:29 2016 (r303461) +++ stable/11/share/man/man4/aio.4 Thu Jul 28 21:16:18 2016 (r303462) @@ -54,7 +54,9 @@ the .Va vfs.aio.enable_unsafe sysctl node to a non-zero value. .Pp -Asynchronous I/O operations on sockets and raw disk devices do not block +Asynchronous I/O operations on sockets, +raw disk devices, +and regular files on local filesystems do not block indefinitely and are always enabled. .Pp The From owner-svn-src-all@freebsd.org Thu Jul 28 21:27:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4543ABA7716; Thu, 28 Jul 2016 21:27:48 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 167231A6A; Thu, 28 Jul 2016 21:27:48 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SLRl47042118; Thu, 28 Jul 2016 21:27:47 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SLRl2B042117; Thu, 28 Jul 2016 21:27:47 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201607282127.u6SLRl2B042117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 28 Jul 2016 21:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303463 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 21:27:48 -0000 Author: brooks Date: Thu Jul 28 21:27:47 2016 New Revision: 303463 URL: https://svnweb.freebsd.org/changeset/base/303463 Log: cxgbe's firmware module fails to build on mips64 as well as mips32 so disable for all mips. Sponsored by: DARPA, AFRL Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Jul 28 21:16:18 2016 (r303462) +++ head/sys/modules/Makefile Thu Jul 28 21:27:47 2016 (r303463) @@ -508,7 +508,7 @@ _txp= txp .endif .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ - ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \ + ${MACHINE_CPUARCH} != "mips" && \ ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "riscv" _cxgbe= cxgbe .endif From owner-svn-src-all@freebsd.org Thu Jul 28 21:29:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76D71BA77AA; Thu, 28 Jul 2016 21:29:06 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E61D1C14; Thu, 28 Jul 2016 21:29:06 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SLT5WV042212; Thu, 28 Jul 2016 21:29:05 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SLT4CH042204; Thu, 28 Jul 2016 21:29:04 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201607282129.u6SLT4CH042204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 28 Jul 2016 21:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303464 - in head/sys: amd64/linux amd64/linux32 compat/freebsd32 compat/svr4 i386/ibcs2 i386/linux kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 21:29:06 -0000 Author: brooks Date: Thu Jul 28 21:29:04 2016 New Revision: 303464 URL: https://svnweb.freebsd.org/changeset/base/303464 Log: Don't create pointless backups of generated files in "make sysent". Any sensible workflow will include a revision control system from which to restore the old files if required. In normal usage, developers just have to clean up the mess. Reviewed by: jhb Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D7353 Modified: head/sys/amd64/linux/Makefile head/sys/amd64/linux32/Makefile head/sys/compat/freebsd32/Makefile head/sys/compat/svr4/Makefile head/sys/i386/ibcs2/Makefile head/sys/i386/linux/Makefile head/sys/kern/Makefile Modified: head/sys/amd64/linux/Makefile ============================================================================== --- head/sys/amd64/linux/Makefile Thu Jul 28 21:27:47 2016 (r303463) +++ head/sys/amd64/linux/Makefile Thu Jul 28 21:29:04 2016 (r303464) @@ -9,9 +9,4 @@ sysent: linux_sysent.c linux_syscall.h linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \ ../../kern/makesyscalls.sh syscalls.master syscalls.conf - -mv -f linux_sysent.c linux_sysent.c.bak - -mv -f linux_syscall.h linux_syscall.h.bak - -mv -f linux_proto.h linux_proto.h.bak - -mv -f linux_syscalls.c linux_syscalls.c.bak - -mv -f linux_systrace_args.c linux_systrace_args.c.bak sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf Modified: head/sys/amd64/linux32/Makefile ============================================================================== --- head/sys/amd64/linux32/Makefile Thu Jul 28 21:27:47 2016 (r303463) +++ head/sys/amd64/linux32/Makefile Thu Jul 28 21:29:04 2016 (r303464) @@ -9,9 +9,4 @@ sysent: linux32_sysent.c linux32_syscal linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c: ../../kern/makesyscalls.sh \ syscalls.master syscalls.conf - -mv -f linux32_sysent.c linux32_sysent.c.bak - -mv -f linux32_syscall.h linux32_syscall.h.bak - -mv -f linux32_proto.h linux32_proto.h.bak - -mv -f linux32_syscalls.c linux32_syscalls.c.bak - -mv -f linux32_systrace_args.c linux32_systrace_args.c.bak sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf Modified: head/sys/compat/freebsd32/Makefile ============================================================================== --- head/sys/compat/freebsd32/Makefile Thu Jul 28 21:27:47 2016 (r303463) +++ head/sys/compat/freebsd32/Makefile Thu Jul 28 21:29:04 2016 (r303464) @@ -9,11 +9,6 @@ sysent: freebsd32_sysent.c freebsd32_sy freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c : \ ../../kern/makesyscalls.sh syscalls.master syscalls.conf - -mv -f freebsd32_sysent.c freebsd32_sysent.c.bak - -mv -f freebsd32_syscalls.c freebsd32_syscalls.c.bak - -mv -f freebsd32_syscall.h freebsd32_syscall.h.bak - -mv -f freebsd32_proto.h freebsd32_proto.h.bak - -mv -f freebsd32_systrace_args.c freebsd32_systrace_args.c.bak sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf clean: Modified: head/sys/compat/svr4/Makefile ============================================================================== --- head/sys/compat/svr4/Makefile Thu Jul 28 21:27:47 2016 (r303463) +++ head/sys/compat/svr4/Makefile Thu Jul 28 21:29:04 2016 (r303464) @@ -9,9 +9,5 @@ sysent: svr4_sysent.c svr4_syscall.h sv svr4_syscallnames.c svr4_sysent.c svr4_syscall.h svr4_proto.h: \ ../../kern/makesyscalls.sh syscalls.master syscalls.conf - -mv -f svr4_syscallnames.c svr4_syscallnames.c.bak - -mv -f svr4_sysent.c svr4_sysent.c.bak - -mv -f svr4_syscall.h svr4_syscall.h.bak - -mv -f svr4_proto.h svr4_proto.h.bak sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf Modified: head/sys/i386/ibcs2/Makefile ============================================================================== --- head/sys/i386/ibcs2/Makefile Thu Jul 28 21:27:47 2016 (r303463) +++ head/sys/i386/ibcs2/Makefile Thu Jul 28 21:29:04 2016 (r303464) @@ -9,24 +9,16 @@ sysent: ibcs2_sysent.c ibcs2_syscall.h ibcs2_sysent.c ibcs2_syscall.h ibcs2_proto.h: ../../kern/makesyscalls.sh \ syscalls.master syscalls.conf - -mv -f ibcs2_sysent.c ibcs2_sysent.c.bak - -mv -f ibcs2_syscall.h ibcs2_syscall.h.bak - -mv -f ibcs2_proto.h ibcs2_proto.h.bak sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf isc_sysent: ibcs2_isc_sysent.c ibcs2_isc_syscall.h ibcs2_isc_sysent.c ibcs2_isc_syscall.h : ../../kern/makesyscalls.sh \ syscalls.isc syscalls.isc.conf - -mv -f ibcs2_isc_sysent.c ibcs2_isc_sysent.c.bak - -mv -f ibcs2_isc_syscall.h ibcs2_isc_syscall.h.bak sh ../../kern/makesyscalls.sh syscalls.isc syscalls.isc.conf xenix_sysent: ibcs2_xenix_sysent.c ibcs2_xenix_syscall.h ibcs2_xenix.h ibcs2_xenix_sysent.c ibcs2_xenix_syscall.h ibcs2_xenix.h: \ ../../kern/makesyscalls.sh syscalls.xenix syscalls.xenix.conf - -mv -f ibcs2_xenix_sysent.c ibcs2_xenix_sysent.c.bak - -mv -f ibcs2_xenix_syscall.h ibcs2_xenix_syscall.h.bak - -mv -f ibcs2_xenix.h ibcs2_xenix.h.bak sh ../../kern/makesyscalls.sh syscalls.xenix syscalls.xenix.conf Modified: head/sys/i386/linux/Makefile ============================================================================== --- head/sys/i386/linux/Makefile Thu Jul 28 21:27:47 2016 (r303463) +++ head/sys/i386/linux/Makefile Thu Jul 28 21:29:04 2016 (r303464) @@ -9,9 +9,4 @@ sysent: linux_sysent.c linux_syscall.h linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \ ../../kern/makesyscalls.sh syscalls.master syscalls.conf - -mv -f linux_sysent.c linux_sysent.c.bak - -mv -f linux_syscall.h linux_syscall.h.bak - -mv -f linux_proto.h linux_proto.h.bak - -mv -f linux_syscalls.c linux_syscalls.c.bak - -mv -f linux_systrace_args.c linux_systrace_args.c.bak sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf Modified: head/sys/kern/Makefile ============================================================================== --- head/sys/kern/Makefile Thu Jul 28 21:27:47 2016 (r303463) +++ head/sys/kern/Makefile Thu Jul 28 21:29:04 2016 (r303464) @@ -12,10 +12,4 @@ sysent: init_sysent.c syscalls.c ../sys/ init_sysent.c syscalls.c systrace_args.c ../sys/syscall.h \ ../sys/syscall.mk ../sys/sysproto.h: makesyscalls.sh syscalls.master \ capabilities.conf - -mv -f init_sysent.c init_sysent.c.bak - -mv -f syscalls.c syscalls.c.bak - -mv -f systrace_args.c systrace_args.c.bak - -mv -f ../sys/syscall.h ../sys/syscall.h.bak - -mv -f ../sys/syscall.mk ../sys/syscall.mk.bak - -mv -f ../sys/sysproto.h ../sys/sysproto.h.bak sh makesyscalls.sh syscalls.master From owner-svn-src-all@freebsd.org Thu Jul 28 22:30:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2DA8BA5AE6; Thu, 28 Jul 2016 22:30:49 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89F2714AB; Thu, 28 Jul 2016 22:30:49 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SMUmqR065162; Thu, 28 Jul 2016 22:30:48 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SMUmm8065156; Thu, 28 Jul 2016 22:30:48 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201607282230.u6SMUmm8065156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 28 Jul 2016 22:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303465 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 22:30:49 -0000 Author: alc Date: Thu Jul 28 22:30:48 2016 New Revision: 303465 URL: https://svnweb.freebsd.org/changeset/base/303465 Log: Remove any mention of cache (PG_CACHE) pages from the comments in vm_pageout_scan(). That function has not cached pages since r284376. MFC after: 3 days Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Thu Jul 28 21:29:04 2016 (r303464) +++ head/sys/vm/vm_pageout.c Thu Jul 28 22:30:48 2016 (r303465) @@ -872,7 +872,7 @@ unlock_mp: * vm_pageout_scan does the dirty work for the pageout daemon. * * pass 0 - Update active LRU/deactivate pages - * pass 1 - Move inactive to cache or free + * pass 1 - Free inactive pages * pass 2 - Launder dirty pages */ static void @@ -915,8 +915,7 @@ vm_pageout_scan(struct vm_domain *vmd, i addl_page_shortage = 0; /* - * Calculate the number of pages we want to either free or move - * to the cache. + * Calculate the number of pages that we want to free. */ if (pass > 0) { deficit = atomic_readandclear_int(&vm_pageout_deficit); @@ -943,11 +942,10 @@ vm_pageout_scan(struct vm_domain *vmd, i vnodes_skipped = 0; /* - * Start scanning the inactive queue for pages we can move to the - * cache or free. The scan will stop when the target is reached or - * we have scanned the entire inactive queue. Note that m->act_count - * is not used to form decisions for the inactive queue, only for the - * active queue. + * Start scanning the inactive queue for pages that we can free. The + * scan will stop when we reach the target or we have scanned the + * entire queue. (Note that m->act_count is not used to make + * decisions for the inactive queue, only for the active queue.) */ pq = &vmd->vmd_pagequeues[PQ_INACTIVE]; maxscan = pq->pq_cnt; @@ -1170,8 +1168,8 @@ relock_queue: #if !defined(NO_SWAPPING) /* - * Wakeup the swapout daemon if we didn't cache or free the targeted - * number of pages. + * Wakeup the swapout daemon if we didn't free the targeted number of + * pages. */ if (vm_swap_enabled && page_shortage > 0) vm_req_vmdaemon(VM_SWAP_NORMAL); @@ -1179,7 +1177,7 @@ relock_queue: /* * Wakeup the sync daemon if we skipped a vnode in a writeable object - * and we didn't cache or free enough pages. + * and we didn't free enough pages. */ if (vnodes_skipped > 0 && page_shortage > vm_cnt.v_free_target - vm_cnt.v_free_min) From owner-svn-src-all@freebsd.org Thu Jul 28 22:40:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1417EBA5D3D; Thu, 28 Jul 2016 22:40:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB3CA1939; Thu, 28 Jul 2016 22:40:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SMeWBe068259; Thu, 28 Jul 2016 22:40:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SMeWh6068258; Thu, 28 Jul 2016 22:40:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201607282240.u6SMeWh6068258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 28 Jul 2016 22:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303466 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 22:40:33 -0000 Author: imp Date: Thu Jul 28 22:40:31 2016 New Revision: 303466 URL: https://svnweb.freebsd.org/changeset/base/303466 Log: Kill a few stray debug printfs. Modified: head/sys/dev/nvme/nvme_sim.c Modified: head/sys/dev/nvme/nvme_sim.c ============================================================================== --- head/sys/dev/nvme/nvme_sim.c Thu Jul 28 22:30:48 2016 (r303465) +++ head/sys/dev/nvme/nvme_sim.c Thu Jul 28 22:40:31 2016 (r303466) @@ -133,8 +133,6 @@ nvme_sim_action(struct cam_sim *sim, uni ns = sim2ns(sim); ctrlr = sim2ctrlr(sim); - printf("Sim action: ctrlr %p ns %p\n", ctrlr, ns); - mtx_assert(&ctrlr->lock, MA_OWNED); switch (ccb->ccb_h.func_code) { @@ -310,8 +308,6 @@ nvme_sim_new_ns(struct nvme_namespace *n sc->s_ns = ns; - printf("Our SIM's softc %p ctrlr %p ns %p\n", sc, ctrlr, ns); - /* * XXX this is creating one bus per ns, but it should be one * XXX target per controller, and one LUN per namespace. @@ -349,7 +345,6 @@ nvme_sim_new_ns(struct nvme_namespace *n sc->s_path->device->nvme_cdata = nvme_ctrlr_get_data(ns->ctrlr); /* Scan bus */ - printf("Initiate rescan of the bus\n"); nvme_sim_rescan_target(ctrlr, sc->s_path); mtx_unlock(&ctrlr->lock); From owner-svn-src-all@freebsd.org Thu Jul 28 22:42:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9ED62BA5EA3; Thu, 28 Jul 2016 22:42:42 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 6756A1D06; Thu, 28 Jul 2016 22:42:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id D0071783F51; Fri, 29 Jul 2016 08:42:34 +1000 (AEST) Date: Fri, 29 Jul 2016 08:42:33 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303446 - head/sys/vm In-Reply-To: <201607281549.u6SFnqQK016697@repo.freebsd.org> Message-ID: <20160729075631.L944@besplex.bde.org> References: <201607281549.u6SFnqQK016697@repo.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=OtmysHLt c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=Te4QX_xqBi-zt0O5ZrAA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 22:42:42 -0000 On Thu, 28 Jul 2016, Konstantin Belousov wrote: > Log: > Fix style and typo. > > Modified: head/sys/vm/swap_pager.c > ============================================================================== > --- head/sys/vm/swap_pager.c Thu Jul 28 15:33:19 2016 (r303445) > +++ head/sys/vm/swap_pager.c Thu Jul 28 15:49:51 2016 (r303446) > @@ -390,8 +390,8 @@ static int dmmax; > static int nswap_lowat = 128; /* in pages, swap_pager_almost_full warn */ > static int nswap_hiwat = 512; /* in pages, swap_pager_almost_full warn */ > > -SYSCTL_INT(_vm, OID_AUTO, dmmax, > - CTLFLAG_RD, &dmmax, 0, "Maximum size of a swap block"); > +SYSCTL_INT(_vm, OID_AUTO, dmmax, CTLFLAG_RD, &dmmax, 0, > + "Maximum size of a swap block"); This fixes the indentation, but only moves the style bug in the long-line splitting. The first line of a SYSCTL_ is conventionally split after CTFLAG* if this would not leave it too long. This puts the variable name in an easier-to-read place and inhibits verbose descriptions. The line splitting for the first is now consistently broken for all nearby sysctls. There are many style bugs in the descriptions in neary sysctls: - some are terminated by a "." - most are too long, using poor wording to make them longer. Some say "amount", and some say "size". Both of these words are almost redundant and do little to describe the units. Apparently, sizes are in bytes. Some of the amounts are apparently also in bytes, but swap_maxpages is dimensionless. Its name tells you more in half the space as it description "Maximum amount of swap supported". - the description for vm.overcommit is especially bad. It takes multiple sentences with misformatting and a long line with misformatting to refer to the man page for details. Otherwise, it basically says "Enable overcommit". Its only unobvious point is that the man page is tuning(7) and not vm(7nonexistent). I haven't found anuthing better than zgrep -r in /usr/shar/man for finding man page references. vm.overcommit is also badly described in getrlimit(2). This adds to the verboseness using "Please see" and expanding "details" to "complete description of". sysctl -da | grep '\.$' | wc on freefall finds only 102 descriptions with a trailing "." in 4115 lines. The pattern ": [^A-Z] matches 1580 lines. 1410 of the 1580 uncapitalized lines have a leading 'dev' and most of these style bugs are in auto-generated spam. The spam gives useless descriptions like %parent: "parent device". IIRC, the strings for this spam are not duplicated in the kernel, so they don't waste space there, but this means that they cannot contain any useful context-dependent information. '[Aa]mount' is mercifully unpopular. It matches just 20 lines, mostly near here and in vfs_bio. Bruce Bruce From owner-svn-src-all@freebsd.org Thu Jul 28 22:49:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40660BA5F3D; Thu, 28 Jul 2016 22:49:40 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 139991EF8; Thu, 28 Jul 2016 22:49:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D0581B985; Thu, 28 Jul 2016 18:49:38 -0400 (EDT) From: John Baldwin To: Brooks Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303464 - in head/sys: amd64/linux amd64/linux32 compat/freebsd32 compat/svr4 i386/ibcs2 i386/linux kern Date: Thu, 28 Jul 2016 15:04:33 -0700 Message-ID: <3961167.qhi1ygCMQO@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201607282129.u6SLT4CH042204@repo.freebsd.org> References: <201607282129.u6SLT4CH042204@repo.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, 28 Jul 2016 18:49:38 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 22:49:40 -0000 On Thursday, July 28, 2016 09:29:04 PM Brooks Davis wrote: > Author: brooks > Date: Thu Jul 28 21:29:04 2016 > New Revision: 303464 > URL: https://svnweb.freebsd.org/changeset/base/303464 > > Log: > Don't create pointless backups of generated files in "make sysent". > > Any sensible workflow will include a revision control system from which > to restore the old files if required. In normal usage, developers just > have to clean up the mess. > > Reviewed by: jhb > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D7353 Goes back a long time: https://svnweb.freebsd.org/csrg?view=revision&revision=38725 Even then CSRG was using SCCS. -- John Baldwin From owner-svn-src-all@freebsd.org Thu Jul 28 22:55:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74ED6BA7145; Thu, 28 Jul 2016 22:55:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3791D14A2; Thu, 28 Jul 2016 22:55:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SMtFu6075234; Thu, 28 Jul 2016 22:55:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SMtEq7075228; Thu, 28 Jul 2016 22:55:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201607282255.u6SMtEq7075228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 28 Jul 2016 22:55:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303467 - in head/sys/cam: . ata nvme scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 22:55:16 -0000 Author: imp Date: Thu Jul 28 22:55:14 2016 New Revision: 303467 URL: https://svnweb.freebsd.org/changeset/base/303467 Log: Switch to linker sets to find the xport callback object. This eliminates the need to special case everything in cam_xpt for new transports. It is now a failure to not have a transport object when registering the bus as well. You can still, however, create a transport that's unspecified (XPT_) Differential Revision: https://reviews.freebsd.org/D7289 Modified: head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt_internal.h head/sys/cam/nvme/nvme_xpt.c head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Thu Jul 28 22:40:31 2016 (r303466) +++ head/sys/cam/ata/ata_xpt.c Thu Jul 28 22:55:14 2016 (r303467) @@ -195,18 +195,24 @@ static int atapi_dma = 1; TUNABLE_INT("hw.ata.ata_dma", &ata_dma); TUNABLE_INT("hw.ata.atapi_dma", &atapi_dma); -static struct xpt_xport ata_xport = { +static struct xpt_xport_ops ata_xport_ops = { .alloc_device = ata_alloc_device, .action = ata_action, .async = ata_dev_async, .announce = ata_announce_periph, }; +#define ATA_XPT_XPORT(x, X) \ +static struct xpt_xport ata_xport_ ## x = { \ + .xport = XPORT_ ## X, \ + .name = #x, \ + .ops = &ata_xport_ops, \ +}; \ +CAM_XPT_XPORT(ata_xport_ ## x); -struct xpt_xport * -ata_get_xport(void) -{ - return (&ata_xport); -} +ATA_XPT_XPORT(ata, ATA); +ATA_XPT_XPORT(sata, SATA); + +#undef ATA_XPORT_XPORT static void probe_periph_init() Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Jul 28 22:40:31 2016 (r303466) +++ head/sys/cam/cam_xpt.c Thu Jul 28 22:55:14 2016 (r303467) @@ -1043,7 +1043,7 @@ xpt_announce_periph(struct cam_periph *p periph->unit_number, path->device->serial_num); } /* Announce transport details. */ - (*(path->bus->xport->announce))(periph); + (*(path->bus->xport->ops->announce))(periph); /* Announce command queueing. */ if (path->device->inq_flags & SID_CmdQue || path->device->flags & CAM_DEV_TAG_AFTER_COUNT) { @@ -2464,7 +2464,7 @@ xpt_action(union ccb *start_ccb) xpt_action_name(start_ccb->ccb_h.func_code))); start_ccb->ccb_h.status = CAM_REQ_INPROG; - (*(start_ccb->ccb_h.path->bus->xport->action))(start_ccb); + (*(start_ccb->ccb_h.path->bus->xport->ops->action))(start_ccb); } void @@ -3482,9 +3482,9 @@ xpt_compile_path(struct cam_path *new_pa struct cam_ed *new_device; new_device = - (*(bus->xport->alloc_device))(bus, - target, - lun_id); + (*(bus->xport->ops->alloc_device))(bus, + target, + lun_id); if (new_device == NULL) { status = CAM_RESRC_UNAVAIL; } else { @@ -3832,11 +3832,18 @@ xpt_release_ccb(union ccb *free_ccb) /* Functions accessed by SIM drivers */ -static struct xpt_xport xport_default = { +static struct xpt_xport_ops xport_default_ops = { .alloc_device = xpt_alloc_device_default, .action = xpt_action_default, .async = xpt_dev_async_default, }; +static struct xpt_xport xport_default = { + .xport = XPORT_UNKNOWN, + .name = "unknown", + .ops = &xport_default_ops, +}; + +CAM_XPT_XPORT(xport_default); /* * A sim structure, listing the SIM entry points and instance @@ -3909,26 +3916,20 @@ xpt_bus_register(struct cam_sim *sim, de xpt_action((union ccb *)&cpi); if (cpi.ccb_h.status == CAM_REQ_CMP) { - switch (cpi.transport) { - case XPORT_SPI: - case XPORT_SAS: - case XPORT_FC: - case XPORT_USB: - case XPORT_ISCSI: - case XPORT_SRP: - case XPORT_PPB: - new_bus->xport = scsi_get_xport(); - break; - case XPORT_ATA: - case XPORT_SATA: - new_bus->xport = ata_get_xport(); - break; - case XPORT_NVME: - new_bus->xport = nvme_get_xport(); - break; - default: - new_bus->xport = &xport_default; - break; + struct xpt_xport **xpt; + + SET_FOREACH(xpt, cam_xpt_xport_set) { + if ((*xpt)->xport == cpi.transport) { + new_bus->xport = *xpt; + break; + } + } + if (new_bus->xport == NULL) { + xpt_print_path(path); + printf("No transport found for %d\n", cpi.transport); + xpt_release_bus(new_bus); + free(path, M_CAMXPT); + return (CAM_RESRC_UNAVAIL); } } @@ -4138,7 +4139,7 @@ xpt_async_process_dev(struct cam_ed *dev } else relock = 0; - (*(device->target->bus->xport->async))(async_code, + (*(device->target->bus->xport->ops->async))(async_code, device->target->bus, device->target, device, async_arg); xpt_async_bcast(&device->asyncs, async_code, path, async_arg); Modified: head/sys/cam/cam_xpt_internal.h ============================================================================== --- head/sys/cam/cam_xpt_internal.h Thu Jul 28 22:40:31 2016 (r303466) +++ head/sys/cam/cam_xpt_internal.h Thu Jul 28 22:55:14 2016 (r303467) @@ -48,7 +48,7 @@ typedef void (*xpt_dev_async_func)(u_int void *async_arg); typedef void (*xpt_announce_periph_func)(struct cam_periph *periph); -struct xpt_xport { +struct xpt_xport_ops { xpt_alloc_device_func alloc_device; xpt_release_device_func reldev; xpt_action_func action; @@ -56,6 +56,16 @@ struct xpt_xport { xpt_announce_periph_func announce; }; +struct xpt_xport { + cam_xport xport; + const char *name; + struct xpt_xport_ops *ops; +}; + +SET_DECLARE(cam_xpt_xport_set, struct xpt_xport); +#define CAM_XPT_XPORT(data) \ + DATA_SET(cam_xpt_xport_set, data) + /* * The CAM EDT (Existing Device Table) contains the device information for * all devices for all busses in the system. The table contains a @@ -167,10 +177,6 @@ struct cam_path { struct cam_ed *device; }; -struct xpt_xport * scsi_get_xport(void); -struct xpt_xport * ata_get_xport(void); -struct xpt_xport * nvme_get_xport(void); - struct cam_ed * xpt_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id); Modified: head/sys/cam/nvme/nvme_xpt.c ============================================================================== --- head/sys/cam/nvme/nvme_xpt.c Thu Jul 28 22:40:31 2016 (r303466) +++ head/sys/cam/nvme/nvme_xpt.c Thu Jul 28 22:55:14 2016 (r303467) @@ -153,19 +153,23 @@ static void nvme_dev_async(u_int32_t as static void nvme_action(union ccb *start_ccb); static void nvme_announce_periph(struct cam_periph *periph); -static struct xpt_xport nvme_xport = { +static struct xpt_xport_ops nvme_xport_ops = { .alloc_device = nvme_alloc_device, .action = nvme_action, .async = nvme_dev_async, .announce = nvme_announce_periph, }; +#define NVME_XPT_XPORT(x, X) \ +static struct xpt_xport nvme_xport_ ## x = { \ + .xport = XPORT_ ## X, \ + .name = #x, \ + .ops = &nvme_xport_ops, \ +}; \ +CAM_XPT_XPORT(nvme_xport_ ## x); -struct xpt_xport * -nvme_get_xport(void) -{ +NVME_XPT_XPORT(nvme, NVME); - return (&nvme_xport); -} +#undef NVME_XPT_XPORT static void nvme_probe_periph_init() Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Thu Jul 28 22:40:31 2016 (r303466) +++ head/sys/cam/scsi/scsi_xpt.c Thu Jul 28 22:55:14 2016 (r303467) @@ -590,18 +590,29 @@ static void scsi_dev_async(u_int32_t as static void scsi_action(union ccb *start_ccb); static void scsi_announce_periph(struct cam_periph *periph); -static struct xpt_xport scsi_xport = { +static struct xpt_xport_ops scsi_xport_ops = { .alloc_device = scsi_alloc_device, .action = scsi_action, .async = scsi_dev_async, .announce = scsi_announce_periph, }; +#define SCSI_XPT_XPORT(x, X) \ +static struct xpt_xport scsi_xport_ ## x = { \ + .xport = XPORT_ ## X, \ + .name = #x, \ + .ops = &scsi_xport_ops, \ +}; \ +CAM_XPT_XPORT(scsi_xport_ ## x); + +SCSI_XPT_XPORT(spi, SPI); +SCSI_XPT_XPORT(sas, SAS); +SCSI_XPT_XPORT(fc, FC); +SCSI_XPT_XPORT(usb, USB); +SCSI_XPT_XPORT(iscsi, ISCSI); +SCSI_XPT_XPORT(srp, SRP); +SCSI_XPT_XPORT(ppb, PPB); -struct xpt_xport * -scsi_get_xport(void) -{ - return (&scsi_xport); -} +#undef SCSI_XPORT_XPORT static void probe_periph_init() From owner-svn-src-all@freebsd.org Thu Jul 28 22:55:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4E6ABA716C; Thu, 28 Jul 2016 22:55:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92CA615C8; Thu, 28 Jul 2016 22:55:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SMtM2I075284; Thu, 28 Jul 2016 22:55:22 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SMtMXw075277; Thu, 28 Jul 2016 22:55:22 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201607282255.u6SMtMXw075277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 28 Jul 2016 22:55:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303468 - in head/sys: cam cam/ata cam/nvme cam/scsi conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 22:55:24 -0000 Author: imp Date: Thu Jul 28 22:55:21 2016 New Revision: 303468 URL: https://svnweb.freebsd.org/changeset/base/303468 Log: Move protocol specific stuff into a linker set object that's per-protocol. This reduces the number scsi symbols references by cam_xpt significantly, and eliminates all ata / nvme symbols. There's still some NVME / ATA specific code for dealing with XPT_NVME_IO and XPT_ATA_IO respectively, and a bunch of scsi-specific code, but this is progress. Differential Revision: https://reviews.freebsd.org/D7289 Modified: head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt_internal.h head/sys/cam/nvme/nvme_xpt.c head/sys/cam/scsi/scsi_xpt.c head/sys/conf/files Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Thu Jul 28 22:55:14 2016 (r303467) +++ head/sys/cam/ata/ata_xpt.c Thu Jul 28 22:55:21 2016 (r303468) @@ -188,6 +188,11 @@ static void ata_dev_async(u_int32_t asy void *async_arg); static void ata_action(union ccb *start_ccb); static void ata_announce_periph(struct cam_periph *periph); +static void ata_proto_announce(struct cam_ed *device); +static void ata_proto_denounce(struct cam_ed *device); +static void ata_proto_debug_out(union ccb *ccb); +static void semb_proto_announce(struct cam_ed *device); +static void semb_proto_denounce(struct cam_ed *device); static int ata_dma = 1; static int atapi_dma = 1; @@ -214,6 +219,43 @@ ATA_XPT_XPORT(sata, SATA); #undef ATA_XPORT_XPORT +static struct xpt_proto_ops ata_proto_ops_ata = { + .announce = ata_proto_announce, + .denounce = ata_proto_denounce, + .debug_out = ata_proto_debug_out, +}; +static struct xpt_proto ata_proto_ata = { + .proto = PROTO_ATA, + .name = "ata", + .ops = &ata_proto_ops_ata, +}; + +static struct xpt_proto_ops ata_proto_ops_satapm = { + .announce = ata_proto_announce, + .denounce = ata_proto_denounce, + .debug_out = ata_proto_debug_out, +}; +static struct xpt_proto ata_proto_satapm = { + .proto = PROTO_SATAPM, + .name = "satapm", + .ops = &ata_proto_ops_satapm, +}; + +static struct xpt_proto_ops ata_proto_ops_semb = { + .announce = semb_proto_announce, + .denounce = semb_proto_denounce, + .debug_out = ata_proto_debug_out, +}; +static struct xpt_proto ata_proto_semb = { + .proto = PROTO_SEMB, + .name = "semb", + .ops = &ata_proto_ops_semb, +}; + +CAM_XPT_PROTO(ata_proto_ata); +CAM_XPT_PROTO(ata_proto_satapm); +CAM_XPT_PROTO(ata_proto_semb); + static void probe_periph_init() { @@ -2094,3 +2136,40 @@ ata_announce_periph(struct cam_periph *p } printf("\n"); } + +static void +ata_proto_announce(struct cam_ed *device) +{ + ata_print_ident(&device->ident_data); +} + +static void +ata_proto_denounce(struct cam_ed *device) +{ + ata_print_ident_short(&device->ident_data); +} + +static void +semb_proto_announce(struct cam_ed *device) +{ + semb_print_ident((struct sep_identify_data *)&device->ident_data); +} + +static void +semb_proto_denounce(struct cam_ed *device) +{ + semb_print_ident_short((struct sep_identify_data *)&device->ident_data); +} + +static void +ata_proto_debug_out(union ccb *ccb) +{ + char cdb_str[(sizeof(struct ata_cmd) * 3) + 1]; + + if (ccb->ccb_h.func_code != XPT_ATA_IO) + return; + + CAM_DEBUG(ccb->ccb_h.path, + CAM_DEBUG_CDB,("%s. ACB: %s\n", ata_op_string(&ccb->ataio.cmd), + ata_cmd_string(&ccb->ataio.cmd, cdb_str, sizeof(cdb_str)))); +} Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Jul 28 22:55:14 2016 (r303467) +++ head/sys/cam/cam_xpt.c Thu Jul 28 22:55:21 2016 (r303468) @@ -746,6 +746,19 @@ cam_module_event_handler(module_t mod, i return 0; } +static struct xpt_proto * +xpt_proto_find(cam_proto proto) +{ + struct xpt_proto **pp; + + SET_FOREACH(pp, cam_xpt_proto_set) { + if ((*pp)->proto == proto) + return *pp; + } + + return NULL; +} + static void xpt_rescan_done(struct cam_periph *periph, union ccb *done_ccb) { @@ -1012,6 +1025,7 @@ void xpt_announce_periph(struct cam_periph *periph, char *announce_string) { struct cam_path *path = periph->path; + struct xpt_proto *proto; cam_periph_assert(periph, MA_OWNED); periph->flags |= CAM_PERIPH_ANNOUNCED; @@ -1025,25 +1039,20 @@ xpt_announce_periph(struct cam_periph *p path->target->target_id, (uintmax_t)path->device->lun_id); printf("%s%d: ", periph->periph_name, periph->unit_number); - if (path->device->protocol == PROTO_SCSI) - scsi_print_inquiry(&path->device->inq_data); - else if (path->device->protocol == PROTO_ATA || - path->device->protocol == PROTO_SATAPM) - ata_print_ident(&path->device->ident_data); - else if (path->device->protocol == PROTO_SEMB) - semb_print_ident( - (struct sep_identify_data *)&path->device->ident_data); - else if (path->device->protocol == PROTO_NVME) - nvme_print_ident(path->device->nvme_cdata, path->device->nvme_data); + proto = xpt_proto_find(path->device->protocol); + if (proto) + proto->ops->announce(path->device); else - printf("Unknown protocol device\n"); + printf("%s%d: Unknown protocol device %d\n", + periph->periph_name, periph->unit_number, + path->device->protocol); if (path->device->serial_num_len > 0) { /* Don't wrap the screen - print only the first 60 chars */ printf("%s%d: Serial Number %.60s\n", periph->periph_name, periph->unit_number, path->device->serial_num); } /* Announce transport details. */ - (*(path->bus->xport->ops->announce))(periph); + path->bus->xport->ops->announce(periph); /* Announce command queueing. */ if (path->device->inq_flags & SID_CmdQue || path->device->flags & CAM_DEV_TAG_AFTER_COUNT) { @@ -1069,6 +1078,7 @@ void xpt_denounce_periph(struct cam_periph *periph) { struct cam_path *path = periph->path; + struct xpt_proto *proto; cam_periph_assert(periph, MA_OWNED); printf("%s%d at %s%d bus %d scbus%d target %d lun %jx\n", @@ -1080,18 +1090,13 @@ xpt_denounce_periph(struct cam_periph *p path->target->target_id, (uintmax_t)path->device->lun_id); printf("%s%d: ", periph->periph_name, periph->unit_number); - if (path->device->protocol == PROTO_SCSI) - scsi_print_inquiry_short(&path->device->inq_data); - else if (path->device->protocol == PROTO_ATA || - path->device->protocol == PROTO_SATAPM) - ata_print_ident_short(&path->device->ident_data); - else if (path->device->protocol == PROTO_SEMB) - semb_print_ident_short( - (struct sep_identify_data *)&path->device->ident_data); - else if (path->device->protocol == PROTO_NVME) - nvme_print_ident(path->device->nvme_cdata, path->device->nvme_data); + proto = xpt_proto_find(path->device->protocol); + if (proto) + proto->ops->denounce(path->device); else - printf("Unknown protocol device"); + printf("%s%d: Unknown protocol device %d\n", + periph->periph_name, periph->unit_number, + path->device->protocol); if (path->device->serial_num_len > 0) printf(" s/n %.60s", path->device->serial_num); printf(" detached\n"); @@ -3234,7 +3239,6 @@ restart: static void xpt_run_devq(struct cam_devq *devq) { - char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1]; int lock; CAM_DEBUG_PRINT(CAM_DEBUG_XPT, ("xpt_run_devq\n")); @@ -3246,6 +3250,7 @@ xpt_run_devq(struct cam_devq *devq) struct cam_ed *device; union ccb *work_ccb; struct cam_sim *sim; + struct xpt_proto *proto; device = (struct cam_ed *)camq_remove(&devq->send_queue, CAMQ_HEAD); @@ -3311,32 +3316,12 @@ xpt_run_devq(struct cam_devq *devq) work_ccb->ccb_h.flags &= ~CAM_TAG_ACTION_VALID; } - switch (work_ccb->ccb_h.func_code) { - case XPT_SCSI_IO: - CAM_DEBUG(work_ccb->ccb_h.path, - CAM_DEBUG_CDB,("%s. CDB: %s\n", - scsi_op_desc(work_ccb->csio.cdb_io.cdb_bytes[0], - &device->inq_data), - scsi_cdb_string(work_ccb->csio.cdb_io.cdb_bytes, - cdb_str, sizeof(cdb_str)))); - break; - case XPT_ATA_IO: - CAM_DEBUG(work_ccb->ccb_h.path, - CAM_DEBUG_CDB,("%s. ACB: %s\n", - ata_op_string(&work_ccb->ataio.cmd), - ata_cmd_string(&work_ccb->ataio.cmd, - cdb_str, sizeof(cdb_str)))); - break; - case XPT_NVME_IO: - CAM_DEBUG(work_ccb->ccb_h.path, - CAM_DEBUG_CDB,("%s. NCB: %s\n", - nvme_op_string(&work_ccb->nvmeio.cmd), - nvme_cmd_string(&work_ccb->nvmeio.cmd, - cdb_str, sizeof(cdb_str)))); - break; - default: - break; - } + KASSERT(device == work_ccb->ccb_h.path->device, + ("device (%p) / path->device (%p) mismatch", + device, work_ccb->ccb_h.path->device)); + proto = xpt_proto_find(device->protocol); + if (proto && proto->ops->debug_out) + proto->ops->debug_out(work_ccb); /* * Device queues can be shared among multiple SIM instances Modified: head/sys/cam/cam_xpt_internal.h ============================================================================== --- head/sys/cam/cam_xpt_internal.h Thu Jul 28 22:55:14 2016 (r303467) +++ head/sys/cam/cam_xpt_internal.h Thu Jul 28 22:55:21 2016 (r303468) @@ -66,6 +66,26 @@ SET_DECLARE(cam_xpt_xport_set, struct xp #define CAM_XPT_XPORT(data) \ DATA_SET(cam_xpt_xport_set, data) +typedef void (*xpt_proto_announce_func)(struct cam_ed *); +typedef void (*xpt_proto_debug_out_func)(union ccb *); + +struct xpt_proto_ops { + xpt_proto_announce_func announce; + xpt_proto_announce_func denounce; + xpt_proto_debug_out_func debug_out; +}; + +struct xpt_proto { + cam_proto proto; + const char *name; + struct xpt_proto_ops *ops; +}; + +SET_DECLARE(cam_xpt_proto_set, struct xpt_proto); +#define CAM_XPT_PROTO(data) \ + DATA_SET(cam_xpt_proto_set, data) + + /* * The CAM EDT (Existing Device Table) contains the device information for * all devices for all busses in the system. The table contains a Modified: head/sys/cam/nvme/nvme_xpt.c ============================================================================== --- head/sys/cam/nvme/nvme_xpt.c Thu Jul 28 22:55:14 2016 (r303467) +++ head/sys/cam/nvme/nvme_xpt.c Thu Jul 28 22:55:21 2016 (r303468) @@ -152,6 +152,9 @@ static void nvme_dev_async(u_int32_t as void *async_arg); static void nvme_action(union ccb *start_ccb); static void nvme_announce_periph(struct cam_periph *periph); +static void nvme_proto_announce(struct cam_ed *device); +static void nvme_proto_denounce(struct cam_ed *device); +static void nvme_proto_debug_out(union ccb *ccb); static struct xpt_xport_ops nvme_xport_ops = { .alloc_device = nvme_alloc_device, @@ -171,6 +174,18 @@ NVME_XPT_XPORT(nvme, NVME); #undef NVME_XPT_XPORT +static struct xpt_proto_ops nvme_proto_ops = { + .announce = nvme_proto_announce, + .denounce = nvme_proto_denounce, + .debug_out = nvme_proto_debug_out, +}; +static struct xpt_proto nvme_proto = { + .proto = PROTO_NVME, + .name = "nvme", + .ops = &nvme_proto_ops, +}; +CAM_XPT_PROTO(nvme_proto); + static void nvme_probe_periph_init() { @@ -602,3 +617,29 @@ nvme_announce_periph(struct cam_periph * /* XXX NVME STUFF HERE */ printf("\n"); } + +static void +nvme_proto_announce(struct cam_ed *device) +{ + nvme_print_ident(device->nvme_cdata, device->nvme_data); +} + +static void +nvme_proto_denounce(struct cam_ed *device) +{ + nvme_print_ident(device->nvme_cdata, device->nvme_data); +} + +static void +nvme_proto_debug_out(union ccb *ccb) +{ + char cdb_str[(sizeof(struct nvme_command) * 3) + 1]; + + if (ccb->ccb_h.func_code != XPT_NVME_IO) + return; + + CAM_DEBUG(ccb->ccb_h.path, + CAM_DEBUG_CDB,("%s. NCB: %s\n", nvme_op_string(&ccb->nvmeio.cmd), + nvme_cmd_string(&ccb->nvmeio.cmd, cdb_str, sizeof(cdb_str)))); +} + Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Thu Jul 28 22:55:14 2016 (r303467) +++ head/sys/cam/scsi/scsi_xpt.c Thu Jul 28 22:55:21 2016 (r303468) @@ -589,6 +589,9 @@ static void scsi_dev_async(u_int32_t as void *async_arg); static void scsi_action(union ccb *start_ccb); static void scsi_announce_periph(struct cam_periph *periph); +static void scsi_proto_announce(struct cam_ed *device); +static void scsi_proto_denounce(struct cam_ed *device); +static void scsi_proto_debug_out(union ccb *ccb); static struct xpt_xport_ops scsi_xport_ops = { .alloc_device = scsi_alloc_device, @@ -614,6 +617,18 @@ SCSI_XPT_XPORT(ppb, PPB); #undef SCSI_XPORT_XPORT +static struct xpt_proto_ops scsi_proto_ops = { + .announce = scsi_proto_announce, + .denounce = scsi_proto_denounce, + .debug_out = scsi_proto_debug_out, +}; +static struct xpt_proto scsi_proto = { + .proto = PROTO_SCSI, + .name = "scsi", + .ops = &scsi_proto_ops, +}; +CAM_XPT_PROTO(scsi_proto); + static void probe_periph_init() { @@ -3100,3 +3115,30 @@ scsi_announce_periph(struct cam_periph * printf("\n"); } +static void +scsi_proto_announce(struct cam_ed *device) +{ + scsi_print_inquiry(&device->inq_data); +} + +static void +scsi_proto_denounce(struct cam_ed *device) +{ + scsi_print_inquiry_short(&device->inq_data); +} + +static void +scsi_proto_debug_out(union ccb *ccb) +{ + char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1]; + struct cam_ed *device; + + if (ccb->ccb_h.func_code != XPT_SCSI_IO) + return; + + device = ccb->ccb_h.path->device; + CAM_DEBUG(ccb->ccb_h.path, + CAM_DEBUG_CDB,("%s. CDB: %s\n", + scsi_op_desc(ccb->csio.cdb_io.cdb_bytes[0], &device->inq_data), + scsi_cdb_string(ccb->csio.cdb_io.cdb_bytes, cdb_str, sizeof(cdb_str)))); +} Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jul 28 22:55:14 2016 (r303467) +++ head/sys/conf/files Thu Jul 28 22:55:21 2016 (r303468) @@ -86,9 +86,9 @@ cam/cam_xpt.c optional scbus cam/ata/ata_all.c optional scbus cam/ata/ata_xpt.c optional scbus cam/ata/ata_pmp.c optional scbus -cam/nvme/nvme_all.c optional scbus +cam/nvme/nvme_all.c optional scbus nvmd !nvd cam/nvme/nvme_da.c optional scbus nvme da !nvd -cam/nvme/nvme_xpt.c optional scbus +cam/nvme/nvme_xpt.c optional scbus nvmd !nvd cam/scsi/scsi_xpt.c optional scbus cam/scsi/scsi_all.c optional scbus cam/scsi/scsi_cd.c optional cd From owner-svn-src-all@freebsd.org Fri Jul 29 00:00:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96B6FBA7294; Fri, 29 Jul 2016 00:00:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F2F61452; Fri, 29 Jul 2016 00:00:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6T00sW9099327; Fri, 29 Jul 2016 00:00:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6T00sv9099326; Fri, 29 Jul 2016 00:00:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607290000.u6T00sv9099326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 29 Jul 2016 00:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303469 - stable/11/sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 00:00:55 -0000 Author: gjb Date: Fri Jul 29 00:00:54 2016 New Revision: 303469 URL: https://svnweb.freebsd.org/changeset/base/303469 Log: Update stable/11 to BETA3 as part of the 11.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Jul 28 22:55:21 2016 (r303468) +++ stable/11/sys/conf/newvers.sh Fri Jul 29 00:00:54 2016 (r303469) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="11.0" -BRANCH="BETA2" +BRANCH="BETA3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri Jul 29 03:16:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15D42BA7B62; Fri, 29 Jul 2016 03:16:53 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E432E14EC; Fri, 29 Jul 2016 03:16:52 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6T3GqWg071663; Fri, 29 Jul 2016 03:16:52 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6T3GpPp071658; Fri, 29 Jul 2016 03:16:51 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607290316.u6T3GpPp071658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 29 Jul 2016 03:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303470 - in head/sys/dev/hyperv: include vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 03:16:53 -0000 Author: sephe Date: Fri Jul 29 03:16:51 2016 New Revision: 303470 URL: https://svnweb.freebsd.org/changeset/base/303470 Log: hyperv/vmbus: Reindent function declarations. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7344 Modified: head/sys/dev/hyperv/include/hyperv.h head/sys/dev/hyperv/include/hyperv_busdma.h head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/vmbus/vmbus_chanvar.h head/sys/dev/hyperv/vmbus/vmbus_var.h Modified: head/sys/dev/hyperv/include/hyperv.h ============================================================================== --- head/sys/dev/hyperv/include/hyperv.h Fri Jul 29 00:00:54 2016 (r303469) +++ head/sys/dev/hyperv/include/hyperv.h Fri Jul 29 03:16:51 2016 (r303470) @@ -42,7 +42,7 @@ struct hyperv_guid { #define HYPERV_GUID_STRLEN 40 -int hyperv_guid2str(const struct hyperv_guid *, char *, size_t); +int hyperv_guid2str(const struct hyperv_guid *, char *, size_t); /** * @brief Get physical address from virtual Modified: head/sys/dev/hyperv/include/hyperv_busdma.h ============================================================================== --- head/sys/dev/hyperv/include/hyperv_busdma.h Fri Jul 29 00:00:54 2016 (r303469) +++ head/sys/dev/hyperv/include/hyperv_busdma.h Fri Jul 29 03:16:51 2016 (r303470) @@ -39,11 +39,11 @@ struct hyperv_dma { bus_dmamap_t hv_dmap; }; -void hyperv_dma_map_paddr(void *arg, bus_dma_segment_t *segs, int nseg, - int error); -void *hyperv_dmamem_alloc(bus_dma_tag_t parent_dtag, bus_size_t alignment, - bus_addr_t boundary, bus_size_t size, struct hyperv_dma *dma, - int flags); -void hyperv_dmamem_free(struct hyperv_dma *dma, void *ptr); +void hyperv_dma_map_paddr(void *arg, bus_dma_segment_t *segs, + int nseg, int error); +void *hyperv_dmamem_alloc(bus_dma_tag_t parent_dtag, + bus_size_t alignment, bus_addr_t boundary, bus_size_t size, + struct hyperv_dma *dma, int flags); +void hyperv_dmamem_free(struct hyperv_dma *dma, void *ptr); #endif /* !_HYPERV_BUSDMA_H_ */ Modified: head/sys/dev/hyperv/include/vmbus.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus.h Fri Jul 29 00:00:54 2016 (r303469) +++ head/sys/dev/hyperv/include/vmbus.h Fri Jul 29 03:16:51 2016 (r303470) @@ -116,45 +116,47 @@ vmbus_get_channel(device_t dev) return device_get_ivars(dev); } -int vmbus_chan_open(struct vmbus_channel *chan, - int txbr_size, int rxbr_size, const void *udata, int udlen, - vmbus_chan_callback_t cb, void *cbarg); -void vmbus_chan_close(struct vmbus_channel *chan); - -int vmbus_chan_gpadl_connect(struct vmbus_channel *chan, - bus_addr_t paddr, int size, uint32_t *gpadl); -int vmbus_chan_gpadl_disconnect(struct vmbus_channel *chan, - uint32_t gpadl); +int vmbus_chan_open(struct vmbus_channel *chan, + int txbr_size, int rxbr_size, const void *udata, int udlen, + vmbus_chan_callback_t cb, void *cbarg); +void vmbus_chan_close(struct vmbus_channel *chan); + +int vmbus_chan_gpadl_connect(struct vmbus_channel *chan, + bus_addr_t paddr, int size, uint32_t *gpadl); +int vmbus_chan_gpadl_disconnect(struct vmbus_channel *chan, + uint32_t gpadl); -void vmbus_chan_cpu_set(struct vmbus_channel *chan, int cpu); -void vmbus_chan_cpu_rr(struct vmbus_channel *chan); +void vmbus_chan_cpu_set(struct vmbus_channel *chan, int cpu); +void vmbus_chan_cpu_rr(struct vmbus_channel *chan); struct vmbus_channel * - vmbus_chan_cpu2chan(struct vmbus_channel *chan, int cpu); -void vmbus_chan_set_readbatch(struct vmbus_channel *chan, bool on); + vmbus_chan_cpu2chan(struct vmbus_channel *chan, int cpu); +void vmbus_chan_set_readbatch(struct vmbus_channel *chan, bool on); struct vmbus_channel ** - vmbus_subchan_get(struct vmbus_channel *pri_chan, int subchan_cnt); -void vmbus_subchan_rel(struct vmbus_channel **subchan, int subchan_cnt); -void vmbus_subchan_drain(struct vmbus_channel *pri_chan); - -int vmbus_chan_recv(struct vmbus_channel *chan, void *data, int *dlen, - uint64_t *xactid); -int vmbus_chan_recv_pkt(struct vmbus_channel *chan, - struct vmbus_chanpkt_hdr *pkt, int *pktlen); - -int vmbus_chan_send(struct vmbus_channel *chan, uint16_t type, - uint16_t flags, void *data, int dlen, uint64_t xactid); -int vmbus_chan_send_sglist(struct vmbus_channel *chan, - struct vmbus_gpa sg[], int sglen, void *data, int dlen, - uint64_t xactid); -int vmbus_chan_send_prplist(struct vmbus_channel *chan, - struct vmbus_gpa_range *prp, int prp_cnt, void *data, int dlen, - uint64_t xactid); - -uint32_t vmbus_chan_id(const struct vmbus_channel *chan); -uint32_t vmbus_chan_subidx(const struct vmbus_channel *chan); -bool vmbus_chan_is_primary(const struct vmbus_channel *chan); + vmbus_subchan_get(struct vmbus_channel *pri_chan, + int subchan_cnt); +void vmbus_subchan_rel(struct vmbus_channel **subchan, + int subchan_cnt); +void vmbus_subchan_drain(struct vmbus_channel *pri_chan); + +int vmbus_chan_recv(struct vmbus_channel *chan, void *data, int *dlen, + uint64_t *xactid); +int vmbus_chan_recv_pkt(struct vmbus_channel *chan, + struct vmbus_chanpkt_hdr *pkt, int *pktlen); + +int vmbus_chan_send(struct vmbus_channel *chan, uint16_t type, + uint16_t flags, void *data, int dlen, uint64_t xactid); +int vmbus_chan_send_sglist(struct vmbus_channel *chan, + struct vmbus_gpa sg[], int sglen, void *data, int dlen, + uint64_t xactid); +int vmbus_chan_send_prplist(struct vmbus_channel *chan, + struct vmbus_gpa_range *prp, int prp_cnt, void *data, + int dlen, uint64_t xactid); + +uint32_t vmbus_chan_id(const struct vmbus_channel *chan); +uint32_t vmbus_chan_subidx(const struct vmbus_channel *chan); +bool vmbus_chan_is_primary(const struct vmbus_channel *chan); const struct hyperv_guid * - vmbus_chan_guid_inst(const struct vmbus_channel *chan); + vmbus_chan_guid_inst(const struct vmbus_channel *chan); #endif /* !_VMBUS_H_ */ Modified: head/sys/dev/hyperv/vmbus/vmbus_chanvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Fri Jul 29 00:00:54 2016 (r303469) +++ head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Fri Jul 29 03:16:51 2016 (r303470) @@ -155,9 +155,10 @@ struct vmbus_channel { struct vmbus_softc; struct vmbus_message; -void vmbus_event_proc(struct vmbus_softc *, int); -void vmbus_event_proc_compat(struct vmbus_softc *, int); -void vmbus_chan_msgproc(struct vmbus_softc *, const struct vmbus_message *); -void vmbus_chan_destroy_all(struct vmbus_softc *); +void vmbus_event_proc(struct vmbus_softc *, int); +void vmbus_event_proc_compat(struct vmbus_softc *, int); +void vmbus_chan_msgproc(struct vmbus_softc *, + const struct vmbus_message *); +void vmbus_chan_destroy_all(struct vmbus_softc *); #endif /* !_VMBUS_CHANVAR_H_ */ Modified: head/sys/dev/hyperv/vmbus/vmbus_var.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_var.h Fri Jul 29 00:00:54 2016 (r303469) +++ head/sys/dev/hyperv/vmbus/vmbus_var.h Fri Jul 29 03:16:51 2016 (r303470) @@ -142,20 +142,23 @@ struct trapframe; struct vmbus_message; struct vmbus_msghc; -void vmbus_handle_intr(struct trapframe *); -int vmbus_add_child(struct vmbus_channel *); -int vmbus_delete_child(struct vmbus_channel *); -void vmbus_et_intr(struct trapframe *); -uint32_t vmbus_gpadl_alloc(struct vmbus_softc *); +void vmbus_handle_intr(struct trapframe *); +int vmbus_add_child(struct vmbus_channel *); +int vmbus_delete_child(struct vmbus_channel *); +void vmbus_et_intr(struct trapframe *); +uint32_t vmbus_gpadl_alloc(struct vmbus_softc *); -struct vmbus_msghc *vmbus_msghc_get(struct vmbus_softc *, size_t); -void vmbus_msghc_put(struct vmbus_softc *, struct vmbus_msghc *); -void *vmbus_msghc_dataptr(struct vmbus_msghc *); -int vmbus_msghc_exec_noresult(struct vmbus_msghc *); -int vmbus_msghc_exec(struct vmbus_softc *, struct vmbus_msghc *); -const struct vmbus_message *vmbus_msghc_wait_result(struct vmbus_softc *, - struct vmbus_msghc *); -void vmbus_msghc_wakeup(struct vmbus_softc *, const struct vmbus_message *); -void vmbus_msghc_reset(struct vmbus_msghc *, size_t); +struct vmbus_msghc * + vmbus_msghc_get(struct vmbus_softc *, size_t); +void vmbus_msghc_put(struct vmbus_softc *, struct vmbus_msghc *); +void *vmbus_msghc_dataptr(struct vmbus_msghc *); +int vmbus_msghc_exec_noresult(struct vmbus_msghc *); +int vmbus_msghc_exec(struct vmbus_softc *, struct vmbus_msghc *); +const struct vmbus_message * + vmbus_msghc_wait_result(struct vmbus_softc *, + struct vmbus_msghc *); +void vmbus_msghc_wakeup(struct vmbus_softc *, + const struct vmbus_message *); +void vmbus_msghc_reset(struct vmbus_msghc *, size_t); #endif /* !_VMBUS_VAR_H_ */ From owner-svn-src-all@freebsd.org Fri Jul 29 05:48:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A22A7BA7B93 for ; Fri, 29 Jul 2016 05:48:40 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x235.google.com (mail-yw0-x235.google.com [IPv6:2607:f8b0:4002:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61174180B for ; Fri, 29 Jul 2016 05:48:40 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x235.google.com with SMTP id r9so106556746ywg.0 for ; Thu, 28 Jul 2016 22:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=IePbSNiKaHKkA/gjJILO6BFQGNuwQmAz+wFCCenXmxs=; b=0j1iZXrqDe5uoStfBF8FIYtvy/Pw/MhVaIsGlznUUUp75jgiN5LsOhF6PHxzYfdTmr SinU3LkQdFfBimUyhFvlDDk4YGZKMz2BTDsQWTNU6R0TKJ+OdTTUcAq+mpw+aYuIbtg+ ryLlR9GvR+FRkM/FgfMzMBAWMQSG/OjVm0H+QY1cwqkTxmY+Hs5c/MVaMurI5c6M1tkc yHAE/CpfrQe98bMrEhM89e0J/KXvhXhb7rWqZ0R1YUWhk9qhdmoJTDAxj1i0Vlk6t9YV mLUUq/Uz0PDGK7dXeScayyitYYNVmjaKjRO74OVLZlX/LV1IbkExmJ7smuujEvlfKMEt /Dlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=IePbSNiKaHKkA/gjJILO6BFQGNuwQmAz+wFCCenXmxs=; b=EoY9i04hcG6ry9wbyNU0bGL6sl9+AcBVZTAUKwaZz8YDbiB7IFMI4naXMqjKzBYJmz dyQRm+152oP+05PA5KoJke+BYqYix0Jhb/TeaaEd3QK1oUorxoNqEw0CikfZMHZgSeBO u2IMypuRwE17XXdQvpHnARh4gcx+T+cejdVHGrDqYzUS2bkjj+GVizaYj2FUpifi03Aj oxtMAWc/OWWEfN9a1VZEnooK/7YqKy/yeSydySJ4kVhPGu3Px+881JC75iwy3HlocaYj hA+PUdI0ZltpB58BWXprp+EXNQwmbGedwM8XzuznWgFskWhbrD+rCAlUL2Rw8JkI1jn4 P7Uw== X-Gm-Message-State: AEkoouuuCqAyA721WEW71bMzl5Kzndnu/9Qsff1jB8ZhZwggqiGYDrgvVMukAqN4bLySMD8QjdVpo4U7lEkuzw== X-Received: by 10.129.98.2 with SMTP id w2mr11111371ywb.313.1469771319386; Thu, 28 Jul 2016 22:48:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Thu, 28 Jul 2016 22:48:39 -0700 (PDT) In-Reply-To: <201607282129.u6SLT4CH042204@repo.freebsd.org> References: <201607282129.u6SLT4CH042204@repo.freebsd.org> From: Ed Schouten Date: Fri, 29 Jul 2016 07:48:39 +0200 Message-ID: Subject: Re: svn commit: r303464 - in head/sys: amd64/linux amd64/linux32 compat/freebsd32 compat/svr4 i386/ibcs2 i386/linux kern To: Brooks Davis Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 05:48:40 -0000 2016-07-28 23:29 GMT+02:00 Brooks Davis : > Log: > Don't create pointless backups of generated files in "make sysent". > > Any sensible workflow will include a revision control system from which > to restore the old files if required. In normal usage, developers just > have to clean up the mess. Thank you! -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Fri Jul 29 05:49:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E9E2BA7BEE; Fri, 29 Jul 2016 05:49:14 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F06FC19CB; Fri, 29 Jul 2016 05:49:13 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6T5nDQe026462; Fri, 29 Jul 2016 05:49:13 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6T5nCgT026457; Fri, 29 Jul 2016 05:49:12 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607290549.u6T5nCgT026457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 29 Jul 2016 05:49:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303471 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 05:49:14 -0000 Author: sephe Date: Fri Jul 29 05:49:12 2016 New Revision: 303471 URL: https://svnweb.freebsd.org/changeset/base/303471 Log: hyperv/vmbus: Forward declare static functions MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7346 Modified: head/sys/dev/hyperv/vmbus/hyperv.c head/sys/dev/hyperv/vmbus/vmbus.c head/sys/dev/hyperv/vmbus/vmbus_br.c head/sys/dev/hyperv/vmbus/vmbus_chan.c head/sys/dev/hyperv/vmbus/vmbus_et.c Modified: head/sys/dev/hyperv/vmbus/hyperv.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hyperv.c Fri Jul 29 03:16:51 2016 (r303470) +++ head/sys/dev/hyperv/vmbus/hyperv.c Fri Jul 29 05:49:12 2016 (r303471) @@ -67,13 +67,15 @@ struct hypercall_ctx { struct hyperv_dma hc_dma; }; -static u_int hyperv_get_timecount(struct timecounter *tc); +static u_int hyperv_get_timecount(struct timecounter *); +static bool hyperv_identify(void); +static void hypercall_memfree(void); -u_int hyperv_features; -u_int hyperv_recommends; +u_int hyperv_features; +u_int hyperv_recommends; -static u_int hyperv_pm_features; -static u_int hyperv_features3; +static u_int hyperv_pm_features; +static u_int hyperv_features3; static struct timecounter hyperv_timecounter = { .tc_get_timecount = hyperv_get_timecount, Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Fri Jul 29 03:16:51 2016 (r303470) +++ head/sys/dev/hyperv/vmbus/vmbus.c Fri Jul 29 05:49:12 2016 (r303471) @@ -81,6 +81,17 @@ struct vmbus_msghc_ctx { #define VMBUS_MSGHC_CTXF_DESTROY 0x0001 +static int vmbus_probe(device_t); +static int vmbus_attach(device_t); +static int vmbus_detach(device_t); +static int vmbus_read_ivar(device_t, device_t, int, + uintptr_t *); +static int vmbus_child_pnpinfo_str(device_t, device_t, + char *, size_t); +static uint32_t vmbus_get_version_method(device_t, device_t); +static int vmbus_probe_guid_method(device_t, device_t, + const struct hyperv_guid *); + static int vmbus_init(struct vmbus_softc *); static int vmbus_connect(struct vmbus_softc *, uint32_t); static int vmbus_req_channels(struct vmbus_softc *sc); @@ -93,8 +104,17 @@ static void vmbus_scan_done(struct vmb const struct vmbus_message *); static void vmbus_chanmsg_handle(struct vmbus_softc *, const struct vmbus_message *); - +static void vmbus_msg_task(void *, int); +static void vmbus_synic_setup(void *); +static void vmbus_synic_teardown(void *); static int vmbus_sysctl_version(SYSCTL_HANDLER_ARGS); +static int vmbus_dma_alloc(struct vmbus_softc *); +static void vmbus_dma_free(struct vmbus_softc *); +static int vmbus_intr_setup(struct vmbus_softc *); +static void vmbus_intr_teardown(struct vmbus_softc *); +static int vmbus_doattach(struct vmbus_softc *); +static void vmbus_event_proc_dummy(struct vmbus_softc *, + int); static struct vmbus_msghc_ctx *vmbus_msghc_ctx_create(bus_dma_tag_t); static void vmbus_msghc_ctx_destroy( Modified: head/sys/dev/hyperv/vmbus/vmbus_br.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_br.c Fri Jul 29 03:16:51 2016 (r303470) +++ head/sys/dev/hyperv/vmbus/vmbus_br.c Fri Jul 29 05:49:12 2016 (r303471) @@ -41,6 +41,10 @@ /* Increase bufing index */ #define VMBUS_BR_IDXINC(idx, inc, sz) (((idx) + (inc)) % (sz)) +static int vmbus_br_sysctl_state(SYSCTL_HANDLER_ARGS); +static int vmbus_br_sysctl_state_bin(SYSCTL_HANDLER_ARGS); +static void vmbus_br_setup(struct vmbus_br *, void *, int); + static int vmbus_br_sysctl_state(SYSCTL_HANDLER_ARGS) { Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Jul 29 03:16:51 2016 (r303470) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Jul 29 05:49:12 2016 (r303471) @@ -47,17 +47,28 @@ __FBSDID("$FreeBSD$"); #include #include -static void vmbus_chan_update_evtflagcnt(struct vmbus_softc *, - const struct vmbus_channel *); - -static void vmbus_chan_task(void *, int); -static void vmbus_chan_task_nobatch(void *, int); -static void vmbus_chan_detach_task(void *, int); - -static void vmbus_chan_msgproc_choffer(struct vmbus_softc *, - const struct vmbus_message *); -static void vmbus_chan_msgproc_chrescind(struct vmbus_softc *, - const struct vmbus_message *); +static void vmbus_chan_update_evtflagcnt( + struct vmbus_softc *, + const struct vmbus_channel *); +static void vmbus_chan_close_internal( + struct vmbus_channel *); +static int vmbus_chan_sysctl_mnf(SYSCTL_HANDLER_ARGS); +static void vmbus_chan_sysctl_create( + struct vmbus_channel *); +static struct vmbus_channel *vmbus_chan_alloc(struct vmbus_softc *); +static void vmbus_chan_free(struct vmbus_channel *); +static int vmbus_chan_add(struct vmbus_channel *); +static void vmbus_chan_cpu_default(struct vmbus_channel *); + +static void vmbus_chan_task(void *, int); +static void vmbus_chan_task_nobatch(void *, int); +static void vmbus_chan_detach_task(void *, int); + +static void vmbus_chan_msgproc_choffer(struct vmbus_softc *, + const struct vmbus_message *); +static void vmbus_chan_msgproc_chrescind( + struct vmbus_softc *, + const struct vmbus_message *); /* * Vmbus channel message processing. Modified: head/sys/dev/hyperv/vmbus/vmbus_et.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_et.c Fri Jul 29 03:16:51 2016 (r303470) +++ head/sys/dev/hyperv/vmbus/vmbus_et.c Fri Jul 29 05:49:12 2016 (r303471) @@ -56,6 +56,13 @@ __FBSDID("$FreeBSD$"); CPUID_HV_MSR_SYNIC | \ CPUID_HV_MSR_SYNTIMER) +static void vmbus_et_identify(driver_t *, device_t); +static int vmbus_et_probe(device_t); +static int vmbus_et_attach(device_t); +static int vmbus_et_detach(device_t); +static int vmbus_et_start(struct eventtimer *, sbintime_t, + sbintime_t); + static struct eventtimer vmbus_et; static __inline uint64_t From owner-svn-src-all@freebsd.org Fri Jul 29 05:58:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB062BA7DB3; Fri, 29 Jul 2016 05:58:25 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C2681E41; Fri, 29 Jul 2016 05:58:25 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6T5wOcu030029; Fri, 29 Jul 2016 05:58:24 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6T5wO06030027; Fri, 29 Jul 2016 05:58:24 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607290558.u6T5wO06030027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 29 Jul 2016 05:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303472 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 05:58:26 -0000 Author: sephe Date: Fri Jul 29 05:58:24 2016 New Revision: 303472 URL: https://svnweb.freebsd.org/changeset/base/303472 Log: hyperv/vmbus: Move driver glue to the beginning of the files Just as most of other drivers do. And move sysinit function close to its SYSINIT. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7347 Modified: head/sys/dev/hyperv/vmbus/vmbus.c head/sys/dev/hyperv/vmbus/vmbus_et.c Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Fri Jul 29 05:49:12 2016 (r303471) +++ head/sys/dev/hyperv/vmbus/vmbus.c Fri Jul 29 05:58:24 2016 (r303472) @@ -142,6 +142,40 @@ vmbus_chanmsg_handlers[VMBUS_CHANMSG_TYP VMBUS_CHANMSG_PROC_WAKEUP(CONNECT_RESP) }; +static device_method_t vmbus_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, vmbus_probe), + DEVMETHOD(device_attach, vmbus_attach), + DEVMETHOD(device_detach, vmbus_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* Bus interface */ + DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_read_ivar, vmbus_read_ivar), + DEVMETHOD(bus_child_pnpinfo_str, vmbus_child_pnpinfo_str), + + /* Vmbus interface */ + DEVMETHOD(vmbus_get_version, vmbus_get_version_method), + DEVMETHOD(vmbus_probe_guid, vmbus_probe_guid_method), + + DEVMETHOD_END +}; + +static driver_t vmbus_driver = { + "vmbus", + vmbus_methods, + sizeof(struct vmbus_softc) +}; + +static devclass_t vmbus_devclass; + +DRIVER_MODULE(vmbus, acpi, vmbus_driver, vmbus_devclass, NULL, NULL); +MODULE_DEPEND(vmbus, acpi, 1, 1, 1); +MODULE_VERSION(vmbus, 1); + static struct vmbus_msghc * vmbus_msghc_alloc(bus_dma_tag_t parent_dtag) { @@ -1248,26 +1282,6 @@ vmbus_attach(device_t dev) return (0); } -static void -vmbus_sysinit(void *arg __unused) -{ - struct vmbus_softc *sc = vmbus_get_softc(); - - if (vm_guest != VM_GUEST_HV || sc == NULL) - return; - -#ifndef EARLY_AP_STARTUP - /* - * If the system has already booted and thread - * scheduling is possible, as indicated by the - * global cold set to zero, we just call the driver - * initialization directly. - */ - if (!cold) -#endif - vmbus_doattach(sc); -} - static int vmbus_detach(device_t dev) { @@ -1297,45 +1311,30 @@ vmbus_detach(device_t dev) return (0); } -static device_method_t vmbus_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, vmbus_probe), - DEVMETHOD(device_attach, vmbus_attach), - DEVMETHOD(device_detach, vmbus_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), - - /* Bus interface */ - DEVMETHOD(bus_add_child, bus_generic_add_child), - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar, vmbus_read_ivar), - DEVMETHOD(bus_child_pnpinfo_str, vmbus_child_pnpinfo_str), - - /* Vmbus interface */ - DEVMETHOD(vmbus_get_version, vmbus_get_version_method), - DEVMETHOD(vmbus_probe_guid, vmbus_probe_guid_method), - - DEVMETHOD_END -}; - -static driver_t vmbus_driver = { - "vmbus", - vmbus_methods, - sizeof(struct vmbus_softc) -}; +#ifndef EARLY_AP_STARTUP -static devclass_t vmbus_devclass; +static void +vmbus_sysinit(void *arg __unused) +{ + struct vmbus_softc *sc = vmbus_get_softc(); -DRIVER_MODULE(vmbus, acpi, vmbus_driver, vmbus_devclass, NULL, NULL); -MODULE_DEPEND(vmbus, acpi, 1, 1, 1); -MODULE_VERSION(vmbus, 1); + if (vm_guest != VM_GUEST_HV || sc == NULL) + return; -#ifndef EARLY_AP_STARTUP + /* + * If the system has already booted and thread + * scheduling is possible, as indicated by the + * global cold set to zero, we just call the driver + * initialization directly. + */ + if (!cold) + vmbus_doattach(sc); +} /* * NOTE: * We have to start as the last step of SI_SUB_SMP, i.e. after SMP is * initialized. */ SYSINIT(vmbus_initialize, SI_SUB_SMP, SI_ORDER_ANY, vmbus_sysinit, NULL); -#endif + +#endif /* !EARLY_AP_STARTUP */ Modified: head/sys/dev/hyperv/vmbus/vmbus_et.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_et.c Fri Jul 29 05:49:12 2016 (r303471) +++ head/sys/dev/hyperv/vmbus/vmbus_et.c Fri Jul 29 05:58:24 2016 (r303472) @@ -65,6 +65,26 @@ static int vmbus_et_start(struct event static struct eventtimer vmbus_et; +static device_method_t vmbus_et_methods[] = { + DEVMETHOD(device_identify, vmbus_et_identify), + DEVMETHOD(device_probe, vmbus_et_probe), + DEVMETHOD(device_attach, vmbus_et_attach), + DEVMETHOD(device_detach, vmbus_et_detach), + + DEVMETHOD_END +}; + +static driver_t vmbus_et_driver = { + VMBUS_ET_NAME, + vmbus_et_methods, + 0 +}; + +static devclass_t vmbus_et_devclass; + +DRIVER_MODULE(hv_et, vmbus, vmbus_et_driver, vmbus_et_devclass, NULL, NULL); +MODULE_VERSION(hv_et, 1); + static __inline uint64_t hyperv_sbintime2count(sbintime_t time) { @@ -181,22 +201,3 @@ vmbus_et_detach(device_t dev) { return (et_deregister(&vmbus_et)); } - -static device_method_t vmbus_et_methods[] = { - DEVMETHOD(device_identify, vmbus_et_identify), - DEVMETHOD(device_probe, vmbus_et_probe), - DEVMETHOD(device_attach, vmbus_et_attach), - DEVMETHOD(device_detach, vmbus_et_detach), - - DEVMETHOD_END -}; - -static driver_t vmbus_et_driver = { - VMBUS_ET_NAME, - vmbus_et_methods, - 0 -}; - -static devclass_t vmbus_et_devclass; -DRIVER_MODULE(hv_et, vmbus, vmbus_et_driver, vmbus_et_devclass, NULL, NULL); -MODULE_VERSION(hv_et, 1); From owner-svn-src-all@freebsd.org Fri Jul 29 06:10:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E210BA612D; Fri, 29 Jul 2016 06:10:29 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8DEE160F; Fri, 29 Jul 2016 06:10:28 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6T6ASeE033897; Fri, 29 Jul 2016 06:10:28 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6T6ARVU033895; Fri, 29 Jul 2016 06:10:27 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607290610.u6T6ARVU033895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 29 Jul 2016 06:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303473 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 06:10:29 -0000 Author: sephe Date: Fri Jul 29 06:10:27 2016 New Revision: 303473 URL: https://svnweb.freebsd.org/changeset/base/303473 Log: hyperv/vmbus: Revoke unnecessary exposure of vmbus softc MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7348 Modified: head/sys/dev/hyperv/vmbus/vmbus.c head/sys/dev/hyperv/vmbus/vmbus_var.h Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Fri Jul 29 05:58:24 2016 (r303472) +++ head/sys/dev/hyperv/vmbus/vmbus.c Fri Jul 29 06:10:27 2016 (r303473) @@ -125,7 +125,7 @@ static void vmbus_msghc_free(struct vm static struct vmbus_msghc *vmbus_msghc_get1(struct vmbus_msghc_ctx *, uint32_t); -struct vmbus_softc *vmbus_sc; +static struct vmbus_softc *vmbus_sc; extern inthand_t IDTVEC(vmbus_isr); @@ -176,6 +176,12 @@ DRIVER_MODULE(vmbus, acpi, vmbus_driver, MODULE_DEPEND(vmbus, acpi, 1, 1, 1); MODULE_VERSION(vmbus, 1); +static __inline struct vmbus_softc * +vmbus_get_softc(void) +{ + return vmbus_sc; +} + static struct vmbus_msghc * vmbus_msghc_alloc(bus_dma_tag_t parent_dtag) { Modified: head/sys/dev/hyperv/vmbus/vmbus_var.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_var.h Fri Jul 29 05:58:24 2016 (r303472) +++ head/sys/dev/hyperv/vmbus/vmbus_var.h Fri Jul 29 06:10:27 2016 (r303473) @@ -120,20 +120,6 @@ struct vmbus_softc { #define VMBUS_FLAG_ATTACHED 0x0001 /* vmbus was attached */ #define VMBUS_FLAG_SYNIC 0x0002 /* SynIC was setup */ -extern struct vmbus_softc *vmbus_sc; - -static __inline struct vmbus_softc * -vmbus_get_softc(void) -{ - return vmbus_sc; -} - -static __inline device_t -vmbus_get_device(void) -{ - return vmbus_sc->vmbus_dev; -} - #define VMBUS_PCPU_GET(sc, field, cpu) (sc)->vmbus_pcpu[(cpu)].field #define VMBUS_PCPU_PTR(sc, field, cpu) &(sc)->vmbus_pcpu[(cpu)].field From owner-svn-src-all@freebsd.org Fri Jul 29 06:22:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAA8ABA644A; Fri, 29 Jul 2016 06:22:12 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A3021C88; Fri, 29 Jul 2016 06:22:12 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6T6MBic040975; Fri, 29 Jul 2016 06:22:11 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6T6MBjo040974; Fri, 29 Jul 2016 06:22:11 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607290622.u6T6MBjo040974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 29 Jul 2016 06:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303474 - head/sys/dev/hyperv/storvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 06:22:12 -0000 Author: sephe Date: Fri Jul 29 06:22:11 2016 New Revision: 303474 URL: https://svnweb.freebsd.org/changeset/base/303474 Log: hyperv/storvsc: Use busdma(9) and enable PIM_UNMAPPED by default. The UNMAPPED I/O greatly improves userland direct disk I/O performance by 35% ~ 135%. Submitted by: Hongjiang Zhang MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7195 Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Jul 29 06:10:27 2016 (r303473) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Jul 29 06:22:11 2016 (r303474) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -87,7 +88,10 @@ __FBSDID("$FreeBSD$"); #define VSTOR_PKT_SIZE (sizeof(struct vstor_packet) - vmscsi_size_delta) -#define HV_ALIGN(x, a) roundup2(x, a) +#define STORVSC_DATA_SEGCNT_MAX VMBUS_CHAN_PRPLIST_MAX +#define STORVSC_DATA_SEGSZ_MAX PAGE_SIZE +#define STORVSC_DATA_SIZE_MAX \ + (STORVSC_DATA_SEGCNT_MAX * STORVSC_DATA_SEGSZ_MAX) struct storvsc_softc; @@ -102,7 +106,7 @@ struct hv_sgl_page_pool{ boolean_t is_init; } g_hv_sgl_page_pool; -#define STORVSC_MAX_SG_PAGE_CNT STORVSC_MAX_IO_REQUESTS * VMBUS_CHAN_PRPLIST_MAX +#define STORVSC_MAX_SG_PAGE_CNT STORVSC_MAX_IO_REQUESTS * STORVSC_DATA_SEGCNT_MAX enum storvsc_request_type { WRITE_TYPE, @@ -110,26 +114,41 @@ enum storvsc_request_type { UNKNOWN_TYPE }; -struct hvs_gpa_range { +SYSCTL_NODE(_hw, OID_AUTO, storvsc, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, + "Hyper-V storage interface"); + +static u_int hv_storvsc_use_pim_unmapped = 1; +SYSCTL_INT(_hw_storvsc, OID_AUTO, use_pim_unmapped, CTLFLAG_RDTUN, + &hv_storvsc_use_pim_unmapped, 0, + "Optimize storvsc by using unmapped I/O"); + +struct hv_storvsc_sysctl { + u_long data_bio_cnt; + u_long data_vaddr_cnt; + u_long data_sg_cnt; +}; + +struct storvsc_gpa_range { struct vmbus_gpa_range gpa_range; - uint64_t gpa_page[VMBUS_CHAN_PRPLIST_MAX]; + uint64_t gpa_page[STORVSC_DATA_SEGCNT_MAX]; } __packed; struct hv_storvsc_request { - LIST_ENTRY(hv_storvsc_request) link; - struct vstor_packet vstor_packet; - int prp_cnt; - struct hvs_gpa_range prp_list; - void *sense_data; - uint8_t sense_info_len; - uint8_t retries; - union ccb *ccb; - struct storvsc_softc *softc; - struct callout callout; - struct sema synch_sema; /*Synchronize the request/response if needed */ - struct sglist *bounce_sgl; - unsigned int bounce_sgl_count; - uint64_t not_aligned_seg_bits; + LIST_ENTRY(hv_storvsc_request) link; + struct vstor_packet vstor_packet; + int prp_cnt; + struct storvsc_gpa_range prp_list; + void *sense_data; + uint8_t sense_info_len; + uint8_t retries; + union ccb *ccb; + struct storvsc_softc *softc; + struct callout callout; + struct sema synch_sema; /*Synchronize the request/response if needed */ + struct sglist *bounce_sgl; + unsigned int bounce_sgl_count; + uint64_t not_aligned_seg_bits; + bus_dmamap_t data_dmap; }; struct storvsc_softc { @@ -148,6 +167,8 @@ struct storvsc_softc { struct hv_storvsc_request hs_init_req; struct hv_storvsc_request hs_reset_req; device_t hs_dev; + bus_dma_tag_t storvsc_req_dtag; + struct hv_storvsc_sysctl sysctl_data; struct vmbus_channel *hs_cpu2chan[MAXCPU]; }; @@ -882,6 +903,77 @@ storvsc_create_cpu2chan(struct storvsc_s } } +static int +storvsc_init_requests(device_t dev) +{ + struct storvsc_softc *sc = device_get_softc(dev); + struct hv_storvsc_request *reqp; + int error, i; + + LIST_INIT(&sc->hs_free_list); + + error = bus_dma_tag_create( + bus_get_dma_tag(dev), /* parent */ + 1, /* alignment */ + PAGE_SIZE, /* boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + STORVSC_DATA_SIZE_MAX, /* maxsize */ + STORVSC_DATA_SEGCNT_MAX, /* nsegments */ + STORVSC_DATA_SEGSZ_MAX, /* maxsegsize */ + 0, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockfuncarg */ + &sc->storvsc_req_dtag); + if (error) { + device_printf(dev, "failed to create storvsc dma tag\n"); + return (error); + } + + for (i = 0; i < sc->hs_drv_props->drv_max_ios_per_target; ++i) { + reqp = malloc(sizeof(struct hv_storvsc_request), + M_DEVBUF, M_WAITOK|M_ZERO); + reqp->softc = sc; + error = bus_dmamap_create(sc->storvsc_req_dtag, 0, + &reqp->data_dmap); + if (error) { + device_printf(dev, "failed to allocate storvsc " + "data dmamap\n"); + goto cleanup; + } + LIST_INSERT_HEAD(&sc->hs_free_list, reqp, link); + } + return (0); + +cleanup: + while ((reqp = LIST_FIRST(&sc->hs_free_list)) != NULL) { + LIST_REMOVE(reqp, link); + bus_dmamap_destroy(sc->storvsc_req_dtag, reqp->data_dmap); + free(reqp, M_DEVBUF); + } + return (error); +} + +static void +storvsc_sysctl(device_t dev) +{ + struct sysctl_oid_list *child; + struct sysctl_ctx_list *ctx; + struct storvsc_softc *sc; + + sc = device_get_softc(dev); + ctx = device_get_sysctl_ctx(dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "data_bio_cnt", CTLFLAG_RW, + &sc->sysctl_data.data_bio_cnt, "# of bio data block"); + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "data_vaddr_cnt", CTLFLAG_RW, + &sc->sysctl_data.data_vaddr_cnt, "# of vaddr data block"); + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "data_sg_cnt", CTLFLAG_RW, + &sc->sysctl_data.data_sg_cnt, "# of sg data block"); +} + /** * @brief StorVSC attach function * @@ -926,16 +1018,11 @@ storvsc_attach(device_t dev) sc->hs_unit = device_get_unit(dev); sc->hs_dev = dev; - LIST_INIT(&sc->hs_free_list); mtx_init(&sc->hs_lock, "hvslck", NULL, MTX_DEF); - for (i = 0; i < sc->hs_drv_props->drv_max_ios_per_target; ++i) { - reqp = malloc(sizeof(struct hv_storvsc_request), - M_DEVBUF, M_WAITOK|M_ZERO); - reqp->softc = sc; - - LIST_INSERT_HEAD(&sc->hs_free_list, reqp, link); - } + ret = storvsc_init_requests(dev); + if (ret != 0) + goto cleanup; /* create sg-list page pool */ if (FALSE == g_hv_sgl_page_pool.is_init) { @@ -945,7 +1032,7 @@ storvsc_attach(device_t dev) /* * Pre-create SG list, each SG list with - * VMBUS_CHAN_PRPLIST_MAX segments, each + * STORVSC_DATA_SEGCNT_MAX segments, each * segment has one page buffer */ for (i = 0; i < STORVSC_MAX_IO_REQUESTS; i++) { @@ -953,10 +1040,10 @@ storvsc_attach(device_t dev) M_DEVBUF, M_WAITOK|M_ZERO); sgl_node->sgl_data = - sglist_alloc(VMBUS_CHAN_PRPLIST_MAX, + sglist_alloc(STORVSC_DATA_SEGCNT_MAX, M_WAITOK|M_ZERO); - for (j = 0; j < VMBUS_CHAN_PRPLIST_MAX; j++) { + for (j = 0; j < STORVSC_DATA_SEGCNT_MAX; j++) { tmp_buff = malloc(PAGE_SIZE, M_DEVBUF, M_WAITOK|M_ZERO); @@ -1031,6 +1118,8 @@ storvsc_attach(device_t dev) mtx_unlock(&sc->hs_lock); + storvsc_sysctl(dev); + root_mount_rel(root_mount_token); return (0); @@ -1040,13 +1129,14 @@ cleanup: while (!LIST_EMPTY(&sc->hs_free_list)) { reqp = LIST_FIRST(&sc->hs_free_list); LIST_REMOVE(reqp, link); + bus_dmamap_destroy(sc->storvsc_req_dtag, reqp->data_dmap); free(reqp, M_DEVBUF); } while (!LIST_EMPTY(&g_hv_sgl_page_pool.free_sgl_list)) { sgl_node = LIST_FIRST(&g_hv_sgl_page_pool.free_sgl_list); LIST_REMOVE(sgl_node, link); - for (j = 0; j < VMBUS_CHAN_PRPLIST_MAX; j++) { + for (j = 0; j < STORVSC_DATA_SEGCNT_MAX; j++) { if (NULL != (void*)sgl_node->sgl_data->sg_segs[j].ss_paddr) { free((void*)sgl_node->sgl_data->sg_segs[j].ss_paddr, M_DEVBUF); @@ -1101,7 +1191,7 @@ storvsc_detach(device_t dev) while (!LIST_EMPTY(&sc->hs_free_list)) { reqp = LIST_FIRST(&sc->hs_free_list); LIST_REMOVE(reqp, link); - + bus_dmamap_destroy(sc->storvsc_req_dtag, reqp->data_dmap); free(reqp, M_DEVBUF); } mtx_unlock(&sc->hs_lock); @@ -1109,7 +1199,7 @@ storvsc_detach(device_t dev) while (!LIST_EMPTY(&g_hv_sgl_page_pool.free_sgl_list)) { sgl_node = LIST_FIRST(&g_hv_sgl_page_pool.free_sgl_list); LIST_REMOVE(sgl_node, link); - for (j = 0; j < VMBUS_CHAN_PRPLIST_MAX; j++){ + for (j = 0; j < STORVSC_DATA_SEGCNT_MAX; j++){ if (NULL != (void*)sgl_node->sgl_data->sg_segs[j].ss_paddr) { free((void*)sgl_node->sgl_data->sg_segs[j].ss_paddr, M_DEVBUF); @@ -1294,6 +1384,8 @@ storvsc_action(struct cam_sim *sim, unio cpi->hba_inquiry = PI_TAG_ABLE|PI_SDTR_ABLE; cpi->target_sprt = 0; cpi->hba_misc = PIM_NOBUSRESET; + if (hv_storvsc_use_pim_unmapped) + cpi->hba_misc |= PIM_UNMAPPED; cpi->hba_eng_cnt = 0; cpi->max_target = STORVSC_MAX_TARGETS; cpi->max_lun = sc->hs_drv_props->drv_max_luns_per_target; @@ -1368,6 +1460,7 @@ storvsc_action(struct cam_sim *sim, unio case XPT_SCSI_IO: case XPT_IMMED_NOTIFY: { struct hv_storvsc_request *reqp = NULL; + bus_dmamap_t dmap_saved; if (ccb->csio.cdb_len == 0) { panic("cdl_len is 0\n"); @@ -1386,7 +1479,14 @@ storvsc_action(struct cam_sim *sim, unio reqp = LIST_FIRST(&sc->hs_free_list); LIST_REMOVE(reqp, link); + /* Save the data_dmap before reset request */ + dmap_saved = reqp->data_dmap; + + /* XXX this is ugly */ bzero(reqp, sizeof(struct hv_storvsc_request)); + + /* Restore necessary bits */ + reqp->data_dmap = dmap_saved; reqp->softc = sc; ccb->ccb_h.status |= CAM_SIM_QUEUED; @@ -1642,6 +1742,35 @@ storvsc_check_bounce_buffer_sgl(bus_dma_ } /** + * Copy bus_dma segments to multiple page buffer, which requires + * the pages are compact composed except for the 1st and last pages. + */ +static void +storvsc_xferbuf_prepare(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + struct hv_storvsc_request *reqp = arg; + union ccb *ccb = reqp->ccb; + struct ccb_scsiio *csio = &ccb->csio; + struct storvsc_gpa_range *prplist; + int i; + + prplist = &reqp->prp_list; + prplist->gpa_range.gpa_len = csio->dxfer_len; + prplist->gpa_range.gpa_ofs = segs[0].ds_addr & PAGE_MASK; + + for (i = 0; i < nsegs; i++) { + prplist->gpa_page[i] = atop(segs[i].ds_addr); +#ifdef INVARIANTS + if (i != 0 && i != nsegs - 1) { + KASSERT((segs[i].ds_addr & PAGE_MASK) == 0 && + segs[i].ds_len == PAGE_SIZE, ("not a full page")); + } +#endif + } + reqp->prp_cnt = nsegs; +} + +/** * @brief Fill in a request structure based on a CAM control block * * Fills in a request structure based on the contents of a CAM control @@ -1656,11 +1785,9 @@ create_storvsc_request(union ccb *ccb, s { struct ccb_scsiio *csio = &ccb->csio; uint64_t phys_addr; - uint32_t bytes_to_copy = 0; - uint32_t pfn_num = 0; uint32_t pfn; uint64_t not_aligned_seg_bits = 0; - struct hvs_gpa_range *prplist; + int error; /* refer to struct vmscsi_req for meanings of these two fields */ reqp->vstor_packet.u.vm_srb.port = @@ -1704,36 +1831,26 @@ create_storvsc_request(union ccb *ccb, s return (0); } - prplist = &reqp->prp_list; - prplist->gpa_range.gpa_len = csio->dxfer_len; - switch (ccb->ccb_h.flags & CAM_DATA_MASK) { + case CAM_DATA_BIO: case CAM_DATA_VADDR: - { - bytes_to_copy = csio->dxfer_len; - phys_addr = vtophys(csio->data_ptr); - prplist->gpa_range.gpa_ofs = phys_addr & PAGE_MASK; - - while (bytes_to_copy != 0) { - int bytes, page_offset; - phys_addr = - vtophys(&csio->data_ptr[prplist->gpa_range.gpa_len - - bytes_to_copy]); - pfn = phys_addr >> PAGE_SHIFT; - prplist->gpa_page[pfn_num] = pfn; - page_offset = phys_addr & PAGE_MASK; - - bytes = min(PAGE_SIZE - page_offset, bytes_to_copy); - - bytes_to_copy -= bytes; - pfn_num++; + error = bus_dmamap_load_ccb(reqp->softc->storvsc_req_dtag, + reqp->data_dmap, ccb, storvsc_xferbuf_prepare, reqp, + BUS_DMA_NOWAIT); + if (error) { + xpt_print(ccb->ccb_h.path, + "bus_dmamap_load_ccb failed: %d\n", error); + return (error); } - reqp->prp_cnt = pfn_num; + if ((ccb->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_BIO) + reqp->softc->sysctl_data.data_bio_cnt++; + else + reqp->softc->sysctl_data.data_vaddr_cnt++; break; - } case CAM_DATA_SG: { + struct storvsc_gpa_range *prplist; int i = 0; int offset = 0; int ret; @@ -1742,13 +1859,16 @@ create_storvsc_request(union ccb *ccb, s (bus_dma_segment_t *)ccb->csio.data_ptr; u_int16_t storvsc_sg_count = ccb->csio.sglist_cnt; + prplist = &reqp->prp_list; + prplist->gpa_range.gpa_len = csio->dxfer_len; + printf("Storvsc: get SG I/O operation, %d\n", reqp->vstor_packet.u.vm_srb.data_in); - if (storvsc_sg_count > VMBUS_CHAN_PRPLIST_MAX){ + if (storvsc_sg_count > STORVSC_DATA_SEGCNT_MAX){ printf("Storvsc: %d segments is too much, " "only support %d segments\n", - storvsc_sg_count, VMBUS_CHAN_PRPLIST_MAX); + storvsc_sg_count, STORVSC_DATA_SEGCNT_MAX); return (EINVAL); } @@ -1845,6 +1965,7 @@ create_storvsc_request(union ccb *ccb, s reqp->bounce_sgl_count = 0; } + reqp->softc->sysctl_data.data_sg_cnt++; break; } default: From owner-svn-src-all@freebsd.org Fri Jul 29 08:50:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E556BA8F0C; Fri, 29 Jul 2016 08:50:38 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DFB31508; Fri, 29 Jul 2016 08:50:38 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6T8obsW094699; Fri, 29 Jul 2016 08:50:37 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6T8obFs094319; Fri, 29 Jul 2016 08:50:37 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607290850.u6T8obFs094319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 29 Jul 2016 08:50:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303475 - in head/sys: arm64/conf conf 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 08:50:38 -0000 Author: andrew Date: Fri Jul 29 08:50:36 2016 New Revision: 303475 URL: https://svnweb.freebsd.org/changeset/base/303475 Log: Add a generic EHCI USB driver based on the Allwinner A10 driver. It is ACPI only for now, but wouldn't be too difficult to add support for FDT. Reviewed by: hselasky Obtained from: ABT Systems Ltd MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7352 Added: head/sys/dev/usb/controller/generic_ehci.c (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Fri Jul 29 06:22:11 2016 (r303474) +++ head/sys/arm64/conf/GENERIC Fri Jul 29 08:50:36 2016 (r303475) @@ -131,6 +131,7 @@ device pl011 options USB_DEBUG # enable debug msgs device dwcotg # DWC OTG controller device ohci # OHCI PCI->USB interface +device ehci # EHCI PCI->USB interface (USB 2.0) device xhci # XHCI PCI->USB interface (USB 3.0) device usb # USB Bus (required) device ukbd # Keyboard Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Fri Jul 29 06:22:11 2016 (r303474) +++ head/sys/conf/files.arm64 Fri Jul 29 08:50:36 2016 (r303475) @@ -69,6 +69,7 @@ dev/psci/psci_arm64.S optional psci dev/uart/uart_cpu_fdt.c optional uart fdt dev/uart/uart_dev_pl011.c optional uart pl011 dev/usb/controller/dwc_otg_hisi.c optional dwcotg fdt soc_hisi_hi6220 +dev/usb/controller/generic_ehci.c optional ehci acpi dev/usb/controller/generic_ohci.c optional ohci fdt dev/usb/controller/generic_usb_if.m optional ohci fdt dev/vnic/mrml_bridge.c optional vnic fdt Added: head/sys/dev/usb/controller/generic_ehci.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/controller/generic_ehci.c Fri Jul 29 08:50:36 2016 (r303475) @@ -0,0 +1,220 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Generic EHCI driver based on the Allwinner A10 EHCI driver + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_bus.h" + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +static device_attach_t generic_ehci_attach; +static device_detach_t generic_ehci_detach; + +static int +generic_ehci_probe(device_t self) +{ + ACPI_HANDLE h; + + if ((h = acpi_get_handle(self)) == NULL || + !acpi_MatchHid(h, "PNP0D20")) + return (ENXIO); + + device_set_desc(self, "Generic EHCI Controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +generic_ehci_attach(device_t self) +{ + ehci_softc_t *sc = device_get_softc(self); + int err; + int rid; + + /* initialise some bus fields */ + sc->sc_bus.parent = self; + sc->sc_bus.devices = sc->sc_devices; + sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; + + /* get all DMA memory */ + if (usb_bus_mem_alloc_all(&sc->sc_bus, + USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) { + return (ENOMEM); + } + + sc->sc_bus.usbrev = USB_REV_2_0; + + rid = 0; + sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (!sc->sc_io_res) { + device_printf(self, "Could not map memory\n"); + goto error; + } + + sc->sc_io_tag = rman_get_bustag(sc->sc_io_res); + sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res); + sc->sc_io_size = rman_get_size(sc->sc_io_res); + + rid = 0; + sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE); + if (sc->sc_irq_res == NULL) { + device_printf(self, "Could not allocate irq\n"); + goto error; + } + sc->sc_bus.bdev = device_add_child(self, "usbus", -1); + if (!sc->sc_bus.bdev) { + device_printf(self, "Could not add USB device\n"); + goto error; + } + device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); + + strlcpy(sc->sc_vendor, "Generic", sizeof(sc->sc_vendor)); + + err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, + NULL, (driver_intr_t *)ehci_interrupt, sc, &sc->sc_intr_hdl); + if (err) { + device_printf(self, "Could not setup irq, %d\n", err); + sc->sc_intr_hdl = NULL; + goto error; + } + + sc->sc_flags |= EHCI_SCFLG_DONTRESET; + + err = ehci_init(sc); + if (!err) + err = device_probe_and_attach(sc->sc_bus.bdev); + if (err) + goto error; + + return (0); + +error: + generic_ehci_detach(self); + return (ENXIO); +} + +static int +generic_ehci_detach(device_t self) +{ + ehci_softc_t *sc = device_get_softc(self); + device_t bdev; + int err; + + if (sc->sc_bus.bdev) { + bdev = sc->sc_bus.bdev; + device_detach(bdev); + device_delete_child(self, bdev); + } + /* during module unload there are lots of children leftover */ + device_delete_children(self); + + if (sc->sc_irq_res && sc->sc_intr_hdl) { + /* + * only call ehci_detach() after ehci_init() + */ + ehci_detach(sc); + + err = bus_teardown_intr(self, sc->sc_irq_res, sc->sc_intr_hdl); + + if (err) + /* XXX or should we panic? */ + device_printf(self, "Could not tear down irq, %d\n", + err); + sc->sc_intr_hdl = NULL; + } + + if (sc->sc_irq_res) { + bus_release_resource(self, SYS_RES_IRQ, 0, sc->sc_irq_res); + sc->sc_irq_res = NULL; + } + if (sc->sc_io_res) { + bus_release_resource(self, SYS_RES_MEMORY, 0, + sc->sc_io_res); + sc->sc_io_res = NULL; + } + usb_bus_mem_free_all(&sc->sc_bus, &ehci_iterate_hw_softc); + + return (0); +} + +static device_method_t ehci_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, generic_ehci_probe), + DEVMETHOD(device_attach, generic_ehci_attach), + DEVMETHOD(device_detach, generic_ehci_detach), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + + DEVMETHOD_END +}; + +static driver_t ehci_driver = { + .name = "ehci", + .methods = ehci_methods, + .size = sizeof(ehci_softc_t), +}; + +static devclass_t ehci_devclass; + +DRIVER_MODULE(ehci, acpi, ehci_driver, ehci_devclass, 0, 0); +MODULE_DEPEND(ehci, usb, 1, 1, 1); From owner-svn-src-all@freebsd.org Fri Jul 29 11:33:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 316C6BA3BC4; Fri, 29 Jul 2016 11:33:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 040CB1E18; Fri, 29 Jul 2016 11:33:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TBX1Bx055549; Fri, 29 Jul 2016 11:33:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TBX1WO055548; Fri, 29 Jul 2016 11:33:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201607291133.u6TBX1WO055548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 29 Jul 2016 11:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303476 - head/sys/dev/usb/template X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 11:33:02 -0000 Author: trasz Date: Fri Jul 29 11:33:01 2016 New Revision: 303476 URL: https://svnweb.freebsd.org/changeset/base/303476 Log: Fix MTP description in the comment. MFC after: 1 month Modified: head/sys/dev/usb/template/usb_template_mtp.c Modified: head/sys/dev/usb/template/usb_template_mtp.c ============================================================================== --- head/sys/dev/usb/template/usb_template_mtp.c Fri Jul 29 08:50:36 2016 (r303475) +++ head/sys/dev/usb/template/usb_template_mtp.c Fri Jul 29 11:33:01 2016 (r303476) @@ -26,7 +26,7 @@ */ /* - * This file contains the USB templates for an USB Message Transfer + * This file contains the USB templates for an USB Media Transfer * Protocol device. * * NOTE: It is common practice that MTP devices use some dummy From owner-svn-src-all@freebsd.org Fri Jul 29 11:33:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9AFEBA3C1C; Fri, 29 Jul 2016 11:33:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76C731F82; Fri, 29 Jul 2016 11:33:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TBXNJI055604; Fri, 29 Jul 2016 11:33:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TBXN29055603; Fri, 29 Jul 2016 11:33:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201607291133.u6TBXN29055603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 29 Jul 2016 11:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303477 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 11:33:24 -0000 Author: trasz Date: Fri Jul 29 11:33:23 2016 New Revision: 303477 URL: https://svnweb.freebsd.org/changeset/base/303477 Log: Improve error message. MFC after: 1 month Modified: head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Fri Jul 29 11:33:01 2016 (r303476) +++ head/sys/dev/usb/usb_device.c Fri Jul 29 11:33:23 2016 (r303477) @@ -1724,8 +1724,8 @@ usb_alloc_device(device_t parent_dev, st /* Setup USB descriptors */ err = (usb_temp_setup_by_index_p) (udev, usb_template); if (err) { - DPRINTFN(0, "setting up USB template failed maybe the USB " - "template module has not been loaded\n"); + DPRINTFN(0, "setting up USB template failed - " + "usb_template(4) not loaded?\n"); goto done; } } From owner-svn-src-all@freebsd.org Fri Jul 29 12:15:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ADBABA8ABD; Fri, 29 Jul 2016 12:15:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F185B1A2E; Fri, 29 Jul 2016 12:15:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TCFtgu071019; Fri, 29 Jul 2016 12:15:55 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TCFt5S071018; Fri, 29 Jul 2016 12:15:55 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201607291215.u6TCFt5S071018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 29 Jul 2016 12:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303478 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 12:15:56 -0000 Author: trasz Date: Fri Jul 29 12:15:55 2016 New Revision: 303478 URL: https://svnweb.freebsd.org/changeset/base/303478 Log: Remove write-only variable. MFC after: 1 month Modified: head/sys/fs/autofs/autofs_vnops.c Modified: head/sys/fs/autofs/autofs_vnops.c ============================================================================== --- head/sys/fs/autofs/autofs_vnops.c Fri Jul 29 11:33:23 2016 (r303477) +++ head/sys/fs/autofs/autofs_vnops.c Fri Jul 29 12:15:55 2016 (r303478) @@ -138,11 +138,9 @@ autofs_trigger_vn(struct vnode *vp, cons struct vnode **newvp) { struct autofs_node *anp; - struct autofs_mount *amp; int error, lock_flags; anp = vp->v_data; - amp = VFSTOAUTOFS(vp->v_mount); /* * Release the vnode lock, so that other operations, in partcular From owner-svn-src-all@freebsd.org Fri Jul 29 12:29:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8F7FBA8EB5; Fri, 29 Jul 2016 12:29:18 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 789D313D6; Fri, 29 Jul 2016 12:29:18 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TCTHw0074871; Fri, 29 Jul 2016 12:29:17 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TCTHq9074870; Fri, 29 Jul 2016 12:29:17 GMT (envelope-from br@FreeBSD.org) Message-Id: <201607291229.u6TCTHq9074870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 29 Jul 2016 12:29:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303479 - head/sys/cddl/dev/fbt/riscv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 12:29:18 -0000 Author: br Date: Fri Jul 29 12:29:17 2016 New Revision: 303479 URL: https://svnweb.freebsd.org/changeset/base/303479 Log: Remove unused variables. Modified: head/sys/cddl/dev/fbt/riscv/fbt_isa.c Modified: head/sys/cddl/dev/fbt/riscv/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/riscv/fbt_isa.c Fri Jul 29 12:15:55 2016 (r303478) +++ head/sys/cddl/dev/fbt/riscv/fbt_isa.c Fri Jul 29 12:29:17 2016 (r303479) @@ -82,11 +82,9 @@ fbt_provide_module_function(linker_file_ linker_symval_t *symval, void *opaque) { fbt_probe_t *fbt, *retfbt; - uint32_t *target, *start; uint32_t *instr, *limit; const char *name; char *modname; - int offs; modname = opaque; name = symval->name; From owner-svn-src-all@freebsd.org Fri Jul 29 12:30:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58095BA8F24; Fri, 29 Jul 2016 12:30:35 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24A3815E8; Fri, 29 Jul 2016 12:30:35 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TCUYdo076957; Fri, 29 Jul 2016 12:30:34 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TCUYKA076955; Fri, 29 Jul 2016 12:30:34 GMT (envelope-from br@FreeBSD.org) Message-Id: <201607291230.u6TCUYKA076955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 29 Jul 2016 12:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303480 - in head/sys/modules/dtrace: . dtraceall X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 12:30:35 -0000 Author: br Date: Fri Jul 29 12:30:33 2016 New Revision: 303480 URL: https://svnweb.freebsd.org/changeset/base/303480 Log: Include FBT to modules build on RISC-V. Modified: head/sys/modules/dtrace/Makefile head/sys/modules/dtrace/dtraceall/dtraceall.c Modified: head/sys/modules/dtrace/Makefile ============================================================================== --- head/sys/modules/dtrace/Makefile Fri Jul 29 12:29:17 2016 (r303479) +++ head/sys/modules/dtrace/Makefile Fri Jul 29 12:30:33 2016 (r303480) @@ -24,7 +24,9 @@ SUBDIR+= fbt fasttrap .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" SUBDIR+= systrace_freebsd32 .endif -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" +.if ${MACHINE_CPUARCH} == "aarch64" || \ + ${MACHINE_CPUARCH} == "arm" || \ + ${MACHINE_CPUARCH} == "riscv" SUBDIR+= fbt .endif .include Modified: head/sys/modules/dtrace/dtraceall/dtraceall.c ============================================================================== --- head/sys/modules/dtrace/dtraceall/dtraceall.c Fri Jul 29 12:29:17 2016 (r303479) +++ head/sys/modules/dtrace/dtraceall/dtraceall.c Fri Jul 29 12:30:33 2016 (r303480) @@ -70,7 +70,7 @@ MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1); #endif #if defined(__aarch64__) || defined(__amd64__) || defined(__arm__) || \ - defined(__i386__) || defined(__powerpc__) + defined(__i386__) || defined(__powerpc__) || defined(__riscv__) MODULE_DEPEND(dtraceall, fbt, 1, 1, 1); #endif #if defined(__amd64__) || defined(__i386__) From owner-svn-src-all@freebsd.org Fri Jul 29 15:24:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35729BA81D1; Fri, 29 Jul 2016 15:24:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 069BB1F77; Fri, 29 Jul 2016 15:24:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TFOoZP041795; Fri, 29 Jul 2016 15:24:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TFOo8x041794; Fri, 29 Jul 2016 15:24:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201607291524.u6TFOo8x041794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 29 Jul 2016 15:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303481 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 15:24:51 -0000 Author: imp Date: Fri Jul 29 15:24:50 2016 New Revision: 303481 URL: https://svnweb.freebsd.org/changeset/base/303481 Log: Fix typo. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Jul 29 12:30:33 2016 (r303480) +++ head/sys/conf/files Fri Jul 29 15:24:50 2016 (r303481) @@ -86,9 +86,9 @@ cam/cam_xpt.c optional scbus cam/ata/ata_all.c optional scbus cam/ata/ata_xpt.c optional scbus cam/ata/ata_pmp.c optional scbus -cam/nvme/nvme_all.c optional scbus nvmd !nvd +cam/nvme/nvme_all.c optional scbus nvme !nvd cam/nvme/nvme_da.c optional scbus nvme da !nvd -cam/nvme/nvme_xpt.c optional scbus nvmd !nvd +cam/nvme/nvme_xpt.c optional scbus nvme !nvd cam/scsi/scsi_xpt.c optional scbus cam/scsi/scsi_all.c optional scbus cam/scsi/scsi_cd.c optional cd From owner-svn-src-all@freebsd.org Fri Jul 29 16:09:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CFB8BA8D1D; Fri, 29 Jul 2016 16:09:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FDD11AD2; Fri, 29 Jul 2016 16:09:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TG95ra057065; Fri, 29 Jul 2016 16:09:05 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TG95BG057064; Fri, 29 Jul 2016 16:09:05 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607291609.u6TG95BG057064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 29 Jul 2016 16:09:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303482 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:09:06 -0000 Author: pfg Date: Fri Jul 29 16:09:05 2016 New Revision: 303482 URL: https://svnweb.freebsd.org/changeset/base/303482 Log: indent(1): Avoid out of bound access of array codebuf. dump_line() requires s_code to be a string, because it will call count_spaces(). Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Obtained from: Piotr Stefaniak Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Fri Jul 29 15:24:50 2016 (r303481) +++ head/usr.bin/indent/indent.c Fri Jul 29 16:09:05 2016 (r303482) @@ -979,8 +979,10 @@ check_type: if (ps.want_blank) *e_code++ = ' '; ps.want_blank = false; - if (dec_ind && s_code != e_code) + if (dec_ind && s_code != e_code) { + *e_code = '\0'; dump_line(); + } dec_ind = 0; } } From owner-svn-src-all@freebsd.org Fri Jul 29 16:14:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FE1ABA8F5B; Fri, 29 Jul 2016 16:14:04 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FFAF1155; Fri, 29 Jul 2016 16:14:04 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TGE3fL060512; Fri, 29 Jul 2016 16:14:03 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TGE35m060511; Fri, 29 Jul 2016 16:14:03 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607291614.u6TGE35m060511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 29 Jul 2016 16:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303483 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:14:04 -0000 Author: pfg Date: Fri Jul 29 16:14:03 2016 New Revision: 303483 URL: https://svnweb.freebsd.org/changeset/base/303483 Log: indent(1): Avoid potential use-after-free. last_bl is a char pointer that tracks the last blank character in a comment, which is used for wrapping long comment lines. Since the underlying array may be reallocated, make sure last_bl is up to date when that happens. Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Obtained from: Piotr Stefaniak Modified: head/usr.bin/indent/indent_globs.h Modified: head/usr.bin/indent/indent_globs.h ============================================================================== --- head/usr.bin/indent/indent_globs.h Fri Jul 29 16:09:05 2016 (r303482) +++ head/usr.bin/indent/indent_globs.h Fri Jul 29 16:14:03 2016 (r303483) @@ -71,6 +71,7 @@ FILE *output; /* the output file if (combuf == NULL) \ err(1, NULL); \ e_com = combuf + (e_com-s_com) + 1; \ + last_bl = combuf + (last_bl-s_com) + 1; \ l_com = combuf + nsize - 5; \ s_com = combuf + 1; \ } From owner-svn-src-all@freebsd.org Fri Jul 29 16:17:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8261CBA8FEA; Fri, 29 Jul 2016 16:17:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 481F5132A; Fri, 29 Jul 2016 16:17:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TGHsMu060674; Fri, 29 Jul 2016 16:17:54 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TGHsPE060673; Fri, 29 Jul 2016 16:17:54 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607291617.u6TGHsPE060673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 29 Jul 2016 16:17:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303484 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:17:55 -0000 Author: pfg Date: Fri Jul 29 16:17:54 2016 New Revision: 303484 URL: https://svnweb.freebsd.org/changeset/base/303484 Log: indent(1): Fix breakage caused by single comment following "else". indent(1) simply wasn't taught that "else" may be followed by a comment without any opening brace anywhere on the line, so it was very confused in such cases. Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Obtained from: Piotr Stefaniak Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Fri Jul 29 16:14:03 2016 (r303483) +++ head/usr.bin/indent/indent.c Fri Jul 29 16:17:54 2016 (r303484) @@ -319,6 +319,8 @@ main(int argc, char **argv) switch (type_code) { case newline: ++line_no; + if (sc_end != NULL) + goto sw_buffer; /* dump comment, if any */ flushed_nl = true; case form_feed: break; /* form feeds and newlines found here will be From owner-svn-src-all@freebsd.org Fri Jul 29 16:20:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72388BA70F0; Fri, 29 Jul 2016 16:20:09 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-oi0-x22a.google.com (mail-oi0-x22a.google.com [IPv6:2607:f8b0:4003:c06::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 35B6615D1; Fri, 29 Jul 2016 16:20:09 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-oi0-x22a.google.com with SMTP id l72so112923409oig.2; Fri, 29 Jul 2016 09:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YR/9klZb4TCJFfphROkZaZ0uIeKlWgybqdLZ16q2mA0=; b=ZW8wSPkw6IFhuAOf8BuGLf8AaNz7kQwbdP3+GOMVyWxGJ2QweO0vOhR3z/BAZKZZWf kdpa1ogl35XdMewxCYDbaIfIAOByoJ4lSiiAoWq1ziZcCz0uQA4bhd8kJIdSsKNr+2G4 sqO7rt5VcRlD4E74bljuBcX2S8H/a/UM5DH9Mmzr3KvdI2yw3aHCWTt0NbZHEkO5fZgK n9QLOD8MnA8fVcxJAB3naKWEKs1LWH1Jax74lVBbObFUOY5heBgoWP4ze5i/wH3MAQMX 7mjxFjHvMsFlxDcuxA8VFeIePF3KlrCsGOO80Hayzj+7veb0QhbStvA2AtxB2Dkaitmo 14Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YR/9klZb4TCJFfphROkZaZ0uIeKlWgybqdLZ16q2mA0=; b=KEvzD4T73H+10oLasMxZTC8fLUS6Gk/VsI/UKk2j60xeP38+fVznYdXu9icnXoJu2d Z3QOsJpetuRze1aByg7J5/H3D5myjNVVTF3o+GbFzAloh58Pc7VUWH+glIZA8YgDJq5Z VbLGwu6op39mAl8oT0JNFKjSm0wgkmVWYDJn0Hz0s9n1EYT+VwL+oFEQxl+q4eYdVsDF 1/VsySeboh8EWjBHGT1dT4anbJJY1JcNVrRiRUKERUIlIDQt0DqcWWX1xd+MUqoUjtaE BKrzPEmXkP+aYntDGl5GuwpuEtsHPWItcin1KixW1ko59hhISXmMOB5h7DrPjq/5HxPH aMeg== X-Gm-Message-State: AEkoouvzYtMOVJZ0DtE3VzR7xvJKU9MMCcvsaXHtg0sCl24D1QfQ8+grL76l9Lz2ToN+fOGn1d7RbwHxzon1sg== X-Received: by 10.157.9.248 with SMTP id 53mr26864292otz.35.1469809208296; Fri, 29 Jul 2016 09:20:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.44.176 with HTTP; Fri, 29 Jul 2016 09:20:07 -0700 (PDT) In-Reply-To: <201607291617.u6TGHsPE060673@repo.freebsd.org> References: <201607291617.u6TGHsPE060673@repo.freebsd.org> From: Benjamin Kaduk Date: Fri, 29 Jul 2016 11:20:07 -0500 Message-ID: Subject: Re: svn commit: r303484 - head/usr.bin/indent 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-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:20:09 -0000 On Fri, Jul 29, 2016 at 11:17 AM, Pedro F. Giffuni wrote: > Author: pfg > Date: Fri Jul 29 16:17:54 2016 > New Revision: 303484 > URL: https://svnweb.freebsd.org/changeset/base/303484 > > Log: > indent(1): Fix breakage caused by single comment following "else". > > indent(1) simply wasn't taught that "else" may be followed by a comment > without any opening brace anywhere on the line, so it was very confused > in such cases. > > Wrong commit message? I see no 'else' in this change. (I guess core's guidance is to revert and recommit with correct message, these days.) -Ben > Differential Revision: https://reviews.freebsd.org/D6966 (Partial) > Obtained from: Piotr Stefaniak > > Modified: > head/usr.bin/indent/indent.c > > Modified: head/usr.bin/indent/indent.c > > ============================================================================== > --- head/usr.bin/indent/indent.c Fri Jul 29 16:14:03 2016 > (r303483) > +++ head/usr.bin/indent/indent.c Fri Jul 29 16:17:54 2016 > (r303484) > @@ -319,6 +319,8 @@ main(int argc, char **argv) > switch (type_code) { > case newline: > ++line_no; > + if (sc_end != NULL) > + goto sw_buffer; /* dump comment, if any */ > flushed_nl = true; > case form_feed: > break; /* form feeds and newlines found here will > be > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Fri Jul 29 16:23:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCEB6BA7270; Fri, 29 Jul 2016 16:23:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FE9D19E2; Fri, 29 Jul 2016 16:23:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TGN0EE064306; Fri, 29 Jul 2016 16:23:00 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TGN08u064305; Fri, 29 Jul 2016 16:23:00 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607291623.u6TGN08u064305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 29 Jul 2016 16:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303485 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:23:01 -0000 Author: pfg Date: Fri Jul 29 16:23:00 2016 New Revision: 303485 URL: https://svnweb.freebsd.org/changeset/base/303485 Log: indent(1): fix struct termination detection. Semicolons inside struct declarations don't end the declarations. Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Obtained from: Piotr Stefaniak Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Fri Jul 29 16:17:54 2016 (r303484) +++ head/usr.bin/indent/indent.c Fri Jul 29 16:23:00 2016 (r303485) @@ -701,8 +701,10 @@ check_type: break; case semicolon: /* got a ';' */ - ps.in_or_st = false;/* we are not in an initialization or - * structure declaration */ + if (ps.dec_nest == 0) { + /* we are not in an initialization or structure declaration */ + ps.in_or_st = false; + } scase = false; /* these will only need resetting in an error */ squest = 0; if (ps.last_token == rparen && rparen_count == 0) From owner-svn-src-all@freebsd.org Fri Jul 29 16:24:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FAB0BA7303; Fri, 29 Jul 2016 16:24:33 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-oi0-x230.google.com (mail-oi0-x230.google.com [IPv6:2607:f8b0:4003:c06::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 42F331B76; Fri, 29 Jul 2016 16:24:33 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-oi0-x230.google.com with SMTP id w18so113062155oiw.3; Fri, 29 Jul 2016 09:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=IhAiyfzVv+bLnbB32YUfzkQYY5qBIupWdPaytKO5lvs=; b=OwpnjhylJVObobQypb6mjnLRpPyJE+QB3kfDHHIkVymiN8xgAvUTcGDD7roGtkj1/6 W6cRkbzVfRF4X27snQ9g5+rgUCvJvTDxOkcolXsiWTlDoTAyHwK9pRSUXOI8iFA/4ukk wQPGjbnCgOqWfIWsiOVgLaUAiP4LqIqgPPmHkkL0IFNd3+aYCNftEI1YPqHs5K8ZDlFn coXyxR1j4E6Gztl/ypK9mVlqhx77QRAEoNTN3PPMikfSq0G85kwSlVbd5vILhOgGe0XH SQ9Lrj3Q3LAxaLhflxpQ+9XsX/AuFHZsX15gTt2t25Nh98tM2cuG5cMADlAtJm8oy7y0 0o8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=IhAiyfzVv+bLnbB32YUfzkQYY5qBIupWdPaytKO5lvs=; b=G7B64rETjwhLJFLFIRqAzRxjTwXfivRa/V5Mqfik9oMvCYMNtWUePKEPGHh6PoFgcG 8XFXgGnjNOvRcPn5SzIJzf6Y0zei/1VYVJ4mXjEtypRkFciQ8hMPQENEXejbb7+TCGvB AbDTSeaoQ8HAG13VJTAeZglulc/lAxbz92rrZAM4keFrrzgNDC8NGqED/G2hrH5/WFry EUTCYS1bcsPPJ+g7e3YSsbESWt4VNNoC+ehjr0hY48ihayrPIQ3NPLJ7M189a7z0grtC gnF119BOn4NvzcfAB7eS87U/mClX8/8RU96Mewp+mh67rnxrmM+42iiZrsbIHz3TEavn 83tQ== X-Gm-Message-State: AEkooutxrHMScyUvEEw/2McFfKtbaspD1JnAs6POpU8POZhbYWIpy3yNHMeCR4Yusn4zyk0beKPBtax/JWJFMQ== X-Received: by 10.202.222.70 with SMTP id v67mr5617807oig.194.1469809472454; Fri, 29 Jul 2016 09:24:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.44.176 with HTTP; Fri, 29 Jul 2016 09:24:31 -0700 (PDT) In-Reply-To: References: <201607291617.u6TGHsPE060673@repo.freebsd.org> From: Benjamin Kaduk Date: Fri, 29 Jul 2016 11:24:31 -0500 Message-ID: Subject: Re: svn commit: r303484 - head/usr.bin/indent 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-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:24:33 -0000 On Fri, Jul 29, 2016 at 11:20 AM, Benjamin Kaduk wrote: > On Fri, Jul 29, 2016 at 11:17 AM, Pedro F. Giffuni > wrote: > >> Author: pfg >> Date: Fri Jul 29 16:17:54 2016 >> New Revision: 303484 >> URL: https://svnweb.freebsd.org/changeset/base/303484 >> >> Log: >> indent(1): Fix breakage caused by single comment following "else". >> >> indent(1) simply wasn't taught that "else" may be followed by a comment >> without any opening brace anywhere on the line, so it was very confused >> in such cases. >> >> > Wrong commit message? I see no 'else' in this change. > (I guess core's guidance is to revert and recommit with correct message, > these days.) > Nevermind, I think I see what's going on here, now. -Ben From owner-svn-src-all@freebsd.org Fri Jul 29 16:25:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D401EBA7370; Fri, 29 Jul 2016 16:25:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AA931CF8; Fri, 29 Jul 2016 16:25:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TGP91r064448; Fri, 29 Jul 2016 16:25:09 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TGP9MS064446; Fri, 29 Jul 2016 16:25:09 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607291625.u6TGP9MS064446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 29 Jul 2016 16:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303486 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:25:10 -0000 Author: ed Date: Fri Jul 29 16:25:09 2016 New Revision: 303486 URL: https://svnweb.freebsd.org/changeset/base/303486 Log: Mention that basename(3) and dirname(3) will change in the future. Update the existing manual pages for basename(3) and dirname(3) to mention that in future versions of FreeBSD, these functions will no longer use internal buffers for storing the results. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D7356 Modified: head/lib/libc/gen/basename.3 head/lib/libc/gen/dirname.3 Modified: head/lib/libc/gen/basename.3 ============================================================================== --- head/lib/libc/gen/basename.3 Fri Jul 29 16:23:00 2016 (r303485) +++ head/lib/libc/gen/basename.3 Fri Jul 29 16:25:09 2016 (r303486) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 28, 2016 +.Dd July 29, 2016 .Dt BASENAME 3 .Os .Sh NAME @@ -61,8 +61,16 @@ function returns a pointer to internal storage space allocated on the first call that will be overwritten by subsequent calls. +.Pp +Other vendor implementations of +.Fn basename +may store their result in the input buffer, +making it safe to use in multithreaded applications. +Future versions of +.Fx +will follow this approach as well. .Fn basename_r -is therefore preferred for threaded applications. +will then become obsolete. .Sh RETURN VALUES On successful completion, .Fn basename Modified: head/lib/libc/gen/dirname.3 ============================================================================== --- head/lib/libc/gen/dirname.3 Fri Jul 29 16:23:00 2016 (r303485) +++ head/lib/libc/gen/dirname.3 Fri Jul 29 16:25:09 2016 (r303486) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 28, 2016 +.Dd July 29, 2016 .Dt DIRNAME 3 .Os .Sh NAME @@ -56,10 +56,11 @@ by subsequent calls. .Pp Other vendor implementations of .Fn dirname -may modify the contents of the string passed to -.Fn dirname ; -this should be taken into account when writing code which calls this function -if portability is desired. +may store their result in the input buffer, +making it safe to use in multithreaded applications. +Future versions of +.Fx +will follow this approach as well. .Sh RETURN VALUES On successful completion, .Fn dirname From owner-svn-src-all@freebsd.org Fri Jul 29 16:28:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0BCFBA74B5; Fri, 29 Jul 2016 16:28:52 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B06011F4B; Fri, 29 Jul 2016 16:28:52 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TGSp7u064606; Fri, 29 Jul 2016 16:28:51 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TGSpKT064605; Fri, 29 Jul 2016 16:28:51 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607291628.u6TGSpKT064605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 29 Jul 2016 16:28:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303487 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:28:53 -0000 Author: pfg Date: Fri Jul 29 16:28:51 2016 New Revision: 303487 URL: https://svnweb.freebsd.org/changeset/base/303487 Log: indent(1): fix struct termination detection. Small style cleanup while here. Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Obtained from: Piotr Stefaniak Modified: head/usr.bin/indent/lexi.c Modified: head/usr.bin/indent/lexi.c ============================================================================== --- head/usr.bin/indent/lexi.c Fri Jul 29 16:25:09 2016 (r303486) +++ head/usr.bin/indent/lexi.c Fri Jul 29 16:28:51 2016 (r303487) @@ -191,15 +191,13 @@ lexi(void) } } while (1) { - if (!(seensfx & 1) && - (*buf_ptr == 'U' || *buf_ptr == 'u')) { + if (!(seensfx & 1) && (*buf_ptr == 'U' || *buf_ptr == 'u')) { CHECK_SIZE_TOKEN; *e_token++ = *buf_ptr++; seensfx |= 1; continue; } - if (!(seensfx & 2) && - (*buf_ptr == 'L' || *buf_ptr == 'l')) { + if (!(seensfx & 2) && strchr("fFlL", *buf_ptr)) { CHECK_SIZE_TOKEN; if (buf_ptr[1] == buf_ptr[0]) *e_token++ = *buf_ptr++; From owner-svn-src-all@freebsd.org Fri Jul 29 16:33:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15907BA7672; Fri, 29 Jul 2016 16:33:47 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D66E1155B; Fri, 29 Jul 2016 16:33:46 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TGXkBg068065; Fri, 29 Jul 2016 16:33:46 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TGXjVY068064; Fri, 29 Jul 2016 16:33:45 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201607291633.u6TGXjVY068064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 29 Jul 2016 16:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303488 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:33:47 -0000 Author: royger Date: Fri Jul 29 16:33:45 2016 New Revision: 303488 URL: https://svnweb.freebsd.org/changeset/base/303488 Log: xen-netfront: fix trying to send packets with disconnected netfront In certain circumstances xn_txq_mq_start might be called with num_queues == 0 during the resume phase after a migration, which can trigger a KASSERT. Fix this by making sure the carrier is on before trying to transmit, or else return that the queues are full. Just as a note, I haven't been able to reproduce this crash on my test systems, but I still think it's possible and worth fixing. Reported by: Karl Pielorz Sponsored by: Citrix Systems R&D MFC after: 5 days Reviewed by: Wei Liu Differential revision: https://reviews.freebsd.org/D7349 Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Fri Jul 29 16:28:51 2016 (r303487) +++ head/sys/dev/xen/netfront/netfront.c Fri Jul 29 16:33:45 2016 (r303488) @@ -2157,6 +2157,9 @@ xn_txq_mq_start(struct ifnet *ifp, struc np = ifp->if_softc; npairs = np->num_queues; + if (!netfront_carrier_ok(np)) + return (ENOBUFS); + KASSERT(npairs != 0, ("called with 0 available queues")); /* check if flowid is set */ From owner-svn-src-all@freebsd.org Fri Jul 29 16:34:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EC28BA76E4; Fri, 29 Jul 2016 16:34:17 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B84E1702; Fri, 29 Jul 2016 16:34:17 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TGYGOK068127; Fri, 29 Jul 2016 16:34:16 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TGYGwA068126; Fri, 29 Jul 2016 16:34:16 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607291634.u6TGYGwA068126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 29 Jul 2016 16:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303489 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:34:17 -0000 Author: pfg Date: Fri Jul 29 16:34:16 2016 New Revision: 303489 URL: https://svnweb.freebsd.org/changeset/base/303489 Log: indent(1): Removed whitespace shouldn't be considered in column calculations. This piece of code removed tabs and space characters from after colons that follow labels by decrementing the e_lab (end of label) "pointer" which is later used to calculate the width of the string that fprintf() puts into "output". But pad_output() gets the length from the actual string, so it miscalculated what the current column is. Fixed by putting a string terminator at the e_lab "pointer". Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Obtained from: Piotr Stefaniak Modified: head/usr.bin/indent/io.c Modified: head/usr.bin/indent/io.c ============================================================================== --- head/usr.bin/indent/io.c Fri Jul 29 16:33:45 2016 (r303488) +++ head/usr.bin/indent/io.c Fri Jul 29 16:34:16 2016 (r303489) @@ -116,6 +116,7 @@ dump_line(void) } while (e_lab > s_lab && (e_lab[-1] == ' ' || e_lab[-1] == '\t')) e_lab--; + *e_lab = '\0'; cur_col = pad_output(1, compute_label_target()); if (s_lab[0] == '#' && (strncmp(s_lab, "#else", 5) == 0 || strncmp(s_lab, "#endif", 6) == 0)) { From owner-svn-src-all@freebsd.org Fri Jul 29 16:34:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29420BA77C1; Fri, 29 Jul 2016 16:34:56 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D054618CC; Fri, 29 Jul 2016 16:34:55 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TGYtjZ068192; Fri, 29 Jul 2016 16:34:55 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TGYt3L068191; Fri, 29 Jul 2016 16:34:55 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201607291634.u6TGYt3L068191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 29 Jul 2016 16:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303490 - head/sys/x86/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:34:56 -0000 Author: royger Date: Fri Jul 29 16:34:54 2016 New Revision: 303490 URL: https://svnweb.freebsd.org/changeset/base/303490 Log: xen-intr: fix removal of event channels during resume Event channel handlers cannot be removed during resume because there might be an interrupt thread running on a CPU currently blocked in the cpususpend_handler, which prevents the call to intr_remove_handler from finishing and completely freezes the system during resume. r291022 tried to fix this by allowing recursion in intr_remove_handler, but that's clearly not enough. Instead don't remove the handlers at the interrupt resume phase, and let each driver remove the handler by itself during resume. In order to do this, change the opaque event channel handler cookie to use the global interrupt vector instead of the event channel port. The event channel port cannot be used because after resume all event channels are reset, and the port numbers can change. Sponsored by: Citrix Systems R&D MFC after: 5 days Modified: head/sys/x86/xen/xen_intr.c Modified: head/sys/x86/xen/xen_intr.c ============================================================================== --- head/sys/x86/xen/xen_intr.c Fri Jul 29 16:34:16 2016 (r303489) +++ head/sys/x86/xen/xen_intr.c Fri Jul 29 16:34:54 2016 (r303490) @@ -130,8 +130,6 @@ struct xenisrc { u_int xi_masked:1; }; -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) - static void xen_intr_suspend(struct pic *); static void xen_intr_resume(struct pic *, bool suspend_cancelled); static void xen_intr_enable_source(struct intsrc *isrc); @@ -422,7 +420,7 @@ xen_intr_bind_isrc(struct xenisrc **isrc mtx_unlock(&xen_intr_isrc_lock); /* Assign the opaque handler (the event channel port) */ - *port_handlep = &isrc->xi_port; + *port_handlep = &isrc->xi_vector; #ifdef SMP if (type == EVTCHN_TYPE_PORT) { @@ -468,16 +466,17 @@ xen_intr_bind_isrc(struct xenisrc **isrc static struct xenisrc * xen_intr_isrc(xen_intr_handle_t handle) { - evtchn_port_t port; + int vector; if (handle == NULL) return (NULL); - port = *(evtchn_port_t *)handle; - if (!is_valid_evtchn(port) || port >= NR_EVENT_CHANNELS) - return (NULL); + vector = *(int *)handle; + KASSERT(vector >= FIRST_EVTCHN_INT && + vector < (FIRST_EVTCHN_INT + xen_intr_auto_vector_count), + ("Xen interrupt vector is out of range")); - return (xen_intr_port_to_isrc[port]); + return ((struct xenisrc *)intr_lookup_source(vector)); } /** @@ -780,10 +779,6 @@ xen_intr_resume(struct pic *unused, bool xen_rebind_virq(isrc); break; default: - intr_remove_handler(isrc->xi_cookie); - isrc->xi_cpu = 0; - isrc->xi_type = EVTCHN_TYPE_UNBOUND; - isrc->xi_cookie = NULL; break; } } From owner-svn-src-all@freebsd.org Fri Jul 29 16:36:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3FB7BA789E; Fri, 29 Jul 2016 16:35:59 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C42EB1AEE; Fri, 29 Jul 2016 16:35:59 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TGZwV4068278; Fri, 29 Jul 2016 16:35:58 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TGZwsg068277; Fri, 29 Jul 2016 16:35:58 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201607291635.u6TGZwsg068277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 29 Jul 2016 16:35:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303491 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:36:00 -0000 Author: royger Date: Fri Jul 29 16:35:58 2016 New Revision: 303491 URL: https://svnweb.freebsd.org/changeset/base/303491 Log: Revert r291022: x86/intr: allow mutex recursion in intr_remove_handler This was only needed for Xen, and a better way to deal with this issue has been found, so this commit can be reverted. Sponsored by: Citrix Systems R&D MFC after: 5 days Reviewed by: kib Differential revision: https://reviews.freebsd.org/D7363 Modified: head/sys/x86/x86/intr_machdep.c Modified: head/sys/x86/x86/intr_machdep.c ============================================================================== --- head/sys/x86/x86/intr_machdep.c Fri Jul 29 16:34:54 2016 (r303490) +++ head/sys/x86/x86/intr_machdep.c Fri Jul 29 16:35:58 2016 (r303491) @@ -197,28 +197,19 @@ int intr_remove_handler(void *cookie) { struct intsrc *isrc; - int error, mtx_owned; + int error; isrc = intr_handler_source(cookie); error = intr_event_remove_handler(cookie); if (error == 0) { - /* - * Recursion is needed here so PICs can remove interrupts - * while resuming. It was previously not possible due to - * intr_resume holding the intr_table_lock and - * intr_remove_handler recursing on it. - */ - mtx_owned = mtx_owned(&intr_table_lock); - if (mtx_owned == 0) - mtx_lock(&intr_table_lock); + mtx_lock(&intr_table_lock); isrc->is_handlers--; if (isrc->is_handlers == 0) { isrc->is_pic->pic_disable_source(isrc, PIC_NO_EOI); isrc->is_pic->pic_disable_intr(isrc); } intrcnt_updatename(isrc); - if (mtx_owned == 0) - mtx_unlock(&intr_table_lock); + mtx_unlock(&intr_table_lock); } return (error); } From owner-svn-src-all@freebsd.org Fri Jul 29 16:43:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30A1BBA7B9C; Fri, 29 Jul 2016 16:43:53 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF128118F; Fri, 29 Jul 2016 16:43:52 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TGhqhe071779; Fri, 29 Jul 2016 16:43:52 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TGhq6f071778; Fri, 29 Jul 2016 16:43:52 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201607291643.u6TGhq6f071778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 29 Jul 2016 16:43:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303492 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 16:43:53 -0000 Author: alc Date: Fri Jul 29 16:43:51 2016 New Revision: 303492 URL: https://svnweb.freebsd.org/changeset/base/303492 Log: Remove a probe declaration that has been unused since r292469, when vm_pageout_grow_cache() was replaced. MFC after: 3 days Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Fri Jul 29 16:35:58 2016 (r303491) +++ head/sys/vm/vm_pageout.c Fri Jul 29 16:43:51 2016 (r303492) @@ -139,7 +139,6 @@ SYSINIT(pagedaemon, SI_SUB_KTHREAD_PAGE, &page_kp); SDT_PROVIDER_DEFINE(vm); -SDT_PROBE_DEFINE(vm, , , vm__lowmem_cache); SDT_PROBE_DEFINE(vm, , , vm__lowmem_scan); #if !defined(NO_SWAPPING) From owner-svn-src-all@freebsd.org Fri Jul 29 17:06:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB0ABBA8342; Fri, 29 Jul 2016 17:06:53 +0000 (UTC) (envelope-from email@piotr-stefaniak.me) Received: from BLU004-OMC2S26.hotmail.com (blu004-omc2s26.hotmail.com [65.55.111.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C4281E91; Fri, 29 Jul 2016 17:06:52 +0000 (UTC) (envelope-from email@piotr-stefaniak.me) Received: from BLU436-SMTP77 ([65.55.111.73]) by BLU004-OMC2S26.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Fri, 29 Jul 2016 10:06:46 -0700 X-TMN: [BHzpjpjXXdSTSNUOhDAkkHBYGKtS0DuV] X-Originating-Email: [email@piotr-stefaniak.me] Message-ID: Subject: Re: svn commit: r303487 - head/usr.bin/indent To: "Pedro F. Giffuni" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607291628.u6TGSpKT064605@repo.freebsd.org> From: Piotr Stefaniak Date: Fri, 29 Jul 2016 19:06:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <201607291628.u6TGSpKT064605@repo.freebsd.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 29 Jul 2016 17:06:46.0270 (UTC) FILETIME=[967289E0:01D1E9BB] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 17:06:53 -0000 On 2016-07-29 18:28, Pedro F. Giffuni wrote: > Author: pfg > Date: Fri Jul 29 16:28:51 2016 > New Revision: 303487 > URL: https://svnweb.freebsd.org/changeset/base/303487 > > Log: > indent(1): fix struct termination detection. > > Small style cleanup while here. Wrong commit message. Actually committed here is: Support "f" and "F" floating constant suffixes. > Differential Revision: https://reviews.freebsd.org/D6966 (Partial) > Obtained from: Piotr Stefaniak > > Modified: > head/usr.bin/indent/lexi.c > > Modified: head/usr.bin/indent/lexi.c > ============================================================================== > --- head/usr.bin/indent/lexi.c Fri Jul 29 16:25:09 2016 (r303486) > +++ head/usr.bin/indent/lexi.c Fri Jul 29 16:28:51 2016 (r303487) > @@ -191,15 +191,13 @@ lexi(void) > } > } > while (1) { > - if (!(seensfx & 1) && > - (*buf_ptr == 'U' || *buf_ptr == 'u')) { > + if (!(seensfx & 1) && (*buf_ptr == 'U' || *buf_ptr == 'u')) { > CHECK_SIZE_TOKEN; > *e_token++ = *buf_ptr++; > seensfx |= 1; > continue; > } > - if (!(seensfx & 2) && > - (*buf_ptr == 'L' || *buf_ptr == 'l')) { > + if (!(seensfx & 2) && strchr("fFlL", *buf_ptr)) { > CHECK_SIZE_TOKEN; > if (buf_ptr[1] == buf_ptr[0]) > *e_token++ = *buf_ptr++; > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Fri Jul 29 17:15:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DB08BA857A; Fri, 29 Jul 2016 17:15:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 271E81861; Fri, 29 Jul 2016 17:15:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6THFgd5082802; Fri, 29 Jul 2016 17:15:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6THFg5l082797; Fri, 29 Jul 2016 17:15:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607291715.u6THFg5l082797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 29 Jul 2016 17:15:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303494 - in head: share/man/man4 sys/dev/ntb sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 17:15:43 -0000 Author: mav Date: Fri Jul 29 17:15:41 2016 New Revision: 303494 URL: https://svnweb.freebsd.org/changeset/base/303494 Log: Once more refactor KPI between ntb_transport(4) and if_ntb(4).. New design allows to attach multiple consumers to ntb_transport(4) instance. Previous design obtained from Linux theoretically allowed that, but was not practically usable (Linux also has only one consumer driver now). Modified: head/share/man/man4/if_ntb.4 head/share/man/man4/ntb_transport.4 head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_transport.c head/sys/dev/ntb/ntb_transport.h Modified: head/share/man/man4/if_ntb.4 ============================================================================== --- head/share/man/man4/if_ntb.4 Fri Jul 29 17:12:31 2016 (r303493) +++ head/share/man/man4/if_ntb.4 Fri Jul 29 17:15:41 2016 (r303494) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 10, 2016 +.Dd July 29, 2016 .Dt IF_NTB 4 .Os .Sh NAME @@ -49,7 +49,7 @@ The following tunables are settable from .Bl -ohang .It Va hw.if_ntb.num_queues Number of transport queues to use per interface. -Default is 1. +Default is unlimited. .El .Sh DESCRIPTION The @@ -84,3 +84,6 @@ Later improvements were done by .An Conrad E. Meyer Aq Mt cem@FreeBSD.org and .An Alexander Motin Aq Mt mav@FreeBSD.org . +.Sh BUGS +Linux supports only one queue per interface, so manual configuration +may be required for compatibility. Modified: head/share/man/man4/ntb_transport.4 ============================================================================== --- head/share/man/man4/ntb_transport.4 Fri Jul 29 17:12:31 2016 (r303493) +++ head/share/man/man4/ntb_transport.4 Fri Jul 29 17:15:41 2016 (r303494) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 10, 2016 +.Dd July 29, 2016 .Dt NTB_TRANSPORT 4 .Os .Sh NAME @@ -44,10 +44,15 @@ The following tunables are settable from .It Va hw.ntb_transport.debug_level Driver debug level. The default value is 0, higher means more verbose. -.It Va hw.ntb_transport.max_num_clients -Number of bidirectional queues to setup. -The default value is 0, that means one queue per available memory window. -Maximal number is limited by number of doorbells. +.It Va hint.ntb_transport. Ns Ar X Ns Va .config +Configures queues allocation for consumer devices, separated by commas. +Each device can be configured as: "[:]", where: +.Va name +is a name of the driver which should attach the device (empty means any), +.Va queues +is a number of queues to allocate (empty means automatic), +The default configuration is empty string, which means single device +with one queue per memory window allowing any driver attachment. .El .Sh DESCRIPTION The Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Fri Jul 29 17:12:31 2016 (r303493) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Fri Jul 29 17:15:41 2016 (r303494) @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); static SYSCTL_NODE(_hw, OID_AUTO, if_ntb, CTLFLAG_RW, 0, "if_ntb"); -static unsigned g_if_ntb_num_queues = 1; +static unsigned g_if_ntb_num_queues = UINT_MAX; SYSCTL_UINT(_hw_if_ntb, OID_AUTO, num_queues, CTLFLAG_RWTUN, &g_if_ntb_num_queues, 0, "Number of queues per interface"); @@ -144,7 +144,8 @@ ntb_net_attach(device_t dev) if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setdev(ifp, dev); - sc->num_queues = g_if_ntb_num_queues; + sc->num_queues = min(g_if_ntb_num_queues, + ntb_transport_queue_count(dev)); sc->queues = malloc(sc->num_queues * sizeof(struct ntb_net_queue), M_DEVBUF, M_WAITOK | M_ZERO); sc->mtu = INT_MAX; @@ -152,8 +153,7 @@ ntb_net_attach(device_t dev) q = &sc->queues[i]; q->sc = sc; q->ifp = ifp; - q->qp = ntb_transport_create_queue(q, - device_get_parent(dev), &handlers); + q->qp = ntb_transport_create_queue(dev, i, &handlers, q); if (q->qp == NULL) break; sc->mtu = imin(sc->mtu, ntb_transport_max_size(q->qp)); @@ -167,6 +167,7 @@ ntb_net_attach(device_t dev) callout_init(&q->queue_full, 1); } sc->num_queues = i; + device_printf(dev, "%d queue(s)\n", sc->num_queues); if_setinitfn(ifp, ntb_net_init); if_setsoftc(ifp, sc); Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Fri Jul 29 17:12:31 2016 (r303493) +++ head/sys/dev/ntb/ntb_transport.c Fri Jul 29 17:15:41 2016 (r303494) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -64,13 +63,6 @@ __FBSDID("$FreeBSD$"); #include "ntb.h" #include "ntb_transport.h" -#define QP_SETSIZE 64 -BITSET_DEFINE(_qpset, QP_SETSIZE); -#define test_bit(pos, addr) BIT_ISSET(QP_SETSIZE, (pos), (addr)) -#define set_bit(pos, addr) BIT_SET(QP_SETSIZE, (pos), (addr)) -#define clear_bit(pos, addr) BIT_CLR(QP_SETSIZE, (pos), (addr)) -#define ffs_bit(addr) BIT_FFS(QP_SETSIZE, (addr)) - #define KTR_NTB KTR_SPARE3 #define NTB_TRANSPORT_VERSION 4 @@ -94,12 +86,6 @@ SYSCTL_UQUAD(_hw_ntb_transport, OID_AUTO "If enabled (non-zero), limit the size of large memory windows. " "Both sides of the NTB MUST set the same value here."); -static unsigned max_num_clients; -SYSCTL_UINT(_hw_ntb_transport, OID_AUTO, max_num_clients, CTLFLAG_RDTUN, - &max_num_clients, 0, "Maximum number of NTB transport clients. " - "0 (default) - use all available NTB memory windows; " - "positive integer N - Limit to N memory windows."); - static unsigned enable_xeon_watchdog; SYSCTL_UINT(_hw_ntb_transport, OID_AUTO, enable_xeon_watchdog, CTLFLAG_RDTUN, &enable_xeon_watchdog, 0, "If non-zero, write a register every second to " @@ -200,14 +186,21 @@ struct ntb_transport_mw { bus_addr_t dma_addr; }; +struct ntb_transport_child { + device_t dev; + int qpoff; + int qpcnt; + struct ntb_transport_child *next; +}; + struct ntb_transport_ctx { device_t dev; + struct ntb_transport_child *child; struct ntb_transport_mw *mw_vec; struct ntb_transport_qp *qp_vec; - struct _qpset qp_bitmap; - struct _qpset qp_bitmap_free; unsigned mw_count; unsigned qp_count; + uint64_t qp_bitmap; volatile bool link_is_up; struct callout link_work; struct callout link_watchdog; @@ -242,7 +235,6 @@ enum { NTBT_MW0_SZ_LOW, NTBT_MW1_SZ_HIGH, NTBT_MW1_SZ_LOW, - NTBT_MAX_SPAD, /* * Some NTB-using hardware have a watchdog to work around NTB hangs; if @@ -332,13 +324,44 @@ static int ntb_transport_attach(device_t dev) { struct ntb_transport_ctx *nt = device_get_softc(dev); + struct ntb_transport_child **cpp = &nt->child; + struct ntb_transport_child *nc; struct ntb_transport_mw *mw; - uint64_t qp_bitmap; - int rc; - unsigned i; + uint64_t db_bitmap; + int rc, i, db_count, spad_count, qp, qpu, qpo, qpt; + char cfg[128] = ""; + char buf[32]; + char *n, *np, *c, *name; nt->dev = dev; nt->mw_count = ntb_mw_count(dev); + spad_count = ntb_spad_count(dev); + db_bitmap = ntb_db_valid_mask(dev); + db_count = flsll(db_bitmap); + KASSERT(db_bitmap == (1 << db_count) - 1, + ("Doorbells are not sequential (%jx).\n", db_bitmap)); + + device_printf(dev, "%d memory windows, %d scratchpads, " + "%d doorbells\n", nt->mw_count, spad_count, db_count); + + if (nt->mw_count == 0) { + device_printf(dev, "At least 1 memory window required.\n"); + return (ENXIO); + } + if (spad_count < 6) { + device_printf(dev, "At least 6 scratchpads required.\n"); + return (ENXIO); + } + if (spad_count < 4 + 2 * nt->mw_count) { + nt->mw_count = (spad_count - 4) / 2; + device_printf(dev, "Scratchpads enough only for %d " + "memory windows.\n", nt->mw_count); + } + if (db_bitmap == 0) { + device_printf(dev, "At least one doorbell required.\n"); + return (ENXIO); + } + nt->mw_vec = malloc(nt->mw_count * sizeof(*nt->mw_vec), M_NTB_T, M_WAITOK | M_ZERO); for (i = 0; i < nt->mw_count; i++) { @@ -360,25 +383,59 @@ ntb_transport_attach(device_t dev) ntb_printf(0, "Unable to set mw%d caching\n", i); } - qp_bitmap = ntb_db_valid_mask(dev); - nt->qp_count = flsll(qp_bitmap); - KASSERT(nt->qp_count != 0, ("bogus db bitmap")); - nt->qp_count -= 1; - - if (max_num_clients != 0 && max_num_clients < nt->qp_count) - nt->qp_count = max_num_clients; - else if (nt->mw_count < nt->qp_count) - nt->qp_count = nt->mw_count; - KASSERT(nt->qp_count <= QP_SETSIZE, ("invalid qp_count")); + qpu = 0; + qpo = imin(db_count, nt->mw_count); + qpt = db_count; + + snprintf(buf, sizeof(buf), "hint.%s.%d.config", device_get_name(dev), + device_get_unit(dev)); + TUNABLE_STR_FETCH(buf, cfg, sizeof(cfg)); + n = cfg; + i = 0; + while ((c = strsep(&n, ",")) != NULL) { + np = c; + name = strsep(&np, ":"); + if (name != NULL && name[0] == 0) + name = NULL; + qp = (np && np[0] != 0) ? strtol(np, NULL, 10) : qpo - qpu; + if (qp <= 0) + qp = 1; + + if (qp > qpt - qpu) { + device_printf(dev, "Not enough resources for config\n"); + break; + } + + nc = malloc(sizeof(*nc), M_DEVBUF, M_WAITOK | M_ZERO); + nc->qpoff = qpu; + nc->qpcnt = qp; + nc->dev = device_add_child(dev, name, -1); + if (nc->dev == NULL) { + device_printf(dev, "Can not add child.\n"); + break; + } + device_set_ivars(nc->dev, nc); + *cpp = nc; + cpp = &nc->next; + + if (bootverbose) { + device_printf(dev, "%d \"%s\": queues %d", + i, name, qpu); + if (qp > 1) + printf("-%d", qpu + qp - 1); + printf("\n"); + } + + qpu += qp; + i++; + } + nt->qp_count = qpu; nt->qp_vec = malloc(nt->qp_count * sizeof(*nt->qp_vec), M_NTB_T, M_WAITOK | M_ZERO); - for (i = 0; i < nt->qp_count; i++) { - set_bit(i, &nt->qp_bitmap); - set_bit(i, &nt->qp_bitmap_free); + for (i = 0; i < nt->qp_count; i++) ntb_transport_init_queue(nt, i); - } callout_init(&nt->link_work, 0); callout_init(&nt->link_watchdog, 0); @@ -394,10 +451,7 @@ ntb_transport_attach(device_t dev) if (enable_xeon_watchdog != 0) callout_reset(&nt->link_watchdog, 0, xeon_link_watchdog_hb, nt); - /* Attach children to this transport */ - device_add_child(dev, NULL, -1); bus_generic_attach(dev); - return (0); err: @@ -410,25 +464,25 @@ static int ntb_transport_detach(device_t dev) { struct ntb_transport_ctx *nt = device_get_softc(dev); - struct _qpset qp_bitmap_alloc; - uint8_t i; - - /* Detach & delete all children */ - device_delete_children(dev); + struct ntb_transport_child **cpp = &nt->child; + struct ntb_transport_child *nc; + int error = 0, i; + + while ((nc = *cpp) != NULL) { + *cpp = (*cpp)->next; + error = device_delete_child(dev, nc->dev); + if (error) + break; + free(nc, M_DEVBUF); + } + KASSERT(nt->qp_bitmap == 0, + ("Some queues not freed on detach (%jx)", nt->qp_bitmap)); ntb_transport_link_cleanup(nt); taskqueue_drain(taskqueue_swi, &nt->link_cleanup); callout_drain(&nt->link_work); callout_drain(&nt->link_watchdog); - BIT_COPY(QP_SETSIZE, &nt->qp_bitmap, &qp_bitmap_alloc); - BIT_NAND(QP_SETSIZE, &qp_bitmap_alloc, &nt->qp_bitmap_free); - - /* Verify that all the QPs are freed */ - for (i = 0; i < nt->qp_count; i++) - if (test_bit(i, &qp_bitmap_alloc)) - ntb_transport_free_queue(&nt->qp_vec[i]); - ntb_link_disable(dev); ntb_clear_ctx(dev); @@ -440,6 +494,14 @@ ntb_transport_detach(device_t dev) return (0); } +int +ntb_transport_queue_count(device_t dev) +{ + struct ntb_transport_child *nc = device_get_ivars(dev); + + return (nc->qpcnt); +} + static void ntb_transport_init_queue(struct ntb_transport_ctx *nt, unsigned int qp_num) { @@ -507,6 +569,7 @@ ntb_transport_init_queue(struct ntb_tran void ntb_transport_free_queue(struct ntb_transport_qp *qp) { + struct ntb_transport_ctx *nt = qp->transport; struct ntb_queue_entry *entry; if (qp == NULL) @@ -532,7 +595,7 @@ ntb_transport_free_queue(struct ntb_tran while ((entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q))) free(entry, M_NTB_T); - set_bit(qp->qp_num, &qp->transport->qp_bitmap_free); + nt->qp_bitmap &= ~(1 << qp->qp_num); } /** @@ -550,24 +613,20 @@ ntb_transport_free_queue(struct ntb_tran * RETURNS: pointer to newly created ntb_queue, NULL on error. */ struct ntb_transport_qp * -ntb_transport_create_queue(void *data, device_t dev, - const struct ntb_queue_handlers *handlers) +ntb_transport_create_queue(device_t dev, int q, + const struct ntb_queue_handlers *handlers, void *data) { - struct ntb_transport_ctx *nt = device_get_softc(dev); + struct ntb_transport_child *nc = device_get_ivars(dev); + struct ntb_transport_ctx *nt = device_get_softc(device_get_parent(dev)); struct ntb_queue_entry *entry; struct ntb_transport_qp *qp; - unsigned int free_queue; int i; - free_queue = ffs_bit(&nt->qp_bitmap_free); - if (free_queue == 0) + if (q < 0 || q >= nc->qpcnt) return (NULL); - /* decrement free_queue to make it zero based */ - free_queue--; - - qp = &nt->qp_vec[free_queue]; - clear_bit(qp->qp_num, &nt->qp_bitmap_free); + qp = &nt->qp_vec[nc->qpoff + q]; + nt->qp_bitmap |= (1 << qp->qp_num); qp->cb_data = data; qp->rx_handler = handlers->rx_handler; qp->tx_handler = handlers->tx_handler; @@ -944,24 +1003,19 @@ ntb_transport_doorbell_callback(void *da { struct ntb_transport_ctx *nt = data; struct ntb_transport_qp *qp; - struct _qpset db_bits; uint64_t vec_mask; unsigned qp_num; - BIT_COPY(QP_SETSIZE, &nt->qp_bitmap, &db_bits); - BIT_NAND(QP_SETSIZE, &db_bits, &nt->qp_bitmap_free); - vec_mask = ntb_db_vector_mask(nt->dev, vector); + vec_mask &= nt->qp_bitmap; if ((vec_mask & (vec_mask - 1)) != 0) vec_mask &= ntb_db_read(nt->dev); while (vec_mask != 0) { qp_num = ffsll(vec_mask) - 1; - if (test_bit(qp_num, &db_bits)) { - qp = &nt->qp_vec[qp_num]; - if (qp->link_is_up) - taskqueue_enqueue(qp->rxc_tq, &qp->rxc_db_work); - } + qp = &nt->qp_vec[qp_num]; + if (qp->link_is_up) + taskqueue_enqueue(qp->rxc_tq, &qp->rxc_db_work); vec_mask &= ~(1ull << qp_num); } @@ -1219,19 +1273,16 @@ static void ntb_transport_link_cleanup(struct ntb_transport_ctx *nt) { struct ntb_transport_qp *qp; - struct _qpset qp_bitmap_alloc; - unsigned i; - - BIT_COPY(QP_SETSIZE, &nt->qp_bitmap, &qp_bitmap_alloc); - BIT_NAND(QP_SETSIZE, &qp_bitmap_alloc, &nt->qp_bitmap_free); + int i; /* Pass along the info to any clients */ - for (i = 0; i < nt->qp_count; i++) - if (test_bit(i, &qp_bitmap_alloc)) { + for (i = 0; i < nt->qp_count; i++) { + if ((nt->qp_bitmap & (1 << i)) != 0) { qp = &nt->qp_vec[i]; ntb_qp_link_cleanup(qp); callout_drain(&qp->link_work); } + } if (!nt->link_is_up) callout_drain(&nt->link_work); @@ -1241,8 +1292,7 @@ ntb_transport_link_cleanup(struct ntb_tr * goes down, blast them now to give them a sane value the next * time they are accessed */ - for (i = 0; i < NTBT_MAX_SPAD; i++) - ntb_spad_write(nt->dev, i, 0); + ntb_spad_clear(nt->dev); } static void Modified: head/sys/dev/ntb/ntb_transport.h ============================================================================== --- head/sys/dev/ntb/ntb_transport.h Fri Jul 29 17:12:31 2016 (r303493) +++ head/sys/dev/ntb/ntb_transport.h Fri Jul 29 17:15:41 2016 (r303494) @@ -43,12 +43,13 @@ struct ntb_queue_handlers { void (*event_handler)(void *data, enum ntb_link_event status); }; -unsigned char ntb_transport_qp_num(struct ntb_transport_qp *qp); -unsigned int ntb_transport_max_size(struct ntb_transport_qp *qp); +int ntb_transport_queue_count(device_t dev); struct ntb_transport_qp * -ntb_transport_create_queue(void *data, device_t dev, - const struct ntb_queue_handlers *handlers); +ntb_transport_create_queue(device_t dev, int q, + const struct ntb_queue_handlers *handlers, void *data); void ntb_transport_free_queue(struct ntb_transport_qp *qp); +unsigned char ntb_transport_qp_num(struct ntb_transport_qp *qp); +unsigned int ntb_transport_max_size(struct ntb_transport_qp *qp); int ntb_transport_rx_enqueue(struct ntb_transport_qp *qp, void *cb, void *data, unsigned int len); int ntb_transport_tx_enqueue(struct ntb_transport_qp *qp, void *cb, void *data, From owner-svn-src-all@freebsd.org Fri Jul 29 17:18:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34DF0BA85E5; Fri, 29 Jul 2016 17:18:49 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FFBE1A52; Fri, 29 Jul 2016 17:18:48 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6THImhv082941; Fri, 29 Jul 2016 17:18:48 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6THIm7R082938; Fri, 29 Jul 2016 17:18:48 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201607291718.u6THIm7R082938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 29 Jul 2016 17:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303495 - in head: include/xlocale 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 17:18:49 -0000 Author: ed Date: Fri Jul 29 17:18:47 2016 New Revision: 303495 URL: https://svnweb.freebsd.org/changeset/base/303495 Log: Change the return type of freelocale(3) to void. Our version of this function currently returns an integer indicating failure or success, whereas POSIX specifies that this function has no return value. It returns void. Patch up the header, sources and man page to use the right type. While there, use the opportunity to simplify the body of this function. Theoretically speaking, this change breaks the ABI of this function. That said, I have yet to find any code that makes use of freelocale()'s return value. I couldn't find any of it in the base system, nor did an exp-run reveal any breakage caused by this change. PR: 211394 (exp-run) Modified: head/include/xlocale/_locale.h head/lib/libc/locale/freelocale.3 head/lib/libc/locale/xlocale.c Modified: head/include/xlocale/_locale.h ============================================================================== --- head/include/xlocale/_locale.h Fri Jul 29 17:15:41 2016 (r303494) +++ head/include/xlocale/_locale.h Fri Jul 29 17:18:47 2016 (r303495) @@ -48,7 +48,7 @@ typedef struct _xlocale *locale_t; #endif locale_t duplocale(locale_t base); -int freelocale(locale_t loc); +void freelocale(locale_t loc); locale_t newlocale(int mask, const char *locale, locale_t base); const char *querylocale(int mask, locale_t loc); locale_t uselocale(locale_t loc); Modified: head/lib/libc/locale/freelocale.3 ============================================================================== --- head/lib/libc/locale/freelocale.3 Fri Jul 29 17:15:41 2016 (r303494) +++ head/lib/libc/locale/freelocale.3 Fri Jul 29 17:18:47 2016 (r303495) @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd September 17, 2011 +.Dd July 26, 2016 .Dt FREELOCALE 3 .Os .Sh NAME @@ -39,7 +39,7 @@ or .Lb libc .Sh SYNOPSIS .In locale.h -.Ft int +.Ft void .Fn freelocale "locale_t locale" .Sh DESCRIPTION Frees a @@ -47,8 +47,6 @@ Frees a This relinquishes any resources held exclusively by this locale. Note that locales share reference-counted components, so a call to this function is not guaranteed to free all of the components. -.Sh RETURN VALUES -Returns 0 on success or -1 on error. .Sh SEE ALSO .Xr duplocale 3 , .Xr localeconv 3 , @@ -57,12 +55,5 @@ Returns 0 on success or -1 on error. .Xr uselocale 3 , .Xr xlocale 3 .Sh STANDARDS -The -.Fn freelocale -function -differs from -.St -p1003.1-2008 -in that its return type is -.Vt int -rather than -.Vt void . +This function conforms to +.St -p1003.1-2008 . Modified: head/lib/libc/locale/xlocale.c ============================================================================== --- head/lib/libc/locale/xlocale.c Fri Jul 29 17:15:41 2016 (r303494) +++ head/lib/libc/locale/xlocale.c Fri Jul 29 17:18:47 2016 (r303495) @@ -325,20 +325,18 @@ locale_t duplocale(locale_t base) * Free a locale_t. This is quite a poorly named function. It actually * disclaims a reference to a locale_t, rather than freeing it. */ -int +void freelocale(locale_t loc) { - /* Fail if we're passed something that isn't a locale. */ - if ((NULL == loc) || (LC_GLOBAL_LOCALE == loc)) { - return (-1); - } - /* If we're passed the global locale, pretend that we freed it but don't - * actually do anything. */ - if (&__xlocale_global_locale == loc) { - return (0); - } - xlocale_release(loc); - return (0); + + /* + * Fail if we're passed something that isn't a locale. If we're + * passed the global locale, pretend that we freed it but don't + * actually do anything. + */ + if (loc != NULL && loc != LC_GLOBAL_LOCALE && + loc != &__xlocale_global_locale) + xlocale_release(loc); } /* From owner-svn-src-all@freebsd.org Fri Jul 29 17:54:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6F62BA8DB7; Fri, 29 Jul 2016 17:54:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A5AE13E5; Fri, 29 Jul 2016 17:54:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6THsLXF098041; Fri, 29 Jul 2016 17:54:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6THsLl5098040; Fri, 29 Jul 2016 17:54:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607291754.u6THsLl5098040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 29 Jul 2016 17:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303497 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 17:54:22 -0000 Author: jhb Date: Fri Jul 29 17:54:21 2016 New Revision: 303497 URL: https://svnweb.freebsd.org/changeset/base/303497 Log: Add a loader tunable (hw.pci.enable_pcie_hp) to disable PCI-e HotPlug. Some systems and/or devices (such as riser cards) do not include a non-compliant implementation of PCI-e HotPlug that can result in devices not being attached (e.g. the HotPlug code might assume that a card is being unplugged and will power the slot off and detach it). This tunable can be set to 0 to disable support for PCI-e HotPlug ignoring the incorrect HotPlug state on these slots. PR: 211081 Reported by: Sergey Renkas (SuperMicro X7 riser card) Reported by: Jeffrey E Pieper (Intel X520 adapter) MFC after: 1 week Relnotes: yes Modified: head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Fri Jul 29 17:28:14 2016 (r303496) +++ head/sys/dev/pci/pci_pci.c Fri Jul 29 17:54:21 2016 (r303497) @@ -907,11 +907,19 @@ pcib_set_mem_decode(struct pcib_softc *s /* * PCI-express HotPlug support. */ +static int pci_enable_pcie_hp = 1; +SYSCTL_INT(_hw_pci, OID_AUTO, enable_pcie_hp, CTLFLAG_RDTUN, + &pci_enable_pcie_hp, 0, + "Enable support for native PCI-express HotPlug."); + static void pcib_probe_hotplug(struct pcib_softc *sc) { device_t dev; + if (!pci_enable_pcie_hp) + return; + dev = sc->dev; if (pci_find_cap(dev, PCIY_EXPRESS, NULL) != 0) return; From owner-svn-src-all@freebsd.org Fri Jul 29 17:55:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9275BA8E17; Fri, 29 Jul 2016 17:55:39 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBB2515FF; Fri, 29 Jul 2016 17:55:39 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6THtcLu098169; Fri, 29 Jul 2016 17:55:38 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6THtcWh098168; Fri, 29 Jul 2016 17:55:38 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607291755.u6THtcWh098168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 29 Jul 2016 17:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303498 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 17:55:40 -0000 Author: pfg Date: Fri Jul 29 17:55:38 2016 New Revision: 303498 URL: https://svnweb.freebsd.org/changeset/base/303498 Log: Revert r303487: Wrong commit log. Will be brought back with the correct log. Modified: head/usr.bin/indent/lexi.c Modified: head/usr.bin/indent/lexi.c ============================================================================== --- head/usr.bin/indent/lexi.c Fri Jul 29 17:54:21 2016 (r303497) +++ head/usr.bin/indent/lexi.c Fri Jul 29 17:55:38 2016 (r303498) @@ -191,13 +191,15 @@ lexi(void) } } while (1) { - if (!(seensfx & 1) && (*buf_ptr == 'U' || *buf_ptr == 'u')) { + if (!(seensfx & 1) && + (*buf_ptr == 'U' || *buf_ptr == 'u')) { CHECK_SIZE_TOKEN; *e_token++ = *buf_ptr++; seensfx |= 1; continue; } - if (!(seensfx & 2) && strchr("fFlL", *buf_ptr)) { + if (!(seensfx & 2) && + (*buf_ptr == 'L' || *buf_ptr == 'l')) { CHECK_SIZE_TOKEN; if (buf_ptr[1] == buf_ptr[0]) *e_token++ = *buf_ptr++; From owner-svn-src-all@freebsd.org Fri Jul 29 18:00:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70096BA8F35; Fri, 29 Jul 2016 18:00:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42E0B17EE; Fri, 29 Jul 2016 18:00:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TI0AuC098432; Fri, 29 Jul 2016 18:00:10 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TI0Acv098431; Fri, 29 Jul 2016 18:00:10 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607291800.u6TI0Acv098431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 29 Jul 2016 18:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303499 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 18:00:11 -0000 Author: pfg Date: Fri Jul 29 18:00:10 2016 New Revision: 303499 URL: https://svnweb.freebsd.org/changeset/base/303499 Log: indent(1): Support "f" and "F" floating constant suffixes. Actually this just brings back r303487 with the correct commit log. Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Obtained from: Piotr Stefaniak Modified: head/usr.bin/indent/lexi.c Modified: head/usr.bin/indent/lexi.c ============================================================================== --- head/usr.bin/indent/lexi.c Fri Jul 29 17:55:38 2016 (r303498) +++ head/usr.bin/indent/lexi.c Fri Jul 29 18:00:10 2016 (r303499) @@ -191,15 +191,13 @@ lexi(void) } } while (1) { - if (!(seensfx & 1) && - (*buf_ptr == 'U' || *buf_ptr == 'u')) { + if (!(seensfx & 1) && (*buf_ptr == 'U' || *buf_ptr == 'u')) { CHECK_SIZE_TOKEN; *e_token++ = *buf_ptr++; seensfx |= 1; continue; } - if (!(seensfx & 2) && - (*buf_ptr == 'L' || *buf_ptr == 'l')) { + if (!(seensfx & 2) && strchr("fFlL", *buf_ptr)) { CHECK_SIZE_TOKEN; if (buf_ptr[1] == buf_ptr[0]) *e_token++ = *buf_ptr++; From owner-svn-src-all@freebsd.org Fri Jul 29 18:04:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B721BA70FB; Fri, 29 Jul 2016 18:04:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) (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 D11391C58; Fri, 29 Jul 2016 18:04:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x232.google.com with SMTP id y134so34822127pfg.0; Fri, 29 Jul 2016 11:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=alTPm5iCtjB38I+cFxW1hxUH+DeSV0dLvFxGBd4bx14=; b=FaWFxafQfMA5vhgBXb/Z2fx5v+ECyqITJLM5PumBSP5ZUAQIFPgxD4x7BmRnot602g Uoz0MdTxePh1EroB4DD54Hezym6LzLc9LryHTNKvlfjuLJJ3yaa+ocWnziGGHv5U+b6i 2c/nlvxYiC/H42zyrj1cnaZ45MS3BXWCVPh/4bGbNIA6Lq3b92RSHJDnWa/aveNyhuiM R/VdlxFeNCR/kK5EWJHDhB38dszJNxphkQJQ8UTL2HNCARBnuND00kklUaO5K0Yu/1Uz ulIHmvjBF4Y5YmTeQlqGB+PPhmjzCJHGozFPozPfQY+O7mfWChCWCygql78WY+fBiftn xyMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=alTPm5iCtjB38I+cFxW1hxUH+DeSV0dLvFxGBd4bx14=; b=MKupJBHqKNoaj/JtB4Lw9zBsG8913dMxvpIBgumAzjaNhSDuD3rpXDsz1RDFMGxQHN /ByF7/3++M/39cJ3usPDuXDBAfkfkjf+3itFj5P5NPdttvrdb/di9jcaDX4wPJvMdfKC mngDRnh/zAiw1zCyqi/KOT8l6zwHPWFLkfoiBwOD/xssLvLdFjQdDplQYeO+uRR9imEz dI83DdV01JhilYpZ6YlIVOdBD51JJS5i0miI0veCVDjHuPtRnikWv4V7lCANHsn4cEWO bFCjl97X62ugXYn0enCFL69DOxJ78gJdTOXcX2QLYwldS8VNPGcaitGz1ngKLCtCjC0j JSlA== X-Gm-Message-State: AEkoousm7lWfB8Lmh1ZCWzNUDjgZXmrHPVAiCMsOilooVCny29F3TLCmzJpg27FC8gLwBw== X-Received: by 10.98.134.77 with SMTP id x74mr70939115pfd.21.1469815443128; Fri, 29 Jul 2016 11:04:03 -0700 (PDT) Received: from [100.199.216.151] ([172.56.42.25]) by smtp.gmail.com with ESMTPSA id h66sm26582766pfe.58.2016.07.29.11.04.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jul 2016 11:04:02 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r303497 - head/sys/dev/pci From: Ngie Cooper X-Mailer: iPhone Mail (13F69) In-Reply-To: <201607291754.u6THsLl5098040@repo.freebsd.org> Date: Fri, 29 Jul 2016 11:04:01 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <201607291754.u6THsLl5098040@repo.freebsd.org> To: John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 18:04:04 -0000 > On Jul 29, 2016, at 10:54, John Baldwin wrote: > > Author: jhb > Date: Fri Jul 29 17:54:21 2016 > New Revision: 303497 > URL: https://svnweb.freebsd.org/changeset/base/303497 > > Log: > Add a loader tunable (hw.pci.enable_pcie_hp) to disable PCI-e HotPlug. > > Some systems and/or devices (such as riser cards) do not include a > non-compliant implementation of PCI-e HotPlug that can result in devices > not being attached (e.g. the HotPlug code might assume that a card is > being unplugged and will power the slot off and detach it). This > tunable can be set to 0 to disable support for PCI-e HotPlug ignoring > the incorrect HotPlug state on these slots. > > PR: 211081 > Reported by: Sergey Renkas (SuperMicro X7 riser card) > Reported by: Jeffrey E Pieper > (Intel X520 adapter) > MFC after: 1 week > Relnotes: yes Should this be done on a per-bus basis? Thanks! -Ngie From owner-svn-src-all@freebsd.org Fri Jul 29 18:10:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03D5DBA7353 for ; Fri, 29 Jul 2016 18:10:20 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm16.bullet.mail.bf1.yahoo.com (nm16.bullet.mail.bf1.yahoo.com [98.139.212.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEFBE1236 for ; Fri, 29 Jul 2016 18:10:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1469815818; bh=QVzCnp47ozMBuvYChquj8AUQlkv/5Fhrh4TJu4L2ZC0=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=gkjkTII44WvcpQS+55GA9NRvc1NUIjdOKsDeah5KEnoHhkFryJkc14E9dKaVCJWdVemsH2vNXuu2be4HqwJ2ZGeNVWhcIGPfHzuh+Ycsigg/sv0ZxT7j1XY3hyUSZ+tUlE7CRzIFS5TNvF4T7skBd/azJwFF27AcypyBydAwNvQyWbsQmjCcOgjfGvAWBVVxPwX7Rs57HbeeIGe4LUvjT6JUhy6Pyj0h3cfjWOmuWTdfkAWCvil9y1XENuqs/OiUgm2CRQbvJTFVi3/tgCfq8ZiXS0QRAqZzttmY2mD6aOJwkj/ps0dBJWGQfjMQ934p32bn4mF2sStqyRn5EbnXsQ== Received: from [66.196.81.171] by nm16.bullet.mail.bf1.yahoo.com with NNFMP; 29 Jul 2016 18:10:18 -0000 Received: from [68.142.230.77] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 29 Jul 2016 18:10:18 -0000 Received: from [127.0.0.1] by smtp234.mail.bf1.yahoo.com with NNFMP; 29 Jul 2016 18:10:18 -0000 X-Yahoo-Newman-Id: 98285.36077.bm@smtp234.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: zuMEhNUVM1nqekJ2hvojiTOWvdF7XVgCIRvomHfwp6kAF3t l3gp60G6qeWWIZUKgguFqahjMvfgxEmmy08B99FhJyD1YQ4BlFv0Hyg5QpWO tuGNW3GR2rWmP1MAm7rKVL_fBuIJOb6pJ7vWZC4XyTmceg..lNB71mKDET1i of1jDiuiC.LUsUKn4ycB2VHgrQxcxsA5DZnD1K.UxITFkzfX.XwMfCcovteG scvLx73ZZxywaYbZmgQXtHcMkF5iTBnjwyhgG9.0O.qznNC_MP7DYBYFgvKL HNPZrg.ODQ7i2WgGAJbKlPwRuR1pQBK3ZuXAxqpNbnfT5b2hnDfExekn6cZt Bo82_OduSNV4GCQ7Q9_pExQ8BgXXBGDp3TB4rTioAolDGqOxWwkZDqkpSZW1 W4wyEQHDoNZTJCJh2b8AmDXHiwHydQLT5XJ6j3OyGlu.csnvd8zTNzX3eI7. eZKICUULiiNmE5rFnnD_5SX8q6qluIFYutZIwxZrgVgqMDzVtNGqOZQOaf.v UFIOXFNrvLw.xv7qch0EvhQwrx1SOxJhtsO7nzT9.HiDJ4A-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r303484 - head/usr.bin/indent To: Benjamin Kaduk References: <201607291617.u6TGHsPE060673@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Pedro Giffuni Message-ID: Date: Fri, 29 Jul 2016 13:10:26 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 18:10:20 -0000 On 07/29/16 11:24, Benjamin Kaduk wrote: > On Fri, Jul 29, 2016 at 11:20 AM, Benjamin Kaduk > wrote: > > On Fri, Jul 29, 2016 at 11:17 AM, Pedro F. Giffuni > wrote: > > Author: pfg > Date: Fri Jul 29 16:17:54 2016 > New Revision: 303484 > URL: https://svnweb.freebsd.org/changeset/base/303484 > > Log: > indent(1): Fix breakage caused by single comment following "else". > > indent(1) simply wasn't taught that "else" may be followed by > a comment > without any opening brace anywhere on the line, so it was very > confused > in such cases. > > > Wrong commit message? I see no 'else' in this change. > (I guess core's guidance is to revert and recommit with correct > message, these days.) > > > Nevermind, I think I see what's going on here, now. > No problem. It would be great to have more eyes helping review the changes here: https://github.com/pstef/freebsd_indent/commits/master I only got started with a first batch of them. Regards, Pedro. From owner-svn-src-all@freebsd.org Fri Jul 29 18:13:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25AFDBA7639; Fri, 29 Jul 2016 18:13:09 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 060F217FE; Fri, 29 Jul 2016 18:13:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 13A19B945; Fri, 29 Jul 2016 14:13:07 -0400 (EDT) From: John Baldwin To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303497 - head/sys/dev/pci Date: Fri, 29 Jul 2016 11:11:27 -0700 Message-ID: <2350179.pmqWqTZJad@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: <201607291754.u6THsLl5098040@repo.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, 29 Jul 2016 14:13:07 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 18:13:09 -0000 On Friday, July 29, 2016 11:04:01 AM Ngie Cooper wrote: > > > On Jul 29, 2016, at 10:54, John Baldwin wrote: > > > > Author: jhb > > Date: Fri Jul 29 17:54:21 2016 > > New Revision: 303497 > > URL: https://svnweb.freebsd.org/changeset/base/303497 > > > > Log: > > Add a loader tunable (hw.pci.enable_pcie_hp) to disable PCI-e HotPlug. > > > > Some systems and/or devices (such as riser cards) do not include a > > non-compliant implementation of PCI-e HotPlug that can result in devices > > not being attached (e.g. the HotPlug code might assume that a card is > > being unplugged and will power the slot off and detach it). This > > tunable can be set to 0 to disable support for PCI-e HotPlug ignoring > > the incorrect HotPlug state on these slots. > > > > PR: 211081 > > Reported by: Sergey Renkas (SuperMicro X7 riser card) > > Reported by: Jeffrey E Pieper > > (Intel X520 adapter) > > MFC after: 1 week > > Relnotes: yes > > Should this be done on a per-bus basis? For now this is just a way to disable it globally. If need be we could add a separate hint to do it per-bridge (hint.pcib.X.hp=0/1 or some such). I'm still working with the Intel folks to see if I can narrow down exactly what makes this chip unhappy to see if I can include a workaround. Both of these devices use a chip from PLX to manage an internal PCI bridge. In both cases the PLX chip reports that a mechnical latch is open (PCI HP supports an optional latch that can be opened to release a card so it can be removed), but neither device has a real latch (so the sensor has not been wired correctly in either device). However, just bypassing the sensor check isn't sufficient to allow the devices behind the bridge to probe. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Jul 29 18:18:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE102BA76D0 for ; Fri, 29 Jul 2016 18:18:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm46-vm5.bullet.mail.bf1.yahoo.com (nm46-vm5.bullet.mail.bf1.yahoo.com [216.109.115.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A3AF1A3E for ; Fri, 29 Jul 2016 18:18:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1469814666; bh=tH2dIaQeYjixIstTI07uq8FTVkw6D2trEChBUwsz6I0=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=EOPflyX5srl18jGT5VGklxqShunaA0bujyjPGbpuAIrZhh00iz/NaZ5HGewD1djdAiC+2WdZXgywHvQiNFbwDPAYdzKUBVHHnWUChk+lCgCmsHS39CUa+cRcp1f7G5Q6aQDFW8TOHHpH9p1706dVyTubqxoOT0fk4PprFZNn42jH/igliGaETCho3Gq1HsJXd6y8nPQ7nWOIS4yb4YL2JDrm39biMe0p4U6ZvfXbbTISWWKKSjtmEAInsWmrd8L0FqM3saCtTif4KFqKqPVG63NUusAMBLjXnSQ4oy0OYlrMMdlBl5p8mzzYG5nN8WWn4ydE9ACLMGFW1gro7sfKBg== Received: from [66.196.81.172] by nm46.bullet.mail.bf1.yahoo.com with NNFMP; 29 Jul 2016 17:51:06 -0000 Received: from [98.139.213.11] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 29 Jul 2016 17:51:06 -0000 Received: from [127.0.0.1] by smtp111.mail.bf1.yahoo.com with NNFMP; 29 Jul 2016 17:51:06 -0000 X-Yahoo-Newman-Id: 760962.50589.bm@smtp111.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: ehjq8DMVM1kirzJu1ypBlA.5R7pAJtm8H2Js7pF3lwhdU5P D1tMsi8I2aP3qHmaeiIYPVmGa6X_e_7kiZUAoqWZo2H3pRJgd2qHoAsr9m5b jifhxivGGQaYy9.4dGyQu6PIoUZZL9ciH43ywMiWfH9Q5tE.Kl.f__RcdLJx LJwZtl8MlpTB_wxeRAjI09NnQsy2c_ie_hdrVVbW4iqLgH9VUKynAv85Gt4F nVg93kJRZxuovCCu.O9ziJvNWDURX2rH2XRrV72gyUwMDJVURrgqZ9uMA4XT ofxC8n22s4WHabVH1Uh_E4gGLUbmJHFZwXV_KLnhiXOgi0rZ9NSUXX0OUe9Q tKGofHAIszVvYN6Xdpsb1H4w2TN64Lxz_xDTn3eRyfAT5uRKt.Y709IeIakf Gcby8F0m8HDwr5ONzPo9eSTXM8TLuOGcR6C16_oelMzazHGldrZKtzoR2F7A HPBbqJpY.NR27x0Xn3B_ZR4RgiDJfnYqqTlwjqGsFvkX4Gd8LXSesLxK6XZM wksEx9YIkG4tJRexouSsrtUNC71IBvo5CXMybi4RcNe6yRA-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r303487 - head/usr.bin/indent To: Piotr Stefaniak , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607291628.u6TGSpKT064605@repo.freebsd.org> From: Pedro Giffuni Message-ID: <2ca98ccf-4c45-530a-0a60-cfc4e964d395@FreeBSD.org> Date: Fri, 29 Jul 2016 12:51:14 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 18:18:28 -0000 On 07/29/16 12:06, Piotr Stefaniak wrote: > On 2016-07-29 18:28, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Fri Jul 29 16:28:51 2016 >> New Revision: 303487 >> URL: https://svnweb.freebsd.org/changeset/base/303487 >> >> Log: >> indent(1): fix struct termination detection. >> >> Small style cleanup while here. > > Wrong commit message. Actually committed here is: Support "f" and "F" > floating constant suffixes. > Argggh .. yes will fix sorry.. will fix.. reverting :(. Pedro. From owner-svn-src-all@freebsd.org Fri Jul 29 18:26:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EABE9BA78EF; Fri, 29 Jul 2016 18:26:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4D4E1EA9; Fri, 29 Jul 2016 18:26:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TIQF7X009125; Fri, 29 Jul 2016 18:26:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TIQFlM009123; Fri, 29 Jul 2016 18:26:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607291826.u6TIQFlM009123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 29 Jul 2016 18:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303501 - in head: sys/kern tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 18:26:17 -0000 Author: jhb Date: Fri Jul 29 18:26:15 2016 New Revision: 303501 URL: https://svnweb.freebsd.org/changeset/base/303501 Log: Fix locking issues with aio_fsync(). - Use correct lock in aio_cancel_sync when dequeueing job. - Add _locked variants of aio_set/clear_cancel_function and use those to avoid lock recursion when adding and removing fsync jobs to the per-process sync queue. - While here, add a basic test for aio_fsync(). PR: 211390 Reported by: Randy Westlund MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7339 Modified: head/sys/kern/vfs_aio.c head/tests/sys/aio/aio_test.c Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Fri Jul 29 18:10:59 2016 (r303500) +++ head/sys/kern/vfs_aio.c Fri Jul 29 18:26:15 2016 (r303501) @@ -311,6 +311,7 @@ static void aio_proc_rundown_exec(void * static int aio_qphysio(struct proc *p, struct kaiocb *job); static void aio_daemon(void *param); static void aio_bio_done_notify(struct proc *userp, struct kaiocb *job); +static bool aio_clear_cancel_function_locked(struct kaiocb *job); static int aio_kick(struct proc *userp); static void aio_kick_nowait(struct proc *userp); static void aio_kick_helper(void *context, int pending); @@ -919,7 +920,7 @@ notification_done: if (--sjob->pending > 0) continue; TAILQ_REMOVE(&ki->kaio_syncqueue, sjob, list); - if (!aio_clear_cancel_function(sjob)) + if (!aio_clear_cancel_function_locked(sjob)) continue; TAILQ_INSERT_TAIL(&ki->kaio_syncready, sjob, list); schedule_fsync = true; @@ -967,40 +968,57 @@ aio_cancel_cleared(struct kaiocb *job) return ((job->jobflags & KAIOCB_CLEARED) != 0); } -bool -aio_clear_cancel_function(struct kaiocb *job) +static bool +aio_clear_cancel_function_locked(struct kaiocb *job) { - struct kaioinfo *ki; - ki = job->userproc->p_aioinfo; - AIO_LOCK(ki); + AIO_LOCK_ASSERT(job->userproc->p_aioinfo, MA_OWNED); MPASS(job->cancel_fn != NULL); if (job->jobflags & KAIOCB_CANCELLING) { job->jobflags |= KAIOCB_CLEARED; - AIO_UNLOCK(ki); return (false); } job->cancel_fn = NULL; - AIO_UNLOCK(ki); return (true); } bool -aio_set_cancel_function(struct kaiocb *job, aio_cancel_fn_t *func) +aio_clear_cancel_function(struct kaiocb *job) { struct kaioinfo *ki; + bool ret; ki = job->userproc->p_aioinfo; AIO_LOCK(ki); - if (job->jobflags & KAIOCB_CANCELLED) { - AIO_UNLOCK(ki); + ret = aio_clear_cancel_function_locked(job); + AIO_UNLOCK(ki); + return (ret); +} + +static bool +aio_set_cancel_function_locked(struct kaiocb *job, aio_cancel_fn_t *func) +{ + + AIO_LOCK_ASSERT(job->userproc->p_aioinfo, MA_OWNED); + if (job->jobflags & KAIOCB_CANCELLED) return (false); - } job->cancel_fn = func; - AIO_UNLOCK(ki); return (true); } +bool +aio_set_cancel_function(struct kaiocb *job, aio_cancel_fn_t *func) +{ + struct kaioinfo *ki; + bool ret; + + ki = job->userproc->p_aioinfo; + AIO_LOCK(ki); + ret = aio_set_cancel_function_locked(job, func); + AIO_UNLOCK(ki); + return (ret); +} + void aio_complete(struct kaiocb *job, long status, int error) { @@ -1655,10 +1673,10 @@ aio_cancel_sync(struct kaiocb *job) struct kaioinfo *ki; ki = job->userproc->p_aioinfo; - mtx_lock(&aio_job_mtx); + AIO_LOCK(ki); if (!aio_cancel_cleared(job)) TAILQ_REMOVE(&ki->kaio_syncqueue, job, list); - mtx_unlock(&aio_job_mtx); + AIO_UNLOCK(ki); aio_cancel(job); } @@ -1718,7 +1736,8 @@ queueit: } } if (job->pending != 0) { - if (!aio_set_cancel_function(job, aio_cancel_sync)) { + if (!aio_set_cancel_function_locked(job, + aio_cancel_sync)) { AIO_UNLOCK(ki); aio_cancel(job); return (0); Modified: head/tests/sys/aio/aio_test.c ============================================================================== --- head/tests/sys/aio/aio_test.c Fri Jul 29 18:10:59 2016 (r303500) +++ head/tests/sys/aio/aio_test.c Fri Jul 29 18:26:15 2016 (r303501) @@ -924,6 +924,88 @@ ATF_TC_BODY(aio_socket_short_write_cance close(s[0]); } +/* + * This test just performs a basic test of aio_fsync(). + */ +ATF_TC_WITHOUT_HEAD(aio_fsync_test); +ATF_TC_BODY(aio_fsync_test, tc) +{ + struct aiocb synccb, *iocbp; + struct { + struct aiocb iocb; + bool done; + char *buffer; + } buffers[16]; + struct stat sb; + char pathname[PATH_MAX]; + ssize_t rval; + unsigned i; + int fd; + + ATF_REQUIRE_KERNEL_MODULE("aio"); + ATF_REQUIRE_UNSAFE_AIO(); + + strcpy(pathname, PATH_TEMPLATE); + fd = mkstemp(pathname); + ATF_REQUIRE_MSG(fd != -1, "mkstemp failed: %s", strerror(errno)); + unlink(pathname); + + ATF_REQUIRE(fstat(fd, &sb) == 0); + ATF_REQUIRE(sb.st_blksize != 0); + ATF_REQUIRE(ftruncate(fd, sb.st_blksize * nitems(buffers)) == 0); + + /* + * Queue several asynchronous write requests. Hopefully this + * forces the aio_fsync() request to be deferred. There is no + * reliable way to guarantee that however. + */ + srandomdev(); + for (i = 0; i < nitems(buffers); i++) { + buffers[i].done = false; + memset(&buffers[i].iocb, 0, sizeof(buffers[i].iocb)); + buffers[i].buffer = malloc(sb.st_blksize); + aio_fill_buffer(buffers[i].buffer, sb.st_blksize, random()); + buffers[i].iocb.aio_fildes = fd; + buffers[i].iocb.aio_buf = buffers[i].buffer; + buffers[i].iocb.aio_nbytes = sb.st_blksize; + buffers[i].iocb.aio_offset = sb.st_blksize * i; + ATF_REQUIRE(aio_write(&buffers[i].iocb) == 0); + } + + /* Queue the aio_fsync request. */ + memset(&synccb, 0, sizeof(synccb)); + synccb.aio_fildes = fd; + ATF_REQUIRE(aio_fsync(O_SYNC, &synccb) == 0); + + /* Wait for requests to complete. */ + for (;;) { + next: + rval = aio_waitcomplete(&iocbp, NULL); + ATF_REQUIRE(iocbp != NULL); + if (iocbp == &synccb) { + ATF_REQUIRE(rval == 0); + break; + } + + for (i = 0; i < nitems(buffers); i++) { + if (iocbp == &buffers[i].iocb) { + ATF_REQUIRE(buffers[i].done == false); + ATF_REQUIRE(rval == sb.st_blksize); + buffers[i].done = true; + goto next; + } + } + + ATF_REQUIRE_MSG(false, "unmatched AIO request"); + } + + for (i = 0; i < nitems(buffers); i++) + ATF_REQUIRE_MSG(buffers[i].done, + "AIO request %u did not complete", i); + + close(fd); +} + ATF_TP_ADD_TCS(tp) { @@ -937,6 +1019,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, aio_socket_two_reads); ATF_TP_ADD_TC(tp, aio_socket_blocking_short_write); ATF_TP_ADD_TC(tp, aio_socket_short_write_cancel); + ATF_TP_ADD_TC(tp, aio_fsync_test); return (atf_no_error()); } From owner-svn-src-all@freebsd.org Fri Jul 29 18:27:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95535BA7986; Fri, 29 Jul 2016 18:27:30 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 73DD711C8; Fri, 29 Jul 2016 18:27:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 888DCB945; Fri, 29 Jul 2016 14:27:29 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303501 - in head: sys/kern tests/sys/aio Date: Fri, 29 Jul 2016 11:27:25 -0700 Message-ID: <1511522.uQBgSzC5yd@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201607291826.u6TIQFlM009123@repo.freebsd.org> References: <201607291826.u6TIQFlM009123@repo.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, 29 Jul 2016 14:27:29 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 18:27:30 -0000 On Friday, July 29, 2016 06:26:15 PM John Baldwin wrote: > Author: jhb > Date: Fri Jul 29 18:26:15 2016 > New Revision: 303501 > URL: https://svnweb.freebsd.org/changeset/base/303501 > > Log: > Fix locking issues with aio_fsync(). > > - Use correct lock in aio_cancel_sync when dequeueing job. > - Add _locked variants of aio_set/clear_cancel_function and use those > to avoid lock recursion when adding and removing fsync jobs to the > per-process sync queue. > - While here, add a basic test for aio_fsync(). > > PR: 211390 > Reported by: Randy Westlund > MFC after: 1 week > Sponsored by: Chelsio Communications > Differential Revision: https://reviews.freebsd.org/D7339 Oops, missed: Reviewed by: kib -- John Baldwin From owner-svn-src-all@freebsd.org Fri Jul 29 19:36:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 502A3BA8EBD; Fri, 29 Jul 2016 19:36:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27B15175D; Fri, 29 Jul 2016 19:36:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TJaB9I035135; Fri, 29 Jul 2016 19:36:11 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TJaALj035130; Fri, 29 Jul 2016 19:36:10 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607291936.u6TJaALj035130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 29 Jul 2016 19:36:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303502 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 19:36:12 -0000 Author: pfg Date: Fri Jul 29 19:36:10 2016 New Revision: 303502 URL: https://svnweb.freebsd.org/changeset/base/303502 Log: indent(1): Use NULL instead of zero for pointers. Modified: head/usr.bin/indent/args.c head/usr.bin/indent/indent.c head/usr.bin/indent/io.c head/usr.bin/indent/lexi.c head/usr.bin/indent/pr_comment.c Modified: head/usr.bin/indent/args.c ============================================================================== --- head/usr.bin/indent/args.c Fri Jul 29 18:26:15 2016 (r303501) +++ head/usr.bin/indent/args.c Fri Jul 29 19:36:10 2016 (r303502) @@ -280,9 +280,9 @@ found: break; case STDIN: - if (input == 0) + if (input == NULL) input = stdin; - if (output == 0) + if (output == NULL) output = stdout; break; Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Fri Jul 29 18:26:15 2016 (r303501) +++ head/usr.bin/indent/indent.c Fri Jul 29 19:36:10 2016 (r303502) @@ -147,11 +147,11 @@ main(int argc, char **argv) scase = ps.pcase = false; squest = 0; - sc_end = 0; - bp_save = 0; - be_save = 0; + sc_end = NULL; + bp_save = NULL; + be_save = NULL; - output = 0; + output = NULL; tabs_to_var = 0; /*--------------------------------------------------*\ @@ -328,7 +328,7 @@ main(int argc, char **argv) case lbrace: /* this is a brace that starts the compound * stmt */ - if (sc_end == 0) { /* ignore buffering if a comment wasn't + if (sc_end == NULL) { /* ignore buffering if a comment wasn't * stored up */ ps.search_brace = false; goto check_type; @@ -341,8 +341,8 @@ main(int argc, char **argv) } case comment: /* we have a comment, so we must copy it into * the buffer */ - if (!flushed_nl || sc_end != 0) { - if (sc_end == 0) { /* if this is the first comment, we + if (!flushed_nl || sc_end != NULL) { + if (sc_end == NULL) { /* if this is the first comment, we * must set up the buffer */ save_com[0] = save_com[1] = ' '; sc_end = &(save_com[2]); @@ -386,7 +386,7 @@ main(int argc, char **argv) && e_code != s_code && e_code[-1] == '}')) force_nl = false; - if (sc_end == 0) { /* ignore buffering if comment wasn't + if (sc_end == NULL) { /* ignore buffering if comment wasn't * saved up */ ps.search_brace = false; goto check_type; @@ -417,7 +417,7 @@ main(int argc, char **argv) * save_com */ *sc_end++ = ' ';/* add trailing blank, just in case */ buf_end = sc_end; - sc_end = 0; + sc_end = NULL; break; } /* end of switch */ if (type_code != 0) /* we must make this check, just in case there @@ -1101,9 +1101,9 @@ check_type: while (e_lab > s_lab && (e_lab[-1] == ' ' || e_lab[-1] == '\t')) e_lab--; - if (e_lab - s_lab == com_end && bp_save == 0) { /* comment on - * preprocessor line */ - if (sc_end == 0) /* if this is the first comment, we + /* comment on preprocessor line */ + if (e_lab - s_lab == com_end && bp_save == NULL) { + if (sc_end == NULL) /* if this is the first comment, we * must set up the buffer */ sc_end = &(save_com[0]); else { @@ -1126,7 +1126,7 @@ check_type: * save_com */ *sc_end++ = ' '; /* add trailing blank, just in case */ buf_end = sc_end; - sc_end = 0; + sc_end = NULL; } *e_lab = '\0'; /* null terminate line */ ps.pcase = false; Modified: head/usr.bin/indent/io.c ============================================================================== --- head/usr.bin/indent/io.c Fri Jul 29 18:26:15 2016 (r303501) +++ head/usr.bin/indent/io.c Fri Jul 29 19:36:10 2016 (r303502) @@ -348,10 +348,10 @@ fill_buffer(void) int i; FILE *f = input; - if (bp_save != 0) { /* there is a partly filled input buffer left */ + if (bp_save != NULL) { /* there is a partly filled input buffer left */ buf_ptr = bp_save; /* dont read anything, just switch buffers */ buf_end = be_save; - bp_save = be_save = 0; + bp_save = be_save = NULL; if (buf_ptr < buf_end) return; /* only return if there is really something in * this buffer */ Modified: head/usr.bin/indent/lexi.c ============================================================================== --- head/usr.bin/indent/lexi.c Fri Jul 29 18:26:15 2016 (r303501) +++ head/usr.bin/indent/lexi.c Fri Jul 29 19:36:10 2016 (r303502) @@ -262,7 +262,7 @@ lexi(void) /* * This loop will check if the token is a keyword. */ - for (p = specials; (j = p->rwd) != 0; p++) { + for (p = specials; (j = p->rwd) != NULL; p++) { const char *q = s_token; /* point at scanned token */ if (*j++ != *q++ || *j++ != *q++) continue; /* This test depends on the fact that @@ -601,6 +601,6 @@ addkey(char *key, int val) * ignored */ p->rwd = key; p->rwcode = val; - p[1].rwd = 0; + p[1].rwd = NULL; p[1].rwcode = 0; } Modified: head/usr.bin/indent/pr_comment.c ============================================================================== --- head/usr.bin/indent/pr_comment.c Fri Jul 29 18:26:15 2016 (r303501) +++ head/usr.bin/indent/pr_comment.c Fri Jul 29 19:36:10 2016 (r303502) @@ -100,7 +100,7 @@ pr_comment(void) int one_liner = 1; /* true iff this comment is a one-liner */ adj_max_col = max_col; ps.just_saw_decl = 0; - last_bl = 0; /* no blanks found so far */ + last_bl = NULL; /* no blanks found so far */ ps.box_com = false; /* at first, assume that we are not in * a boxed comment or some other * comment that should not be touched */ @@ -196,7 +196,7 @@ pr_comment(void) ps.use_ff = true; /* fix so dump_line uses a form feed */ dump_line(); - last_bl = 0; + last_bl = NULL; *e_com++ = ' '; *e_com++ = '*'; *e_com++ = ' '; @@ -392,7 +392,7 @@ pr_comment(void) e_com = t; s_com[0] = s_com[1] = s_com[2] = ' '; } - if (last_bl == 0) { /* we have seen no blanks */ + if (last_bl == NULL) { /* we have seen no blanks */ last_bl = e_com; /* fake it */ *e_com++ = ' '; } @@ -408,7 +408,7 @@ pr_comment(void) *e_com++ = ' '; t_ptr = last_bl + 1; - last_bl = 0; + last_bl = NULL; if (t_ptr >= e_com) { while (*t_ptr == ' ' || *t_ptr == '\t') t_ptr++; From owner-svn-src-all@freebsd.org Fri Jul 29 20:19:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2E69BA8AE6; Fri, 29 Jul 2016 20:19:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A39B21355; Fri, 29 Jul 2016 20:19:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TKJEf2050272; Fri, 29 Jul 2016 20:19:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TKJE98050271; Fri, 29 Jul 2016 20:19:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607292019.u6TKJE98050271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 29 Jul 2016 20:19:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303503 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 20:19:15 -0000 Author: jhb Date: Fri Jul 29 20:19:14 2016 New Revision: 303503 URL: https://svnweb.freebsd.org/changeset/base/303503 Log: Don't treat NOCPU as a valid CPU to CPU_ISSET. If a thread is created bound to a cpuset it might already be bound before it's very first timeslice, and td_lastcpu will be NOCPU in that case. MFC after: 1 week Modified: head/sys/kern/sched_4bsd.c Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Fri Jul 29 19:36:10 2016 (r303502) +++ head/sys/kern/sched_4bsd.c Fri Jul 29 20:19:14 2016 (r303503) @@ -1241,7 +1241,7 @@ sched_pickcpu(struct thread *td) mtx_assert(&sched_lock, MA_OWNED); - if (THREAD_CAN_SCHED(td, td->td_lastcpu)) + if (td->td_lastcpu != NOCPU && THREAD_CAN_SCHED(td, td->td_lastcpu)) best = td->td_lastcpu; else best = NOCPU; From owner-svn-src-all@freebsd.org Fri Jul 29 20:33:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81CEFBA8FA8; Fri, 29 Jul 2016 20:33:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38F071C7F; Fri, 29 Jul 2016 20:33:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TKXhEi057257; Fri, 29 Jul 2016 20:33:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TKXhBa057256; Fri, 29 Jul 2016 20:33:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607292033.u6TKXhBa057256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 29 Jul 2016 20:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303504 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 20:33:44 -0000 Author: markj Date: Fri Jul 29 20:33:43 2016 New Revision: 303504 URL: https://svnweb.freebsd.org/changeset/base/303504 Log: sdp: Remove Linux build files. They aren't useful here, and Linux seems to have largely abandoned SDP anyway. Sponsored by: EMC / Isilon Storage Division Deleted: head/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig head/sys/ofed/drivers/infiniband/ulp/sdp/Makefile From owner-svn-src-all@freebsd.org Fri Jul 29 20:35:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 632BCBA80E1; Fri, 29 Jul 2016 20:35:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 170FF1E36; Fri, 29 Jul 2016 20:35:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TKZ518057366; Fri, 29 Jul 2016 20:35:05 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TKZ4n8057363; Fri, 29 Jul 2016 20:35:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607292035.u6TKZ4n8057363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 29 Jul 2016 20:35:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303505 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 20:35:06 -0000 Author: markj Date: Fri Jul 29 20:35:04 2016 New Revision: 303505 URL: https://svnweb.freebsd.org/changeset/base/303505 Log: sdp: Use an mbufq for received control packets. This is simpler than the hand-rolled queue, and fixes a use-after-free. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Fri Jul 29 20:33:43 2016 (r303504) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Fri Jul 29 20:35:04 2016 (r303505) @@ -403,8 +403,7 @@ struct sdp_sock { struct sdp_rx_ring rx_ring; struct sdp_tx_ring tx_ring; struct rwlock lock; - struct mbuf *rx_ctl_q; - struct mbuf *rx_ctl_tail; + struct mbufq rxctlq; /* received control packets */ int qp_active; /* XXX Flag. */ int max_sge; Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Fri Jul 29 20:33:43 2016 (r303504) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Fri Jul 29 20:35:04 2016 (r303505) @@ -469,6 +469,7 @@ sdp_attach(struct socket *so, int proto, ssk->flags = 0; ssk->qp_active = 0; ssk->state = TCPS_CLOSED; + mbufq_init(&ssk->rxctlq, INT_MAX); SDP_LIST_WLOCK(); LIST_INSERT_HEAD(&sdp_list, ssk, list); sdp_count++; Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Fri Jul 29 20:33:43 2016 (r303504) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Fri Jul 29 20:35:04 2016 (r303505) @@ -459,14 +459,9 @@ sdp_process_rx_mb(struct sdp_sock *ssk, ntohl(rrch->len)); } #endif - mb->m_nextpkt = NULL; - if (ssk->rx_ctl_tail) - ssk->rx_ctl_tail->m_nextpkt = mb; - else - ssk->rx_ctl_q = mb; - ssk->rx_ctl_tail = mb; - - return 0; + if (mbufq_enqueue(&ssk->rxctlq, mb) != 0) + m_freem(mb); + return (0); } sdp_prf1(sk, NULL, "queueing %s mb\n", mid2str(h->mid)); @@ -611,11 +606,8 @@ sdp_do_posts(struct sdp_sock *ssk) return; } - while ((mb = ssk->rx_ctl_q)) { - ssk->rx_ctl_q = mb->m_nextpkt; - mb->m_nextpkt = NULL; + while ((mb = mbufq_dequeue(&ssk->rxctlq)) != NULL) sdp_process_rx_ctl_mb(ssk, mb); - } if (ssk->state == TCPS_TIME_WAIT) return; From owner-svn-src-all@freebsd.org Fri Jul 29 20:36:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 265FBBA8179; Fri, 29 Jul 2016 20:36:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EADEF1FD6; Fri, 29 Jul 2016 20:36:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TKa2aI057449; Fri, 29 Jul 2016 20:36:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TKa2lX057448; Fri, 29 Jul 2016 20:36:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607292036.u6TKa2lX057448@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 29 Jul 2016 20:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303506 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 20:36:03 -0000 Author: markj Date: Fri Jul 29 20:36:01 2016 New Revision: 303506 URL: https://svnweb.freebsd.org/changeset/base/303506 Log: sdp: Destroy the PCB lock before freeing to the zone. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Fri Jul 29 20:35:04 2016 (r303505) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Fri Jul 29 20:36:01 2016 (r303506) @@ -176,8 +176,8 @@ sdp_pcbfree(struct sdp_sock *ssk) sdp_tx_ring_destroy(ssk); sdp_rx_ring_destroy(ssk); rw_destroy(&ssk->rx_ring.destroyed_lock); - uma_zfree(sdp_zone, ssk); rw_destroy(&ssk->lock); + uma_zfree(sdp_zone, ssk); } /* From owner-svn-src-all@freebsd.org Fri Jul 29 20:39:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3B35BA82C9; Fri, 29 Jul 2016 20:39:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7034F13DB; Fri, 29 Jul 2016 20:39:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TKdWN4057836; Fri, 29 Jul 2016 20:39:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TKdWkA057835; Fri, 29 Jul 2016 20:39:32 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607292039.u6TKdWkA057835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 29 Jul 2016 20:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303507 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 20:39:33 -0000 Author: markj Date: Fri Jul 29 20:39:32 2016 New Revision: 303507 URL: https://svnweb.freebsd.org/changeset/base/303507 Log: sdp: Use the PCB as the rx completion handler argument. The generic socket may be detached from the PCB before the completion queue is drained and destroyed, so this change closes a race condition in connection teardown. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Fri Jul 29 20:36:01 2016 (r303506) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Fri Jul 29 20:39:32 2016 (r303507) @@ -665,13 +665,10 @@ sdp_process_rx(struct sdp_sock *ssk) static void sdp_rx_irq(struct ib_cq *cq, void *cq_context) { - struct socket *sk = cq_context; - struct sdp_sock *ssk = sdp_sk(sk); + struct sdp_sock *ssk; - if (cq != ssk->rx_ring.cq) { - sdp_dbg(sk, "cq = %p, ssk->cq = %p\n", cq, ssk->rx_ring.cq); - return; - } + ssk = cq_context; + KASSERT(cq == ssk->rx_ring.cq, ("%s: mismatched cq on %p", ssk)); SDPSTATS_COUNTER_INC(rx_int_count); @@ -728,7 +725,7 @@ sdp_rx_ring_create(struct sdp_sock *ssk, } rx_cq = ib_create_cq(device, sdp_rx_irq, sdp_rx_cq_event_handler, - ssk->socket, SDP_RX_SIZE, 0); + ssk, SDP_RX_SIZE, 0); if (IS_ERR(rx_cq)) { rc = PTR_ERR(rx_cq); From owner-svn-src-all@freebsd.org Fri Jul 29 20:48:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 578DABA84CE; Fri, 29 Jul 2016 20:48:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D2271988; Fri, 29 Jul 2016 20:48:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TKmgtd061407; Fri, 29 Jul 2016 20:48:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TKmgRY061406; Fri, 29 Jul 2016 20:48:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607292048.u6TKmgRY061406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 29 Jul 2016 20:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303508 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 20:48:43 -0000 Author: markj Date: Fri Jul 29 20:48:42 2016 New Revision: 303508 URL: https://svnweb.freebsd.org/changeset/base/303508 Log: Fix the KASSERT format string arguments after r303507. Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Fri Jul 29 20:39:32 2016 (r303507) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Fri Jul 29 20:48:42 2016 (r303508) @@ -668,7 +668,8 @@ sdp_rx_irq(struct ib_cq *cq, void *cq_co struct sdp_sock *ssk; ssk = cq_context; - KASSERT(cq == ssk->rx_ring.cq, ("%s: mismatched cq on %p", ssk)); + KASSERT(cq == ssk->rx_ring.cq, + ("%s: mismatched cq on %p", __func__, ssk)); SDPSTATS_COUNTER_INC(rx_int_count); From owner-svn-src-all@freebsd.org Fri Jul 29 20:51:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB51EBA8570; Fri, 29 Jul 2016 20:51:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FFD91C5A; Fri, 29 Jul 2016 20:51:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TKpqj7062213; Fri, 29 Jul 2016 20:51:52 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TKpqBY062212; Fri, 29 Jul 2016 20:51:52 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607292051.u6TKpqBY062212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 29 Jul 2016 20:51:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303509 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 20:51:53 -0000 Author: markj Date: Fri Jul 29 20:51:52 2016 New Revision: 303509 URL: https://svnweb.freebsd.org/changeset/base/303509 Log: sdp: Always free received control packets after they're handled. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Fri Jul 29 20:48:42 2016 (r303508) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Fri Jul 29 20:51:52 2016 (r303509) @@ -319,14 +319,14 @@ sdp_recv_completion(struct sdp_sock *ssk return mb; } -/* socket lock should be taken before calling this */ -static int +static void sdp_process_rx_ctl_mb(struct sdp_sock *ssk, struct mbuf *mb) { struct sdp_bsdh *h; struct socket *sk; SDP_WLOCK_ASSERT(ssk); + sk = ssk->socket; h = mtod(mb, struct sdp_bsdh *); switch (h->mid) { @@ -339,16 +339,13 @@ sdp_process_rx_ctl_mb(struct sdp_sock *s sdp_dbg(sk, "RX data when state = FIN_WAIT1\n"); sdp_notify(ssk, ECONNRESET); } - m_freem(mb); break; #ifdef SDP_ZCOPY case SDP_MID_RDMARDCOMPL: - m_freem(mb); break; case SDP_MID_SENDSM: sdp_handle_sendsm(ssk, ntohl(h->mseq_ack)); - m_freem(mb); break; case SDP_MID_SRCAVAIL_CANCEL: sdp_dbg_data(sk, "Handling SrcAvailCancel\n"); @@ -362,7 +359,6 @@ sdp_process_rx_ctl_mb(struct sdp_sock *s sdp_dbg(sk, "Got SrcAvailCancel - " "but no SrcAvail in process\n"); } - m_freem(mb); break; case SDP_MID_SINKAVAIL: sdp_dbg_data(sk, "Got SinkAvail - not supported: ignored\n"); @@ -373,7 +369,6 @@ sdp_process_rx_ctl_mb(struct sdp_sock *s sdp_dbg_data(sk, "Handling ABORT\n"); sdp_prf(sk, NULL, "Handling ABORT"); sdp_notify(ssk, ECONNRESET); - m_freem(mb); break; case SDP_MID_DISCONN: sdp_dbg_data(sk, "Handling DISCONN\n"); @@ -383,20 +378,17 @@ sdp_process_rx_ctl_mb(struct sdp_sock *s case SDP_MID_CHRCVBUF: sdp_dbg_data(sk, "Handling RX CHRCVBUF\n"); sdp_handle_resize_request(ssk, (struct sdp_chrecvbuf *)(h+1)); - m_freem(mb); break; case SDP_MID_CHRCVBUF_ACK: sdp_dbg_data(sk, "Handling RX CHRCVBUF_ACK\n"); sdp_handle_resize_ack(ssk, (struct sdp_chrecvbuf *)(h+1)); - m_freem(mb); break; default: /* TODO: Handle other messages */ sdp_warn(sk, "SDP: FIXME MID %d\n", h->mid); - m_freem(mb); + break; } - - return 0; + m_freem(mb); } static int From owner-svn-src-all@freebsd.org Fri Jul 29 20:52:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66077BA8658; Fri, 29 Jul 2016 20:52:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32D741ECD; Fri, 29 Jul 2016 20:52:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TKqIda065039; Fri, 29 Jul 2016 20:52:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TKqIw7065038; Fri, 29 Jul 2016 20:52:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607292052.u6TKqIw7065038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 29 Jul 2016 20:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303510 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 20:52:19 -0000 Author: mav Date: Fri Jul 29 20:52:18 2016 New Revision: 303510 URL: https://svnweb.freebsd.org/changeset/base/303510 Log: Clear scratchpad after MSIX negotiation to not leak garbage. Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Fri Jul 29 20:51:52 2016 (r303509) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Fri Jul 29 20:52:18 2016 (r303510) @@ -2649,6 +2649,7 @@ msix_done: if (val != NTB_MSIX_RECEIVED) goto reschedule; + intel_ntb_spad_clear(ntb->device); ntb->peer_msix_good = true; /* Give peer time to see our NTB_MSIX_RECEIVED. */ goto reschedule; From owner-svn-src-all@freebsd.org Fri Jul 29 20:54:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FD20BA8706; Fri, 29 Jul 2016 20:54:45 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6AE51230; Fri, 29 Jul 2016 20:54:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TKsicW065156; Fri, 29 Jul 2016 20:54:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TKsiV4065155; Fri, 29 Jul 2016 20:54:44 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607292054.u6TKsiV4065155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 29 Jul 2016 20:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303511 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 20:54:45 -0000 Author: markj Date: Fri Jul 29 20:54:43 2016 New Revision: 303511 URL: https://svnweb.freebsd.org/changeset/base/303511 Log: sdp: Use the correct socket buffer in sdp_post_recvs_needed(). Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Fri Jul 29 20:52:18 2016 (r303510) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Fri Jul 29 20:54:43 2016 (r303511) @@ -175,7 +175,7 @@ sdp_post_recvs_needed(struct sdp_sock *s return 1; buffer_size = ssk->recv_bytes; - max_bytes = max(ssk->socket->so_snd.sb_hiwat, + max_bytes = max(ssk->socket->so_rcv.sb_hiwat, (1 + SDP_MIN_TX_CREDITS) * buffer_size); max_bytes *= rcvbuf_scale; /* From owner-svn-src-all@freebsd.org Fri Jul 29 21:01:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE176BA88B6; Fri, 29 Jul 2016 21:01:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F65B14FD; Fri, 29 Jul 2016 21:01:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TL1420068222; Fri, 29 Jul 2016 21:01:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TL1476068218; Fri, 29 Jul 2016 21:01:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607292101.u6TL1476068218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 29 Jul 2016 21:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303512 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 21:01:06 -0000 Author: markj Date: Fri Jul 29 21:01:04 2016 New Revision: 303512 URL: https://svnweb.freebsd.org/changeset/base/303512 Log: sdp: Use malloc(9) instead of the Linux compat layer. SDP transmit and receive rings are always created in a sleepable context, so we can use M_WAITOK and remove error checks. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Fri Jul 29 20:54:43 2016 (r303511) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Fri Jul 29 21:01:04 2016 (r303512) @@ -455,6 +455,8 @@ struct sdp_sock { #define SDP_RLOCK_ASSERT(ssk) rw_assert(&(ssk)->lock, RA_RLOCKED) #define SDP_LOCK_ASSERT(ssk) rw_assert(&(ssk)->lock, RA_LOCKED) +MALLOC_DECLARE(M_SDP); + static inline void tx_sa_reset(struct tx_srcavail_state *tx_sa) { memset((void *)&tx_sa->busy, 0, Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Fri Jul 29 20:54:43 2016 (r303511) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Fri Jul 29 21:01:04 2016 (r303512) @@ -64,6 +64,10 @@ #include __FBSDID("$FreeBSD$"); +#include +#include +#include + #include "sdp.h" #include @@ -86,7 +90,7 @@ RW_SYSINIT(sdplockinit, &sdp_lock, "SDP #define SDP_LIST_RLOCK_ASSERT() rw_assert(&sdp_lock, RW_RLOCKED) #define SDP_LIST_LOCK_ASSERT() rw_assert(&sdp_lock, RW_LOCKED) -static MALLOC_DEFINE(M_SDP, "sdp", "Socket Direct Protocol"); +MALLOC_DEFINE(M_SDP, "sdp", "Sockets Direct Protocol"); static void sdp_stop_keepalive_timer(struct socket *so); Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Fri Jul 29 20:54:43 2016 (r303511) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Fri Jul 29 21:01:04 2016 (r303512) @@ -701,25 +701,16 @@ sdp_rx_ring_create(struct sdp_sock *ssk, struct ib_cq *rx_cq; int rc = 0; - sdp_dbg(ssk->socket, "rx ring created"); INIT_WORK(&ssk->rx_comp_work, sdp_rx_comp_work); atomic_set(&ssk->rx_ring.head, 1); atomic_set(&ssk->rx_ring.tail, 1); - ssk->rx_ring.buffer = kmalloc( - sizeof *ssk->rx_ring.buffer * SDP_RX_SIZE, GFP_KERNEL); - if (!ssk->rx_ring.buffer) { - sdp_warn(ssk->socket, - "Unable to allocate RX Ring size %zd.\n", - sizeof(*ssk->rx_ring.buffer) * SDP_RX_SIZE); - - return -ENOMEM; - } + ssk->rx_ring.buffer = malloc(sizeof(*ssk->rx_ring.buffer) * SDP_RX_SIZE, + M_SDP, M_WAITOK); rx_cq = ib_create_cq(device, sdp_rx_irq, sdp_rx_cq_event_handler, ssk, SDP_RX_SIZE, 0); - if (IS_ERR(rx_cq)) { rc = PTR_ERR(rx_cq); sdp_warn(ssk->socket, "Unable to allocate RX CQ: %d.\n", rc); @@ -732,7 +723,7 @@ sdp_rx_ring_create(struct sdp_sock *ssk, return 0; err_cq: - kfree(ssk->rx_ring.buffer); + free(ssk->rx_ring.buffer, M_SDP); ssk->rx_ring.buffer = NULL; return rc; } @@ -746,8 +737,7 @@ sdp_rx_ring_destroy(struct sdp_sock *ssk if (ssk->rx_ring.buffer) { sdp_rx_ring_purge(ssk); - - kfree(ssk->rx_ring.buffer); + free(ssk->rx_ring.buffer, M_SDP); ssk->rx_ring.buffer = NULL; } Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c Fri Jul 29 20:54:43 2016 (r303511) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c Fri Jul 29 21:01:04 2016 (r303512) @@ -427,19 +427,11 @@ sdp_tx_ring_create(struct sdp_sock *ssk, atomic_set(&ssk->tx_ring.head, 1); atomic_set(&ssk->tx_ring.tail, 1); - ssk->tx_ring.buffer = kzalloc( - sizeof *ssk->tx_ring.buffer * SDP_TX_SIZE, GFP_KERNEL); - if (!ssk->tx_ring.buffer) { - rc = -ENOMEM; - sdp_warn(ssk->socket, "Can't allocate TX Ring size %zd.\n", - sizeof(*ssk->tx_ring.buffer) * SDP_TX_SIZE); - - goto out; - } + ssk->tx_ring.buffer = malloc(sizeof(*ssk->tx_ring.buffer) * SDP_TX_SIZE, + M_SDP, M_WAITOK); tx_cq = ib_create_cq(device, sdp_tx_irq, sdp_tx_cq_event_handler, ssk, SDP_TX_SIZE, 0); - if (IS_ERR(tx_cq)) { rc = PTR_ERR(tx_cq); sdp_warn(ssk->socket, "Unable to allocate TX CQ: %d.\n", rc); @@ -452,9 +444,8 @@ sdp_tx_ring_create(struct sdp_sock *ssk, return 0; err_cq: - kfree(ssk->tx_ring.buffer); + free(ssk->tx_ring.buffer, M_SDP); ssk->tx_ring.buffer = NULL; -out: return rc; } @@ -472,8 +463,7 @@ sdp_tx_ring_destroy(struct sdp_sock *ssk if (ssk->tx_ring.buffer) { sdp_tx_ring_purge(ssk); - - kfree(ssk->tx_ring.buffer); + free(ssk->tx_ring.buffer, M_SDP); ssk->tx_ring.buffer = NULL; } From owner-svn-src-all@freebsd.org Fri Jul 29 21:03:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EABCBA895B; Fri, 29 Jul 2016 21:03:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EEEE1943; Fri, 29 Jul 2016 21:03:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TL323O068978; Fri, 29 Jul 2016 21:03:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TL32ov068977; Fri, 29 Jul 2016 21:03:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607292103.u6TL32ov068977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 29 Jul 2016 21:03:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303513 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 21:03:03 -0000 Author: markj Date: Fri Jul 29 21:03:02 2016 New Revision: 303513 URL: https://svnweb.freebsd.org/changeset/base/303513 Log: sdp: Destroy the RDMA ID after destroying the connection's queue pair. This is the ordering documented by rdma_destroy_qp(). Also add a useful KASSERT to sdp_pcbfree(). Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Fri Jul 29 21:01:04 2016 (r303512) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Fri Jul 29 21:03:02 2016 (r303513) @@ -160,7 +160,10 @@ sdp_pcbbind(struct sdp_sock *ssk, struct static void sdp_pcbfree(struct sdp_sock *ssk) { + KASSERT(ssk->socket == NULL, ("ssk %p socket still attached", ssk)); + KASSERT((ssk->flags & SDP_DESTROY) == 0, + ("ssk %p already destroyed", ssk)); sdp_dbg(ssk->socket, "Freeing pcb"); SDP_WLOCK_ASSERT(ssk); @@ -171,7 +174,6 @@ sdp_pcbfree(struct sdp_sock *ssk) LIST_REMOVE(ssk, list); SDP_LIST_WUNLOCK(); crfree(ssk->cred); - sdp_destroy_cma(ssk); ssk->qp_active = 0; if (ssk->qp) { ib_destroy_qp(ssk->qp); @@ -179,6 +181,7 @@ sdp_pcbfree(struct sdp_sock *ssk) } sdp_tx_ring_destroy(ssk); sdp_rx_ring_destroy(ssk); + sdp_destroy_cma(ssk); rw_destroy(&ssk->rx_ring.destroyed_lock); rw_destroy(&ssk->lock); uma_zfree(sdp_zone, ssk); From owner-svn-src-all@freebsd.org Fri Jul 29 21:03:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBE78BA89B3; Fri, 29 Jul 2016 21:03:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3CCF1ABB; Fri, 29 Jul 2016 21:03:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TL3UgI069043; Fri, 29 Jul 2016 21:03:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TL3ULp069042; Fri, 29 Jul 2016 21:03:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607292103.u6TL3ULp069042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 29 Jul 2016 21:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303514 - head/sys/dev/ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 21:03:32 -0000 Author: mav Date: Fri Jul 29 21:03:30 2016 New Revision: 303514 URL: https://svnweb.freebsd.org/changeset/base/303514 Log: Fix NTBT_QP_LINKS negotiation. I believe it never worked correctly for more the one queue even in Linux. This fixes case when one of consumer drivers is not loaded on one side, but its queues still announced as ready if something else brought link up. While there, remove some pointless NULL checks. Modified: head/sys/dev/ntb/ntb_transport.c Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Fri Jul 29 21:03:02 2016 (r303513) +++ head/sys/dev/ntb/ntb_transport.c Fri Jul 29 21:03:30 2016 (r303514) @@ -572,9 +572,6 @@ ntb_transport_free_queue(struct ntb_tran struct ntb_transport_ctx *nt = qp->transport; struct ntb_queue_entry *entry; - if (qp == NULL) - return; - callout_drain(&qp->link_work); ntb_db_set_mask(qp->dev, 1ull << qp->qp_num); @@ -694,7 +691,7 @@ ntb_transport_tx_enqueue(struct ntb_tran struct ntb_queue_entry *entry; int rc; - if (qp == NULL || !qp->link_is_up || len == 0) { + if (!qp->link_is_up || len == 0) { CTR0(KTR_NTB, "TX: link not up"); return (EINVAL); } @@ -1059,11 +1056,9 @@ ntb_transport_link_work(void *arg) size >> 32); ntb_peer_spad_write(dev, NTBT_MW0_SZ_LOW + (i * 2), size); } - ntb_peer_spad_write(dev, NTBT_NUM_MWS, nt->mw_count); - ntb_peer_spad_write(dev, NTBT_NUM_QPS, nt->qp_count); - + ntb_peer_spad_write(dev, NTBT_QP_LINKS, 0); ntb_peer_spad_write(dev, NTBT_VERSION, NTB_TRANSPORT_VERSION); /* Query the remote side for its info */ @@ -1245,16 +1240,18 @@ ntb_qp_link_work(void *arg) struct ntb_transport_qp *qp = arg; device_t dev = qp->dev; struct ntb_transport_ctx *nt = qp->transport; - uint32_t val, dummy; - - ntb_spad_read(dev, NTBT_QP_LINKS, &val); - - ntb_peer_spad_write(dev, NTBT_QP_LINKS, val | (1ull << qp->qp_num)); + int i; + uint32_t val; - /* query remote spad for qp ready bits */ - ntb_peer_spad_read(dev, NTBT_QP_LINKS, &dummy); + /* Report queues that are up on our side */ + for (i = 0, val = 0; i < nt->qp_count; i++) { + if (nt->qp_vec[i].client_ready) + val |= (1 << i); + } + ntb_peer_spad_write(dev, NTBT_QP_LINKS, val); /* See if the remote side is up */ + ntb_spad_read(dev, NTBT_QP_LINKS, &val); if ((val & (1ull << qp->qp_num)) != 0) { ntb_printf(2, "qp %d link up\n", qp->qp_num); qp->link_is_up = true; @@ -1350,17 +1347,16 @@ ntb_qp_link_cleanup(struct ntb_transport void ntb_transport_link_down(struct ntb_transport_qp *qp) { + struct ntb_transport_ctx *nt = qp->transport; + int i; uint32_t val; - if (qp == NULL) - return; - qp->client_ready = false; - - ntb_spad_read(qp->dev, NTBT_QP_LINKS, &val); - - ntb_peer_spad_write(qp->dev, NTBT_QP_LINKS, - val & ~(1 << qp->qp_num)); + for (i = 0, val = 0; i < nt->qp_count; i++) { + if (nt->qp_vec[i].client_ready) + val |= (1 << i); + } + ntb_peer_spad_write(qp->dev, NTBT_QP_LINKS, val); if (qp->link_is_up) ntb_send_link_down(qp); @@ -1379,8 +1375,6 @@ ntb_transport_link_down(struct ntb_trans bool ntb_transport_link_query(struct ntb_transport_qp *qp) { - if (qp == NULL) - return (false); return (qp->link_is_up); } @@ -1479,8 +1473,6 @@ out: */ unsigned char ntb_transport_qp_num(struct ntb_transport_qp *qp) { - if (qp == NULL) - return 0; return (qp->qp_num); } @@ -1497,9 +1489,6 @@ unsigned int ntb_transport_max_size(struct ntb_transport_qp *qp) { - if (qp == NULL) - return (0); - return (qp->tx_max_frame - sizeof(struct ntb_payload_header)); } From owner-svn-src-all@freebsd.org Fri Jul 29 21:05:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48D64BA8A12; Fri, 29 Jul 2016 21:05:18 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15A761C68; Fri, 29 Jul 2016 21:05:18 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TL5HZ6069152; Fri, 29 Jul 2016 21:05:17 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TL5HYY069151; Fri, 29 Jul 2016 21:05:17 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201607292105.u6TL5HYY069151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 29 Jul 2016 21:05:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303515 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 21:05:18 -0000 Author: lidl Date: Fri Jul 29 21:05:17 2016 New Revision: 303515 URL: https://svnweb.freebsd.org/changeset/base/303515 Log: Make resizewin.1 manpage use .Fx macro Fix capitalization of "PuTTY" also. MFC after: 1 week Modified: head/usr.bin/resizewin/resizewin.1 Modified: head/usr.bin/resizewin/resizewin.1 ============================================================================== --- head/usr.bin/resizewin/resizewin.1 Fri Jul 29 21:03:30 2016 (r303514) +++ head/usr.bin/resizewin/resizewin.1 Fri Jul 29 21:05:17 2016 (r303515) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 17, 2016 +.Dd July 9, 2016 .Dt RESIZEWIN 1 .Os .Sh NAME @@ -55,10 +55,12 @@ updates the kernel's window size to matc .Pp Note that virtually all modern terninals support VT100/ANSI escape sequences, including xterm, konsole, gnome-terminal iTerm, -Terminal.app, and puTTY. +Terminal.app, and PuTTY. .Sh SEE ALSO .Xr resize 1 , .Xr stty 1 .Sh HISTORY +The .Nm -appeared in FreeBSD 11. +command first appeared in +.Fx 11 . From owner-svn-src-all@freebsd.org Fri Jul 29 21:05:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51486BA8A69; Fri, 29 Jul 2016 21:05:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2296C1DD6; Fri, 29 Jul 2016 21:05:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TL5bBv069206; Fri, 29 Jul 2016 21:05:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TL5bPs069205; Fri, 29 Jul 2016 21:05:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607292105.u6TL5bPs069205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 29 Jul 2016 21:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303516 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 21:05:38 -0000 Author: markj Date: Fri Jul 29 21:05:37 2016 New Revision: 303516 URL: https://svnweb.freebsd.org/changeset/base/303516 Log: Use vm_page_undirty() instead of manually setting a page field. Reviewed by: alc MFC after: 3 days Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Jul 29 21:05:17 2016 (r303515) +++ head/sys/vm/vm_page.c Fri Jul 29 21:05:37 2016 (r303516) @@ -3397,7 +3397,7 @@ vm_page_advise(vm_page_t m, int advice) * But we do make the page as freeable as we can without * actually taking the step of unmapping it. */ - m->dirty = 0; + vm_page_undirty(m); else if (advice != MADV_DONTNEED) return; From owner-svn-src-all@freebsd.org Fri Jul 29 21:11:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F2ADBA8CD0; Fri, 29 Jul 2016 21:11:33 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63244162D; Fri, 29 Jul 2016 21:11:33 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TLBWHv069770; Fri, 29 Jul 2016 21:11:32 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TLBWsO069768; Fri, 29 Jul 2016 21:11:32 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201607292111.u6TLBWsO069768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 29 Jul 2016 21:11:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303518 - head/contrib/blacklist/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 21:11:33 -0000 Author: lidl Date: Fri Jul 29 21:11:32 2016 New Revision: 303518 URL: https://svnweb.freebsd.org/changeset/base/303518 Log: libblacklist: Do not use %m for logging, use strerror(errno) The blacklist library can accept a function to use for logging, defaulting to vsyslog(), if no function is specified. Make the blacklist library use strerror(errno) explicitly, instead of %m, so that the passed in function does not need to support the syslog specific placeholder. This matches a change already submitted and accepted upstream. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/blacklist/lib/bl.c Modified: head/contrib/blacklist/lib/bl.c ============================================================================== --- head/contrib/blacklist/lib/bl.c Fri Jul 29 21:07:17 2016 (r303517) +++ head/contrib/blacklist/lib/bl.c Fri Jul 29 21:11:32 2016 (r303518) @@ -152,8 +152,8 @@ bl_init(bl_t b, bool srv) b->b_fd = socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK|SOCK_NOSIGPIPE, 0); if (b->b_fd == -1) { - bl_log(b->b_fun, LOG_ERR, "%s: socket failed (%m)", - __func__); + bl_log(b->b_fun, LOG_ERR, "%s: socket failed (%s)", + __func__, strerror(errno)); BL_UNLOCK(b); return -1; } @@ -200,8 +200,8 @@ bl_init(bl_t b, bool srv) */ if (b->b_connected != 1) { bl_log(b->b_fun, LOG_DEBUG, - "%s: connect failed for `%s' (%m)", - __func__, sun->sun_path); + "%s: connect failed for `%s' (%s)", + __func__, sun->sun_path, strerror(errno)); b->b_connected = 1; } BL_UNLOCK(b); @@ -220,8 +220,8 @@ bl_init(bl_t b, bool srv) errno = serrno; if (rv == -1) { bl_log(b->b_fun, LOG_ERR, - "%s: bind failed for `%s' (%m)", - __func__, sun->sun_path); + "%s: bind failed for `%s' (%s)", + __func__, sun->sun_path, strerror(errno)); goto out; } } @@ -260,7 +260,8 @@ bl_init(bl_t b, bool srv) if (setsockopt(b->b_fd, CRED_LEVEL, CRED_NAME, &one, (socklen_t)sizeof(one)) == -1) { bl_log(b->b_fun, LOG_ERR, "%s: setsockopt %s " - "failed (%m)", __func__, __STRING(CRED_NAME)); + "failed (%s)", __func__, __STRING(CRED_NAME), + strerror(errno)); goto out; } #endif @@ -296,7 +297,8 @@ bl_create(bool srv, const char *path, vo return b; out: free(b); - bl_log(fun, LOG_ERR, "%s: malloc failed (%m)", __func__); + bl_log(fun, LOG_ERR, "%s: malloc failed (%s)", __func__, + strerror(errno)); return NULL; } @@ -451,7 +453,8 @@ bl_recv(bl_t b) rlen = recvmsg(b->b_fd, &msg, 0); if (rlen == -1) { - bl_log(b->b_fun, LOG_ERR, "%s: recvmsg failed (%m)", __func__); + bl_log(b->b_fun, LOG_ERR, "%s: recvmsg failed (%s)", __func__, + strerror(errno)); return NULL; } From owner-svn-src-all@freebsd.org Fri Jul 29 21:12:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF7C8BA8D5D; Fri, 29 Jul 2016 21:12:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1E8B185E; Fri, 29 Jul 2016 21:12:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TLCmin073084; Fri, 29 Jul 2016 21:12:48 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TLCmpb073082; Fri, 29 Jul 2016 21:12:48 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201607292112.u6TLCmpb073082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 29 Jul 2016 21:12:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303519 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 21:12:49 -0000 Author: vangyzen Date: Fri Jul 29 21:12:48 2016 New Revision: 303519 URL: https://svnweb.freebsd.org/changeset/base/303519 Log: Fix two return types in the cpuset(9) and bitset(9) man pages The *_FFS() and *_COUNT() functions return int, not size_t. MFC after: 3 days Sponsored by: Dell Inc. Modified: head/share/man/man9/bitset.9 head/share/man/man9/cpuset.9 Modified: head/share/man/man9/bitset.9 ============================================================================== --- head/share/man/man9/bitset.9 Fri Jul 29 21:11:32 2016 (r303518) +++ head/share/man/man9/bitset.9 Fri Jul 29 21:12:48 2016 (r303519) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2015 +.Dd July 29, 2016 .Dt BITSET 9 .Os .Sh NAME @@ -77,9 +77,9 @@ .Fn BIT_EMPTY "const SETSIZE" "struct STRUCTNAME *bitset" .Ft bool .Fn BIT_ISFULLSET "const SETSIZE" "struct STRUCTNAME *bitset" -.Ft size_t +.Ft int .Fn BIT_FFS "const SETSIZE" "struct STRUCTNAME *bitset" -.Ft size_t +.Ft int .Fn BIT_COUNT "const SETSIZE" "struct STRUCTNAME *bitset" .\" .Ft bool Modified: head/share/man/man9/cpuset.9 ============================================================================== --- head/share/man/man9/cpuset.9 Fri Jul 29 21:11:32 2016 (r303518) +++ head/share/man/man9/cpuset.9 Fri Jul 29 21:12:48 2016 (r303519) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2015 +.Dd July 29, 2016 .Dt CPUSET 9 .Os .Sh NAME @@ -75,9 +75,9 @@ .Fn CPU_EMPTY "cpuset_t *cpuset" .Ft bool .Fn CPU_ISFULLSET "cpuset_t *cpuset" -.Ft size_t +.Ft int .Fn CPU_FFS "cpuset_t *cpuset" -.Ft size_t +.Ft int .Fn CPU_COUNT "cpuset_t *cpuset" .\" .Ft bool From owner-svn-src-all@freebsd.org Fri Jul 29 21:18:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8189CBA8E0D; Fri, 29 Jul 2016 21:18:21 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51DE61A77; Fri, 29 Jul 2016 21:18:21 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TLIK7s073319; Fri, 29 Jul 2016 21:18:20 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TLIKmL073318; Fri, 29 Jul 2016 21:18:20 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201607292118.u6TLIKmL073318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 29 Jul 2016 21:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303520 - head/usr.bin/cpuset X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 21:18:21 -0000 Author: vangyzen Date: Fri Jul 29 21:18:20 2016 New Revision: 303520 URL: https://svnweb.freebsd.org/changeset/base/303520 Log: Fix markup for -j in cpuset(1) synopsis MFC after: 3 days Sponsored by: Dell Inc. Modified: head/usr.bin/cpuset/cpuset.1 Modified: head/usr.bin/cpuset/cpuset.1 ============================================================================== --- head/usr.bin/cpuset/cpuset.1 Fri Jul 29 21:12:48 2016 (r303519) +++ head/usr.bin/cpuset/cpuset.1 Fri Jul 29 21:18:20 2016 (r303520) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2015 +.Dd July 29, 2016 .Dt CPUSET 1 .Os .Sh NAME @@ -52,7 +52,7 @@ .Nm .Fl g .Op Fl cir -.Op Fl d Ar domain | j Ar jailid | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl x Ar irq +.Op Fl d Ar domain | Fl j Ar jailid | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl x Ar irq .Sh DESCRIPTION The .Nm From owner-svn-src-all@freebsd.org Fri Jul 29 21:37:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCA69BA821D; Fri, 29 Jul 2016 21:37:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACAB21335; Fri, 29 Jul 2016 21:37:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TLb0v1080721; Fri, 29 Jul 2016 21:37:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TLb0b8080720; Fri, 29 Jul 2016 21:37:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607292137.u6TLb0b8080720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 29 Jul 2016 21:37:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303521 - head/contrib/llvm/projects/libunwind/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 21:37:02 -0000 Author: emaste Date: Fri Jul 29 21:37:00 2016 New Revision: 303521 URL: https://svnweb.freebsd.org/changeset/base/303521 Log: libunwind: correct return code in unwinding trace log message Obtained from: LLVM r277215 MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp Modified: head/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp ============================================================================== --- head/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp Fri Jul 29 21:18:20 2016 (r303520) +++ head/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp Fri Jul 29 21:37:00 2016 (r303521) @@ -572,7 +572,7 @@ static _Unwind_Reason_Code unwind_phase2 unw_get_reg(cursor, UNW_REG_SP, &sp); if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_get_proc_info " - "failed => _URC_FATAL_PHASE1_ERROR\n", + "failed => _URC_FATAL_PHASE2_ERROR\n", static_cast(exception_object)); return _URC_FATAL_PHASE2_ERROR; } From owner-svn-src-all@freebsd.org Fri Jul 29 22:11:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB810BA88A1; Fri, 29 Jul 2016 22:11:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BE881304; Fri, 29 Jul 2016 22:11:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TMBTVH092581; Fri, 29 Jul 2016 22:11:29 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TMBTEJ092580; Fri, 29 Jul 2016 22:11:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607292211.u6TMBTEJ092580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 29 Jul 2016 22:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303522 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 22:11:30 -0000 Author: jhb Date: Fri Jul 29 22:11:29 2016 New Revision: 303522 URL: https://svnweb.freebsd.org/changeset/base/303522 Log: Various fixes to the t4/5nex character device. - Remove null open/close methods. - Don't set d_flags to 0 explicitly. - Remove t5_cdevsw as the .d_name member isn't really used and doesn't warrant a separate cdevsw just for the name. - Use ENOTTY as the error value for an unknown ioctl request. - Use make_dev_s() to close race with setting si_drv1. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Jul 29 21:37:00 2016 (r303521) +++ head/sys/dev/cxgbe/t4_main.c Fri Jul 29 22:11:29 2016 (r303522) @@ -134,14 +134,9 @@ static driver_t vcxgbe_driver = { }; static d_ioctl_t t4_ioctl; -static d_open_t t4_open; -static d_close_t t4_close; static struct cdevsw t4_cdevsw = { .d_version = D_VERSION, - .d_flags = 0, - .d_open = t4_open, - .d_close = t4_close, .d_ioctl = t4_ioctl, .d_name = "t4nex", }; @@ -179,15 +174,6 @@ static driver_t vcxl_driver = { sizeof(struct vi_info) }; -static struct cdevsw t5_cdevsw = { - .d_version = D_VERSION, - .d_flags = 0, - .d_open = t4_open, - .d_close = t4_close, - .d_ioctl = t4_ioctl, - .d_name = "t5nex", -}; - /* ifnet + media interface */ static void cxgbe_init(void *); static int cxgbe_ioctl(struct ifnet *, unsigned long, caddr_t); @@ -681,6 +667,7 @@ t4_attach(device_t dev) { struct adapter *sc; int rc = 0, i, j, n10g, n1g, rqidx, tqidx; + struct make_dev_args mda; struct intrs_and_queues iaq; struct sge *s; uint8_t *buf; @@ -760,13 +747,16 @@ t4_attach(device_t dev) setup_memwin(sc); if (t4_init_devlog_params(sc, 0) == 0) fixup_devlog_params(sc); - sc->cdev = make_dev(is_t4(sc) ? &t4_cdevsw : &t5_cdevsw, - device_get_unit(dev), UID_ROOT, GID_WHEEL, 0600, "%s", - device_get_nameunit(dev)); - if (sc->cdev == NULL) - device_printf(dev, "failed to create nexus char device.\n"); - else - sc->cdev->si_drv1 = sc; + make_dev_args_init(&mda); + mda.mda_devsw = &t4_cdevsw; + mda.mda_uid = UID_ROOT; + mda.mda_gid = GID_WHEEL; + mda.mda_mode = 0600; + mda.mda_si_drv1 = sc; + rc = make_dev_s(&mda, &sc->cdev, "%s", device_get_nameunit(dev)); + if (rc != 0) + device_printf(dev, "failed to create nexus char device: %d.\n", + rc); /* Go no further if recovery mode has been requested. */ if (TUNABLE_INT_FETCH("hw.cxgbe.sos", &i) && i != 0) { @@ -8727,18 +8717,6 @@ t4_iterate(void (*func)(struct adapter * } static int -t4_open(struct cdev *dev, int flags, int type, struct thread *td) -{ - return (0); -} - -static int -t4_close(struct cdev *dev, int flags, int type, struct thread *td) -{ - return (0); -} - -static int t4_ioctl(struct cdev *dev, unsigned long cmd, caddr_t data, int fflag, struct thread *td) { @@ -8909,7 +8887,7 @@ t4_ioctl(struct cdev *dev, unsigned long rc = t4_set_tracer(sc, (struct t4_tracer *)data); break; default: - rc = EINVAL; + rc = ENOTTY; } return (rc); From owner-svn-src-all@freebsd.org Fri Jul 29 23:13:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5537BA7499; Fri, 29 Jul 2016 23:13:51 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 823A91DFA; Fri, 29 Jul 2016 23:13:51 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id BD8C33C265B; Sat, 30 Jul 2016 09:13:41 +1000 (AEST) Date: Sat, 30 Jul 2016 09:13:41 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303485 - head/usr.bin/indent In-Reply-To: <201607291623.u6TGN08u064305@repo.freebsd.org> Message-ID: <20160730085927.B1012@besplex.bde.org> References: <201607291623.u6TGN08u064305@repo.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=VIkg5I7X c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=cXlg904i9bIos2gJljoA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 23:13:51 -0000 On Fri, 29 Jul 2016, Pedro F. Giffuni wrote: > Log: > indent(1): fix struct termination detection. > > Semicolons inside struct declarations don't end the declarations. > > Differential Revision: https://reviews.freebsd.org/D6966 (Partial) > Obtained from: Piotr Stefaniak > > Modified: > head/usr.bin/indent/indent.c > > Modified: head/usr.bin/indent/indent.c > ============================================================================== > --- head/usr.bin/indent/indent.c Fri Jul 29 16:17:54 2016 (r303484) > +++ head/usr.bin/indent/indent.c Fri Jul 29 16:23:00 2016 (r303485) > @@ -701,8 +701,10 @@ check_type: > break; > > case semicolon: /* got a ';' */ > - ps.in_or_st = false;/* we are not in an initialization or > - * structure declaration */ > + if (ps.dec_nest == 0) { > + /* we are not in an initialization or structure declaration */ > + ps.in_or_st = false; > + } This adds some style bugs. indent is written in a bad style that is very far from KNF, but perhaps it could format itself if it had an indent.pro. Part of its bad style is to use unnecessary parentheses a lot. But it mostly doesn't use unecessary braces. Except here. Another part of its bad style is to put comments to the right of the code, even when this requires misformatting them across multiple lines. The changed code gave example of both (the misformatting was to not have any whitespace between the semicolon and the comment so as to minimise comment indentation. This was actually another style bug. indent normally puts comments at the right at a tab stop even when this gives very narrow comments split across several lines). The changed code puts the comment on a line by itself. indent almost never does that elsewhere for comments about single statements. The comment here is technically for a block of compound statements, but the block has only 1 statement and was created by using excessive braces. > scase = false; /* these will only need resetting in an error */ > squest = 0; > if (ps.last_token == rparen && rparen_count == 0) Bruce From owner-svn-src-all@freebsd.org Fri Jul 29 23:30:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AABCDBA794A; Fri, 29 Jul 2016 23:30:34 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 779351ADF; Fri, 29 Jul 2016 23:30:34 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TNUXM5022654; Fri, 29 Jul 2016 23:30:33 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TNUX8o022653; Fri, 29 Jul 2016 23:30:33 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607292330.u6TNUX8o022653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 29 Jul 2016 23:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303523 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 23:30:34 -0000 Author: pfg Date: Fri Jul 29 23:30:33 2016 New Revision: 303523 URL: https://svnweb.freebsd.org/changeset/base/303523 Log: indent(1): Attempt to preserve some consistent style. Remove the excessive braces from r303485 and align the comments to the right as done in the rest of the code. This is not nice but there is no clear way to make it nice (and KNF). Pointed out by: bde Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Fri Jul 29 22:11:29 2016 (r303522) +++ head/usr.bin/indent/indent.c Fri Jul 29 23:30:33 2016 (r303523) @@ -701,10 +701,9 @@ check_type: break; case semicolon: /* got a ';' */ - if (ps.dec_nest == 0) { - /* we are not in an initialization or structure declaration */ - ps.in_or_st = false; - } + if (ps.dec_nest == 0) + ps.in_or_st = false;/* we are not in an initialization or + * structure declaration */ scase = false; /* these will only need resetting in an error */ squest = 0; if (ps.last_token == rparen && rparen_count == 0) From owner-svn-src-all@freebsd.org Fri Jul 29 23:53:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22F94BA80AE; Fri, 29 Jul 2016 23:53:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id E0C5E1CDD; Fri, 29 Jul 2016 23:53:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 1882142446C; Sat, 30 Jul 2016 09:25:14 +1000 (AEST) Date: Sat, 30 Jul 2016 09:25:14 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Piotr Stefaniak cc: "Pedro F. Giffuni" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303487 - head/usr.bin/indent In-Reply-To: Message-ID: <20160730091349.A1012@besplex.bde.org> References: <201607291628.u6TGSpKT064605@repo.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=OtmysHLt c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=evFOgcVC4GT5ehYdxvcA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 23:53:23 -0000 On Fri, 29 Jul 2016, Piotr Stefaniak wrote: > On 2016-07-29 18:28, Pedro F. Giffuni wrote: >> >> Log: >> indent(1): fix struct termination detection. >> >> Small style cleanup while here. > > Wrong commit message. Actually committed here is: Support "f" and "F" > floating constant suffixes. >> ... Also: Add large style bug in the fix. >> Modified: head/usr.bin/indent/lexi.c >> ============================================================================== >> --- head/usr.bin/indent/lexi.c Fri Jul 29 16:25:09 2016 >> (r303486) >> +++ head/usr.bin/indent/lexi.c Fri Jul 29 16:28:51 2016 >> (r303487) >> @@ -191,15 +191,13 @@ lexi(void) >> } >> } >> while (1) { >> - if (!(seensfx & 1) && >> - (*buf_ptr == 'U' || *buf_ptr == 'u')) { >> + if (!(seensfx & 1) && (*buf_ptr == 'U' || *buf_ptr == 'u')) { >> CHECK_SIZE_TOKEN; >> *e_token++ = *buf_ptr++; >> seensfx |= 1; >> continue; >> } >> - if (!(seensfx & 2) && >> - (*buf_ptr == 'L' || *buf_ptr == 'l')) { >> + if (!(seensfx & 2) && strchr("fFlL", *buf_ptr)) { indent's style is mostly bad, but this doesn't seem to involve using boolean tests for non-boolean str*() functions. indent didn't use strchr() before, but it always does explict comparisons with 0 for strcmp() and strncmp(). strstr() doesn't even return an integer, so an explicit comparison is even more needed for it. Except the "found" test doesn't require negative logic like !strcmp(). >> CHECK_SIZE_TOKEN; >> if (buf_ptr[1] == buf_ptr[0]) >> *e_token++ = *buf_ptr++; Bruce From owner-svn-src-all@freebsd.org Sat Jul 30 00:00:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F374BA8527; Sat, 30 Jul 2016 00:00:33 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 080AF1301; Sat, 30 Jul 2016 00:00:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 647313C1BEE; Sat, 30 Jul 2016 10:00:05 +1000 (AEST) Date: Sat, 30 Jul 2016 10:00:05 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303502 - head/usr.bin/indent In-Reply-To: <201607291936.u6TJaALj035130@repo.freebsd.org> Message-ID: <20160730092525.N1012@besplex.bde.org> References: <201607291936.u6TJaALj035130@repo.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=OtmysHLt c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=V1RT_qUmue8vlDhu7tIA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 00:00:33 -0000 On Fri, 29 Jul 2016, Pedro F. Giffuni wrote: > Log: > indent(1): Use NULL instead of zero for pointers. This is probably not indent's style, I doubt that you found all of the implicit NULLs. A recent commit added strstr() without even a comparison with 0. This adds some lexical style bugs. > Modified: head/usr.bin/indent/indent.c > ============================================================================== > --- head/usr.bin/indent/indent.c Fri Jul 29 18:26:15 2016 (r303501) > +++ head/usr.bin/indent/indent.c Fri Jul 29 19:36:10 2016 (r303502) > @@ -341,8 +341,8 @@ main(int argc, char **argv) > } > case comment: /* we have a comment, so we must copy it into > * the buffer */ > - if (!flushed_nl || sc_end != 0) { > - if (sc_end == 0) { /* if this is the first comment, we > + if (!flushed_nl || sc_end != NULL) { > + if (sc_end == NULL) { /* if this is the first comment, we > * must set up the buffer */ > save_com[0] = save_com[1] = ' '; > sc_end = &(save_com[2]); This breaks the formatting using blind substitution. A program named indent should be used to check the formatting. indent -l is mostly broken, but it works for comments, and indent's source code needs it to format comments more than most programs because indent puts lots of comments to the right of the code where they get moved further right by expansions. Normally, reformatting of such comments is not wanted, but it should be used for new code. I added the -[n]fcb to disable excessive reformatting of comments to the right of code. This only applies to block comments. > @@ -1101,9 +1101,9 @@ check_type: > > while (e_lab > s_lab && (e_lab[-1] == ' ' || e_lab[-1] == '\t')) > e_lab--; > - if (e_lab - s_lab == com_end && bp_save == 0) { /* comment on > - * preprocessor line */ This was a good example of indent's bad style. The comment needed to be in coulumns 64-78 to follow the style. After expansion, it needs to be in columns 72-78. But 2 of the 3 words in it are too long to fit there. > - if (sc_end == 0) /* if this is the first comment, we > + /* comment on preprocessor line */ The expansion wasn't blind, and the comment was moved to fit on new line. indent would have problems moving it, but it wouldn't move it to a wrong place -- from inside the compound statement to outside. > + if (e_lab - s_lab == com_end && bp_save == NULL) { > + if (sc_end == NULL) /* if this is the first comment, we > * must set up the buffer */ > sc_end = &(save_com[0]); > else { indent would have kept it inside the compound statement. It can then be started at the same indentation level as the code, or at the right of a blank statement. The comment could be corrected to live outside of the compound statement by adding an "if" condition to it. That is too hard for indent. The first coment inside the comment gives an example of using an "if" condition but this is not quite right here -- "if" only applies before the test. > Modified: head/usr.bin/indent/io.c > ============================================================================== > --- head/usr.bin/indent/io.c Fri Jul 29 18:26:15 2016 (r303501) > +++ head/usr.bin/indent/io.c Fri Jul 29 19:36:10 2016 (r303502) > @@ -348,10 +348,10 @@ fill_buffer(void) > int i; > FILE *f = input; > > - if (bp_save != 0) { /* there is a partly filled input buffer left */ > + if (bp_save != NULL) { /* there is a partly filled input buffer left */ The formatting was already broken here. It is especially broken since nearby lines use a smaller indentation that would work here too. > buf_ptr = bp_save; /* dont read anything, just switch buffers */ indent dont need know spelling lessons? > buf_end = be_save; > - bp_save = be_save = 0; > + bp_save = be_save = NULL; > if (buf_ptr < buf_end) > return; /* only return if there is really something in > * this buffer */ Bruce From owner-svn-src-all@freebsd.org Sat Jul 30 00:38:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A85AFBA8EC3; Sat, 30 Jul 2016 00:38:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 748341A33; Sat, 30 Jul 2016 00:38:43 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 1FE681A18CF; Sat, 30 Jul 2016 10:38:35 +1000 (AEST) Date: Sat, 30 Jul 2016 10:38:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303503 - head/sys/kern In-Reply-To: <201607292019.u6TKJE98050271@repo.freebsd.org> Message-ID: <20160730101227.J1336@besplex.bde.org> References: <201607292019.u6TKJE98050271@repo.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=EfU1O6SC c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=EEXqYizhvHhXCYCvzqUA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 00:38:44 -0000 On Fri, 29 Jul 2016, John Baldwin wrote: > Log: > Don't treat NOCPU as a valid CPU to CPU_ISSET. > > If a thread is created bound to a cpuset it might already be bound before > it's very first timeslice, and td_lastcpu will be NOCPU in that case. > > MFC after: 1 week Thanks. Did you get this from your mail queue on 2016/05/08? > > Modified: head/sys/kern/sched_4bsd.c > ============================================================================== > --- head/sys/kern/sched_4bsd.c Fri Jul 29 19:36:10 2016 (r303502) > +++ head/sys/kern/sched_4bsd.c Fri Jul 29 20:19:14 2016 (r303503) > @@ -1241,7 +1241,7 @@ sched_pickcpu(struct thread *td) > > mtx_assert(&sched_lock, MA_OWNED); > > - if (THREAD_CAN_SCHED(td, td->td_lastcpu)) > + if (td->td_lastcpu != NOCPU && THREAD_CAN_SCHED(td, td->td_lastcpu)) > best = td->td_lastcpu; > else > best = NOCPU; This bug was more fatal on amd64 than on i386. td_last_cpu has a correct (signed) type int and NOCPU is -1. THREAD_CAN_SCHED uses unsigned type. -1 becomes 0xFFFFFFFFFFFFFFFF in it on amd64 and 0xFFFFFFFF on i386. The old mail says that these get shifted to 1/4 as big, but I think the relevant value is more like 8 -- 8 bits per byte requires a byte at offset 1/8 of of these values in a byte array for a bitmap, but the array is of u_int or u_long so the array index is 1/32nd or 1/64 of these values and the memory offset is 1/8. Anyway, the final offset is small enough to not always trap on i386 only. When NOCPU was 255, t_lastcpu was u_char and the memory offset was 31 bytes. This didn't even give a buffer overrun with MAXCPU = 254. When td_lastcpu is NOCPU and the check doesn't trap, 'best' is set to NOCPU in both cases and the code works. Bruce From owner-svn-src-all@freebsd.org Sat Jul 30 01:00:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39FEEBA73BF; Sat, 30 Jul 2016 01:00:18 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF131161E; Sat, 30 Jul 2016 01:00:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U10HoJ056758; Sat, 30 Jul 2016 01:00:17 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U10GNt056755; Sat, 30 Jul 2016 01:00:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607300100.u6U10GNt056755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 30 Jul 2016 01:00:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303524 - in head: include lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 01:00:18 -0000 Author: bapt Date: Sat Jul 30 01:00:16 2016 New Revision: 303524 URL: https://svnweb.freebsd.org/changeset/base/303524 Log: Remove _WITH_GETLINE and _WITH_DPRINTF guards When adding getline(3) and dprintf(3) into libc, those guards were added to prevent breaking too many ports. 7 years later the ports tree have been fixed, it is time to remove this FreeBSDism While here remove the extra parenthesis surrounding dprintf(3) Modified: head/include/stdio.h head/lib/libc/stdio/getline.3 head/lib/libc/stdio/printf.3 Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Fri Jul 29 23:30:33 2016 (r303523) +++ head/include/stdio.h Sat Jul 30 01:00:16 2016 (r303524) @@ -357,44 +357,8 @@ ssize_t getdelim(char ** __restrict, si FILE *open_memstream(char **, size_t *); int renameat(int, const char *, int, const char *); int vdprintf(int, const char * __restrict, __va_list); - -/* - * Every programmer and his dog wrote functions called getline() and dprintf() - * before POSIX.1-2008 came along and decided to usurp the names, so we - * don't prototype them by default unless one of the following is true: - * a) the app has requested them specifically by defining _WITH_GETLINE or - * _WITH_DPRINTF, respectively - * b) the app has requested a POSIX.1-2008 environment via _POSIX_C_SOURCE - * c) the app defines a GNUism such as _BSD_SOURCE or _GNU_SOURCE - */ -#ifndef _WITH_GETLINE -#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) -#define _WITH_GETLINE -#elif defined(_POSIX_C_SOURCE) -#if _POSIX_C_SOURCE >= 200809 -#define _WITH_GETLINE -#endif -#endif -#endif - -#ifdef _WITH_GETLINE ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); -#endif - -#ifndef _WITH_DPRINTF -#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) -#define _WITH_DPRINTF -#elif defined(_POSIX_C_SOURCE) -#if _POSIX_C_SOURCE >= 200809 -#define _WITH_DPRINTF -#endif -#endif -#endif - -#ifdef _WITH_DPRINTF -int (dprintf)(int, const char * __restrict, ...); -#endif - +int dprintf(int, const char * __restrict, ...); #endif /* __POSIX_VISIBLE >= 200809 */ /* Modified: head/lib/libc/stdio/getline.3 ============================================================================== --- head/lib/libc/stdio/getline.3 Fri Jul 29 23:30:33 2016 (r303523) +++ head/lib/libc/stdio/getline.3 Sat Jul 30 01:00:16 2016 (r303524) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 30, 2012 +.Dd July 30, 2016 .Dt GETLINE 3 .Os .Sh NAME @@ -34,7 +34,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.Fd "#define _WITH_GETLINE" .In stdio.h .Ft ssize_t .Fn getdelim "char ** restrict linep" "size_t * restrict linecapp" "int delimiter" " FILE * restrict stream" @@ -97,34 +96,6 @@ while ((linelen = getline(&line, &lineca fwrite(line, linelen, 1, stdout); free(line); .Ed -.Sh COMPATIBILITY -Many application writers used the name -.Va getline -before the -.Fn getline -function was introduced in -.St -p1003.1 , -so a prototype is not provided by default in order to avoid -compatibility problems. -Applications that wish to use the -.Fn getline -function described herein should either request a strict -.St -p1003.1-2008 -environment by defining the macro -.Dv _POSIX_C_SOURCE -to the value 200809 or greater, or by defining the macro -.Dv _WITH_GETLINE , -prior to the inclusion of -.In stdio.h . -For compatibility with GNU libc, defining either -.Dv _BSD_SOURCE -or -.Dv _GNU_SOURCE -prior to the inclusion of -.In stdio.h -will also make -.Fn getline -available. .Sh ERRORS These functions may fail if: .Bl -tag -width Er Modified: head/lib/libc/stdio/printf.3 ============================================================================== --- head/lib/libc/stdio/printf.3 Fri Jul 29 23:30:33 2016 (r303523) +++ head/lib/libc/stdio/printf.3 Sat Jul 30 01:00:16 2016 (r303524) @@ -32,7 +32,7 @@ .\" @(#)printf.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 2, 2009 +.Dd July 30, 2016 .Dt PRINTF 3 .Os .Sh NAME @@ -42,7 +42,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.Fd "#define _WITH_DPRINTF" .In stdio.h .Ft int .Fn printf "const char * restrict format" ... @@ -715,34 +714,6 @@ char *newfmt(const char *fmt, ...) } .Ed .Sh COMPATIBILITY -Many application writers used the name -.Va dprintf -before the -.Fn dprintf -function was introduced in -.St -p1003.1 , -so a prototype is not provided by default in order to avoid -compatibility problems. -Applications that wish to use the -.Fn dprintf -function described herein should either request a strict -.St -p1003.1-2008 -environment by defining the macro -.Dv _POSIX_C_SOURCE -to the value 200809 or greater, or by defining the macro -.Dv _WITH_DPRINTF , -prior to the inclusion of -.In stdio.h . -For compatibility with GNU libc, defining either -.Dv _BSD_SOURCE -or -.Dv _GNU_SOURCE -prior to the inclusion of -.In stdio.h -will also make -.Fn dprintf -available. -.Pp The conversion formats .Cm \&%D , \&%O , and From owner-svn-src-all@freebsd.org Sat Jul 30 01:04:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D1FCBA7557; Sat, 30 Jul 2016 01:04:20 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA6CC1B03; Sat, 30 Jul 2016 01:04:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U14JTL060466; Sat, 30 Jul 2016 01:04:19 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U14IIl060463; Sat, 30 Jul 2016 01:04:18 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607300104.u6U14IIl060463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 30 Jul 2016 01:04:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303525 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 01:04:20 -0000 Author: pfg Date: Sat Jul 30 01:04:18 2016 New Revision: 303525 URL: https://svnweb.freebsd.org/changeset/base/303525 Log: indent(1): Yet more style issues. strchr(3) returns a pointer not a boolean. Attempt to make the style somewhat more ocnsistent with what indent had before recent changes. Pointed out by: bde Modified: head/usr.bin/indent/indent.c head/usr.bin/indent/io.c head/usr.bin/indent/lexi.c Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Sat Jul 30 01:00:16 2016 (r303524) +++ head/usr.bin/indent/indent.c Sat Jul 30 01:04:18 2016 (r303525) @@ -342,8 +342,8 @@ main(int argc, char **argv) case comment: /* we have a comment, so we must copy it into * the buffer */ if (!flushed_nl || sc_end != NULL) { - if (sc_end == NULL) { /* if this is the first comment, we - * must set up the buffer */ + if (sc_end == NULL) { /* if this is the first comment, we + * must set up the buffer */ save_com[0] = save_com[1] = ' '; sc_end = &(save_com[2]); } @@ -1100,8 +1100,8 @@ check_type: while (e_lab > s_lab && (e_lab[-1] == ' ' || e_lab[-1] == '\t')) e_lab--; - /* comment on preprocessor line */ if (e_lab - s_lab == com_end && bp_save == NULL) { + /* comment on preprocessor line */ if (sc_end == NULL) /* if this is the first comment, we * must set up the buffer */ sc_end = &(save_com[0]); Modified: head/usr.bin/indent/io.c ============================================================================== --- head/usr.bin/indent/io.c Sat Jul 30 01:00:16 2016 (r303524) +++ head/usr.bin/indent/io.c Sat Jul 30 01:04:18 2016 (r303525) @@ -348,8 +348,8 @@ fill_buffer(void) int i; FILE *f = input; - if (bp_save != NULL) { /* there is a partly filled input buffer left */ - buf_ptr = bp_save; /* dont read anything, just switch buffers */ + if (bp_save != NULL) { /* there is a partly filled input buffer left */ + buf_ptr = bp_save; /* do not read anything, just switch buffers */ buf_end = be_save; bp_save = be_save = NULL; if (buf_ptr < buf_end) Modified: head/usr.bin/indent/lexi.c ============================================================================== --- head/usr.bin/indent/lexi.c Sat Jul 30 01:00:16 2016 (r303524) +++ head/usr.bin/indent/lexi.c Sat Jul 30 01:04:18 2016 (r303525) @@ -197,7 +197,7 @@ lexi(void) seensfx |= 1; continue; } - if (!(seensfx & 2) && strchr("fFlL", *buf_ptr)) { + if (!(seensfx & 2) && (strchr("fFlL", *buf_ptr) != NULL)) { CHECK_SIZE_TOKEN; if (buf_ptr[1] == buf_ptr[0]) *e_token++ = *buf_ptr++; From owner-svn-src-all@freebsd.org Sat Jul 30 01:07:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B56A7BA75F0 for ; Sat, 30 Jul 2016 01:07:21 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm27-vm1.bullet.mail.bf1.yahoo.com (nm27-vm1.bullet.mail.bf1.yahoo.com [98.139.213.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 619D21CB7 for ; Sat, 30 Jul 2016 01:07:21 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1469840834; bh=rwwqOocnuolyarma6YaI1thlPozL5ccJojiUjPr/YLY=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=AkXW0LNtcotSTYwR6LfYf58lvJ1vXt5umjFYeoSa18qYILeWIZID1BityEjxtH8mz0ae4Tg84Wml8qOQf5f0TnoPFD+5iouR+8+/i7p7QExG4VSoL7606rHxzhSgo8ZIpmAKuMt6l/FDVzS8YczFXjej0Lvu1nMrQe41+LMjdCqPRxhVs6BGOelygHuMbxItoLj7aMgkLNMdUzUmXUlj+UlH9yhT21eYXon8xkQnTZ4LC7bUD0ZAJto60LoIYl6CyewNdYWcAOtYDZNSrZE5fXCuDA9kxnbJZSlweZZamx9Mtw2lQEfQeVIjwdXSoP161NE2+/1CbcjNWpzEMOixaA== Received: from [98.139.215.140] by nm27.bullet.mail.bf1.yahoo.com with NNFMP; 30 Jul 2016 01:07:14 -0000 Received: from [98.139.211.193] by tm11.bullet.mail.bf1.yahoo.com with NNFMP; 30 Jul 2016 01:07:14 -0000 Received: from [127.0.0.1] by smtp202.mail.bf1.yahoo.com with NNFMP; 30 Jul 2016 01:07:14 -0000 X-Yahoo-Newman-Id: 157790.69583.bm@smtp202.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: XmnWLkMVM1m_ZF0wZrmGFtaQs49PaejaL3nm1TROHTcNw9J Reo8hDIB_Lpgn6DFNjZu48ah1bT_Q1asN2kCIpjcjOdaC7rRT_Q8dJqC7UqT M94ioGKIKQNOTUVXU0SEx_hY4PuMPgl3Bf5A17CE6A3p41HUywcCXuI8V0p0 U.7Zc6E4GafuYMLDRfYHoScJXHlB.d4lH6SZrwrz8REmhtOeCKCDoZon7Lej .CaJ7NqGsxfpAR62PGPChBdr1iEoSDetdhVy7A8dg1Ew5PVzki56ZQPzqcUS 5JPKJ_4S2WGPQVcX2d_lVpmvPIv1bkjc7pQLfIsnI2HrSxGB.m5e_.qh9EUp TyV4coIc8B5MZt9NTYy69Sw4tA73tHqfrk8dq7miDW7Y7WK1Inl_uitHx8P. IzaN6FRHD9YdaM0wa49InOC8IHPfYosuXTN0R6eq7.UbfSkytsnKGcOtva6K qaDjogn0I.5O7WJ6gai3rDfhhrkZ3k5ZY1KlIRt2MfX01sTWKuuhwbup_kA6 DCvHfXP1biyTO8curKBzWRpW.TgjVA1DBtoi7.hCmuDTRtQ-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r303502 - head/usr.bin/indent To: Bruce Evans References: <201607291936.u6TJaALj035130@repo.freebsd.org> <20160730092525.N1012@besplex.bde.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: <8aa1f19c-3bdb-7acf-9cc1-66082cbbc400@FreeBSD.org> Date: Fri, 29 Jul 2016 20:07:21 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160730092525.N1012@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 01:07:21 -0000 On 07/29/16 19:00, Bruce Evans wrote: > On Fri, 29 Jul 2016, Pedro F. Giffuni wrote: > >> Log: >> indent(1): Use NULL instead of zero for pointers. > > This is probably not indent's style, I doubt that you found all of the > implicit NULLs. A recent commit added strstr() without even a comparison > with 0. > > This adds some lexical style bugs. > Yikes... hurry doesn't help get commits right. Sorry. Hope r303525 is not worse than what we had before. Pedro. From owner-svn-src-all@freebsd.org Sat Jul 30 01:07:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3941BA7667; Sat, 30 Jul 2016 01:07:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B18C31E3B; Sat, 30 Jul 2016 01:07:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U17mG1060630; Sat, 30 Jul 2016 01:07:48 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U17mJF060621; Sat, 30 Jul 2016 01:07:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607300107.u6U17mJF060621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 30 Jul 2016 01:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303526 - in head/usr.bin: calendar checknr comm grep mandoc sdiff sed soelim uniq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 01:07:49 -0000 Author: bapt Date: Sat Jul 30 01:07:47 2016 New Revision: 303526 URL: https://svnweb.freebsd.org/changeset/base/303526 Log: Remove usage of _WITH_GETLINE from usr.bin Modified: head/usr.bin/calendar/io.c head/usr.bin/checknr/checknr.c head/usr.bin/comm/comm.c head/usr.bin/grep/grep.c head/usr.bin/mandoc/Makefile head/usr.bin/sdiff/sdiff.c head/usr.bin/sed/main.c head/usr.bin/soelim/soelim.c head/usr.bin/uniq/uniq.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Sat Jul 30 01:04:18 2016 (r303525) +++ head/usr.bin/calendar/io.c Sat Jul 30 01:07:47 2016 (r303526) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _WITH_GETLINE #include #include #include Modified: head/usr.bin/checknr/checknr.c ============================================================================== --- head/usr.bin/checknr/checknr.c Sat Jul 30 01:04:18 2016 (r303525) +++ head/usr.bin/checknr/checknr.c Sat Jul 30 01:07:47 2016 (r303526) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); * structured typesetting. */ #include -#define _WITH_GETLINE #include #include #include Modified: head/usr.bin/comm/comm.c ============================================================================== --- head/usr.bin/comm/comm.c Sat Jul 30 01:04:18 2016 (r303525) +++ head/usr.bin/comm/comm.c Sat Jul 30 01:07:47 2016 (r303526) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _WITH_GETLINE #include #include #include Modified: head/usr.bin/grep/grep.c ============================================================================== --- head/usr.bin/grep/grep.c Sat Jul 30 01:04:18 2016 (r303525) +++ head/usr.bin/grep/grep.c Sat Jul 30 01:07:47 2016 (r303526) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _WITH_GETLINE #include #include #include Modified: head/usr.bin/mandoc/Makefile ============================================================================== --- head/usr.bin/mandoc/Makefile Sat Jul 30 01:04:18 2016 (r303525) +++ head/usr.bin/mandoc/Makefile Sat Jul 30 01:07:47 2016 (r303526) @@ -83,7 +83,6 @@ SRCS+= ${DB_SRCS} WARNS?= 2 CFLAGS+= -DHAVE_CONFIG_H \ - -D_WITH_GETLINE \ -I${.CURDIR}/../../lib/libopenbsd/ \ -I${.CURDIR}/../../contrib/sqlite3 LIBADD= openbsd sqlite3 z Modified: head/usr.bin/sdiff/sdiff.c ============================================================================== --- head/usr.bin/sdiff/sdiff.c Sat Jul 30 01:04:18 2016 (r303525) +++ head/usr.bin/sdiff/sdiff.c Sat Jul 30 01:07:47 2016 (r303526) @@ -22,7 +22,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _WITH_GETLINE #include #include #include Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Sat Jul 30 01:04:18 2016 (r303525) +++ head/usr.bin/sed/main.c Sat Jul 30 01:07:47 2016 (r303526) @@ -58,7 +58,6 @@ static const char sccsid[] = "@(#)main.c #include #include #include -#define _WITH_GETLINE #include #include #include Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Sat Jul 30 01:04:18 2016 (r303525) +++ head/usr.bin/soelim/soelim.c Sat Jul 30 01:07:47 2016 (r303526) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _WITH_GETLINE #include #include #include Modified: head/usr.bin/uniq/uniq.c ============================================================================== --- head/usr.bin/uniq/uniq.c Sat Jul 30 01:04:18 2016 (r303525) +++ head/usr.bin/uniq/uniq.c Sat Jul 30 01:07:47 2016 (r303526) @@ -53,7 +53,6 @@ static const char rcsid[] = #include #include #include -#define _WITH_GETLINE #include #include #include From owner-svn-src-all@freebsd.org Sat Jul 30 01:10:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 833C2BA772C; Sat, 30 Jul 2016 01:10:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39EE51175; Sat, 30 Jul 2016 01:10:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U1A6ml060772; Sat, 30 Jul 2016 01:10:06 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U1A649060767; Sat, 30 Jul 2016 01:10:06 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607300110.u6U1A649060767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 30 Jul 2016 01:10:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303527 - in head/usr.sbin: autofs pkg pw services_mkdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 01:10:07 -0000 Author: bapt Date: Sat Jul 30 01:10:05 2016 New Revision: 303527 URL: https://svnweb.freebsd.org/changeset/base/303527 Log: Remove usage of _WITH_GETLINE from usr.sbin Modified: head/usr.sbin/autofs/common.c head/usr.sbin/pkg/pkg.c head/usr.sbin/pw/pw.h head/usr.sbin/pw/pw_vpw.c head/usr.sbin/services_mkdb/services_mkdb.c Modified: head/usr.sbin/autofs/common.c ============================================================================== --- head/usr.sbin/autofs/common.c Sat Jul 30 01:07:47 2016 (r303526) +++ head/usr.sbin/autofs/common.c Sat Jul 30 01:10:05 2016 (r303527) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _WITH_GETLINE #include #include #include Modified: head/usr.sbin/pkg/pkg.c ============================================================================== --- head/usr.sbin/pkg/pkg.c Sat Jul 30 01:07:47 2016 (r303526) +++ head/usr.sbin/pkg/pkg.c Sat Jul 30 01:10:05 2016 (r303527) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define _WITH_GETLINE #include #include #include Modified: head/usr.sbin/pw/pw.h ============================================================================== --- head/usr.sbin/pw/pw.h Sat Jul 30 01:07:47 2016 (r303526) +++ head/usr.sbin/pw/pw.h Sat Jul 30 01:10:05 2016 (r303527) @@ -28,7 +28,6 @@ #include -#define _WITH_GETLINE #include #include #include Modified: head/usr.sbin/pw/pw_vpw.c ============================================================================== --- head/usr.sbin/pw/pw_vpw.c Sat Jul 30 01:07:47 2016 (r303526) +++ head/usr.sbin/pw/pw_vpw.c Sat Jul 30 01:10:05 2016 (r303527) @@ -33,7 +33,6 @@ static const char rcsid[] = #include #include #include -#define _WITH_GETLINE #include #include #include Modified: head/usr.sbin/services_mkdb/services_mkdb.c ============================================================================== --- head/usr.sbin/services_mkdb/services_mkdb.c Sat Jul 30 01:07:47 2016 (r303526) +++ head/usr.sbin/services_mkdb/services_mkdb.c Sat Jul 30 01:10:05 2016 (r303527) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _WITH_GETLINE #include #include #include From owner-svn-src-all@freebsd.org Sat Jul 30 01:13:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C7F6BA7A59; Sat, 30 Jul 2016 01:13:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E304F1628; Sat, 30 Jul 2016 01:13:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U1DtMG064362; Sat, 30 Jul 2016 01:13:55 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U1Dsq2064358; Sat, 30 Jul 2016 01:13:54 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607300113.u6U1Dsq2064358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 30 Jul 2016 01:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303528 - in head: contrib/ofed/usr.lib/libibverbs lib/libc/stdio lib/libc/tests/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 01:13:56 -0000 Author: bapt Date: Sat Jul 30 01:13:54 2016 New Revision: 303528 URL: https://svnweb.freebsd.org/changeset/base/303528 Log: Remove last traces of _WITH_GETLINE Modified: head/contrib/ofed/usr.lib/libibverbs/config.h head/lib/libc/stdio/getline.c head/lib/libc/tests/stdio/getdelim_test.c Modified: head/contrib/ofed/usr.lib/libibverbs/config.h ============================================================================== --- head/contrib/ofed/usr.lib/libibverbs/config.h Sat Jul 30 01:10:05 2016 (r303527) +++ head/contrib/ofed/usr.lib/libibverbs/config.h Sat Jul 30 01:13:54 2016 (r303528) @@ -1,2 +1 @@ -#define _WITH_GETLINE #include Modified: head/lib/libc/stdio/getline.c ============================================================================== --- head/lib/libc/stdio/getline.c Sat Jul 30 01:10:05 2016 (r303527) +++ head/lib/libc/stdio/getline.c Sat Jul 30 01:13:54 2016 (r303528) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#define _WITH_GETLINE #include ssize_t Modified: head/lib/libc/tests/stdio/getdelim_test.c ============================================================================== --- head/lib/libc/tests/stdio/getdelim_test.c Sat Jul 30 01:10:05 2016 (r303527) +++ head/lib/libc/tests/stdio/getdelim_test.c Sat Jul 30 01:13:54 2016 (r303528) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#define _WITH_GETLINE #include #include #include From owner-svn-src-all@freebsd.org Sat Jul 30 01:16:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D27BBA7B37; Sat, 30 Jul 2016 01:16:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FE2217A6; Sat, 30 Jul 2016 01:16:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U1G6Aq064484; Sat, 30 Jul 2016 01:16:06 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U1G6bS064480; Sat, 30 Jul 2016 01:16:06 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607300116.u6U1G6bS064480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 30 Jul 2016 01:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303529 - in head: contrib/libexecinfo lib/libc/stdio sys/contrib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 01:16:07 -0000 Author: bapt Date: Sat Jul 30 01:16:06 2016 New Revision: 303529 URL: https://svnweb.freebsd.org/changeset/base/303529 Log: Remove usage of _WITH_DPRINTF Modified: head/contrib/libexecinfo/backtrace.c head/lib/libc/stdio/dprintf.c head/sys/contrib/libnv/nvlist.c Modified: head/contrib/libexecinfo/backtrace.c ============================================================================== --- head/contrib/libexecinfo/backtrace.c Sat Jul 30 01:13:54 2016 (r303528) +++ head/contrib/libexecinfo/backtrace.c Sat Jul 30 01:16:06 2016 (r303529) @@ -33,7 +33,6 @@ __RCSID("$NetBSD: backtrace.c,v 1.3 2013 #include #include -#define _WITH_DPRINTF #include #include #include Modified: head/lib/libc/stdio/dprintf.c ============================================================================== --- head/lib/libc/stdio/dprintf.c Sat Jul 30 01:13:54 2016 (r303528) +++ head/lib/libc/stdio/dprintf.c Sat Jul 30 01:16:06 2016 (r303529) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#define _WITH_DPRINTF #include "namespace.h" #include #include Modified: head/sys/contrib/libnv/nvlist.c ============================================================================== --- head/sys/contrib/libnv/nvlist.c Sat Jul 30 01:13:54 2016 (r303528) +++ head/sys/contrib/libnv/nvlist.c Sat Jul 30 01:16:06 2016 (r303529) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _WITH_DPRINTF #include #include #include From owner-svn-src-all@freebsd.org Sat Jul 30 01:18:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AF9BBA7C13; Sat, 30 Jul 2016 01:18:50 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 259A81A14; Sat, 30 Jul 2016 01:18:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 5F27D3C28DF; Sat, 30 Jul 2016 11:18:48 +1000 (AEST) Date: Sat, 30 Jul 2016 11:18:47 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303523 - head/usr.bin/indent In-Reply-To: <201607292330.u6TNUX8o022653@repo.freebsd.org> Message-ID: <20160730111829.C1526@besplex.bde.org> References: <201607292330.u6TNUX8o022653@repo.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=OtmysHLt c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=JJnoGoR6jGnaglEbEdIA:9 a=CjuIK1q_8ugA:10 a=zH-YL7wxbLwA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 01:18:50 -0000 On Fri, 29 Jul 2016, Pedro F. Giffuni wrote: > Log: > indent(1): Attempt to preserve some consistent style. > > Remove the excessive braces from r303485 and align the comments to the > right as done in the rest of the code. This is not nice but there is no > clear way to make it nice (and KNF). > > Pointed out by: bde Thanks. Bruce From owner-svn-src-all@freebsd.org Sat Jul 30 01:42:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87BA8BA8369; Sat, 30 Jul 2016 01:42:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id C34CB175D; Sat, 30 Jul 2016 01:42:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 58294D677F0; Sat, 30 Jul 2016 11:42:36 +1000 (AEST) Date: Sat, 30 Jul 2016 11:42:36 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Baptiste Daroussin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303524 - in head: include lib/libc/stdio In-Reply-To: <201607300100.u6U10GNt056755@repo.freebsd.org> Message-ID: <20160730111943.B1526@besplex.bde.org> References: <201607300100.u6U10GNt056755@repo.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=VIkg5I7X c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=wypO7mQGsu0IoGoJGhoA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 01:42:38 -0000 On Sat, 30 Jul 2016, Baptiste Daroussin wrote: > Log: > Remove _WITH_GETLINE and _WITH_DPRINTF guards > > When adding getline(3) and dprintf(3) into libc, those guards were added > to prevent breaking too many ports. > > 7 years later the ports tree have been fixed, it is time to remove this > FreeBSDism This increases style bugs related to the ifdefs. > While here remove the extra parenthesis surrounding dprintf(3) Perhaps they weren't extra. They allowed applications that to #define dprintf and still get the function if they also #define suitable magic _WITH* macros. Now that dprintf() is fully reserved for the implementation, they are just extra because the implementation doesn't have a macro version. > Modified: head/include/stdio.h > ============================================================================== > --- head/include/stdio.h Fri Jul 29 23:30:33 2016 (r303523) > +++ head/include/stdio.h Sat Jul 30 01:00:16 2016 (r303524) > @@ -357,44 +357,8 @@ ssize_t getdelim(char ** __restrict, si > FILE *open_memstream(char **, size_t *); > int renameat(int, const char *, int, const char *); > int vdprintf(int, const char * __restrict, __va_list); > - > -/* > - * Every programmer and his dog wrote functions called getline() and dprintf() > - * before POSIX.1-2008 came along and decided to usurp the names, so we > - * don't prototype them by default unless one of the following is true: > - * a) the app has requested them specifically by defining _WITH_GETLINE or > - * _WITH_DPRINTF, respectively > - * b) the app has requested a POSIX.1-2008 environment via _POSIX_C_SOURCE > - * c) the app defines a GNUism such as _BSD_SOURCE or _GNU_SOURCE > - */ > -#ifndef _WITH_GETLINE > -#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) > -#define _WITH_GETLINE > -#elif defined(_POSIX_C_SOURCE) > -#if _POSIX_C_SOURCE >= 200809 > -#define _WITH_GETLINE > -#endif > -#endif > -#endif > - > -#ifdef _WITH_GETLINE > ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); > -#endif > - > -#ifndef _WITH_DPRINTF > -#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) > -#define _WITH_DPRINTF > -#elif defined(_POSIX_C_SOURCE) > -#if _POSIX_C_SOURCE >= 200809 > -#define _WITH_DPRINTF > -#endif > -#endif > -#endif > - > -#ifdef _WITH_DPRINTF > -int (dprintf)(int, const char * __restrict, ...); > -#endif > - > +int dprintf(int, const char * __restrict, ...); > #endif /* __POSIX_VISIBLE >= 200809 */ getline and dprintf are still int this POSIX section, so they are not exposed to earlier POSIXes or C99 or C90, but they still are unsorted within this section. The unsorting made the ifdefs less unreadable (except g before d was just backwards). Now it is just an expecially bad historical order. > Modified: head/lib/libc/stdio/printf.3 This man page is almost unreadable since it has many functions in it organised in a strange order that is approximately on decreasing age and standardness. So you need grep to find anything in it. Bruce From owner-svn-src-all@freebsd.org Sat Jul 30 02:09:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD00EBA86EA; Sat, 30 Jul 2016 02:09:12 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD27C1EB2; Sat, 30 Jul 2016 02:09:12 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U29Bn1082701; Sat, 30 Jul 2016 02:09:11 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U29BXC082700; Sat, 30 Jul 2016 02:09:11 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201607300209.u6U29BXC082700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Sat, 30 Jul 2016 02:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303530 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 02:09:13 -0000 Author: ache Date: Sat Jul 30 02:09:11 2016 New Revision: 303530 URL: https://svnweb.freebsd.org/changeset/base/303530 Log: Reset errno for readdirfunc() before contunue. Modified: head/lib/libc/gen/glob.c Modified: head/lib/libc/gen/glob.c ============================================================================== --- head/lib/libc/gen/glob.c Sat Jul 30 01:16:06 2016 (r303529) +++ head/lib/libc/gen/glob.c Sat Jul 30 02:09:11 2016 (r303530) @@ -781,8 +781,10 @@ glob3(Char *pathbuf, Char *pathend, Char } /* Initial DOT must be matched literally. */ - if (dp->d_name[0] == '.' && UNPROT(*pattern) != DOT) + if (dp->d_name[0] == '.' && UNPROT(*pattern) != DOT) { + errno = 0; continue; + } memset(&mbs, 0, sizeof(mbs)); dc = pathend; sc = dp->d_name; @@ -803,6 +805,7 @@ glob3(Char *pathbuf, Char *pathend, Char } if (too_long || !match(pathend, pattern, restpattern)) { *pathend = EOS; + errno = 0; continue; } err = glob2(pathbuf, --dc, pathend_last, restpattern, From owner-svn-src-all@freebsd.org Sat Jul 30 03:05:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72D89BA7440; Sat, 30 Jul 2016 03:05:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A8411D06; Sat, 30 Jul 2016 03:05:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U35OlI005895; Sat, 30 Jul 2016 03:05:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U35ORs005889; Sat, 30 Jul 2016 03:05:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607300305.u6U35ORs005889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 30 Jul 2016 03:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303531 - in head: . lib/librtld_db 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 03:05:25 -0000 Author: markj Date: Sat Jul 30 03:05:23 2016 New Revision: 303531 URL: https://svnweb.freebsd.org/changeset/base/303531 Log: librtld_db: Use the auxv to figure out where to look up loader symbols. Previously, librtld_db just hardcoded /libexec/ld-elf.so, which isn't correct for processes that aren't using the native ABI. With this change, librtld_db can be used to inspect non-native processes; in particular, dtrace -c now works for 32-bit executables on amd64. MFC after: 1 month Modified: head/Makefile.inc1 head/lib/librtld_db/Makefile head/lib/librtld_db/rtld_db.c head/lib/librtld_db/rtld_db.h head/share/mk/src.libnames.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Jul 30 02:09:11 2016 (r303530) +++ head/Makefile.inc1 Sat Jul 30 03:05:23 2016 (r303531) @@ -2095,7 +2095,9 @@ cddl/lib/libctf__L: lib/libz__L # cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only built # on select architectures though (see cddl/lib/Makefile) .if ${MACHINE_CPUARCH} != "sparc64" -_prebuild_libs+= lib/libproc lib/librtld_db +_prebuild_libs+= lib/libprocstat lib/libproc lib/librtld_db +lib/libproc__L: lib/libprocstat__L +lib/librtld_db__L: lib/libprocstat__L .endif .if ${MK_CRYPT} != "no" Modified: head/lib/librtld_db/Makefile ============================================================================== --- head/lib/librtld_db/Makefile Sat Jul 30 02:09:11 2016 (r303530) +++ head/lib/librtld_db/Makefile Sat Jul 30 03:05:23 2016 (r303531) @@ -14,4 +14,6 @@ CFLAGS+= -I${.CURDIR} # Avoid circular dependency, we only need the libproc.h header here. CFLAGS+= -I${.CURDIR:H}/libproc +LIBADD+= elf procstat + .include Modified: head/lib/librtld_db/rtld_db.c ============================================================================== --- head/lib/librtld_db/rtld_db.c Sat Jul 30 02:09:11 2016 (r303530) +++ head/lib/librtld_db/rtld_db.c Sat Jul 30 03:05:23 2016 (r303531) @@ -25,20 +25,30 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - */ + */ + #include __FBSDID("$FreeBSD$"); -#include -#include +#include +#include +#include #include +#include #include +#include +#include #include #include #include -#include +#include + +#include + +#include #include +#include #include #include "rtld_db.h" @@ -55,6 +65,8 @@ void rd_delete(rd_agent_t *rdap) { + if (rdap->rda_procstat != NULL) + procstat_close(rdap->rda_procstat); free(rdap); } @@ -146,9 +158,10 @@ rd_init(int version) rd_err_e rd_loadobj_iter(rd_agent_t *rdap, rl_iter_f *cb, void *clnt_data) { - int cnt, i, lastvn = 0; - rd_loadobj_t rdl; struct kinfo_vmentry *kves, *kve; + rd_loadobj_t rdl; + rd_err_e ret; + int cnt, i, lastvn; DPRINTF("%s\n", __func__); @@ -156,6 +169,9 @@ rd_loadobj_iter(rd_agent_t *rdap, rl_ite warn("ERROR: kinfo_getvmmap() failed"); return (RD_ERR); } + + ret = RD_OK; + lastvn = 0; for (i = 0; i < cnt; i++) { kve = kves + i; if (kve->kve_type == KVME_TYPE_VNODE) @@ -174,12 +190,14 @@ rd_loadobj_iter(rd_agent_t *rdap, rl_ite if (kve->kve_protection & KVME_PROT_EXEC) rdl.rdl_prot |= RD_RDL_X; strlcpy(rdl.rdl_path, kves[lastvn].kve_path, - sizeof(rdl.rdl_path)); - (*cb)(&rdl, clnt_data); + sizeof(rdl.rdl_path)); + if ((*cb)(&rdl, clnt_data) != 0) { + ret = RD_ERR; + break; + } } free(kves); - - return (RD_OK); + return (ret); } void @@ -195,13 +213,18 @@ rd_new(struct proc_handle *php) { rd_agent_t *rdap; - rdap = malloc(sizeof(rd_agent_t)); - if (rdap) { - memset(rdap, 0, sizeof(rd_agent_t)); - rdap->rda_php = php; - rd_reset(rdap); + rdap = malloc(sizeof(*rdap)); + if (rdap == NULL) + return (NULL); + + memset(rdap, 0, sizeof(rd_agent_t)); + rdap->rda_php = php; + rdap->rda_procstat = procstat_open_sysctl(); + + if (rd_reset(rdap) != RD_OK) { + rd_delete(rdap); + rdap = NULL; } - return (rdap); } @@ -231,24 +254,136 @@ rd_plt_resolution(rd_agent_t *rdap, uint return (RD_ERR); } -rd_err_e -rd_reset(rd_agent_t *rdap) +static int +rtld_syms(rd_agent_t *rdap, const char *rtldpath, u_long base) { + GElf_Shdr shdr; GElf_Sym sym; + Elf *e; + Elf_Data *data; + Elf_Scn *scn; + const char *symname; + Elf64_Word strscnidx; + int fd, i, ret; + + ret = 1; + e = NULL; + + fd = open(rtldpath, O_RDONLY); + if (fd < 0) + goto err; + + if (elf_version(EV_CURRENT) == EV_NONE) + goto err; + e = elf_begin(fd, ELF_C_READ, NULL); + if (e == NULL) { + close(fd); + goto err; + } - if (proc_name2sym(rdap->rda_php, "ld-elf.so.1", "r_debug_state", - &sym, NULL) < 0) - return (RD_ERR); - DPRINTF("found r_debug_state at 0x%lx\n", (unsigned long)sym.st_value); - rdap->rda_preinit_addr = sym.st_value; - rdap->rda_dlactivity_addr = sym.st_value; + scn = NULL; + while ((scn = elf_nextscn(e, scn)) != NULL) { + gelf_getshdr(scn, &shdr); + if (shdr.sh_type == SHT_DYNSYM) + break; + } + if (scn == NULL) + goto err; - if (proc_name2sym(rdap->rda_php, "ld-elf.so.1", "_r_debug_postinit", - &sym, NULL) < 0) + strscnidx = shdr.sh_link; + data = elf_getdata(scn, NULL); + if (data == NULL) + goto err; + + for (i = 0; gelf_getsym(data, i, &sym) != NULL; i++) { + if (GELF_ST_TYPE(sym.st_info) != STT_FUNC || + GELF_ST_BIND(sym.st_info) != STB_GLOBAL) + continue; + symname = elf_strptr(e, strscnidx, sym.st_name); + if (symname == NULL) + continue; + + if (strcmp(symname, "r_debug_state") == 0) { + rdap->rda_preinit_addr = sym.st_value + base; + rdap->rda_dlactivity_addr = sym.st_value + base; + } else if (strcmp(symname, "_r_debug_postinit") == 0) { + rdap->rda_postinit_addr = sym.st_value + base; + } + } + + if (rdap->rda_preinit_addr != 0 && + rdap->rda_postinit_addr != 0 && + rdap->rda_dlactivity_addr != 0) + ret = 0; + +err: + if (e != NULL) + (void)elf_end(e); + if (fd >= 0) + (void)close(fd); + return (ret); +} + +rd_err_e +rd_reset(rd_agent_t *rdap) +{ + struct kinfo_proc *kp; + struct kinfo_vmentry *kve; + Elf_Auxinfo *auxv; + const char *rtldpath; + u_long base; + rd_err_e rderr; + int count, i; + + kp = NULL; + auxv = NULL; + kve = NULL; + rderr = RD_ERR; + + kp = procstat_getprocs(rdap->rda_procstat, KERN_PROC_PID, + proc_getpid(rdap->rda_php), &count); + if (kp == NULL) return (RD_ERR); - DPRINTF("found _r_debug_postinit at 0x%lx\n", - (unsigned long)sym.st_value); - rdap->rda_postinit_addr = sym.st_value; + assert(count == 1); - return (RD_OK); + auxv = procstat_getauxv(rdap->rda_procstat, kp, &count); + if (auxv == NULL) + goto err; + + base = 0; + for (i = 0; i < count; i++) { + if (auxv[i].a_type == AT_BASE) { + base = auxv[i].a_un.a_val; + break; + } + } + if (i == count) + goto err; + + rtldpath = NULL; + kve = procstat_getvmmap(rdap->rda_procstat, kp, &count); + if (kve == NULL) + goto err; + for (i = 0; i < count; i++) { + if (kve[i].kve_start == base) { + rtldpath = kve[i].kve_path; + break; + } + } + if (i == count) + goto err; + + if (rtld_syms(rdap, rtldpath, base) != 0) + goto err; + + rderr = RD_OK; + +err: + if (kve != NULL) + procstat_freevmmap(rdap->rda_procstat, kve); + if (auxv != NULL) + procstat_freeauxv(rdap->rda_procstat, auxv); + if (kp != NULL) + procstat_freeprocs(rdap->rda_procstat, kp); + return (rderr); } Modified: head/lib/librtld_db/rtld_db.h ============================================================================== --- head/lib/librtld_db/rtld_db.h Sat Jul 30 02:09:11 2016 (r303530) +++ head/lib/librtld_db/rtld_db.h Sat Jul 30 03:05:23 2016 (r303531) @@ -33,9 +33,6 @@ #define _RTLD_DB_H_ #include -#include -#include - #define RD_VERSION 1 @@ -49,11 +46,17 @@ typedef enum { RD_NOMAPS } rd_err_e; +/* XXX struct rd_agent should be private. */ +struct procstat; + typedef struct rd_agent { struct proc_handle *rda_php; + uintptr_t rda_dlactivity_addr; uintptr_t rda_preinit_addr; uintptr_t rda_postinit_addr; + + struct procstat *rda_procstat; } rd_agent_t; typedef struct rd_loadobj { Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Sat Jul 30 02:09:11 2016 (r303530) +++ head/share/mk/src.libnames.mk Sat Jul 30 03:05:23 2016 (r303531) @@ -243,6 +243,7 @@ _DP_radius= md .else _DP_radius= crypto .endif +_DP_rtld_db= elf procstat _DP_procstat= kvm util elf .if ${MK_CXX} == "yes" .if ${MK_LIBCPLUSPLUS} != "no" From owner-svn-src-all@freebsd.org Sat Jul 30 03:07:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2DE9BA74D9; Sat, 30 Jul 2016 03:07:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C6311EB1; Sat, 30 Jul 2016 03:07:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U37EIf006002; Sat, 30 Jul 2016 03:07:14 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U37EAo006001; Sat, 30 Jul 2016 03:07:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607300307.u6U37EAo006001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 30 Jul 2016 03:07:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303532 - head/lib/libproc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 03:07:15 -0000 Author: markj Date: Sat Jul 30 03:07:14 2016 New Revision: 303532 URL: https://svnweb.freebsd.org/changeset/base/303532 Log: Add descriptions for fields in struct proc_handle. Remove the unused kq field and some unnecessary includes. MFC after: 1 month Modified: head/lib/libproc/_libproc.h Modified: head/lib/libproc/_libproc.h ============================================================================== --- head/lib/libproc/_libproc.h Sat Jul 30 03:05:23 2016 (r303531) +++ head/lib/libproc/_libproc.h Sat Jul 30 03:07:14 2016 (r303532) @@ -26,27 +26,24 @@ * $FreeBSD$ */ -#include -#include #include -#include #include + #include #include "libproc.h" struct proc_handle { pid_t pid; /* Process ID. */ - int kq; /* Kernel event queue ID. */ int flags; /* Process flags. */ int status; /* Process status (PS_*). */ int wstat; /* Process wait status. */ rd_agent_t *rdap; /* librtld_db agent */ - rd_loadobj_t *rdobjs; - size_t rdobjsz; - size_t nobjs; - struct lwpstatus lwps; - rd_loadobj_t *rdexec; /* rdobj index of program executable. */ + rd_loadobj_t *rdobjs; /* Array of loaded objects. */ + size_t rdobjsz; /* Array size. */ + size_t nobjs; /* Num. objects currently loaded. */ + rd_loadobj_t *rdexec; /* rdobj for program executable. */ + struct lwpstatus lwps; /* Process status. */ char execname[MAXPATHLEN]; /* Path to program executable. */ }; From owner-svn-src-all@freebsd.org Sat Jul 30 03:09:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E771EBA75F8; Sat, 30 Jul 2016 03:09:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C167B12E3; Sat, 30 Jul 2016 03:09:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U39OYQ006119; Sat, 30 Jul 2016 03:09:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U39NOJ006112; Sat, 30 Jul 2016 03:09:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607300309.u6U39NOJ006112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 30 Jul 2016 03:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303533 - in head: lib/libproc 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 03:09:25 -0000 Author: markj Date: Sat Jul 30 03:09:23 2016 New Revision: 303533 URL: https://svnweb.freebsd.org/changeset/base/303533 Log: libproc: Add proc_getmodel(). This is used by libdtrace to determine the data model of target processes. This allows for the creation of pid provider probes in 32-bit processes on amd64. MFC after: 1 month Modified: head/lib/libproc/Makefile head/lib/libproc/_libproc.h head/lib/libproc/libproc.h head/lib/libproc/proc_create.c head/lib/libproc/proc_rtld.c head/lib/libproc/proc_util.c head/share/mk/src.libnames.mk Modified: head/lib/libproc/Makefile ============================================================================== --- head/lib/libproc/Makefile Sat Jul 30 03:07:14 2016 (r303532) +++ head/lib/libproc/Makefile Sat Jul 30 03:09:23 2016 (r303533) @@ -24,7 +24,7 @@ LIBADD+= cxxrt LIBADD+= supcplusplus .endif -LIBADD+= elf rtld_db util +LIBADD+= elf procstat rtld_db util .if ${MK_CDDL} != "no" LIBADD+= ctf Modified: head/lib/libproc/_libproc.h ============================================================================== --- head/lib/libproc/_libproc.h Sat Jul 30 03:07:14 2016 (r303532) +++ head/lib/libproc/_libproc.h Sat Jul 30 03:09:23 2016 (r303533) @@ -33,18 +33,22 @@ #include "libproc.h" +struct procstat; + struct proc_handle { pid_t pid; /* Process ID. */ int flags; /* Process flags. */ int status; /* Process status (PS_*). */ int wstat; /* Process wait status. */ + int model; /* Process data model. */ rd_agent_t *rdap; /* librtld_db agent */ rd_loadobj_t *rdobjs; /* Array of loaded objects. */ size_t rdobjsz; /* Array size. */ size_t nobjs; /* Num. objects currently loaded. */ rd_loadobj_t *rdexec; /* rdobj for program executable. */ struct lwpstatus lwps; /* Process status. */ - char execname[MAXPATHLEN]; /* Path to program executable. */ + struct procstat *procstat; /* libprocstat handle. */ + char execpath[MAXPATHLEN]; /* Path to program executable. */ }; #ifdef DEBUG Modified: head/lib/libproc/libproc.h ============================================================================== --- head/lib/libproc/libproc.h Sat Jul 30 03:07:14 2016 (r303532) +++ head/lib/libproc/libproc.h Sat Jul 30 03:09:23 2016 (r303533) @@ -113,6 +113,9 @@ typedef struct lwpstatus { #define FLTBPT -1 } lwpstatus_t; +#define PR_MODEL_ILP32 1 +#define PR_MODEL_LP64 2 + /* Function prototype definitions. */ __BEGIN_DECLS @@ -136,6 +139,7 @@ int proc_name2sym(struct proc_handle *, struct ctf_file *proc_name2ctf(struct proc_handle *, const char *); int proc_setflags(struct proc_handle *, int); int proc_state(struct proc_handle *); +int proc_getmodel(struct proc_handle *); pid_t proc_getpid(struct proc_handle *); int proc_wstatus(struct proc_handle *); int proc_getwstat(struct proc_handle *); Modified: head/lib/libproc/proc_create.c ============================================================================== --- head/lib/libproc/proc_create.c Sat Jul 30 03:07:14 2016 (r303532) +++ head/lib/libproc/proc_create.c Sat Jul 30 03:09:23 2016 (r303533) @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -38,57 +39,103 @@ #include #include +#include +#include + #include "_libproc.h" -static int proc_init(pid_t, int, int, struct proc_handle *); +static int getelfclass(int); +static int proc_init(pid_t, int, int, struct proc_handle **); + +static int +getelfclass(int fd) +{ + GElf_Ehdr ehdr; + Elf *e; + int class; + + class = ELFCLASSNONE; + + if ((e = elf_begin(fd, ELF_C_READ, NULL)) == NULL) + goto out; + if (gelf_getehdr(e, &ehdr) == NULL) + goto out; + class = ehdr.e_ident[EI_CLASS]; +out: + (void)elf_end(e); + return (class); +} static int -proc_init(pid_t pid, int flags, int status, struct proc_handle *phdl) +proc_init(pid_t pid, int flags, int status, struct proc_handle **pphdl) { - int mib[4], error; - size_t len; + struct kinfo_proc *kp; + struct proc_handle *phdl; + int error, class, count, fd; + + *pphdl = NULL; + if ((phdl = malloc(sizeof(*phdl))) == NULL) + return (ENOMEM); memset(phdl, 0, sizeof(*phdl)); phdl->pid = pid; phdl->flags = flags; phdl->status = status; + phdl->procstat = procstat_open_sysctl(); + if (phdl->procstat == NULL) + return (ENOMEM); - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PATHNAME; - mib[3] = pid; - len = sizeof(phdl->execname); - if (sysctl(mib, 4, phdl->execname, &len, NULL, 0) != 0) { - error = errno; - DPRINTF("ERROR: cannot get pathname for child process %d", pid); + /* Obtain a path to the executable. */ + if ((kp = procstat_getprocs(phdl->procstat, KERN_PROC_PID, pid, + &count)) == NULL) + return (ENOMEM); + error = procstat_getpathname(phdl->procstat, kp, phdl->execpath, + sizeof(phdl->execpath)); + procstat_freeprocs(phdl->procstat, kp); + if (error != 0) return (error); + + /* Use it to determine the data model for the process. */ + if ((fd = open(phdl->execpath, O_RDONLY)) < 0) { + error = errno; + goto out; } - if (len == 0) - phdl->execname[0] = '\0'; + class = getelfclass(fd); + switch (class) { + case ELFCLASS64: + phdl->model = PR_MODEL_LP64; + break; + case ELFCLASS32: + phdl->model = PR_MODEL_ILP32; + break; + case ELFCLASSNONE: + default: + error = EINVAL; + break; + } + (void)close(fd); - return (0); +out: + *pphdl = phdl; + return (error); } int proc_attach(pid_t pid, int flags, struct proc_handle **pphdl) { struct proc_handle *phdl; - int error = 0; - int status; + int error, status; if (pid == 0 || pid == getpid()) return (EINVAL); + if (elf_version(EV_CURRENT) == EV_NONE) + return (ENOENT); /* * Allocate memory for the process handle, a structure containing * all things related to the process. */ - if ((phdl = malloc(sizeof(struct proc_handle))) == NULL) - return (ENOMEM); - - elf_version(EV_CURRENT); - - error = proc_init(pid, flags, PS_RUN, phdl); + error = proc_init(pid, flags, PS_RUN, &phdl); if (error != 0) goto out; @@ -106,16 +153,17 @@ proc_attach(pid_t pid, int flags, struct } /* Check for an unexpected status. */ - if (WIFSTOPPED(status) == 0) + if (!WIFSTOPPED(status)) DPRINTFX("ERROR: child process %d status 0x%x", pid, status); else phdl->status = PS_STOP; out: - if (error) + if (error && phdl != NULL) { proc_free(phdl); - else - *pphdl = phdl; + phdl = NULL; + } + *pphdl = phdl; return (error); } @@ -128,14 +176,8 @@ proc_create(const char *file, char * con int status; pid_t pid; - /* - * Allocate memory for the process handle, a structure containing - * all things related to the process. - */ - if ((phdl = malloc(sizeof(struct proc_handle))) == NULL) - return (ENOMEM); - - elf_version(EV_CURRENT); + if (elf_version(EV_CURRENT) == EV_NONE) + return (ENOENT); /* Fork a new process. */ if ((pid = vfork()) == -1) @@ -153,9 +195,10 @@ proc_create(const char *file, char * con /* Couldn't execute the file. */ _exit(2); + /* NOTREACHED */ } else { /* The parent owns the process handle. */ - error = proc_init(pid, 0, PS_IDLE, phdl); + error = proc_init(pid, 0, PS_IDLE, &phdl); if (error != 0) goto bad; @@ -167,7 +210,7 @@ proc_create(const char *file, char * con } /* Check for an unexpected status. */ - if (WIFSTOPPED(status) == 0) { + if (!WIFSTOPPED(status)) { error = errno; DPRINTFX("ERROR: child process %d status 0x%x", pid, status); goto bad; @@ -175,15 +218,19 @@ proc_create(const char *file, char * con phdl->status = PS_STOP; } bad: - if (error) + if (error && phdl != NULL) { proc_free(phdl); - else - *pphdl = phdl; + phdl = NULL; + } + *pphdl = phdl; return (error); } void proc_free(struct proc_handle *phdl) { + + if (phdl->procstat != NULL) + procstat_close(phdl->procstat); free(phdl); } Modified: head/lib/libproc/proc_rtld.c ============================================================================== --- head/lib/libproc/proc_rtld.c Sat Jul 30 03:07:14 2016 (r303532) +++ head/lib/libproc/proc_rtld.c Sat Jul 30 03:09:23 2016 (r303533) @@ -49,7 +49,7 @@ map_iter(const rd_loadobj_t *lop, void * if (phdl->rdobjs == NULL) return (-1); } - if (strcmp(lop->rdl_path, phdl->execname) == 0 && + if (strcmp(lop->rdl_path, phdl->execpath) == 0 && (lop->rdl_prot & RD_RDL_X) != 0) phdl->rdexec = &phdl->rdobjs[phdl->nobjs]; memcpy(&phdl->rdobjs[phdl->nobjs++], lop, sizeof(*lop)); Modified: head/lib/libproc/proc_util.c ============================================================================== --- head/lib/libproc/proc_util.c Sat Jul 30 03:07:14 2016 (r303532) +++ head/lib/libproc/proc_util.c Sat Jul 30 03:09:23 2016 (r303533) @@ -140,6 +140,16 @@ proc_getpid(struct proc_handle *phdl) } int +proc_getmodel(struct proc_handle *phdl) +{ + + if (phdl == NULL) + return (-1); + + return (phdl->model); +} + +int proc_wstatus(struct proc_handle *phdl) { int status; Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Sat Jul 30 03:07:14 2016 (r303532) +++ head/share/mk/src.libnames.mk Sat Jul 30 03:09:23 2016 (r303533) @@ -255,7 +255,7 @@ _DP_proc= supcplusplus .if ${MK_CDDL} != "no" _DP_proc+= ctf .endif -_DP_proc+= elf rtld_db util +_DP_proc+= elf procstat rtld_db util _DP_mp= crypto _DP_memstat= kvm _DP_magic= z From owner-svn-src-all@freebsd.org Sat Jul 30 03:09:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5027CBA765D; Sat, 30 Jul 2016 03:09:59 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03138149D; Sat, 30 Jul 2016 03:09:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U39wnr006179; Sat, 30 Jul 2016 03:09:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U39whe006177; Sat, 30 Jul 2016 03:09:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607300309.u6U39whe006177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 30 Jul 2016 03:09:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303534 - in head/cddl/contrib/opensolaris/lib/libdtrace: arm i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 03:09:59 -0000 Author: markj Date: Sat Jul 30 03:09:57 2016 New Revision: 303534 URL: https://svnweb.freebsd.org/changeset/base/303534 Log: libdtrace: Don't hard-code the native data model. MFC after: 1 month Modified: head/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c head/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c Sat Jul 30 03:09:23 2016 (r303533) +++ head/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c Sat Jul 30 03:09:57 2016 (r303534) @@ -38,9 +38,7 @@ #include #include -#if !defined(sun) -#define PR_MODEL_ILP32 1 -#define PR_MODEL_LP64 2 +#ifdef __FreeBSD__ #include #endif Modified: head/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c Sat Jul 30 03:09:23 2016 (r303533) +++ head/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c Sat Jul 30 03:09:57 2016 (r303534) @@ -39,9 +39,8 @@ #include -#ifndef illumos -#define PR_MODEL_ILP32 1 -#define PR_MODEL_LP64 2 +#ifdef __FreeBSD__ +#include #include #endif @@ -93,11 +92,7 @@ dt_pid_has_jump_table(struct ps_prochand char dmodel = Pstatus(P)->pr_dmodel; #else pid_t pid = proc_getpid(P); -#if __i386__ - char dmodel = PR_MODEL_ILP32; -#elif __amd64__ - char dmodel = PR_MODEL_LP64; -#endif + char dmodel = proc_getmodel(P); #endif /* @@ -149,11 +144,7 @@ dt_pid_create_return_probe(struct ps_pro char dmodel = Pstatus(P)->pr_dmodel; #else pid_t pid = proc_getpid(P); -#if __i386__ - char dmodel = PR_MODEL_ILP32; -#elif __amd64__ - char dmodel = PR_MODEL_LP64; -#endif + char dmodel = proc_getmodel(P); #endif /* @@ -310,11 +301,7 @@ dt_pid_create_offset_probe(struct ps_pro char dmodel = Pstatus(P)->pr_dmodel; #else pid_t pid = proc_getpid(P); -#if __i386__ - char dmodel = PR_MODEL_ILP32; -#elif __amd64__ - char dmodel = PR_MODEL_LP64; -#endif + char dmodel = proc_getmodel(P); #endif if ((text = malloc(symp->st_size)) == NULL) { @@ -393,11 +380,7 @@ dt_pid_create_glob_offset_probes(struct char dmodel = Pstatus(P)->pr_dmodel; #else pid_t pid = proc_getpid(P); -#if __i386__ - char dmodel = PR_MODEL_ILP32; -#elif __amd64__ - char dmodel = PR_MODEL_LP64; -#endif + char dmodel = proc_getmodel(P); #endif ftp->ftps_type = DTFTP_OFFSETS; From owner-svn-src-all@freebsd.org Sat Jul 30 03:11:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90F29BA7810; Sat, 30 Jul 2016 03:11:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F54E173D; Sat, 30 Jul 2016 03:11:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U3BrAb008962; Sat, 30 Jul 2016 03:11:53 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U3Brr9008960; Sat, 30 Jul 2016 03:11:53 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607300311.u6U3Brr9008960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 30 Jul 2016 03:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303535 - in head/sys/cddl/contrib/opensolaris/uts: common/dtrace intel/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 03:11:54 -0000 Author: markj Date: Sat Jul 30 03:11:53 2016 New Revision: 303535 URL: https://svnweb.freebsd.org/changeset/base/303535 Log: Include fasttrap handling for DATAMODEL_ILP32 when compiling for amd64. MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Sat Jul 30 03:09:57 2016 (r303534) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Sat Jul 30 03:11:53 2016 (r303535) @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include @@ -930,6 +931,13 @@ again: ASSERT(0); } +#ifdef __FreeBSD__ + if (SV_PROC_FLAG(p, SV_LP64)) + p->p_model = DATAMODEL_LP64; + else + p->p_model = DATAMODEL_ILP32; +#endif + /* * If the ISA-dependent initialization goes to plan, go back to the * beginning and try to install this freshly made tracepoint. Modified: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat Jul 30 03:09:57 2016 (r303534) +++ head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat Jul 30 03:11:53 2016 (r303535) @@ -43,11 +43,11 @@ #include #include #else -#include #include +#include #include #include -#include +#include #include #include #include @@ -283,12 +283,10 @@ fasttrap_anarg(struct reg *rp, int funct DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | CPU_DTRACE_BADADDR); } else { #endif -#ifdef __i386 - uint32_t *stack = (uint32_t *)rp->r_esp; + uint32_t *stack = (uint32_t *)rp->r_rsp; DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); value = dtrace_fuword32(&stack[argno + shift]); DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | CPU_DTRACE_BADADDR); -#endif #ifdef __amd64 } #endif @@ -716,7 +714,6 @@ fasttrap_fulword_noerr(const void *uaddr } #endif -#ifdef __i386__ static uint32_t fasttrap_fuword32_noerr(const void *uaddr) { @@ -727,7 +724,6 @@ fasttrap_fuword32_noerr(const void *uadd return (0); } -#endif static void fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid, @@ -842,7 +838,6 @@ fasttrap_usdt_args64(fasttrap_probe_t *p } #endif -#ifdef __i386__ static void fasttrap_usdt_args32(fasttrap_probe_t *probe, struct reg *rp, int argc, uint32_t *argv) @@ -860,7 +855,6 @@ fasttrap_usdt_args32(fasttrap_probe_t *p argv[i] = 0; } } -#endif static int fasttrap_do_seg(fasttrap_tracepoint_t *tp, struct reg *rp, uintptr_t *addr) @@ -1094,7 +1088,6 @@ fasttrap_pid_probe(struct reg *rp) if (tp->ftt_ids != NULL) { fasttrap_id_t *id; -#ifdef __amd64 if (p->p_model == DATAMODEL_LP64) { for (id = tp->ftt_ids; id != NULL; id = id->fti_next) { fasttrap_probe_t *probe = id->fti_probe; @@ -1136,9 +1129,8 @@ fasttrap_pid_probe(struct reg *rp) } } } else { -#else /* __amd64 */ uintptr_t s0, s1, s2, s3, s4, s5; - uint32_t *stack = (uint32_t *)rp->r_esp; + uint32_t *stack = (uint32_t *)rp->r_rsp; /* * In 32-bit mode, all arguments are passed on the @@ -1191,10 +1183,7 @@ fasttrap_pid_probe(struct reg *rp) t[2], t[3], t[4]); } } -#endif /* __amd64 */ -#ifdef __amd64 } -#endif } /* @@ -1259,12 +1248,10 @@ fasttrap_pid_probe(struct reg *rp) addr = rp->r_rsp + sizeof (uintptr_t); } else { #endif -#ifdef __i386__ uint32_t dst32; - ret = dst32 = fasttrap_fuword32((void *)rp->r_esp); + ret = dst32 = fasttrap_fuword32((void *)rp->r_rsp); dst = dst32; - addr = rp->r_esp + sizeof (uint32_t); -#endif + addr = rp->r_rsp + sizeof (uint32_t); #ifdef __amd64 } #endif @@ -1409,10 +1396,8 @@ fasttrap_pid_probe(struct reg *rp) ret = fasttrap_sulword((void *)rp->r_rsp, rp->r_rbp); } else { #endif -#ifdef __i386__ rp->r_rsp -= sizeof (uint32_t); ret = fasttrap_suword32((void *)rp->r_rsp, rp->r_rbp); -#endif #ifdef __amd64 } #endif @@ -1732,7 +1717,6 @@ fasttrap_pid_probe(struct reg *rp) i += sizeof (uint64_t); } else { #endif -#ifdef __i386__ /* * Set up the jmp to the next instruction; note that * the size of the traced instruction cancels out. @@ -1741,7 +1725,6 @@ fasttrap_pid_probe(struct reg *rp) /* LINTED - alignment */ *(uint32_t *)&scratch[i] = pc - addr - 5; i += sizeof (uint32_t); -#endif #ifdef __amd64 } #endif From owner-svn-src-all@freebsd.org Sat Jul 30 03:11:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66111BA7815; Sat, 30 Jul 2016 03:11:55 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36D991743; Sat, 30 Jul 2016 03:11:55 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U3BsvT009006; Sat, 30 Jul 2016 03:11:54 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U3Bs2r009005; Sat, 30 Jul 2016 03:11:54 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201607300311.u6U3Bs2r009005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Sat, 30 Jul 2016 03:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303536 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 03:11:55 -0000 Author: ache Date: Sat Jul 30 03:11:54 2016 New Revision: 303536 URL: https://svnweb.freebsd.org/changeset/base/303536 Log: Rework r303074 case 4. Don't immediatelly skip directory entries which cause MAXPATHLEN exceeded. Process them first through gl_errfunc() and GLOB_ERR. Modified: head/lib/libc/gen/glob.c Modified: head/lib/libc/gen/glob.c ============================================================================== --- head/lib/libc/gen/glob.c Sat Jul 30 03:11:53 2016 (r303535) +++ head/lib/libc/gen/glob.c Sat Jul 30 03:11:54 2016 (r303536) @@ -803,6 +803,13 @@ glob3(Char *pathbuf, Char *pathend, Char } sc += clen; } + if (too_long && ((pglob->gl_errfunc != NULL && + pglob->gl_errfunc(buf, ENAMETOOLONG)) || + (pglob->gl_flags & GLOB_ERR))) { + errno = ENAMETOOLONG; + err = GLOB_ABORTED; + break; + } if (too_long || !match(pathend, pattern, restpattern)) { *pathend = EOS; errno = 0; From owner-svn-src-all@freebsd.org Sat Jul 30 03:43:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FD8ABA7FB3; Sat, 30 Jul 2016 03:43:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 596351B65; Sat, 30 Jul 2016 03:43:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U3ht9K020895; Sat, 30 Jul 2016 03:43:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U3htdj020894; Sat, 30 Jul 2016 03:43:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607300343.u6U3htdj020894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 30 Jul 2016 03:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303537 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 03:43:56 -0000 Author: markj Date: Sat Jul 30 03:43:55 2016 New Revision: 303537 URL: https://svnweb.freebsd.org/changeset/base/303537 Log: Add libprocstat prebuild library dependencies. X-MFC-With: r303531 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Jul 30 03:11:54 2016 (r303536) +++ head/Makefile.inc1 Sat Jul 30 03:43:55 2016 (r303537) @@ -2096,6 +2096,7 @@ cddl/lib/libctf__L: lib/libz__L # on select architectures though (see cddl/lib/Makefile) .if ${MACHINE_CPUARCH} != "sparc64" _prebuild_libs+= lib/libprocstat lib/libproc lib/librtld_db +lib/libprocstat__L: lib/libelf__L lib/libkvm__L lib/libutil__L lib/libproc__L: lib/libprocstat__L lib/librtld_db__L: lib/libprocstat__L .endif From owner-svn-src-all@freebsd.org Sat Jul 30 04:15:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41D5DBA895B; Sat, 30 Jul 2016 04:15:15 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id DBEA11DC9; Sat, 30 Jul 2016 04:15:14 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 02717D6676B; Sat, 30 Jul 2016 14:15:09 +1000 (AEST) Date: Sat, 30 Jul 2016 14:15:08 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Andrey A. Chernov" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303530 - head/lib/libc/gen In-Reply-To: <201607300209.u6U29BXC082700@repo.freebsd.org> Message-ID: <20160730140305.G1962@besplex.bde.org> References: <201607300209.u6U29BXC082700@repo.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=EfU1O6SC c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=5p-0Ik2aV_OXGSlI9iwA:9 a=CjuIK1q_8ugA:10 a=oCwRYk8rWbsA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 04:15:15 -0000 On Sat, 30 Jul 2016, Andrey A. Chernov wrote: > Log: > Reset errno for readdirfunc() before contunue. In C99, library functions are not permitted to set errno to 0. The glob() family shouldn't use a different (worse) convention, and POSIX doesn't seem to have any special wording to allow different behaviour. Bruce From owner-svn-src-all@freebsd.org Sat Jul 30 04:39:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C071BA8D2F for ; Sat, 30 Jul 2016 04:39:24 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) (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 1D1881AFC for ; Sat, 30 Jul 2016 04:39:23 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f51.google.com with SMTP id l69so83367157lfg.1 for ; Fri, 29 Jul 2016 21:39:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=xqAd4VFFeC5I5pqiTTVdXnTrm6QoKt+9jZPE+YT3z+k=; b=S+VwrixdbQGBNeri0dIbIJnZBgjQr2IdiBf6AIkLKoNkU71y3zRPUMvQdr6kXv31Vv F0IPipCO1fHrfFQ/9OwR2CN3oAXZUSEKx9ihECDW1A+DDmaLw1Bur3Fsa7SEWbR/mbNK 68CR8fyXWg0YedE4UmJoxMsUJ3fGpXhtyAubLt6YwRwG5BE3G0VHew2GyRVYBcaYRPfN 00v9SdqI33/0dIN8mjfUO4pUEaqYytMMSr5876ZQjDm21j4JX/EOLZZcXjZMrLGH3c4H YUU8UW0zpLdXvmYcf/J5uK9P1HhXmbQhqpVVNC54UymUzZQhKG7Xcn97EGAS7vm9JHV0 WI+Q== X-Gm-Message-State: AEkoouv1HHuw6/piUkBMcDfOF1tcyJiraTrte750nuaMRbBJF/kziNRomfTH0PM6AhPhEA== X-Received: by 10.25.41.142 with SMTP id p136mr16301321lfp.32.1469853057559; Fri, 29 Jul 2016 21:30:57 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id r196sm3242672lfd.41.2016.07.29.21.30.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jul 2016 21:30:57 -0700 (PDT) Subject: Re: svn commit: r303530 - head/lib/libc/gen To: Bruce Evans References: <201607300209.u6U29BXC082700@repo.freebsd.org> <20160730140305.G1962@besplex.bde.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Andrey Chernov Message-ID: <84c77b80-8b51-8698-f27a-7f6452867d66@freebsd.org> Date: Sat, 30 Jul 2016 07:30:55 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160730140305.G1962@besplex.bde.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 04:39:24 -0000 On 30.07.2016 7:15, Bruce Evans wrote: > On Sat, 30 Jul 2016, Andrey A. Chernov wrote: > >> Log: >> Reset errno for readdirfunc() before contunue. > > In C99, library functions are not permitted to set errno to 0. The glob() > family shouldn't use a different (worse) convention, and POSIX doesn't > seem to have any special wording to allow different behaviour. This is historic practice for this function at least since GLOB_LIMIT was introduced (in 2001) and common across NetBSD/OpenBSD. Existent programs may relay on that to check that limit is reached and not allocation error, so with few additional overwriting from my side I add nothing new: Revision 80525 Modified Sun Jul 29 00:52:37 2001 UTC (15 years ago) by mikeh Rename the GLOB_MAXPATH flag of glob(3) to GLOB_LIMIT to be compatible with NetBSD and OpenBSD. glob(3) will now return GLOB_NOSPACE with errno set to 0 instead of GLOB_LIMIT when we match more than `gl_matchc' patterns. GLOB_MAXPATH has been left as an alias of GLOB_LIMIT to maintain backwards compatibility. errno = 0 is documented. See glob(3), GLOB_NOSPACE section too. The real problem is that glob(3) is very limited in error return codes, so they reuse existent codes with errno hack. From owner-svn-src-all@freebsd.org Sat Jul 30 04:40:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4D4CBA8D97; Sat, 30 Jul 2016 04:40:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 775581BB7; Sat, 30 Jul 2016 04:40:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U4eiqb040160; Sat, 30 Jul 2016 04:40:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U4eihT040159; Sat, 30 Jul 2016 04:40:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607300440.u6U4eihT040159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 30 Jul 2016 04:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303538 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 04:40:45 -0000 Author: ngie Date: Sat Jul 30 04:40:44 2016 New Revision: 303538 URL: https://svnweb.freebsd.org/changeset/base/303538 Log: Explicitly test for cu_fgets returning NULL or !NULL MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/sed/compile.c Modified: head/usr.bin/sed/compile.c ============================================================================== --- head/usr.bin/sed/compile.c Sat Jul 30 03:43:55 2016 (r303537) +++ head/usr.bin/sed/compile.c Sat Jul 30 04:40:44 2016 (r303538) @@ -546,7 +546,7 @@ compile_subst(const char *p, struct s_su if ((text = realloc(text, asize)) == NULL) err(1, "realloc"); } - } while ((p = cu_fgets(&more))); + } while ((p = cu_fgets(&more)) != NULL); errx(1, "%lu: %s: unterminated substitute in regular expression", linenum, fname); /* NOTREACHED */ @@ -733,7 +733,7 @@ compile_text(size_t *ptlen) if ((text = malloc(asize)) == NULL) err(1, "malloc"); size = 0; - while ((p = cu_fgets(NULL))) { + while ((p = cu_fgets(NULL)) != NULL) { op = s = text + size; for (esc_nl = 0; *p != '\0'; p++) { if (*p == '\\' && p[1] != '\0' && *++p == '\n') From owner-svn-src-all@freebsd.org Sat Jul 30 06:18:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E179FBA8F3B; Sat, 30 Jul 2016 06:18:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x243.google.com (mail-pa0-x243.google.com [IPv6:2607:f8b0:400e:c03::243]) (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 AE9FF13A2; Sat, 30 Jul 2016 06:18:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x243.google.com with SMTP id q2so6305063pap.0; Fri, 29 Jul 2016 23:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=tEuhnHT4yJZtcgiE7UosZ6PF+m3zQT7gd69dsWmqchE=; b=Olq6la+3NjcHGtm1wwIlaKaVLmlTPtTISqrsn1YukuUzL5Hx/bCvHMi7UxrA77UAQ8 96Slt0lj+ecNAZhOGKnpCa4sSLUvgK5Q+cPDXtG7xyExrsGhbGUtgat4TYVMHXjcwCqE ZPuJkW+T3l+jLLSWpxmcSigMTzBTvwkOCZ49oIGbxv2d4ZqqAYCscMGbiKJj7AdHs9Ky BsT/ilZDZbMs8Qz1aG6fN0EofHb8bOgItleBhjgJ6GDGM6j5w8r+PDwG43jFgN3BTlFQ e5H9xK9FOcBLXvYmYwQoGEKdT0LATtq6nkGNavarOcNOtZavlgQmwhpZ3oBQku3ztBUX zeaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=tEuhnHT4yJZtcgiE7UosZ6PF+m3zQT7gd69dsWmqchE=; b=KwbJ6bXXsUw4zNRKhcE465aaPPzRx3JiLklmw5/6oHnMfPd1NDaGZF11EYP6nTabdB /p1lWvaHGQlBiEHbThj8Sky0LApqdAe2xhtgzLK/2+pBQW7Yv10Z4TqqtPexv9lyZey3 cUPH3tlNx/53aOwQ9f5HA9gAxXc+TkV94tYM5n7z8gMtwR7mnh6NIW+2cP3WRI5IG1lY v1P/4zhXMpfUO3G0OEDFdcPZP1qNtaAeaoaH8Ct27Xbs5r6PkokH58yhblviX7nQjI7U WN2osK+UqUE3viiLHcFTSKARnhAS3eAuukeBaq9p2Ef4+nasK5YHxRZ5chfYOtDDAycP 1WyA== X-Gm-Message-State: AEkoousMj6YRxsZudRMHRukZyqhdZncElpFkAC9qY1kFWL1QqlDBjZW1Cs+KjXICFFWRTw== X-Received: by 10.66.216.41 with SMTP id on9mr76303891pac.86.1469859509212; Fri, 29 Jul 2016 23:18:29 -0700 (PDT) Received: from [192.168.20.9] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id u7sm29123489paz.45.2016.07.29.23.18.26 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jul 2016 23:18:27 -0700 (PDT) Subject: Re: svn commit: r303535 - in head/sys/cddl/contrib/opensolaris/uts: common/dtrace intel/dtrace Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_18377704-992B-4880-8691-0C4C4791FBD7"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201607300311.u6U3Brr9008960@repo.freebsd.org> Date: Fri, 29 Jul 2016 23:18:25 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201607300311.u6U3Brr9008960@repo.freebsd.org> To: Mark Johnston X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 06:18:30 -0000 --Apple-Mail=_18377704-992B-4880-8691-0C4C4791FBD7 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jul 29, 2016, at 20:11, Mark Johnston wrote: > > Author: markj > Date: Sat Jul 30 03:11:53 2016 > New Revision: 303535 > URL: https://svnweb.freebsd.org/changeset/base/303535 > > Log: > Include fasttrap handling for DATAMODEL_ILP32 when compiling for amd64. > > MFC after: 1 month This broke i386: https://jenkins.freebsd.org/job/FreeBSD_HEAD_i386/3722/ . Thanks, -Ngie --Apple-Mail=_18377704-992B-4880-8691-0C4C4791FBD7 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJXnEayAAoJEPWDqSZpMIYVkr8QAKDnLnJ/WeBNcjElIYmNekeb 8VsEFfFtdy/LYEkH8uWz7DFPenAFH5jHXCcxzaUVjvOiqzZy2UnsYrDaeDE1gKuw OfwnLImeQ0D7OR/l+eQe1Bz7zmB+VGt86ItgmJFEIFkKdwvf4DfOIP9Gfth8Ke5W k6vC87pOsuPANL3/l5EfzWZP44TCDuO+DnbH1xVViY1LzpKR9wDC0Kv68AZzSeyk 4Z1cAirm1aqvZfZqtOgQCamLCaGw+RkhNLFby39WbCuM0iNPJv6JvMzEG9l2fk8a PdleeM5WwtNpbpL8ChcZvt38n+vySmxAs9/HPxEbgcO434Ir6dNSEAL/apIvV0uP zcF7dU+HOthreavAWZL8H5ljDyGgFYcB8TwJIZWBLxuMdtfzW9ozIJSgylPawoqV YykT+0LqZI6mv6QKIIrf5r5zcYkptkcMmL4Mqd+uAik+A1AXMLvKX4afsetQE8MA izxduFdFV+qPK231zqqQEKLB6FqBQZ1HvS93SDQrhxC4UdDJKrQL7XObNgZJSMqE oa7tmMswODM0Pu0tp1WuHuTPSAWs+/EdT6l1ot6mSj9hGaBd4KmjC+jKxv/6275M L7gEZrWstJHvdx+/I2iVLC8WGfqTFd2boyLVFOx8pt0d3GwJxBEe+aWeuNiGLvJg XmZIbu6NOaAeUv3GmjvS =BHhu -----END PGP SIGNATURE----- --Apple-Mail=_18377704-992B-4880-8691-0C4C4791FBD7-- From owner-svn-src-all@freebsd.org Sat Jul 30 06:19:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC9D0BA900E; Sat, 30 Jul 2016 06:19:35 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B85941596; Sat, 30 Jul 2016 06:19:35 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U6JYW5076615; Sat, 30 Jul 2016 06:19:34 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U6JYTY076614; Sat, 30 Jul 2016 06:19:34 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201607300619.u6U6JYTY076614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sat, 30 Jul 2016 06:19:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303539 - head/sbin/fsdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 06:19:36 -0000 Author: araujo Date: Sat Jul 30 06:19:34 2016 New Revision: 303539 URL: https://svnweb.freebsd.org/changeset/base/303539 Log: Use nitems() from sys/param.h. Sponsored by: gandi.net (BSD Day Taiwan) Modified: head/sbin/fsdb/fsdb.c Modified: head/sbin/fsdb/fsdb.c ============================================================================== --- head/sbin/fsdb/fsdb.c Sat Jul 30 04:40:44 2016 (r303538) +++ head/sbin/fsdb/fsdb.c Sat Jul 30 06:19:34 2016 (r303539) @@ -898,7 +898,7 @@ CMDFUNCSTART(newtype) return 1; type = DIP(curinode, di_mode) & IFMT; for (tp = typenamemap; - tp < &typenamemap[sizeof(typenamemap)/sizeof(*typenamemap)]; + tp < &typenamemap[nitems(typenamemap)]; tp++) { if (!strcmp(argv[1], tp->typename)) { printf("setting type to %s\n", tp->typename); @@ -906,7 +906,7 @@ CMDFUNCSTART(newtype) break; } } - if (tp == &typenamemap[sizeof(typenamemap)/sizeof(*typenamemap)]) { + if (tp == &typenamemap[nitems(typenamemap)]) { warnx("type `%s' not known", argv[1]); warnx("try one of `file', `dir', `socket', `fifo'"); return 1; From owner-svn-src-all@freebsd.org Sat Jul 30 06:20:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 096BEBA906A; Sat, 30 Jul 2016 06:20:16 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (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 CB4E51706; Sat, 30 Jul 2016 06:20:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id i6so6586119pfe.0; Fri, 29 Jul 2016 23:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=SH0lkqjXNuJSYcI7HPP6ebuX0cLuKXrfDxj4d7ZJpng=; b=V7kgMU1EXdksit+7MX9E42+RphVJmfH+PMesRBdcdlvNQ292Q5vPgVjqV4fdHIw8RK glpl1wBQ7fNiyMyWl+fk4wo4GedCBkkwDsnowD87sWw4E+5trVJyr7n5plAADDMbmVp/ +91+qHpF0rDtveFEElfrABTfZaDBqoa8E2Dl9zUB73tbxyOWyEQ4K22arpTTg09lOedv AluyF568NhvFKRi4RYU11CDHV+OqE1nyU1TjH2d/ttN+HqVlyTQqAXYEMvGz5xbBSnYO zF01rHLmpYP1H2K1xjekNZ7WpX5o0Zt83mNVwo+Zs7ORok7IJODE5Jy3RzqK8/BLnCmA 87Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=SH0lkqjXNuJSYcI7HPP6ebuX0cLuKXrfDxj4d7ZJpng=; b=E5x7VkZMPwHG0fSHg2QVrytp/owt9xDNPMHK0t5BD96DA/XMcRHG8sDOuBIFhEsuHH 0NCImTVoozYb6K60kNLMxELFslXZWIyavkH76yddzC+u2n6uQJthkOIJk81qKigkXcz1 MBUUkLnGFbHG112EU73CXDNDvuqYp1Z4JW555szVhsW2DjaYBtPzBq74e6BV33Nel6sM DcOvuaHDHLOjjARM/KrEMhBAiGvt7PD5SBI2EkCPbpIsxdoZMzIwowfbKJYaVDIxx6J9 ydt6Uqf4qYTFRKSk8yV0Mb8TKLEhRhkDYjr/F/nSPmyRhuTp/NFal5pSM7ELl5sXsr/a kuvg== X-Gm-Message-State: AEkooutAt4/HG+NJLs0jQfoQI5JXpPUEF4FFybDT4r/tSsLwLz7R1703zIB8Ke29zNQQ1w== X-Received: by 10.98.74.201 with SMTP id c70mr75516502pfj.113.1469859615314; Fri, 29 Jul 2016 23:20:15 -0700 (PDT) Received: from [192.168.20.9] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id cp11sm29279496pac.28.2016.07.29.23.20.14 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jul 2016 23:20:14 -0700 (PDT) Subject: Re: svn commit: r303539 - head/sbin/fsdb Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_F86FF17E-A310-4132-A3B0-4715060A2625"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201607300619.u6U6JYTY076614@repo.freebsd.org> Date: Fri, 29 Jul 2016 23:20:14 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <79B9259B-BC2C-4118-802A-84E870059F1F@gmail.com> References: <201607300619.u6U6JYTY076614@repo.freebsd.org> To: Marcelo Araujo X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 06:20:16 -0000 --Apple-Mail=_F86FF17E-A310-4132-A3B0-4715060A2625 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jul 29, 2016, at 23:19, Marcelo Araujo wrote: > > Author: araujo > Date: Sat Jul 30 06:19:34 2016 > New Revision: 303539 > URL: https://svnweb.freebsd.org/changeset/base/303539 > > Log: > Use nitems() from sys/param.h. MFC after? --Apple-Mail=_F86FF17E-A310-4132-A3B0-4715060A2625 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJXnEceAAoJEPWDqSZpMIYVUF4QAIp5GuDk3HYijMsPWNw96a1u L0gUTx24tm6hITDC1VDavnBqohIJ9flRWHNfSHU75prA58MpD826ZJwe6XxZExkg 4Otbcxa++jSKjSGQzv1sn1Gvm2kGalIT389oD0sGuHXa3S8RumWwoaWVd6PjUCm4 QuXGuNjOHmUx70ft6rpP+JNHkIlPa/Td81ivPhwkVivQvk2wW7HJoewok9lT4+YE rJhXt5tnxV+tinb8+pN3RJFONvej00yuE5S3tWFO3BF9YVvsHFBS90kLIYlKqW4y IdHkUWCeKMLENYAXtCigYxX4sT23GRanp7pn1S2gfB34a3IjbJb8Wsu6kdT1SwQZ kIlfzhJlLayEA1fPZitzyyP9yxtPEX2KxRbnqzoYdLrNCgJaL889yKrfFMRJlJhE etCDJc7BQxG6bMM0kmmomF5LHYAFiSiB7YPOaGKLleb6M5kG9RzDulzJQvSRfmdy dfW5dN5nPCLhQIQvfHQnJFjPKT/yar3roCxE1/ODTk1OLeFK0cLYS2kAUwAnocyI HDjhnfr2fud+N5vWlC6D9y6QzVRJPONH5VHz43eyW61NpCidQteafHcjeD3r4x7U UMBecCNMCnsBzLcy3qQCvnRkWDDaY8PoN+7M04UNit0PqjBAyH6+Md6sVG/1CiSW tnTrjjS9zfksoWOY/N1P =k30o -----END PGP SIGNATURE----- --Apple-Mail=_F86FF17E-A310-4132-A3B0-4715060A2625-- From owner-svn-src-all@freebsd.org Sat Jul 30 06:32:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08C39BA939B; Sat, 30 Jul 2016 06:32:20 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFD2B1DB2; Sat, 30 Jul 2016 06:32:19 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U6WJ0t081531; Sat, 30 Jul 2016 06:32:19 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U6WJc5081530; Sat, 30 Jul 2016 06:32:19 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201607300632.u6U6WJc5081530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sat, 30 Jul 2016 06:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303540 - head/usr.bin/at X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 06:32:20 -0000 Author: araujo Date: Sat Jul 30 06:32:18 2016 New Revision: 303540 URL: https://svnweb.freebsd.org/changeset/base/303540 Log: Use nitems() from sys/param.h Sponsored by: gandi.net (BSD Day Taiwan) Modified: head/usr.bin/at/at.c Modified: head/usr.bin/at/at.c ============================================================================== --- head/usr.bin/at/at.c Sat Jul 30 06:19:34 2016 (r303539) +++ head/usr.bin/at/at.c Sat Jul 30 06:32:18 2016 (r303540) @@ -356,7 +356,7 @@ writefile(time_t runtimer, char queue) else { size_t i; - for (i=0; i Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFB06BA940A; Sat, 30 Jul 2016 06:33:55 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-yw0-x231.google.com (mail-yw0-x231.google.com [IPv6:2607:f8b0:4002:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A0B51F68; Sat, 30 Jul 2016 06:33:55 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-yw0-x231.google.com with SMTP id j12so132494167ywb.2; Fri, 29 Jul 2016 23:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=GICjfmfolEbG+EOpNReUhWqu9IvzgUlKfHf8wOhtzEo=; b=oav3MWm1PpYx4w13eXM56RREbe2GasXMw4PY+c6a4v06P9J0C1t5xNd36puSzx5IJg a1OJkY3oP72Hh+906wAcbebyHInttld5VRz+R4iEEJPmN487W60k7lntibe1lQ9/ODO5 lwF+yslbn9pZKqV485vlQot2v+O6kled9g7yqdf6Ab+3pPl4OmHxNXzJwB5NEt5F/2pO KJmSmvMguUUAeOE3M/q+HfQKUEtmztIiwLuqVzflnjmQaaGOcB7tPJDqxcnw6691F5T3 SUDsbH+iSLwiKk+/S/1LOW7c75/ruWs8vRcSqf9uWWcfWEr28mZZYMra4ZVoJ+U5T96q YFvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=GICjfmfolEbG+EOpNReUhWqu9IvzgUlKfHf8wOhtzEo=; b=CgJEjd/CpZNBHrlmAqoUhGIbry3k2i9XkS2YFEfYN13zOjkBi5r7AxmJdaH/TUlKdt i9C+MRGwUyOTx/4AkMlx/ZgOm6ZolPwTmxNp4yc33iiwpIAd4/+yjYJxEAezYdSIeXBX PWvpYuS2mrrluIhllFWve+x8yJ6BXLeRFmcTjqHK0um5FhgzA6Q85Y/bJuWxMaDRqKBw mFhuk9ND8G/84f/V8m7j/LI+UvODQNOGUmh/uqG4Ss1IX3t51Y9SzKZ0+CVcm5hMmVrc EMjwDhN5MaIPTV7ek9EmjgBgDC4EeWTtU/eEp8u3+18EAt1EFln2Y0bH4uAT2HoofBRP vBJA== X-Gm-Message-State: AEkoouvErm89p3HiUUviC9kLfWv04l1mulE9OxH7K9pxKbTHjWAlnYlk4Z4pRYjUgvJLG2ArW7Gq7hwDHPCKbA== X-Received: by 10.13.241.66 with SMTP id a63mr14044555ywf.162.1469860434603; Fri, 29 Jul 2016 23:33:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.56.130 with HTTP; Fri, 29 Jul 2016 23:33:54 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: <79B9259B-BC2C-4118-802A-84E870059F1F@gmail.com> References: <201607300619.u6U6JYTY076614@repo.freebsd.org> <79B9259B-BC2C-4118-802A-84E870059F1F@gmail.com> From: Marcelo Araujo Date: Sat, 30 Jul 2016 14:33:54 +0800 Message-ID: Subject: Re: svn commit: r303539 - head/sbin/fsdb To: "Ngie Cooper (yaneurabeya)" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 06:33:55 -0000 2016-07-30 14:20 GMT+08:00 Ngie Cooper (yaneurabeya) : > > > On Jul 29, 2016, at 23:19, Marcelo Araujo wrote: > > > > Author: araujo > > Date: Sat Jul 30 06:19:34 2016 > > New Revision: 303539 > > URL: https://svnweb.freebsd.org/changeset/base/303539 > > > > Log: > > Use nitems() from sys/param.h. > > MFC after? > Thanks again as always you remind me. MFC after 2 weeks. -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-all@freebsd.org Sat Jul 30 06:34:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6EECBA9439; Sat, 30 Jul 2016 06:34:22 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-yw0-x231.google.com (mail-yw0-x231.google.com [IPv6:2607:f8b0:4002:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9613122B; Sat, 30 Jul 2016 06:34:22 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-yw0-x231.google.com with SMTP id r9so133138577ywg.0; Fri, 29 Jul 2016 23:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=QhlVvziuw1x3zwpWrqaZvQyJp2LKrBYj9JYn6MSajsk=; b=YBBWQ4pXLJ5RktDSqspx5TO2YXMyCYDRI4XzyBktnOcPl4QwNwGMuG/UIoqNyJcif3 nEpambk3otEJzzaDlv/ZnAeREJqSAHRYx9IxUjlHw9m4O+4+iAwT6xnLUx6Fo65lr7Aq Siu99lD1YAAMQG3TwXwecIldiv2CRzfDlAkWH8DJC1I73/ZJfsybpOqCd+r8Q52hBwbM sNZ7ee1BsJRTYwkLKqIe6kwUGH2Az40lt1IOWWZSFv+gDeSQkcCQAiLiuB8vH1iWHgsj pBmWMU77vcUnh6bgtgfe7LKSHCF5FrHshP/3U7qP6Wk68R30uHOtb9kKCma708K92T3c R/Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=QhlVvziuw1x3zwpWrqaZvQyJp2LKrBYj9JYn6MSajsk=; b=de8dp1Y89pumCBqL4bTzSq5eSg6/tskYoMz7AMu+DxHt3yOf66ZKxTp6qdeTUaGpfC U5EYbHdN1HTSil4SIZNSRIMifpGCGqEHDJIqbH0bxFaWwROrWv0arzHvkEQkM0oybEqk TvXikvOGhGZc6EjjfkaFmZuWEa9luEiReN36449kkigXipfUTTkBvLS7/wyxoDKJVXKX 5eBHEB5cLWumvul+Julii6djCD6iPFF3surWT4UtD/WOZnoun1u57O2xehznfV5Kn5WW CAxqo6NJT4vyqdCCYoec8yX9Fh6VUao4J7Xb3mBuke+PBPPgwAqFduzqCV0OLBPY0yzZ QiNQ== X-Gm-Message-State: AEkoouvPRuExxT2thz31Ddk4njFrZHvdEzRI2DSjOLYQiExcIXo1YOcvZBd6Ji7eQ88q4rddex4Tl3PjVkuV7Q== X-Received: by 10.129.52.68 with SMTP id b65mr11502227ywa.50.1469860461455; Fri, 29 Jul 2016 23:34:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.56.130 with HTTP; Fri, 29 Jul 2016 23:34:20 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: <201607300632.u6U6WJc5081530@repo.freebsd.org> References: <201607300632.u6U6WJc5081530@repo.freebsd.org> From: Marcelo Araujo Date: Sat, 30 Jul 2016 14:34:20 +0800 Message-ID: Subject: Re: svn commit: r303540 - head/usr.bin/at To: Marcelo Araujo Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 06:34:23 -0000 2016-07-30 14:32 GMT+08:00 Marcelo Araujo : > Author: araujo > Date: Sat Jul 30 06:32:18 2016 > New Revision: 303540 > URL: https://svnweb.freebsd.org/changeset/base/303540 > > Log: > Use nitems() from sys/param.h > > Sponsored by: gandi.net (BSD Day Taiwan) > > Modified: > head/usr.bin/at/at.c > > Modified: head/usr.bin/at/at.c > > ============================================================================== > --- head/usr.bin/at/at.c Sat Jul 30 06:19:34 2016 (r303539) > +++ head/usr.bin/at/at.c Sat Jul 30 06:32:18 2016 (r303540) > @@ -356,7 +356,7 @@ writefile(time_t runtimer, char queue) > else > { > size_t i; > - for (i=0; i + for (i = 0; i < nitems(no_export); i++) > { > export = export > && (strncmp(*atenv, no_export[i], > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > MFC after 2 weeks. -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-all@freebsd.org Sat Jul 30 06:35:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4AE3BA94BC; Sat, 30 Jul 2016 06:35:50 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97A4913B9; Sat, 30 Jul 2016 06:35:50 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U6Zn9G083705; Sat, 30 Jul 2016 06:35:49 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U6Zn68083704; Sat, 30 Jul 2016 06:35:49 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201607300635.u6U6Zn68083704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sat, 30 Jul 2016 06:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303541 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 06:35:50 -0000 Author: araujo Date: Sat Jul 30 06:35:49 2016 New Revision: 303541 URL: https://svnweb.freebsd.org/changeset/base/303541 Log: Use nitems() from sys/param.h. Sponsored by: gandi.net (BSD Day Taiwan) MFC after: 2 weeks. Modified: head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Sat Jul 30 06:32:18 2016 (r303540) +++ head/usr.bin/calendar/io.c Sat Jul 30 06:35:49 2016 (r303541) @@ -117,7 +117,7 @@ cal_fopen(const char *file) return (NULL); } - for (i = 0; i < sizeof(calendarHomes)/sizeof(calendarHomes[0]) ; i++) { + for (i = 0; i < nitems(calendarHomes); i++) { if (chdir(calendarHomes[i]) != 0) continue; From owner-svn-src-all@freebsd.org Sat Jul 30 07:02:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE0F1BA98E3; Sat, 30 Jul 2016 07:02:34 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B08721E94; Sat, 30 Jul 2016 07:02:34 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U72Xse094723; Sat, 30 Jul 2016 07:02:33 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U72XSd094722; Sat, 30 Jul 2016 07:02:33 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201607300702.u6U72XSd094722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sat, 30 Jul 2016 07:02:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303542 - head/usr.bin/gzip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 07:02:35 -0000 Author: araujo Date: Sat Jul 30 07:02:33 2016 New Revision: 303542 URL: https://svnweb.freebsd.org/changeset/base/303542 Log: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) Modified: head/usr.bin/gzip/gzip.c Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Sat Jul 30 06:35:49 2016 (r303541) +++ head/usr.bin/gzip/gzip.c Sat Jul 30 07:02:33 2016 (r303542) @@ -155,7 +155,7 @@ static suffixes_t suffixes[] = { #endif /* SMALL */ #undef SUFFIX }; -#define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0]) +#define NUM_SUFFIXES (nitems(suffixes)) #define SUFFIX_MAXLEN 30 static const char gzip_version[] = "FreeBSD gzip 20150413"; From owner-svn-src-all@freebsd.org Sat Jul 30 07:04:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E713BA994C; Sat, 30 Jul 2016 07:04:48 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2C55116F; Sat, 30 Jul 2016 07:04:47 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U74lSq094845; Sat, 30 Jul 2016 07:04:47 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U74lXF094844; Sat, 30 Jul 2016 07:04:47 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201607300704.u6U74lXF094844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sat, 30 Jul 2016 07:04:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303543 - head/usr.bin/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 07:04:48 -0000 Author: araujo Date: Sat Jul 30 07:04:46 2016 New Revision: 303543 URL: https://svnweb.freebsd.org/changeset/base/303543 Log: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) Modified: head/usr.bin/locale/locale.c Modified: head/usr.bin/locale/locale.c ============================================================================== --- head/usr.bin/locale/locale.c Sat Jul 30 07:02:33 2016 (r303542) +++ head/usr.bin/locale/locale.c Sat Jul 30 07:04:46 2016 (r303543) @@ -220,10 +220,10 @@ struct _kwinfo { "(POSIX legacy)" } /* compat */ }; -#define NKWINFO (sizeof(kwinfo)/sizeof(kwinfo[0])) +#define NKWINFO (nitems(kwinfo)) const char *boguslocales[] = { "UTF-8" }; -#define NBOGUS (sizeof(boguslocales)/sizeof(boguslocales[0])) +#define NBOGUS (nitems(boguslocales)) int main(int argc, char *argv[]) From owner-svn-src-all@freebsd.org Sat Jul 30 07:05:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D50CBA99AA; Sat, 30 Jul 2016 07:05:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F257712F4; Sat, 30 Jul 2016 07:05:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U75X69094922; Sat, 30 Jul 2016 07:05:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U75XnJ094921; Sat, 30 Jul 2016 07:05:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201607300705.u6U75XnJ094921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 30 Jul 2016 07:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303544 - head/sys/cddl/contrib/opensolaris/uts/intel/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 07:05:34 -0000 Author: markj Date: Sat Jul 30 07:05:32 2016 New Revision: 303544 URL: https://svnweb.freebsd.org/changeset/base/303544 Log: Restore an ifdef that should not have been removed in r303535. X-MFC-With: r303535 Modified: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Modified: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat Jul 30 07:04:46 2016 (r303543) +++ head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat Jul 30 07:05:32 2016 (r303544) @@ -1088,6 +1088,7 @@ fasttrap_pid_probe(struct reg *rp) if (tp->ftt_ids != NULL) { fasttrap_id_t *id; +#ifdef __amd64 if (p->p_model == DATAMODEL_LP64) { for (id = tp->ftt_ids; id != NULL; id = id->fti_next) { fasttrap_probe_t *probe = id->fti_probe; @@ -1129,6 +1130,7 @@ fasttrap_pid_probe(struct reg *rp) } } } else { +#endif uintptr_t s0, s1, s2, s3, s4, s5; uint32_t *stack = (uint32_t *)rp->r_rsp; @@ -1183,7 +1185,9 @@ fasttrap_pid_probe(struct reg *rp) t[2], t[3], t[4]); } } +#ifdef __amd64 } +#endif } /* From owner-svn-src-all@freebsd.org Sat Jul 30 07:06:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ECA7BA9A34; Sat, 30 Jul 2016 07:06:24 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BB9C14DE; Sat, 30 Jul 2016 07:06:24 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U76N6t095007; Sat, 30 Jul 2016 07:06:23 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U76Nc8095006; Sat, 30 Jul 2016 07:06:23 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201607300706.u6U76Nc8095006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sat, 30 Jul 2016 07:06:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303545 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 07:06:24 -0000 Author: araujo Date: Sat Jul 30 07:06:23 2016 New Revision: 303545 URL: https://svnweb.freebsd.org/changeset/base/303545 Log: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) Modified: head/usr.bin/netstat/pfkey.c Modified: head/usr.bin/netstat/pfkey.c ============================================================================== --- head/usr.bin/netstat/pfkey.c Sat Jul 30 07:05:32 2016 (r303544) +++ head/usr.bin/netstat/pfkey.c Sat Jul 30 07:06:23 2016 (r303545) @@ -101,8 +101,7 @@ static const char *pfkey_msgtype_names ( static const char * pfkey_msgtype_names(int x) { - const int max = - sizeof(pfkey_msgtypenames)/sizeof(pfkey_msgtypenames[0]); + const int max = nitems(pfkey_msgtypenames); static char buf[20]; if (x < max && pfkey_msgtypenames[x]) From owner-svn-src-all@freebsd.org Sat Jul 30 07:08:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD58CBA9A98; Sat, 30 Jul 2016 07:08:04 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk0-x229.google.com (mail-qk0-x229.google.com [IPv6:2607:f8b0:400d:c09::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 65C641694; Sat, 30 Jul 2016 07:08:04 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk0-x229.google.com with SMTP id s63so108132301qkb.2; Sat, 30 Jul 2016 00:08:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=RVRQxCRC8brv0EMwF1VrK1Jx3oUAmg8Nk098EHm109Y=; b=RQ2P0COrjWtTMV5LBLGx3ay+PprGoCeMElodpG9su/vDstdwvTq/4mmf4VBQsONqn1 6C67J408P2+y3RirB5d71Pk8a1v16BgNP87OMh19uWSBtLMGPDJr6n55pkEfmoErQ9jE b+t/AmaExdiqYCg4rNG2E32q5AM/5WLc28GhOdPt+Rg5Y4rERaXUIjyk3ANN6FjpMzmy FyAwdkMiVNF8rW30uylah8cmbGE/rPs82QVMAMTfrUeECfAfomtNAL20unp1SvO0ubRN Uz9mvW4KBdADHn+rRYW8Yr3fb/9dNKcuvdURUI2HDVmIvYcuSf3j+nz0D2RMM4a/bjqB k1LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=RVRQxCRC8brv0EMwF1VrK1Jx3oUAmg8Nk098EHm109Y=; b=XWwqC4Ph/a8nS4KB748t+IW9HBJtp7i2f54J/h66c2wU1PmRIHQyT8Nu1cQvRZt97J oI85vcmGkjPUiFCMqfG2vh6WOJA/W0ryEfnsoa4h9zmxiDPcSUxrK4xQWY5VEYiXY5b4 JBS5lN0xEY7ZihkT/x/x/h+qrxiZlfYeGWgg6gc46xlnoRBtlpoTyFQNnQA5ZTSOliyz 23keW0XiZwh2MUVhm76HD3n/iRJOOg5e0aKPfrP4AYKjDcclaiX979dYEegrZLQy+x86 TeZxfYx3HDdbxxJcamB1K67DrYq7OEjJJUxLHLdy9SxQq1q74EajBgVXJ+4q5bKnzXSA eSBg== X-Gm-Message-State: AEkoousr9/SbEzeVUPweWQW3o8TJuwXTpAWE9iPv39nlX7Ivz5OpJ1xcNTrsXwxtLWRFsQ== X-Received: by 10.55.175.132 with SMTP id y126mr58129210qke.186.1469862483564; Sat, 30 Jul 2016 00:08:03 -0700 (PDT) Received: from charmander ([104.232.114.184]) by smtp.gmail.com with ESMTPSA id n20sm12015591qtn.40.2016.07.30.00.08.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Jul 2016 00:08:02 -0700 (PDT) Sender: Mark Johnston Date: Sat, 30 Jul 2016 00:08:01 -0700 From: Mark Johnston To: "Ngie Cooper (yaneurabeya)" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303535 - in head/sys/cddl/contrib/opensolaris/uts: common/dtrace intel/dtrace Message-ID: <20160730070801.GA41940@charmander> References: <201607300311.u6U3Brr9008960@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 07:08:04 -0000 On Fri, Jul 29, 2016 at 11:18:25PM -0700, Ngie Cooper (yaneurabeya) wrote: > > > On Jul 29, 2016, at 20:11, Mark Johnston wrote: > > > > Author: markj > > Date: Sat Jul 30 03:11:53 2016 > > New Revision: 303535 > > URL: https://svnweb.freebsd.org/changeset/base/303535 > > > > Log: > > Include fasttrap handling for DATAMODEL_ILP32 when compiling for amd64. > > > > MFC after: 1 month > > This broke i386: https://jenkins.freebsd.org/job/FreeBSD_HEAD_i386/3722/ . > Thanks, > -Ngie Sorry about that. Should be fixed with r303544. From owner-svn-src-all@freebsd.org Sat Jul 30 07:15:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4824ABA9C50; Sat, 30 Jul 2016 07:15:55 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 184361B68; Sat, 30 Jul 2016 07:15:55 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U7FsDe098645; Sat, 30 Jul 2016 07:15:54 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U7Fs6p098644; Sat, 30 Jul 2016 07:15:54 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201607300715.u6U7Fs6p098644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sat, 30 Jul 2016 07:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303546 - head/usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 07:15:55 -0000 Author: araujo Date: Sat Jul 30 07:15:54 2016 New Revision: 303546 URL: https://svnweb.freebsd.org/changeset/base/303546 Log: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) Modified: head/usr.bin/procstat/procstat_files.c Modified: head/usr.bin/procstat/procstat_files.c ============================================================================== --- head/usr.bin/procstat/procstat_files.c Sat Jul 30 07:06:23 2016 (r303545) +++ head/usr.bin/procstat/procstat_files.c Sat Jul 30 07:15:54 2016 (r303546) @@ -235,8 +235,7 @@ static struct cap_desc { { CAP_SOCK_CLIENT, "scl" }, { CAP_SOCK_SERVER, "ssr" }, }; -static const u_int cap_desc_count = sizeof(cap_desc) / - sizeof(cap_desc[0]); +static const u_int cap_desc_count = nitems(cap_desc); static u_int width_capability(cap_rights_t *rightsp) From owner-svn-src-all@freebsd.org Sat Jul 30 07:28:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB637BA9E90; Sat, 30 Jul 2016 07:28:16 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC8701247; Sat, 30 Jul 2016 07:28:16 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U7SFiN002534; Sat, 30 Jul 2016 07:28:15 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U7SFPb002533; Sat, 30 Jul 2016 07:28:15 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201607300728.u6U7SFPb002533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sat, 30 Jul 2016 07:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303547 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 07:28:17 -0000 Author: araujo Date: Sat Jul 30 07:28:15 2016 New Revision: 303547 URL: https://svnweb.freebsd.org/changeset/base/303547 Log: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Sat Jul 30 07:15:54 2016 (r303546) +++ head/usr.bin/indent/indent.c Sat Jul 30 07:28:15 2016 (r303547) @@ -1138,7 +1138,7 @@ check_type: while ((c = getc(input)) == '\n'); ungetc(c, input); } - if ((size_t)ifdef_level < sizeof(state_stack)/sizeof(state_stack[0])) { + if ((size_t)ifdef_level < nitems(state_stack)) { match_state[ifdef_level].tos = -1; state_stack[ifdef_level++] = ps; } From owner-svn-src-all@freebsd.org Sat Jul 30 08:53:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50E3DBA9319; Sat, 30 Jul 2016 08:53:01 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 1A6A0172C; Sat, 30 Jul 2016 08:53:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id DE2291A3C27; Sat, 30 Jul 2016 18:52:55 +1000 (AEST) Date: Sat, 30 Jul 2016 18:52:54 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303530 - head/lib/libc/gen In-Reply-To: <84c77b80-8b51-8698-f27a-7f6452867d66@freebsd.org> Message-ID: <20160730184454.I2661@besplex.bde.org> References: <201607300209.u6U29BXC082700@repo.freebsd.org> <20160730140305.G1962@besplex.bde.org> <84c77b80-8b51-8698-f27a-7f6452867d66@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=EfU1O6SC c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=-VkZlQZJ9cw8Qod7-jsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 08:53:01 -0000 On Sat, 30 Jul 2016, Andrey Chernov wrote: > On 30.07.2016 7:15, Bruce Evans wrote: >> On Sat, 30 Jul 2016, Andrey A. Chernov wrote: >> >>> Log: >>> Reset errno for readdirfunc() before contunue. >> >> In C99, library functions are not permitted to set errno to 0. The glob() >> family shouldn't use a different (worse) convention, and POSIX doesn't >> seem to have any special wording to allow different behaviour. > > This is historic practice for this function at least since GLOB_LIMIT > was introduced (in 2001) and common across NetBSD/OpenBSD. Existent > programs may relay on that to check that limit is reached and not > allocation error, so with few additional overwriting from my side I add > nothing new: > > Revision 80525 > Modified Sun Jul 29 00:52:37 2001 UTC (15 years ago) by mikeh > ... > errno = 0 is documented. See glob(3), GLOB_NOSPACE section too. Hmm. This is not in the BUGS section. Strangely, the related non-bug that glob() may fail and set errno (to a reasonable but nonstandard and undocumented value?) is in the BUGS section. I guess this is a bug in conjunction with the promise to set errno to 0 for some failures. > The real problem is that glob(3) is very limited in error return codes, > so they reuse existent codes with errno hack. It should have just used the least-unclosely-related standard errno instead of 0. Bruce From owner-svn-src-all@freebsd.org Sat Jul 30 09:25:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6728BA99E3; Sat, 30 Jul 2016 09:25:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98BD116C0; Sat, 30 Jul 2016 09:25:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U9Pv4t046443; Sat, 30 Jul 2016 09:25:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U9PvMQ046442; Sat, 30 Jul 2016 09:25:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607300925.u6U9PvMQ046442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jul 2016 09:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303548 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 09:25:58 -0000 Author: kib Date: Sat Jul 30 09:25:57 2016 New Revision: 303548 URL: https://svnweb.freebsd.org/changeset/base/303548 Log: Cache getbintime(9) answer in timehands, similarly to getnanotime(9) and getmicrotime(9). Suggested and reviewed by: bde (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 month Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sat Jul 30 07:28:15 2016 (r303547) +++ head/sys/kern/kern_tc.c Sat Jul 30 09:25:57 2016 (r303548) @@ -68,6 +68,7 @@ struct timehands { uint64_t th_scale; u_int th_offset_count; struct bintime th_offset; + struct bintime th_bintime; struct timeval th_microtime; struct timespec th_nanotime; struct bintime th_boottime; @@ -233,9 +234,8 @@ fbclock_bintime(struct bintime *bt) do { th = timehands; gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; + *bt = th->th_bintime; bintime_addx(bt, th->th_scale * tc_delta(th)); - bintime_add(bt, &th->th_boottime); atomic_thread_fence_acq(); } while (gen == 0 || gen != th->th_generation); } @@ -309,8 +309,7 @@ fbclock_getbintime(struct bintime *bt) do { th = timehands; gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - bintime_add(bt, &th->th_boottime); + *bt = th->th_bintime; atomic_thread_fence_acq(); } while (gen == 0 || gen != th->th_generation); } @@ -385,9 +384,8 @@ bintime(struct bintime *bt) do { th = timehands; gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; + *bt = th->th_bintime; bintime_addx(bt, th->th_scale * tc_delta(th)); - bintime_add(bt, &th->th_boottime); atomic_thread_fence_acq(); } while (gen == 0 || gen != th->th_generation); } @@ -461,8 +459,7 @@ getbintime(struct bintime *bt) do { th = timehands; gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - bintime_add(bt, &th->th_boottime); + *bt = th->th_bintime; atomic_thread_fence_acq(); } while (gen == 0 || gen != th->th_generation); } @@ -1385,6 +1382,8 @@ tc_windup(struct bintime *new_boottimebi if (bt.sec != t) th->th_boottime.sec += bt.sec - t; } + th->th_bintime = th->th_offset; + bintime_add(&th->th_bintime, &th->th_boottime); /* Update the UTC timestamps used by the get*() functions. */ /* XXX shouldn't do this here. Should force non-`get' versions. */ bintime2timeval(&bt, &th->th_microtime); @@ -1804,9 +1803,8 @@ pps_event(struct pps_state *pps, int eve /* Convert the count to a timespec. */ tcount = pps->capcount - pps->capth->th_offset_count; tcount &= pps->capth->th_counter->tc_counter_mask; - bt = pps->capth->th_offset; + bt = pps->capth->th_bintime; bintime_addx(&bt, pps->capth->th_scale * tcount); - bintime_add(&bt, &pps->capth->th_boottime); bintime2timespec(&bt, &ts); /* If the timecounter was wound up underneath us, bail out. */ From owner-svn-src-all@freebsd.org Sat Jul 30 09:28:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02FD3BA9A51; Sat, 30 Jul 2016 09:28:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF1D0186D; Sat, 30 Jul 2016 09:28:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U9SDqG046591; Sat, 30 Jul 2016 09:28:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U9SDgc046587; Sat, 30 Jul 2016 09:28:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607300928.u6U9SDgc046587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jul 2016 09:28:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303549 - in stable/11: share/man/man9 sys/kern sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 09:28:15 -0000 Author: kib Date: Sat Jul 30 09:28:13 2016 New Revision: 303549 URL: https://svnweb.freebsd.org/changeset/base/303549 Log: MFC r303211: Implement mtx_trylock_spin(9). Approved by: re (gjb) Modified: stable/11/share/man/man9/Makefile stable/11/share/man/man9/mutex.9 stable/11/sys/kern/kern_mutex.c stable/11/sys/sys/mutex.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Sat Jul 30 09:25:57 2016 (r303548) +++ stable/11/share/man/man9/Makefile Sat Jul 30 09:28:13 2016 (r303549) @@ -1181,6 +1181,8 @@ MLINKS+=mutex.9 mtx_assert.9 \ mutex.9 MTX_SYSINIT.9 \ mutex.9 mtx_trylock.9 \ mutex.9 mtx_trylock_flags.9 \ + mutex.9 mtx_trylock_spin.9 \ + mutex.9 mtx_trylock_spin_flags.9 \ mutex.9 mtx_unlock.9 \ mutex.9 mtx_unlock_flags.9 \ mutex.9 mtx_unlock_spin.9 \ Modified: stable/11/share/man/man9/mutex.9 ============================================================================== --- stable/11/share/man/man9/mutex.9 Sat Jul 30 09:25:57 2016 (r303548) +++ stable/11/share/man/man9/mutex.9 Sat Jul 30 09:28:13 2016 (r303549) @@ -28,7 +28,7 @@ .\" from BSDI $Id: mutex.4,v 1.1.2.3 1998/04/27 22:53:13 ewv Exp $ .\" $FreeBSD$ .\" -.Dd December 13, 2014 +.Dd July 18, 2016 .Dt MUTEX 9 .Os .Sh NAME @@ -41,6 +41,8 @@ .Nm mtx_lock_spin_flags , .Nm mtx_trylock , .Nm mtx_trylock_flags , +.Nm mtx_trylock_spin , +.Nm mtx_trylock_spin_flags , .Nm mtx_unlock , .Nm mtx_unlock_spin , .Nm mtx_unlock_flags , @@ -73,6 +75,10 @@ .Ft int .Fn mtx_trylock_flags "struct mtx *mutex" "int flags" .Ft void +.Fn mtx_trylock_spin "struct mtx *mutex" +.Ft int +.Fn mtx_trylock_spin_flags "struct mtx *mutex" "int flags" +.Ft void .Fn mtx_unlock "struct mtx *mutex" .Ft void .Fn mtx_unlock_spin "struct mtx *mutex" @@ -249,26 +255,33 @@ argument, then the mutex can be acquired .Pp The .Fn mtx_trylock -attempts to acquire the +and +.Fn mtx_trylock_spin +functions attempt to acquire a .Dv MTX_DEF -mutex pointed to by +or +.Dv MTX_SPIN +mutex, respectively, pointed to by .Fa mutex . -If the mutex cannot be immediately acquired -.Fn mtx_trylock -will return 0, -otherwise the mutex will be acquired -and a non-zero value will be returned. +If the mutex cannot be immediately acquired, the functions will return 0, +otherwise the mutex will be acquired and a non-zero value will be returned. .Pp The .Fn mtx_trylock_flags -function has the same behavior as +and +.Fn mtx_trylock_spin_flags +functions have the same behavior as .Fn mtx_trylock -but should be used when the caller desires to pass in a +and +.Fn mtx_trylock_spin +respectively, but should be used when the caller desires to pass in a .Fa flags value. Presently, the only valid value in the .Fn mtx_trylock -case is +and +.Fn mtx_trylock_spin +cases is .Dv MTX_QUIET , and its effects are identical to those described for .Fn mtx_lock @@ -447,6 +460,13 @@ while any spin lock is held. .It Dv MTX_RECURSE Specifies that the initialized mutex is allowed to recurse. This bit must be present if the mutex is permitted to recurse. +.Pp +Note that neither +.Fn mtx_trylock +nor +.Fn mtx_trylock_spin +support recursion; +that is, attempting to acquire an already-owned mutex fails. .It Dv MTX_QUIET Do not log any mutex operations for this lock. .It Dv MTX_NOWITNESS @@ -534,3 +554,7 @@ functions appeared in .Bsx 4.1 and .Fx 5.0 . +The +.Fn mtx_trylock_spin +function was added in +.Fx 12.0 . Modified: stable/11/sys/kern/kern_mutex.c ============================================================================== --- stable/11/sys/kern/kern_mutex.c Sat Jul 30 09:25:57 2016 (r303548) +++ stable/11/sys/kern/kern_mutex.c Sat Jul 30 09:28:13 2016 (r303549) @@ -281,6 +281,34 @@ __mtx_lock_spin_flags(volatile uintptr_t WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); } +int +__mtx_trylock_spin_flags(volatile uintptr_t *c, int opts, const char *file, + int line) +{ + struct mtx *m; + + if (SCHEDULER_STOPPED()) + return (1); + + m = mtxlock2mtx(c); + + KASSERT(m->mtx_lock != MTX_DESTROYED, + ("mtx_trylock_spin() of destroyed mutex @ %s:%d", file, line)); + KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_spin, + ("mtx_trylock_spin() of sleep mutex %s @ %s:%d", + m->lock_object.lo_name, file, line)); + KASSERT((opts & MTX_RECURSE) == 0, + ("mtx_trylock_spin: unsupp. opt MTX_RECURSE on mutex %s @ %s:%d\n", + m->lock_object.lo_name, file, line)); + if (__mtx_trylock_spin(m, curthread, opts, file, line)) { + LOCK_LOG_TRY("LOCK", &m->lock_object, opts, 1, file, line); + WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); + return (1); + } + LOCK_LOG_TRY("LOCK", &m->lock_object, opts, 0, file, line); + return (0); +} + void __mtx_unlock_spin_flags(volatile uintptr_t *c, int opts, const char *file, int line) Modified: stable/11/sys/sys/mutex.h ============================================================================== --- stable/11/sys/sys/mutex.h Sat Jul 30 09:25:57 2016 (r303548) +++ stable/11/sys/sys/mutex.h Sat Jul 30 09:28:13 2016 (r303549) @@ -112,6 +112,8 @@ void __mtx_unlock_flags(volatile uintptr int line); void __mtx_lock_spin_flags(volatile uintptr_t *c, int opts, const char *file, int line); +int __mtx_trylock_spin_flags(volatile uintptr_t *c, int opts, + const char *file, int line); void __mtx_unlock_spin_flags(volatile uintptr_t *c, int opts, const char *file, int line); #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) @@ -152,6 +154,8 @@ void thread_lock_flags_(struct thread *, __mtx_unlock_flags(&(m)->mtx_lock, o, f, l) #define _mtx_lock_spin_flags(m, o, f, l) \ __mtx_lock_spin_flags(&(m)->mtx_lock, o, f, l) +#define _mtx_trylock_spin_flags(m, o, f, l) \ + __mtx_trylock_spin_flags(&(m)->mtx_lock, o, f, l) #define _mtx_unlock_spin_flags(m, o, f, l) \ __mtx_unlock_spin_flags(&(m)->mtx_lock, o, f, l) #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) @@ -212,6 +216,21 @@ void thread_lock_flags_(struct thread *, LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, \ mp, 0, 0, file, line); \ } while (0) +#define __mtx_trylock_spin(mp, tid, opts, file, line) __extension__ ({ \ + uintptr_t _tid = (uintptr_t)(tid); \ + int _ret; \ + \ + spinlock_enter(); \ + if (((mp)->mtx_lock != MTX_UNOWNED || !_mtx_obtain_lock((mp), _tid))) {\ + spinlock_exit(); \ + _ret = 0; \ + } else { \ + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, \ + mp, 0, 0, file, line); \ + _ret = 1; \ + } \ + _ret; \ +}) #else /* SMP */ #define __mtx_lock_spin(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ @@ -224,6 +243,20 @@ void thread_lock_flags_(struct thread *, (mp)->mtx_lock = _tid; \ } \ } while (0) +#define __mtx_trylock_spin(mp, tid, opts, file, line) __extension__ ({ \ + uintptr_t _tid = (uintptr_t)(tid); \ + int _ret; \ + \ + spinlock_enter(); \ + if ((mp)->mtx_lock != MTX_UNOWNED) { \ + spinlock_exit(); \ + _ret = 0; \ + } else { \ + (mp)->mtx_lock = _tid; \ + _ret = 1; \ + } \ + _ret; \ +}) #endif /* SMP */ /* Unlock a normal mutex. */ @@ -293,6 +326,10 @@ void thread_lock_flags_(struct thread *, * mtx_trylock_flags(m, opts) is used the same way as mtx_trylock() but accepts * relevant option flags `opts.' * + * mtx_trylock_spin(m) attempts to acquire MTX_SPIN mutex `m' but doesn't + * spin if it cannot. Rather, it returns 0 on failure and non-zero on + * success. It always returns failure for recursed lock attempts. + * * mtx_initialized(m) returns non-zero if the lock `m' has been initialized. * * mtx_owned(m) returns non-zero if the current thread owns the lock `m' @@ -302,6 +339,7 @@ void thread_lock_flags_(struct thread *, #define mtx_lock(m) mtx_lock_flags((m), 0) #define mtx_lock_spin(m) mtx_lock_spin_flags((m), 0) #define mtx_trylock(m) mtx_trylock_flags((m), 0) +#define mtx_trylock_spin(m) mtx_trylock_spin_flags((m), 0) #define mtx_unlock(m) mtx_unlock_flags((m), 0) #define mtx_unlock_spin(m) mtx_unlock_spin_flags((m), 0) @@ -335,6 +373,8 @@ extern struct mtx_pool *mtxpool_sleep; _mtx_unlock_flags((m), (opts), (file), (line)) #define mtx_lock_spin_flags_(m, opts, file, line) \ _mtx_lock_spin_flags((m), (opts), (file), (line)) +#define mtx_trylock_spin_flags_(m, opts, file, line) \ + _mtx_trylock_spin_flags((m), (opts), (file), (line)) #define mtx_unlock_spin_flags_(m, opts, file, line) \ _mtx_unlock_spin_flags((m), (opts), (file), (line)) #else /* LOCK_DEBUG == 0 && !MUTEX_NOINLINE */ @@ -344,6 +384,8 @@ extern struct mtx_pool *mtxpool_sleep; __mtx_unlock((m), curthread, (opts), (file), (line)) #define mtx_lock_spin_flags_(m, opts, file, line) \ __mtx_lock_spin((m), curthread, (opts), (file), (line)) +#define mtx_trylock_spin_flags_(m, opts, file, line) \ + __mtx_trylock_spin((m), curthread, (opts), (file), (line)) #define mtx_unlock_spin_flags_(m, opts, file, line) \ __mtx_unlock_spin((m)) #endif /* LOCK_DEBUG > 0 || MUTEX_NOINLINE */ @@ -369,6 +411,8 @@ extern struct mtx_pool *mtxpool_sleep; mtx_unlock_spin_flags_((m), (opts), LOCK_FILE, LOCK_LINE) #define mtx_trylock_flags(m, opts) \ mtx_trylock_flags_((m), (opts), LOCK_FILE, LOCK_LINE) +#define mtx_trylock_spin_flags(m, opts) \ + mtx_trylock_spin_flags_((m), (opts), LOCK_FILE, LOCK_LINE) #define mtx_assert(m, what) \ mtx_assert_((m), (what), __FILE__, __LINE__) From owner-svn-src-all@freebsd.org Sat Jul 30 09:45:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09E16BA9E55 for ; Sat, 30 Jul 2016 09:45:46 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x233.google.com (mail-yw0-x233.google.com [IPv6:2607:f8b0:4002: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 C39AA1272 for ; Sat, 30 Jul 2016 09:45:45 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x233.google.com with SMTP id u134so135129239ywg.3 for ; Sat, 30 Jul 2016 02:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DEsC4o38uAdcNxqAW43BEBQxbgUPuxIDTCOgo3k8BDg=; b=y+rpUjnGaUIHzFmlYvQEqY47XVbwe4+S5/GK+Tj2c18gWMhv/KnrRVxS2tPy9lJW5z owzKjITAchQEaa+uf3mJxTtt1x7tempcrMigsgp8H0HUligcRXghS0HuicjkJBeab5Ul ot3uVa2tVGyFuq2X/ELgrR2n+nUutmv7tpIrEo6PQGTuolQL/5VNPGsQY1V1Z9+zNQb3 i056Oxj5wwc+bA8zxNZuKDCrb58s7gUyWfhHKiuM9ITDbyyMJNNcCdSjnsDLW1oI/0xw SlYerRAD/WCB2TnZ68RUP+mtM9o3P7OZCZ/k0OHQrNGENXMfs96UFKnwQbsg4VLN/Lxd FJfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DEsC4o38uAdcNxqAW43BEBQxbgUPuxIDTCOgo3k8BDg=; b=Vc/4UUauUJP4YFk9YdTjo8YkmLIiLNEvxPFyvEcVEpncniqBwYWZoiGqNXTXgkdCwS h0Bk+v6/lz3R3fTTaNu4RKE4qGcp7gzeLn8+QBG34VU6jgbgojWx5Q8fqnNcNlghxgdD OIJAhdSz3asfRmo9zoLN1hOXzMViXKxPRxAFcFBugAP69T4uh1XNRDIRJXwgncxyhEF5 k57UVNDsYmNzuuqUGO9otAFuMdS+eRd4Fw22MoiWndddyj9kEF4JnwpWC3yAqbjpTHPK ppJTgmCxK9ZQ3C3BMTaeOAV9SlqCcdeVznd9Vg79cSu7uvIg2EZmTcaYGu+rWD6sHdnK pj/A== X-Gm-Message-State: AEkoouud4kuxONU4veBd2z+LcwvL+L4BXPrL47e+D6jV3OqbSumvuLBxfnJEJX/85Yn0WTOEfAI9UyZcZhh0bQ== X-Received: by 10.129.98.2 with SMTP id w2mr16245810ywb.313.1469871944457; Sat, 30 Jul 2016 02:45:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.167.71 with HTTP; Sat, 30 Jul 2016 02:45:43 -0700 (PDT) In-Reply-To: <201607300100.u6U10GNt056755@repo.freebsd.org> References: <201607300100.u6U10GNt056755@repo.freebsd.org> From: Ed Schouten Date: Sat, 30 Jul 2016 11:45:43 +0200 Message-ID: Subject: Re: svn commit: r303524 - in head: include lib/libc/stdio To: Baptiste Daroussin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 09:45:46 -0000 Hey! 2016-07-30 3:00 GMT+02:00 Baptiste Daroussin : > Remove _WITH_GETLINE and _WITH_DPRINTF guards > > When adding getline(3) and dprintf(3) into libc, those guards were added > to prevent breaking too many ports. > > 7 years later the ports tree have been fixed, it is time to remove this > FreeBSDism > > While here remove the extra parenthesis surrounding dprintf(3) Thanks for working on this. This was also on my TODO list, but thanks for beating me to it! -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Sat Jul 30 09:46:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8D3DBA9EA9; Sat, 30 Jul 2016 09:46:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88F311435; Sat, 30 Jul 2016 09:46:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U9kTMf054139; Sat, 30 Jul 2016 09:46:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U9kTQI054138; Sat, 30 Jul 2016 09:46:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607300946.u6U9kTQI054138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jul 2016 09:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303550 - stable/11/bin/ps X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 09:46:30 -0000 Author: kib Date: Sat Jul 30 09:46:29 2016 New Revision: 303550 URL: https://svnweb.freebsd.org/changeset/base/303550 Log: MFC r303213: Add missed required call to xo_finish() when only header is printed. Approved by: re (gjb) Modified: stable/11/bin/ps/ps.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ps/ps.c ============================================================================== --- stable/11/bin/ps/ps.c Sat Jul 30 09:28:13 2016 (r303549) +++ stable/11/bin/ps/ps.c Sat Jul 30 09:46:29 2016 (r303550) @@ -612,6 +612,7 @@ main(int argc, char *argv[]) if (nkept == 0) { printheader(); + xo_finish(); exit(1); } From owner-svn-src-all@freebsd.org Sat Jul 30 10:32:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20253BA6AB4; Sat, 30 Jul 2016 10:32:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D67BC1160; Sat, 30 Jul 2016 10:32:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UAWTi9070635; Sat, 30 Jul 2016 10:32:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UAWScl070634; Sat, 30 Jul 2016 10:32:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607301032.u6UAWScl070634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 30 Jul 2016 10:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303551 - head/sys/dev/ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 10:32:30 -0000 Author: mav Date: Sat Jul 30 10:32:28 2016 New Revision: 303551 URL: https://svnweb.freebsd.org/changeset/base/303551 Log: Fix infinite loops introduced at r303429. Modified: head/sys/dev/ntb/ntb.c Modified: head/sys/dev/ntb/ntb.c ============================================================================== --- head/sys/dev/ntb/ntb.c Sat Jul 30 09:46:29 2016 (r303550) +++ head/sys/dev/ntb/ntb.c Sat Jul 30 10:32:28 2016 (r303551) @@ -206,7 +206,7 @@ ntb_link_enable(device_t ntb, enum ntb_s struct ntb_child **cpp = device_get_softc(device_get_parent(nc->dev)); struct ntb_child *nc1; - for (nc1 = *cpp; nc1 != NULL; nc1 = nc->next) { + for (nc1 = *cpp; nc1 != NULL; nc1 = nc1->next) { if (nc1->enabled) { nc->enabled = 1; return (0); @@ -226,7 +226,7 @@ ntb_link_disable(device_t ntb) if (!nc->enabled) return (0); nc->enabled = 0; - for (nc1 = *cpp; nc1 != NULL; nc1 = nc->next) { + for (nc1 = *cpp; nc1 != NULL; nc1 = nc1->next) { if (nc1->enabled) return (0); } From owner-svn-src-all@freebsd.org Sat Jul 30 14:47:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F57BBA8B88; Sat, 30 Jul 2016 14:47:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D1E011DE; Sat, 30 Jul 2016 14:47:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UEl5il066593; Sat, 30 Jul 2016 14:47:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UEl5fM066588; Sat, 30 Jul 2016 14:47:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607301447.u6UEl5fM066588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jul 2016 14:47:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303552 - in stable/10: share/man/man9 sys/kern sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 14:47:06 -0000 Author: kib Date: Sat Jul 30 14:47:04 2016 New Revision: 303552 URL: https://svnweb.freebsd.org/changeset/base/303552 Log: MFC r303211: Implement mtx_trylock_spin(9). Modified: stable/10/share/man/man9/Makefile stable/10/share/man/man9/mutex.9 stable/10/sys/kern/kern_mutex.c stable/10/sys/sys/mutex.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Sat Jul 30 10:32:28 2016 (r303551) +++ stable/10/share/man/man9/Makefile Sat Jul 30 14:47:04 2016 (r303552) @@ -994,6 +994,8 @@ MLINKS+=mutex.9 mtx_assert.9 \ mutex.9 MTX_SYSINIT.9 \ mutex.9 mtx_trylock.9 \ mutex.9 mtx_trylock_flags.9 \ + mutex.9 mtx_trylock_spin.9 \ + mutex.9 mtx_trylock_spin_flags.9 \ mutex.9 mtx_unlock.9 \ mutex.9 mtx_unlock_flags.9 \ mutex.9 mtx_unlock_spin.9 \ Modified: stable/10/share/man/man9/mutex.9 ============================================================================== --- stable/10/share/man/man9/mutex.9 Sat Jul 30 10:32:28 2016 (r303551) +++ stable/10/share/man/man9/mutex.9 Sat Jul 30 14:47:04 2016 (r303552) @@ -28,7 +28,7 @@ .\" from BSDI $Id: mutex.4,v 1.1.2.3 1998/04/27 22:53:13 ewv Exp $ .\" $FreeBSD$ .\" -.Dd November 16, 2011 +.Dd July 18, 2016 .Dt MUTEX 9 .Os .Sh NAME @@ -41,6 +41,8 @@ .Nm mtx_lock_spin_flags , .Nm mtx_trylock , .Nm mtx_trylock_flags , +.Nm mtx_trylock_spin , +.Nm mtx_trylock_spin_flags , .Nm mtx_unlock , .Nm mtx_unlock_spin , .Nm mtx_unlock_flags , @@ -73,6 +75,10 @@ .Ft int .Fn mtx_trylock_flags "struct mtx *mutex" "int flags" .Ft void +.Fn mtx_trylock_spin "struct mtx *mutex" +.Ft int +.Fn mtx_trylock_spin_flags "struct mtx *mutex" "int flags" +.Ft void .Fn mtx_unlock "struct mtx *mutex" .Ft void .Fn mtx_unlock_spin "struct mtx *mutex" @@ -245,26 +251,33 @@ argument, then the mutex can be acquired .Pp The .Fn mtx_trylock -attempts to acquire the +and +.Fn mtx_trylock_spin +functions attempt to acquire a .Dv MTX_DEF -mutex pointed to by +or +.Dv MTX_SPIN +mutex, respectively, pointed to by .Fa mutex . -If the mutex cannot be immediately acquired -.Fn mtx_trylock -will return 0, -otherwise the mutex will be acquired -and a non-zero value will be returned. +If the mutex cannot be immediately acquired, the functions will return 0, +otherwise the mutex will be acquired and a non-zero value will be returned. .Pp The .Fn mtx_trylock_flags -function has the same behavior as +and +.Fn mtx_trylock_spin_flags +functions have the same behavior as .Fn mtx_trylock -but should be used when the caller desires to pass in a +and +.Fn mtx_trylock_spin +respectively, but should be used when the caller desires to pass in a .Fa flags value. Presently, the only valid value in the .Fn mtx_trylock -case is +and +.Fn mtx_trylock_spin +cases is .Dv MTX_QUIET , and its effects are identical to those described for .Fn mtx_lock @@ -443,6 +456,13 @@ while any spin lock is held. .It Dv MTX_RECURSE Specifies that the initialized mutex is allowed to recurse. This bit must be present if the mutex is permitted to recurse. +.Pp +Note that neither +.Fn mtx_trylock +nor +.Fn mtx_trylock_spin +support recursion; +that is, attempting to acquire an already-owned mutex fails. .It Dv MTX_QUIET Do not log any mutex operations for this lock. .It Dv MTX_NOWITNESS @@ -528,3 +548,7 @@ functions appeared in .Bsx 4.1 and .Fx 5.0 . +The +.Fn mtx_trylock_spin +function was added in +.Fx 12.0 . Modified: stable/10/sys/kern/kern_mutex.c ============================================================================== --- stable/10/sys/kern/kern_mutex.c Sat Jul 30 10:32:28 2016 (r303551) +++ stable/10/sys/kern/kern_mutex.c Sat Jul 30 14:47:04 2016 (r303552) @@ -285,6 +285,34 @@ __mtx_lock_spin_flags(volatile uintptr_t WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); } +int +__mtx_trylock_spin_flags(volatile uintptr_t *c, int opts, const char *file, + int line) +{ + struct mtx *m; + + if (SCHEDULER_STOPPED()) + return (1); + + m = mtxlock2mtx(c); + + KASSERT(m->mtx_lock != MTX_DESTROYED, + ("mtx_trylock_spin() of destroyed mutex @ %s:%d", file, line)); + KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_spin, + ("mtx_trylock_spin() of sleep mutex %s @ %s:%d", + m->lock_object.lo_name, file, line)); + KASSERT((opts & MTX_RECURSE) == 0, + ("mtx_trylock_spin: unsupp. opt MTX_RECURSE on mutex %s @ %s:%d\n", + m->lock_object.lo_name, file, line)); + if (__mtx_trylock_spin(m, curthread, opts, file, line)) { + LOCK_LOG_TRY("LOCK", &m->lock_object, opts, 1, file, line); + WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); + return (1); + } + LOCK_LOG_TRY("LOCK", &m->lock_object, opts, 0, file, line); + return (0); +} + void __mtx_unlock_spin_flags(volatile uintptr_t *c, int opts, const char *file, int line) Modified: stable/10/sys/sys/mutex.h ============================================================================== --- stable/10/sys/sys/mutex.h Sat Jul 30 10:32:28 2016 (r303551) +++ stable/10/sys/sys/mutex.h Sat Jul 30 14:47:04 2016 (r303552) @@ -111,6 +111,8 @@ void __mtx_unlock_flags(volatile uintptr int line); void __mtx_lock_spin_flags(volatile uintptr_t *c, int opts, const char *file, int line); +int __mtx_trylock_spin_flags(volatile uintptr_t *c, int opts, + const char *file, int line); void __mtx_unlock_spin_flags(volatile uintptr_t *c, int opts, const char *file, int line); #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) @@ -151,6 +153,8 @@ void thread_lock_flags_(struct thread *, __mtx_unlock_flags(&(m)->mtx_lock, o, f, l) #define _mtx_lock_spin_flags(m, o, f, l) \ __mtx_lock_spin_flags(&(m)->mtx_lock, o, f, l) +#define _mtx_trylock_spin_flags(m, o, f, l) \ + __mtx_trylock_spin_flags(&(m)->mtx_lock, o, f, l) #define _mtx_unlock_spin_flags(m, o, f, l) \ __mtx_unlock_spin_flags(&(m)->mtx_lock, o, f, l) #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) @@ -211,6 +215,21 @@ void thread_lock_flags_(struct thread *, LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_MTX_SPIN_LOCK_ACQUIRE, \ mp, 0, 0, (file), (line)); \ } while (0) +#define __mtx_trylock_spin(mp, tid, opts, file, line) __extension__ ({ \ + uintptr_t _tid = (uintptr_t)(tid); \ + int _ret; \ + \ + spinlock_enter(); \ + if (((mp)->mtx_lock != MTX_UNOWNED || !_mtx_obtain_lock((mp), _tid))) {\ + spinlock_exit(); \ + _ret = 0; \ + } else { \ + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_MTX_SPIN_LOCK_ACQUIRE, \ + mp, 0, 0, file, line); \ + _ret = 1; \ + } \ + _ret; \ +}) #else /* SMP */ #define __mtx_lock_spin(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ @@ -223,6 +242,20 @@ void thread_lock_flags_(struct thread *, (mp)->mtx_lock = _tid; \ } \ } while (0) +#define __mtx_trylock_spin(mp, tid, opts, file, line) __extension__ ({ \ + uintptr_t _tid = (uintptr_t)(tid); \ + int _ret; \ + \ + spinlock_enter(); \ + if ((mp)->mtx_lock != MTX_UNOWNED) { \ + spinlock_exit(); \ + _ret = 0; \ + } else { \ + (mp)->mtx_lock = _tid; \ + _ret = 1; \ + } \ + _ret; \ +}) #endif /* SMP */ /* Unlock a normal mutex. */ @@ -292,6 +325,10 @@ void thread_lock_flags_(struct thread *, * mtx_trylock_flags(m, opts) is used the same way as mtx_trylock() but accepts * relevant option flags `opts.' * + * mtx_trylock_spin(m) attempts to acquire MTX_SPIN mutex `m' but doesn't + * spin if it cannot. Rather, it returns 0 on failure and non-zero on + * success. It always returns failure for recursed lock attempts. + * * mtx_initialized(m) returns non-zero if the lock `m' has been initialized. * * mtx_owned(m) returns non-zero if the current thread owns the lock `m' @@ -301,6 +338,7 @@ void thread_lock_flags_(struct thread *, #define mtx_lock(m) mtx_lock_flags((m), 0) #define mtx_lock_spin(m) mtx_lock_spin_flags((m), 0) #define mtx_trylock(m) mtx_trylock_flags((m), 0) +#define mtx_trylock_spin(m) mtx_trylock_spin_flags((m), 0) #define mtx_unlock(m) mtx_unlock_flags((m), 0) #define mtx_unlock_spin(m) mtx_unlock_spin_flags((m), 0) @@ -338,6 +376,8 @@ extern struct mtx_pool *mtxpool_sleep; _mtx_unlock_flags((m), (opts), (file), (line)) #define mtx_lock_spin_flags_(m, opts, file, line) \ _mtx_lock_spin_flags((m), (opts), (file), (line)) +#define mtx_trylock_spin_flags_(m, opts, file, line) \ + _mtx_trylock_spin_flags((m), (opts), (file), (line)) #define mtx_unlock_spin_flags_(m, opts, file, line) \ _mtx_unlock_spin_flags((m), (opts), (file), (line)) #else /* LOCK_DEBUG == 0 && !MUTEX_NOINLINE */ @@ -347,6 +387,8 @@ extern struct mtx_pool *mtxpool_sleep; __mtx_unlock((m), curthread, (opts), (file), (line)) #define mtx_lock_spin_flags_(m, opts, file, line) \ __mtx_lock_spin((m), curthread, (opts), (file), (line)) +#define mtx_trylock_spin_flags_(m, opts, file, line) \ + __mtx_trylock_spin((m), curthread, (opts), (file), (line)) #define mtx_unlock_spin_flags_(m, opts, file, line) \ __mtx_unlock_spin((m)) #endif /* LOCK_DEBUG > 0 || MUTEX_NOINLINE */ @@ -372,6 +414,8 @@ extern struct mtx_pool *mtxpool_sleep; mtx_unlock_spin_flags_((m), (opts), LOCK_FILE, LOCK_LINE) #define mtx_trylock_flags(m, opts) \ mtx_trylock_flags_((m), (opts), LOCK_FILE, LOCK_LINE) +#define mtx_trylock_spin_flags(m, opts) \ + mtx_trylock_spin_flags_((m), (opts), LOCK_FILE, LOCK_LINE) #define mtx_assert(m, what) \ mtx_assert_((m), (what), __FILE__, __LINE__) From owner-svn-src-all@freebsd.org Sat Jul 30 15:51:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD264BA99DA; Sat, 30 Jul 2016 15:51:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 902DD1D72; Sat, 30 Jul 2016 15:51:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UFpG9w090363; Sat, 30 Jul 2016 15:51:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UFpGAH090362; Sat, 30 Jul 2016 15:51:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607301551.u6UFpGAH090362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 30 Jul 2016 15:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303553 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 15:51:17 -0000 Author: mav Date: Sat Jul 30 15:51:16 2016 New Revision: 303553 URL: https://svnweb.freebsd.org/changeset/base/303553 Log: Make MAC address generation more random. 'ticks' approach does not work at boot time. Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jul 30 14:47:04 2016 (r303552) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jul 30 15:51:16 2016 (r303553) @@ -493,10 +493,9 @@ static void create_random_local_eui48(u_char *eaddr) { static uint8_t counter = 0; - uint32_t seed = ticks; eaddr[0] = EUI48_LOCALLY_ADMINISTERED; - memcpy(&eaddr[1], &seed, sizeof(uint32_t)); + arc4rand(&eaddr[1], 4, 0); eaddr[5] = counter++; } From owner-svn-src-all@freebsd.org Sat Jul 30 15:56:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C4DEBA9B8F; Sat, 30 Jul 2016 15:56:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F387135B; Sat, 30 Jul 2016 15:56:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UFuar5092892; Sat, 30 Jul 2016 15:56:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UFuaV3092891; Sat, 30 Jul 2016 15:56:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607301556.u6UFuaV3092891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 30 Jul 2016 15:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303554 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 15:56:37 -0000 Author: mav Date: Sat Jul 30 15:56:36 2016 New Revision: 303554 URL: https://svnweb.freebsd.org/changeset/base/303554 Log: Block MSIX negotiation until SMP started and IRQ reshuffled. Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 30 15:51:16 2016 (r303553) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 30 15:56:36 2016 (r303554) @@ -2605,6 +2605,17 @@ intel_ntb_user_mw_to_idx(struct ntb_soft return (uidx); } +static int msix_ready; + +static void +intel_ntb_msix_ready(void *arg __unused) +{ + + msix_ready = 1; +} +SYSINIT(intel_ntb_msix_ready, SI_SUB_SMP, SI_ORDER_ANY, + intel_ntb_msix_ready, NULL); + static void intel_ntb_exchange_msix(void *ctx) { @@ -2619,6 +2630,10 @@ intel_ntb_exchange_msix(void *ctx) if (ntb->peer_msix_done) goto msix_done; + /* Block MSIX negotiation until SMP started and IRQ reshuffled. */ + if (!msix_ready) + goto reschedule; + intel_ntb_get_msix_info(ntb); for (i = 0; i < XEON_NONLINK_DB_MSIX_BITS; i++) { intel_ntb_peer_spad_write(ntb->device, NTB_MSIX_DATA0 + i, From owner-svn-src-all@freebsd.org Sat Jul 30 17:45:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C93DFBA8441; Sat, 30 Jul 2016 17:45:57 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95F401F6E; Sat, 30 Jul 2016 17:45:57 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UHju1T033814; Sat, 30 Jul 2016 17:45:56 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UHju8p033813; Sat, 30 Jul 2016 17:45:56 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201607301745.u6UHju8p033813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 30 Jul 2016 17:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303555 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 17:45:57 -0000 Author: allanjude Date: Sat Jul 30 17:45:56 2016 New Revision: 303555 URL: https://svnweb.freebsd.org/changeset/base/303555 Log: bcache should support reads shorter than sector size dosfs (fat file systems) can perform reads of partial sectors bcache should support such reads. Submitted by: Toomas Soome Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D6475 Modified: head/sys/boot/common/bcache.c Modified: head/sys/boot/common/bcache.c ============================================================================== --- head/sys/boot/common/bcache.c Sat Jul 30 15:56:36 2016 (r303554) +++ head/sys/boot/common/bcache.c Sat Jul 30 17:45:56 2016 (r303555) @@ -303,7 +303,9 @@ read_strategy(void *devdata, int rw, dad break; } - size = i * bcache_blksize; + if (size > i * bcache_blksize) + size = i * bcache_blksize; + if (size != 0) { bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)) + offset, buf, size); From owner-svn-src-all@freebsd.org Sat Jul 30 17:53:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA744BA865A; Sat, 30 Jul 2016 17:53:38 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CEAE1588; Sat, 30 Jul 2016 17:53:38 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UHrbUF037322; Sat, 30 Jul 2016 17:53:37 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UHrb9v037321; Sat, 30 Jul 2016 17:53:37 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201607301753.u6UHrb9v037321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 30 Jul 2016 17:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303556 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 17:53:39 -0000 Author: allanjude Date: Sat Jul 30 17:53:37 2016 New Revision: 303556 URL: https://svnweb.freebsd.org/changeset/base/303556 Log: Improve boot loader quote parsing parse() is the boot loader's interp_parse.c is too naive about quotes both single and double quotes were allowed to be mixed, and single quotes did not follow the usual semantics (re variable expansion). The old code did not check for terminating quotes This update implements: * distinguishing single and double quote * variable expansion will not be done inside single quote protected area * will preserve inner quote for values like "value 'some list'" * ending quote check. this diff does not implement ending quote order check, it shouldn't be too hard, needs some improvements on parser state machine. PR: 204602 Submitted by: Toomas Soome Relnotes: yes Differential Revision: https://reviews.freebsd.org/D6000 Modified: head/sys/boot/common/interp_parse.c Modified: head/sys/boot/common/interp_parse.c ============================================================================== --- head/sys/boot/common/interp_parse.c Sat Jul 30 17:45:56 2016 (r303555) +++ head/sys/boot/common/interp_parse.c Sat Jul 30 17:53:37 2016 (r303556) @@ -72,7 +72,13 @@ isdelim(int ch) static int isquote(int ch) { - return (ch == '\'' || ch == '"'); + return (ch == '\''); +} + +static int +isdquote(int ch) +{ + return (ch == '"'); } int @@ -81,11 +87,11 @@ parse(int *argc, char ***argv, char *str int ac; char *val, *p, *q, *copy = NULL; size_t i = 0; - char token, tmp, quote, *buf; + char token, tmp, quote, dquote, *buf; enum { STR, VAR, WHITE } state; ac = *argc = 0; - quote = 0; + dquote = quote = 0; if (!str || (p = copy = backslash(str)) == NULL) return 1; @@ -105,9 +111,19 @@ parse(int *argc, char ***argv, char *str buf[i++] = *p++; } else if (isquote(*p)) { quote = quote ? 0 : *p; - ++p; - } - else if (isspace(*p) && !quote) { + if (dquote) { /* keep quote */ + PARSE_FAIL(i == (PARSE_BUFSIZE - 1)); + buf[i++] = *p++; + } else + ++p; + } else if (isdquote(*p)) { + dquote = dquote ? 0 : *p; + if (quote) { /* keep dquote */ + PARSE_FAIL(i == (PARSE_BUFSIZE - 1)); + buf[i++] = *p++; + } else + ++p; + } else if (isspace(*p) && !quote && !dquote) { state = WHITE; if (i) { buf[i] = '\0'; @@ -115,7 +131,7 @@ parse(int *argc, char ***argv, char *str i = 0; } ++p; - } else if (*p == '$') { + } else if (*p == '$' && !quote) { token = isdelim(*(p + 1)); if (token) p += 2; @@ -157,6 +173,8 @@ parse(int *argc, char ***argv, char *str break; } } + /* missing terminating ' or " */ + PARSE_FAIL(quote || dquote); /* If at end of token, add it */ if (i && state == STR) { buf[i] = '\0'; From owner-svn-src-all@freebsd.org Sat Jul 30 19:03:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C32ABA9694; Sat, 30 Jul 2016 19:03:34 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7E27135C; Sat, 30 Jul 2016 19:03:33 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UJ3WED062973; Sat, 30 Jul 2016 19:03:32 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UJ3Wi2062972; Sat, 30 Jul 2016 19:03:32 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201607301903.u6UJ3Wi2062972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Sat, 30 Jul 2016 19:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303557 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 19:03:34 -0000 Author: ivadasz Date: Sat Jul 30 19:03:32 2016 New Revision: 303557 URL: https://svnweb.freebsd.org/changeset/base/303557 Log: [iwm] Fix iwm_poll_bit() usage in iwm_stop_device(), fixup r303418. * iwm_poll_bit() returns 1 on success and 0 on failure, whereas iwl_poll_bit() in Linux's iwlwifi returns >= 0 on success and < 0 on failure. * Because of the wrong iwm_poll_bit return code check, no warning was printed if tx DMA stopping failed. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7371 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Sat Jul 30 17:53:37 2016 (r303556) +++ head/sys/dev/iwm/if_iwm.c Sat Jul 30 19:03:32 2016 (r303557) @@ -1310,8 +1310,8 @@ iwm_stop_device(struct iwm_softc *sc) } /* Wait for DMA channels to be idle */ - if (iwm_poll_bit(sc, IWM_FH_TSSR_TX_STATUS_REG, mask, mask, - 5000) < 0) { + if (!iwm_poll_bit(sc, IWM_FH_TSSR_TX_STATUS_REG, mask, mask, + 5000)) { device_printf(sc->sc_dev, "Failing on timeout while stopping DMA channel: [0x%08x]\n", IWM_READ(sc, IWM_FH_TSSR_TX_STATUS_REG)); From owner-svn-src-all@freebsd.org Sat Jul 30 19:14:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CD84BA98E1; Sat, 30 Jul 2016 19:14:12 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 2B99418A6; Sat, 30 Jul 2016 19:14:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7D59FB922; Sat, 30 Jul 2016 15:14:10 -0400 (EDT) From: John Baldwin To: Alexander Motin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303554 - head/sys/dev/ntb/ntb_hw Date: Sat, 30 Jul 2016 12:11:08 -0700 Message-ID: <1813404.404lkyFkVV@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201607301556.u6UFuaV3092891@repo.freebsd.org> References: <201607301556.u6UFuaV3092891@repo.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); Sat, 30 Jul 2016 15:14:10 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 19:14:12 -0000 On Saturday, July 30, 2016 03:56:36 PM Alexander Motin wrote: > Author: mav > Date: Sat Jul 30 15:56:36 2016 > New Revision: 303554 > URL: https://svnweb.freebsd.org/changeset/base/303554 > > Log: > Block MSIX negotiation until SMP started and IRQ reshuffled. Perhaps wrap this in #ifndef EARLY_AP_STARTUP? I am working with a user with a bug on SCHED_4BSD, but once that is fixed I plan to enable EARLY_AP_STARTUP in HEAD on x86. Would you be able to test this case with EARLY_AP_STARTUP (should work fine with ULE AFAIK) and verify you don't need it in that case? -- John Baldwin From owner-svn-src-all@freebsd.org Sat Jul 30 20:02:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32BF8BA83FB; Sat, 30 Jul 2016 20:02:10 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0168F1D86; Sat, 30 Jul 2016 20:02:09 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UK29vN085293; Sat, 30 Jul 2016 20:02:09 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UK29J6085292; Sat, 30 Jul 2016 20:02:09 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201607302002.u6UK29J6085292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 30 Jul 2016 20:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303558 - stable/11/release/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 20:02:10 -0000 Author: cperciva Date: Sat Jul 30 20:02:08 2016 New Revision: 303558 URL: https://svnweb.freebsd.org/changeset/base/303558 Log: MFC r302929: Now that potentially buggy versions of Xen are automatically detected (see r302635, MFCed as r302895), there is no need to force msix interrupt migration off via loader.conf. Reverts: r302184 Approved by: re (gjb) Modified: stable/11/release/tools/ec2.conf Directory Properties: stable/11/ (props changed) Modified: stable/11/release/tools/ec2.conf ============================================================================== --- stable/11/release/tools/ec2.conf Sat Jul 30 19:03:32 2016 (r303557) +++ stable/11/release/tools/ec2.conf Sat Jul 30 20:02:08 2016 (r303558) @@ -72,12 +72,6 @@ vm_extra_pre_umount() { # nodes, but apply the workaround just in case. echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf - # Some EC2 instances run on a version of Xen which has a bug relating - # to the migration of MSI-X interrupts; this is visible as SR-IOV - # networking (aka. "EC2 Enhanced Networking") not being able to pass - # packets. Disable MSI-X interrupt migration to work around this bug. - echo 'machdep.disable_msix_migration="1"' >> ${DESTDIR}/boot/loader.conf - # The first time the AMI boots, the installed "first boot" scripts # should be allowed to run: # * ec2_configinit (download and process EC2 user-data) From owner-svn-src-all@freebsd.org Sat Jul 30 20:19:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD5B8BA8720 for ; Sat, 30 Jul 2016 20:19:06 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) (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 3D79A1589 for ; Sat, 30 Jul 2016 20:19:05 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f48.google.com with SMTP id g62so91846790lfe.3 for ; Sat, 30 Jul 2016 13:19:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=O+qF/okj5rAGEiZDQ9SGEzPMhc8DRr2Edr9qPno5qxc=; b=RVamdyAr5dQkZrbF6Crc19Xl4YpRzHYg71bg48VMUwg2C43Jw4SMrE6c1GdoUAcz9i lmK/+PZbZ+qSKzBE3X+lHKkDXCk37Q/wGcnsv+kFTXLpJN8ZhEXPdwG5zohKtcPHIo9+ tP7bRH0nKHgG87nbxXGmKQ5+VD1r5HJK+ilArBNEK9J2TkjIvWTUZ4lxyYE2yFiTo9IV +psxWfWEKX21Zh8NM+LfQGeUDu0hcjIBUasrlKwWFlgNlts02JsMqiKFQL1vodi33izO qh8ah84SKHUlqATB6PtscOUhq82hJ72S4WzlCZLemO3n+G3qdsrE0/hhKmxgwM+jvGjF TWvw== X-Gm-Message-State: AEkoouuw8rpelCbskBOuXjg21Wut78U0D+AN63YIAn/gET+j8sy8M+Graadw8I20rLCyfQ== X-Received: by 10.25.17.70 with SMTP id g67mr18601007lfi.145.1469909458707; Sat, 30 Jul 2016 13:10:58 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id 62sm3860281ljj.3.2016.07.30.13.10.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Jul 2016 13:10:58 -0700 (PDT) Subject: Re: svn commit: r303530 - head/lib/libc/gen To: Bruce Evans References: <201607300209.u6U29BXC082700@repo.freebsd.org> <20160730140305.G1962@besplex.bde.org> <84c77b80-8b51-8698-f27a-7f6452867d66@freebsd.org> <20160730184454.I2661@besplex.bde.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Andrey Chernov Message-ID: <71b31670-244e-73e1-2092-4c4de5b8a692@freebsd.org> Date: Sat, 30 Jul 2016 23:10:55 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160730184454.I2661@besplex.bde.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 20:19:06 -0000 On 30.07.2016 11:52, Bruce Evans wrote: > On Sat, 30 Jul 2016, Andrey Chernov wrote: > >> On 30.07.2016 7:15, Bruce Evans wrote: >>> On Sat, 30 Jul 2016, Andrey A. Chernov wrote: >>> >>>> Log: >>>> Reset errno for readdirfunc() before contunue. >>> >>> In C99, library functions are not permitted to set errno to 0. The >>> glob() >>> family shouldn't use a different (worse) convention, and POSIX doesn't >>> seem to have any special wording to allow different behaviour. BTW, POSIX says so too: "No function in this volume of POSIX.1-2008 shall set errno to 0." >> This is historic practice for this function at least since GLOB_LIMIT >> was introduced (in 2001) and common across NetBSD/OpenBSD. Existent >> programs may relay on that to check that limit is reached and not >> allocation error, so with few additional overwriting from my side I add >> nothing new: >> >> Revision 80525 >> Modified Sun Jul 29 00:52:37 2001 UTC (15 years ago) by mikeh >> ... >> errno = 0 is documented. See glob(3), GLOB_NOSPACE section too. > > Hmm. This is not in the BUGS section. Strangely, the related non-bug > that glob() may fail and set errno (to a reasonable but nonstandard and > undocumented value?) is in the BUGS section. I guess this is a bug > in conjunction with the promise to set errno to 0 for some failures. > >> The real problem is that glob(3) is very limited in error return codes, >> so they reuse existent codes with errno hack. > > It should have just used the least-unclosely-related standard errno > instead of 0. I was thinking about this way too, f.e. E2BIG or ERANGE are nice candidatures, but still can't decide to break cross-BSD compatibility and historic practice. From owner-svn-src-all@freebsd.org Sat Jul 30 20:31:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECA23BA8B01; Sat, 30 Jul 2016 20:31:13 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE06B1AE8; Sat, 30 Jul 2016 20:31:13 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UKVChX093758; Sat, 30 Jul 2016 20:31:12 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UKVCiE093757; Sat, 30 Jul 2016 20:31:12 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201607302031.u6UKVCiE093757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 30 Jul 2016 20:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303559 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 20:31:14 -0000 Author: bz Date: Sat Jul 30 20:31:12 2016 New Revision: 303559 URL: https://svnweb.freebsd.org/changeset/base/303559 Log: Try to declare _hw_pci for all sysctl cases needed after r303497. MFC after: 5 days X-MFC with: r303497 Modified: head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Sat Jul 30 20:02:08 2016 (r303558) +++ head/sys/dev/pci/pci_pci.c Sat Jul 30 20:31:12 2016 (r303559) @@ -128,9 +128,11 @@ static devclass_t pcib_devclass; DEFINE_CLASS_0(pcib, pcib_driver, pcib_methods, sizeof(struct pcib_softc)); DRIVER_MODULE(pcib, pci, pcib_driver, pcib_devclass, NULL, NULL); -#ifdef NEW_PCIB +#if defined(NEW_PCIB) || defined(PCI_HP) SYSCTL_DECL(_hw_pci); +#endif +#ifdef NEW_PCIB static int pci_clear_pcib; SYSCTL_INT(_hw_pci, OID_AUTO, clear_pcib, CTLFLAG_RDTUN, &pci_clear_pcib, 0, "Clear firmware-assigned resources for PCI-PCI bridge I/O windows."); From owner-svn-src-all@freebsd.org Sat Jul 30 20:39:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DE4CBA8C80; Sat, 30 Jul 2016 20:39:40 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23FAA1EBC; Sat, 30 Jul 2016 20:39:40 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UKddU0096835; Sat, 30 Jul 2016 20:39:39 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UKddbt096834; Sat, 30 Jul 2016 20:39:39 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201607302039.u6UKddbt096834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 30 Jul 2016 20:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303560 - head/usr.sbin/uathload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 20:39:40 -0000 Author: bz Date: Sat Jul 30 20:39:39 2016 New Revision: 303560 URL: https://svnweb.freebsd.org/changeset/base/303560 Log: Rename devname to udevname after including stdlib.h in r303445 as gcc trips over the devname(3) and reports 'shadows a global declaration'. This should unbreak gcc based world builds. Modified: head/usr.sbin/uathload/uathload.c Modified: head/usr.sbin/uathload/uathload.c ============================================================================== --- head/usr.sbin/uathload/uathload.c Sat Jul 30 20:31:12 2016 (r303559) +++ head/usr.sbin/uathload/uathload.c Sat Jul 30 20:39:39 2016 (r303560) @@ -83,15 +83,15 @@ extern uint8_t _binary_ar5523_bin_start; extern uint8_t _binary_ar5523_bin_end; static int -getdevname(const char *devname, char *msgdev, char *datadev) +getdevname(const char *udevname, char *msgdev, char *datadev) { char *bn, *bnbuf, *dn, *dnbuf; - dnbuf = strdup(devname); + dnbuf = strdup(udevname); if (dnbuf == NULL) return (-1); dn = dirname(dnbuf); - bnbuf = strdup(devname); + bnbuf = strdup(udevname); if (bnbuf == NULL) { free(dnbuf); return (-1); @@ -121,7 +121,7 @@ usage(void) int main(int argc, char *argv[]) { - const char *fwname, *devname; + const char *fwname, *udevname; char msgdev[256], datadev[256]; struct uath_fwmsg txmsg, rxmsg; char *txdata; @@ -130,11 +130,11 @@ main(int argc, char *argv[]) int bufsize = 512, verbose = 0; ssize_t len; - devname = NULL; + udevname = NULL; while ((c = getopt(argc, argv, "d:v")) != -1) { switch (c) { case 'd': - devname = optarg; + udevname = optarg; break; case 'v': verbose = 1; @@ -147,7 +147,7 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - if (devname == NULL) + if (udevname == NULL) errx(-1, "No device name; use -d to specify the ugen device"); if (argc > 1) usage(); @@ -166,7 +166,7 @@ main(int argc, char *argv[]) err(-1, "mmap(%s)", fwname); len = sb.st_size; /* XXX verify device is an AR5005 part */ - if (getdevname(devname, msgdev, datadev)) + if (getdevname(udevname, msgdev, datadev)) err(-1, "getdevname error"); msg = open(msgdev, O_RDWR, 0); @@ -186,7 +186,7 @@ main(int argc, char *argv[]) err(-1, "%s: USB_SET_TX_TIMEOUT(%u)", datadev, UATH_DATA_TIMEOUT); - VERBOSE("Load firmware %s to %s\n", fwname, devname); + VERBOSE("Load firmware %s to %s\n", fwname, udevname); bzero(&txmsg, sizeof (struct uath_fwmsg)); txmsg.flags = htobe32(UATH_WRITE_BLOCK); From owner-svn-src-all@freebsd.org Sat Jul 30 21:07:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C284ABA91B0; Sat, 30 Jul 2016 21:07:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 914851A86; Sat, 30 Jul 2016 21:07:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UL6xcS008012; Sat, 30 Jul 2016 21:06:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UL6x9Z008011; Sat, 30 Jul 2016 21:06:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607302106.u6UL6x9Z008011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 30 Jul 2016 21:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303561 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 21:07:00 -0000 Author: mav Date: Sat Jul 30 21:06:59 2016 New Revision: 303561 URL: https://svnweb.freebsd.org/changeset/base/303561 Log: Wrap previous MSIX workaround into #ifndef EARLY_AP_STARTUP. With EARLY_AP_STARTUP we can successfully negotiate MSIX earlier. Requested by: jhb@ Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 30 20:39:39 2016 (r303560) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 30 21:06:59 2016 (r303561) @@ -2605,6 +2605,7 @@ intel_ntb_user_mw_to_idx(struct ntb_soft return (uidx); } +#ifndef EARLY_AP_STARTUP static int msix_ready; static void @@ -2615,6 +2616,7 @@ intel_ntb_msix_ready(void *arg __unused) } SYSINIT(intel_ntb_msix_ready, SI_SUB_SMP, SI_ORDER_ANY, intel_ntb_msix_ready, NULL); +#endif static void intel_ntb_exchange_msix(void *ctx) @@ -2630,9 +2632,11 @@ intel_ntb_exchange_msix(void *ctx) if (ntb->peer_msix_done) goto msix_done; +#ifndef EARLY_AP_STARTUP /* Block MSIX negotiation until SMP started and IRQ reshuffled. */ if (!msix_ready) goto reschedule; +#endif intel_ntb_get_msix_info(ntb); for (i = 0; i < XEON_NONLINK_DB_MSIX_BITS; i++) { From owner-svn-src-all@freebsd.org Sat Jul 30 22:05:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEE61BA8022 for ; Sat, 30 Jul 2016 22:05:10 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x232.google.com (mail-yw0-x232.google.com [IPv6:2607:f8b0:4002:c05::232]) (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 7EB9316F2 for ; Sat, 30 Jul 2016 22:05:10 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x232.google.com with SMTP id r9so143970720ywg.0 for ; Sat, 30 Jul 2016 15:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=omVKDNEqDrigZ/lFH2hNOTNaYLrwisoDvnjs3vRr1Xc=; b=UBcqj4O82Ygbk1hCZTuDLBF5z8cWjxIff91BVDK4+/t6RKXjJrDzzg4A/wVEOO52Jz n+LwYSZp04pLWTnReOexC5ASxeg5ZiZSAvd6F5dhBp3Pzvr4IiB8cbAth83b9TFLj9bp 0rqBL3HVgDJSKFXbg7SFACXaFi+UeogoiU0Lga8GuUSS2choJ7r7lo77XjZYoHOgla9n sVOLa7pDT66HsVCVq9dLf+GXZIc59sjhwGC/5fsKnBYuYeOGPYhLltOVxkCUd51L9eYi KESXODx8lU0JHWmY8+YTQT5DpX07BUekVjMANJsBXOESNsjrRgtiagANQQq6NgpjbF/5 wWJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=omVKDNEqDrigZ/lFH2hNOTNaYLrwisoDvnjs3vRr1Xc=; b=CMVx+WvjXwc65ZipY//04Lx0YLwD16vkipBT71RsfMUgkj7rKaXDI+BF7drhfbC+4N ETWKWhJA0ntEofAMpmgwlr4eBYYtHqbm6OPn5C81Yo68IXoXy4mdNZWcFHVGM0AojKj0 W6HQVyLhJAZY4gbFijisM6gp+xAeCuXuxKhbydRUDhVyY3QfWtVar6iITAdBuAbPnyax Eej7eCfhvENXipPh91C+bgEKItvDJ3d8KHx9t8QeAP6+4NO+VS3q2G/sSkfonXajT29m uas0VHZ2FKIgf4OgDwoKm4Ehl8ExeMay72iLjoMdVAVOt3tozUMxCrSSubvnzAopEjGg +xNw== X-Gm-Message-State: AEkoouu4qiwWhDs8RniZZ08jWNSgq0unI9H3UjpEiVrfMXQdEQw8hKLSIMLsxtJaAi1OAuDb4MSv3tqTtiI/Zw== X-Received: by 10.129.122.7 with SMTP id v7mr39186452ywc.219.1469916309740; Sat, 30 Jul 2016 15:05:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Sat, 30 Jul 2016 15:05:09 -0700 (PDT) In-Reply-To: <201607302039.u6UKddbt096834@repo.freebsd.org> References: <201607302039.u6UKddbt096834@repo.freebsd.org> From: Ed Schouten Date: Sun, 31 Jul 2016 00:05:09 +0200 Message-ID: Subject: Re: svn commit: r303560 - head/usr.sbin/uathload To: "Bjoern A. Zeeb" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 22:05:10 -0000 2016-07-30 22:39 GMT+02:00 Bjoern A. Zeeb : > Rename devname to udevname after including stdlib.h in r303445 > as gcc trips over the devname(3) and reports 'shadows a global declaration'. Whoops! Sorry about that! -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Sat Jul 30 22:21:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 270B2BA841A; Sat, 30 Jul 2016 22:21:50 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB2671CFA; Sat, 30 Jul 2016 22:21:49 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UMLnrg035552; Sat, 30 Jul 2016 22:21:49 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UMLn4E035551; Sat, 30 Jul 2016 22:21:49 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201607302221.u6UMLn4E035551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 30 Jul 2016 22:21:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303562 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 22:21:50 -0000 Author: mjg Date: Sat Jul 30 22:21:48 2016 New Revision: 303562 URL: https://svnweb.freebsd.org/changeset/base/303562 Log: rwlock: s/READER/WRITER/ in wlock lockstat annotation Modified: head/sys/kern/kern_rwlock.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sat Jul 30 21:06:59 2016 (r303561) +++ head/sys/kern/kern_rwlock.c Sat Jul 30 22:21:48 2016 (r303562) @@ -920,7 +920,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u /* Record only the loops spinning and not sleeping. */ if (spin_cnt > sleep_cnt) LOCKSTAT_RECORD4(rw__spin, rw, all_time - sleep_time, - LOCKSTAT_READER, (state & RW_LOCK_READ) == 0, + LOCKSTAT_WRITER, (state & RW_LOCK_READ) == 0, (state & RW_LOCK_READ) == 0 ? 0 : RW_READERS(state)); #endif LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, rw, contested, From owner-svn-src-all@freebsd.org Sat Jul 30 22:23:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00CE6BA85C3; Sat, 30 Jul 2016 22:23:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C80A51FB1; Sat, 30 Jul 2016 22:23:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UMNWnq037666; Sat, 30 Jul 2016 22:23:32 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UMNWD7037665; Sat, 30 Jul 2016 22:23:32 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201607302223.u6UMNWD7037665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 30 Jul 2016 22:23:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303563 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 22:23:33 -0000 Author: mjg Date: Sat Jul 30 22:23:31 2016 New Revision: 303563 URL: https://svnweb.freebsd.org/changeset/base/303563 Log: sx: increment spin_cnt before cpu_spinwait in xlock The change is a no-op only done for consistency with the rest of the file. Modified: head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sat Jul 30 22:21:48 2016 (r303562) +++ head/sys/kern/kern_sx.c Sat Jul 30 22:23:31 2016 (r303563) @@ -889,10 +889,10 @@ _sx_slock_hard(struct sx *sx, int opts, GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { + cpu_spinwait(); #ifdef KDTRACE_HOOKS spin_cnt++; #endif - cpu_spinwait(); } KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), "running");