From owner-svn-src-head@freebsd.org Sun Feb 23 01:09:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 513DF252F24; Sun, 23 Feb 2020 01:09:45 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Q6YP0Kzbz3D3s; Sun, 23 Feb 2020 01:09:44 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 5C2BB16054; Sun, 23 Feb 2020 02:09:37 +0100 (CET) Date: Sun, 23 Feb 2020 02:09:37 +0100 From: Steffen Nurpmeso To: Pedro Giffuni Cc: Florian Smeets , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358153 - head/usr.sbin/services_mkdb Message-ID: <20200223010937.fTLhW%steffen@sdaoden.eu> In-Reply-To: References: <202002200354.01K3s8ib077553@repo.freebsd.org> <03606e17-08fc-f575-95f5-c3c5128bff4f@smeets.xyz> Mail-Followup-To: Pedro Giffuni , Florian Smeets , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.17-52-g56288e6a OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. MIME-Version: 1.0 X-Rspamd-Queue-Id: 48Q6YP0Kzbz3D3s X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 01:09:45 -0000 Hey, just so, because i posted to such a thing the last time. Pedro Giffuni wrote in : |On 22/02/2020 11:18, Florian Smeets wrote: |> On 20.02.20 04:54, Pedro F. Giffuni wrote: |>> Author: pfg |>> Date: Thu Feb 20 03:54:07 2020 |>> New Revision: 358153 |>> URL: https://svnweb.freebsd.org/changeset/base/358153 |>> |>> Log: |>> /etc/services: attempt bring the database to this century. |>> |>> -smtps 465/tcp #smtp protocol over TLS/SSL (was ssmtp) |>> -smtps 465/udp #smtp protocol over TLS/SSL (was ssmtp) |> I'm not sure how removals of services have been handled in the past. |> This change broke loading of my pf rule set, as I had smtps in there. | |Excellent! | |Not that the change broke something but that since we had to revert it |we get a second chance to review such things. | |> I'm not saying that this change is wrong, but I think removing entries |> from services can break all kinds of stuff. Not just firewall rule sets, |> also scripts and thinking more about it, it will most certainly also |> break postfix as it also uses smtps as an alias for port 465 in its |> master.cnf | |According to latest IANA registy: ... kpasswd 464/udp # kpasswd (Theodore Ts o) urd 465/tcp # URL Rendezvous Directory for SSM (Toerless Eckert) submissions 465/tcp # Message Submission over TLS protocol (IESG, IETF Chair, rfc8314) [2017-12-12] igmpv3lite 465/udp # IGMP over UDP for SSM (Toerless Eckert) digital-vrc 466/tcp # digital-vrc (Peter Higginson) Oh yes, they finally managed to overcome the SMTPS problems. The RFC has a nice reading on that (as i seem to remember), yay IETF. I am really happy. (I never understood why POP3S and IMAPS where done but SMTPS was not.) |Anything that can be done upstream to sort this out? | |> I guess this needs to be at least mentioned in the release notes, and |> maybe smtps kept as an alias, and check all the others that were removed? | |For the time being, we can absolutely keep the legacy value with a |conflict note. I wish the services list were a bit easier to maintain |for such situations. Doesn't it just search until it finds the string? Btw. i can only offer the simple awk script that i have for updating services and protocols again, after the critics last time i have evolved it from its ArchLinux base, and added a verbose mode, as you can see above. (That Theodore Ts'o missspelling is IANA rooted.) Whereas it made it more complicated, 139 lines for download and preparation is not that much. Additions could simply be echoed? --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-svn-src-head@freebsd.org Sun Feb 23 01:15:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF7BE253563; Sun, 23 Feb 2020 01:15:45 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Q6hJ1X0lz3NNW; Sun, 23 Feb 2020 01:15:44 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 8BC8D16054; Sun, 23 Feb 2020 02:15:42 +0100 (CET) Date: Sun, 23 Feb 2020 02:15:41 +0100 From: Steffen Nurpmeso To: Pedro Giffuni Cc: Florian Smeets , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358153 - head/usr.sbin/services_mkdb Message-ID: <20200223011541.aLONR%steffen@sdaoden.eu> In-Reply-To: <20200223010937.fTLhW%steffen@sdaoden.eu> References: <202002200354.01K3s8ib077553@repo.freebsd.org> <03606e17-08fc-f575-95f5-c3c5128bff4f@smeets.xyz> <20200223010937.fTLhW%steffen@sdaoden.eu> Mail-Followup-To: Pedro Giffuni , Florian Smeets , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.17-52-g56288e6a OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 48Q6hJ1X0lz3NNW X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of steffen@sdaoden.eu designates 217.144.132.164 as permitted sender) smtp.mailfrom=steffen@sdaoden.eu X-Spamd-Result: default: False [0.13 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.50)[-0.496,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; NEURAL_HAM_LONG(-0.39)[-0.387,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sdaoden.eu]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15987, ipnet:217.144.132.0/24, country:DE]; IP_SCORE(0.32)[asn: 15987(1.60), country: DE(-0.02)] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 01:15:45 -0000 Steffen Nurpmeso wrote in <20200223010937.fTLhW%steffen@sdaoden.eu>: ... |Btw. i can only offer the simple awk script that i have for ... (List removes attachments.) A nice Sunday everybody! --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-svn-src-head@freebsd.org Sun Feb 23 03:32:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D90D62574DC; Sun, 23 Feb 2020 03:32:06 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Q9jf57qdz4f2r; Sun, 23 Feb 2020 03:32:06 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A935763E6; Sun, 23 Feb 2020 03:32:06 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01N3W64e083852; Sun, 23 Feb 2020 03:32:06 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01N3W4AD083843; Sun, 23 Feb 2020 03:32:04 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202002230332.01N3W4AD083843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Sun, 23 Feb 2020 03:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358256 - in head/sys: kern sys vm X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: in head/sys: kern sys vm X-SVN-Commit-Revision: 358256 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 03:32:06 -0000 Author: rlibby Date: Sun Feb 23 03:32:04 2020 New Revision: 358256 URL: https://svnweb.freebsd.org/changeset/base/358256 Log: sys/vm: quiet -Wwrite-strings Discussed with: kib Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D23796 Modified: head/sys/kern/kern_malloc.c head/sys/sys/buf.h head/sys/vm/uma_core.c head/sys/vm/vm_map.c head/sys/vm/vm_object.c head/sys/vm/vm_object.h head/sys/vm/vm_page.c head/sys/vm/vm_pager.c Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Sun Feb 23 03:13:38 2020 (r358255) +++ head/sys/kern/kern_malloc.c Sun Feb 23 03:32:04 2020 (r358256) @@ -153,7 +153,7 @@ static int numzones = MALLOC_DEBUG_MAXZONES; */ struct { int kz_size; - char *kz_name; + const char *kz_name; uma_zone_t kz_zone[MALLOC_DEBUG_MAXZONES]; } kmemzones[] = { {16, "16", }, @@ -1091,7 +1091,7 @@ mallocinit(void *dummy) UMA_ALIGN_PTR, UMA_ZONE_MALLOC); for (i = 0, indx = 0; kmemzones[indx].kz_size != 0; indx++) { int size = kmemzones[indx].kz_size; - char *name = kmemzones[indx].kz_name; + const char *name = kmemzones[indx].kz_name; int subzone; for (subzone = 0; subzone < numzones; subzone++) { Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Sun Feb 23 03:13:38 2020 (r358255) +++ head/sys/sys/buf.h Sun Feb 23 03:32:04 2020 (r358256) @@ -554,7 +554,7 @@ void bufdone(struct buf *); void bd_speedup(void); extern uma_zone_t pbuf_zone; -uma_zone_t pbuf_zsecond_create(char *name, int max); +uma_zone_t pbuf_zsecond_create(const char *name, int max); int cluster_read(struct vnode *, u_quad_t, daddr_t, long, struct ucred *, long, int, int, struct buf **); Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun Feb 23 03:13:38 2020 (r358255) +++ head/sys/vm/uma_core.c Sun Feb 23 03:32:04 2020 (r358256) @@ -223,7 +223,7 @@ struct uma_kctor_args { struct uma_bucket_zone { uma_zone_t ubz_zone; - char *ubz_name; + const char *ubz_name; int ubz_entries; /* Number of items it can hold. */ int ubz_maxsize; /* Maximum allocation size per-item. */ }; Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Feb 23 03:13:38 2020 (r358255) +++ head/sys/vm/vm_map.c Sun Feb 23 03:32:04 2020 (r358256) @@ -5108,7 +5108,7 @@ vm_map_print(vm_map_t map) (void *)entry, (void *)entry->start, (void *)entry->end, entry->eflags); { - static char *inheritance_name[4] = + static const char * const inheritance_name[4] = {"share", "copy", "none", "donate_copy"}; db_iprintf(" prot=%x/%x/%s", Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sun Feb 23 03:13:38 2020 (r358255) +++ head/sys/vm/vm_object.c Sun Feb 23 03:32:04 2020 (r358256) @@ -386,7 +386,7 @@ vm_object_pip_wakeupn(vm_object_t object, short i) * re-acquired on return. */ static void -vm_object_pip_sleep(vm_object_t object, char *waitid) +vm_object_pip_sleep(vm_object_t object, const char *waitid) { refcount_sleep_interlock(&object->paging_in_progress, @@ -394,7 +394,7 @@ vm_object_pip_sleep(vm_object_t object, char *waitid) } void -vm_object_pip_wait(vm_object_t object, char *waitid) +vm_object_pip_wait(vm_object_t object, const char *waitid) { VM_OBJECT_ASSERT_WLOCKED(object); @@ -406,7 +406,7 @@ vm_object_pip_wait(vm_object_t object, char *waitid) } void -vm_object_pip_wait_unlocked(vm_object_t object, char *waitid) +vm_object_pip_wait_unlocked(vm_object_t object, const char *waitid) { VM_OBJECT_ASSERT_UNLOCKED(object); Modified: head/sys/vm/vm_object.h ============================================================================== --- head/sys/vm/vm_object.h Sun Feb 23 03:13:38 2020 (r358255) +++ head/sys/vm/vm_object.h Sun Feb 23 03:32:04 2020 (r358256) @@ -337,8 +337,8 @@ void vm_object_clear_flag(vm_object_t object, u_short void vm_object_pip_add(vm_object_t object, short i); void vm_object_pip_wakeup(vm_object_t object); void vm_object_pip_wakeupn(vm_object_t object, short i); -void vm_object_pip_wait(vm_object_t object, char *waitid); -void vm_object_pip_wait_unlocked(vm_object_t object, char *waitid); +void vm_object_pip_wait(vm_object_t object, const char *waitid); +void vm_object_pip_wait_unlocked(vm_object_t object, const char *waitid); void vm_object_busy(vm_object_t object); void vm_object_unbusy(vm_object_t object); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Feb 23 03:13:38 2020 (r358255) +++ head/sys/vm/vm_page.c Sun Feb 23 03:32:04 2020 (r358256) @@ -451,13 +451,14 @@ vm_page_domain_init(int domain) vmd = VM_DOMAIN(domain); bzero(vmd, sizeof(*vmd)); - *__DECONST(char **, &vmd->vmd_pagequeues[PQ_INACTIVE].pq_name) = + *__DECONST(const char **, &vmd->vmd_pagequeues[PQ_INACTIVE].pq_name) = "vm inactive pagequeue"; - *__DECONST(char **, &vmd->vmd_pagequeues[PQ_ACTIVE].pq_name) = + *__DECONST(const char **, &vmd->vmd_pagequeues[PQ_ACTIVE].pq_name) = "vm active pagequeue"; - *__DECONST(char **, &vmd->vmd_pagequeues[PQ_LAUNDRY].pq_name) = + *__DECONST(const char **, &vmd->vmd_pagequeues[PQ_LAUNDRY].pq_name) = "vm laundry pagequeue"; - *__DECONST(char **, &vmd->vmd_pagequeues[PQ_UNSWAPPABLE].pq_name) = + *__DECONST(const char **, + &vmd->vmd_pagequeues[PQ_UNSWAPPABLE].pq_name) = "vm unswappable pagequeue"; vmd->vmd_domain = domain; vmd->vmd_page_count = 0; Modified: head/sys/vm/vm_pager.c ============================================================================== --- head/sys/vm/vm_pager.c Sun Feb 23 03:13:38 2020 (r358255) +++ head/sys/vm/vm_pager.c Sun Feb 23 03:32:04 2020 (r358256) @@ -191,7 +191,7 @@ vm_pager_bufferinit(void) } uma_zone_t -pbuf_zsecond_create(char *name, int max) +pbuf_zsecond_create(const char *name, int max) { uma_zone_t zone; From owner-svn-src-head@freebsd.org Sun Feb 23 03:32:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A705257627; Sun, 23 Feb 2020 03:32:13 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Q9jn0LVrz4fB6; Sun, 23 Feb 2020 03:32:12 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD32E63F7; Sun, 23 Feb 2020 03:32:12 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01N3WCj8083908; Sun, 23 Feb 2020 03:32:12 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01N3WCRn083904; Sun, 23 Feb 2020 03:32:12 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202002230332.01N3WCRn083904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Sun, 23 Feb 2020 03:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358257 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 358257 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 03:32:13 -0000 Author: rlibby Date: Sun Feb 23 03:32:11 2020 New Revision: 358257 URL: https://svnweb.freebsd.org/changeset/base/358257 Log: vfs: quiet -Wwrite-strings Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D23797 Modified: head/sys/kern/vfs_subr.c head/sys/kern/vfs_vnops.c head/sys/kern/vnode_if.src head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Feb 23 03:32:04 2020 (r358256) +++ head/sys/kern/vfs_subr.c Sun Feb 23 03:32:11 2020 (r358257) @@ -4040,7 +4040,7 @@ vcount(struct vnode *vp) /* * Print out a description of a vnode. */ -static char *typename[] = +static const char * const typename[] = {"VNON", "VREG", "VDIR", "VBLK", "VCHR", "VLNK", "VSOCK", "VFIFO", "VBAD", "VMARKER"}; Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sun Feb 23 03:32:04 2020 (r358256) +++ head/sys/kern/vfs_vnops.c Sun Feb 23 03:32:11 2020 (r358257) @@ -1566,7 +1566,8 @@ vn_poll(struct file *fp, int events, struct ucred *act * permits vn_lock to return doomed vnodes. */ static int __noinline -_vn_lock_fallback(struct vnode *vp, int flags, char *file, int line, int error) +_vn_lock_fallback(struct vnode *vp, int flags, const char *file, int line, + int error) { KASSERT((flags & LK_RETRY) == 0 || error == 0, @@ -1602,7 +1603,7 @@ _vn_lock_fallback(struct vnode *vp, int flags, char *f } int -_vn_lock(struct vnode *vp, int flags, char *file, int line) +_vn_lock(struct vnode *vp, int flags, const char *file, int line) { int error; Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Sun Feb 23 03:32:04 2020 (r358256) +++ head/sys/kern/vnode_if.src Sun Feb 23 03:32:11 2020 (r358257) @@ -380,7 +380,7 @@ vop_reclaim { vop_lock1 { IN struct vnode *vp; IN int flags; - IN char *file; + IN const char *file; IN int line; }; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Sun Feb 23 03:32:04 2020 (r358256) +++ head/sys/sys/vnode.h Sun Feb 23 03:32:11 2020 (r358257) @@ -689,7 +689,7 @@ int vn_generic_copy_file_range(struct vnode *invp, off struct thread *fsize_td); int vn_need_pageq_flush(struct vnode *vp); int vn_isdisk(struct vnode *vp, int *errp); -int _vn_lock(struct vnode *vp, int flags, char *file, int line); +int _vn_lock(struct vnode *vp, int flags, const char *file, int line); #define vn_lock(vp, flags) _vn_lock(vp, flags, __FILE__, __LINE__) int vn_open(struct nameidata *ndp, int *flagp, int cmode, struct file *fp); int vn_open_cred(struct nameidata *ndp, int *flagp, int cmode, From owner-svn-src-head@freebsd.org Sun Feb 23 03:32:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79B07257653; Sun, 23 Feb 2020 03:32:19 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Q9jv0hR4z4fJn; Sun, 23 Feb 2020 03:32:19 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0DB476400; Sun, 23 Feb 2020 03:32:19 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01N3WIWc083974; Sun, 23 Feb 2020 03:32:18 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01N3WHK2083965; Sun, 23 Feb 2020 03:32:17 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202002230332.01N3WHK2083965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Sun, 23 Feb 2020 03:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358258 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 358258 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 03:32:19 -0000 Author: rlibby Date: Sun Feb 23 03:32:16 2020 New Revision: 358258 URL: https://svnweb.freebsd.org/changeset/base/358258 Log: sys/kern: quiet -Wwrite-strings Quiet a variety of Wwrite-strings warnings in sys/kern at low-impact sites. This patch avoids addressing certain others which would need to plumb const through structure definitions. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D23798 Modified: head/sys/kern/kern_cons.c head/sys/kern/kern_linker.c head/sys/kern/kern_shutdown.c head/sys/kern/kern_sig.c head/sys/kern/link_elf.c head/sys/sys/bufobj.h head/sys/sys/conf.h head/sys/sys/cons.h head/sys/sys/signalvar.h Modified: head/sys/kern/kern_cons.c ============================================================================== --- head/sys/kern/kern_cons.c Sun Feb 23 03:32:11 2020 (r358257) +++ head/sys/kern/kern_cons.c Sun Feb 23 03:32:16 2020 (r358258) @@ -98,7 +98,7 @@ static char *consbuf; /* buffer used by `consmsgbuf' static struct callout conscallout; /* callout for outputting to constty */ struct msgbuf consmsgbuf; /* message buffer for console tty */ static u_char console_pausing; /* pause after each line during probe */ -static char *console_pausestr= +static const char console_pausestr[] = ""; struct tty *constty; /* pointer to console "window" tty */ static struct mtx cnputs_mtx; /* Mutex for cnputs(). */ @@ -510,7 +510,7 @@ cnputc(int c) { struct cn_device *cnd; struct consdev *cn; - char *cp; + const char *cp; #ifdef EARLY_PRINTF if (early_putc != NULL) { @@ -571,7 +571,7 @@ cnputsn(const char *p, size_t n) } void -cnputs(char *p) +cnputs(const char *p) { cnputsn(p, strlen(p)); } Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Sun Feb 23 03:32:11 2020 (r358257) +++ head/sys/kern/kern_linker.c Sun Feb 23 03:32:16 2020 (r358258) @@ -1765,7 +1765,7 @@ SYSCTL_STRING(_kern, OID_AUTO, module_path, CTLFLAG_RW TUNABLE_STR("module_path", linker_path, sizeof(linker_path)); -static char *linker_ext_list[] = { +static const char * const linker_ext_list[] = { "", ".ko", NULL @@ -1782,7 +1782,8 @@ linker_lookup_file(const char *path, int pathlen, cons { struct nameidata nd; struct thread *td = curthread; /* XXX */ - char *result, **cpp, *sep; + const char * const *cpp, *sep; + char *result; int error, len, extlen, reclen, flags; enum vtype type; @@ -1838,8 +1839,9 @@ linker_hints_lookup(const char *path, int pathlen, con struct ucred *cred = td ? td->td_ucred : NULL; struct nameidata nd; struct vattr vattr, mattr; + const char *best, *sep; u_char *hints = NULL; - u_char *cp, *recptr, *bufend, *result, *best, *pathbuf, *sep; + u_char *cp, *recptr, *bufend, *result, *pathbuf; int error, ival, bestver, *intp, found, flags, clen, blen; ssize_t reclen; Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Sun Feb 23 03:32:11 2020 (r358257) +++ head/sys/kern/kern_shutdown.c Sun Feb 23 03:32:16 2020 (r358258) @@ -1714,7 +1714,7 @@ dump_finish(struct dumperinfo *di, struct kerneldumphe void dump_init_header(const struct dumperinfo *di, struct kerneldumpheader *kdh, - char *magic, uint32_t archver, uint64_t dumplen) + const char *magic, uint32_t archver, uint64_t dumplen) { size_t dstsize; Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sun Feb 23 03:32:11 2020 (r358257) +++ head/sys/kern/kern_sig.c Sun Feb 23 03:32:16 2020 (r358258) @@ -3181,7 +3181,7 @@ proc_wkilled(struct proc *p) * Kill the current process for stated reason. */ void -killproc(struct proc *p, char *why) +killproc(struct proc *p, const char *why) { PROC_LOCK_ASSERT(p, MA_OWNED); Modified: head/sys/kern/link_elf.c ============================================================================== --- head/sys/kern/link_elf.c Sun Feb 23 03:32:11 2020 (r358257) +++ head/sys/kern/link_elf.c Sun Feb 23 03:32:16 2020 (r358258) @@ -405,7 +405,7 @@ link_elf_init(void* arg) Elf_Size *ctors_sizep; caddr_t modptr, baseptr, sizeptr; elf_file_t ef; - char *modname; + const char *modname; linker_add_class(&link_elf_class); Modified: head/sys/sys/bufobj.h ============================================================================== --- head/sys/sys/bufobj.h Sun Feb 23 03:32:11 2020 (r358257) +++ head/sys/sys/bufobj.h Sun Feb 23 03:32:16 2020 (r358258) @@ -78,7 +78,7 @@ typedef int b_sync_t(struct bufobj *, int waitfor); typedef void b_bdflush_t(struct bufobj *, struct buf *); struct buf_ops { - char *bop_name; + const char *bop_name; b_write_t *bop_write; b_strategy_t *bop_strategy; b_sync_t *bop_sync; Modified: head/sys/sys/conf.h ============================================================================== --- head/sys/sys/conf.h Sun Feb 23 03:32:11 2020 (r358257) +++ head/sys/sys/conf.h Sun Feb 23 03:32:16 2020 (r358258) @@ -374,7 +374,7 @@ int dump_append(struct dumperinfo *, void *, vm_offset int dump_write(struct dumperinfo *, void *, vm_offset_t, off_t, size_t); int dump_finish(struct dumperinfo *di, struct kerneldumpheader *kdh); void dump_init_header(const struct dumperinfo *di, struct kerneldumpheader *kdh, - char *magic, uint32_t archver, uint64_t dumplen); + const char *magic, uint32_t archver, uint64_t dumplen); #endif /* _KERNEL */ Modified: head/sys/sys/cons.h ============================================================================== --- head/sys/sys/cons.h Sun Feb 23 03:32:11 2020 (r358257) +++ head/sys/sys/cons.h Sun Feb 23 03:32:16 2020 (r358258) @@ -136,7 +136,7 @@ int cncheckc(void); int cngetc(void); void cngets(char *, size_t, int); void cnputc(int); -void cnputs(char *); +void cnputs(const char *); void cnputsn(const char *, size_t); int cnunavailable(void); void constty_set(struct tty *tp); Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Sun Feb 23 03:32:11 2020 (r358257) +++ head/sys/sys/signalvar.h Sun Feb 23 03:32:16 2020 (r358258) @@ -384,7 +384,7 @@ sigallowstop(int prev) int cursig(struct thread *td); void execsigs(struct proc *p); void gsignal(int pgid, int sig, ksiginfo_t *ksi); -void killproc(struct proc *p, char *why); +void killproc(struct proc *p, const char *why); ksiginfo_t * ksiginfo_alloc(int wait); void ksiginfo_free(ksiginfo_t *ksi); int pksignal(struct proc *p, int sig, ksiginfo_t *ksi); From owner-svn-src-head@freebsd.org Sun Feb 23 03:53:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6798257C9C; Sun, 23 Feb 2020 03:53:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QBBC35mJz44vB; Sun, 23 Feb 2020 03:53:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 531EBACC0; Sun, 23 Feb 2020 03:53:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f181.google.com with SMTP id w47so4344628qtk.4; Sat, 22 Feb 2020 19:53:23 -0800 (PST) X-Gm-Message-State: APjAAAVByDDj1/mvzjUKq0l5M8rs+cMWfdBgNpI/lv+/9SdOsOt851IN ZcHN/ndcM4XaAIsIk2Bfw7smCHHdhWqi8WWAhgA= X-Google-Smtp-Source: APXvYqxvpAHUzibyxpXHVE775Ke3zXbLRaWmgonhb0ocaTPcWRgvSccXWtkHPGCXyTLbeFjpn8hsJmOWgRUVVAy2U2o= X-Received: by 2002:aed:3f70:: with SMTP id q45mr39651094qtf.310.1582430002850; Sat, 22 Feb 2020 19:53:22 -0800 (PST) MIME-Version: 1.0 References: <202002230332.01N3WCRn083904@repo.freebsd.org> In-Reply-To: <202002230332.01N3WCRn083904@repo.freebsd.org> From: Kyle Evans Date: Sat, 22 Feb 2020 21:53:11 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358257 - in head/sys: kern sys To: Ryan Libby Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 03:53:23 -0000 On Sat, Feb 22, 2020 at 9:32 PM Ryan Libby wrote: > > Author: rlibby > Date: Sun Feb 23 03:32:11 2020 > New Revision: 358257 > URL: https://svnweb.freebsd.org/changeset/base/358257 > > Log: > vfs: quiet -Wwrite-strings > > Reviewed by: kib, markj > Differential Revision: https://reviews.freebsd.org/D23797 > Only tangentially related to this, I have a patch in one of my WIP branches that const-poisons vn_fullpath()'s retbuf parameter, if that's of any interest. Many consumers will set a default value to a statically allocated string before passing it in as the retbuf -- I had a use-case where I'd be trying to do similar but with a function that actually returns a const char *, but that particular case may not get committed. I can post the patch to phabricator if anyone cares about this -- the impact on callers isn't actually all that bad, basically just shuffling around declarations. There's only one case where it ends up introducing some __DECONST ugliness because the caller writes it out with uiomove(). Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Sun Feb 23 03:58:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50719257D78; Sun, 23 Feb 2020 03:58:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QBHX5HPtz4F1h; Sun, 23 Feb 2020 03:58:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [192.168.0.3] (unknown [181.52.72.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: pfg) by smtp.freebsd.org (Postfix) with ESMTPSA id 10AE8ACC1; Sun, 23 Feb 2020 03:57:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r358153 - head/usr.sbin/services_mkdb To: Florian Smeets , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002200354.01K3s8ib077553@repo.freebsd.org> <03606e17-08fc-f575-95f5-c3c5128bff4f@smeets.xyz> <20200223010937.fTLhW%steffen@sdaoden.eu> From: Pedro Giffuni Organization: FreeBSD Message-ID: Date: Sat, 22 Feb 2020 22:57:59 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200223010937.fTLhW%steffen@sdaoden.eu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 03:58:01 -0000 On 22/02/2020 20:09, Steffen Nurpmeso wrote: > Hey, just so, because i posted to such a thing the last time. > > Pedro Giffuni wrote in > : > |On 22/02/2020 11:18, Florian Smeets wrote: > |> On 20.02.20 04:54, Pedro F. Giffuni wrote: > |>> Author: pfg > |>> Date: Thu Feb 20 03:54:07 2020 > |>> New Revision: 358153 > |>> URL: https://svnweb.freebsd.org/changeset/base/358153 > |>> > |>> Log: > |>> /etc/services: attempt bring the database to this century. > |>> > |>> -smtps 465/tcp #smtp protocol over TLS/SSL (was ssmtp) > |>> -smtps 465/udp #smtp protocol over TLS/SSL (was ssmtp) > |> I'm not sure how removals of services have been handled in the past. > |> This change broke loading of my pf rule set, as I had smtps in there. > | > |Excellent! > | > |Not that the change broke something but that since we had to revert it > |we get a second chance to review such things. > | > |> I'm not saying that this change is wrong, but I think removing entries > |> from services can break all kinds of stuff. Not just firewall rule sets, > |> also scripts and thinking more about it, it will most certainly also > |> break postfix as it also uses smtps as an alias for port 465 in its > |> master.cnf > | > |According to latest IANA registy: > ... > > kpasswd 464/udp # kpasswd (Theodore Ts o) > urd 465/tcp # URL Rendezvous Directory for SSM (Toerless Eckert) > submissions 465/tcp # Message Submission over TLS protocol (IESG, IETF Chair, rfc8314) [2017-12-12] > igmpv3lite 465/udp # IGMP over UDP for SSM (Toerless Eckert) > digital-vrc 466/tcp # digital-vrc (Peter Higginson) > > Oh yes, they finally managed to overcome the SMTPS problems. > The RFC has a nice reading on that (as i seem to remember), yay IETF. > I am really happy. (I never understood why POP3S and IMAPS where > done but SMTPS was not.) Hmm .. I quoted the IANA list but I hadn't read the RFC. Interesting but I don't know if it solves Florian's issue. > |Anything that can be done upstream to sort this out? > | > |> I guess this needs to be at least mentioned in the release notes, and > |> maybe smtps kept as an alias, and check all the others that were removed? > | > |For the time being, we can absolutely keep the legacy value with a > |conflict note. I wish the services list were a bit easier to maintain > |for such situations. > > Doesn't it just search until it finds the string? > Btw. i can only offer the simple awk script that i have for > updating services and protocols again, after the critics last time > i have evolved it from its ArchLinux base, and added a verbose > mode, as you can see above. (That Theodore Ts'o missspelling is > IANA rooted.) Whereas it made it more complicated, 139 lines for > download and preparation is not that much. Interesting. There's also https://reviews.freebsd.org/D17115 Where I made some comments. Currently services_mkdb doesn't scale (which is why the patch was reverted), but beyond that the real problem is that we shouldn't just take the entries blindly. Many people abuse the registry for their startups and licensing services and then never de-register them.  In the case of NetBSD's services file, it currently has 21838 lines, which is bigger that the official IANA file. > Additions could simply be echoed? I expect we maintain a relatively short list and have people send PRs for new entries (assuming they are registered). BTW, we should probably go ahead and register our lockd in IANA as the port number already collides with something else and our use is propagating to other OSs (namely illumos). Pedro. > --steffen > | > |Der Kragenbaer, The moon bear, > |der holt sich munter he cheerfully and one by one > |einen nach dem anderen runter wa.ks himself off > |(By Robert Gernhardt) From owner-svn-src-head@freebsd.org Sun Feb 23 04:02:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 808BF257FAC; Sun, 23 Feb 2020 04:02:27 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QBNg2C7Gz4KfC; Sun, 23 Feb 2020 04:02:27 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f196.google.com with SMTP id l21so4327423qtr.8; Sat, 22 Feb 2020 20:02:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f8FEvJdea+PZHJ+K1fkomfxnS8AvXb15opxPI/K9zcM=; b=qBZZZ4eLmMzOr0Qtaow1oSKeXuf6OlCsSg3ou+7TFHKuycaktOmxJQYuUKkpQ8s7Ym TKmepvioobmtNDVEMlp7a9CLHMM8+KMAGpeIc8BlOVopzSFq+A8N+8lkJIJi0TInTlUv FwhygZ9WX5U32/Ki3h1WUZjHmKFi/9VIZ/S3u9bzwrIOMFOLKiwST9p9fAH1zFaFziek cjM821Lj8aeka2QPcr7RNYvqp00n0HsXm7Auhu7VQ+cn0gXisia8Xn8ju7IaCIvL/W1D KVh7C4NGV7W1xq/wSXgBNKEEfUeGqVGeopayGo9GNunKJIO6ejbiH8gObRYVgcBEMCr7 eJKw== X-Gm-Message-State: APjAAAVU29AcUKNUxyV6fORq+SECUzRZXkWTyZUWjhz55VWaHy1uUga2 dWKgh8JIlVadXHrNBpJ56oBJ30/4oM4= X-Google-Smtp-Source: APXvYqwVL3iI85mm1ijuEPJ38FZusHSWgVFOkWmjnN5zjX1+GtABul/SOp2QlAse1/ES7EBxKxWYtg== X-Received: by 2002:aed:3f77:: with SMTP id q52mr40363767qtf.248.1582430545691; Sat, 22 Feb 2020 20:02:25 -0800 (PST) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com. [209.85.160.174]) by smtp.gmail.com with ESMTPSA id i16sm3937769qkh.120.2020.02.22.20.02.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 22 Feb 2020 20:02:25 -0800 (PST) Received: by mail-qt1-f174.google.com with SMTP id i23so4347597qtr.5; Sat, 22 Feb 2020 20:02:25 -0800 (PST) X-Received: by 2002:ac8:5510:: with SMTP id j16mr40409420qtq.262.1582430545124; Sat, 22 Feb 2020 20:02:25 -0800 (PST) MIME-Version: 1.0 References: <202002230332.01N3WCRn083904@repo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Sat, 22 Feb 2020 20:02:14 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358257 - in head/sys: kern sys To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48QBNg2C7Gz4KfC X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 04:02:27 -0000 On Sat, Feb 22, 2020 at 7:53 PM Kyle Evans wrote: > > On Sat, Feb 22, 2020 at 9:32 PM Ryan Libby wrote: > > > > Author: rlibby > > Date: Sun Feb 23 03:32:11 2020 > > New Revision: 358257 > > URL: https://svnweb.freebsd.org/changeset/base/358257 > > > > Log: > > vfs: quiet -Wwrite-strings > > > > Reviewed by: kib, markj > > Differential Revision: https://reviews.freebsd.org/D23797 > > > > Only tangentially related to this, I have a patch in one of my WIP > branches that const-poisons vn_fullpath()'s retbuf parameter, if > that's of any interest. Many consumers will set a default value to a > statically allocated string before passing it in as the retbuf -- I > had a use-case where I'd be trying to do similar but with a function > that actually returns a const char *, but that particular case may not > get committed. > > I can post the patch to phabricator if anyone cares about this -- the > impact on callers isn't actually all that bad, basically just > shuffling around declarations. There's only one case where it ends up > introducing some __DECONST ugliness because the caller writes it out > with uiomove(). > > Thanks, > > Kyle Evans I did notice vn_fullpath when I tried out the build with -Wwrite-strings, and I decided to stay far away from it! Feel free to add me to a review if you decide to post it. In general there was a lot more that was triggered by -Wwrite-strings, and I only touched the stuff that was in sys/kern or sys/vm and that I thought would have quick and non-controversial resolutions. From owner-svn-src-head@freebsd.org Sun Feb 23 15:21:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1BAA323F8DB; Sun, 23 Feb 2020 15:21:16 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QTRv6ZXJz4Frw; Sun, 23 Feb 2020 15:21:15 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0983E65B; Sun, 23 Feb 2020 15:21:15 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01NFLFdc008217; Sun, 23 Feb 2020 15:21:15 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01NFLFjC008205; Sun, 23 Feb 2020 15:21:15 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202002231521.01NFLFjC008205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 23 Feb 2020 15:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358260 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 358260 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 15:21:16 -0000 Author: tsoome Date: Sun Feb 23 15:21:15 2020 New Revision: 358260 URL: https://svnweb.freebsd.org/changeset/base/358260 Log: loader: alloc_pread() should set errno if malloc fails We may want to find out why alloc_pread() failed. Modified: head/stand/common/misc.c Modified: head/stand/common/misc.c ============================================================================== --- head/stand/common/misc.c Sun Feb 23 15:18:28 2020 (r358259) +++ head/stand/common/misc.c Sun Feb 23 15:21:15 2020 (r358260) @@ -149,6 +149,7 @@ alloc_pread(int fd, off_t off, size_t len) #ifdef DEBUG printf("\nmalloc(%d) failed\n", (int)len); #endif + errno = ENOMEM; return (NULL); } if (lseek(fd, off, SEEK_SET) == -1) { From owner-svn-src-head@freebsd.org Sun Feb 23 17:59:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 22A45243B91; Sun, 23 Feb 2020 17:59:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QXyv4dQSz4YSq; Sun, 23 Feb 2020 17:59:51 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93DA9184AA; Sun, 23 Feb 2020 17:59:51 +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 01NHxpaq005335; Sun, 23 Feb 2020 17:59:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01NHxps1005334; Sun, 23 Feb 2020 17:59:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002231759.01NHxps1005334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 23 Feb 2020 17:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358261 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358261 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 17:59:52 -0000 Author: markj Date: Sun Feb 23 17:59:51 2020 New Revision: 358261 URL: https://svnweb.freebsd.org/changeset/base/358261 Log: Allow swap_pager_putpages() to allocate one block at a time. The minimum allocation size of 4 blocks is an old policy that came with the "new" swap pager in r42957. Since then the blist allocator has gotten better at reducing fragmentation; for example, with r349777 it can return a range that spans multiple leaves. When swap space is close to being exhaused, the minimum of 4 blocks most likely exacerbates memory pressure, so reduce it to 1. Reported by: alc Tested by: pho Reviewed by: alc, dougm, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23763 Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sun Feb 23 15:21:15 2020 (r358260) +++ head/sys/vm/swap_pager.c Sun Feb 23 17:59:51 2020 (r358261) @@ -1464,7 +1464,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t *ma, /* Get a block of swap of size up to size n. */ VM_OBJECT_WLOCK(object); - blk = swp_pager_getswapspace(&n, 4); + blk = swp_pager_getswapspace(&n, 1); if (blk == SWAPBLK_NONE) { VM_OBJECT_WUNLOCK(object); mtx_lock(&swbuf_mtx); From owner-svn-src-head@freebsd.org Sun Feb 23 19:04:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD4EA245263; Sun, 23 Feb 2020 19:04:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QZPC4hJvz4Z27; Sun, 23 Feb 2020 19:04:15 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96673191BB; Sun, 23 Feb 2020 19:04:15 +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 01NJ4FXq046983; Sun, 23 Feb 2020 19:04:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01NJ4FmD046982; Sun, 23 Feb 2020 19:04:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002231904.01NJ4FmD046982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 23 Feb 2020 19:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358262 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 358262 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 19:04:15 -0000 Author: imp Date: Sun Feb 23 19:04:15 2020 New Revision: 358262 URL: https://svnweb.freebsd.org/changeset/base/358262 Log: Use MACHINE_ARCH instead of TARGET_ARCH TARGET_ARCH is only for use in Makefile.inc1 contexts. MACHINE_ARCH is the preferred thing to set. Makefile.inc1 sets MACHINE_ARCH in the cross build case, and make sets it in the native build case. This will fix anybody doing a native build. Add a comment for why we have to do this dance so when/if the problem with CFLAGS is fixed for the kernel this workaround can be removed. Modified: head/sys/conf/Makefile.riscv Modified: head/sys/conf/Makefile.riscv ============================================================================== --- head/sys/conf/Makefile.riscv Sun Feb 23 17:59:51 2020 (r358261) +++ head/sys/conf/Makefile.riscv Sun Feb 23 19:04:15 2020 (r358262) @@ -46,7 +46,9 @@ SYSTEM_LD= @${LD} -N -m ${LD_EMULATION} -Bdynamic -T $ CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls .endif -CFLAGS += -DMACHINE_ARCH=\"${TARGET_ARCH}\" +# Currently, the compile flags don't let the kernel know if this is a hard-float +# ABI build or a soft-float ABI build. We need to pass in this information. +CFLAGS += -DMACHINE_ARCH=\"${MACHINE_ARCH}\" # hack because genassym.c includes sys/bus.h which includes these. genassym.o: bus_if.h device_if.h From owner-svn-src-head@freebsd.org Sun Feb 23 19:37:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DAD71245FF6 for ; Sun, 23 Feb 2020 19:37:19 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Qb7M0l4fz4b5r for ; Sun, 23 Feb 2020 19:37:18 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1582486636; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=ZpZD+1nTR+BbElKIt7EAXkyjd0W6MmwAeY0lORPUTJJGRiAE9TP1HfMjqai7TlI9DyLb4Gnnam62j H2D43Fgk6nJqYTXTdBzVzlG9LBZEJb8ubkYWFFm3qPcXRoQp/J9xyPWaPcIhWLRyqCRVdMbHmshR1B GcVReEzMRkmgchKDueawKXCbZ+FsY4XJBBHZHzOKeGRKShhXNXeFi0K5L8Nt7gboO44gRnAO6HaAD3 XZ8iCymqAv2Z+VpbZUpvSTs1UTvtU2GDDxVGjpYi97gE5mJkDF0VJdk16Do//VXkmRgmI3XWas5AXF RnkTQeDe2HDUiv6H0FPECYjikivaylw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=5Chfahq0Xelm4O7dtSVlWR6eeYMfQbZXxS6TXxktkg4=; b=ZNjO/DzA/zGp3KEIu2QHB16LmuzcbxoPMym/5DeI6atAWTNv2iHPaAAIXP5A2+1oUKv6a//OldRCE xtzN0kM1kKEI/CCfHegSvHaTzzWiOyRuLO8MLlrT2wYAz3oBFh8M3u04yQQsqc1BePL7TqPyT85sLE GEVliJxyfwdr83XBBgnIkdqYmGtb5UX0HWjv8EFIdmGaABMqPIV6V0dYZDhMMRf1pdyBLIH0DHR/T3 KP0CPk+lmRMZ+GgDFoVRXP0c3wuC8Tkpv+5jMWuY4JREKLGniNT8lntqoYdOlLyP+uLbKnn0BCLe5A w/E5L1AwMOZ5EfczOfP27pxXJAYAevw== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=5Chfahq0Xelm4O7dtSVlWR6eeYMfQbZXxS6TXxktkg4=; b=NIlUjXHWSWiuQ9YBbkFiF3y7BImYDKxU8G+BV63xGkbzC4SACn+GPSQi+D7mSa4R9EQ8EYsAtjha/ aSkkxyqCzpHKctx5Lcr437Y81cVUlaUebi3jvKJA/GA4Gy2A59RQKRg0I7wMfUWdMoTYRHoqkEs+PJ qY1BkQQtT4ITTuuX1r8tl0NCfkwT9qhCPLdSU8c2sgFNY4G7SyXuMJ1qx8riPk7/k6IBnSJQgocruB BzjoHiAA2qiYEwEtTOoTRawbbVto6hYH2CT33gtg93v1YPG+IZ3Uf3z0jowUwFGWPOWkW6ZkVefnU0 eYoxL7KBB4PTBP1YNwFRAkj2eTALo/A== X-MHO-RoutePath: aGlwcGll X-MHO-User: e49fe162-5673-11ea-9eb3-25e2dfa9fa8d X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id e49fe162-5673-11ea-9eb3-25e2dfa9fa8d; Sun, 23 Feb 2020 19:37:15 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 01NJbE8N020010; Sun, 23 Feb 2020 12:37:14 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <66fe6ff74daea4320dc1c89ca36dbad964945081.camel@freebsd.org> Subject: Re: svn commit: r358262 - head/sys/conf From: Ian Lepore To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 23 Feb 2020 12:37:14 -0700 In-Reply-To: <202002231904.01NJ4FmD046982@repo.freebsd.org> References: <202002231904.01NJ4FmD046982@repo.freebsd.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48Qb7M0l4fz4b5r X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.96 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.97)[-0.969,0]; NEURAL_HAM_LONG(-0.99)[-0.995,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 19:37:19 -0000 On Sun, 2020-02-23 at 19:04 +0000, Warner Losh wrote: > Author: imp > Date: Sun Feb 23 19:04:15 2020 > New Revision: 358262 > URL: https://svnweb.freebsd.org/changeset/base/358262 > > Log: > Use MACHINE_ARCH instead of TARGET_ARCH > > TARGET_ARCH is only for use in Makefile.inc1 contexts. MACHINE_ARCH is the > preferred thing to set. Makefile.inc1 sets MACHINE_ARCH in the cross build > case, and make sets it in the native build case. This will fix anybody doing a > native build. Add a comment for why we have to do this dance so when/if the > problem with CFLAGS is fixed for the kernel this workaround can be removed. > I suddenly wonder: why does the kernel build need to know about the float ABI if we don't use floating point in the kernel? If it's about whether to include support for the floating point hardware (save/restore context at the userland boundary, etc), then shouldn't that be controlled with a kernel config option or device statement like it is on other arches? If the kernel actually is being compiled with different -march= to generate hardfloat instructions/register usage/etc, then shouldn't there be some compiler-defined macro to indicate that? (A quick search says that __riscv_float_abi_soft may be that macro.) -- Ian From owner-svn-src-head@freebsd.org Sun Feb 23 20:21:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A941924778E for ; Sun, 23 Feb 2020 20:21:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Qc6d533Yz3HFw for ; Sun, 23 Feb 2020 20:21:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf41.google.com with SMTP id o18so3328135qvf.1 for ; Sun, 23 Feb 2020 12:21:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V7X8tk9+glRuaiYvdosrcbHE3jpy5Sm42FBrF7XJe70=; b=HXQwCu2IML9YgcOQaqLh7VGTLmUL1JY11PCRGGuSFvMh5nuiUyMXNA1fse8owSpqwZ I72vupcxHl+SO0949OMQfBbBlvTsl9+UAdgorrBcLZl65PeqQXvixg8izlpxSU43/7q6 5mLgIEWZo/cmqKmidSDyU95egUcuPk1eVyR+bziprG5uf07CAGz7upMOjrQjDp++BQS0 RU/RzKG34ZVM7HEvBwCP5u4jErgvddwyombpxLixAw6bp+sYlha5b2qUFllSfhUfY5E2 eer2SqjJHDZVwUnVotlSbOlbLwjO2tIu8iEJpA/LVPjdoLy8DqrxA75cEO4notczfNzW xbVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V7X8tk9+glRuaiYvdosrcbHE3jpy5Sm42FBrF7XJe70=; b=obRYHFrL8uUYlVYENPeVnD5/B3mD65pc3jOc6fxxYDY+j01ukIyxablxOWiz32FDAV gIPNZESFhzbLw3KJCFcoY9GrqyQLp3MJ/Dsg7iqncoftzRUA8Zq/skUBvj+SzTjviOrJ ESXzOtPGzc3XsGqCPblBZWwGC8l9xUmPqa4GhhddlTPG/NCt2y3h3Wl+9ZGS8fr2ZoNu c293SFIAPhK9gspY/MeWQqCX1RxH5o3P0QwlUhoViFEYEwejfl6g6PeaO5yEM36MDK15 7LUe7Smy3o/M2d09tB/DKIDjqHT8GEnqxK1NmeVWnrVHt7NLSKDyHVVFAkpWK1z7X8Lp MF5g== X-Gm-Message-State: APjAAAXNpFlWw+eZRFMT2d/b7msCCBj0aGIdd3yoYOe+P5lcGgKiKeTg HNGhyq6ZBlaaAsJqMFr9vsrvxnJmxKkgLesIQxx/0g== X-Google-Smtp-Source: APXvYqyCHpfUu4V3uCrk+UQBg6lO87qcPL16g9uajgKP4dY8ZpIvdRoOJcSoHuG5CCLi+pzDe4rAzGiij5uA9gFlZ0E= X-Received: by 2002:a05:6214:1433:: with SMTP id o19mr41632430qvx.87.1582489304672; Sun, 23 Feb 2020 12:21:44 -0800 (PST) MIME-Version: 1.0 References: <202002231904.01NJ4FmD046982@repo.freebsd.org> <66fe6ff74daea4320dc1c89ca36dbad964945081.camel@freebsd.org> In-Reply-To: <66fe6ff74daea4320dc1c89ca36dbad964945081.camel@freebsd.org> From: Warner Losh Date: Sun, 23 Feb 2020 13:21:32 -0700 Message-ID: Subject: Re: svn commit: r358262 - head/sys/conf To: Ian Lepore Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 48Qc6d533Yz3HFw X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=HXQwCu2I; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f41) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.62 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.63)[ip: (0.48), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 20:21:46 -0000 On Sun, Feb 23, 2020, 12:37 PM Ian Lepore wrote: > On Sun, 2020-02-23 at 19:04 +0000, Warner Losh wrote: > > Author: imp > > Date: Sun Feb 23 19:04:15 2020 > > New Revision: 358262 > > URL: https://svnweb.freebsd.org/changeset/base/358262 > > > > Log: > > Use MACHINE_ARCH instead of TARGET_ARCH > > > > TARGET_ARCH is only for use in Makefile.inc1 contexts. MACHINE_ARCH is > the > > preferred thing to set. Makefile.inc1 sets MACHINE_ARCH in the cross > build > > case, and make sets it in the native build case. This will fix anybody > doing a > > native build. Add a comment for why we have to do this dance so > when/if the > > problem with CFLAGS is fixed for the kernel this workaround can be > removed. > > > > I suddenly wonder: why does the kernel build need to know about the > float ABI if we don't use floating point in the kernel? If it's about > whether to include support for the floating point hardware > (save/restore context at the userland boundary, etc), then shouldn't > that be controlled with a kernel config option or device statement like > it is on other arches? > This is so the sysctl that make uses returns the right thing. If the kernel actually is being compiled with different -march= to > generate hardfloat instructions/register usage/etc, then shouldn't > there be some compiler-defined macro to indicate that? (A quick search > says that __riscv_float_abi_soft may be that macro.) > The code review for the prior change explored that. This change just documented the prior change and used the right make variable. I honestly think this is a short term hack until other issues are settled. I justed wanted the hack to be right. Warner -- Ian > > > From owner-svn-src-head@freebsd.org Sun Feb 23 23:29:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1D6624C538; Sun, 23 Feb 2020 23:29:55 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QhHk1fy6z4621; Sun, 23 Feb 2020 23:29:54 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5EA01C3B5; Sun, 23 Feb 2020 23:29:53 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01NNTrlp003444; Sun, 23 Feb 2020 23:29:53 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01NNTrHG003443; Sun, 23 Feb 2020 23:29:53 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <202002232329.01NNTrHG003443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 23 Feb 2020 23:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358264 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: sevan X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 358264 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 23:29:56 -0000 Author: sevan (doc committer) Date: Sun Feb 23 23:29:53 2020 New Revision: 358264 URL: https://svnweb.freebsd.org/changeset/base/358264 Log: Website announcement of the 9.0 release wasn't a Valentine's day accident. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Sun Feb 23 21:48:48 2020 (r358263) +++ head/share/misc/bsd-family-tree Sun Feb 23 23:29:53 2020 (r358264) @@ -799,7 +799,7 @@ OpenBSD 6.6 2019-10-17 [OBD] macOS 10.15 2019-10-07 [APL] macOS 10.15.1 2019-10-29 [APL] (security/critical release) FreeBSD 12.1 2019-11-04 [FBD] -NetBSD 9.0 2020-02-15 [NBD] +NetBSD 9.0 2020-02-14 [NBD] Bibliography ------------------------ From owner-svn-src-head@freebsd.org Sun Feb 23 23:36:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF6E724C7C3; Sun, 23 Feb 2020 23:36:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QhRs5NL1z4M01; Sun, 23 Feb 2020 23:36:57 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACF981C575; Sun, 23 Feb 2020 23:36:57 +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 01NNav1K009260; Sun, 23 Feb 2020 23:36:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01NNavfI009258; Sun, 23 Feb 2020 23:36:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002232336.01NNavfI009258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 23 Feb 2020 23:36:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358265 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 358265 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 23:36:58 -0000 Author: imp Date: Sun Feb 23 23:36:56 2020 New Revision: 358265 URL: https://svnweb.freebsd.org/changeset/base/358265 Log: Relax machine directives a little. Currently, you can have multiple machine directives if they are otherwise identical. Relax this so that only the machinename part is the same. This allows one to change the machine arch in a different config file you've included easily. Modified: head/usr.sbin/config/config.5 head/usr.sbin/config/config.y Modified: head/usr.sbin/config/config.5 ============================================================================== --- head/usr.sbin/config/config.5 Sun Feb 23 23:29:53 2020 (r358264) +++ head/usr.sbin/config/config.5 Sun Feb 23 23:36:56 2020 (r358265) @@ -283,7 +283,8 @@ corresponds to MACHINE_ARCH. .Pp A kernel configuration file may have only one .Ic machine -directive. +directive, unless the second one matches the +machine argument in the first one exactly. .\" -------- MAKEOPTION -------- .Pp .It Ic makeoption Ar options Modified: head/usr.sbin/config/config.y ============================================================================== --- head/usr.sbin/config/config.y Sun Feb 23 23:29:53 2020 (r358264) +++ head/usr.sbin/config/config.y Sun Feb 23 23:36:56 2020 (r358265) @@ -155,8 +155,11 @@ Config_spec: machinearch = $2; } | ARCH Save_id Save_id { - if (machinename != NULL && - !(eq($2, machinename) && eq($3, machinearch))) + /* + * Allow the machinearch to change with a second machine directive, + * but still enforce no changes to the machinename. + */ + if (machinename != NULL && !eq($2, machinename)) errx(1, "%s:%d: only one machine directive is allowed", yyfile, yyline); machinename = $2; From owner-svn-src-head@freebsd.org Sun Feb 23 23:39:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5239B24C876; Sun, 23 Feb 2020 23:39:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QhWJ1VH6z4SwM; Sun, 23 Feb 2020 23:39:56 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 28AFF1C576; Sun, 23 Feb 2020 23:39:56 +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 01NNdtbt009440; Sun, 23 Feb 2020 23:39:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01NNdtwE009439; Sun, 23 Feb 2020 23:39:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002232339.01NNdtwE009439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 23 Feb 2020 23:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358266 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 358266 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 23:39:56 -0000 Author: imp Date: Sun Feb 23 23:39:55 2020 New Revision: 358266 URL: https://svnweb.freebsd.org/changeset/base/358266 Log: Bump CONFIGVERS to 600017. This change reflects the ability to change machine_arch in a config file. This is useful for including one config in another and changing the machine_arch in the second one. Modified: head/usr.sbin/config/configvers.h Modified: head/usr.sbin/config/configvers.h ============================================================================== --- head/usr.sbin/config/configvers.h Sun Feb 23 23:36:56 2020 (r358265) +++ head/usr.sbin/config/configvers.h Sun Feb 23 23:39:55 2020 (r358266) @@ -49,7 +49,7 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600016 +#define CONFIGVERS 600017 #define MAJOR_VERS(x) ((x) / 100000) /* Last config(8) version to require envmode/hintmode */ From owner-svn-src-head@freebsd.org Mon Feb 24 04:01:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C7342517A6; Mon, 24 Feb 2020 04:01:10 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QpJk0SLkz4Fs0; Mon, 24 Feb 2020 04:01:10 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 099321F66B; Mon, 24 Feb 2020 04:01:10 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01O419oX066194; Mon, 24 Feb 2020 04:01:09 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01O419hc066193; Mon, 24 Feb 2020 04:01:09 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <202002240401.01O419hc066193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Mon, 24 Feb 2020 04:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358268 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358268 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 04:01:10 -0000 Author: dougm Date: Mon Feb 24 04:01:09 2020 New Revision: 358268 URL: https://svnweb.freebsd.org/changeset/base/358268 Log: The last argument to swp_pager_getswapspace is always 1. Remove that argument. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D23810 Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Mon Feb 24 02:11:54 2020 (r358267) +++ head/sys/vm/swap_pager.c Mon Feb 24 04:01:09 2020 (r358268) @@ -427,7 +427,7 @@ static int swapoff_one(struct swdevt *sp, struct ucred * Swap bitmap functions */ static void swp_pager_freeswapspace(daddr_t blk, daddr_t npages); -static daddr_t swp_pager_getswapspace(int *npages, int limit); +static daddr_t swp_pager_getswapspace(int *npages); /* * Metadata functions @@ -741,10 +741,9 @@ swap_pager_dealloc(vm_object_t object) /* * SWP_PAGER_GETSWAPSPACE() - allocate raw swap space * - * Allocate swap for up to the requested number of pages, and at - * least a minimum number of pages. The starting swap block number - * (a page index) is returned or SWAPBLK_NONE if the allocation - * failed. + * Allocate swap for up to the requested number of pages. The + * starting swap block number (a page index) is returned or + * SWAPBLK_NONE if the allocation failed. * * Also has the side effect of advising that somebody made a mistake * when they configured swap and didn't configure enough. @@ -754,12 +753,14 @@ swap_pager_dealloc(vm_object_t object) * We allocate in round-robin fashion from the configured devices. */ static daddr_t -swp_pager_getswapspace(int *io_npages, int limit) +swp_pager_getswapspace(int *io_npages) { daddr_t blk; struct swdevt *sp; int mpages, npages; + KASSERT(*io_npages >= 1, + ("%s: npages not positive", __func__)); blk = SWAPBLK_NONE; mpages = *io_npages; npages = imin(BLIST_MAX_ALLOC, mpages); @@ -774,7 +775,7 @@ swp_pager_getswapspace(int *io_npages, int limit) break; sp = TAILQ_NEXT(sp, sw_list); if (swdevhd == sp) { - if (npages <= limit) + if (npages == 1) break; mpages = npages - 1; npages >>= 1; @@ -937,7 +938,7 @@ swap_pager_reserve(vm_object_t object, vm_pindex_t sta VM_OBJECT_WLOCK(object); for (i = 0; i < size; i += n) { n = size - i; - blk = swp_pager_getswapspace(&n, 1); + blk = swp_pager_getswapspace(&n); if (blk == SWAPBLK_NONE) { swp_pager_meta_free(object, start, i); VM_OBJECT_WUNLOCK(object); @@ -1464,7 +1465,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t *ma, /* Get a block of swap of size up to size n. */ VM_OBJECT_WLOCK(object); - blk = swp_pager_getswapspace(&n, 1); + blk = swp_pager_getswapspace(&n); if (blk == SWAPBLK_NONE) { VM_OBJECT_WUNLOCK(object); mtx_lock(&swbuf_mtx); From owner-svn-src-head@freebsd.org Mon Feb 24 07:16:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45DB825467C; Mon, 24 Feb 2020 07:16:43 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QtfM0J7zz4KYB; Mon, 24 Feb 2020 07:16:43 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id BD1F918CBB; Mon, 24 Feb 2020 07:16:42 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [10.10.132.6] (ptr-8rg5e4gf2trfnnplmcg.18120a2.ip6.access.telenet.be [IPv6:2a02:1811:2408:6002:7cea:4a52:c574:960]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id A07464996A; Mon, 24 Feb 2020 08:16:40 +0100 (CET) From: "Kristof Provost" To: "Warner Losh" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358262 - head/sys/conf Date: Mon, 24 Feb 2020 08:16:40 +0100 X-Mailer: MailMate (1.13.1r5671) Message-ID: <658E787D-8949-4D5B-B6C4-4F6394260E96@FreeBSD.org> In-Reply-To: <202002231904.01NJ4FmD046982@repo.freebsd.org> References: <202002231904.01NJ4FmD046982@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 07:16:43 -0000 Thanks! On 23 Feb 2020, at 20:04, Warner Losh wrote: > Author: imp > Date: Sun Feb 23 19:04:15 2020 > New Revision: 358262 > URL: https://svnweb.freebsd.org/changeset/base/358262 > > Log: > Use MACHINE_ARCH instead of TARGET_ARCH > > TARGET_ARCH is only for use in Makefile.inc1 contexts. MACHINE_ARCH > is the > preferred thing to set. Makefile.inc1 sets MACHINE_ARCH in the > cross build > case, and make sets it in the native build case. This will fix > anybody doing a > native build. Add a comment for why we have to do this dance so > when/if the > problem with CFLAGS is fixed for the kernel this workaround can be > removed. > > Modified: > head/sys/conf/Makefile.riscv > > Modified: head/sys/conf/Makefile.riscv > ============================================================================== > --- head/sys/conf/Makefile.riscv Sun Feb 23 17:59:51 2020 (r358261) > +++ head/sys/conf/Makefile.riscv Sun Feb 23 19:04:15 2020 (r358262) > @@ -46,7 +46,9 @@ SYSTEM_LD= @${LD} -N -m ${LD_EMULATION} -Bdynamic -T > $ > CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls > .endif > > -CFLAGS += -DMACHINE_ARCH=\"${TARGET_ARCH}\" > +# Currently, the compile flags don't let the kernel know if this is a > hard-float > +# ABI build or a soft-float ABI build. We need to pass in this > information. > +CFLAGS += -DMACHINE_ARCH=\"${MACHINE_ARCH}\" > > # hack because genassym.c includes sys/bus.h which includes these. > genassym.o: bus_if.h device_if.h From owner-svn-src-head@freebsd.org Mon Feb 24 09:31:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A0774256F23; Mon, 24 Feb 2020 09:31:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Qxdv36PRz3GR6; Mon, 24 Feb 2020 09:31:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55564232DE; Mon, 24 Feb 2020 09:31:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01O9VVCp068483; Mon, 24 Feb 2020 09:31:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01O9VVIK068482; Mon, 24 Feb 2020 09:31:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002240931.01O9VVIK068482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 24 Feb 2020 09:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358270 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 358270 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 09:31:31 -0000 Author: hselasky Date: Mon Feb 24 09:31:30 2020 New Revision: 358270 URL: https://svnweb.freebsd.org/changeset/base/358270 Log: Always check return value from acpi_GetInteger() after r358219. If a failure happens reading the lid state, assume the lid is opened. Suggested by: cem @ Differential Revision: https://reviews.freebsd.org/D23724 PR: 240881 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/acpica/acpi_lid.c Modified: head/sys/dev/acpica/acpi_lid.c ============================================================================== --- head/sys/dev/acpica/acpi_lid.c Mon Feb 24 06:56:38 2020 (r358269) +++ head/sys/dev/acpica/acpi_lid.c Mon Feb 24 09:31:30 2020 (r358270) @@ -85,6 +85,27 @@ static devclass_t acpi_lid_devclass; DRIVER_MODULE(acpi_lid, acpi, acpi_lid_driver, acpi_lid_devclass, 0, 0); MODULE_DEPEND(acpi_lid, acpi, 1, 1, 1); +static void +acpi_lid_status_update(struct acpi_lid_softc *sc) +{ + ACPI_STATUS status; + int lid_status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + /* + * Evaluate _LID and check the return value, update lid status. + * Zero: The lid is closed + * Non-zero: The lid is open + */ + status = acpi_GetInteger(sc->lid_handle, "_LID", &lid_status); + if (ACPI_FAILURE(status)) + lid_status = 1; /* assume lid is opened */ + + /* range check value */ + sc->lid_status = lid_status ? 1 : 0; +} + static int acpi_lid_probe(device_t dev) { @@ -124,8 +145,8 @@ acpi_lid_attach(device_t dev) if (acpi_parse_prw(sc->lid_handle, &prw) == 0) AcpiEnableGpe(prw.gpe_handle, prw.gpe_bit); - /* Get the initial lid status, ignore failures */ - (void) acpi_GetInteger(sc->lid_handle, "_LID", &sc->lid_status); + /* Get the initial lid status */ + acpi_lid_status_update(sc); /* * Export the lid status @@ -151,8 +172,8 @@ acpi_lid_resume(device_t dev) sc = device_get_softc(dev); - /* Get lid status after resume, ignore failures */ - (void) acpi_GetInteger(sc->lid_handle, "_LID", &sc->lid_status); + /* Update lid status, if any */ + acpi_lid_status_update(sc); return (0); } @@ -162,21 +183,14 @@ acpi_lid_notify_status_changed(void *arg) { struct acpi_lid_softc *sc; struct acpi_softc *acpi_sc; - ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = (struct acpi_lid_softc *)arg; ACPI_SERIAL_BEGIN(lid); - /* - * Evaluate _LID and check the return value, update lid status. - * Zero: The lid is closed - * Non-zero: The lid is open - */ - status = acpi_GetInteger(sc->lid_handle, "_LID", &sc->lid_status); - if (ACPI_FAILURE(status)) - goto out; + /* Update lid status, if any */ + acpi_lid_status_update(sc); acpi_sc = acpi_device_get_parent_softc(sc->lid_dev); if (acpi_sc == NULL) From owner-svn-src-head@freebsd.org Mon Feb 24 10:33:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEE17258515; Mon, 24 Feb 2020 10:33:51 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Qz1q4kzdz3JKF; Mon, 24 Feb 2020 10:33:51 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BE1E23EC5; Mon, 24 Feb 2020 10:33:51 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01OAXpSF009875; Mon, 24 Feb 2020 10:33:51 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OAXp1i009874; Mon, 24 Feb 2020 10:33:51 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002241033.01OAXp1i009874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Mon, 24 Feb 2020 10:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358275 - head/sys/fs/fuse X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/fs/fuse X-SVN-Commit-Revision: 358275 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 10:33:51 -0000 Author: kaktus Date: Mon Feb 24 10:33:51 2020 New Revision: 358275 URL: https://svnweb.freebsd.org/changeset/base/358275 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (8 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23627 Modified: head/sys/fs/fuse/fuse_main.c Modified: head/sys/fs/fuse/fuse_main.c ============================================================================== --- head/sys/fs/fuse/fuse_main.c Mon Feb 24 09:58:57 2020 (r358274) +++ head/sys/fs/fuse/fuse_main.c Mon Feb 24 10:33:51 2020 (r358275) @@ -105,8 +105,10 @@ static struct vfsconf fuse_vfsconf = { .vfc_flags = VFCF_JAIL | VFCF_SYNTHETIC }; -SYSCTL_NODE(_vfs, OID_AUTO, fusefs, CTLFLAG_RW, 0, "FUSE tunables"); -SYSCTL_NODE(_vfs_fusefs, OID_AUTO, stats, CTLFLAG_RW, 0, "FUSE statistics"); +SYSCTL_NODE(_vfs, OID_AUTO, fusefs, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "FUSE tunables"); +SYSCTL_NODE(_vfs_fusefs, OID_AUTO, stats, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "FUSE statistics"); SYSCTL_INT(_vfs_fusefs, OID_AUTO, kernelabi_major, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, FUSE_KERNEL_VERSION, "FUSE kernel abi major version"); SYSCTL_INT(_vfs_fusefs, OID_AUTO, kernelabi_minor, CTLFLAG_RD, From owner-svn-src-head@freebsd.org Mon Feb 24 10:36:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2157925859E; Mon, 24 Feb 2020 10:36:00 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Qz4H2wvlz3MjF; Mon, 24 Feb 2020 10:35:59 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5507423ED6; Mon, 24 Feb 2020 10:35:59 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01OAZx8L010060; Mon, 24 Feb 2020 10:35:59 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OAZxML010059; Mon, 24 Feb 2020 10:35:59 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002241035.01OAZxML010059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Mon, 24 Feb 2020 10:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358276 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358276 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 10:36:00 -0000 Author: kaktus Date: Mon Feb 24 10:35:58 2020 New Revision: 358276 URL: https://svnweb.freebsd.org/changeset/base/358276 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (8 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23628 Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Mon Feb 24 10:33:51 2020 (r358275) +++ head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Mon Feb 24 10:35:58 2020 (r358276) @@ -83,24 +83,30 @@ static int ipfwrite __P((dev_t, struct uio *, int)); SYSCTL_DECL(_net_inet); #define SYSCTL_IPF(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|CTLFLAG_VNET|access, \ - ptr, val, sysctl_ipf_int, "I", descr) + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT | access, \ + ptr, val, sysctl_ipf_int, "I", descr) #define SYSCTL_DYN_IPF_NAT(parent, nbr, name, access,ptr, val, descr) \ - SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ - CTLFLAG_DYN|CTLTYPE_INT|CTLFLAG_VNET|access, ptr, val, sysctl_ipf_int_nat, "I", descr) + SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ + CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT |access, \ + ptr, val, sysctl_ipf_int_nat, "I", descr) #define SYSCTL_DYN_IPF_STATE(parent, nbr, name, access,ptr, val, descr) \ - SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ - CTLFLAG_DYN|CTLTYPE_INT|CTLFLAG_VNET|access, ptr, val, sysctl_ipf_int_state, "I", descr) + SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ + CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT | access, \ + ptr, val, sysctl_ipf_int_state, "I", descr) #define SYSCTL_DYN_IPF_FRAG(parent, nbr, name, access,ptr, val, descr) \ - SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ - CTLFLAG_DYN|CTLTYPE_INT|CTLFLAG_VNET|access, ptr, val, sysctl_ipf_int_frag, "I", descr) + SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ + CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT | access, \ + ptr, val, sysctl_ipf_int_frag, "I", descr) #define SYSCTL_DYN_IPF_AUTH(parent, nbr, name, access,ptr, val, descr) \ - SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ - CTLFLAG_DYN|CTLTYPE_INT|CTLFLAG_VNET|access, ptr, val, sysctl_ipf_int_auth, "I", descr) + SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ + CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT | access, \ + ptr, val, sysctl_ipf_int_auth, "I", descr) static struct sysctl_ctx_list ipf_clist; #define CTLFLAG_OFF 0x00800000 /* IPFilter must be disabled */ #define CTLFLAG_RWO (CTLFLAG_RW|CTLFLAG_OFF) -SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF"); +SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "IPF"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_flags), 0, "IPF flags"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_pass, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_pass), 0, "default pass/block"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_active), 0, "IPF is active"); From owner-svn-src-head@freebsd.org Mon Feb 24 10:37:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 506DF25869E; Mon, 24 Feb 2020 10:37:57 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Qz6Y1Bvyz3Qwc; Mon, 24 Feb 2020 10:37:57 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 17A6023EE1; Mon, 24 Feb 2020 10:37:57 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01OAbuGk010220; Mon, 24 Feb 2020 10:37:56 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OAbueY010217; Mon, 24 Feb 2020 10:37:56 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002241037.01OAbueY010217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Mon, 24 Feb 2020 10:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358277 - head/sys/fs/pseudofs X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/fs/pseudofs X-SVN-Commit-Revision: 358277 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 10:37:57 -0000 Author: kaktus Date: Mon Feb 24 10:37:56 2020 New Revision: 358277 URL: https://svnweb.freebsd.org/changeset/base/358277 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (10 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23629 Modified: head/sys/fs/pseudofs/pseudofs.c head/sys/fs/pseudofs/pseudofs_vncache.c Modified: head/sys/fs/pseudofs/pseudofs.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs.c Mon Feb 24 10:35:58 2020 (r358276) +++ head/sys/fs/pseudofs/pseudofs.c Mon Feb 24 10:37:56 2020 (r358277) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_PFSNODES, "pfs_nodes", "pseudofs nodes"); -SYSCTL_NODE(_vfs, OID_AUTO, pfs, CTLFLAG_RW, 0, +SYSCTL_NODE(_vfs, OID_AUTO, pfs, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "pseudofs"); #ifdef PSEUDOFS_TRACE Modified: head/sys/fs/pseudofs/pseudofs_vncache.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vncache.c Mon Feb 24 10:35:58 2020 (r358276) +++ head/sys/fs/pseudofs/pseudofs_vncache.c Mon Feb 24 10:37:56 2020 (r358277) @@ -54,7 +54,7 @@ static eventhandler_tag pfs_exit_tag; static void pfs_exit(void *arg, struct proc *p); static void pfs_purge_all(void); -static SYSCTL_NODE(_vfs_pfs, OID_AUTO, vncache, CTLFLAG_RW, 0, +static SYSCTL_NODE(_vfs_pfs, OID_AUTO, vncache, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "pseudofs vnode cache"); static int pfs_vncache_entries; From owner-svn-src-head@freebsd.org Mon Feb 24 10:38:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69D3E258730; Mon, 24 Feb 2020 10:38:39 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Qz7M23NGz3xML; Mon, 24 Feb 2020 10:38:39 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2421D23EE7; Mon, 24 Feb 2020 10:38:39 +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 01OAcccL010306; Mon, 24 Feb 2020 10:38:38 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OAccoe010305; Mon, 24 Feb 2020 10:38:38 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202002241038.01OAccoe010305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 24 Feb 2020 10:38:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358278 - head/sys/arm64/rockchip X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm64/rockchip X-SVN-Commit-Revision: 358278 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 10:38:39 -0000 Author: manu Date: Mon Feb 24 10:38:38 2020 New Revision: 358278 URL: https://svnweb.freebsd.org/changeset/base/358278 Log: arm64: rockchip: rk_i2c: Bump to DELAY to 1000 In polling mode with use DELAY to wait for interrupts. The value was too low for RK3328. MFC after: 1 week Modified: head/sys/arm64/rockchip/rk_i2c.c Modified: head/sys/arm64/rockchip/rk_i2c.c ============================================================================== --- head/sys/arm64/rockchip/rk_i2c.c Mon Feb 24 10:37:56 2020 (r358277) +++ head/sys/arm64/rockchip/rk_i2c.c Mon Feb 24 10:38:38 2020 (r358278) @@ -530,7 +530,7 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, ui rk_i2c_intr_locked(sc); if (sc->transfer_done != 0) break; - DELAY(100); + DELAY(1000); } if (timeout <= 0) err = ETIMEDOUT; @@ -609,8 +609,8 @@ rk_i2c_attach(device_t dev) device_printf(dev, "cannot get pclk clock\n"); goto fail; } - if (sc->sclk != NULL) { - error = clk_enable(sc->sclk); + if (sc->pclk != NULL) { + error = clk_enable(sc->pclk); if (error != 0) { device_printf(dev, "cannot enable pclk clock\n"); goto fail; From owner-svn-src-head@freebsd.org Mon Feb 24 10:40:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E31C2587E4; Mon, 24 Feb 2020 10:40:36 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Qz9c23Hxz42HH; Mon, 24 Feb 2020 10:40:36 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 277B723EF1; Mon, 24 Feb 2020 10:40:36 +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 01OAea0a010510; Mon, 24 Feb 2020 10:40:36 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OAeaYr010509; Mon, 24 Feb 2020 10:40:36 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202002241040.01OAeaYr010509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 24 Feb 2020 10:40:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358279 - head/sys/arm64/rockchip X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm64/rockchip X-SVN-Commit-Revision: 358279 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 10:40:36 -0000 Author: manu Date: Mon Feb 24 10:40:35 2020 New Revision: 358279 URL: https://svnweb.freebsd.org/changeset/base/358279 Log: arm64: rockchip: rk808: Only init regulator not enabled If a regulator is already enabled, do not set its value to the minimum supported on the board. This fixes booting on rock64 where we set some regulator to the minimal value while the IPs needs more based on what the bootloader configured. MFC after: 1 week Modified: head/sys/arm64/rockchip/rk805.c Modified: head/sys/arm64/rockchip/rk805.c ============================================================================== --- head/sys/arm64/rockchip/rk805.c Mon Feb 24 10:38:38 2020 (r358278) +++ head/sys/arm64/rockchip/rk805.c Mon Feb 24 10:40:35 2020 (r358279) @@ -97,6 +97,7 @@ struct rk805_softc { int nregs; }; +static int rk805_regnode_status(struct regnode *regnode, int *status); static int rk805_regnode_set_voltage(struct regnode *regnode, int min_uvolt, int max_uvolt, int *udelay); @@ -351,6 +352,7 @@ rk805_read(device_t dev, uint8_t reg, uint8_t *data, u static int rk805_write(device_t dev, uint8_t reg, uint8_t data) { + return (iicdev_writeto(dev, reg, &data, 1, IIC_INTRWAIT)); } @@ -359,7 +361,7 @@ rk805_regnode_init(struct regnode *regnode) { struct rk805_reg_sc *sc; struct regnode_std_param *param; - int rv, udelay; + int rv, udelay, status; sc = regnode_get_softc(regnode); param = regnode_get_stdparam(regnode); @@ -367,13 +369,17 @@ rk805_regnode_init(struct regnode *regnode) return (0); /* - * Set the regulator at the correct voltage + * Set the regulator at the correct voltage if it is not enabled. * Do not enable it, this is will be done either by a * consumer or by regnode_set_constraint if boot_on is true */ + rv = rk805_regnode_status(regnode, &status); + if (rv != 0 || status == REGULATOR_STATUS_ENABLED) + return (rv); + rv = rk805_regnode_set_voltage(regnode, param->min_uvolt, param->max_uvolt, &udelay); - if (rv != 0) + if (udelay != 0) DELAY(udelay); return (rv); From owner-svn-src-head@freebsd.org Mon Feb 24 10:41:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43F4B2589A6; Mon, 24 Feb 2020 10:41:23 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QzBW0cJNz43sV; Mon, 24 Feb 2020 10:41:23 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC3952403F; Mon, 24 Feb 2020 10:41:22 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01OAfMZq013595; Mon, 24 Feb 2020 10:41:22 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OAfMDN013594; Mon, 24 Feb 2020 10:41:22 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002241041.01OAfMDN013594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Mon, 24 Feb 2020 10:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358280 - head/sys/dev/ofw X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/dev/ofw X-SVN-Commit-Revision: 358280 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 10:41:23 -0000 Author: kaktus Date: Mon Feb 24 10:41:22 2020 New Revision: 358280 URL: https://svnweb.freebsd.org/changeset/base/358280 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (11 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23636 Modified: head/sys/dev/ofw/ofw_fdt.c Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Mon Feb 24 10:40:35 2020 (r358279) +++ head/sys/dev/ofw/ofw_fdt.c Mon Feb 24 10:41:22 2020 (r358280) @@ -123,8 +123,8 @@ sysctl_register_fdt_oid(void *arg) return; SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_fdt), OID_AUTO, "dtb", - CTLTYPE_OPAQUE | CTLFLAG_RD, NULL, 0, sysctl_handle_dtb, "", - "Device Tree Blob"); + CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, + sysctl_handle_dtb, "", "Device Tree Blob"); } SYSINIT(dtb_oid, SI_SUB_KMEM, SI_ORDER_ANY, sysctl_register_fdt_oid, NULL); From owner-svn-src-head@freebsd.org Mon Feb 24 10:42:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86FB3258B4F; Mon, 24 Feb 2020 10:42:58 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QzDK2VMyz47KD; Mon, 24 Feb 2020 10:42:57 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B8AB240B0; Mon, 24 Feb 2020 10:42:57 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01OAgvIV016086; Mon, 24 Feb 2020 10:42:57 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OAgvMQ016085; Mon, 24 Feb 2020 10:42:57 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002241042.01OAgvMQ016085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Mon, 24 Feb 2020 10:42:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358283 - head/sys/geom/eli X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/geom/eli X-SVN-Commit-Revision: 358283 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 10:42:58 -0000 Author: kaktus Date: Mon Feb 24 10:42:56 2020 New Revision: 358283 URL: https://svnweb.freebsd.org/changeset/base/358283 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (12 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23637 Modified: head/sys/geom/eli/g_eli.c Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Mon Feb 24 10:42:37 2020 (r358282) +++ head/sys/geom/eli/g_eli.c Mon Feb 24 10:42:56 2020 (r358283) @@ -63,7 +63,8 @@ FEATURE(geom_eli, "GEOM crypto module"); MALLOC_DEFINE(M_ELI, "eli data", "GEOM_ELI Data"); SYSCTL_DECL(_kern_geom); -SYSCTL_NODE(_kern_geom, OID_AUTO, eli, CTLFLAG_RW, 0, "GEOM_ELI stuff"); +SYSCTL_NODE(_kern_geom, OID_AUTO, eli, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "GEOM_ELI stuff"); static int g_eli_version = G_ELI_VERSION; SYSCTL_INT(_kern_geom_eli, OID_AUTO, version, CTLFLAG_RD, &g_eli_version, 0, "GELI version"); From owner-svn-src-head@freebsd.org Mon Feb 24 10:45:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DF51258BF9; Mon, 24 Feb 2020 10:45:25 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QzH85vvKz4D53; Mon, 24 Feb 2020 10:45:24 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77749240BD; Mon, 24 Feb 2020 10:45:24 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01OAjOr4016319; Mon, 24 Feb 2020 10:45:24 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OAjNHp016313; Mon, 24 Feb 2020 10:45:23 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002241045.01OAjNHp016313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Mon, 24 Feb 2020 10:45:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358284 - in head/sys: arm/allwinner arm64/rockchip X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: in head/sys: arm/allwinner arm64/rockchip X-SVN-Commit-Revision: 358284 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 10:45:25 -0000 Author: kaktus Date: Mon Feb 24 10:45:22 2020 New Revision: 358284 URL: https://svnweb.freebsd.org/changeset/base/358284 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (13 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23635 Modified: head/sys/arm/allwinner/aw_sid.c head/sys/arm/allwinner/aw_thermal.c head/sys/arm/allwinner/aw_ts.c head/sys/arm/allwinner/axp209.c head/sys/arm/allwinner/axp81x.c head/sys/arm/allwinner/if_emac.c head/sys/arm64/rockchip/rk_tsadc.c Modified: head/sys/arm/allwinner/aw_sid.c ============================================================================== --- head/sys/arm/allwinner/aw_sid.c Mon Feb 24 10:42:56 2020 (r358283) +++ head/sys/arm/allwinner/aw_sid.c Mon Feb 24 10:45:22 2020 (r358284) @@ -278,7 +278,7 @@ aw_sid_attach(device_t dev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, sc->sid_conf->efuses[i].name, - CTLTYPE_STRING | CTLFLAG_RD, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, sc->sid_conf->efuses[i].id, aw_sid_sysctl, "A", sc->sid_conf->efuses[i].desc); } Modified: head/sys/arm/allwinner/aw_thermal.c ============================================================================== --- head/sys/arm/allwinner/aw_thermal.c Mon Feb 24 10:42:56 2020 (r358283) +++ head/sys/arm/allwinner/aw_thermal.c Mon Feb 24 10:45:22 2020 (r358284) @@ -676,7 +676,7 @@ aw_thermal_attach(device_t dev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, sc->conf->sensors[i].name, - CTLTYPE_INT | CTLFLAG_RD, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, i, aw_thermal_sysctl, "IK0", sc->conf->sensors[i].desc); Modified: head/sys/arm/allwinner/aw_ts.c ============================================================================== --- head/sys/arm/allwinner/aw_ts.c Mon Feb 24 10:42:56 2020 (r358283) +++ head/sys/arm/allwinner/aw_ts.c Mon Feb 24 10:45:22 2020 (r358284) @@ -204,7 +204,8 @@ aw_ts_attach(device_t dev) /* Add sysctl */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, + OID_AUTO, "temperature", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, &sc->temp_data, 0, sysctl_handle_int, "IK3", "CPU Temperature"); Modified: head/sys/arm/allwinner/axp209.c ============================================================================== --- head/sys/arm/allwinner/axp209.c Mon Feb 24 10:42:56 2020 (r358283) +++ head/sys/arm/allwinner/axp209.c Mon Feb 24 10:45:22 2020 (r358284) @@ -1268,7 +1268,7 @@ axp2xx_start(void *pdev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, sc->sensors[i].name, - CTLTYPE_INT | CTLFLAG_RD, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, sc->sensors[i].id, axp2xx_sysctl, sc->sensors[i].format, sc->sensors[i].desc); Modified: head/sys/arm/allwinner/axp81x.c ============================================================================== --- head/sys/arm/allwinner/axp81x.c Mon Feb 24 10:42:56 2020 (r358283) +++ head/sys/arm/allwinner/axp81x.c Mon Feb 24 10:45:22 2020 (r358284) @@ -1538,7 +1538,7 @@ axp8xx_attach(device_t dev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, sc->sensors[i].name, - CTLTYPE_INT | CTLFLAG_RD, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, sc->sensors[i].id, axp8xx_sysctl, sc->sensors[i].format, sc->sensors[i].desc); @@ -1546,7 +1546,7 @@ axp8xx_attach(device_t dev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "batchargecurrentstep", - CTLTYPE_INT | CTLFLAG_RW, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, dev, 0, axp8xx_sysctl_chargecurrent, "I", "Battery Charging Current Step, " "0: 200mA, 1: 400mA, 2: 600mA, 3: 800mA, " Modified: head/sys/arm/allwinner/if_emac.c ============================================================================== --- head/sys/arm/allwinner/if_emac.c Mon Feb 24 10:42:56 2020 (r358283) +++ head/sys/arm/allwinner/if_emac.c Mon Feb 24 10:45:22 2020 (r358284) @@ -923,7 +923,8 @@ emac_attach(device_t dev) /* Create device sysctl node. */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "process_limit", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "process_limit", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sc->emac_rx_process_limit, 0, sysctl_hw_emac_proc_limit, "I", "max number of Rx events to process"); Modified: head/sys/arm64/rockchip/rk_tsadc.c ============================================================================== --- head/sys/arm64/rockchip/rk_tsadc.c Mon Feb 24 10:42:56 2020 (r358283) +++ head/sys/arm64/rockchip/rk_tsadc.c Mon Feb 24 10:45:22 2020 (r358284) @@ -558,7 +558,7 @@ tsadc_init_sysctl(struct tsadc_softc *sc) /* create node for hw.temp */ oid = SYSCTL_ADD_NODE(&tsadc_sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, "temperature", - CTLFLAG_RD, NULL, ""); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, ""); if (oid == NULL) return (ENXIO); @@ -566,7 +566,7 @@ tsadc_init_sysctl(struct tsadc_softc *sc) for (i = sc->conf->ntsensors - 1; i >= 0; i--) { tmp = SYSCTL_ADD_PROC(&tsadc_sysctl_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, sc->conf->tsensors[i].name, - CTLTYPE_INT | CTLFLAG_RD, sc, i, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, i, tsadc_sysctl_temperature, "IK", "SoC Temperature"); if (tmp == NULL) return (ENXIO); From owner-svn-src-head@freebsd.org Mon Feb 24 10:47:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31AB5258D98; Mon, 24 Feb 2020 10:47:20 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QzKM4Pw8z4HyX; Mon, 24 Feb 2020 10:47:19 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39669240C7; Mon, 24 Feb 2020 10:47:19 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01OAlJ9i016477; Mon, 24 Feb 2020 10:47:19 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OAlIrk016474; Mon, 24 Feb 2020 10:47:18 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002241047.01OAlIrk016474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Mon, 24 Feb 2020 10:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358285 - in head/sys: netinet netinet/libalias netinet6 X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: in head/sys: netinet netinet/libalias netinet6 X-SVN-Commit-Revision: 358285 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 10:47:20 -0000 Author: kaktus Date: Mon Feb 24 10:47:18 2020 New Revision: 358285 URL: https://svnweb.freebsd.org/changeset/base/358285 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (14 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23639 Modified: head/sys/netinet/libalias/alias_sctp.c head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_usrreq.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/libalias/alias_sctp.c ============================================================================== --- head/sys/netinet/libalias/alias_sctp.c Mon Feb 24 10:45:22 2020 (r358284) +++ head/sys/netinet/libalias/alias_sctp.c Mon Feb 24 10:47:18 2020 (r358285) @@ -367,44 +367,68 @@ SYSCTL_DECL(_net_inet); SYSCTL_DECL(_net_inet_ip); SYSCTL_DECL(_net_inet_ip_alias); -static SYSCTL_NODE(_net_inet_ip_alias, OID_AUTO, sctp, CTLFLAG_RW, NULL, +static SYSCTL_NODE(_net_inet_ip_alias, OID_AUTO, sctp, + CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, "SCTP NAT"); -SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, log_level, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, log_level, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sysctl_log_level, 0, sysctl_chg_loglevel, "IU", "Level of detail (0 - default, 1 - event, 2 - info, 3 - detail, 4 - debug, 5 - max debug)"); -SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, init_timer, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, init_timer, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sysctl_init_timer, 0, sysctl_chg_timer, "IU", "Timeout value (s) while waiting for (INIT-ACK|AddIP-ACK)"); -SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, up_timer, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, up_timer, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sysctl_up_timer, 0, sysctl_chg_timer, "IU", "Timeout value (s) to keep an association up with no traffic"); -SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, shutdown_timer, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, shutdown_timer, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sysctl_shutdown_timer, 0, sysctl_chg_timer, "IU", "Timeout value (s) while waiting for SHUTDOWN-COMPLETE"); -SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, holddown_timer, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, holddown_timer, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sysctl_holddown_timer, 0, sysctl_chg_timer, "IU", "Hold association in table for this many seconds after receiving a SHUTDOWN-COMPLETE"); -SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, hashtable_size, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, hashtable_size, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sysctl_hashtable_size, 0, sysctl_chg_hashtable_size, "IU", "Size of hash tables used for NAT lookups (100 < prime_number > 1000001)"); -SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, error_on_ootb, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, error_on_ootb, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sysctl_error_on_ootb, 0, sysctl_chg_error_on_ootb, "IU", - "ErrorM sent on receipt of ootb packet:\n\t0 - none,\n\t1 - to local only,\n\t2 - to local and global if a partial association match,\n\t3 - to local and global (DoS risk)"); -SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, accept_global_ootb_addip, CTLTYPE_UINT | CTLFLAG_RW, + "ErrorM sent on receipt of ootb packet:\n\t0 - none,\n" + "\t1 - to local only,\n" + "\t2 - to local and global if a partial association match,\n" + "\t3 - to local and global (DoS risk)"); +SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, accept_global_ootb_addip, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sysctl_accept_global_ootb_addip, 0, sysctl_chg_accept_global_ootb_addip, "IU", - "NAT response to receipt of global OOTB AddIP:\n\t0 - No response,\n\t1 - NAT will accept OOTB global AddIP messages for processing (Security risk)"); -SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, initialising_chunk_proc_limit, CTLTYPE_UINT | CTLFLAG_RW, - &sysctl_initialising_chunk_proc_limit, 0, sysctl_chg_initialising_chunk_proc_limit, "IU", - "Number of chunks that should be processed if there is no current association found:\n\t > 0 (A high value is a DoS risk)"); -SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, chunk_proc_limit, CTLTYPE_UINT | CTLFLAG_RW, + "NAT response to receipt of global OOTB AddIP:\n" + "\t0 - No response,\n" + "\t1 - NAT will accept OOTB global AddIP messages for processing (Security risk)"); +SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, initialising_chunk_proc_limit, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + &sysctl_initialising_chunk_proc_limit, 0, + sysctl_chg_initialising_chunk_proc_limit, "IU", + "Number of chunks that should be processed if there is no current " + "association found:\n\t > 0 (A high value is a DoS risk)"); +SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, chunk_proc_limit, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sysctl_chunk_proc_limit, 0, sysctl_chg_chunk_proc_limit, "IU", - "Number of chunks that should be processed to find key chunk:\n\t>= initialising_chunk_proc_limit (A high value is a DoS risk)"); -SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, param_proc_limit, CTLTYPE_UINT | CTLFLAG_RW, + "Number of chunks that should be processed to find key chunk:\n" + "\t>= initialising_chunk_proc_limit (A high value is a DoS risk)"); +SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, param_proc_limit, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sysctl_param_proc_limit, 0, sysctl_chg_param_proc_limit, "IU", - "Number of parameters (in a chunk) that should be processed to find key parameters:\n\t> 1 (A high value is a DoS risk)"); -SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, track_global_addresses, CTLTYPE_UINT | CTLFLAG_RW, + "Number of parameters (in a chunk) that should be processed to find key " + "parameters:\n\t> 1 (A high value is a DoS risk)"); +SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, track_global_addresses, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sysctl_track_global_addresses, 0, sysctl_chg_track_global_addresses, "IU", - "Configures the global address tracking option within the NAT:\n\t0 - Global tracking is disabled,\n\t> 0 - enables tracking but limits the number of global IP addresses to this value"); + "Configures the global address tracking option within the NAT:\n" + "\t0 - Global tracking is disabled,\n" + "\t> 0 - enables tracking but limits the number of global IP addresses to this value"); #endif /* SYSCTL_NODE */ Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Mon Feb 24 10:45:22 2020 (r358284) +++ head/sys/netinet/sctp_sysctl.c Mon Feb 24 10:47:18 2020 (r358285) @@ -861,8 +861,8 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS return (error); \ } \ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, \ - CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, NULL, 0, \ - sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC); + CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, \ + NULL, 0, sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC); /* * sysctl definitions @@ -873,10 +873,14 @@ SCTP_UINT_SYSCTL(recvspace, sctp_recvspace, SCTPCTL_RE SCTP_UINT_SYSCTL(auto_asconf, sctp_auto_asconf, SCTPCTL_AUTOASCONF) SCTP_UINT_SYSCTL(ecn_enable, sctp_ecn_enable, SCTPCTL_ECN_ENABLE) SCTP_UINT_SYSCTL(pr_enable, sctp_pr_enable, SCTPCTL_PR_ENABLE) -SYSCTL_PROC(_net_inet_sctp, OID_AUTO, auth_enable, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, - NULL, 0, sctp_sysctl_handle_auth, "IU", SCTPCTL_AUTH_ENABLE_DESC); -SYSCTL_PROC(_net_inet_sctp, OID_AUTO, asconf_enable, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, - NULL, 0, sctp_sysctl_handle_asconf, "IU", SCTPCTL_ASCONF_ENABLE_DESC); +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, auth_enable, + CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + NULL, 0, sctp_sysctl_handle_auth, "IU", + SCTPCTL_AUTH_ENABLE_DESC); +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, asconf_enable, + CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + NULL, 0, sctp_sysctl_handle_asconf, "IU", + SCTPCTL_ASCONF_ENABLE_DESC); SCTP_UINT_SYSCTL(reconfig_enable, sctp_reconfig_enable, SCTPCTL_RECONFIG_ENABLE) SCTP_UINT_SYSCTL(nrsack_enable, sctp_nrsack_enable, SCTPCTL_NRSACK_ENABLE) SCTP_UINT_SYSCTL(pktdrop_enable, sctp_pktdrop_enable, SCTPCTL_PKTDROP_ENABLE) @@ -926,13 +930,19 @@ SCTP_UINT_SYSCTL(default_frag_interleave, sctp_default SCTP_UINT_SYSCTL(mobility_base, sctp_mobility_base, SCTPCTL_MOBILITY_BASE) SCTP_UINT_SYSCTL(mobility_fasthandoff, sctp_mobility_fasthandoff, SCTPCTL_MOBILITY_FASTHANDOFF) #if defined(SCTP_LOCAL_TRACE_BUF) -SYSCTL_PROC(_net_inet_sctp, OID_AUTO, log, CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RD, - NULL, 0, sctp_sysctl_handle_trace_log, "S,sctplog", "SCTP logging (struct sctp_log)"); -SYSCTL_PROC(_net_inet_sctp, OID_AUTO, clear_trace, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, - NULL, 0, sctp_sysctl_handle_trace_log_clear, "IU", "Clear SCTP Logging buffer"); +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, log, + CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + NULL, 0, sctp_sysctl_handle_trace_log, "S,sctplog"a + , "SCTP logging (struct sctp_log)"); +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, clear_trace, + CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + NULL, 0, sctp_sysctl_handle_trace_log_clear, "IU", + "Clear SCTP Logging buffer"); #endif -SYSCTL_PROC(_net_inet_sctp, OID_AUTO, udp_tunneling_port, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, - NULL, 0, sctp_sysctl_handle_udp_tunneling, "IU", SCTPCTL_UDP_TUNNELING_PORT_DESC); +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, udp_tunneling_port, + CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + NULL, 0, sctp_sysctl_handle_udp_tunneling, "IU", + SCTPCTL_UDP_TUNNELING_PORT_DESC); SCTP_UINT_SYSCTL(enable_sack_immediately, sctp_enable_sack_immediately, SCTPCTL_SACK_IMMEDIATELY_ENABLE) SCTP_UINT_SYSCTL(nat_friendly_init, sctp_inits_include_nat_friendly, SCTPCTL_NAT_FRIENDLY_INITS) SCTP_UINT_SYSCTL(vtag_time_wait, sctp_vtag_time_wait, SCTPCTL_TIME_WAIT) @@ -952,7 +962,11 @@ SCTP_UINT_SYSCTL(debug, sctp_debug_on, SCTPCTL_DEBUG) #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_UINT_SYSCTL(output_unlocked, sctp_output_unlocked, SCTPCTL_OUTPUT_UNLOCKED) #endif -SYSCTL_PROC(_net_inet_sctp, OID_AUTO, stats, CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RW, - NULL, 0, sctp_sysctl_handle_stats, "S,sctpstat", "SCTP statistics (struct sctp_stat)"); -SYSCTL_PROC(_net_inet_sctp, OID_AUTO, assoclist, CTLFLAG_VNET | CTLTYPE_OPAQUE | CTLFLAG_RD, - NULL, 0, sctp_sysctl_handle_assoclist, "S,xassoc", "List of active SCTP associations"); +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, stats, + CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + NULL, 0, sctp_sysctl_handle_stats, "S,sctpstat", + "SCTP statistics (struct sctp_stat)"); +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, assoclist, + CTLFLAG_VNET | CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + NULL, 0, sctp_sysctl_handle_assoclist, "S,xassoc", + "List of active SCTP associations"); Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Mon Feb 24 10:45:22 2020 (r358284) +++ head/sys/netinet/sctp_usrreq.c Mon Feb 24 10:47:18 2020 (r358285) @@ -421,8 +421,10 @@ out: return (error); } -SYSCTL_PROC(_net_inet_sctp, OID_AUTO, getcred, CTLTYPE_OPAQUE | CTLFLAG_RW, - 0, 0, sctp_getcred, "S,ucred", "Get the ucred of a SCTP connection"); +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, getcred, + CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + 0, 0, sctp_getcred, "S,ucred", + "Get the ucred of a SCTP connection"); #ifdef INET Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Mon Feb 24 10:45:22 2020 (r358284) +++ head/sys/netinet6/sctp6_usrreq.c Mon Feb 24 10:47:18 2020 (r358285) @@ -472,9 +472,10 @@ out: return (error); } -SYSCTL_PROC(_net_inet6_sctp6, OID_AUTO, getcred, CTLTYPE_OPAQUE | CTLFLAG_RW, - 0, 0, - sctp6_getcred, "S,ucred", "Get the ucred of a SCTP6 connection"); +SYSCTL_PROC(_net_inet6_sctp6, OID_AUTO, getcred, + CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + 0, 0, sctp6_getcred, "S,ucred", + "Get the ucred of a SCTP6 connection"); /* This is the same as the sctp_abort() could be made common */ From owner-svn-src-head@freebsd.org Mon Feb 24 10:51:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CDAA258EA2; Mon, 24 Feb 2020 10:51:28 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QzQ825LZz4SPS; Mon, 24 Feb 2020 10:51:28 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EEC4F2412A; Mon, 24 Feb 2020 10:51:27 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01OApRjp019223; Mon, 24 Feb 2020 10:51:27 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OApQM1019213; Mon, 24 Feb 2020 10:51:26 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002241051.01OApQM1019213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Mon, 24 Feb 2020 10:51:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358286 - in head/sys/dev: e1000 ixgbe ixl X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: in head/sys/dev: e1000 ixgbe ixl X-SVN-Commit-Revision: 358286 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 10:51:28 -0000 Author: kaktus Date: Mon Feb 24 10:51:26 2020 New Revision: 358286 URL: https://svnweb.freebsd.org/changeset/base/358286 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (15 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/ixgbe/if_bypass.c head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixl/if_iavf.c head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/ixl_pf_main.c head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Mon Feb 24 10:47:18 2020 (r358285) +++ head/sys/dev/e1000/if_em.c Mon Feb 24 10:51:26 2020 (r358286) @@ -459,7 +459,8 @@ static driver_t igb_if_driver = { #define CSUM_TSO 0 #endif -static SYSCTL_NODE(_hw, OID_AUTO, em, CTLFLAG_RD, 0, "EM driver parameters"); +static SYSCTL_NODE(_hw, OID_AUTO, em, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "EM driver parameters"); static int em_disable_crc_stripping = 0; SYSCTL_INT(_hw_em, OID_AUTO, disable_crc_stripping, CTLFLAG_RDTUN, @@ -785,27 +786,29 @@ em_if_attach_pre(if_ctx_t ctx) /* SYSCTL stuff */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "nvm", CTLTYPE_INT|CTLFLAG_RW, adapter, 0, - em_sysctl_nvm_info, "I", "NVM Information"); + OID_AUTO, "nvm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + adapter, 0, em_sysctl_nvm_info, "I", "NVM Information"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "debug", CTLTYPE_INT|CTLFLAG_RW, adapter, 0, - em_sysctl_debug_info, "I", "Debug Information"); + OID_AUTO, "debug", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + adapter, 0, em_sysctl_debug_info, "I", "Debug Information"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "fc", CTLTYPE_INT|CTLFLAG_RW, adapter, 0, - em_set_flowcntl, "I", "Flow Control"); + OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + adapter, 0, em_set_flowcntl, "I", "Flow Control"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "reg_dump", CTLTYPE_STRING | CTLFLAG_RD, adapter, 0, + OID_AUTO, "reg_dump", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, 0, em_get_regs, "A", "Dump Registers"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "rs_dump", CTLTYPE_INT | CTLFLAG_RW, adapter, 0, + OID_AUTO, "rs_dump", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, em_get_rs, "I", "Dump RS indexes"); /* Determine hardware and mac info */ @@ -1020,7 +1023,8 @@ em_if_attach_pre(if_ctx_t ctx) hw->dev_spec.ich8lan.eee_disable = eee_setting; SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "eee_control", CTLTYPE_INT|CTLFLAG_RW, + OID_AUTO, "eee_control", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, em_sysctl_eee, "I", "Disable Energy Efficient Ethernet"); @@ -4081,13 +4085,13 @@ em_add_hw_stats(struct adapter *adapter) CTLFLAG_RD, &adapter->watchdog_events, "Watchdog timeouts"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "device_control", - CTLTYPE_UINT | CTLFLAG_RD, adapter, E1000_CTRL, - em_sysctl_reg_handler, "IU", - "Device Control Register"); + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + adapter, E1000_CTRL, em_sysctl_reg_handler, "IU", + "Device Control Register"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rx_control", - CTLTYPE_UINT | CTLFLAG_RD, adapter, E1000_RCTL, - em_sysctl_reg_handler, "IU", - "Receiver Control Register"); + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + adapter, E1000_RCTL, em_sysctl_reg_handler, "IU", + "Receiver Control Register"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_high_water", CTLFLAG_RD, &adapter->hw.fc.high_water, 0, "Flow Control High Watermark"); @@ -4099,19 +4103,17 @@ em_add_hw_stats(struct adapter *adapter) struct tx_ring *txr = &tx_que->txr; snprintf(namebuf, QUEUE_NAME_LEN, "queue_tx_%d", i); queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf, - CTLFLAG_RD, NULL, "TX Queue Name"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "TX Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", - CTLTYPE_UINT | CTLFLAG_RD, adapter, - E1000_TDH(txr->me), - em_sysctl_reg_handler, "IU", - "Transmit Descriptor Head"); + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, + E1000_TDH(txr->me), em_sysctl_reg_handler, "IU", + "Transmit Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", - CTLTYPE_UINT | CTLFLAG_RD, adapter, - E1000_TDT(txr->me), - em_sysctl_reg_handler, "IU", - "Transmit Descriptor Tail"); + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, + E1000_TDT(txr->me), em_sysctl_reg_handler, "IU", + "Transmit Descriptor Tail"); SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "tx_irq", CTLFLAG_RD, &txr->tx_irq, "Queue MSI-X Transmit Interrupts"); @@ -4121,19 +4123,17 @@ em_add_hw_stats(struct adapter *adapter) struct rx_ring *rxr = &rx_que->rxr; snprintf(namebuf, QUEUE_NAME_LEN, "queue_rx_%d", j); queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf, - CTLFLAG_RD, NULL, "RX Queue Name"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "RX Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", - CTLTYPE_UINT | CTLFLAG_RD, adapter, - E1000_RDH(rxr->me), - em_sysctl_reg_handler, "IU", - "Receive Descriptor Head"); + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, + E1000_RDH(rxr->me), em_sysctl_reg_handler, "IU", + "Receive Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_tail", - CTLTYPE_UINT | CTLFLAG_RD, adapter, - E1000_RDT(rxr->me), - em_sysctl_reg_handler, "IU", - "Receive Descriptor Tail"); + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, + E1000_RDT(rxr->me), em_sysctl_reg_handler, "IU", + "Receive Descriptor Tail"); SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "rx_irq", CTLFLAG_RD, &rxr->rx_irq, "Queue MSI-X Receive Interrupts"); @@ -4142,7 +4142,7 @@ em_add_hw_stats(struct adapter *adapter) /* MAC stats get their own sub node */ stat_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac_stats", - CTLFLAG_RD, NULL, "Statistics"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Statistics"); stat_list = SYSCTL_CHILDREN(stat_node); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "excess_coll", @@ -4293,7 +4293,7 @@ em_add_hw_stats(struct adapter *adapter) /* Interrupt Stats */ int_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "interrupts", - CTLFLAG_RD, NULL, "Interrupt Statistics"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Interrupt Statistics"); int_list = SYSCTL_CHILDREN(int_node); SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "asserts", @@ -4435,7 +4435,7 @@ em_add_int_delay_sysctl(struct adapter *adapter, const info->value = value; SYSCTL_ADD_PROC(device_get_sysctl_ctx(adapter->dev), SYSCTL_CHILDREN(device_get_sysctl_tree(adapter->dev)), - OID_AUTO, name, CTLTYPE_INT|CTLFLAG_RW, + OID_AUTO, name, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, info, 0, em_sysctl_int_delay, "I", description); } Modified: head/sys/dev/ixgbe/if_bypass.c ============================================================================== --- head/sys/dev/ixgbe/if_bypass.c Mon Feb 24 10:47:18 2020 (r358285) +++ head/sys/dev/ixgbe/if_bypass.c Mon Feb 24 10:51:26 2020 (r358286) @@ -746,50 +746,51 @@ ixgbe_bypass_init(struct adapter *adapter) */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "bypass_log", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "bypass_log", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_bp_log, "I", "Bypass Log"); /* All other setting are hung from the 'bypass' node */ bp_node = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "bypass", CTLFLAG_RD, NULL, "Bypass"); + OID_AUTO, "bypass", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Bypass"); bp_list = SYSCTL_CHILDREN(bp_node); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "version", CTLTYPE_INT | CTLFLAG_RD, + OID_AUTO, "version", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_bp_version, "I", "Bypass Version"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_bp_set_state, "I", "Bypass State"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "timeout", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "timeout", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_bp_timeout, "I", "Bypass Timeout"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "main_on", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "main_on", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_bp_main_on, "I", "Bypass Main On"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "main_off", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "main_off", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_bp_main_off, "I", "Bypass Main Off"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "aux_on", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "aux_on", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_bp_aux_on, "I", "Bypass Aux On"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "aux_off", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "aux_off", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_bp_aux_off, "I", "Bypass Aux Off"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "wd_set", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "wd_set", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_bp_wd_set, "I", "Set BP Watchdog"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "wd_reset", CTLTYPE_INT | CTLFLAG_WR, + OID_AUTO, "wd_reset", CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_bp_wd_reset, "S", "Bypass WD Reset"); adapter->feat_en |= IXGBE_FEATURE_BYPASS; Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Mon Feb 24 10:47:18 2020 (r358285) +++ head/sys/dev/ixgbe/if_ix.c Mon Feb 24 10:51:26 2020 (r358286) @@ -285,7 +285,8 @@ static device_method_t ixgbe_if_methods[] = { * TUNEABLE PARAMETERS: */ -static SYSCTL_NODE(_hw, OID_AUTO, ix, CTLFLAG_RD, 0, "IXGBE driver parameters"); +static SYSCTL_NODE(_hw, OID_AUTO, ix, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "IXGBE driver parameters"); static driver_t ixgbe_if_driver = { "ixgbe_if", ixgbe_if_methods, sizeof(struct adapter) }; @@ -1546,14 +1547,14 @@ ixgbe_add_hw_stats(struct adapter *adapter) struct tx_ring *txr = &tx_que->txr; snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i); queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf, - CTLFLAG_RD, NULL, "Queue Name"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", - CTLTYPE_UINT | CTLFLAG_RD, txr, 0, + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, txr, 0, ixgbe_sysctl_tdh_handler, "IU", "Transmit Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", - CTLTYPE_UINT | CTLFLAG_RD, txr, 0, + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, txr, 0, ixgbe_sysctl_tdt_handler, "IU", "Transmit Descriptor Tail"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tso_tx", CTLFLAG_RD, &txr->tso_tx, "TSO"); @@ -1566,21 +1567,22 @@ ixgbe_add_hw_stats(struct adapter *adapter) struct rx_ring *rxr = &rx_que->rxr; snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i); queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf, - CTLFLAG_RD, NULL, "Queue Name"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", - CTLTYPE_UINT | CTLFLAG_RW, &adapter->rx_queues[i], 0, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + &adapter->rx_queues[i], 0, ixgbe_sysctl_interrupt_rate_handler, "IU", "Interrupt Rate"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "irqs", CTLFLAG_RD, &(adapter->rx_queues[i].irqs), "irqs on this queue"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", - CTLTYPE_UINT | CTLFLAG_RD, rxr, 0, + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, rxr, 0, ixgbe_sysctl_rdh_handler, "IU", "Receive Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_tail", - CTLTYPE_UINT | CTLFLAG_RD, rxr, 0, + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, rxr, 0, ixgbe_sysctl_rdt_handler, "IU", "Receive Descriptor Tail"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "rx_packets", CTLFLAG_RD, &rxr->rx_packets, "Queue Packets Received"); @@ -1595,7 +1597,7 @@ ixgbe_add_hw_stats(struct adapter *adapter) /* MAC stats get their own sub node */ stat_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac_stats", - CTLFLAG_RD, NULL, "MAC Statistics"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "MAC Statistics"); stat_list = SYSCTL_CHILDREN(stat_node); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "crc_errs", @@ -2528,37 +2530,42 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) /* Sysctls for all devices */ SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fc", - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, ixgbe_sysctl_flowcntl, "I", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + adapter, 0, ixgbe_sysctl_flowcntl, "I", IXGBE_SYSCTL_DESC_SET_FC); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "advertise_speed", - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, ixgbe_sysctl_advertise, "I", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + adapter, 0, ixgbe_sysctl_advertise, "I", IXGBE_SYSCTL_DESC_ADV_SPEED); #ifdef IXGBE_DEBUG /* testing sysctls (for all devices) */ SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "power_state", - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, ixgbe_sysctl_power_state, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + adapter, 0, ixgbe_sysctl_power_state, "I", "PCI Power State"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "print_rss_config", - CTLTYPE_STRING | CTLFLAG_RD, adapter, 0, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_sysctl_print_rss_config, "A", "Prints RSS Configuration"); #endif /* for X550 series devices */ if (hw->mac.type >= ixgbe_mac_X550) SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "dmac", - CTLTYPE_U16 | CTLFLAG_RW, adapter, 0, ixgbe_sysctl_dmac, + CTLTYPE_U16 | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + adapter, 0, ixgbe_sysctl_dmac, "I", "DMA Coalesce"); /* for WoL-capable devices */ if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) { SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "wol_enable", - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_sysctl_wol_enable, "I", "Enable/Disable Wake on LAN"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "wufc", - CTLTYPE_U32 | CTLFLAG_RW, adapter, 0, ixgbe_sysctl_wufc, + CTLTYPE_U32 | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + adapter, 0, ixgbe_sysctl_wufc, "I", "Enable/Disable Wake Up Filters"); } @@ -2568,22 +2575,24 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) struct sysctl_oid_list *phy_list; phy_node = SYSCTL_ADD_NODE(ctx_list, child, OID_AUTO, "phy", - CTLFLAG_RD, NULL, "External PHY sysctls"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "External PHY sysctls"); phy_list = SYSCTL_CHILDREN(phy_node); SYSCTL_ADD_PROC(ctx_list, phy_list, OID_AUTO, "temp", - CTLTYPE_U16 | CTLFLAG_RD, adapter, 0, ixgbe_sysctl_phy_temp, + CTLTYPE_U16 | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + adapter, 0, ixgbe_sysctl_phy_temp, "I", "Current External PHY Temperature (Celsius)"); SYSCTL_ADD_PROC(ctx_list, phy_list, OID_AUTO, - "overtemp_occurred", CTLTYPE_U16 | CTLFLAG_RD, adapter, 0, + "overtemp_occurred", + CTLTYPE_U16 | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_sysctl_phy_overtemp_occurred, "I", "External PHY High Temperature Event Occurred"); } if (adapter->feat_cap & IXGBE_FEATURE_EEE) { SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "eee_state", - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, ixgbe_sysctl_eee_state, "I", "EEE Power Save State"); } } /* ixgbe_add_device_sysctls */ Modified: head/sys/dev/ixgbe/if_ixv.c ============================================================================== --- head/sys/dev/ixgbe/if_ixv.c Mon Feb 24 10:47:18 2020 (r358285) +++ head/sys/dev/ixgbe/if_ixv.c Mon Feb 24 10:51:26 2020 (r358286) @@ -418,8 +418,8 @@ ixv_if_attach_pre(if_ctx_t ctx) /* SYSCTL APIs */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "debug", - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, ixv_sysctl_debug, "I", - "Debug Info"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + adapter, 0, ixv_sysctl_debug, "I", "Debug Info"); /* Determine hardware revision */ ixv_identify_hardware(ctx); @@ -1803,7 +1803,7 @@ ixv_add_stats_sysctls(struct adapter *adapter) struct tx_ring *txr = &tx_que->txr; snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i); queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf, - CTLFLAG_RD, NULL, "Queue Name"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tso_tx", @@ -1816,7 +1816,7 @@ ixv_add_stats_sysctls(struct adapter *adapter) struct rx_ring *rxr = &rx_que->rxr; snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i); queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf, - CTLFLAG_RD, NULL, "Queue Name"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "irqs", @@ -1830,7 +1830,8 @@ ixv_add_stats_sysctls(struct adapter *adapter) } stat_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac", - CTLFLAG_RD, NULL, "VF Statistics (read from HW registers)"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, + "VF Statistics (read from HW registers)"); stat_list = SYSCTL_CHILDREN(stat_node); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_rcvd", Modified: head/sys/dev/ixl/if_iavf.c ============================================================================== --- head/sys/dev/ixl/if_iavf.c Mon Feb 24 10:47:18 2020 (r358285) +++ head/sys/dev/ixl/if_iavf.c Mon Feb 24 10:51:26 2020 (r358286) @@ -201,7 +201,7 @@ static driver_t iavf_if_driver = { ** TUNEABLE PARAMETERS: */ -static SYSCTL_NODE(_hw, OID_AUTO, iavf, CTLFLAG_RD, 0, +static SYSCTL_NODE(_hw, OID_AUTO, iavf, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "iavf driver parameters"); /* @@ -2049,23 +2049,27 @@ iavf_add_device_sysctls(struct iavf_sc *sc) struct sysctl_oid_list *debug_list; SYSCTL_ADD_PROC(ctx, ctx_list, - OID_AUTO, "current_speed", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "current_speed", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, iavf_sysctl_current_speed, "A", "Current Port Speed"); SYSCTL_ADD_PROC(ctx, ctx_list, - OID_AUTO, "tx_itr", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "tx_itr", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, iavf_sysctl_tx_itr, "I", "Immediately set TX ITR value for all queues"); SYSCTL_ADD_PROC(ctx, ctx_list, - OID_AUTO, "rx_itr", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "rx_itr", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, iavf_sysctl_rx_itr, "I", "Immediately set RX ITR value for all queues"); /* Add sysctls meant to print debug information, but don't list them * in "sysctl -a" output. */ debug_node = SYSCTL_ADD_NODE(ctx, ctx_list, - OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP, NULL, "Debug Sysctls"); + OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_NEEDGIANT, + NULL, "Debug Sysctls"); debug_list = SYSCTL_CHILDREN(debug_node); SYSCTL_ADD_UINT(ctx, debug_list, @@ -2077,19 +2081,23 @@ iavf_add_device_sysctls(struct iavf_sc *sc) &sc->dbg_mask, 0, "Non-shared code debug message level"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "filter_list", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "filter_list", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, iavf_sysctl_sw_filter_list, "A", "SW Filter List"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "queue_interrupt_table", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "queue_interrupt_table", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, iavf_sysctl_queue_interrupt_table, "A", "View MSI-X indices for TX/RX queues"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "do_vf_reset", CTLTYPE_INT | CTLFLAG_WR, + OID_AUTO, "do_vf_reset", + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, sc, 0, iavf_sysctl_vf_reset, "A", "Request a VF reset from PF"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "do_vflr_reset", CTLTYPE_INT | CTLFLAG_WR, + OID_AUTO, "do_vflr_reset", + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, sc, 0, iavf_sysctl_vflr_reset, "A", "Request a VFLR reset from HW"); /* Add stats sysctls */ Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Mon Feb 24 10:47:18 2020 (r358285) +++ head/sys/dev/ixl/if_ixl.c Mon Feb 24 10:51:26 2020 (r358286) @@ -206,7 +206,7 @@ static driver_t ixl_if_driver = { ** TUNEABLE PARAMETERS: */ -static SYSCTL_NODE(_hw, OID_AUTO, ixl, CTLFLAG_RD, 0, +static SYSCTL_NODE(_hw, OID_AUTO, ixl, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "ixl driver parameters"); /* Modified: head/sys/dev/ixl/ixl_pf_main.c ============================================================================== --- head/sys/dev/ixl/ixl_pf_main.c Mon Feb 24 10:47:18 2020 (r358285) +++ head/sys/dev/ixl/ixl_pf_main.c Mon Feb 24 10:51:26 2020 (r358286) @@ -1632,8 +1632,8 @@ ixl_add_sysctls_mac_stats(struct sysctl_ctx_list *ctx, struct sysctl_oid_list *child, struct i40e_hw_port_stats *stats) { - struct sysctl_oid *stat_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac", - CTLFLAG_RD, NULL, "Mac Statistics"); + struct sysctl_oid *stat_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, + "mac", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Mac Statistics"); struct sysctl_oid_list *stat_list = SYSCTL_CHILDREN(stat_node); struct i40e_eth_stats *eth_stats = &stats->eth; @@ -3121,38 +3121,45 @@ ixl_add_device_sysctls(struct ixl_pf *pf) /* Set up sysctls */ SYSCTL_ADD_PROC(ctx, ctx_list, - OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_set_flowcntl, "I", IXL_SYSCTL_HELP_FC); SYSCTL_ADD_PROC(ctx, ctx_list, - OID_AUTO, "advertise_speed", CTLTYPE_INT | CTLFLAG_RW, - pf, 0, ixl_sysctl_set_advertise, "I", IXL_SYSCTL_HELP_SET_ADVERTISE); + OID_AUTO, "advertise_speed", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, + ixl_sysctl_set_advertise, "I", IXL_SYSCTL_HELP_SET_ADVERTISE); SYSCTL_ADD_PROC(ctx, ctx_list, - OID_AUTO, "supported_speeds", CTLTYPE_INT | CTLFLAG_RD, - pf, 0, ixl_sysctl_supported_speeds, "I", IXL_SYSCTL_HELP_SUPPORTED_SPEED); + OID_AUTO, "supported_speeds", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, + ixl_sysctl_supported_speeds, "I", IXL_SYSCTL_HELP_SUPPORTED_SPEED); SYSCTL_ADD_PROC(ctx, ctx_list, - OID_AUTO, "current_speed", CTLTYPE_STRING | CTLFLAG_RD, - pf, 0, ixl_sysctl_current_speed, "A", "Current Port Speed"); + OID_AUTO, "current_speed", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, + ixl_sysctl_current_speed, "A", "Current Port Speed"); SYSCTL_ADD_PROC(ctx, ctx_list, - OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, - pf, 0, ixl_sysctl_show_fw, "A", "Firmware version"); + OID_AUTO, "fw_version", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, + ixl_sysctl_show_fw, "A", "Firmware version"); SYSCTL_ADD_PROC(ctx, ctx_list, - OID_AUTO, "unallocated_queues", CTLTYPE_INT | CTLFLAG_RD, - pf, 0, ixl_sysctl_unallocated_queues, "I", + OID_AUTO, "unallocated_queues", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, + ixl_sysctl_unallocated_queues, "I", "Queues not allocated to a PF or VF"); SYSCTL_ADD_PROC(ctx, ctx_list, - OID_AUTO, "tx_itr", CTLTYPE_INT | CTLFLAG_RW, - pf, 0, ixl_sysctl_pf_tx_itr, "I", + OID_AUTO, "tx_itr", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, + ixl_sysctl_pf_tx_itr, "I", "Immediately set TX ITR value for all queues"); SYSCTL_ADD_PROC(ctx, ctx_list, - OID_AUTO, "rx_itr", CTLTYPE_INT | CTLFLAG_RW, - pf, 0, ixl_sysctl_pf_rx_itr, "I", + OID_AUTO, "rx_itr", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, + ixl_sysctl_pf_rx_itr, "I", "Immediately set RX ITR value for all queues"); SYSCTL_ADD_INT(ctx, ctx_list, @@ -3166,38 +3173,48 @@ ixl_add_device_sysctls(struct ixl_pf *pf) /* Add FEC sysctls for 25G adapters */ if (i40e_is_25G_device(hw->device_id)) { fec_node = SYSCTL_ADD_NODE(ctx, ctx_list, - OID_AUTO, "fec", CTLFLAG_RD, NULL, "FEC Sysctls"); + OID_AUTO, "fec", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, + "FEC Sysctls"); fec_list = SYSCTL_CHILDREN(fec_node); SYSCTL_ADD_PROC(ctx, fec_list, - OID_AUTO, "fc_ability", CTLTYPE_INT | CTLFLAG_RW, - pf, 0, ixl_sysctl_fec_fc_ability, "I", "FC FEC ability enabled"); + OID_AUTO, "fc_ability", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, + ixl_sysctl_fec_fc_ability, "I", "FC FEC ability enabled"); SYSCTL_ADD_PROC(ctx, fec_list, - OID_AUTO, "rs_ability", CTLTYPE_INT | CTLFLAG_RW, - pf, 0, ixl_sysctl_fec_rs_ability, "I", "RS FEC ability enabled"); + OID_AUTO, "rs_ability", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, + ixl_sysctl_fec_rs_ability, "I", "RS FEC ability enabled"); SYSCTL_ADD_PROC(ctx, fec_list, - OID_AUTO, "fc_requested", CTLTYPE_INT | CTLFLAG_RW, - pf, 0, ixl_sysctl_fec_fc_request, "I", "FC FEC mode requested on link"); + OID_AUTO, "fc_requested", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, + ixl_sysctl_fec_fc_request, "I", + "FC FEC mode requested on link"); SYSCTL_ADD_PROC(ctx, fec_list, - OID_AUTO, "rs_requested", CTLTYPE_INT | CTLFLAG_RW, - pf, 0, ixl_sysctl_fec_rs_request, "I", "RS FEC mode requested on link"); + OID_AUTO, "rs_requested", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, + ixl_sysctl_fec_rs_request, "I", + "RS FEC mode requested on link"); SYSCTL_ADD_PROC(ctx, fec_list, - OID_AUTO, "auto_fec_enabled", CTLTYPE_INT | CTLFLAG_RW, - pf, 0, ixl_sysctl_fec_auto_enable, "I", "Let FW decide FEC ability/request modes"); + OID_AUTO, "auto_fec_enabled", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, + ixl_sysctl_fec_auto_enable, "I", + "Let FW decide FEC ability/request modes"); } SYSCTL_ADD_PROC(ctx, ctx_list, - OID_AUTO, "fw_lldp", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "fw_lldp", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_fw_lldp, "I", IXL_SYSCTL_HELP_FW_LLDP); /* Add sysctls meant to print debug information, but don't list them * in "sysctl -a" output. */ debug_node = SYSCTL_ADD_NODE(ctx, ctx_list, - OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP, NULL, "Debug Sysctls"); + OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE, NULL, + "Debug Sysctls"); debug_list = SYSCTL_CHILDREN(debug_node); SYSCTL_ADD_UINT(ctx, debug_list, @@ -3209,77 +3226,95 @@ ixl_add_device_sysctls(struct ixl_pf *pf) &pf->dbg_mask, 0, "Non-shared code debug message level"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "link_status", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "link_status", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_link_status, "A", IXL_SYSCTL_HELP_LINK_STATUS); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "phy_abilities", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "phy_abilities", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_phy_abilities, "A", "PHY Abilities"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "filter_list", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "filter_list", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_sw_filter_list, "A", "SW Filter List"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "hw_res_alloc", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "hw_res_alloc", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_hw_res_alloc, "A", "HW Resource Allocation"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "switch_config", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "switch_config", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_switch_config, "A", "HW Switch Configuration"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "rss_key", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "rss_key", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_hkey, "A", "View RSS key"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "rss_lut", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "rss_lut", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_hlut, "A", "View RSS lookup table"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "rss_hena", CTLTYPE_ULONG | CTLFLAG_RD, + OID_AUTO, "rss_hena", + CTLTYPE_ULONG | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_hena, "LU", "View enabled packet types for RSS"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "disable_fw_link_management", CTLTYPE_INT | CTLFLAG_WR, + OID_AUTO, "disable_fw_link_management", + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_fw_link_management, "I", "Disable FW Link Management"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "dump_debug_data", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "dump_debug_data", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_dump_debug_data, "A", "Dump Debug Data from FW"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "do_pf_reset", CTLTYPE_INT | CTLFLAG_WR, + OID_AUTO, "do_pf_reset", + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_do_pf_reset, "I", "Tell HW to initiate a PF reset"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "do_core_reset", CTLTYPE_INT | CTLFLAG_WR, + OID_AUTO, "do_core_reset", + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_do_core_reset, "I", "Tell HW to initiate a CORE reset"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "do_global_reset", CTLTYPE_INT | CTLFLAG_WR, + OID_AUTO, "do_global_reset", + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_do_global_reset, "I", "Tell HW to initiate a GLOBAL reset"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "do_emp_reset", CTLTYPE_INT | CTLFLAG_WR, + OID_AUTO, "do_emp_reset", + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_do_emp_reset, "I", "(This doesn't work) Tell HW to initiate a EMP (entire firmware) reset"); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "queue_interrupt_table", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "queue_interrupt_table", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_queue_interrupt_table, "A", "View MSI-X indices for TX/RX queues"); if (pf->has_i2c) { SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "read_i2c_byte", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "read_i2c_byte", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_read_i2c_byte, "I", IXL_SYSCTL_HELP_READ_I2C); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "write_i2c_byte", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "write_i2c_byte", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_write_i2c_byte, "I", IXL_SYSCTL_HELP_WRITE_I2C); SYSCTL_ADD_PROC(ctx, debug_list, - OID_AUTO, "read_i2c_diag_data", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "read_i2c_diag_data", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_read_i2c_diag_data, "A", "Dump selected diagnostic data from FW"); } } Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Mon Feb 24 10:47:18 2020 (r358285) +++ head/sys/dev/ixl/ixl_txrx.c Mon Feb 24 10:51:26 2020 (r358286) @@ -850,7 +850,7 @@ ixl_add_vsi_sysctls(device_t dev, struct ixl_vsi *vsi, tree = device_get_sysctl_tree(dev); child = SYSCTL_CHILDREN(tree); vsi->vsi_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, sysctl_name, - CTLFLAG_RD, NULL, "VSI Number"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "VSI Number"); vsi_list = SYSCTL_CHILDREN(vsi->vsi_node); ixl_add_sysctls_eth_stats(ctx, vsi_list, &vsi->eth_stats); @@ -911,7 +911,8 @@ ixl_add_queues_sysctls(device_t dev, struct ixl_vsi *v bzero(queue_namebuf, sizeof(queue_namebuf)); snprintf(queue_namebuf, QUEUE_NAME_LEN, "rxq%02d", q); queue_node = SYSCTL_ADD_NODE(ctx, vsi_list, - OID_AUTO, queue_namebuf, CTLFLAG_RD, NULL, "RX Queue #"); + OID_AUTO, queue_namebuf, CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, "RX Queue #"); queue_list = SYSCTL_CHILDREN(queue_node); rx_que = &(vsi->rx_queues[q]); @@ -938,7 +939,8 @@ ixl_add_queues_sysctls(device_t dev, struct ixl_vsi *v bzero(queue_namebuf, sizeof(queue_namebuf)); snprintf(queue_namebuf, QUEUE_NAME_LEN, "txq%02d", q); queue_node = SYSCTL_ADD_NODE(ctx, vsi_list, - OID_AUTO, queue_namebuf, CTLFLAG_RD, NULL, "TX Queue #"); + OID_AUTO, queue_namebuf, CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, "TX Queue #"); queue_list = SYSCTL_CHILDREN(queue_node); tx_que = &(vsi->tx_queues[q]); From owner-svn-src-head@freebsd.org Mon Feb 24 10:53:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C18F2590CE; Mon, 24 Feb 2020 10:53:11 +0000 (UTC) (envelope-from pawel.biernacki@gmail.com) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QzS53ZZfz4WhS; Mon, 24 Feb 2020 10:53:09 +0000 (UTC) (envelope-from pawel.biernacki@gmail.com) Received: by mail-wm1-f65.google.com with SMTP id q9so8497335wmj.5; Mon, 24 Feb 2020 02:53:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=I9D6pRf/YQqhEQAid2epESthzXY/MXoOUvJfNsZBwvA=; b=L1TpUVSvjMf+nF2B+ijuSLjxU40qsO0F1kVuxPBUCyty31QFaZX4gQ/4GQUuC+T9Mo 4cbe8GPfVMIOZ+x1aYOKo2FzGuwGjI4Hhjdib2KuUSdOTSj10vPyS8rDZU/QRrPvs9ho /q1Moy+jUzp7qtyp3H3/dNGAMXerktFEn1lvxn1BSmyuA0BGlEeGAJzvBHe+wiVV385h pDpVQ6aoFcfdUdDOutQuFQW0O0QB1blEPe0l/86QrsA1kBbHeG5TZJEuf8nSA7GbNvVr LcEWrIHncdgJcPTM6LhJDKF2Xw6k2L4W7FTPny5MFojAkKK4G8pAZPQ2hVBwtp7Bj9jA oRTw== X-Gm-Message-State: APjAAAXUEcgOmF9vtATyhuTsRLkexpqFA2OwC8fMrsUsMtpvyFqK1Ek7 WksekGRlfNOf3q5jxmm32aPLvhWl X-Google-Smtp-Source: APXvYqxh09X/OwrWa5MGCCFivwuZjEyqRWIJ5X3uhPvsJwHl7681pH2lg/BjR/oOmsF25j787aXExQ== X-Received: by 2002:a1c:a752:: with SMTP id q79mr1002727wme.64.1582541587069; Mon, 24 Feb 2020 02:53:07 -0800 (PST) Received: from macbook.localdomain (193-106-244-222.noc.fibertech.net.pl. [193.106.244.222]) by smtp.gmail.com with ESMTPSA id r3sm18477544wrn.34.2020.02.24.02.53.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2020 02:53:06 -0800 (PST) From: =?utf-8?Q?Pawe=C5=82_Biernacki?= Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358286 - in head/sys/dev: e1000 ixgbe ixl Date: Mon, 24 Feb 2020 11:53:03 +0100 References: <202002241051.01OApQM1019213@repo.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <202002241051.01OApQM1019213@repo.freebsd.org> Message-Id: X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48QzS53ZZfz4WhS X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pawelbiernacki@gmail.com designates 209.85.128.65 as permitted sender) smtp.mailfrom=pawelbiernacki@gmail.com X-Spamd-Result: default: False [5.91 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:209.85.128.0/17:c]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; URI_COUNT_ODD(1.00)[7]; RCVD_COUNT_THREE(0.00)[3]; FORGED_SENDER(0.30)[kaktus@FreeBSD.org,pawelbiernacki@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TAGGED_FROM(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[222.244.106.193.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.4]; FROM_NEQ_ENVFROM(0.00)[kaktus@FreeBSD.org,pawelbiernacki@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.97)[0.966,0]; BAD_REP_POLICIES(0.10)[]; IP_SCORE(-2.85)[ip: (-9.55), ipnet: 209.85.128.0/17(-2.99), asn: 15169(-1.67), country: US(-0.05)]; NEURAL_SPAM_LONG(1.00)[0.997,0]; RCVD_IN_DNSWL_NONE(0.00)[65.128.85.209.list.dnswl.org : 127.0.5.0]; RWL_MAILSPIKE_POSSIBLE(0.00)[65.128.85.209.rep.mailspike.net : 127.0.0.17]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 10:53:11 -0000 Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23630 = > On 24 Feb 2020, at 11:51, Pawel Biernacki wrote: >=20 > Author: kaktus > Date: Mon Feb 24 10:51:26 2020 > New Revision: 358286 > URL: https://svnweb.freebsd.org/changeset/base/358286 >=20 > Log: > Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (15 of many) >=20 > r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that = are > still not MPSAFE (or already are but aren=E2=80=99t properly marked). > Use it in preparation for a general review of all nodes. >=20 > This is non-functional change that adds annotations to SYSCTL_NODE = and > SYSCTL_PROC nodes using one of the soon-to-be-required flags. >=20 > Modified: > head/sys/dev/e1000/if_em.c > head/sys/dev/ixgbe/if_bypass.c > head/sys/dev/ixgbe/if_ix.c > head/sys/dev/ixgbe/if_ixv.c > head/sys/dev/ixl/if_iavf.c > head/sys/dev/ixl/if_ixl.c > head/sys/dev/ixl/ixl_pf_main.c > head/sys/dev/ixl/ixl_txrx.c >=20 > Modified: head/sys/dev/e1000/if_em.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/e1000/if_em.c Mon Feb 24 10:47:18 2020 = (r358285) > +++ head/sys/dev/e1000/if_em.c Mon Feb 24 10:51:26 2020 = (r358286) > @@ -459,7 +459,8 @@ static driver_t igb_if_driver =3D { > #define CSUM_TSO 0 > #endif >=20 > -static SYSCTL_NODE(_hw, OID_AUTO, em, CTLFLAG_RD, 0, "EM driver = parameters"); > +static SYSCTL_NODE(_hw, OID_AUTO, em, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, > + "EM driver parameters"); >=20 > static int em_disable_crc_stripping =3D 0; > SYSCTL_INT(_hw_em, OID_AUTO, disable_crc_stripping, CTLFLAG_RDTUN, > @@ -785,27 +786,29 @@ em_if_attach_pre(if_ctx_t ctx) > /* SYSCTL stuff */ > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > - OID_AUTO, "nvm", CTLTYPE_INT|CTLFLAG_RW, adapter, 0, > - em_sysctl_nvm_info, "I", "NVM Information"); > + OID_AUTO, "nvm", CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > + adapter, 0, em_sysctl_nvm_info, "I", "NVM Information"); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > - OID_AUTO, "debug", CTLTYPE_INT|CTLFLAG_RW, adapter, 0, > - em_sysctl_debug_info, "I", "Debug Information"); > + OID_AUTO, "debug", CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > + adapter, 0, em_sysctl_debug_info, "I", "Debug Information"); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > - OID_AUTO, "fc", CTLTYPE_INT|CTLFLAG_RW, adapter, 0, > - em_set_flowcntl, "I", "Flow Control"); > + OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > + adapter, 0, em_set_flowcntl, "I", "Flow Control"); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > - OID_AUTO, "reg_dump", CTLTYPE_STRING | CTLFLAG_RD, adapter, = 0, > + OID_AUTO, "reg_dump", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, 0, > em_get_regs, "A", "Dump Registers"); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > - OID_AUTO, "rs_dump", CTLTYPE_INT | CTLFLAG_RW, adapter, 0, > + OID_AUTO, "rs_dump", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, > em_get_rs, "I", "Dump RS indexes"); >=20 > /* Determine hardware and mac info */ > @@ -1020,7 +1023,8 @@ em_if_attach_pre(if_ctx_t ctx) > hw->dev_spec.ich8lan.eee_disable =3D eee_setting; > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > - OID_AUTO, "eee_control", CTLTYPE_INT|CTLFLAG_RW, > + OID_AUTO, "eee_control", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > adapter, 0, em_sysctl_eee, "I", > "Disable Energy Efficient Ethernet"); >=20 > @@ -4081,13 +4085,13 @@ em_add_hw_stats(struct adapter *adapter) > CTLFLAG_RD, &adapter->watchdog_events, > "Watchdog timeouts"); > SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "device_control", > - CTLTYPE_UINT | CTLFLAG_RD, adapter, E1000_CTRL, > - em_sysctl_reg_handler, "IU", > - "Device Control Register"); > + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > + adapter, E1000_CTRL, em_sysctl_reg_handler, "IU", > + "Device Control Register"); > SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rx_control", > - CTLTYPE_UINT | CTLFLAG_RD, adapter, E1000_RCTL, > - em_sysctl_reg_handler, "IU", > - "Receiver Control Register"); > + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > + adapter, E1000_RCTL, em_sysctl_reg_handler, "IU", > + "Receiver Control Register"); > SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_high_water", > CTLFLAG_RD, &adapter->hw.fc.high_water, 0, > "Flow Control High Watermark"); > @@ -4099,19 +4103,17 @@ em_add_hw_stats(struct adapter *adapter) > struct tx_ring *txr =3D &tx_que->txr; > snprintf(namebuf, QUEUE_NAME_LEN, "queue_tx_%d", i); > queue_node =3D SYSCTL_ADD_NODE(ctx, child, OID_AUTO, = namebuf, > - CTLFLAG_RD, NULL, "TX Queue = Name"); > + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "TX Queue Name"); > queue_list =3D SYSCTL_CHILDREN(queue_node); >=20 > SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", > - CTLTYPE_UINT | CTLFLAG_RD, adapter, > - E1000_TDH(txr->me), > - em_sysctl_reg_handler, "IU", > - "Transmit Descriptor Head"); > + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, = adapter, > + E1000_TDH(txr->me), em_sysctl_reg_handler, "IU", > + "Transmit Descriptor Head"); > SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", > - CTLTYPE_UINT | CTLFLAG_RD, adapter, > - E1000_TDT(txr->me), > - em_sysctl_reg_handler, "IU", > - "Transmit Descriptor Tail"); > + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, = adapter, > + E1000_TDT(txr->me), em_sysctl_reg_handler, "IU", > + "Transmit Descriptor Tail"); > SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "tx_irq", > CTLFLAG_RD, &txr->tx_irq, > "Queue MSI-X Transmit Interrupts"); > @@ -4121,19 +4123,17 @@ em_add_hw_stats(struct adapter *adapter) > struct rx_ring *rxr =3D &rx_que->rxr; > snprintf(namebuf, QUEUE_NAME_LEN, "queue_rx_%d", j); > queue_node =3D SYSCTL_ADD_NODE(ctx, child, OID_AUTO, = namebuf, > - CTLFLAG_RD, NULL, "RX Queue = Name"); > + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "RX Queue Name"); > queue_list =3D SYSCTL_CHILDREN(queue_node); >=20 > SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", > - CTLTYPE_UINT | CTLFLAG_RD, adapter, > - E1000_RDH(rxr->me), > - em_sysctl_reg_handler, "IU", > - "Receive Descriptor Head"); > + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, = adapter, > + E1000_RDH(rxr->me), em_sysctl_reg_handler, "IU", > + "Receive Descriptor Head"); > SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_tail", > - CTLTYPE_UINT | CTLFLAG_RD, adapter, > - E1000_RDT(rxr->me), > - em_sysctl_reg_handler, "IU", > - "Receive Descriptor Tail"); > + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, = adapter, > + E1000_RDT(rxr->me), em_sysctl_reg_handler, "IU", > + "Receive Descriptor Tail"); > SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "rx_irq", > CTLFLAG_RD, &rxr->rx_irq, > "Queue MSI-X Receive Interrupts"); > @@ -4142,7 +4142,7 @@ em_add_hw_stats(struct adapter *adapter) > /* MAC stats get their own sub node */ >=20 > stat_node =3D SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac_stats", > - CTLFLAG_RD, NULL, "Statistics"); > + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Statistics"); > stat_list =3D SYSCTL_CHILDREN(stat_node); >=20 > SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "excess_coll", > @@ -4293,7 +4293,7 @@ em_add_hw_stats(struct adapter *adapter) > /* Interrupt Stats */ >=20 > int_node =3D SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "interrupts", > - CTLFLAG_RD, NULL, "Interrupt = Statistics"); > + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Interrupt Statistics"); > int_list =3D SYSCTL_CHILDREN(int_node); >=20 > SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "asserts", > @@ -4435,7 +4435,7 @@ em_add_int_delay_sysctl(struct adapter *adapter, = const > info->value =3D value; > SYSCTL_ADD_PROC(device_get_sysctl_ctx(adapter->dev), > SYSCTL_CHILDREN(device_get_sysctl_tree(adapter->dev)), > - OID_AUTO, name, CTLTYPE_INT|CTLFLAG_RW, > + OID_AUTO, name, CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > info, 0, em_sysctl_int_delay, "I", description); > } >=20 >=20 > Modified: head/sys/dev/ixgbe/if_bypass.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/ixgbe/if_bypass.c Mon Feb 24 10:47:18 2020 = (r358285) > +++ head/sys/dev/ixgbe/if_bypass.c Mon Feb 24 10:51:26 2020 = (r358286) > @@ -746,50 +746,51 @@ ixgbe_bypass_init(struct adapter *adapter) > */ > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > - OID_AUTO, "bypass_log", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "bypass_log", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > adapter, 0, ixgbe_bp_log, "I", "Bypass Log"); >=20 > /* All other setting are hung from the 'bypass' node */ > bp_node =3D SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), > SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > - OID_AUTO, "bypass", CTLFLAG_RD, NULL, "Bypass"); > + OID_AUTO, "bypass", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, = "Bypass"); >=20 > bp_list =3D SYSCTL_CHILDREN(bp_node); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, > - OID_AUTO, "version", CTLTYPE_INT | CTLFLAG_RD, > + OID_AUTO, "version", CTLTYPE_INT | CTLFLAG_RD | = CTLFLAG_NEEDGIANT, > adapter, 0, ixgbe_bp_version, "I", "Bypass Version"); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, > - OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > adapter, 0, ixgbe_bp_set_state, "I", "Bypass State"); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, > - OID_AUTO, "timeout", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "timeout", CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > adapter, 0, ixgbe_bp_timeout, "I", "Bypass Timeout"); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, > - OID_AUTO, "main_on", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "main_on", CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > adapter, 0, ixgbe_bp_main_on, "I", "Bypass Main On"); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, > - OID_AUTO, "main_off", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "main_off", CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > adapter, 0, ixgbe_bp_main_off, "I", "Bypass Main Off"); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, > - OID_AUTO, "aux_on", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "aux_on", CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > adapter, 0, ixgbe_bp_aux_on, "I", "Bypass Aux On"); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, > - OID_AUTO, "aux_off", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "aux_off", CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > adapter, 0, ixgbe_bp_aux_off, "I", "Bypass Aux Off"); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, > - OID_AUTO, "wd_set", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "wd_set", CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > adapter, 0, ixgbe_bp_wd_set, "I", "Set BP Watchdog"); >=20 > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, > - OID_AUTO, "wd_reset", CTLTYPE_INT | CTLFLAG_WR, > + OID_AUTO, "wd_reset", CTLTYPE_INT | CTLFLAG_WR | = CTLFLAG_NEEDGIANT, > adapter, 0, ixgbe_bp_wd_reset, "S", "Bypass WD Reset"); >=20 > adapter->feat_en |=3D IXGBE_FEATURE_BYPASS; >=20 > Modified: head/sys/dev/ixgbe/if_ix.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/ixgbe/if_ix.c Mon Feb 24 10:47:18 2020 = (r358285) > +++ head/sys/dev/ixgbe/if_ix.c Mon Feb 24 10:51:26 2020 = (r358286) > @@ -285,7 +285,8 @@ static device_method_t ixgbe_if_methods[] =3D { > * TUNEABLE PARAMETERS: > */ >=20 > -static SYSCTL_NODE(_hw, OID_AUTO, ix, CTLFLAG_RD, 0, "IXGBE driver = parameters"); > +static SYSCTL_NODE(_hw, OID_AUTO, ix, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, > + "IXGBE driver parameters"); > static driver_t ixgbe_if_driver =3D { > "ixgbe_if", ixgbe_if_methods, sizeof(struct adapter) > }; > @@ -1546,14 +1547,14 @@ ixgbe_add_hw_stats(struct adapter *adapter) > struct tx_ring *txr =3D &tx_que->txr; > snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i); > queue_node =3D SYSCTL_ADD_NODE(ctx, child, OID_AUTO, = namebuf, > - CTLFLAG_RD, NULL, "Queue Name"); > + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Queue Name"); > queue_list =3D SYSCTL_CHILDREN(queue_node); >=20 > SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", > - CTLTYPE_UINT | CTLFLAG_RD, txr, 0, > + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, txr, = 0, > ixgbe_sysctl_tdh_handler, "IU", "Transmit Descriptor = Head"); > SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", > - CTLTYPE_UINT | CTLFLAG_RD, txr, 0, > + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, txr, = 0, > ixgbe_sysctl_tdt_handler, "IU", "Transmit Descriptor = Tail"); > SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tso_tx", > CTLFLAG_RD, &txr->tso_tx, "TSO"); > @@ -1566,21 +1567,22 @@ ixgbe_add_hw_stats(struct adapter *adapter) > struct rx_ring *rxr =3D &rx_que->rxr; > snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i); > queue_node =3D SYSCTL_ADD_NODE(ctx, child, OID_AUTO, = namebuf, > - CTLFLAG_RD, NULL, "Queue Name"); > + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Queue Name"); > queue_list =3D SYSCTL_CHILDREN(queue_node); >=20 > SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, = "interrupt_rate", > - CTLTYPE_UINT | CTLFLAG_RW, &adapter->rx_queues[i], = 0, > + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > + &adapter->rx_queues[i], 0, > ixgbe_sysctl_interrupt_rate_handler, "IU", > "Interrupt Rate"); > SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "irqs", > CTLFLAG_RD, &(adapter->rx_queues[i].irqs), > "irqs on this queue"); > SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", > - CTLTYPE_UINT | CTLFLAG_RD, rxr, 0, > + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, rxr, = 0, > ixgbe_sysctl_rdh_handler, "IU", "Receive Descriptor = Head"); > SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_tail", > - CTLTYPE_UINT | CTLFLAG_RD, rxr, 0, > + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, rxr, = 0, > ixgbe_sysctl_rdt_handler, "IU", "Receive Descriptor = Tail"); > SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, = "rx_packets", > CTLFLAG_RD, &rxr->rx_packets, "Queue Packets = Received"); > @@ -1595,7 +1597,7 @@ ixgbe_add_hw_stats(struct adapter *adapter) > /* MAC stats get their own sub node */ >=20 > stat_node =3D SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac_stats", > - CTLFLAG_RD, NULL, "MAC Statistics"); > + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "MAC Statistics"); > stat_list =3D SYSCTL_CHILDREN(stat_node); >=20 > SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "crc_errs", > @@ -2528,37 +2530,42 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) >=20 > /* Sysctls for all devices */ > SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fc", > - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, ixgbe_sysctl_flowcntl, = "I", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > + adapter, 0, ixgbe_sysctl_flowcntl, "I", > IXGBE_SYSCTL_DESC_SET_FC); >=20 > SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "advertise_speed", > - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, = ixgbe_sysctl_advertise, "I", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > + adapter, 0, ixgbe_sysctl_advertise, "I", > IXGBE_SYSCTL_DESC_ADV_SPEED); >=20 > #ifdef IXGBE_DEBUG > /* testing sysctls (for all devices) */ > SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "power_state", > - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, = ixgbe_sysctl_power_state, > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > + adapter, 0, ixgbe_sysctl_power_state, > "I", "PCI Power State"); >=20 > SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "print_rss_config", > - CTLTYPE_STRING | CTLFLAG_RD, adapter, 0, > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, adapter, 0, > ixgbe_sysctl_print_rss_config, "A", "Prints RSS = Configuration"); > #endif > /* for X550 series devices */ > if (hw->mac.type >=3D ixgbe_mac_X550) > SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "dmac", > - CTLTYPE_U16 | CTLFLAG_RW, adapter, 0, = ixgbe_sysctl_dmac, > + CTLTYPE_U16 | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > + adapter, 0, ixgbe_sysctl_dmac, > "I", "DMA Coalesce"); >=20 > /* for WoL-capable devices */ > if (hw->device_id =3D=3D IXGBE_DEV_ID_X550EM_X_10G_T) { > SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "wol_enable", > - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, = adapter, 0, > ixgbe_sysctl_wol_enable, "I", "Enable/Disable Wake = on LAN"); >=20 > SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "wufc", > - CTLTYPE_U32 | CTLFLAG_RW, adapter, 0, = ixgbe_sysctl_wufc, > + CTLTYPE_U32 | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > + adapter, 0, ixgbe_sysctl_wufc, > "I", "Enable/Disable Wake Up Filters"); > } >=20 > @@ -2568,22 +2575,24 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) > struct sysctl_oid_list *phy_list; >=20 > phy_node =3D SYSCTL_ADD_NODE(ctx_list, child, OID_AUTO, = "phy", > - CTLFLAG_RD, NULL, "External PHY sysctls"); > + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "External PHY = sysctls"); > phy_list =3D SYSCTL_CHILDREN(phy_node); >=20 > SYSCTL_ADD_PROC(ctx_list, phy_list, OID_AUTO, "temp", > - CTLTYPE_U16 | CTLFLAG_RD, adapter, 0, = ixgbe_sysctl_phy_temp, > + CTLTYPE_U16 | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > + adapter, 0, ixgbe_sysctl_phy_temp, > "I", "Current External PHY Temperature (Celsius)"); >=20 > SYSCTL_ADD_PROC(ctx_list, phy_list, OID_AUTO, > - "overtemp_occurred", CTLTYPE_U16 | CTLFLAG_RD, = adapter, 0, > + "overtemp_occurred", > + CTLTYPE_U16 | CTLFLAG_RD | CTLFLAG_NEEDGIANT, = adapter, 0, > ixgbe_sysctl_phy_overtemp_occurred, "I", > "External PHY High Temperature Event Occurred"); > } >=20 > if (adapter->feat_cap & IXGBE_FEATURE_EEE) { > SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "eee_state", > - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, = adapter, 0, > ixgbe_sysctl_eee_state, "I", "EEE Power Save = State"); > } > } /* ixgbe_add_device_sysctls */ >=20 > Modified: head/sys/dev/ixgbe/if_ixv.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/ixgbe/if_ixv.c Mon Feb 24 10:47:18 2020 = (r358285) > +++ head/sys/dev/ixgbe/if_ixv.c Mon Feb 24 10:51:26 2020 = (r358286) > @@ -418,8 +418,8 @@ ixv_if_attach_pre(if_ctx_t ctx) > /* SYSCTL APIs */ > SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, = "debug", > - CTLTYPE_INT | CTLFLAG_RW, adapter, 0, ixv_sysctl_debug, "I", > - "Debug Info"); > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > + adapter, 0, ixv_sysctl_debug, "I", "Debug Info"); >=20 > /* Determine hardware revision */ > ixv_identify_hardware(ctx); > @@ -1803,7 +1803,7 @@ ixv_add_stats_sysctls(struct adapter *adapter) > struct tx_ring *txr =3D &tx_que->txr; > snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i); > queue_node =3D SYSCTL_ADD_NODE(ctx, child, OID_AUTO, = namebuf, > - CTLFLAG_RD, NULL, "Queue Name"); > + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Queue Name"); > queue_list =3D SYSCTL_CHILDREN(queue_node); >=20 > SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tso_tx", > @@ -1816,7 +1816,7 @@ ixv_add_stats_sysctls(struct adapter *adapter) > struct rx_ring *rxr =3D &rx_que->rxr; > snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i); > queue_node =3D SYSCTL_ADD_NODE(ctx, child, OID_AUTO, = namebuf, > - CTLFLAG_RD, NULL, "Queue Name"); > + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Queue Name"); > queue_list =3D SYSCTL_CHILDREN(queue_node); >=20 > SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "irqs", > @@ -1830,7 +1830,8 @@ ixv_add_stats_sysctls(struct adapter *adapter) > } >=20 > stat_node =3D SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac", > - CTLFLAG_RD, NULL, "VF Statistics (read from HW registers)"); > + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, > + "VF Statistics (read from HW registers)"); > stat_list =3D SYSCTL_CHILDREN(stat_node); >=20 > SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_rcvd", >=20 > Modified: head/sys/dev/ixl/if_iavf.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/ixl/if_iavf.c Mon Feb 24 10:47:18 2020 = (r358285) > +++ head/sys/dev/ixl/if_iavf.c Mon Feb 24 10:51:26 2020 = (r358286) > @@ -201,7 +201,7 @@ static driver_t iavf_if_driver =3D { > ** TUNEABLE PARAMETERS: > */ >=20 > -static SYSCTL_NODE(_hw, OID_AUTO, iavf, CTLFLAG_RD, 0, > +static SYSCTL_NODE(_hw, OID_AUTO, iavf, CTLFLAG_RD | CTLFLAG_MPSAFE, = 0, > "iavf driver parameters"); >=20 > /* > @@ -2049,23 +2049,27 @@ iavf_add_device_sysctls(struct iavf_sc *sc) > struct sysctl_oid_list *debug_list; >=20 > SYSCTL_ADD_PROC(ctx, ctx_list, > - OID_AUTO, "current_speed", CTLTYPE_STRING | CTLFLAG_RD, > + OID_AUTO, "current_speed", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > sc, 0, iavf_sysctl_current_speed, "A", "Current Port = Speed"); >=20 > SYSCTL_ADD_PROC(ctx, ctx_list, > - OID_AUTO, "tx_itr", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "tx_itr", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > sc, 0, iavf_sysctl_tx_itr, "I", > "Immediately set TX ITR value for all queues"); >=20 > SYSCTL_ADD_PROC(ctx, ctx_list, > - OID_AUTO, "rx_itr", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "rx_itr", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > sc, 0, iavf_sysctl_rx_itr, "I", > "Immediately set RX ITR value for all queues"); >=20 > /* Add sysctls meant to print debug information, but don't list = them > * in "sysctl -a" output. */ > debug_node =3D SYSCTL_ADD_NODE(ctx, ctx_list, > - OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP, NULL, "Debug = Sysctls"); > + OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP | = CTLFLAG_NEEDGIANT, > + NULL, "Debug Sysctls"); > debug_list =3D SYSCTL_CHILDREN(debug_node); >=20 > SYSCTL_ADD_UINT(ctx, debug_list, > @@ -2077,19 +2081,23 @@ iavf_add_device_sysctls(struct iavf_sc *sc) > &sc->dbg_mask, 0, "Non-shared code debug message level"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "filter_list", CTLTYPE_STRING | CTLFLAG_RD, > + OID_AUTO, "filter_list", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > sc, 0, iavf_sysctl_sw_filter_list, "A", "SW Filter List"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "queue_interrupt_table", CTLTYPE_STRING | = CTLFLAG_RD, > + OID_AUTO, "queue_interrupt_table", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > sc, 0, iavf_sysctl_queue_interrupt_table, "A", "View MSI-X = indices for TX/RX queues"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "do_vf_reset", CTLTYPE_INT | CTLFLAG_WR, > + OID_AUTO, "do_vf_reset", > + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, > sc, 0, iavf_sysctl_vf_reset, "A", "Request a VF reset from = PF"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "do_vflr_reset", CTLTYPE_INT | CTLFLAG_WR, > + OID_AUTO, "do_vflr_reset", > + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, > sc, 0, iavf_sysctl_vflr_reset, "A", "Request a VFLR reset = from HW"); >=20 > /* Add stats sysctls */ >=20 > Modified: head/sys/dev/ixl/if_ixl.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/ixl/if_ixl.c Mon Feb 24 10:47:18 2020 = (r358285) > +++ head/sys/dev/ixl/if_ixl.c Mon Feb 24 10:51:26 2020 = (r358286) > @@ -206,7 +206,7 @@ static driver_t ixl_if_driver =3D { > ** TUNEABLE PARAMETERS: > */ >=20 > -static SYSCTL_NODE(_hw, OID_AUTO, ixl, CTLFLAG_RD, 0, > +static SYSCTL_NODE(_hw, OID_AUTO, ixl, CTLFLAG_RD | CTLFLAG_MPSAFE, = 0, > "ixl driver parameters"); >=20 > /* >=20 > Modified: head/sys/dev/ixl/ixl_pf_main.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/ixl/ixl_pf_main.c Mon Feb 24 10:47:18 2020 = (r358285) > +++ head/sys/dev/ixl/ixl_pf_main.c Mon Feb 24 10:51:26 2020 = (r358286) > @@ -1632,8 +1632,8 @@ ixl_add_sysctls_mac_stats(struct sysctl_ctx_list = *ctx, > struct sysctl_oid_list *child, > struct i40e_hw_port_stats *stats) > { > - struct sysctl_oid *stat_node =3D SYSCTL_ADD_NODE(ctx, child, = OID_AUTO, "mac", > - CTLFLAG_RD, NULL, "Mac Statistics"); > + struct sysctl_oid *stat_node =3D SYSCTL_ADD_NODE(ctx, child, = OID_AUTO, > + "mac", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Mac Statistics"); > struct sysctl_oid_list *stat_list =3D = SYSCTL_CHILDREN(stat_node); >=20 > struct i40e_eth_stats *eth_stats =3D &stats->eth; > @@ -3121,38 +3121,45 @@ ixl_add_device_sysctls(struct ixl_pf *pf) >=20 > /* Set up sysctls */ > SYSCTL_ADD_PROC(ctx, ctx_list, > - OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_set_flowcntl, "I", IXL_SYSCTL_HELP_FC); >=20 > SYSCTL_ADD_PROC(ctx, ctx_list, > - OID_AUTO, "advertise_speed", CTLTYPE_INT | CTLFLAG_RW, > - pf, 0, ixl_sysctl_set_advertise, "I", = IXL_SYSCTL_HELP_SET_ADVERTISE); > + OID_AUTO, "advertise_speed", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, > + ixl_sysctl_set_advertise, "I", = IXL_SYSCTL_HELP_SET_ADVERTISE); >=20 > SYSCTL_ADD_PROC(ctx, ctx_list, > - OID_AUTO, "supported_speeds", CTLTYPE_INT | CTLFLAG_RD, > - pf, 0, ixl_sysctl_supported_speeds, "I", = IXL_SYSCTL_HELP_SUPPORTED_SPEED); > + OID_AUTO, "supported_speeds", > + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, > + ixl_sysctl_supported_speeds, "I", = IXL_SYSCTL_HELP_SUPPORTED_SPEED); >=20 > SYSCTL_ADD_PROC(ctx, ctx_list, > - OID_AUTO, "current_speed", CTLTYPE_STRING | CTLFLAG_RD, > - pf, 0, ixl_sysctl_current_speed, "A", "Current Port Speed"); > + OID_AUTO, "current_speed", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, > + ixl_sysctl_current_speed, "A", "Current Port Speed"); >=20 > SYSCTL_ADD_PROC(ctx, ctx_list, > - OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, > - pf, 0, ixl_sysctl_show_fw, "A", "Firmware version"); > + OID_AUTO, "fw_version", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, > + ixl_sysctl_show_fw, "A", "Firmware version"); >=20 > SYSCTL_ADD_PROC(ctx, ctx_list, > - OID_AUTO, "unallocated_queues", CTLTYPE_INT | CTLFLAG_RD, > - pf, 0, ixl_sysctl_unallocated_queues, "I", > + OID_AUTO, "unallocated_queues", > + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, > + ixl_sysctl_unallocated_queues, "I", > "Queues not allocated to a PF or VF"); >=20 > SYSCTL_ADD_PROC(ctx, ctx_list, > - OID_AUTO, "tx_itr", CTLTYPE_INT | CTLFLAG_RW, > - pf, 0, ixl_sysctl_pf_tx_itr, "I", > + OID_AUTO, "tx_itr", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, > + ixl_sysctl_pf_tx_itr, "I", > "Immediately set TX ITR value for all queues"); >=20 > SYSCTL_ADD_PROC(ctx, ctx_list, > - OID_AUTO, "rx_itr", CTLTYPE_INT | CTLFLAG_RW, > - pf, 0, ixl_sysctl_pf_rx_itr, "I", > + OID_AUTO, "rx_itr", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, > + ixl_sysctl_pf_rx_itr, "I", > "Immediately set RX ITR value for all queues"); >=20 > SYSCTL_ADD_INT(ctx, ctx_list, > @@ -3166,38 +3173,48 @@ ixl_add_device_sysctls(struct ixl_pf *pf) > /* Add FEC sysctls for 25G adapters */ > if (i40e_is_25G_device(hw->device_id)) { > fec_node =3D SYSCTL_ADD_NODE(ctx, ctx_list, > - OID_AUTO, "fec", CTLFLAG_RD, NULL, "FEC Sysctls"); > + OID_AUTO, "fec", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, > + "FEC Sysctls"); > fec_list =3D SYSCTL_CHILDREN(fec_node); >=20 > SYSCTL_ADD_PROC(ctx, fec_list, > - OID_AUTO, "fc_ability", CTLTYPE_INT | CTLFLAG_RW, > - pf, 0, ixl_sysctl_fec_fc_ability, "I", "FC FEC = ability enabled"); > + OID_AUTO, "fc_ability", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, > + ixl_sysctl_fec_fc_ability, "I", "FC FEC ability = enabled"); >=20 > SYSCTL_ADD_PROC(ctx, fec_list, > - OID_AUTO, "rs_ability", CTLTYPE_INT | CTLFLAG_RW, > - pf, 0, ixl_sysctl_fec_rs_ability, "I", "RS FEC = ability enabled"); > + OID_AUTO, "rs_ability", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, > + ixl_sysctl_fec_rs_ability, "I", "RS FEC ability = enabled"); >=20 > SYSCTL_ADD_PROC(ctx, fec_list, > - OID_AUTO, "fc_requested", CTLTYPE_INT | CTLFLAG_RW, > - pf, 0, ixl_sysctl_fec_fc_request, "I", "FC FEC mode = requested on link"); > + OID_AUTO, "fc_requested", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, > + ixl_sysctl_fec_fc_request, "I", > + "FC FEC mode requested on link"); >=20 > SYSCTL_ADD_PROC(ctx, fec_list, > - OID_AUTO, "rs_requested", CTLTYPE_INT | CTLFLAG_RW, > - pf, 0, ixl_sysctl_fec_rs_request, "I", "RS FEC mode = requested on link"); > + OID_AUTO, "rs_requested", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, > + ixl_sysctl_fec_rs_request, "I", > + "RS FEC mode requested on link"); >=20 > SYSCTL_ADD_PROC(ctx, fec_list, > - OID_AUTO, "auto_fec_enabled", CTLTYPE_INT | = CTLFLAG_RW, > - pf, 0, ixl_sysctl_fec_auto_enable, "I", "Let FW = decide FEC ability/request modes"); > + OID_AUTO, "auto_fec_enabled", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, pf, 0, > + ixl_sysctl_fec_auto_enable, "I", > + "Let FW decide FEC ability/request modes"); > } >=20 > SYSCTL_ADD_PROC(ctx, ctx_list, > - OID_AUTO, "fw_lldp", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "fw_lldp", CTLTYPE_INT | CTLFLAG_RW | = CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_fw_lldp, "I", IXL_SYSCTL_HELP_FW_LLDP); >=20 > /* Add sysctls meant to print debug information, but don't list = them > * in "sysctl -a" output. */ > debug_node =3D SYSCTL_ADD_NODE(ctx, ctx_list, > - OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP, NULL, "Debug = Sysctls"); > + OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP | = CTLFLAG_MPSAFE, NULL, > + "Debug Sysctls"); > debug_list =3D SYSCTL_CHILDREN(debug_node); >=20 > SYSCTL_ADD_UINT(ctx, debug_list, > @@ -3209,77 +3226,95 @@ ixl_add_device_sysctls(struct ixl_pf *pf) > &pf->dbg_mask, 0, "Non-shared code debug message level"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "link_status", CTLTYPE_STRING | CTLFLAG_RD, > + OID_AUTO, "link_status", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_link_status, "A", = IXL_SYSCTL_HELP_LINK_STATUS); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "phy_abilities", CTLTYPE_STRING | CTLFLAG_RD, > + OID_AUTO, "phy_abilities", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_phy_abilities, "A", "PHY Abilities"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "filter_list", CTLTYPE_STRING | CTLFLAG_RD, > + OID_AUTO, "filter_list", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_sw_filter_list, "A", "SW Filter List"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "hw_res_alloc", CTLTYPE_STRING | CTLFLAG_RD, > + OID_AUTO, "hw_res_alloc", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_hw_res_alloc, "A", "HW Resource = Allocation"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "switch_config", CTLTYPE_STRING | CTLFLAG_RD, > + OID_AUTO, "switch_config", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_switch_config, "A", "HW Switch = Configuration"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "rss_key", CTLTYPE_STRING | CTLFLAG_RD, > + OID_AUTO, "rss_key", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_hkey, "A", "View RSS key"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "rss_lut", CTLTYPE_STRING | CTLFLAG_RD, > + OID_AUTO, "rss_lut", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_hlut, "A", "View RSS lookup table"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "rss_hena", CTLTYPE_ULONG | CTLFLAG_RD, > + OID_AUTO, "rss_hena", > + CTLTYPE_ULONG | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_hena, "LU", "View enabled packet types for = RSS"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "disable_fw_link_management", CTLTYPE_INT | = CTLFLAG_WR, > + OID_AUTO, "disable_fw_link_management", > + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_fw_link_management, "I", "Disable FW Link = Management"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "dump_debug_data", CTLTYPE_STRING | CTLFLAG_RD, > + OID_AUTO, "dump_debug_data", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_dump_debug_data, "A", "Dump Debug Data = from FW"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "do_pf_reset", CTLTYPE_INT | CTLFLAG_WR, > + OID_AUTO, "do_pf_reset", > + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_do_pf_reset, "I", "Tell HW to initiate a = PF reset"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "do_core_reset", CTLTYPE_INT | CTLFLAG_WR, > + OID_AUTO, "do_core_reset", > + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_do_core_reset, "I", "Tell HW to initiate a = CORE reset"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "do_global_reset", CTLTYPE_INT | CTLFLAG_WR, > + OID_AUTO, "do_global_reset", > + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_do_global_reset, "I", "Tell HW to initiate = a GLOBAL reset"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "do_emp_reset", CTLTYPE_INT | CTLFLAG_WR, > + OID_AUTO, "do_emp_reset", > + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_do_emp_reset, "I", > "(This doesn't work) Tell HW to initiate a EMP (entire = firmware) reset"); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "queue_interrupt_table", CTLTYPE_STRING | = CTLFLAG_RD, > + OID_AUTO, "queue_interrupt_table", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_queue_interrupt_table, "A", "View MSI-X = indices for TX/RX queues"); >=20 > if (pf->has_i2c) { > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "read_i2c_byte", CTLTYPE_INT | CTLFLAG_RW, > + OID_AUTO, "read_i2c_byte", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_read_i2c_byte, "I", = IXL_SYSCTL_HELP_READ_I2C); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "write_i2c_byte", CTLTYPE_INT | = CTLFLAG_RW, > + OID_AUTO, "write_i2c_byte", > + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_write_i2c_byte, "I", = IXL_SYSCTL_HELP_WRITE_I2C); >=20 > SYSCTL_ADD_PROC(ctx, debug_list, > - OID_AUTO, "read_i2c_diag_data", CTLTYPE_STRING | = CTLFLAG_RD, > + OID_AUTO, "read_i2c_diag_data", > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, > pf, 0, ixl_sysctl_read_i2c_diag_data, "A", "Dump = selected diagnostic data from FW"); > } > } >=20 > Modified: head/sys/dev/ixl/ixl_txrx.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/ixl/ixl_txrx.c Mon Feb 24 10:47:18 2020 = (r358285) > +++ head/sys/dev/ixl/ixl_txrx.c Mon Feb 24 10:51:26 2020 = (r358286) > @@ -850,7 +850,7 @@ ixl_add_vsi_sysctls(device_t dev, struct ixl_vsi = *vsi, > tree =3D device_get_sysctl_tree(dev); > child =3D SYSCTL_CHILDREN(tree); > vsi->vsi_node =3D SYSCTL_ADD_NODE(ctx, child, OID_AUTO, = sysctl_name, > - CTLFLAG_RD, NULL, "VSI Number"); > + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "VSI Number"); > vsi_list =3D SYSCTL_CHILDREN(vsi->vsi_node); >=20 > ixl_add_sysctls_eth_stats(ctx, vsi_list, &vsi->eth_stats); > @@ -911,7 +911,8 @@ ixl_add_queues_sysctls(device_t dev, struct = ixl_vsi *v > bzero(queue_namebuf, sizeof(queue_namebuf)); > snprintf(queue_namebuf, QUEUE_NAME_LEN, "rxq%02d", q); > queue_node =3D SYSCTL_ADD_NODE(ctx, vsi_list, > - OID_AUTO, queue_namebuf, CTLFLAG_RD, NULL, "RX Queue = #"); > + OID_AUTO, queue_namebuf, CTLFLAG_RD | = CTLFLAG_MPSAFE, > + NULL, "RX Queue #"); > queue_list =3D SYSCTL_CHILDREN(queue_node); >=20 > rx_que =3D &(vsi->rx_queues[q]); > @@ -938,7 +939,8 @@ ixl_add_queues_sysctls(device_t dev, struct = ixl_vsi *v > bzero(queue_namebuf, sizeof(queue_namebuf)); > snprintf(queue_namebuf, QUEUE_NAME_LEN, "txq%02d", q); > queue_node =3D SYSCTL_ADD_NODE(ctx, vsi_list, > - OID_AUTO, queue_namebuf, CTLFLAG_RD, NULL, "TX Queue = #"); > + OID_AUTO, queue_namebuf, CTLFLAG_RD | = CTLFLAG_MPSAFE, > + NULL, "TX Queue #"); > queue_list =3D SYSCTL_CHILDREN(queue_node); >=20 > tx_que =3D &(vsi->tx_queues[q]); From owner-svn-src-head@freebsd.org Mon Feb 24 14:22:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8EC4725DE8E; Mon, 24 Feb 2020 14:22:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48R4600qchz3Kc5; Mon, 24 Feb 2020 14:22:47 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id C75602601D2; Mon, 24 Feb 2020 15:22:39 +0100 (CET) Subject: Re: svn commit: r358167 - head/sys/netinet6 To: "Bjoern A. Zeeb" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002201056.01KAuC0N029186@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <7d9ea227-7208-5773-080c-5ebc365c4be0@selasky.org> Date: Mon, 24 Feb 2020 15:21:24 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <202002201056.01KAuC0N029186@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48R4600qchz3Kc5 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-5.42 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE(-3.12)[ip: (-9.32), ipnet: 88.99.0.0/16(-4.71), asn: 24940(-1.56), country: DE(-0.02)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 14:22:49 -0000 On 2020-02-20 11:56, Bjoern A. Zeeb wrote: > + > + unfragpartlen = optlen + sizeof(struct ip6_hdr); > + Hi Bjoren, This change introduces a slight regression when a host replies to IPv6 ping fragmented packets. The problem is the "unfragpartlen" must also be set in the else case of "if (opt)", else the payload offset computation for IPv6 fragments goes wrong by the size of the IPv6 header! After r358167: > ping6 -s 3000 fe80::ee0d:9aff:fed4:2c8c%mce2 > PING6(3048=40+8+3000 bytes) fe80::ee0d:9aff:fed4:2c94%mce2 --> fe80::ee0d:9aff:fed4:2c8c%mce2 > ^C > --- fe80::ee0d:9aff:fed4:2c8c%mce2 ping6 statistics --- > 2 packets transmitted, 0 packets received, 100.0% packet loss With the patch mentioned in the end of this e-mail: > ping6 -s 3000 fe80::ee0d:9aff:fed4:2c8c%mce2 > PING6(3048=40+8+3000 bytes) fe80::ee0d:9aff:fed4:2c8c%mce2 --> fe80::ee0d:9aff:fed4:2c8c%mce2 > 3008 bytes from fe80::ee0d:9aff:fed4:2c8c%mce2, icmp_seq=0 hlim=64 time=0.499 ms > 3008 bytes from fe80::ee0d:9aff:fed4:2c8c%mce2, icmp_seq=1 hlim=64 time=0.405 ms > 3008 bytes from fe80::ee0d:9aff:fed4:2c8c%mce2, icmp_seq=2 hlim=64 time=0.097 ms > ^C > --- fe80::ee0d:9aff:fed4:2c8c%mce2 ping6 statistics --- > 3 packets transmitted, 3 packets received, 0.0% packet loss > round-trip min/avg/max/std-dev = 0.097/0.334/0.499/0.172 ms Patch goes like this: > diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c > index 06c57bcec48..a6c8d148833 100644 > --- a/sys/netinet6/ip6_output.c > +++ b/sys/netinet6/ip6_output.c > @@ -459,7 +459,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, > */ > bzero(&exthdrs, sizeof(exthdrs)); > optlen = 0; > - unfragpartlen = 0; > if (opt) { > /* Hop-by-Hop options header. */ > MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh, optlen); > @@ -497,8 +496,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, > /* Routing header. */ > MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr, optlen); > > - unfragpartlen = optlen + sizeof(struct ip6_hdr); > - > /* > * NOTE: we don't add AH/ESP length here (done in > * ip6_ipsec_output()). > @@ -508,6 +505,8 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, > MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2, optlen); > } > > + unfragpartlen = optlen + sizeof(struct ip6_hdr); > + > /* > * If there is at least one extension header, > * separate IP6 header from the payload. --HPS From owner-svn-src-head@freebsd.org Mon Feb 24 15:35:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6BD8523800E; Mon, 24 Feb 2020 15:35:32 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48R5jw2GCHz4FM2; Mon, 24 Feb 2020 15:35:32 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 442CC2763A; Mon, 24 Feb 2020 15:35:32 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01OFZWeA092594; Mon, 24 Feb 2020 15:35:32 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OFZVfi092591; Mon, 24 Feb 2020 15:35:31 GMT (envelope-from mw@FreeBSD.org) Message-Id: <202002241535.01OFZVfi092591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Mon, 24 Feb 2020 15:35:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358289 - head/sys/dev/ena X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/dev/ena X-SVN-Commit-Revision: 358289 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 15:35:32 -0000 Author: mw Date: Mon Feb 24 15:35:31 2020 New Revision: 358289 URL: https://svnweb.freebsd.org/changeset/base/358289 Log: Rework and simplify Tx DMA mapping in ENA Driver working in LLQ mode in some cases can send only few last segments of the mbuf using DMA engine, and the rest of them are sent to the device using direct PCI transaction. To map the only necessary data, two DMA maps were used. That solution was very rough and was causing a bug - if both maps were used (head_map and seg_map), there was a race in between two flows on two queues and the device was receiving corrupted data which could be further received on the other host if the Tx cksum offload was enabled. As it's ok to map whole mbuf and then send to the device only needed segments, the design was simplified to use only single DMA map. The driver version was updated to v2.1.1 as it's important bug fix. Submitted by: Michal Krawczyk Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. Modified: head/sys/dev/ena/ena.c head/sys/dev/ena/ena.h head/sys/dev/ena/ena_datapath.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Mon Feb 24 12:35:58 2020 (r358288) +++ head/sys/dev/ena/ena.c Mon Feb 24 15:35:31 2020 (r358289) @@ -558,15 +558,10 @@ ena_release_all_tx_dmamap(struct ena_ring *tx_ring) } } #endif /* DEV_NETMAP */ - if (tx_info->map_head != NULL) { - bus_dmamap_destroy(tx_tag, tx_info->map_head); - tx_info->map_head = NULL; + if (tx_info->dmamap != NULL) { + bus_dmamap_destroy(tx_tag, tx_info->dmamap); + tx_info->dmamap = NULL; } - - if (tx_info->map_seg != NULL) { - bus_dmamap_destroy(tx_tag, tx_info->map_seg); - tx_info->map_seg = NULL; - } } } @@ -627,25 +622,14 @@ ena_setup_tx_resources(struct ena_adapter *adapter, in /* ... and create the buffer DMA maps */ for (i = 0; i < tx_ring->ring_size; i++) { err = bus_dmamap_create(adapter->tx_buf_tag, 0, - &tx_ring->tx_buffer_info[i].map_head); + &tx_ring->tx_buffer_info[i].dmamap); if (unlikely(err != 0)) { ena_trace(ENA_ALERT, - "Unable to create Tx DMA map_head for buffer %d\n", + "Unable to create Tx DMA map for buffer %d\n", i); goto err_map_release; } - tx_ring->tx_buffer_info[i].seg_mapped = false; - err = bus_dmamap_create(adapter->tx_buf_tag, 0, - &tx_ring->tx_buffer_info[i].map_seg); - if (unlikely(err != 0)) { - ena_trace(ENA_ALERT, - "Unable to create Tx DMA map_seg for buffer %d\n", - i); - goto err_map_release; - } - tx_ring->tx_buffer_info[i].head_mapped = false; - #ifdef DEV_NETMAP if (adapter->ifp->if_capenable & IFCAP_NETMAP) { map = tx_ring->tx_buffer_info[i].nm_info.map_seg; @@ -720,28 +704,13 @@ ena_free_tx_resources(struct ena_adapter *adapter, int /* Free buffer DMA maps, */ for (int i = 0; i < tx_ring->ring_size; i++) { - if (tx_ring->tx_buffer_info[i].head_mapped == true) { - bus_dmamap_sync(adapter->tx_buf_tag, - tx_ring->tx_buffer_info[i].map_head, - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(adapter->tx_buf_tag, - tx_ring->tx_buffer_info[i].map_head); - tx_ring->tx_buffer_info[i].head_mapped = false; - } + bus_dmamap_sync(adapter->tx_buf_tag, + tx_ring->tx_buffer_info[i].dmamap, BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(adapter->tx_buf_tag, + tx_ring->tx_buffer_info[i].dmamap); bus_dmamap_destroy(adapter->tx_buf_tag, - tx_ring->tx_buffer_info[i].map_head); + tx_ring->tx_buffer_info[i].dmamap); - if (tx_ring->tx_buffer_info[i].seg_mapped == true) { - bus_dmamap_sync(adapter->tx_buf_tag, - tx_ring->tx_buffer_info[i].map_seg, - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(adapter->tx_buf_tag, - tx_ring->tx_buffer_info[i].map_seg); - tx_ring->tx_buffer_info[i].seg_mapped = false; - } - bus_dmamap_destroy(adapter->tx_buf_tag, - tx_ring->tx_buffer_info[i].map_seg); - #ifdef DEV_NETMAP if (adapter->ifp->if_capenable & IFCAP_NETMAP) { nm_info = &tx_ring->tx_buffer_info[i].nm_info; @@ -1209,21 +1178,9 @@ ena_free_tx_bufs(struct ena_adapter *adapter, unsigned qid, i); } - if (tx_info->head_mapped == true) { - bus_dmamap_sync(adapter->tx_buf_tag, tx_info->map_head, - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(adapter->tx_buf_tag, - tx_info->map_head); - tx_info->head_mapped = false; - } - - if (tx_info->seg_mapped == true) { - bus_dmamap_sync(adapter->tx_buf_tag, tx_info->map_seg, - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(adapter->tx_buf_tag, - tx_info->map_seg); - tx_info->seg_mapped = false; - } + bus_dmamap_sync(adapter->tx_buf_tag, tx_info->dmamap, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(adapter->tx_buf_tag, tx_info->dmamap); m_free(tx_info->mbuf); tx_info->mbuf = NULL; Modified: head/sys/dev/ena/ena.h ============================================================================== --- head/sys/dev/ena/ena.h Mon Feb 24 12:35:58 2020 (r358288) +++ head/sys/dev/ena/ena.h Mon Feb 24 15:35:31 2020 (r358289) @@ -41,7 +41,7 @@ #define DRV_MODULE_VER_MAJOR 2 #define DRV_MODULE_VER_MINOR 1 -#define DRV_MODULE_VER_SUBMINOR 0 +#define DRV_MODULE_VER_SUBMINOR 1 #define DRV_MODULE_NAME "ena" @@ -241,13 +241,8 @@ struct ena_tx_buffer { unsigned int tx_descs; /* # of buffers used by this mbuf */ unsigned int num_of_bufs; - bus_dmamap_t map_head; - bus_dmamap_t map_seg; - /* Indicate if segments of the mbuf were mapped */ - bool seg_mapped; - /* Indicate if bufs[0] maps the linear data of the mbuf */ - bool head_mapped; + bus_dmamap_t dmamap; /* Used to detect missing tx packets */ struct bintime timestamp; Modified: head/sys/dev/ena/ena_datapath.c ============================================================================== --- head/sys/dev/ena/ena_datapath.c Mon Feb 24 12:35:58 2020 (r358288) +++ head/sys/dev/ena/ena_datapath.c Mon Feb 24 15:35:31 2020 (r358289) @@ -52,7 +52,6 @@ static inline void ena_rx_checksum(struct ena_ring *, static void ena_tx_csum(struct ena_com_tx_ctx *, struct mbuf *); static int ena_check_and_collapse_mbuf(struct ena_ring *tx_ring, struct mbuf **mbuf); -static void ena_dmamap_llq(void *, bus_dma_segment_t *, int, int); static int ena_xmit_mbuf(struct ena_ring *, struct mbuf **); static void ena_start_xmit(struct ena_ring *); @@ -263,21 +262,10 @@ ena_tx_cleanup(struct ena_ring *tx_ring) tx_info->mbuf = NULL; bintime_clear(&tx_info->timestamp); - /* Map is no longer required */ - if (tx_info->head_mapped == true) { - bus_dmamap_sync(adapter->tx_buf_tag, tx_info->map_head, - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(adapter->tx_buf_tag, - tx_info->map_head); - tx_info->head_mapped = false; - } - if (tx_info->seg_mapped == true) { - bus_dmamap_sync(adapter->tx_buf_tag, tx_info->map_seg, - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(adapter->tx_buf_tag, - tx_info->map_seg); - tx_info->seg_mapped = false; - } + bus_dmamap_sync(adapter->tx_buf_tag, tx_info->dmamap, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(adapter->tx_buf_tag, + tx_info->dmamap); ena_trace(ENA_DBG | ENA_TXPTH, "tx: q %d mbuf %p completed\n", tx_ring->qid, mbuf); @@ -814,22 +802,6 @@ ena_check_and_collapse_mbuf(struct ena_ring *tx_ring, return (0); } -static void -ena_dmamap_llq(void *arg, bus_dma_segment_t *segs, int nseg, int error) -{ - struct ena_com_buf *ena_buf = arg; - - if (unlikely(error != 0)) { - ena_buf->paddr = 0; - return; - } - - KASSERT(nseg == 1, ("Invalid num of segments for LLQ dma")); - - ena_buf->paddr = segs->ds_addr; - ena_buf->len = segs->ds_len; -} - static int ena_tx_map_mbuf(struct ena_ring *tx_ring, struct ena_tx_buffer *tx_info, struct mbuf *mbuf, void **push_hdr, u16 *header_len) @@ -837,15 +809,29 @@ ena_tx_map_mbuf(struct ena_ring *tx_ring, struct ena_t struct ena_adapter *adapter = tx_ring->adapter; struct ena_com_buf *ena_buf; bus_dma_segment_t segs[ENA_BUS_DMA_SEGS]; + size_t iseg = 0; uint32_t mbuf_head_len, frag_len; uint16_t push_len = 0; uint16_t delta = 0; - int i, rc, nsegs; + int rc, nsegs; mbuf_head_len = mbuf->m_len; tx_info->mbuf = mbuf; ena_buf = tx_info->bufs; + /* + * For easier maintaining of the DMA map, map the whole mbuf even if + * the LLQ is used. The descriptors will be filled using the segments. + */ + rc = bus_dmamap_load_mbuf_sg(adapter->tx_buf_tag, tx_info->dmamap, mbuf, + segs, &nsegs, BUS_DMA_NOWAIT); + if (unlikely((rc != 0) || (nsegs == 0))) { + ena_trace(ENA_WARNING, + "dmamap load failed! err: %d nsegs: %d\n", rc, nsegs); + goto dma_error; + } + + if (tx_ring->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV) { /* * When the device is LLQ mode, the driver will copy @@ -885,19 +871,16 @@ ena_tx_map_mbuf(struct ena_ring *tx_ring, struct ena_t * in the first mbuf of the mbuf chain. */ if (mbuf_head_len > push_len) { - rc = bus_dmamap_load(adapter->tx_buf_tag, - tx_info->map_head, - mbuf->m_data + push_len, mbuf_head_len - push_len, - ena_dmamap_llq, ena_buf, BUS_DMA_NOWAIT); - if (unlikely((rc != 0) || (ena_buf->paddr == 0))) - goto single_dma_error; - + ena_buf->paddr = segs[iseg].ds_addr + push_len; + ena_buf->len = segs[iseg].ds_len - push_len; ena_buf++; tx_info->num_of_bufs++; - - tx_info->head_mapped = true; } - mbuf = mbuf->m_next; + /* + * Advance the seg index as either the 1st mbuf was mapped or is + * a part of push_hdr. + */ + iseg++; } else { *push_hdr = NULL; /* @@ -918,7 +901,7 @@ ena_tx_map_mbuf(struct ena_ring *tx_ring, struct ena_t * If LLQ is not supported, the loop will be skipped. */ while (delta > 0) { - frag_len = mbuf->m_len; + frag_len = segs[iseg].ds_len; /* * If whole segment contains header just move to the @@ -931,50 +914,32 @@ ena_tx_map_mbuf(struct ena_ring *tx_ring, struct ena_t * Map rest of the packet data that was contained in * the mbuf. */ - rc = bus_dmamap_load(adapter->tx_buf_tag, - tx_info->map_head, mbuf->m_data + delta, - frag_len - delta, ena_dmamap_llq, ena_buf, - BUS_DMA_NOWAIT); - if (unlikely((rc != 0) || (ena_buf->paddr == 0))) - goto single_dma_error; - + ena_buf->paddr = segs[iseg].ds_addr + delta; + ena_buf->len = frag_len - delta; ena_buf++; tx_info->num_of_bufs++; - tx_info->head_mapped = true; delta = 0; } - - mbuf = mbuf->m_next; + iseg++; } if (mbuf == NULL) { return (0); } - /* Map rest of the mbufs */ - rc = bus_dmamap_load_mbuf_sg(adapter->tx_buf_tag, tx_info->map_seg, mbuf, - segs, &nsegs, BUS_DMA_NOWAIT); - if (unlikely((rc != 0) || (nsegs == 0))) { - ena_trace(ENA_WARNING, - "dmamap load failed! err: %d nsegs: %d\n", rc, nsegs); - goto dma_error; - } - - for (i = 0; i < nsegs; i++) { - ena_buf->len = segs[i].ds_len; - ena_buf->paddr = segs[i].ds_addr; + /* Map rest of the mbuf */ + while (iseg < nsegs) { + ena_buf->paddr = segs[iseg].ds_addr; + ena_buf->len = segs[iseg].ds_len; ena_buf++; + iseg++; + tx_info->num_of_bufs++; } - tx_info->num_of_bufs += nsegs; - tx_info->seg_mapped = true; return (0); dma_error: - if (tx_info->head_mapped == true) - bus_dmamap_unload(adapter->tx_buf_tag, tx_info->map_head); -single_dma_error: counter_u64_add(tx_ring->tx_stats.dma_mapping_err, 1); tx_info->mbuf = NULL; return (rc); @@ -1100,25 +1065,14 @@ ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf ** } } - if (tx_info->head_mapped == true) - bus_dmamap_sync(adapter->tx_buf_tag, tx_info->map_head, - BUS_DMASYNC_PREWRITE); - if (tx_info->seg_mapped == true) - bus_dmamap_sync(adapter->tx_buf_tag, tx_info->map_seg, - BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(adapter->tx_buf_tag, tx_info->dmamap, + BUS_DMASYNC_PREWRITE); return (0); dma_error: tx_info->mbuf = NULL; - if (tx_info->seg_mapped == true) { - bus_dmamap_unload(adapter->tx_buf_tag, tx_info->map_seg); - tx_info->seg_mapped = false; - } - if (tx_info->head_mapped == true) { - bus_dmamap_unload(adapter->tx_buf_tag, tx_info->map_head); - tx_info->head_mapped = false; - } + bus_dmamap_unload(adapter->tx_buf_tag, tx_info->dmamap); return (rc); } From owner-svn-src-head@freebsd.org Mon Feb 24 16:25:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D52D23A0D7; Mon, 24 Feb 2020 16:25:12 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48R6qD2lTSz4QMd; Mon, 24 Feb 2020 16:25:12 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B0EA27F91; Mon, 24 Feb 2020 16:25:12 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01OGPBqR025188; Mon, 24 Feb 2020 16:25:11 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OGPBI8025187; Mon, 24 Feb 2020 16:25:11 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <202002241625.01OGPBI8025187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Mon, 24 Feb 2020 16:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358290 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 358290 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 16:25:12 -0000 Author: cognet Date: Mon Feb 24 16:25:11 2020 New Revision: 358290 URL: https://svnweb.freebsd.org/changeset/base/358290 Log: debug_monitor: Avoid setting the PSR_D flag for 32bits binaries. In dbg_monitor_exit(), avoid setting the PSR_D bit if the process is a 32bits binary. PSR_D is an aarch64-only flags, and for aarch32 processes, it means "run in big endian". This should make COMPAT_FREEBSD32 run much better on arm64. Modified: head/sys/arm64/arm64/debug_monitor.c Modified: head/sys/arm64/arm64/debug_monitor.c ============================================================================== --- head/sys/arm64/arm64/debug_monitor.c Mon Feb 24 15:35:31 2020 (r358289) +++ head/sys/arm64/arm64/debug_monitor.c Mon Feb 24 16:25:11 2020 (r358290) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -534,7 +535,13 @@ dbg_monitor_exit(struct thread *thread, struct trapfra { int i; - frame->tf_spsr |= PSR_D; + /* + * PSR_D is an aarch64-only flag. On aarch32, it switches + * the processor to big-endian, so avoid setting it for + * 32bits binaries. + */ + if (!(SV_PROC_FLAG(thread->td_proc, SV_ILP32))) + frame->tf_spsr |= PSR_D; if ((thread->td_pcb->pcb_dbg_regs.dbg_flags & DBGMON_ENABLED) != 0) { /* Install the kernel version of the registers */ dbg_register_sync(&thread->td_pcb->pcb_dbg_regs); From owner-svn-src-head@freebsd.org Mon Feb 24 16:41:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3DB2E23A681; Mon, 24 Feb 2020 16:41:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48R79n0DyZz4488; Mon, 24 Feb 2020 16:41:17 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F1729319; Mon, 24 Feb 2020 16:41: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 01OGfGrW032849; Mon, 24 Feb 2020 16:41:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OGfGKt032848; Mon, 24 Feb 2020 16:41:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002241641.01OGfGKt032848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 24 Feb 2020 16:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358291 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 358291 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 16:41:17 -0000 Author: imp Date: Mon Feb 24 16:41:16 2020 New Revision: 358291 URL: https://svnweb.freebsd.org/changeset/base/358291 Log: Create ../compile Give up the battle to keep extra files in $MACHINE/compile to keep the file in the tree. Instead, create CDIR (usually ../compile) if it doesn't exist when we're using a default build location (eg, not using -d). If it does, we do nothing. This only affects people that do old-school builds, but it's bit me a dozen times since last summer so time to fix the bug. Modified: head/usr.sbin/config/main.c Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Mon Feb 24 16:25:11 2020 (r358290) +++ head/usr.sbin/config/main.c Mon Feb 24 16:41:16 2020 (r358291) @@ -116,6 +116,7 @@ main(int argc, char **argv) char *kernfile; struct includepath* ipath; int printmachine; + bool cust_dest = false; printmachine = 0; kernfile = NULL; @@ -140,6 +141,7 @@ main(int argc, char **argv) strlcpy(destdir, optarg, sizeof(destdir)); else errx(EXIT_FAILURE, "directory already set"); + cust_dest = true; break; case 'g': debugging++; @@ -232,7 +234,14 @@ main(int argc, char **argv) exit(0); } - /* Make compile directory */ + /* + * Make CDIR directory, if doing a default destination. Some version + * control systems delete empty directories and this seemlessly copes. + */ + if (!cust_dest && stat(CDIR, &buf)) + if (mkdir(CDIR, 0777)) + err(2, "%s", CDIR); + /* Create the compile directory */ p = path((char *)NULL); if (stat(p, &buf)) { if (mkdir(p, 0777)) From owner-svn-src-head@freebsd.org Mon Feb 24 16:41:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C2A0323A6EA; Mon, 24 Feb 2020 16:41:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48R7B14GqLz44XQ; Mon, 24 Feb 2020 16:41:29 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E061334; Mon, 24 Feb 2020 16:41:29 +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 01OGfThU033728; Mon, 24 Feb 2020 16:41:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OGfT5Q033727; Mon, 24 Feb 2020 16:41:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002241641.01OGfT5Q033727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 24 Feb 2020 16:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358292 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 358292 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 16:41:29 -0000 Author: imp Date: Mon Feb 24 16:41:29 2020 New Revision: 358292 URL: https://svnweb.freebsd.org/changeset/base/358292 Log: Only compile clear_fpu state code when we're building with options FPE. Soft float kernels build without floating point, and will fail to build if we try to include floating point code. Obtained from: kp@ Modified: head/sys/riscv/riscv/swtch.S Modified: head/sys/riscv/riscv/swtch.S ============================================================================== --- head/sys/riscv/riscv/swtch.S Mon Feb 24 16:41:16 2020 (r358291) +++ head/sys/riscv/riscv/swtch.S Mon Feb 24 16:41:29 2020 (r358292) @@ -151,7 +151,6 @@ ENTRY(fpe_state_save) __fpe_state_save a0 ret END(fpe_state_save) -#endif /* FPE */ /* * void @@ -205,6 +204,7 @@ ENTRY(fpe_state_clear) ret END(fpe_state_clear) +#endif /* FPE */ /* * void cpu_throw(struct thread *old __unused, struct thread *new) From owner-svn-src-head@freebsd.org Mon Feb 24 16:42:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFB8523A976; Mon, 24 Feb 2020 16:42:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48R7CT55gNz474r; Mon, 24 Feb 2020 16:42:45 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BD23398; Mon, 24 Feb 2020 16:42:45 +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 01OGgjpq036777; Mon, 24 Feb 2020 16:42:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OGgjMw036774; Mon, 24 Feb 2020 16:42:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002241642.01OGgjMw036774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 24 Feb 2020 16:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358293 - in head/sys: conf riscv/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: conf riscv/conf X-SVN-Commit-Revision: 358293 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 16:42:45 -0000 Author: imp Date: Mon Feb 24 16:42:44 2020 New Revision: 358293 URL: https://svnweb.freebsd.org/changeset/base/358293 Log: Add a soft-float riscv kernel config GENERICSF is just like GENERIC, only creates a soft-float kernel. Omit it from the universe build for now. Reviewed by: philip Differential Revision: https://reviews.freebsd.org/D23812 Added: head/sys/riscv/conf/GENERICSF (contents, props changed) Modified: head/sys/conf/Makefile.riscv head/sys/conf/kern.mk Modified: head/sys/conf/Makefile.riscv ============================================================================== --- head/sys/conf/Makefile.riscv Mon Feb 24 16:41:29 2020 (r358292) +++ head/sys/conf/Makefile.riscv Mon Feb 24 16:42:44 2020 (r358293) @@ -19,7 +19,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 600017 .if !defined(S) S= ../../.. Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Mon Feb 24 16:41:29 2020 (r358292) +++ head/sys/conf/kern.mk Mon Feb 24 16:42:44 2020 (r358293) @@ -306,4 +306,5 @@ LD_EMULATION_powerpc= elf32ppc_fbsd LD_EMULATION_powerpcspe= elf32ppc_fbsd LD_EMULATION_powerpc64= elf64ppc_fbsd LD_EMULATION_riscv64= elf64lriscv +LD_EMULATION_riscv64sf= elf64lriscv LD_EMULATION=${LD_EMULATION_${MACHINE_ARCH}} Added: head/sys/riscv/conf/GENERICSF ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/riscv/conf/GENERICSF Mon Feb 24 16:42:44 2020 (r358293) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +# Just like generic, but with a riscv64sf MACHINE_ARCH. Override machine set in +# DEFAULTS. +machine riscv riscv64sf + +include "GENERIC" +ident GENERICSF +nooptions FPE # for systems without FPE From owner-svn-src-head@freebsd.org Mon Feb 24 16:45:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC62123AA14; Mon, 24 Feb 2020 16:45:32 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48R7Gh5lNmz4DBK; Mon, 24 Feb 2020 16:45: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C07843A3; Mon, 24 Feb 2020 16:45: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 01OGjW0I037003; Mon, 24 Feb 2020 16:45:32 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OGjWse036997; Mon, 24 Feb 2020 16:45:32 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202002241645.01OGjWse036997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 24 Feb 2020 16:45:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358294 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 358294 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 16:45:32 -0000 Author: andrew Date: Mon Feb 24 16:45:31 2020 New Revision: 358294 URL: https://svnweb.freebsd.org/changeset/base/358294 Log: Split out the stage 1 pte bits and add the stage 2 bits In preperation for adding bhyve support to arm64 we need to split the stage 1 and stage 2 pte fields to allow future changes to create stage 2 page tables. MFC after: 1 month Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D23669 Modified: head/sys/arm64/arm64/efirt_machdep.c head/sys/arm64/arm64/locore.S head/sys/arm64/arm64/pmap.c head/sys/arm64/include/pte.h Modified: head/sys/arm64/arm64/efirt_machdep.c ============================================================================== --- head/sys/arm64/arm64/efirt_machdep.c Mon Feb 24 16:42:44 2020 (r358293) +++ head/sys/arm64/arm64/efirt_machdep.c Mon Feb 24 16:45:31 2020 (r358294) @@ -215,10 +215,10 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int printf("MAP %lx mode %x pages %lu\n", p->md_phys, mode, p->md_pages); - l3_attr = ATTR_DEFAULT | ATTR_IDX(mode) | ATTR_AP(ATTR_AP_RW) | - ATTR_nG | L3_PAGE; + l3_attr = ATTR_DEFAULT | ATTR_S1_IDX(mode) | + ATTR_S1_AP(ATTR_S1_AP_RW) | ATTR_S1_nG | L3_PAGE; if (mode == VM_MEMATTR_DEVICE || p->md_attr & EFI_MD_ATTR_XP) - l3_attr |= ATTR_UXN | ATTR_PXN; + l3_attr |= ATTR_S1_XN; VM_OBJECT_WLOCK(obj_1t1_pt); for (va = p->md_phys, idx = 0; idx < p->md_pages; idx++, Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Mon Feb 24 16:42:44 2020 (r358293) +++ head/sys/arm64/arm64/locore.S Mon Feb 24 16:45:31 2020 (r358294) @@ -461,7 +461,7 @@ common: bl link_l0_pagetable /* - * Build the TTBR0 maps. As TTBR0 maps, they must specify ATTR_nG. + * Build the TTBR0 maps. As TTBR0 maps, they must specify ATTR_S1_nG. * They are only needed early on, so the VA = PA map is uncached. */ add x27, x24, #PAGE_SIZE @@ -469,7 +469,7 @@ common: mov x6, x27 /* The initial page table */ #if defined(SOCDEV_PA) && defined(SOCDEV_VA) /* Create a table for the UART */ - mov x7, #(ATTR_nG | ATTR_IDX(VM_MEMATTR_DEVICE)) + mov x7, #(ATTR_S1_nG | ATTR_S1_IDX(VM_MEMATTR_DEVICE)) mov x8, #(SOCDEV_VA) /* VA start */ mov x9, #(SOCDEV_PA) /* PA start */ mov x10, #1 @@ -481,7 +481,7 @@ common: cbz x19, 1f /* Create the identity mapping for FDT data (2 MiB max) */ - mov x7, #(ATTR_nG | ATTR_IDX(VM_MEMATTR_UNCACHEABLE)) + mov x7, #(ATTR_S1_nG | ATTR_S1_IDX(VM_MEMATTR_UNCACHEABLE)) mov x9, x0 mov x8, x0 /* VA start (== PA start) */ mov x10, #1 @@ -491,7 +491,7 @@ common: #endif /* Create the VA = PA map */ - mov x7, #(ATTR_nG | ATTR_IDX(VM_MEMATTR_UNCACHEABLE)) + mov x7, #(ATTR_S1_nG | ATTR_S1_IDX(VM_MEMATTR_UNCACHEABLE)) mov x9, x27 mov x8, x9 /* VA start (== PA start) */ mov x10, #1 @@ -639,7 +639,7 @@ build_l2_block_pagetable: lsl x12, x7, #2 orr x12, x12, #L2_BLOCK orr x12, x12, #(ATTR_AF) - orr x12, x12, #(ATTR_UXN) + orr x12, x12, #(ATTR_S1_UXN) #ifdef SMP orr x12, x12, ATTR_SH(ATTR_SH_IS) #endif Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Mon Feb 24 16:42:44 2020 (r358293) +++ head/sys/arm64/arm64/pmap.c Mon Feb 24 16:45:31 2020 (r358294) @@ -213,8 +213,8 @@ __FBSDID("$FreeBSD$"); /* * The presence of this flag indicates that the mapping is writeable. - * If the ATTR_AP_RO bit is also set, then the mapping is clean, otherwise it is - * dirty. This flag may only be set on managed mappings. + * If the ATTR_S1_AP_RO bit is also set, then the mapping is clean, otherwise + * it is dirty. This flag may only be set on managed mappings. * * The DBM bit is reserved on ARMv8.0 but it seems we can safely treat it * as a software managed bit. @@ -590,11 +590,11 @@ pmap_pte_dirty(pt_entry_t pte) { KASSERT((pte & ATTR_SW_MANAGED) != 0, ("pte %#lx is unmanaged", pte)); - KASSERT((pte & (ATTR_AP_RW_BIT | ATTR_SW_DBM)) != 0, + KASSERT((pte & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) != 0, ("pte %#lx is writeable and missing ATTR_SW_DBM", pte)); - return ((pte & (ATTR_AP_RW_BIT | ATTR_SW_DBM)) == - (ATTR_AP(ATTR_AP_RW) | ATTR_SW_DBM)); + return ((pte & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) == + (ATTR_S1_AP(ATTR_S1_AP_RW) | ATTR_SW_DBM)); } static __inline void @@ -699,8 +699,10 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t mi l2_slot = pmap_l2_index(va); KASSERT(l2_slot != 0, ("...")); pmap_store(&l2[l2_slot], - (pa & ~L2_OFFSET) | ATTR_DEFAULT | ATTR_XN | - ATTR_IDX(VM_MEMATTR_WRITE_BACK) | L2_BLOCK); + (pa & ~L2_OFFSET) | ATTR_DEFAULT | + ATTR_S1_XN | + ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK) | + L2_BLOCK); } KASSERT(va == (pa - dmap_phys_base + DMAP_MIN_ADDRESS), ("...")); @@ -711,8 +713,8 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t mi pa += L1_SIZE, va += L1_SIZE) { l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); pmap_store(&pagetable_dmap[l1_slot], - (pa & ~L1_OFFSET) | ATTR_DEFAULT | ATTR_XN | - ATTR_IDX(VM_MEMATTR_WRITE_BACK) | L1_BLOCK); + (pa & ~L1_OFFSET) | ATTR_DEFAULT | ATTR_S1_XN | + ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK) | L1_BLOCK); } /* Create L2 mappings at the end of the region */ @@ -736,8 +738,10 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t mi pa += L2_SIZE, va += L2_SIZE) { l2_slot = pmap_l2_index(va); pmap_store(&l2[l2_slot], - (pa & ~L2_OFFSET) | ATTR_DEFAULT | ATTR_XN | - ATTR_IDX(VM_MEMATTR_WRITE_BACK) | L2_BLOCK); + (pa & ~L2_OFFSET) | ATTR_DEFAULT | + ATTR_S1_XN | + ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK) | + L2_BLOCK); } } @@ -801,7 +805,7 @@ pmap_bootstrap_l3(vm_offset_t l1pt, vm_offset_t va, vm pa = pmap_early_vtophys(l1pt, l3pt); pmap_store(&l2[l2_slot], - (pa & ~Ln_TABLE_MASK) | ATTR_UXN | L2_TABLE); + (pa & ~Ln_TABLE_MASK) | ATTR_S1_UXN | L2_TABLE); l3pt += PAGE_SIZE; } @@ -1162,7 +1166,7 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_ (lvl < 3 && (tpte & ATTR_DESCR_MASK) == L1_BLOCK), ("pmap_extract_and_hold: Invalid pte at L%d: %lx", lvl, tpte & ATTR_DESCR_MASK)); - if (((tpte & ATTR_AP_RW_BIT) == ATTR_AP(ATTR_AP_RW)) || + if (((tpte & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP(ATTR_S1_AP_RW)) || ((prot & VM_PROT_WRITE) == 0)) { switch(lvl) { case 1: @@ -1238,8 +1242,8 @@ pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_ KASSERT((size & PAGE_MASK) == 0, ("pmap_kenter: Mapping is not page-sized")); - attr = ATTR_DEFAULT | ATTR_AP(ATTR_AP_RW) | ATTR_XN | ATTR_IDX(mode) | - L3_PAGE; + attr = ATTR_DEFAULT | ATTR_S1_AP(ATTR_S1_AP_RW) | ATTR_S1_XN | + ATTR_S1_IDX(mode) | L3_PAGE; va = sva; while (size != 0) { pde = pmap_pde(kernel_pmap, va, &lvl); @@ -1353,8 +1357,9 @@ pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count) ("pmap_qenter: Invalid level %d", lvl)); m = ma[i]; - pa = VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | ATTR_AP(ATTR_AP_RW) | - ATTR_XN | ATTR_IDX(m->md.pv_memattr) | L3_PAGE; + pa = VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | + ATTR_S1_AP(ATTR_S1_AP_RW) | ATTR_S1_XN | + ATTR_S1_IDX(m->md.pv_memattr) | L3_PAGE; pte = pmap_l2_to_l3(pde, va); pmap_load_store(pte, pa); @@ -2952,7 +2957,8 @@ retry: * pages. */ if ((old_l2 & ATTR_SW_MANAGED) != 0 && - (nbits & ATTR_AP(ATTR_AP_RO)) != 0 && pmap_pte_dirty(old_l2)) { + (nbits & ATTR_S1_AP(ATTR_S1_AP_RO)) != 0 && + pmap_pte_dirty(old_l2)) { m = PHYS_TO_VM_PAGE(old_l2 & ~ATTR_MASK); for (mt = m; mt < &m[L2_SIZE / PAGE_SIZE]; mt++) vm_page_dirty(mt); @@ -2987,12 +2993,12 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t mask = nbits = 0; if ((prot & VM_PROT_WRITE) == 0) { - mask |= ATTR_AP_RW_BIT | ATTR_SW_DBM; - nbits |= ATTR_AP(ATTR_AP_RO); + mask |= ATTR_S1_AP_RW_BIT | ATTR_SW_DBM; + nbits |= ATTR_S1_AP(ATTR_S1_AP_RO); } if ((prot & VM_PROT_EXECUTE) == 0) { - mask |= ATTR_XN; - nbits |= ATTR_XN; + mask |= ATTR_S1_XN; + nbits |= ATTR_S1_XN; } if (mask == 0) return; @@ -3063,7 +3069,7 @@ retry: * update the page's dirty field. */ if ((l3 & ATTR_SW_MANAGED) != 0 && - (nbits & ATTR_AP(ATTR_AP_RO)) != 0 && + (nbits & ATTR_S1_AP(ATTR_S1_AP_RO)) != 0 && pmap_pte_dirty(l3)) vm_page_dirty(PHYS_TO_VM_PAGE(l3 & ~ATTR_MASK)); @@ -3215,8 +3221,8 @@ setl2: return; } - if ((newl2 & (ATTR_AP_RW_BIT | ATTR_SW_DBM)) == - (ATTR_AP(ATTR_AP_RO) | ATTR_SW_DBM)) { + if ((newl2 & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) == + (ATTR_S1_AP(ATTR_S1_AP_RO) | ATTR_SW_DBM)) { if (!atomic_fcmpset_64(l2, &newl2, newl2 & ~ATTR_SW_DBM)) goto setl2; newl2 &= ~ATTR_SW_DBM; @@ -3226,8 +3232,8 @@ setl2: for (l3 = firstl3 + NL3PG - 1; l3 > firstl3; l3--) { oldl3 = pmap_load(l3); setl3: - if ((oldl3 & (ATTR_AP_RW_BIT | ATTR_SW_DBM)) == - (ATTR_AP(ATTR_AP_RO) | ATTR_SW_DBM)) { + if ((oldl3 & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) == + (ATTR_S1_AP(ATTR_S1_AP_RO) | ATTR_SW_DBM)) { if (!atomic_fcmpset_64(l3, &oldl3, oldl3 & ~ATTR_SW_DBM)) goto setl3; @@ -3305,27 +3311,27 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v if ((m->oflags & VPO_UNMANAGED) == 0) VM_PAGE_OBJECT_BUSY_ASSERT(m); pa = VM_PAGE_TO_PHYS(m); - new_l3 = (pt_entry_t)(pa | ATTR_DEFAULT | ATTR_IDX(m->md.pv_memattr) | + new_l3 = (pt_entry_t)(pa | ATTR_DEFAULT | ATTR_S1_IDX(m->md.pv_memattr) | L3_PAGE); if ((prot & VM_PROT_WRITE) == 0) - new_l3 |= ATTR_AP(ATTR_AP_RO); + new_l3 |= ATTR_S1_AP(ATTR_S1_AP_RO); if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == VM_MEMATTR_DEVICE) - new_l3 |= ATTR_XN; + new_l3 |= ATTR_S1_XN; if ((flags & PMAP_ENTER_WIRED) != 0) new_l3 |= ATTR_SW_WIRED; if (va < VM_MAXUSER_ADDRESS) - new_l3 |= ATTR_AP(ATTR_AP_USER) | ATTR_PXN; + new_l3 |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN; else - new_l3 |= ATTR_UXN; + new_l3 |= ATTR_S1_UXN; if (pmap != kernel_pmap) - new_l3 |= ATTR_nG; + new_l3 |= ATTR_S1_nG; if ((m->oflags & VPO_UNMANAGED) == 0) { new_l3 |= ATTR_SW_MANAGED; if ((prot & VM_PROT_WRITE) != 0) { new_l3 |= ATTR_SW_DBM; if ((flags & VM_PROT_WRITE) == 0) - new_l3 |= ATTR_AP(ATTR_AP_RO); + new_l3 |= ATTR_S1_AP(ATTR_S1_AP_RO); } } @@ -3507,7 +3513,7 @@ validate: */ if ((prot & VM_PROT_EXECUTE) && pmap != kernel_pmap && m->md.pv_memattr == VM_MEMATTR_WRITE_BACK && - (opa != pa || (orig_l3 & ATTR_XN))) + (opa != pa || (orig_l3 & ATTR_S1_XN))) cpu_icache_sync_range(PHYS_TO_DMAP(pa), PAGE_SIZE); /* @@ -3577,20 +3583,21 @@ pmap_enter_2mpage(pmap_t pmap, vm_offset_t va, vm_page PMAP_LOCK_ASSERT(pmap, MA_OWNED); new_l2 = (pd_entry_t)(VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | - ATTR_IDX(m->md.pv_memattr) | ATTR_AP(ATTR_AP_RO) | L2_BLOCK); + ATTR_S1_IDX(m->md.pv_memattr) | ATTR_S1_AP(ATTR_S1_AP_RO) | + L2_BLOCK); if ((m->oflags & VPO_UNMANAGED) == 0) { new_l2 |= ATTR_SW_MANAGED; new_l2 &= ~ATTR_AF; } if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == VM_MEMATTR_DEVICE) - new_l2 |= ATTR_XN; + new_l2 |= ATTR_S1_XN; if (va < VM_MAXUSER_ADDRESS) - new_l2 |= ATTR_AP(ATTR_AP_USER) | ATTR_PXN; + new_l2 |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN; else - new_l2 |= ATTR_UXN; + new_l2 |= ATTR_S1_UXN; if (pmap != kernel_pmap) - new_l2 |= ATTR_nG; + new_l2 |= ATTR_S1_nG; return (pmap_enter_l2(pmap, va, new_l2, PMAP_ENTER_NOSLEEP | PMAP_ENTER_NOREPLACE | PMAP_ENTER_NORECLAIM, NULL, lockp) == KERN_SUCCESS); @@ -3887,17 +3894,17 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v pmap_resident_count_inc(pmap, 1); pa = VM_PAGE_TO_PHYS(m); - l3_val = pa | ATTR_DEFAULT | ATTR_IDX(m->md.pv_memattr) | - ATTR_AP(ATTR_AP_RO) | L3_PAGE; + l3_val = pa | ATTR_DEFAULT | ATTR_S1_IDX(m->md.pv_memattr) | + ATTR_S1_AP(ATTR_S1_AP_RO) | L3_PAGE; if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == VM_MEMATTR_DEVICE) - l3_val |= ATTR_XN; + l3_val |= ATTR_S1_XN; if (va < VM_MAXUSER_ADDRESS) - l3_val |= ATTR_AP(ATTR_AP_USER) | ATTR_PXN; + l3_val |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN; else - l3_val |= ATTR_UXN; + l3_val |= ATTR_S1_UXN; if (pmap != kernel_pmap) - l3_val |= ATTR_nG; + l3_val |= ATTR_S1_nG; /* * Now validate mapping with RO protection @@ -4084,7 +4091,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ mask = ATTR_AF | ATTR_SW_WIRED; nbits = 0; if ((srcptepaddr & ATTR_SW_DBM) != 0) - nbits |= ATTR_AP_RW_BIT; + nbits |= ATTR_S1_AP_RW_BIT; pmap_store(l2, (srcptepaddr & ~mask) | nbits); pmap_resident_count_inc(dst_pmap, L2_SIZE / PAGE_SIZE); @@ -4133,7 +4140,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ mask = ATTR_AF | ATTR_SW_WIRED; nbits = 0; if ((ptetemp & ATTR_SW_DBM) != 0) - nbits |= ATTR_AP_RW_BIT; + nbits |= ATTR_S1_AP_RW_BIT; pmap_store(dst_pte, (ptetemp & ~mask) | nbits); pmap_resident_count_inc(dst_pmap, 1); } else { @@ -4607,8 +4614,8 @@ restart: mask = 0; value = 0; if (modified) { - mask |= ATTR_AP_RW_BIT; - value |= ATTR_AP(ATTR_AP_RW); + mask |= ATTR_S1_AP_RW_BIT; + value |= ATTR_S1_AP(ATTR_S1_AP_RW); } if (accessed) { mask |= ATTR_AF | ATTR_DESCR_MASK; @@ -4641,8 +4648,8 @@ restart: mask = 0; value = 0; if (modified) { - mask |= ATTR_AP_RW_BIT; - value |= ATTR_AP(ATTR_AP_RW); + mask |= ATTR_S1_AP_RW_BIT; + value |= ATTR_S1_AP(ATTR_S1_AP_RW); } if (accessed) { mask |= ATTR_AF | ATTR_DESCR_MASK; @@ -4785,10 +4792,10 @@ retry_pv_loop: retry: if ((oldpte & ATTR_SW_DBM) != 0) { if (!atomic_fcmpset_long(pte, &oldpte, - (oldpte | ATTR_AP_RW_BIT) & ~ATTR_SW_DBM)) + (oldpte | ATTR_S1_AP_RW_BIT) & ~ATTR_SW_DBM)) goto retry; - if ((oldpte & ATTR_AP_RW_BIT) == - ATTR_AP(ATTR_AP_RW)) + if ((oldpte & ATTR_S1_AP_RW_BIT) == + ATTR_S1_AP(ATTR_S1_AP_RW)) vm_page_dirty(m); pmap_invalidate_page(pmap, pv->pv_va); } @@ -5066,7 +5073,8 @@ pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t vm_page_dirty(m); } while (!atomic_fcmpset_long(l3, &oldl3, - (oldl3 & ~ATTR_AF) | ATTR_AP(ATTR_AP_RO))) + (oldl3 & ~ATTR_AF) | + ATTR_S1_AP(ATTR_S1_AP_RO))) cpu_spinwait(); } else if ((oldl3 & ATTR_AF) != 0) pmap_clear_bits(l3, ATTR_AF); @@ -5140,7 +5148,7 @@ restart: l3 = pmap_l2_to_l3(l2, va); oldl3 = pmap_load(l3); while (!atomic_fcmpset_long(l3, &oldl3, - (oldl3 & ~ATTR_SW_DBM) | ATTR_AP(ATTR_AP_RO))) + (oldl3 & ~ATTR_SW_DBM) | ATTR_S1_AP(ATTR_S1_AP_RO))) cpu_spinwait(); vm_page_dirty(m); pmap_invalidate_page(pmap, va); @@ -5164,8 +5172,8 @@ restart: l3 = pmap_l2_to_l3(l2, pv->pv_va); oldl3 = pmap_load(l3); if (pmap_l3_valid(oldl3) && - (oldl3 & (ATTR_AP_RW_BIT | ATTR_SW_DBM)) == ATTR_SW_DBM) { - pmap_set_bits(l3, ATTR_AP(ATTR_AP_RO)); + (oldl3 & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) == ATTR_SW_DBM){ + pmap_set_bits(l3, ATTR_S1_AP(ATTR_S1_AP_RO)); pmap_invalidate_page(pmap, pv->pv_va); } PMAP_UNLOCK(pmap); @@ -5249,8 +5257,8 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t size) /* Insert L2_BLOCK */ l2 = pmap_l1_to_l2(pde, va); pmap_load_store(l2, - pa | ATTR_DEFAULT | ATTR_XN | - ATTR_IDX(VM_MEMATTR_WRITE_BACK) | L2_BLOCK); + pa | ATTR_DEFAULT | ATTR_S1_XN | + ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK) | L2_BLOCK); va += L2_SIZE; pa += L2_SIZE; @@ -5417,7 +5425,7 @@ pmap_change_attr_locked(vm_offset_t va, vm_size_t size if (pte == NULL) return (EINVAL); - if ((pmap_load(pte) & ATTR_IDX_MASK) == ATTR_IDX(mode)) { + if ((pmap_load(pte) & ATTR_S1_IDX_MASK) == ATTR_S1_IDX(mode)) { /* * We already have the correct attribute, * ignore this entry. @@ -5458,10 +5466,10 @@ pmap_change_attr_locked(vm_offset_t va, vm_size_t size case 3: /* Update the entry */ l3 = pmap_load(pte); - l3 &= ~ATTR_IDX_MASK; - l3 |= ATTR_IDX(mode); + l3 &= ~ATTR_S1_IDX_MASK; + l3 |= ATTR_S1_IDX(mode); if (mode == VM_MEMATTR_DEVICE) - l3 |= ATTR_XN; + l3 |= ATTR_S1_XN; pmap_update_entry(kernel_pmap, pte, l3, tmpva, PAGE_SIZE); @@ -5659,8 +5667,8 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_ l3phys = VM_PAGE_TO_PHYS(ml3); l3 = (pt_entry_t *)PHYS_TO_DMAP(l3phys); newl3 = (oldl2 & ~ATTR_DESCR_MASK) | L3_PAGE; - KASSERT((oldl2 & (ATTR_AP_RW_BIT | ATTR_SW_DBM)) != - (ATTR_AP(ATTR_AP_RO) | ATTR_SW_DBM), + KASSERT((oldl2 & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) != + (ATTR_S1_AP(ATTR_S1_AP_RO) | ATTR_SW_DBM), ("pmap_demote_l2: L2 entry is writeable but not dirty")); /* @@ -5771,7 +5779,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t if (lvl != 3) val |= MINCORE_SUPER; if ((managed && pmap_pte_dirty(tpte)) || (!managed && - (tpte & ATTR_AP_RW_BIT) == ATTR_AP(ATTR_AP_RW))) + (tpte & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP(ATTR_S1_AP_RW))) val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER; if ((tpte & ATTR_AF) == ATTR_AF) val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER; @@ -6035,8 +6043,9 @@ pmap_fault(pmap_t pmap, uint64_t esr, uint64_t far) ptep = pmap_pte(pmap, far, &lvl); if (ptep != NULL && ((pte = pmap_load(ptep)) & ATTR_SW_DBM) != 0) { - if ((pte & ATTR_AP_RW_BIT) == ATTR_AP(ATTR_AP_RO)) { - pmap_clear_bits(ptep, ATTR_AP_RW_BIT); + if ((pte & ATTR_S1_AP_RW_BIT) == + ATTR_S1_AP(ATTR_S1_AP_RO)) { + pmap_clear_bits(ptep, ATTR_S1_AP_RW_BIT); pmap_invalidate_page(pmap, far); } rv = KERN_SUCCESS; @@ -6210,18 +6219,18 @@ sysctl_kmaps_dump(struct sbuf *sb, struct pmap_kernel_ if (eva <= range->sva) return; - index = range->attrs & ATTR_IDX_MASK; + index = range->attrs & ATTR_S1_IDX_MASK; switch (index) { - case ATTR_IDX(VM_MEMATTR_DEVICE): + case ATTR_S1_IDX(VM_MEMATTR_DEVICE): mode = "DEV"; break; - case ATTR_IDX(VM_MEMATTR_UNCACHEABLE): + case ATTR_S1_IDX(VM_MEMATTR_UNCACHEABLE): mode = "UC"; break; - case ATTR_IDX(VM_MEMATTR_WRITE_BACK): + case ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK): mode = "WB"; break; - case ATTR_IDX(VM_MEMATTR_WRITE_THROUGH): + case ATTR_S1_IDX(VM_MEMATTR_WRITE_THROUGH): mode = "WT"; break; default: @@ -6234,9 +6243,9 @@ sysctl_kmaps_dump(struct sbuf *sb, struct pmap_kernel_ sbuf_printf(sb, "0x%016lx-0x%016lx r%c%c%c %3s %d %d %d %d\n", range->sva, eva, - (range->attrs & ATTR_AP_RW_BIT) == ATTR_AP_RW ? 'w' : '-', - (range->attrs & ATTR_PXN) != 0 ? '-' : 'x', - (range->attrs & ATTR_AP_USER) != 0 ? 'u' : 's', + (range->attrs & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP_RW ? 'w' : '-', + (range->attrs & ATTR_S1_PXN) != 0 ? '-' : 'x', + (range->attrs & ATTR_S1_AP_USER) != 0 ? 'u' : 's', mode, range->l1blocks, range->l2blocks, range->l3contig, range->l3pages); @@ -6277,14 +6286,14 @@ sysctl_kmaps_check(struct sbuf *sb, struct pmap_kernel { pt_entry_t attrs; - attrs = l0e & (ATTR_AP_MASK | ATTR_XN); - attrs |= l1e & (ATTR_AP_MASK | ATTR_XN); + attrs = l0e & (ATTR_S1_AP_MASK | ATTR_S1_XN); + attrs |= l1e & (ATTR_S1_AP_MASK | ATTR_S1_XN); if ((l1e & ATTR_DESCR_MASK) == L1_BLOCK) - attrs |= l1e & ATTR_IDX_MASK; - attrs |= l2e & (ATTR_AP_MASK | ATTR_XN); + attrs |= l1e & ATTR_S1_IDX_MASK; + attrs |= l2e & (ATTR_S1_AP_MASK | ATTR_S1_XN); if ((l2e & ATTR_DESCR_MASK) == L2_BLOCK) - attrs |= l2e & ATTR_IDX_MASK; - attrs |= l3e & (ATTR_AP_MASK | ATTR_XN | ATTR_IDX_MASK); + attrs |= l2e & ATTR_S1_IDX_MASK; + attrs |= l3e & (ATTR_S1_AP_MASK | ATTR_S1_XN | ATTR_S1_IDX_MASK); if (range->sva > va || !sysctl_kmaps_match(range, attrs)) { sysctl_kmaps_dump(sb, range, va); Modified: head/sys/arm64/include/pte.h ============================================================================== --- head/sys/arm64/include/pte.h Mon Feb 24 16:42:44 2020 (r358293) +++ head/sys/arm64/include/pte.h Mon Feb 24 16:45:31 2020 (r358294) @@ -39,35 +39,50 @@ typedef uint64_t pt_entry_t; /* page table entry */ #endif /* Block and Page attributes */ -#define ATTR_MASK_H UINT64_C(0xfffc000000000000) -#define ATTR_MASK_L UINT64_C(0x0000000000000fff) -#define ATTR_MASK (ATTR_MASK_H | ATTR_MASK_L) +#define ATTR_MASK_H UINT64_C(0xfffc000000000000) +#define ATTR_MASK_L UINT64_C(0x0000000000000fff) +#define ATTR_MASK (ATTR_MASK_H | ATTR_MASK_L) /* Bits 58:55 are reserved for software */ -#define ATTR_SW_UNUSED2 (1UL << 58) -#define ATTR_SW_UNUSED1 (1UL << 57) -#define ATTR_SW_MANAGED (1UL << 56) -#define ATTR_SW_WIRED (1UL << 55) -#define ATTR_UXN (1UL << 54) -#define ATTR_PXN (1UL << 53) -#define ATTR_XN (ATTR_PXN | ATTR_UXN) -#define ATTR_CONTIGUOUS (1UL << 52) -#define ATTR_DBM (1UL << 51) -#define ATTR_nG (1 << 11) -#define ATTR_AF (1 << 10) -#define ATTR_SH(x) ((x) << 8) -#define ATTR_SH_MASK ATTR_SH(3) -#define ATTR_SH_NS 0 /* Non-shareable */ -#define ATTR_SH_OS 2 /* Outer-shareable */ -#define ATTR_SH_IS 3 /* Inner-shareable */ -#define ATTR_AP_RW_BIT (1 << 7) -#define ATTR_AP(x) ((x) << 6) -#define ATTR_AP_MASK ATTR_AP(3) -#define ATTR_AP_RW (0 << 1) -#define ATTR_AP_RO (1 << 1) -#define ATTR_AP_USER (1 << 0) -#define ATTR_NS (1 << 5) -#define ATTR_IDX(x) ((x) << 2) -#define ATTR_IDX_MASK (7 << 2) +#define ATTR_SW_UNUSED2 (1UL << 58) +#define ATTR_SW_UNUSED1 (1UL << 57) +#define ATTR_SW_MANAGED (1UL << 56) +#define ATTR_SW_WIRED (1UL << 55) + +#define ATTR_S1_UXN (1UL << 54) +#define ATTR_S1_PXN (1UL << 53) +#define ATTR_S1_XN (ATTR_S1_PXN | ATTR_S1_UXN) + +#define ATTR_S2_XN(x) ((x) << 53) +#define ATTR_S2_XN_MASK ATTR_S2_XN(3) +#define ATTR_S2_XN_NONE 0 /* Allow execution at EL0 & EL1 */ +#define ATTR_S2_XN_EL1 1 /* Allow execution at EL0 */ +#define ATTR_S2_XN_ALL 2 /* No execution */ +#define ATTR_S2_XN_EL0 3 /* Allow execution at EL1 */ + +#define ATTR_CONTIGUOUS (1UL << 52) +#define ATTR_DBM (1UL << 51) +#define ATTR_S1_nG (1 << 11) +#define ATTR_AF (1 << 10) +#define ATTR_SH(x) ((x) << 8) +#define ATTR_SH_MASK ATTR_SH(3) +#define ATTR_SH_NS 0 /* Non-shareable */ +#define ATTR_SH_OS 2 /* Outer-shareable */ +#define ATTR_SH_IS 3 /* Inner-shareable */ + +#define ATTR_S1_AP_RW_BIT (1 << 7) +#define ATTR_S1_AP(x) ((x) << 6) +#define ATTR_S1_AP_MASK ATTR_S1_AP(3) +#define ATTR_S1_AP_RW (0 << 1) +#define ATTR_S1_AP_RO (1 << 1) +#define ATTR_S1_AP_USER (1 << 0) +#define ATTR_S1_NS (1 << 5) +#define ATTR_S1_IDX(x) ((x) << 2) +#define ATTR_S1_IDX_MASK (7 << 2) + +#define ATTR_S2_S2AP(x) ((x) << 6) +#define ATTR_S1_S2AP_MASK ATTR_S2_S2AP(3) +#define ATTR_S2_MEMATTR(x) ((x) << 2) +#define ATTR_S2_MEMATTR_MASK ATTR_S2_MEMATTR(0xf) #define ATTR_DEFAULT (ATTR_AF | ATTR_SH(ATTR_SH_IS)) From owner-svn-src-head@freebsd.org Mon Feb 24 17:19:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C83CC23BC67; Mon, 24 Feb 2020 17:19:48 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48R82D49y9z42BM; Mon, 24 Feb 2020 17:19:48 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (cross.sbone.de [195.201.62.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 493D41DA06; Mon, 24 Feb 2020 17:19:48 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 1EB478D4A525; Mon, 24 Feb 2020 17:19:47 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 0BE22E707B8; Mon, 24 Feb 2020 17:19:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Pvb3nYVBVHQ5; Mon, 24 Feb 2020 17:19:45 +0000 (UTC) Received: from [169.254.231.217] (unknown [IPv6:fde9:577b:c1a9:4902:55ac:3123:f257:afdf]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 8CEC6E707B5; Mon, 24 Feb 2020 17:19:45 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Hans Petter Selasky" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358167 - head/sys/netinet6 Date: Mon, 24 Feb 2020 17:19:44 +0000 X-Mailer: MailMate (2.0BETAr6146) Message-ID: <4B399B7C-6256-4C47-A3F8-CE46B1B70C17@FreeBSD.org> In-Reply-To: <7d9ea227-7208-5773-080c-5ebc365c4be0@selasky.org> References: <202002201056.01KAuC0N029186@repo.freebsd.org> <7d9ea227-7208-5773-080c-5ebc365c4be0@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 17:19:48 -0000 On 24 Feb 2020, at 14:21, Hans Petter Selasky wrote: Hi Hans, > On 2020-02-20 11:56, Bjoern A. Zeeb wrote: > >> + >> + unfragpartlen = optlen + sizeof(struct ip6_hdr); >> + > > > Hi Bjoren, > > This change introduces a slight regression when a host replies to IPv6 > ping fragmented packets. The problem is the "unfragpartlen" must also > be set in the else case of "if (opt)", else the payload offset > computation for IPv6 fragments goes wrong by the size of the IPv6 > header! > > After r358167: > > >> ping6 -s 3000 fe80::ee0d:9aff:fed4:2c8c%mce2 >> PING6(3048=40+8+3000 bytes) fe80::ee0d:9aff:fed4:2c94%mce2 --> >> fe80::ee0d:9aff:fed4:2c8c%mce2 >> ^C >> --- fe80::ee0d:9aff:fed4:2c8c%mce2 ping6 statistics --- >> 2 packets transmitted, 0 packets received, 100.0% packet loss > > > With the patch mentioned in the end of this e-mail: are you sure that this is the problem? Or does https://reviews.freebsd.org/D23760 solve the actual problem? /bz From owner-svn-src-head@freebsd.org Mon Feb 24 18:08:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5F1D23D316; Mon, 24 Feb 2020 18:08:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48R96G0fr3z4bdK; Mon, 24 Feb 2020 18:08:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 5DF581DFE6; Mon, 24 Feb 2020 18:08:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358247 - in head/sys: conf riscv/include To: Kristof Provost , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002221323.01MDNSX9063377@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <0029f80e-5480-da66-0bcd-c2699e046cab@FreeBSD.org> Date: Mon, 24 Feb 2020 10:08:17 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <202002221323.01MDNSX9063377@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 18:08:22 -0000 On 2/22/20 5:23 AM, Kristof Provost wrote: > Author: kp > Date: Sat Feb 22 13:23:27 2020 > New Revision: 358247 > URL: https://svnweb.freebsd.org/changeset/base/358247 > > Log: > riscv: Set MACHINE_ARCH correctly > > MACHINE_ARCH sets the hw.machine_arch sysctl in the kernel. In userspace > it sets MACHINE_ARCH in bmake, which bsd.cpu.mk uses to configure the > target ABI for ports. > > For riscv64sf builds (i.e. soft-float) that needs to be riscv64sf, but > the sysctl didn't reflect that. It is static. > > Set the define from the riscv makefile so that we correctly reflect our > actual build (i.e. riscv64 or riscv64sf), depending on what TARGET_ARCH > we were built with. > > That still doesn't satisfy userspace builds (e.g. bmake), so check if > we're building with a software-floating point toolchain there. That > check doesn't work in the kernel, because it never uses floating point. > > Reviewed by: philip (previous version), mhorne > Sponsored by: Axiado > Differential Revision: https://reviews.freebsd.org/D23741 I actually think this is kind of busted as the kernel is always the same, and we have the same problem on MIPS which also already does this wrong. I think instead we should treat soft-float as an alternate ABI (though very light weight as it doesn't need a separate syscall handler, etc.) and make the sysctl handler smart enough to return the right value based on the ELF header of the binary. I saw the later followup commit to add GENERICSF and I think that is possibly even farther down the wrong path. The kernel is _always_ soft-float in terms of the ABI it is built with. However, kernel with FPE support can run binaries with either ABI. It's true that on RISC-V there is not a nice way to detect if the FPU is present (I haven't looked at OpenSBI, but the SBI used with bbl doesn't provide misa to S-mode to know if it is present or not). You could just try to execute an FPU instruction during boot to see if you get an illegal instruction fault (subject to your SBI choosing to emulate that). -- John Baldwin From owner-svn-src-head@freebsd.org Mon Feb 24 19:12:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 748EE23FC8A; Mon, 24 Feb 2020 19:12:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RBX520sxz3Bt4; Mon, 24 Feb 2020 19:12:21 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15E712119; Mon, 24 Feb 2020 19:12:21 +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 01OJCKLK031139; Mon, 24 Feb 2020 19:12:20 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OJCKji031138; Mon, 24 Feb 2020 19:12:20 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202002241912.01OJCKji031138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 24 Feb 2020 19:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358297 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 358297 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 19:12:21 -0000 Author: bz Date: Mon Feb 24 19:12:20 2020 New Revision: 358297 URL: https://svnweb.freebsd.org/changeset/base/358297 Log: Fix IPv6 checksums when exthdrs are present. In two places in ip6_output we are doing (delayed) checksum calculations. The initial logic came from SCTP in r205075,205104 and later I copied and adjusted it for the TCP|UDP case in r235958. The problem was that the original SCTP offsets were already wrong for any case with extension headers present given IPv6 extension headers are not part of the pseudo checksum calculations. The later changes do not help in case there is checksum offloading as for extension headers (incl. fragments) we do currrently never offload as we have no infrastructure to know whether the NIC can handle these cases. Correct the offsets for delayed checksum calculations and properly handle mbuf flags. In addition harmonize the almost identical duplicate code. While here eliminate the now unneeded variable hlen and add an always missing mtod() call in the 1-b and 3 cases after the introduction of the mb_unmapped_to_ext() calls. Reported by: Francis Dupont (fdupont isc.org) PR: 243675 MFC after: 6 days Reviewed by: markj (earlier version), gallatin Differential Revision: https://reviews.freebsd.org/D23760 Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Mon Feb 24 19:11:52 2020 (r358296) +++ head/sys/netinet6/ip6_output.c Mon Feb 24 19:12:20 2020 (r358297) @@ -210,6 +210,44 @@ in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_sho *(u_short *)mtodo(m, offset) = csum; } +static int +ip6_output_delayed_csum(struct mbuf *m, struct ifnet *ifp, int csum_flags, + int plen, int optlen, bool frag) +{ + + KASSERT((plen >= optlen), ("%s:%d: plen %d < optlen %d, m %p, ifp %p " + "csum_flags %#x frag %d\n", + __func__, __LINE__, plen, optlen, m, ifp, csum_flags, frag)); + + if ((csum_flags & CSUM_DELAY_DATA_IPV6) || +#ifdef SCTP + (csum_flags & CSUM_SCTP_IPV6) || +#endif + (!frag && (ifp->if_capenable & IFCAP_NOMAP) == 0)) { + m = mb_unmapped_to_ext(m); + if (m == NULL) { + if (frag) + in6_ifstat_inc(ifp, ifs6_out_fragfail); + else + IP6STAT_INC(ip6s_odropped); + return (ENOBUFS); + } + if (csum_flags & CSUM_DELAY_DATA_IPV6) { + in6_delayed_cksum(m, plen - optlen, + sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; + } +#ifdef SCTP + if (csum_flags & CSUM_SCTP_IPV6) { + sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; + } +#endif + } + + return (0); +} + int ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int hlen, u_char nextproto, int fraglen , uint32_t id) @@ -386,7 +424,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ifnet *ifp, *origifp; struct mbuf *m = m0; struct mbuf *mprev; - int hlen, tlen, len; + int tlen, len; struct route_in6 ip6route; struct rtentry *rt = NULL; struct sockaddr_in6 *dst, src_sa, dst_sa; @@ -1007,36 +1045,10 @@ passout: * XXX-BZ Need a framework to know when the NIC can handle it, even * with ext. hdrs. */ - if (sw_csum & CSUM_DELAY_DATA_IPV6) { - sw_csum &= ~CSUM_DELAY_DATA_IPV6; - m = mb_unmapped_to_ext(m); - if (m == NULL) { - error = ENOBUFS; - IP6STAT_INC(ip6s_odropped); - goto bad; - } - in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr)); - } else if ((ifp->if_capenable & IFCAP_NOMAP) == 0) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - error = ENOBUFS; - IP6STAT_INC(ip6s_odropped); - goto bad; - } - } -#ifdef SCTP - if (sw_csum & CSUM_SCTP_IPV6) { - sw_csum &= ~CSUM_SCTP_IPV6; - m = mb_unmapped_to_ext(m); - if (m == NULL) { - error = ENOBUFS; - IP6STAT_INC(ip6s_odropped); - goto bad; - } - sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); - } -#endif - m->m_pkthdr.csum_flags &= ifp->if_hwassist; + error = ip6_output_delayed_csum(m, ifp, sw_csum, plen, optlen, false); + if (error != 0) + goto bad; + /* XXX-BZ m->m_pkthdr.csum_flags &= ~ifp->if_hwassist; */ tlen = m->m_pkthdr.len; if ((opt && (opt->ip6po_flags & IP6PO_DONTFRAG)) || tso) @@ -1099,11 +1111,10 @@ passout: * fragment if possible. * Must be able to put at least 8 bytes per fragment. */ - hlen = unfragpartlen; if (mtu > IPV6_MAXPACKET) mtu = IPV6_MAXPACKET; - len = (mtu - hlen - sizeof(struct ip6_frag)) & ~7; + len = (mtu - unfragpartlen - sizeof(struct ip6_frag)) & ~7; if (len < 8) { error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); @@ -1115,28 +1126,11 @@ passout: * fragmented packets, then do it here. * XXX-BZ handle the hw offloading case. Need flags. */ - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - in6_ifstat_inc(ifp, ifs6_out_fragfail); - error = ENOBUFS; - goto bad; - } - in6_delayed_cksum(m, plen, hlen); - m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; - } -#ifdef SCTP - if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - in6_ifstat_inc(ifp, ifs6_out_fragfail); - error = ENOBUFS; - goto bad; - } - sctp_delayed_cksum(m, hlen); - m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; - } -#endif + error = ip6_output_delayed_csum(m, ifp, m->m_pkthdr.csum_flags, + plen, optlen, true); + if (error != 0) + goto bad; + /* * Change the next header field of the last header in the * unfragmentable part. @@ -1151,6 +1145,7 @@ passout: nextproto = *mtod(exthdrs.ip6e_hbh, u_char *); *mtod(exthdrs.ip6e_hbh, u_char *) = IPPROTO_FRAGMENT; } else { + ip6 = mtod(m, struct ip6_hdr *); nextproto = ip6->ip6_nxt; ip6->ip6_nxt = IPPROTO_FRAGMENT; } @@ -1162,7 +1157,8 @@ passout: */ m0 = m; id = htonl(ip6_randomid()); - if ((error = ip6_fragment(ifp, m, hlen, nextproto, len, id))) + error = ip6_fragment(ifp, m, unfragpartlen, nextproto,len, id); + if (error != 0) goto sendorfree; in6_ifstat_inc(ifp, ifs6_out_fragok); From owner-svn-src-head@freebsd.org Mon Feb 24 19:26:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16D91240845 for ; Mon, 24 Feb 2020 19:26:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RBrK75jhz4FCg for ; Mon, 24 Feb 2020 19:26:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x741.google.com with SMTP id j8so9701582qka.11 for ; Mon, 24 Feb 2020 11:26:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hRJJKQNXPS8Y+hdsBnsxx9ZnNlDJDb4fpM7svDKtvLg=; b=zoesnVogoI/Jq9NLEPkywU9S/qTHqygPfsKskd0+sH2MRdYylRPsHj0klgYnXZhBMv XMPaovYk3AIwoqK5Cy/mgsah+Ij14CrldvFhmEWPdCEhkX0WCBEUlK1ioUoX2ep6dNMv q/RFftzgAZ9piBUegV8SoUpJhJVyL7HIiIfHMzJxOH7xYK0cyWxDmVYz9Xl7DyCfD9Br /oovp+r0Ojkg1xfKJQEwx11T6kjPAl3e50PLsjZEAg4dkfX2u+eRFViP3axzuoQi8oei ZDJOz4APHPIj48kqOTOS1tnyOUKEgNVR4Xw5vFciC8lGVpmpdswRDDv5R/fq8pASdnGU 0mGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hRJJKQNXPS8Y+hdsBnsxx9ZnNlDJDb4fpM7svDKtvLg=; b=GtiT5UrmJXnunr4JHslwZr9gLz3nLZE43OsbtP+8jEbYfLLQUn+a1AGSZYiz6ZGbAH qJESA38teWt7kY2oDIAzz8n3+wArWQleWNJ77tx2C09fwXtQsI1JzGFlI4resYh0whZa byOmaesOaNykA6vkkvqR3MhYeaSFIvJ/z+pA0BHOi/Ec1LIC4+pFK7UC99tY3rnptb5e 2GLa4o2QYXJH2QS7X6N67m07cQwXSCjEfNs2zf0jBWf7ptqFBvUddsVgnuhRdslYKzxm 21XKOZIkLi3+LIwpxVDz0NkGaU2RoHi5OvJhQkZGKRuUk4gYgvb66plqyDwsclQTi0zk yUng== X-Gm-Message-State: APjAAAXlq5DwBdhVNcBQ3QAKv8Q3BxmGgjkiiV/cef/KzvI4wJmTmabN tA3qVJGnNEqmtarcuYVTeA4rC8QD7HR8x64bEj4sCw== X-Google-Smtp-Source: APXvYqx0h1J8/dJsYyar3cWDwUnjDJtD4GQYderbfb/kh3+2gESUWgUzLUqACI1xUdVkJXhDjSodMYWybtO+CYzlq3E= X-Received: by 2002:a37:9fd0:: with SMTP id i199mr36836101qke.60.1582572383281; Mon, 24 Feb 2020 11:26:23 -0800 (PST) MIME-Version: 1.0 References: <202002221323.01MDNSX9063377@repo.freebsd.org> <0029f80e-5480-da66-0bcd-c2699e046cab@FreeBSD.org> In-Reply-To: <0029f80e-5480-da66-0bcd-c2699e046cab@FreeBSD.org> From: Warner Losh Date: Mon, 24 Feb 2020 12:26:12 -0700 Message-ID: Subject: Re: svn commit: r358247 - in head/sys: conf riscv/include To: John Baldwin Cc: Kristof Provost , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48RBrK75jhz4FCg X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=zoesnVog; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::741) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.40 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[1.4.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.40)[ip: (1.59), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 19:26:27 -0000 On Mon, Feb 24, 2020 at 11:08 AM John Baldwin wrote: > On 2/22/20 5:23 AM, Kristof Provost wrote: > > Author: kp > > Date: Sat Feb 22 13:23:27 2020 > > New Revision: 358247 > > URL: https://svnweb.freebsd.org/changeset/base/358247 > > > > Log: > > riscv: Set MACHINE_ARCH correctly > > > > MACHINE_ARCH sets the hw.machine_arch sysctl in the kernel. In > userspace > > it sets MACHINE_ARCH in bmake, which bsd.cpu.mk uses to configure the > > target ABI for ports. > > > > For riscv64sf builds (i.e. soft-float) that needs to be riscv64sf, but > > the sysctl didn't reflect that. It is static. > > > > Set the define from the riscv makefile so that we correctly reflect our > > actual build (i.e. riscv64 or riscv64sf), depending on what TARGET_ARCH > > we were built with. > > > > That still doesn't satisfy userspace builds (e.g. bmake), so check if > > we're building with a software-floating point toolchain there. That > > check doesn't work in the kernel, because it never uses floating point. > > > > Reviewed by: philip (previous version), mhorne > > Sponsored by: Axiado > > Differential Revision: https://reviews.freebsd.org/D23741 > > I actually think this is kind of busted as the kernel is always the same, > and we have the same problem on MIPS which also already does this wrong. > I think instead we should treat soft-float as an alternate ABI (though > very light weight as it doesn't need a separate syscall handler, etc.) and > make the sysctl handler smart enough to return the right value based on the > ELF header of the binary. > > I saw the later followup commit to add GENERICSF and I think that is > possibly > even farther down the wrong path. The kernel is _always_ soft-float in > terms > of the ABI it is built with. However, kernel with FPE support can run > binaries > with either ABI. It's true that on RISC-V there is not a nice way to > detect > if the FPU is present (I haven't looked at OpenSBI, but the SBI used with > bbl > doesn't provide misa to S-mode to know if it is present or not). You could > just try to execute an FPU instruction during boot to see if you get an > illegal instruction fault (subject to your SBI choosing to emulate that). > We talked about this on IRC, and here's a summary of my understanding Short term, we'll keep GENERICSF so that we can build ports correctly. I'll post a couple of fixes to it, but generally it will stay as is for the short term. Longer term, we need to formalize the many to many relationships between userland ABI and kernel ABI in a number of ways. We need them for MIPS as well as CHERI work. To that end, we'll move for riscv to having a single kernel that can execute multiple ABIs. we'll update the hw.machine_arch to return the ABI of the binary that's running. We'll also make sure that we make the FPU stuff more dynamic in some way. Here 'we' is hazily defined, but I think it's mostly John :). There will also need to be some minor tweaks to the build system that I'm investigating (things mostly work today, but there are times that we get mismatches that matter and go undetected I think -- which is what I'm looking into). Warner From owner-svn-src-head@freebsd.org Mon Feb 24 19:30:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3943C240B9E; Mon, 24 Feb 2020 19:30:09 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48RBwb01yfz4Jx8; Mon, 24 Feb 2020 19:30:06 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 335D016054; Mon, 24 Feb 2020 20:29:58 +0100 (CET) Date: Mon, 24 Feb 2020 20:29:57 +0100 From: Steffen Nurpmeso To: Pedro Giffuni Cc: Florian Smeets , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358153 - head/usr.sbin/services_mkdb Message-ID: <20200224192957.03g0-%steffen@sdaoden.eu> In-Reply-To: References: <202002200354.01K3s8ib077553@repo.freebsd.org> <03606e17-08fc-f575-95f5-c3c5128bff4f@smeets.xyz> <20200223010937.fTLhW%steffen@sdaoden.eu> Mail-Followup-To: Pedro Giffuni , Florian Smeets , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.17-52-g56288e6a OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48RBwb01yfz4Jx8 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of steffen@sdaoden.eu designates 217.144.132.164 as permitted sender) smtp.mailfrom=steffen@sdaoden.eu X-Spamd-Result: default: False [-0.07 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.56)[-0.563,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; NEURAL_HAM_LONG(-0.51)[-0.514,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sdaoden.eu]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15987, ipnet:217.144.132.0/24, country:DE]; IP_SCORE(0.31)[asn: 15987(1.56), country: DE(-0.02)] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 19:30:09 -0000 Hello. Pedro Giffuni wrote in : |On 22/02/2020 20:09, Steffen Nurpmeso wrote: |> Hey, just so, because i posted to such a thing the last time. |> |> Pedro Giffuni wrote in |> : |>|On 22/02/2020 11:18, Florian Smeets wrote: |>|> On 20.02.20 04:54, Pedro F. Giffuni wrote: |>|>> Author: pfg |>|>> Date: Thu Feb 20 03:54:07 2020 |>|>> New Revision: 358153 |>|>> URL: https://svnweb.freebsd.org/changeset/base/358153 |>|>> |>|>> Log: |>|>> /etc/services: attempt bring the database to this century. |>|>> |>|>> -smtps 465/tcp #smtp protocol over TLS/SSL (was ssmtp) |>|>> -smtps 465/udp #smtp protocol over TLS/SSL (was ssmtp) |>|> I'm not sure how removals of services have been handled in the past. |>|> This change broke loading of my pf rule set, as I had smtps in there. |>| |>|Excellent! |>| |>|Not that the change broke something but that since we had to revert it |>|we get a second chance to review such things. |>| |>|> I'm not saying that this change is wrong, but I think removing entries |>|> from services can break all kinds of stuff. Not just firewall rule \ |>|> sets, |>|> also scripts and thinking more about it, it will most certainly also |>|> break postfix as it also uses smtps as an alias for port 465 in its |>|> master.cnf |>| |>|According to latest IANA registy: |> ... |> |> kpasswd 464/udp # kpasswd (Theodore Ts o) |> urd 465/tcp # URL Rendezvous Directory for SSM \ |> (Toerless Eckert) |> submissions 465/tcp # Message Submission over TLS protocol \ |> (IESG, IETF Chair, rfc8314) [2017-12-12] |> igmpv3lite 465/udp # IGMP over UDP for SSM (Toerless Eckert) |> digital-vrc 466/tcp # digital-vrc (Peter Higginson) |> |> Oh yes, they finally managed to overcome the SMTPS problems. |> The RFC has a nice reading on that (as i seem to remember), yay IETF. |> I am really happy. (I never understood why POP3S and IMAPS where |> done but SMTPS was not.) |Hmm .. I quoted the IANA list but I hadn't read the RFC. Interesting but= =20 |I don't know if it solves Florian's issue. It surely will not if he uses smtps not submissions strings. .. |>|For the time being, we can absolutely keep the legacy value with a |>|conflict note. I wish the services list were a bit easier to maintain |>|for such situations. |> |> Doesn't it just search until it finds the string? |> Btw. i can only offer the simple awk script that i have for |> updating services and protocols again, after the critics last time |> i have evolved it from its ArchLinux base, and added a verbose |> mode, as you can see above. (That Theodore Ts'o missspelling is |> IANA rooted.) Whereas it made it more complicated, 139 lines for |> download and preparation is not that much. | |Interesting. There's also | |https://reviews.freebsd.org/D17115 | |Where I made some comments. | |Currently services_mkdb doesn't scale (which is why the patch was=20 |reverted), but beyond that the real problem is that we shouldn't just=20 |take the entries blindly. Many people abuse the registry for their=20 |startups and licensing services and then never de-register them.=A0 In th= e=20 |case of NetBSD's services file, it currently has 21838 lines, which is=20 |bigger that the official IANA file. Hm. I track it for some time, and have not found this to be a problem for my average use case. And if it changes, then because the IANA registry has actually changed, because of requests of those who are responsible for a protocol. (The entire unified diff to last year's version including timestamp etc. is 335 lines here, or about three percent of the 11423 lines the file has and 11395 last year's file had. Many renames this year. Likely in the groove and would be more nice if named xy.) In fact many programs bake their use cases in due to all the mess (MongoDB service is new this year), on CRUX-Linux, which uses git(1), for example, /etc/services did not have the git service until first the FreeBSD file became imported, and then last year the small awk script. Worked for years without problems. I mean, for the cacert repository i have for almost a decade, and which only generates a single file, but nonetheless, i have a local additions and removals mechanism. All plain text, and works with Unix text tools. Why FreeBSD needs XML and python and something out-of-tree, or anything more complicated as < ./local.rc sed -E -e '/^#/d' -e '/^[[:space:]]*$/d' | while { read file; read url; read finger; }; do if [ "${url}" =3D - ]; then echo 'local.rc: removing: '"${file}" sed -i -e '/^'"${finger}"'/,/^-----END CERTIFICATE/d' "${1}" || panic "cannot edit ${1} via sed(1) for ${url}" else [ -f "${file}.local" ] || continue echo 'local.rc: adding: '"${file}" { echo "# ${file}.local" cat "${file}.local" } >> "${1}" || panic "cannot add ${file}.local cert to ${1}" fi done is hard to understand for likely more-than-one FreeBSD users. I would find it more reasonable to include the IANA text file and have a generic FreeBSD, and an optional local per-site adjustment list, with simple text. Like rc.conf mechanism. In this scenario Florian could simply add 'smtps 465/tcp' there now, and would not need to care any further. If a nice rc script checks timestampts then the DB does not even need to be recreated unless strictly necessary. Why something with ~11000 entries that is indexed with short strings or integers does not scale, i do not really understand. |> Additions could simply be echoed? | |I expect we maintain a relatively short list and have people send PRs=20 |for new entries (assuming they are registered). | |BTW, we should probably go ahead and register our lockd in IANA as the=20 |port number already collides with something else and our use is=20 |propagating to other OSs (namely illumos). I meant when creating the final /etc/services file. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-svn-src-head@freebsd.org Mon Feb 24 19:48:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0B66241FA2; Mon, 24 Feb 2020 19:48:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RCKp4QzFz3LBC; Mon, 24 Feb 2020 19:48: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7094127D4; Mon, 24 Feb 2020 19:48:30 +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 01OJmU6k049461; Mon, 24 Feb 2020 19:48:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OJmUlv049460; Mon, 24 Feb 2020 19:48:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002241948.01OJmUlv049460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 24 Feb 2020 19:48:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358299 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 358299 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 19:48:31 -0000 Author: emaste Date: Mon Feb 24 19:48:29 2020 New Revision: 358299 URL: https://svnweb.freebsd.org/changeset/base/358299 Log: muge: fix rxcsum enable test if_capabilities indicates capabilities supported by the hardware; if_capenable which are enabled. Note that rx checksum is still disabled in the driver at compile time. Submitted by: Johannes MFC after: 2 weeks Modified: head/sys/dev/usb/net/if_muge.c Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Mon Feb 24 19:18:50 2020 (r358298) +++ head/sys/dev/usb/net/if_muge.c Mon Feb 24 19:48:29 2020 (r358299) @@ -1262,7 +1262,7 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err * Check if RX checksums are computed, and * offload them */ - if ((ifp->if_capabilities & IFCAP_RXCSUM) && + if ((ifp->if_capenable & IFCAP_RXCSUM) && !(rx_cmd_a & RX_CMD_A_ICSM_)) { struct ether_header *eh; eh = mtod(m, struct ether_header *); @@ -1970,7 +1970,7 @@ static int muge_sethwcsum(struct muge_softc *sc) MUGE_LOCK_ASSERT(sc, MA_OWNED); - if (ifp->if_capabilities & IFCAP_RXCSUM) { + if (ifp->if_capenable & IFCAP_RXCSUM) { sc->sc_rfe_ctl |= ETH_RFE_CTL_IGMP_COE_ | ETH_RFE_CTL_ICMP_COE_; sc->sc_rfe_ctl |= ETH_RFE_CTL_TCPUDP_COE_ | ETH_RFE_CTL_IP_COE_; } else { From owner-svn-src-head@freebsd.org Mon Feb 24 19:50:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66166242068; Mon, 24 Feb 2020 19:50:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RCN51w0lz3Q9S; Mon, 24 Feb 2020 19:50: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BCE02806; Mon, 24 Feb 2020 19:50: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 01OJoTHs049633; Mon, 24 Feb 2020 19:50:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OJoTqr049632; Mon, 24 Feb 2020 19:50:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002241950.01OJoTqr049632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 24 Feb 2020 19:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358300 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 358300 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 19:50:29 -0000 Author: emaste Date: Mon Feb 24 19:50:28 2020 New Revision: 358300 URL: https://svnweb.freebsd.org/changeset/base/358300 Log: smsc: remove pre-FreeBSD-10 compat support Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/usb/net/if_smsc.c Modified: head/sys/dev/usb/net/if_smsc.c ============================================================================== --- head/sys/dev/usb/net/if_smsc.c Mon Feb 24 19:48:29 2020 (r358299) +++ head/sys/dev/usb/net/if_smsc.c Mon Feb 24 19:50:28 2020 (r358300) @@ -186,9 +186,7 @@ static miibus_readreg_t smsc_miibus_readreg; static miibus_writereg_t smsc_miibus_writereg; static miibus_statchg_t smsc_miibus_statchg; -#if __FreeBSD_version > 1000000 static int smsc_attach_post_sub(struct usb_ether *ue); -#endif static uether_fn_t smsc_attach_post; static uether_fn_t smsc_init; static uether_fn_t smsc_stop; @@ -233,9 +231,7 @@ static const struct usb_config smsc_config[SMSC_N_TRAN static const struct usb_ether_methods smsc_ue_methods = { .ue_attach_post = smsc_attach_post, -#if __FreeBSD_version > 1000000 .ue_attach_post_sub = smsc_attach_post_sub, -#endif .ue_start = smsc_start, .ue_ioctl = smsc_ioctl, .ue_init = smsc_init, @@ -920,24 +916,6 @@ smsc_init(struct usb_ether *ue) /* Cancel pending I/O */ smsc_stop(ue); -#if __FreeBSD_version <= 1000000 - /* On earlier versions this was the first place we could tell the system - * that we supported h/w csuming, however this is only called after the - * the interface has been brought up - not ideal. - */ - if (!(ifp->if_capabilities & IFCAP_RXCSUM)) { - ifp->if_capabilities |= IFCAP_RXCSUM; - ifp->if_capenable |= IFCAP_RXCSUM; - ifp->if_hwassist = 0; - } - - /* TX checksuming is disabled for now - ifp->if_capabilities |= IFCAP_TXCSUM; - ifp->if_capenable |= IFCAP_TXCSUM; - ifp->if_hwassist = CSUM_TCP | CSUM_UDP; - */ -#endif - /* Reset the ethernet interface. */ smsc_reset(sc); @@ -1551,11 +1529,7 @@ smsc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data SMSC_UNLOCK(sc); if (reinit) -#if __FreeBSD_version > 1000000 uether_init(ue); -#else - ifp->if_init(ue); -#endif } else { rc = uether_ioctl(ifp, cmd, data); @@ -1637,7 +1611,6 @@ smsc_attach_post(struct usb_ether *ue) * RETURNS: * Returns 0 on success or a negative error code. */ -#if __FreeBSD_version > 1000000 static int smsc_attach_post_sub(struct usb_ether *ue) { @@ -1677,7 +1650,6 @@ smsc_attach_post_sub(struct usb_ether *ue) return (error); } -#endif /* __FreeBSD_version > 1000000 */ /** From owner-svn-src-head@freebsd.org Mon Feb 24 21:07:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 478AA2444E5; Mon, 24 Feb 2020 21:07:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RF513PBGz491W; Mon, 24 Feb 2020 21:07:33 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4EBAB3966; Mon, 24 Feb 2020 21:07:33 +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 01OL7XD6098114; Mon, 24 Feb 2020 21:07:33 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01OL7UYP098101; Mon, 24 Feb 2020 21:07:30 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202002242107.01OL7UYP098101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 24 Feb 2020 21:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358301 - in head/sys: dev/beri/virtio/network dev/dpaa dev/hyperv/netvsc dev/if_ndis dev/mlx5/mlx5_en dev/ntb/if_ntb dev/sbni dev/virtio/network mips/nlm/dev/net net X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: dev/beri/virtio/network dev/dpaa dev/hyperv/netvsc dev/if_ndis dev/mlx5/mlx5_en dev/ntb/if_ntb dev/sbni dev/virtio/network mips/nlm/dev/net net X-SVN-Commit-Revision: 358301 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 21:07:34 -0000 Author: glebius Date: Mon Feb 24 21:07:30 2020 New Revision: 358301 URL: https://svnweb.freebsd.org/changeset/base/358301 Log: Although most of the NIC drivers are epoch ready, due to peer pressure switch over to opt-in instead of opt-out for epoch. Instead of IFF_NEEDSEPOCH, provide IFF_KNOWSEPOCH. If driver marks itself with IFF_KNOWSEPOCH, then ether_input() would not enter epoch when processing its packets. Now this will create recursive entrance in epoch in >90% network drivers, but will guarantee safeness of the transition. Mark several tested drivers as IFF_KNOWSEPOCH. Reviewed by: hselasky, jeff, bz, gallatin Differential Revision: https://reviews.freebsd.org/D23674 Modified: head/sys/dev/beri/virtio/network/if_vtbe.c head/sys/dev/dpaa/if_dtsec.c head/sys/dev/hyperv/netvsc/if_hn.c head/sys/dev/if_ndis/if_ndis.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/sbni/if_sbni.c head/sys/dev/virtio/network/if_vtnet.c head/sys/mips/nlm/dev/net/xlpge.c head/sys/net/if.c head/sys/net/if.h head/sys/net/if_ethersubr.c head/sys/net/iflib.c Modified: head/sys/dev/beri/virtio/network/if_vtbe.c ============================================================================== --- head/sys/dev/beri/virtio/network/if_vtbe.c Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/dev/beri/virtio/network/if_vtbe.c Mon Feb 24 21:07:30 2020 (r358301) @@ -613,7 +613,7 @@ vtbe_attach(device_t dev) ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | - IFF_MULTICAST | IFF_PROMISC | IFF_NEEDSEPOCH); + IFF_MULTICAST | IFF_PROMISC); ifp->if_capabilities = IFCAP_VLAN_MTU; ifp->if_capenable = ifp->if_capabilities; ifp->if_start = vtbe_txstart; Modified: head/sys/dev/dpaa/if_dtsec.c ============================================================================== --- head/sys/dev/dpaa/if_dtsec.c Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/dev/dpaa/if_dtsec.c Mon Feb 24 21:07:30 2020 (r358301) @@ -688,7 +688,7 @@ dtsec_attach(device_t dev) ifp->if_softc = sc; ifp->if_mtu = ETHERMTU; /* TODO: Configure */ - ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_NEEDSEPOCH; + ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST; ifp->if_init = dtsec_if_init; ifp->if_start = dtsec_if_start; ifp->if_ioctl = dtsec_if_ioctl; Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/dev/hyperv/netvsc/if_hn.c Mon Feb 24 21:07:30 2020 (r358301) @@ -2362,8 +2362,7 @@ hn_attach(device_t dev) */ ifp->if_baudrate = IF_Gbps(10); - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | - IFF_NEEDSEPOCH; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = hn_ioctl; ifp->if_init = hn_init; #ifdef HN_IFSTART_SUPPORT Modified: head/sys/dev/if_ndis/if_ndis.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis.c Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/dev/if_ndis/if_ndis.c Mon Feb 24 21:07:30 2020 (r358301) @@ -967,8 +967,7 @@ ndis_ifattach(struct ndis_softc *sc) if_initname(ifp, device_get_name(sc->ndis_dev), device_get_unit(sc->ndis_dev)); - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | - IFF_NEEDSEPOCH; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ndis_ifioctl; ifp->if_start = ndis_ifstart; ifp->if_init = ndis_init; Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Feb 24 21:07:30 2020 (r358301) @@ -4275,7 +4275,8 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) if_initname(ifp, "mce", device_get_unit(mdev->pdev->dev.bsddev)); ifp->if_mtu = ETHERMTU; ifp->if_init = mlx5e_open; - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | + IFF_KNOWSEPOCH; ifp->if_ioctl = mlx5e_ioctl; ifp->if_transmit = mlx5e_xmit; ifp->if_qflush = if_qflush; Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Mon Feb 24 21:07:30 2020 (r358301) @@ -172,8 +172,7 @@ ntb_net_attach(device_t dev) if_setinitfn(ifp, ntb_net_init); if_setsoftc(ifp, sc); - if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | - IFF_NEEDSEPOCH); + if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); if_setioctlfn(ifp, ntb_ioctl); if_settransmitfn(ifp, ntb_transmit); if_setqflushfn(ifp, ntb_qflush); Modified: head/sys/dev/sbni/if_sbni.c ============================================================================== --- head/sys/dev/sbni/if_sbni.c Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/dev/sbni/if_sbni.c Mon Feb 24 21:07:30 2020 (r358301) @@ -243,8 +243,7 @@ sbni_attach(struct sbni_softc *sc, int unit, struct sb ifp->if_baudrate = (csr0 & 0x01 ? 500000 : 2000000) / (1 << flags.rate); - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | - IFF_NEEDSEPOCH; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; mtx_init(&sc->lock, ifp->if_xname, MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->wch, &sc->lock, 0); Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/dev/virtio/network/if_vtnet.c Mon Feb 24 21:07:30 2020 (r358301) @@ -950,7 +950,8 @@ vtnet_setup_interface(struct vtnet_softc *sc) if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_baudrate = IF_Gbps(10); /* Approx. */ ifp->if_softc = sc; - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | + IFF_KNOWSEPOCH; ifp->if_init = vtnet_init; ifp->if_ioctl = vtnet_ioctl; ifp->if_get_counter = vtnet_get_counter; Modified: head/sys/mips/nlm/dev/net/xlpge.c ============================================================================== --- head/sys/mips/nlm/dev/net/xlpge.c Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/mips/nlm/dev/net/xlpge.c Mon Feb 24 21:07:30 2020 (r358301) @@ -1052,8 +1052,7 @@ nlm_xlpge_ifinit(struct nlm_xlpge_softc *sc) } ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | - IFF_NEEDSEPOCH; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; sc->if_flags = ifp->if_flags; /*ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_VLAN_HWTAGGING;*/ ifp->if_capabilities = 0; Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/net/if.c Mon Feb 24 21:07:30 2020 (r358301) @@ -551,8 +551,6 @@ if_alloc_domain(u_char type, int numa_domain) #ifdef VIMAGE ifp->if_vnet = curvnet; #endif - /* XXX */ - ifp->if_flags |= IFF_NEEDSEPOCH; if (if_com_alloc[type] != NULL) { ifp->if_l2com = if_com_alloc[type](type, ifp); if (ifp->if_l2com == NULL) { @@ -4167,8 +4165,8 @@ if_setdrvflags(if_t ifp, int flags) int if_setflags(if_t ifp, int flags) { - /* XXX Temporary */ - ((struct ifnet *)ifp)->if_flags = flags | IFF_NEEDSEPOCH; + + ifp->if_flags = flags; return (0); } Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/net/if.h Mon Feb 24 21:07:30 2020 (r358301) @@ -144,7 +144,7 @@ struct if_data { #define IFF_DEBUG 0x4 /* (n) turn on debugging */ #define IFF_LOOPBACK 0x8 /* (i) is a loopback net */ #define IFF_POINTOPOINT 0x10 /* (i) is a point-to-point link */ -#define IFF_NEEDSEPOCH 0x20 /* (i) calls if_input w/o epoch */ +#define IFF_KNOWSEPOCH 0x20 /* (i) calls if_input in net epoch */ #define IFF_DRV_RUNNING 0x40 /* (d) resources allocated */ #define IFF_NOARP 0x80 /* (n) no address resolution protocol */ #define IFF_PROMISC 0x100 /* (n) receive all packets */ @@ -178,7 +178,7 @@ struct if_data { #define IFF_CANTCHANGE \ (IFF_BROADCAST|IFF_POINTOPOINT|IFF_DRV_RUNNING|IFF_DRV_OACTIVE|\ IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_PROMISC|\ - IFF_DYING|IFF_CANTCONFIG) + IFF_DYING|IFF_CANTCONFIG|IFF_KNOWSEPOCH) /* * Values for if_link_state. Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/net/if_ethersubr.c Mon Feb 24 21:07:30 2020 (r358301) @@ -802,14 +802,17 @@ ether_input(struct ifnet *ifp, struct mbuf *m) { struct epoch_tracker et; struct mbuf *mn; + bool needs_epoch; + needs_epoch = !(ifp->if_flags & IFF_KNOWSEPOCH); + /* * The drivers are allowed to pass in a chain of packets linked with * m_nextpkt. We split them up into separate packets here and pass * them up. This allows the drivers to amortize the receive lock. */ CURVNET_SET_QUIET(ifp->if_vnet); - if (__predict_false(ifp->if_flags & IFF_NEEDSEPOCH)) + if (__predict_false(needs_epoch)) NET_EPOCH_ENTER(et); while (m) { mn = m->m_nextpkt; @@ -825,7 +828,7 @@ ether_input(struct ifnet *ifp, struct mbuf *m) netisr_dispatch(NETISR_ETHER, m); m = mn; } - if (__predict_false(ifp->if_flags & IFF_NEEDSEPOCH)) + if (__predict_false(needs_epoch)) NET_EPOCH_EXIT(et); CURVNET_RESTORE(); } Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Feb 24 19:50:28 2020 (r358300) +++ head/sys/net/iflib.c Mon Feb 24 21:07:30 2020 (r358301) @@ -5400,7 +5400,8 @@ iflib_register(if_ctx_t ctx) if_settransmitfn(ifp, iflib_if_transmit); #endif if_setqflushfn(ifp, iflib_if_qflush); - if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); + if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | + IFF_KNOWSEPOCH); ctx->ifc_vlan_attach_event = EVENTHANDLER_REGISTER(vlan_config, iflib_vlan_register, ctx, From owner-svn-src-head@freebsd.org Mon Feb 24 23:04:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A427246E37; Mon, 24 Feb 2020 23:04:03 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48RHgQ6wjjz4TPL; Mon, 24 Feb 2020 23:04:02 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id AFE36260198; Tue, 25 Feb 2020 00:04:00 +0100 (CET) Subject: Re: svn commit: r358167 - head/sys/netinet6 To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002201056.01KAuC0N029186@repo.freebsd.org> <7d9ea227-7208-5773-080c-5ebc365c4be0@selasky.org> <4B399B7C-6256-4C47-A3F8-CE46B1B70C17@FreeBSD.org> From: Hans Petter Selasky Message-ID: <9499f455-80e9-447d-c6ff-73a38e5f9410@selasky.org> Date: Tue, 25 Feb 2020 00:03:51 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <4B399B7C-6256-4C47-A3F8-CE46B1B70C17@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48RHgQ6wjjz4TPL X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 23:04:03 -0000 On 2020-02-24 18:19, Bjoern A. Zeeb wrote: > are you sure that this is the problem?  Or does > https://reviews.freebsd.org/D23760 solve the actual problem? Yes, I'm confident this is the problem. I made traces with tcpdump and looked at it using wireshark. Just setup two -current machines on a network and ping6 a large packet back2back w/o using lo0 . --HPS From owner-svn-src-head@freebsd.org Tue Feb 25 00:45:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00B3424A0E5; Tue, 25 Feb 2020 00:45:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RKw567Msz4Dtk; Tue, 25 Feb 2020 00:45:09 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF208625E; Tue, 25 Feb 2020 00:45:09 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01P0j9cR029273; Tue, 25 Feb 2020 00:45:09 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01P0j9eE029272; Tue, 25 Feb 2020 00:45:09 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202002250045.01P0j9eE029272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Tue, 25 Feb 2020 00:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358304 - head/stand/powerpc/ofw X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/stand/powerpc/ofw X-SVN-Commit-Revision: 358304 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 00:45:10 -0000 Author: bdragon Date: Tue Feb 25 00:45:09 2020 New Revision: 358304 URL: https://svnweb.freebsd.org/changeset/base/358304 Log: [PowerPC] Fix LLD10 linking of ofw loader on ppc Before this change, LLD10 was creating several extra PT_LOAD sections, which OFW does not understand. Like we do for the kernel already, specify the program headers manually. Additionally, to work around a crash in our base ld.bfd, we need to actually assign something to the output section. LLD does not need this. One side effect of this change is the removal of the GNU_STACK header. This is more correct, since we are using a statically-allocated stack and RWX mappings across the board this early in boot. Reviewed by: jhibbits, Fangrui Song Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D23778 Modified: head/stand/powerpc/ofw/ldscript.powerpc Modified: head/stand/powerpc/ofw/ldscript.powerpc ============================================================================== --- head/stand/powerpc/ofw/ldscript.powerpc Tue Feb 25 00:37:13 2020 (r358303) +++ head/stand/powerpc/ofw/ldscript.powerpc Tue Feb 25 00:45:09 2020 (r358304) @@ -6,11 +6,15 @@ OUTPUT_ARCH(powerpc:common) ENTRY(_start) SEARCH_DIR(/usr/lib); PROVIDE (__stack = 0); +PHDRS +{ + text PT_LOAD; +} SECTIONS { /* Read-only sections, merged into text segment: */ . = 0x02c00000 + SIZEOF_HEADERS; - .interp : { *(.interp) } + .interp : { *(.interp) } :text .hash : { *(.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } From owner-svn-src-head@freebsd.org Tue Feb 25 01:40:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 117FD24C4A9; Tue, 25 Feb 2020 01:40:24 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RM7q4D5Pz4b96; Tue, 25 Feb 2020 01:40:23 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CD336BFC; Tue, 25 Feb 2020 01:40:23 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01P1eNt5059635; Tue, 25 Feb 2020 01:40:23 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01P1eNbM059634; Tue, 25 Feb 2020 01:40:23 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202002250140.01P1eNbM059634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 25 Feb 2020 01:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358305 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 358305 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 01:40:24 -0000 Author: jhibbits Date: Tue Feb 25 01:40:22 2020 New Revision: 358305 URL: https://svnweb.freebsd.org/changeset/base/358305 Log: powerpc/booke: Use a pseudo-DMAP for the device mappings on booke64 Since powerpc64 has such a large virtual address space, significantly larger than its physical address space, take advantage of this, and create yet another DMAP-like instance for the device mappings. In this case, the device mapping "DMAP" is in the 0x8000000000000000 - 0xc000000000000000 range, so as not to overlap the physical memory DMAP. This will allow us to add TLB1 entry coalescing in the future, especially useful for things like the radeonkms driver, which maps parts of the GPU at a time, but eventually maps all of it, using up a lot of TLB1 entries (~40). Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Tue Feb 25 00:45:09 2020 (r358304) +++ head/sys/powerpc/booke/pmap.c Tue Feb 25 01:40:22 2020 (r358305) @@ -221,8 +221,23 @@ uint32_t tlb1_entries; #define TLB1_ENTRIES (tlb1_entries) -static vm_offset_t tlb1_map_base = (vm_offset_t)VM_MAXUSER_ADDRESS + PAGE_SIZE; +/* + * Base of the pmap_mapdev() region. On 32-bit it immediately follows the + * userspace address range. On On 64-bit it's far above, at (1 << 63), and + * ranges up to the DMAP, giving 62 bits of PA allowed. This is far larger than + * the widest Book-E address bus, the e6500 has a 40-bit PA space. This allows + * us to map akin to the DMAP, with addresses identical to the PA, offset by the + * base. + */ +#ifdef __powerpc64__ +#define VM_MAPDEV_BASE 0x8000000000000000 +#define VM_MAPDEV_PA_MAX 0x4000000000000000 /* Don't encroach on DMAP */ +#else +#define VM_MAPDEV_BASE (VM_MAXUSER_ADDRESS + PAGE_SIZE) +#endif +static vm_offset_t tlb1_map_base = VM_MAPDEV_BASE; + static tlbtid_t tid_alloc(struct pmap *); static void tid_flush(tlbtid_t tid); @@ -3475,8 +3490,10 @@ mmu_booke_mapdev_attr(mmu_t mmu, vm_paddr_t pa, vm_siz { tlb_entry_t e; vm_paddr_t tmppa; - void *res; - uintptr_t va, tmpva; +#ifndef __powerpc64__ + uintptr_t tmpva; +#endif + uintptr_t va; vm_size_t sz; int i; int wimge; @@ -3512,6 +3529,11 @@ mmu_booke_mapdev_attr(mmu_t mmu, vm_paddr_t pa, vm_siz size = roundup(size, PAGE_SIZE); +#ifdef __powerpc64__ + KASSERT(pa < VM_MAPDEV_PA_MAX, + ("Unsupported physical address! %lx", pa)); + va = VM_MAPDEV_BASE + pa; +#else /* * The device mapping area is between VM_MAXUSER_ADDRESS and * VM_MIN_KERNEL_ADDRESS. This gives 1GB of device addressing. @@ -3534,24 +3556,15 @@ mmu_booke_mapdev_attr(mmu_t mmu, vm_paddr_t pa, vm_siz sz = ffsl((~((1 << flsl(size-1)) - 1)) & pa); sz = sz ? min(roundup(sz + 3, 4), flsl(size) - 1) : flsl(size) - 1; va = roundup(tlb1_map_base, 1 << sz) | (((1 << sz) - 1) & pa); -#ifdef __powerpc64__ - } while (!atomic_cmpset_long(&tlb1_map_base, tmpva, va + size)); -#else } while (!atomic_cmpset_int(&tlb1_map_base, tmpva, va + size)); -#endif -#else -#ifdef __powerpc64__ - va = atomic_fetchadd_long(&tlb1_map_base, size); -#else va = atomic_fetchadd_int(&tlb1_map_base, size); #endif #endif - res = (void *)va; if (tlb1_mapin_region(va, pa, size, tlb_calc_wimg(pa, ma)) != size) return (NULL); - return (res); + return ((void *)va); } /* From owner-svn-src-head@freebsd.org Tue Feb 25 02:42:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2366024D8B7; Tue, 25 Feb 2020 02:42:44 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RNWl6Vvnz3CJh; Tue, 25 Feb 2020 02:42:43 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D608C78D6; Tue, 25 Feb 2020 02:42:43 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01P2ghWU001215; Tue, 25 Feb 2020 02:42:43 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01P2ghRr001214; Tue, 25 Feb 2020 02:42:43 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202002250242.01P2ghRr001214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 25 Feb 2020 02:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358306 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 358306 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 02:42:44 -0000 Author: jhibbits Date: Tue Feb 25 02:42:43 2020 New Revision: 358306 URL: https://svnweb.freebsd.org/changeset/base/358306 Log: Unbreak the 32-bit powerpc builds Force unsigned integer usage by casting to vm_offset_t, to avoid integer overflow, from r358305 Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Tue Feb 25 01:40:22 2020 (r358305) +++ head/sys/powerpc/booke/pmap.c Tue Feb 25 02:42:43 2020 (r358306) @@ -233,7 +233,7 @@ uint32_t tlb1_entries; #define VM_MAPDEV_BASE 0x8000000000000000 #define VM_MAPDEV_PA_MAX 0x4000000000000000 /* Don't encroach on DMAP */ #else -#define VM_MAPDEV_BASE (VM_MAXUSER_ADDRESS + PAGE_SIZE) +#define VM_MAPDEV_BASE ((vm_offset_t)VM_MAXUSER_ADDRESS + PAGE_SIZE) #endif static vm_offset_t tlb1_map_base = VM_MAPDEV_BASE; From owner-svn-src-head@freebsd.org Tue Feb 25 03:35:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A77324F524; Tue, 25 Feb 2020 03:35:53 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RPj508LDz4M9r; Tue, 25 Feb 2020 03:35:53 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAB5B8287; Tue, 25 Feb 2020 03:35:52 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01P3ZqS2032705; Tue, 25 Feb 2020 03:35:52 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01P3ZqRc032703; Tue, 25 Feb 2020 03:35:52 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202002250335.01P3ZqRc032703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Tue, 25 Feb 2020 03:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358307 - in head/sys: contrib/ncsw/inc contrib/ncsw/user/env dev/dpaa X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head/sys: contrib/ncsw/inc contrib/ncsw/user/env dev/dpaa X-SVN-Commit-Revision: 358307 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 03:35:53 -0000 Author: bdragon Date: Tue Feb 25 03:35:52 2020 New Revision: 358307 URL: https://svnweb.freebsd.org/changeset/base/358307 Log: [PowerPC] [Book-E] Fix dpaa interrupt binding. After the network epoch was added, we lost the ability to migrate the ithread in the middle of dispatch, as being in the network epoch will pin the current thread (for safety reasons.) Luckily, we don't actually have to do this workaround in the first place, as we can just bind it to the correct cpu when we preallocate it. Pass dev through to XX_PreallocAndBindIntr() and actually bind it to the cpu like it was supposed to in the first place, instad of leaving it floating and moving it to the correct cpu the first time it fires. This fixes panics while bringing up dtsec on my X5000. Reviewed by: jhibbits Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D23826 Modified: head/sys/contrib/ncsw/inc/xx_ext.h head/sys/contrib/ncsw/user/env/xx.c head/sys/dev/dpaa/portals_common.c Modified: head/sys/contrib/ncsw/inc/xx_ext.h ============================================================================== --- head/sys/contrib/ncsw/inc/xx_ext.h Tue Feb 25 02:42:43 2020 (r358306) +++ head/sys/contrib/ncsw/inc/xx_ext.h Tue Feb 25 03:35:52 2020 (r358307) @@ -205,7 +205,7 @@ uint32_t XX_DisableAllIntr(void); void XX_RestoreAllIntr(uint32_t flags); -t_Error XX_PreallocAndBindIntr(uintptr_t irq, unsigned int cpu); +t_Error XX_PreallocAndBindIntr(device_t dev, uintptr_t irq, unsigned int cpu); t_Error XX_DeallocIntr(uintptr_t irq); /**************************************************************************//** Modified: head/sys/contrib/ncsw/user/env/xx.c ============================================================================== --- head/sys/contrib/ncsw/user/env/xx.c Tue Feb 25 02:42:43 2020 (r358306) +++ head/sys/contrib/ncsw/user/env/xx.c Tue Feb 25 03:35:52 2020 (r358307) @@ -95,8 +95,7 @@ MTX_SYSINIT(XX_MallocTrackLockInit, &XX_MallocTrackLoc /* Interrupt info */ #define XX_INTR_FLAG_PREALLOCATED (1 << 0) -#define XX_INTR_FLAG_BOUND (1 << 1) -#define XX_INTR_FLAG_FMAN_FIX (1 << 2) +#define XX_INTR_FLAG_FMAN_FIX (1 << 1) struct XX_IntrInfo { driver_intr_t *handler; @@ -320,16 +319,6 @@ XX_Dispatch(void *arg) info = arg; - /* Bind this thread to proper CPU when SMP has been already started. */ - if ((info->flags & XX_INTR_FLAG_BOUND) == 0 && smp_started && - info->cpu >= 0) { - thread_lock(curthread); - sched_bind(curthread, info->cpu); - thread_unlock(curthread); - - info->flags |= XX_INTR_FLAG_BOUND; - } - if (info->handler == NULL) { printf("%s(): IRQ handler is NULL!\n", __func__); return; @@ -339,7 +328,7 @@ XX_Dispatch(void *arg) } t_Error -XX_PreallocAndBindIntr(uintptr_t irq, unsigned int cpu) +XX_PreallocAndBindIntr(device_t dev, uintptr_t irq, unsigned int cpu) { struct resource *r; unsigned int inum; @@ -349,6 +338,10 @@ XX_PreallocAndBindIntr(uintptr_t irq, unsigned int cpu inum = rman_get_start(r); error = XX_SetIntr(irq, XX_Dispatch, &XX_IntrInfo[inum]); + if (error != 0) + return (error); + + error = bus_bind_intr(dev, r, cpu); if (error != 0) return (error); Modified: head/sys/dev/dpaa/portals_common.c ============================================================================== --- head/sys/dev/dpaa/portals_common.c Tue Feb 25 02:42:43 2020 (r358306) +++ head/sys/dev/dpaa/portals_common.c Tue Feb 25 03:35:52 2020 (r358307) @@ -120,8 +120,7 @@ dpaa_portal_alloc_res(device_t dev, struct dpaa_portal device_printf(dev, "Could not allocate irq.\n"); return (ENXIO); } - - err = XX_PreallocAndBindIntr((uintptr_t)sc->sc_dp[cpu].dp_ires, cpu); + err = XX_PreallocAndBindIntr(dev, (uintptr_t)sc->sc_dp[cpu].dp_ires, cpu); if (err != E_OK) { device_printf(dev, "Could not prealloc and bind interrupt\n"); From owner-svn-src-head@freebsd.org Tue Feb 25 04:27:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0C0824FF71; Tue, 25 Feb 2020 04:27:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RQrX2Y6jz3Kp0; Tue, 25 Feb 2020 04:27:24 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2AC898BB5; Tue, 25 Feb 2020 04:27:24 +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 01P4RNOV062557; Tue, 25 Feb 2020 04:27:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01P4RNP7062553; Tue, 25 Feb 2020 04:27:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002250427.01P4RNP7062553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 25 Feb 2020 04:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358308 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 358308 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 04:27:24 -0000 Author: imp Date: Tue Feb 25 04:27:23 2020 New Revision: 358308 URL: https://svnweb.freebsd.org/changeset/base/358308 Log: Before issing the REMOVE_DEVICE command to the firmware, make sure that all commands have completed. It's not OK to force complete any pending commands before we send the REMOVE_DEVICE. Instead, make sure that all pending commands are complete before sending that. By trying to second guess the firmware here, we run the risk of completing commands twice, which leads to corruption. This removes the forced completion of commands introduced in r218811. So it's a partial backout of that commit, but replaces it with a more rebust mechanism. Either these commands will complete due to the TARGET RESET, or they will timeout and be aborted, but they will all complete. Add assert that all commands are complete to REMOVE_DEVICE completion routine. We attempt to assure this programatically, so we shouldn't have any commands in the queue because we've waited for them all. Any commands that make it into our action routine after we mark the target in removal will complete immediately with an error. When we're removing a target that's not a volume, advertise up the stack that it's actually gone, as opposed to having a transient selection error we should retry. Do this both in the action routine, and when we get a notification of an aborted command. We don't do this for volumes because the driver tries hard not to advertise to the OS a volume has disappeared. Apply these changes to both mpr and mps since they are based on quite similar designs. Discussed with: scottl@ Differential Revision: https://reviews.freebsd.org/D23768 Modified: head/sys/dev/mpr/mpr_sas.c head/sys/dev/mpr/mpr_sas.h head/sys/dev/mps/mps_sas.c head/sys/dev/mps/mps_sas.h Modified: head/sys/dev/mpr/mpr_sas.c ============================================================================== --- head/sys/dev/mpr/mpr_sas.c Tue Feb 25 03:35:52 2020 (r358307) +++ head/sys/dev/mpr/mpr_sas.c Tue Feb 25 04:27:23 2020 (r358308) @@ -559,7 +559,6 @@ mprsas_remove_device(struct mpr_softc *sc, struct mpr_ MPI2_SCSI_TASK_MANAGE_REPLY *reply; MPI2_SAS_IOUNIT_CONTROL_REQUEST *req; struct mprsas_target *targ; - struct mpr_command *next_cm; uint16_t handle; MPR_FUNCTRACE(sc); @@ -609,7 +608,18 @@ mprsas_remove_device(struct mpr_softc *sc, struct mpr_ tm->cm_complete = mprsas_remove_complete; tm->cm_complete_data = (void *)(uintptr_t)handle; - mpr_map_command(sc, tm); + /* + * Wait to send the REMOVE_DEVICE until all the commands have cleared. + * They should be aborted or time out and we'll kick thus off there + * if so. + */ + if (TAILQ_FIRST(&targ->commands) == NULL) { + mpr_dprint(sc, MPR_INFO, "No pending commands: starting remove_device\n"); + mpr_map_command(sc, tm); + targ->pending_remove_tm = NULL; + } else { + targ->pending_remove_tm = tm; + } mpr_dprint(sc, MPR_INFO, "clearing target %u handle 0x%04x\n", targ->tid, handle); @@ -618,15 +628,6 @@ mprsas_remove_device(struct mpr_softc *sc, struct mpr_ "connector name (%4s)\n", targ->encl_level, targ->encl_slot, targ->connector_name); } - TAILQ_FOREACH_SAFE(tm, &targ->commands, cm_link, next_cm) { - union ccb *ccb; - - mpr_dprint(sc, MPR_XINFO, "Completing missed command %p\n", tm); - ccb = tm->cm_complete_data; - mprsas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); - tm->cm_state = MPR_CM_STATE_BUSY; - mprsas_scsiio_complete(sc, tm); - } } static void @@ -642,7 +643,16 @@ mprsas_remove_complete(struct mpr_softc *sc, struct mp reply = (MPI2_SAS_IOUNIT_CONTROL_REPLY *)tm->cm_reply; handle = (uint16_t)(uintptr_t)tm->cm_complete_data; + targ = tm->cm_targ; + /* + * At this point, we should have no pending commands for the target. + * The remove target has just completed. + */ + KASSERT(TAILQ_FIRST(&targ->commands) == NULL, + ("%s: no commands should be pending\n", __func__)); + + /* * Currently there should be no way we can hit this case. It only * happens when we have a failure to allocate chain frames, and * task management commands don't have S/G lists. @@ -674,7 +684,6 @@ mprsas_remove_complete(struct mpr_softc *sc, struct mp */ if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) == MPI2_IOCSTATUS_SUCCESS) { - targ = tm->cm_targ; targ->handle = 0x0; targ->encl_handle = 0x0; targ->encl_level_valid = 0x0; @@ -1964,13 +1973,17 @@ mprsas_action_scsiio(struct mprsas_softc *sassc, union /* * If devinfo is 0 this will be a volume. In that case don't tell CAM * that the volume has timed out. We want volumes to be enumerated - * until they are deleted/removed, not just failed. + * until they are deleted/removed, not just failed. In either event, + * we're removing the target due to a firmware event telling us + * the device is now gone (as opposed to some transient event). Since + * we're opting to remove failed devices from the OS's view, we need + * to propagate that status up the stack. */ if (targ->flags & MPRSAS_TARGET_INREMOVAL) { if (targ->devinfo == 0) mprsas_set_ccbstatus(ccb, CAM_REQ_CMP); else - mprsas_set_ccbstatus(ccb, CAM_SEL_TIMEOUT); + mprsas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); xpt_done(ccb); return; } @@ -2844,15 +2857,22 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mp * potential risk of flagging false failures in the event * of a topology-related error (e.g. a SAS expander problem * causes a command addressed to a drive to fail), but - * avoiding getting into an infinite retry loop. + * avoiding getting into an infinite retry loop. However, + * if we get them while were moving a device, we should + * fail the request as 'not there' because the device + * is effectively gone. */ - mprsas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); + if (cm->cm_targ->flags & MPRSAS_TARGET_INREMOVAL) + mprsas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); + else + mprsas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); mpr_dprint(sc, MPR_INFO, - "Controller reported %s tgt %u SMID %u loginfo %x\n", + "Controller reported %s tgt %u SMID %u loginfo %x%s\n", mpr_describe_table(mpr_iocstatus_string, le16toh(rep->IOCStatus) & MPI2_IOCSTATUS_MASK), target_id, cm->cm_desc.Default.SMID, - le32toh(rep->IOCLogInfo)); + le32toh(rep->IOCLogInfo), + (cm->cm_targ->flags & MPRSAS_TARGET_INREMOVAL) ? " departing" : ""); mpr_dprint(sc, MPR_XINFO, "SCSIStatus %x SCSIState %x xfercount %u\n", rep->SCSIStatus, rep->SCSIState, @@ -2898,6 +2918,21 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mp if (mprsas_get_ccbstatus(ccb) != CAM_REQ_CMP) { ccb->ccb_h.status |= CAM_DEV_QFRZN; xpt_freeze_devq(ccb->ccb_h.path, /*count*/ 1); + } + + /* + * Check to see if we're removing the device. If so, and this is the + * last command on the queue, proceed with the deferred removal of the + * device. Note, for removing a volume, this won't trigger because + * pending_remove_tm will be NULL. + */ + if (cm->cm_targ->flags & MPRSAS_TARGET_INREMOVAL) { + if (TAILQ_FIRST(&cm->cm_targ->commands) == NULL && + cm->cm_targ->pending_remove_tm != NULL) { + mpr_dprint(sc, MPR_INFO, "Last pending command complete: starting remove_device\n"); + mpr_map_command(sc, cm->cm_targ->pending_remove_tm); + cm->cm_targ->pending_remove_tm = NULL; + } } mpr_free_command(sc, cm); Modified: head/sys/dev/mpr/mpr_sas.h ============================================================================== --- head/sys/dev/mpr/mpr_sas.h Tue Feb 25 03:35:52 2020 (r358307) +++ head/sys/dev/mpr/mpr_sas.h Tue Feb 25 04:27:23 2020 (r358308) @@ -64,6 +64,7 @@ struct mprsas_target { SLIST_HEAD(, mprsas_lun) luns; TAILQ_HEAD(, mpr_command) commands; struct mpr_command *tm; + struct mpr_command *pending_remove_tm; TAILQ_HEAD(, mpr_command) timedout_commands; uint16_t exp_dev_handle; uint16_t phy_num; Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Tue Feb 25 03:35:52 2020 (r358307) +++ head/sys/dev/mps/mps_sas.c Tue Feb 25 04:27:23 2020 (r358308) @@ -556,7 +556,6 @@ mpssas_remove_device(struct mps_softc *sc, struct mps_ MPI2_SCSI_TASK_MANAGE_REPLY *reply; MPI2_SAS_IOUNIT_CONTROL_REQUEST *req; struct mpssas_target *targ; - struct mps_command *next_cm; uint16_t handle; MPS_FUNCTRACE(sc); @@ -609,19 +608,22 @@ mpssas_remove_device(struct mps_softc *sc, struct mps_ tm->cm_complete = mpssas_remove_complete; tm->cm_complete_data = (void *)(uintptr_t)handle; - mps_map_command(sc, tm); + /* + * Wait to send the REMOVE_DEVICE until all the commands have cleared. + * They should be aborted or time out and we'll kick thus off there + * if so. + */ + if (TAILQ_FIRST(&targ->commands) == NULL) { + mps_dprint(sc, MPS_INFO, "No pending commands: starting remove_device\n"); + mps_map_command(sc, tm); + targ->pending_remove_tm = NULL; + } else { + targ->pending_remove_tm = tm; + } + mps_dprint(sc, MPS_XINFO, "clearing target %u handle 0x%04x\n", targ->tid, handle); - TAILQ_FOREACH_SAFE(tm, &targ->commands, cm_link, next_cm) { - union ccb *ccb; - - mps_dprint(sc, MPS_XINFO, "Completing missed command %p\n", tm); - ccb = tm->cm_complete_data; - mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); - tm->cm_state = MPS_CM_STATE_BUSY; - mpssas_scsiio_complete(sc, tm); - } } static void @@ -636,8 +638,17 @@ mpssas_remove_complete(struct mps_softc *sc, struct mp reply = (MPI2_SAS_IOUNIT_CONTROL_REPLY *)tm->cm_reply; handle = (uint16_t)(uintptr_t)tm->cm_complete_data; + targ = tm->cm_targ; /* + * At this point, we should have no pending commands for the target. + * The remove target has just completed. + */ + KASSERT(TAILQ_FIRST(&targ->commands) == NULL, + ("%s: no commands should be pending\n", __func__)); + + + /* * Currently there should be no way we can hit this case. It only * happens when we have a failure to allocate chain frames, and * task management commands don't have S/G lists. @@ -671,7 +682,6 @@ mpssas_remove_complete(struct mps_softc *sc, struct mp */ if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) == MPI2_IOCSTATUS_SUCCESS) { - targ = tm->cm_targ; targ->handle = 0x0; targ->encl_handle = 0x0; targ->encl_slot = 0x0; @@ -1713,13 +1723,17 @@ mpssas_action_scsiio(struct mpssas_softc *sassc, union /* * If devinfo is 0 this will be a volume. In that case don't tell CAM * that the volume has timed out. We want volumes to be enumerated - * until they are deleted/removed, not just failed. + * until they are deleted/removed, not just failed. In either event, + * we're removing the target due to a firmware event telling us + * the device is now gone (as opposed to some transient event). Since + * we're opting to remove failed devices from the OS's view, we need + * to propagate that status up the stack. */ if (targ->flags & MPSSAS_TARGET_INREMOVAL) { if (targ->devinfo == 0) mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); else - mpssas_set_ccbstatus(ccb, CAM_SEL_TIMEOUT); + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); xpt_done(ccb); return; } @@ -2352,15 +2366,22 @@ mpssas_scsiio_complete(struct mps_softc *sc, struct mp * potential risk of flagging false failures in the event * of a topology-related error (e.g. a SAS expander problem * causes a command addressed to a drive to fail), but - * avoiding getting into an infinite retry loop. + * avoiding getting into an infinite retry loop. However, + * if we get them while were moving a device, we should + * fail the request as 'not there' because the device + * is effectively gone. */ - mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); + if (cm->cm_targ->flags & MPSSAS_TARGET_INREMOVAL) + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); + else + mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); mps_dprint(sc, MPS_INFO, - "Controller reported %s tgt %u SMID %u loginfo %x\n", + "Controller reported %s tgt %u SMID %u loginfo %x%s\n", mps_describe_table(mps_iocstatus_string, le16toh(rep->IOCStatus) & MPI2_IOCSTATUS_MASK), target_id, cm->cm_desc.Default.SMID, - le32toh(rep->IOCLogInfo)); + le32toh(rep->IOCLogInfo), + (cm->cm_targ->flags & MPSSAS_TARGET_INREMOVAL) ? " departing" : ""); mps_dprint(sc, MPS_XINFO, "SCSIStatus %x SCSIState %x xfercount %u\n", rep->SCSIStatus, rep->SCSIState, @@ -2399,6 +2420,21 @@ mpssas_scsiio_complete(struct mps_softc *sc, struct mp if (mpssas_get_ccbstatus(ccb) != CAM_REQ_CMP) { ccb->ccb_h.status |= CAM_DEV_QFRZN; xpt_freeze_devq(ccb->ccb_h.path, /*count*/ 1); + } + + /* + * Check to see if we're removing the device. If so, and this is the + * last command on the queue, proceed with the deferred removal of the + * device. Note, for removing a volume, this won't trigger because + * pending_remove_tm will be NULL. + */ + if (cm->cm_targ->flags & MPSSAS_TARGET_INREMOVAL) { + if (TAILQ_FIRST(&cm->cm_targ->commands) == NULL && + cm->cm_targ->pending_remove_tm != NULL) { + mps_dprint(sc, MPS_INFO, "Last pending command complete: starting remove_device\n"); + mps_map_command(sc, cm->cm_targ->pending_remove_tm); + cm->cm_targ->pending_remove_tm = NULL; + } } mps_free_command(sc, cm); Modified: head/sys/dev/mps/mps_sas.h ============================================================================== --- head/sys/dev/mps/mps_sas.h Tue Feb 25 03:35:52 2020 (r358307) +++ head/sys/dev/mps/mps_sas.h Tue Feb 25 04:27:23 2020 (r358308) @@ -62,6 +62,7 @@ struct mpssas_target { SLIST_HEAD(, mpssas_lun) luns; TAILQ_HEAD(, mps_command) commands; struct mps_command *tm; + struct mps_command *pending_remove_tm; TAILQ_HEAD(, mps_command) timedout_commands; uint16_t exp_dev_handle; uint16_t phy_num; From owner-svn-src-head@freebsd.org Tue Feb 25 11:56:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4C3725954B; Tue, 25 Feb 2020 11:56:55 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RcqC2l4Nz47J4; Tue, 25 Feb 2020 11:56:55 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D982E033; Tue, 25 Feb 2020 11:56:55 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01PButYu030540; Tue, 25 Feb 2020 11:56:55 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PButWw030539; Tue, 25 Feb 2020 11:56:55 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202002251156.01PButWw030539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 25 Feb 2020 11:56:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358309 - head/tests/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/netpfil/pf X-SVN-Commit-Revision: 358309 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 11:56:55 -0000 Author: lwhsu Date: Tue Feb 25 11:56:54 2020 New Revision: 358309 URL: https://svnweb.freebsd.org/changeset/base/358309 Log: Temporarily skip failing test case sys.netpfil.pf.fragmentation.v6 PR: 244393 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/netpfil/pf/fragmentation.sh Modified: head/tests/sys/netpfil/pf/fragmentation.sh ============================================================================== --- head/tests/sys/netpfil/pf/fragmentation.sh Tue Feb 25 04:27:23 2020 (r358308) +++ head/tests/sys/netpfil/pf/fragmentation.sh Tue Feb 25 11:56:54 2020 (r358309) @@ -80,6 +80,10 @@ v6_head() v6_body() { + if [ "$(atf_config_get ci false)" = "true" ]; then + atf_skip "https://bugs.freebsd.org/244393" + fi + pft_init epair_send=$(vnet_mkepair) From owner-svn-src-head@freebsd.org Tue Feb 25 12:44:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5BAD825B089; Tue, 25 Feb 2020 12:44:22 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Rdsx2qmJz4BcJ; Tue, 25 Feb 2020 12:44:21 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 40EFA2E5C4; Tue, 25 Feb 2020 12:44:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [10.10.132.6] (ptr-8rg5e4hmmr2cl4by1m3.18120a2.ip6.access.telenet.be [IPv6:2a02:1811:2408:6002:cc78:83c6:b1e2:7ab]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id B110686E5; Tue, 25 Feb 2020 13:44:17 +0100 (CET) From: "Kristof Provost" To: "Hans Petter Selasky" Cc: "Bjoern A. Zeeb" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358167 - head/sys/netinet6 Date: Tue, 25 Feb 2020 13:44:17 +0100 X-Mailer: MailMate (1.13.1r5671) Message-ID: <963E6D27-9320-4F84-A3BB-A597C829AAAB@FreeBSD.org> In-Reply-To: <7d9ea227-7208-5773-080c-5ebc365c4be0@selasky.org> References: <202002201056.01KAuC0N029186@repo.freebsd.org> <7d9ea227-7208-5773-080c-5ebc365c4be0@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 12:44:22 -0000 On 24 Feb 2020, at 15:21, Hans Petter Selasky wrote: > On 2020-02-20 11:56, Bjoern A. Zeeb wrote: >> + >> + unfragpartlen = optlen + sizeof(struct ip6_hdr); >> + > > Hi Bjoren, > > This change introduces a slight regression when a host replies to IPv6 > ping fragmented packets. The problem is the "unfragpartlen" must also > be set in the else case of "if (opt)", else the payload offset > computation for IPv6 fragments goes wrong by the size of the IPv6 > header! > Confirmed, because the pf fragmentation:v6 test also fails on this. > After r358167: > >> ping6 -s 3000 fe80::ee0d:9aff:fed4:2c8c%mce2 >> PING6(3048=40+8+3000 bytes) fe80::ee0d:9aff:fed4:2c94%mce2 --> >> fe80::ee0d:9aff:fed4:2c8c%mce2 >> ^C >> --- fe80::ee0d:9aff:fed4:2c8c%mce2 ping6 statistics --- >> 2 packets transmitted, 0 packets received, 100.0% packet loss > > With the patch mentioned in the end of this e-mail: > >> ping6 -s 3000 fe80::ee0d:9aff:fed4:2c8c%mce2 >> PING6(3048=40+8+3000 bytes) fe80::ee0d:9aff:fed4:2c8c%mce2 --> >> fe80::ee0d:9aff:fed4:2c8c%mce2 >> 3008 bytes from fe80::ee0d:9aff:fed4:2c8c%mce2, icmp_seq=0 hlim=64 >> time=0.499 ms >> 3008 bytes from fe80::ee0d:9aff:fed4:2c8c%mce2, icmp_seq=1 hlim=64 >> time=0.405 ms >> 3008 bytes from fe80::ee0d:9aff:fed4:2c8c%mce2, icmp_seq=2 hlim=64 >> time=0.097 ms >> ^C >> --- fe80::ee0d:9aff:fed4:2c8c%mce2 ping6 statistics --- >> 3 packets transmitted, 3 packets received, 0.0% packet loss >> round-trip min/avg/max/std-dev = 0.097/0.334/0.499/0.172 ms > > Patch goes like this: > >> diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c >> index 06c57bcec48..a6c8d148833 100644 >> --- a/sys/netinet6/ip6_output.c >> +++ b/sys/netinet6/ip6_output.c >> @@ -459,7 +459,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts >> *opt, >> */ >> bzero(&exthdrs, sizeof(exthdrs)); >> optlen = 0; >> - unfragpartlen = 0; >> if (opt) { >> /* Hop-by-Hop options header. */ >> MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh, >> optlen); >> @@ -497,8 +496,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts >> *opt, >> /* Routing header. */ >> MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr, >> optlen); >> - unfragpartlen = optlen + sizeof(struct ip6_hdr); >> - >> /* >> * NOTE: we don't add AH/ESP length here (done in >> * ip6_ipsec_output()). >> @@ -508,6 +505,8 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts >> *opt, >> MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2, >> optlen); >> } >> + unfragpartlen = optlen + sizeof(struct ip6_hdr); >> + >> /* >> * If there is at least one extension header, >> * separate IP6 header from the payload. > And with this patch the test passes again. Regards, Kristof From owner-svn-src-head@freebsd.org Tue Feb 25 12:56:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B9E825B354; Tue, 25 Feb 2020 12:56:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Rf7V6fK4z4cNf; Tue, 25 Feb 2020 12:56:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1A59EBDC; Tue, 25 Feb 2020 12:56:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01PCu69H066726; Tue, 25 Feb 2020 12:56:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PCu6X8066725; Tue, 25 Feb 2020 12:56:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002251256.01PCu6X8066725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 25 Feb 2020 12:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358310 - head/sys/dev/usb/input X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/input X-SVN-Commit-Revision: 358310 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 12:56:07 -0000 Author: hselasky Date: Tue Feb 25 12:56:06 2020 New Revision: 358310 URL: https://svnweb.freebsd.org/changeset/base/358310 Log: Use hid_get_data_unsigned() instead of hid_get_data() when reading the key-codes from the USB keyboard. Negative key-codes are currently skipped. While at it use the bit size value provided by the HID location structure instead of assuming a value of 8. This fixes a regression issue after r357861. Reported by: Minoru TANABE PR: 224592 PR: 233884 MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Tue Feb 25 11:56:54 2020 (r358309) +++ head/sys/dev/usb/input/ukbd.c Tue Feb 25 12:56:06 2020 (r358310) @@ -702,13 +702,15 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t } else if (id != sc->sc_id_loc_key[i]) { continue; /* invalid HID ID */ } else if (i == 0) { - offset = sc->sc_loc_key[0].count; - if (offset < 0 || offset > len) - offset = len; - while (offset--) { + struct hid_location tmp_loc = sc->sc_loc_key[0]; + /* range check array size */ + if (tmp_loc.count > UKBD_NKEYCODE) + tmp_loc.count = UKBD_NKEYCODE; + while (tmp_loc.count--) { uint32_t key = - hid_get_data(sc->sc_buffer + offset, len - offset, - &sc->sc_loc_key[i]); + hid_get_data_unsigned(sc->sc_buffer, len, &tmp_loc); + /* advance to next location */ + tmp_loc.pos += tmp_loc.size; if (modifiers & MOD_FN) key = ukbd_apple_fn(key); if (sc->sc_flags & UKBD_FLAG_APPLE_SWAP) From owner-svn-src-head@freebsd.org Tue Feb 25 13:03:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B55B25B5A1; Tue, 25 Feb 2020 13:03:12 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RfHh2J3qz3KJl; Tue, 25 Feb 2020 13:03:12 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 1D1332E82F; Tue, 25 Feb 2020 13:03:12 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id E106A8D4A516; Tue, 25 Feb 2020 13:03:09 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id CA160E707C4; Tue, 25 Feb 2020 13:03:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id UAN3Y7N8seYe; Tue, 25 Feb 2020 13:03:08 +0000 (UTC) Received: from [169.254.231.217] (unknown [IPv6:fde9:577b:c1a9:4902:998:d647:456f:d093]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id DC540E707B5; Tue, 25 Feb 2020 13:03:06 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Kristof Provost" Cc: "Hans Petter Selasky" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358167 - head/sys/netinet6 Date: Tue, 25 Feb 2020 13:03:05 +0000 X-Mailer: MailMate (2.0BETAr6146) Message-ID: In-Reply-To: <963E6D27-9320-4F84-A3BB-A597C829AAAB@FreeBSD.org> References: <202002201056.01KAuC0N029186@repo.freebsd.org> <7d9ea227-7208-5773-080c-5ebc365c4be0@selasky.org> <963E6D27-9320-4F84-A3BB-A597C829AAAB@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 13:03:12 -0000 On 25 Feb 2020, at 12:44, Kristof Provost wrote: >> This change introduces a slight regression when a host replies to >> IPv6 ping fragmented packets. The problem is the "unfragpartlen" must >> also be set in the else case of "if (opt)", else the payload offset >> computation for IPv6 fragments goes wrong by the size of the IPv6 >> header! >> > Confirmed, because the pf fragmentation:v6 test also fails on this. >> Patch goes like this: >> >>> diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c >>> index 06c57bcec48..a6c8d148833 100644 >>> --- a/sys/netinet6/ip6_output.c >>> +++ b/sys/netinet6/ip6_output.c >>> @@ -459,7 +459,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts >>> *opt, >>> */ >>> bzero(&exthdrs, sizeof(exthdrs)); >>> optlen = 0; >>> - unfragpartlen = 0; >>> if (opt) { >>> /* Hop-by-Hop options header. */ >>> MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh, >>> optlen); >>> @@ -497,8 +496,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts >>> *opt, >>> /* Routing header. */ >>> MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr, >>> optlen); >>> - unfragpartlen = optlen + sizeof(struct ip6_hdr); >>> - >>> /* >>> * NOTE: we don't add AH/ESP length here (done in >>> * ip6_ipsec_output()). >>> @@ -508,6 +505,8 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts >>> *opt, >>> MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2, >>> optlen); >>> } >>> + unfragpartlen = optlen + sizeof(struct ip6_hdr); >>> + >>> /* >>> * If there is at least one extension header, >>> * separate IP6 header from the payload. >> > And with this patch the test passes again. And fails for other packets. The patch is wrong. Offset gets changed after we set unfragpartlen inside the block so moving it outside the block unfragpartlen may point to the wrong thing. Your tests are too simple to detect this problem. Try this one please: Index: ip6_output.c =================================================================== --- ip6_output.c (revision 358297) +++ ip6_output.c (working copy) @@ -497,7 +497,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *op */ bzero(&exthdrs, sizeof(exthdrs)); optlen = 0; - unfragpartlen = 0; + unfragpartlen = sizeof(struct ip6_hdr); if (opt) { /* Hop-by-Hop options header. */ MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh, optlen); @@ -535,7 +535,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *op /* Routing header. */ MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr, optlen); - unfragpartlen = optlen + sizeof(struct ip6_hdr); + unfragpartlen += optlen; /* * NOTE: we don't add AH/ESP length here (done in /bz From owner-svn-src-head@freebsd.org Tue Feb 25 15:03:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0702B25DBD4; Tue, 25 Feb 2020 15:03:42 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Rhyj6XDPz4KWj; Tue, 25 Feb 2020 15:03:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB8EC184F0; Tue, 25 Feb 2020 15:03:41 +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 01PF3ffX043656; Tue, 25 Feb 2020 15:03:41 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PF3fw2043655; Tue, 25 Feb 2020 15:03:41 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202002251503.01PF3fw2043655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 25 Feb 2020 15:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358311 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 358311 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 15:03:42 -0000 Author: bz Date: Tue Feb 25 15:03:41 2020 New Revision: 358311 URL: https://svnweb.freebsd.org/changeset/base/358311 Log: ip6_output: fix regression introduced in r358167 for ipv6 fragmentation When moving the calculations for the optlen into the if (opt) block which deals with possible extension headers I failed to initialise unfragpartlen to the ipv6 header length if there were no extension headers present. Correct that mistake to make IPv6 fragment length calculcations work again. Reported by: hselasky, kp OKed by: hselasky, kp MFC after: 3 days X-MFC with: r358167 PR: 244393 Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Tue Feb 25 12:56:06 2020 (r358310) +++ head/sys/netinet6/ip6_output.c Tue Feb 25 15:03:41 2020 (r358311) @@ -497,7 +497,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, */ bzero(&exthdrs, sizeof(exthdrs)); optlen = 0; - unfragpartlen = 0; + unfragpartlen = sizeof(struct ip6_hdr); if (opt) { /* Hop-by-Hop options header. */ MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh, optlen); @@ -535,7 +535,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, /* Routing header. */ MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr, optlen); - unfragpartlen = optlen + sizeof(struct ip6_hdr); + unfragpartlen += optlen; /* * NOTE: we don't add AH/ESP length here (done in From owner-svn-src-head@freebsd.org Tue Feb 25 17:19:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F8F62391E5; Tue, 25 Feb 2020 17:19:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Rlyr49YCz3QRV; Tue, 25 Feb 2020 17:19:00 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EB4919E10; Tue, 25 Feb 2020 17:19:00 +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 01PHIxuh024360; Tue, 25 Feb 2020 17:18:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PHIxfO024359; Tue, 25 Feb 2020 17:18:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002251718.01PHIxfO024359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 25 Feb 2020 17:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358314 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 358314 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 17:19:01 -0000 Author: emaste Date: Tue Feb 25 17:18:59 2020 New Revision: 358314 URL: https://svnweb.freebsd.org/changeset/base/358314 Log: style.9: update C99 commentary Make style.9 read as a current statement of C99 preferences, rather than a description of ongoing changes to our preferred style. Alsu use the short form "ISO C99" on the 2nd and later instances rather than repeating the unwieldy `ISO/IEC 9899:1999 ("ISO C99")` each time. Reviewed by: cem, imp, jhb, kib MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23648 Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Tue Feb 25 15:53:17 2020 (r358313) +++ head/share/man/man9/style.9 Tue Feb 25 17:18:59 2020 (r358314) @@ -301,11 +301,11 @@ is treated as #endif /* !COMPAT_43 */ .Ed .Pp -The project is slowly moving to use the +The project prefers the use of .St -isoC-99 unsigned integer identifiers of the form .Vt uintXX_t -in preference to the older +rather than the older .Bx Ns -style integer identifiers of the form .Vt u_intXX_t . @@ -317,10 +317,10 @@ Like white-space commits, care should be taken in maki .Vt uintXX_t only commits. .Pp -Similarly, the project is slowly moving to use the -.St -isoC-99 +Similarly, the project prefers the use of +ISO C99 .Vt bool -in preference to the older +rather than the older .Vt int or .Vt boolean_t . @@ -341,8 +341,8 @@ Userspace code should include while kernel code should include .In sys/types.h . .Pp -Likewise, the project is moving to using the -.St -isoC-99 +Likewise, the project prefers +ISO C99 designated initializers when it makes sense to do so. .Pp Enumeration values are all uppercase. From owner-svn-src-head@freebsd.org Tue Feb 25 17:26:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0AC55239583; Tue, 25 Feb 2020 17:26:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Rm783xk4z45m4; Tue, 25 Feb 2020 17:26: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C7861A022; Tue, 25 Feb 2020 17:26: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 01PHQBwj030266; Tue, 25 Feb 2020 17:26:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PHQA1g030260; Tue, 25 Feb 2020 17:26:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002251726.01PHQA1g030260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 25 Feb 2020 17:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358315 - in head/sys: amd64/amd64 dev/cpuctl i386/i386 x86/acpica x86/include x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 dev/cpuctl i386/i386 x86/acpica x86/include x86/x86 X-SVN-Commit-Revision: 358315 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 17:26:13 -0000 Author: kib Date: Tue Feb 25 17:26:10 2020 New Revision: 358315 URL: https://svnweb.freebsd.org/changeset/base/358315 Log: Fix IBRS for machines with IBRS_ALL capability. When turning IBRS mitigation using sysctl, as opposed to loader tunable, send IPI to tweak MSR on all cores. Right now code only performed MSR write onr the CPU where sysctl was run. Properly report hw.ibrs_active for IBRS_ALL. Split hw_ibrs_ibpb_active out from ibrs_active, to keep the current semantic of guiding kernel entry and exit handlers. Reported and tested by: mav Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/initcpu.c head/sys/amd64/amd64/support.S head/sys/dev/cpuctl/cpuctl.c head/sys/i386/i386/support.s head/sys/x86/acpica/acpi_wakeup.c head/sys/x86/include/x86_var.h head/sys/x86/x86/cpu_machdep.c Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Tue Feb 25 17:18:59 2020 (r358314) +++ head/sys/amd64/amd64/initcpu.c Tue Feb 25 17:26:10 2020 (r358315) @@ -255,7 +255,7 @@ initializecpu(void) wrmsr(MSR_EFER, msr); pg_nx = PG_NX; } - hw_ibrs_recalculate(); + hw_ibrs_recalculate(false); hw_ssb_recalculate(false); amd64_syscall_ret_flush_l1d_recalc(); switch (cpu_vendor_id) { Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Tue Feb 25 17:18:59 2020 (r358314) +++ head/sys/amd64/amd64/support.S Tue Feb 25 17:26:10 2020 (r358315) @@ -1632,7 +1632,7 @@ handle_ibrs_\l: /* all callers already saved %rax, %rdx, and %rcx */ ENTRY(handle_ibrs_entry) - cmpb $0,hw_ibrs_active(%rip) + cmpb $0,hw_ibrs_ibpb_active(%rip) je 1f movl $MSR_IA32_SPEC_CTRL,%ecx rdmsr Modified: head/sys/dev/cpuctl/cpuctl.c ============================================================================== --- head/sys/dev/cpuctl/cpuctl.c Tue Feb 25 17:18:59 2020 (r358314) +++ head/sys/dev/cpuctl/cpuctl.c Tue Feb 25 17:26:10 2020 (r358315) @@ -538,8 +538,8 @@ cpuctl_do_eval_cpu_features(int cpu, struct thread *td set_cpu(cpu, td); identify_cpu1(); identify_cpu2(); - hw_ibrs_recalculate(); restore_cpu(oldcpu, is_bound, td); + hw_ibrs_recalculate(true); hw_ssb_recalculate(true); #ifdef __amd64__ amd64_syscall_ret_flush_l1d_recalc(); Modified: head/sys/i386/i386/support.s ============================================================================== --- head/sys/i386/i386/support.s Tue Feb 25 17:18:59 2020 (r358314) +++ head/sys/i386/i386/support.s Tue Feb 25 17:26:10 2020 (r358315) @@ -446,7 +446,7 @@ msr_onfault: ret ENTRY(handle_ibrs_entry) - cmpb $0,hw_ibrs_active + cmpb $0,hw_ibrs_ibpb_active je 1f movl $MSR_IA32_SPEC_CTRL,%ecx rdmsr Modified: head/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- head/sys/x86/acpica/acpi_wakeup.c Tue Feb 25 17:18:59 2020 (r358314) +++ head/sys/x86/acpica/acpi_wakeup.c Tue Feb 25 17:26:10 2020 (r358315) @@ -244,7 +244,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) } #endif #ifdef __amd64__ - hw_ibrs_active = 0; + hw_ibrs_ibpb_active = 0; hw_ssb_active = 0; cpu_stdext_feature3 = 0; CPU_FOREACH(i) { Modified: head/sys/x86/include/x86_var.h ============================================================================== --- head/sys/x86/include/x86_var.h Tue Feb 25 17:18:59 2020 (r358314) +++ head/sys/x86/include/x86_var.h Tue Feb 25 17:26:10 2020 (r358315) @@ -90,7 +90,7 @@ extern uint64_t xsave_mask; extern u_int max_apic_id; extern int i386_read_exec; extern int pti; -extern int hw_ibrs_active; +extern int hw_ibrs_ibpb_active; extern int hw_mds_disable; extern int hw_ssb_active; extern int x86_taa_enable; @@ -134,7 +134,7 @@ int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); void handle_ibrs_entry(void); void handle_ibrs_exit(void); -void hw_ibrs_recalculate(void); +void hw_ibrs_recalculate(bool all_cpus); void hw_mds_recalculate(void); void hw_ssb_recalculate(bool all_cpus); void x86_taa_recalculate(void); Modified: head/sys/x86/x86/cpu_machdep.c ============================================================================== --- head/sys/x86/x86/cpu_machdep.c Tue Feb 25 17:18:59 2020 (r358314) +++ head/sys/x86/x86/cpu_machdep.c Tue Feb 25 17:26:10 2020 (r358315) @@ -871,7 +871,8 @@ nmi_handle_intr(u_int type, struct trapframe *frame) nmi_call_kdb(PCPU_GET(cpuid), type, frame); } -int hw_ibrs_active; +static int hw_ibrs_active; +int hw_ibrs_ibpb_active; int hw_ibrs_disable = 1; SYSCTL_INT(_hw, OID_AUTO, ibrs_active, CTLFLAG_RD, &hw_ibrs_active, 0, @@ -884,16 +885,19 @@ SYSCTL_INT(_machdep_mitigations_ibrs, OID_AUTO, active &hw_ibrs_active, 0, "Indirect Branch Restricted Speculation active"); void -hw_ibrs_recalculate(void) +hw_ibrs_recalculate(bool for_all_cpus) { if ((cpu_ia32_arch_caps & IA32_ARCH_CAP_IBRS_ALL) != 0) { - x86_msr_op(MSR_IA32_SPEC_CTRL, MSR_OP_LOCAL | - (hw_ibrs_disable ? MSR_OP_ANDNOT : MSR_OP_OR), + x86_msr_op(MSR_IA32_SPEC_CTRL, (for_all_cpus ? + MSR_OP_RENDEZVOUS : MSR_OP_LOCAL) | + (hw_ibrs_disable != 0 ? MSR_OP_ANDNOT : MSR_OP_OR), IA32_SPEC_CTRL_IBRS); - return; + hw_ibrs_active = hw_ibrs_disable == 0; + hw_ibrs_ibpb_active = 0; + } else { + hw_ibrs_active = hw_ibrs_ibpb_active = (cpu_stdext_feature3 & + CPUID_STDEXT3_IBPB) != 0 && !hw_ibrs_disable; } - hw_ibrs_active = (cpu_stdext_feature3 & CPUID_STDEXT3_IBPB) != 0 && - !hw_ibrs_disable; } static int @@ -906,7 +910,7 @@ hw_ibrs_disable_handler(SYSCTL_HANDLER_ARGS) if (error != 0 || req->newptr == NULL) return (error); hw_ibrs_disable = val != 0; - hw_ibrs_recalculate(); + hw_ibrs_recalculate(true); return (0); } SYSCTL_PROC(_hw, OID_AUTO, ibrs_disable, CTLTYPE_INT | CTLFLAG_RWTUN | From owner-svn-src-head@freebsd.org Tue Feb 25 19:04:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 403E523C1E3; Tue, 25 Feb 2020 19:04:41 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RpJn0c9tz4XgS; Tue, 25 Feb 2020 19:04:41 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1029F1B365; Tue, 25 Feb 2020 19:04:41 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01PJ4eIx089851; Tue, 25 Feb 2020 19:04:40 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PJ4ePj089846; Tue, 25 Feb 2020 19:04:40 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002251904.01PJ4ePj089846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Tue, 25 Feb 2020 19:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358316 - in head/sys: dev/xen/balloon dev/xen/blkfront dev/xen/netback dev/xen/xenstore xen/xenbus X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: in head/sys: dev/xen/balloon dev/xen/blkfront dev/xen/netback dev/xen/xenstore xen/xenbus X-SVN-Commit-Revision: 358316 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 19:04:41 -0000 Author: kaktus Date: Tue Feb 25 19:04:39 2020 New Revision: 358316 URL: https://svnweb.freebsd.org/changeset/base/358316 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (16 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. Reviewed by: royger Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23638 Modified: head/sys/dev/xen/balloon/balloon.c head/sys/dev/xen/blkfront/blkfront.c head/sys/dev/xen/netback/netback.c head/sys/dev/xen/xenstore/xenstore.c head/sys/xen/xenbus/xenbusb.c Modified: head/sys/dev/xen/balloon/balloon.c ============================================================================== --- head/sys/dev/xen/balloon/balloon.c Tue Feb 25 17:26:10 2020 (r358315) +++ head/sys/dev/xen/balloon/balloon.c Tue Feb 25 19:04:39 2020 (r358316) @@ -79,7 +79,9 @@ static struct balloon_stats balloon_stats; #define bs balloon_stats SYSCTL_DECL(_dev_xen); -static SYSCTL_NODE(_dev_xen, OID_AUTO, balloon, CTLFLAG_RD, NULL, "Balloon"); +static SYSCTL_NODE(_dev_xen, OID_AUTO, balloon, + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, + "Balloon"); SYSCTL_ULONG(_dev_xen_balloon, OID_AUTO, current, CTLFLAG_RD, &bs.current_pages, 0, "Current allocation"); SYSCTL_ULONG(_dev_xen_balloon, OID_AUTO, target, CTLFLAG_RD, Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Tue Feb 25 17:26:10 2020 (r358315) +++ head/sys/dev/xen/blkfront/blkfront.c Tue Feb 25 19:04:39 2020 (r358316) @@ -83,7 +83,8 @@ static void xbd_startio(struct xbd_softc *sc); static MALLOC_DEFINE(M_XENBLOCKFRONT, "xbd", "Xen Block Front driver data"); static int xbd_enable_indirect = 1; -SYSCTL_NODE(_hw, OID_AUTO, xbd, CTLFLAG_RD, 0, "xbd driver parameters"); +SYSCTL_NODE(_hw, OID_AUTO, xbd, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "xbd driver parameters"); SYSCTL_INT(_hw_xbd, OID_AUTO, xbd_enable_indirect, CTLFLAG_RDTUN, &xbd_enable_indirect, 0, "Enable xbd indirect segments"); @@ -926,8 +927,8 @@ xbd_setup_sysctl(struct xbd_softc *xbd) "communication channel pages (negotiated)"); SYSCTL_ADD_PROC(sysctl_ctx, children, OID_AUTO, - "features", CTLTYPE_STRING|CTLFLAG_RD, xbd, 0, - xbd_sysctl_features, "A", "protocol features (negotiated)"); + "features", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, xbd, + 0, xbd_sysctl_features, "A", "protocol features (negotiated)"); } /* Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Tue Feb 25 17:26:10 2020 (r358315) +++ head/sys/dev/xen/netback/netback.c Tue Feb 25 19:04:39 2020 (r358316) @@ -1157,7 +1157,7 @@ xnb_setup_sysctl(struct xnb_softc *xnb) SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "unit_test_results", - CTLTYPE_STRING | CTLFLAG_RD, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, xnb, 0, xnb_unit_test_main, @@ -1168,7 +1168,7 @@ xnb_setup_sysctl(struct xnb_softc *xnb) SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "dump_rings", - CTLTYPE_STRING | CTLFLAG_RD, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, xnb, 0, xnb_dump_rings, Modified: head/sys/dev/xen/xenstore/xenstore.c ============================================================================== --- head/sys/dev/xen/xenstore/xenstore.c Tue Feb 25 17:26:10 2020 (r358315) +++ head/sys/dev/xen/xenstore/xenstore.c Tue Feb 25 19:04:39 2020 (r358316) @@ -1241,7 +1241,8 @@ DRIVER_MODULE(xenstore, xenpv, xenstore_driver, xensto /*------------------------------- Sysctl Data --------------------------------*/ /* XXX Shouldn't the node be somewhere else? */ -SYSCTL_NODE(_dev, OID_AUTO, xen, CTLFLAG_RD, NULL, "Xen"); +SYSCTL_NODE(_dev, OID_AUTO, xen, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, + "Xen"); SYSCTL_INT(_dev_xen, OID_AUTO, xsd_port, CTLFLAG_RD, &xs.evtchn, 0, ""); SYSCTL_ULONG(_dev_xen, OID_AUTO, xsd_kva, CTLFLAG_RD, (u_long *) &xen_store, 0, ""); Modified: head/sys/xen/xenbus/xenbusb.c ============================================================================== --- head/sys/xen/xenbus/xenbusb.c Tue Feb 25 17:26:10 2020 (r358315) +++ head/sys/xen/xenbus/xenbusb.c Tue Feb 25 19:04:39 2020 (r358316) @@ -351,7 +351,7 @@ xenbusb_device_sysctl_init(device_t dev) SYSCTL_CHILDREN(tree), OID_AUTO, "xenstore_path", - CTLTYPE_STRING | CTLFLAG_RD, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, XENBUS_IVAR_NODE, xenbusb_device_sysctl_handler, @@ -362,7 +362,7 @@ xenbusb_device_sysctl_init(device_t dev) SYSCTL_CHILDREN(tree), OID_AUTO, "xenbus_dev_type", - CTLTYPE_STRING | CTLFLAG_RD, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, XENBUS_IVAR_TYPE, xenbusb_device_sysctl_handler, @@ -373,7 +373,7 @@ xenbusb_device_sysctl_init(device_t dev) SYSCTL_CHILDREN(tree), OID_AUTO, "xenbus_connection_state", - CTLTYPE_STRING | CTLFLAG_RD, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, XENBUS_IVAR_STATE, xenbusb_device_sysctl_handler, @@ -384,7 +384,7 @@ xenbusb_device_sysctl_init(device_t dev) SYSCTL_CHILDREN(tree), OID_AUTO, "xenbus_peer_domid", - CTLTYPE_INT | CTLFLAG_RD, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, XENBUS_IVAR_OTHEREND_ID, xenbusb_device_sysctl_handler, @@ -395,7 +395,7 @@ xenbusb_device_sysctl_init(device_t dev) SYSCTL_CHILDREN(tree), OID_AUTO, "xenstore_peer_path", - CTLTYPE_STRING | CTLFLAG_RD, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, XENBUS_IVAR_OTHEREND_PATH, xenbusb_device_sysctl_handler, From owner-svn-src-head@freebsd.org Tue Feb 25 19:11:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D44C23C426; Tue, 25 Feb 2020 19:11:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RpSV026lz4m50; Tue, 25 Feb 2020 19:11:22 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 832481B3F7; Tue, 25 Feb 2020 19:11:21 +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 01PJBL6J091876; Tue, 25 Feb 2020 19:11:21 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PJBLDP091875; Tue, 25 Feb 2020 19:11:21 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202002251911.01PJBLDP091875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 25 Feb 2020 19:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358317 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358317 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 19:11:22 -0000 Author: glebius Date: Tue Feb 25 19:11:20 2020 New Revision: 358317 URL: https://svnweb.freebsd.org/changeset/base/358317 Log: When sendfile_swapin() sweeps through pages in search for a bogus page skip first and last pages. This is a micro optimisation. Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Tue Feb 25 19:04:39 2020 (r358316) +++ head/sys/kern/kern_sendfile.c Tue Feb 25 19:11:20 2020 (r358317) @@ -462,7 +462,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i * Restore the valid page pointers. They are already * unbusied, but still wired. */ - for (j = i; j < i + count; j++) + for (j = i + 1; j < i + count - 1; j++) if (pa[j] == bogus_page) { pa[j] = vm_page_lookup(obj, OFF_TO_IDX(vmoff(j, off))); From owner-svn-src-head@freebsd.org Tue Feb 25 19:12:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E38623C74E; Tue, 25 Feb 2020 19:12:41 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RpV116Skz4nNT; Tue, 25 Feb 2020 19:12:41 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C4A81B571; Tue, 25 Feb 2020 19:12:41 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01PJCe3p096129; Tue, 25 Feb 2020 19:12:40 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PJCeSK096128; Tue, 25 Feb 2020 19:12:40 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002251912.01PJCeSK096128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Tue, 25 Feb 2020 19:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358318 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358318 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 19:12:41 -0000 Author: kaktus Date: Tue Feb 25 19:12:40 2020 New Revision: 358318 URL: https://svnweb.freebsd.org/changeset/base/358318 Log: SYSCTL_ROOT_NODE should use the SYSCTL_ENFORCE_FLAGS macro too. Approved by: kib (mentor, blanket) Modified: head/sys/sys/sysctl.h Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Tue Feb 25 19:11:20 2020 (r358317) +++ head/sys/sys/sysctl.h Tue Feb 25 19:12:40 2020 (r358318) @@ -324,6 +324,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); SYSCTL_OID_RAW(sysctl___##name, &sysctl__children, \ nbr, #name, CTLTYPE_NODE|(access), NULL, 0, \ handler, "N", descr, NULL); \ + SYSCTL_ENFORCE_FLAGS(access); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_NODE) From owner-svn-src-head@freebsd.org Tue Feb 25 19:26:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE13E23CE09; Tue, 25 Feb 2020 19:26:42 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RppB2CPDz3JbN; Tue, 25 Feb 2020 19:26:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C09351B779; Tue, 25 Feb 2020 19:26:41 +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 01PJQfl7002207; Tue, 25 Feb 2020 19:26:41 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PJQeko002202; Tue, 25 Feb 2020 19:26:40 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202002251926.01PJQeko002202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 25 Feb 2020 19:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358319 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 358319 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 19:26:42 -0000 Author: glebius Date: Tue Feb 25 19:26:40 2020 New Revision: 358319 URL: https://svnweb.freebsd.org/changeset/base/358319 Log: Make ktls_frame() never fail. Caller must supply correct mbufs. This makes sendfile code a bit simplier. Modified: head/sys/kern/kern_sendfile.c head/sys/kern/uipc_ktls.c head/sys/kern/uipc_socket.c head/sys/sys/ktls.h Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Tue Feb 25 19:12:40 2020 (r358318) +++ head/sys/kern/kern_sendfile.c Tue Feb 25 19:26:40 2020 (r358319) @@ -1046,12 +1046,8 @@ prepend_header: CURVNET_SET(so->so_vnet); #ifdef KERN_TLS - if (tls != NULL) { - error = ktls_frame(m, tls, &tls_enq_cnt, - TLS_RLTYPE_APP); - if (error != 0) - goto done; - } + if (tls != NULL) + ktls_frame(m, tls, &tls_enq_cnt, TLS_RLTYPE_APP); #endif if (nios == 0) { /* Modified: head/sys/kern/uipc_ktls.c ============================================================================== --- head/sys/kern/uipc_ktls.c Tue Feb 25 19:12:40 2020 (r358318) +++ head/sys/kern/uipc_ktls.c Tue Feb 25 19:26:40 2020 (r358319) @@ -1231,7 +1231,7 @@ ktls_seq(struct sockbuf *sb, struct mbuf *m) * encryption. The returned value should be passed to ktls_enqueue * when scheduling encryption of this chain of mbufs. */ -int +void ktls_frame(struct mbuf *top, struct ktls_session *tls, int *enq_cnt, uint8_t record_type) { @@ -1250,10 +1250,8 @@ ktls_frame(struct mbuf *top, struct ktls_session *tls, * records whose payload does not exceed the maximum * frame length. */ - if (m->m_len > maxlen || m->m_len == 0) - return (EINVAL); - tls_len = m->m_len; - + KASSERT(m->m_len <= maxlen && m->m_len > 0, + ("ktls_frame: m %p len %d\n", m, m->m_len)); /* * TLS frames require unmapped mbufs to store session * info. @@ -1261,6 +1259,7 @@ ktls_frame(struct mbuf *top, struct ktls_session *tls, KASSERT((m->m_flags & M_NOMAP) != 0, ("ktls_frame: mapped mbuf %p (top = %p)\n", m, top)); + tls_len = m->m_len; pgs = m->m_ext.ext_pgs; /* Save a reference to the session. */ @@ -1346,7 +1345,6 @@ ktls_frame(struct mbuf *top, struct ktls_session *tls, *enq_cnt += pgs->npgs; } } - return (0); } void Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Feb 25 19:12:40 2020 (r358318) +++ head/sys/kern/uipc_socket.c Tue Feb 25 19:26:40 2020 (r358319) @@ -1591,12 +1591,8 @@ restart: M_NOMAP | ((flags & MSG_EOR) ? M_EOR : 0)); if (top != NULL) { - error = ktls_frame(top, tls, + ktls_frame(top, tls, &tls_enq_cnt, tls_rtype); - if (error) { - m_freem(top); - goto release; - } } tls_rtype = TLS_RLTYPE_APP; } else Modified: head/sys/sys/ktls.h ============================================================================== --- head/sys/sys/ktls.h Tue Feb 25 19:12:40 2020 (r358318) +++ head/sys/sys/ktls.h Tue Feb 25 19:26:40 2020 (r358319) @@ -177,7 +177,7 @@ int ktls_crypto_backend_register(struct ktls_crypto_ba int ktls_crypto_backend_deregister(struct ktls_crypto_backend *be); int ktls_enable_tx(struct socket *so, struct tls_enable *en); void ktls_destroy(struct ktls_session *tls); -int ktls_frame(struct mbuf *m, struct ktls_session *tls, int *enqueue_cnt, +void ktls_frame(struct mbuf *m, struct ktls_session *tls, int *enqueue_cnt, uint8_t record_type); void ktls_seq(struct sockbuf *sb, struct mbuf *m); void ktls_enqueue(struct mbuf *m, struct socket *so, int page_count); From owner-svn-src-head@freebsd.org Tue Feb 25 19:29:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7267E23CFED; Tue, 25 Feb 2020 19:29:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Rprz1XlLz3M3p; Tue, 25 Feb 2020 19:29:07 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7768E1B788; Tue, 25 Feb 2020 19:29:06 +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 01PJT6gx002359; Tue, 25 Feb 2020 19:29:06 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PJT6Qk002358; Tue, 25 Feb 2020 19:29:06 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202002251929.01PJT6Qk002358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 25 Feb 2020 19:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358320 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358320 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 19:29:09 -0000 Author: glebius Date: Tue Feb 25 19:29:05 2020 New Revision: 358320 URL: https://svnweb.freebsd.org/changeset/base/358320 Log: Generalize resources freeing in sendfile with different scenarios. Now we execute sendfile_iodone() in all possible cases, which guarantees that vm_object_pip_wakeup() is called and sfio structure is freed. At the beginning of sendfile initialize sfio->m to NULL, that would indicate that the mbuf chain either doesn't exist, or belongs to the syscall (not to I/O completion). Fill sfio->m only at a point when we are positive that there are I/Os ongoing and before releasing syscall's reference on sfio. In sendfile_iodone() perform vm_object_pip_wakeup() once last reference is released, then check for sfio->m. NULL pointer indicates that we need only to free the memory. Reviewed by: jtl, gallatin Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Tue Feb 25 19:26:40 2020 (r358319) +++ head/sys/kern/kern_sendfile.c Tue Feb 25 19:29:05 2020 (r358320) @@ -258,7 +258,7 @@ static void sendfile_iodone(void *arg, vm_page_t *pg, int count, int error) { struct sf_io *sfio = arg; - struct socket *so = sfio->so; + struct socket *so; for (int i = 0; i < count; i++) if (pg[i] != bogus_page) @@ -272,12 +272,15 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i vm_object_pip_wakeup(sfio->obj); - if (__predict_false(sfio->error && sfio->m == NULL)) { + if (sfio->m == NULL) { /* - * I/O operation failed, but pru_send hadn't been executed - - * nothing had been sent to the socket. The syscall has - * returned error to the user. + * Either I/O operation failed, or we failed to allocate + * buffers, or we bailed out on first busy page, or we + * succeeded filling the request without any I/Os. Anyway, + * pru_send hadn't been executed - nothing had been sent + * to the socket yet. */ + MPASS((curthread->td_pflags & TDP_KTHREAD) == 0); free(sfio, M_TEMP); return; } @@ -291,6 +294,7 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i KASSERT(sfio->tls == NULL, ("non-ext_pgs mbuf with TLS session")); #endif + so = sfio->so; CURVNET_SET(so->so_vnet); if (__predict_false(sfio->error)) { /* @@ -663,7 +667,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *h for (off = offset; rem > 0; ) { struct sf_io *sfio; vm_page_t *pa; - struct mbuf *mtail; + struct mbuf *m0, *mtail; int nios, space, npages, rhpages; mtail = NULL; @@ -819,11 +823,9 @@ retry_space: sfio = malloc(sizeof(struct sf_io) + npages * sizeof(vm_page_t), M_TEMP, M_WAITOK); refcount_init(&sfio->nios, 1); - sfio->so = so; sfio->obj = obj; sfio->error = 0; - vm_object_pip_add(obj, 1); - + sfio->m = NULL; #ifdef KERN_TLS /* * This doesn't use ktls_hold() because sfio->m will @@ -832,13 +834,12 @@ retry_space: */ sfio->tls = tls; #endif - + vm_object_pip_add(obj, 1); error = sendfile_swapin(obj, sfio, &nios, off, space, npages, rhpages, flags); if (error != 0) { if (vp != NULL) VOP_UNLOCK(vp); - sfio->m = NULL; sendfile_iodone(sfio, NULL, 0, error); goto done; } @@ -876,8 +877,6 @@ retry_space: } for (int i = 0; i < npages; i++) { - struct mbuf *m0; - /* * If a page wasn't grabbed successfully, then * trim the array. Can happen only with SF_NODISKIO. @@ -922,8 +921,6 @@ retry_space: mtx_unlock(&sfs->mtx); } ext_pgs = m0->m_ext.ext_pgs; - if (i == 0) - sfio->m = m0; ext_pgs_idx = 0; /* Append to mbuf chain. */ @@ -1006,9 +1003,6 @@ retry_space: (vmoff(i, off) & PAGE_MASK); m0->m_len = xfsize(i, npages, off, space); - if (i == 0) - sfio->m = m0; - /* Append to mbuf chain. */ if (mtail != NULL) mtail->m_next = m0; @@ -1024,18 +1018,22 @@ retry_space: off += space; rem -= space; - /* Prepend header, if any. */ + /* + * Prepend header, if any. Save pointer to first mbuf + * with a page. + */ if (hdrlen) { prepend_header: - mhtail->m_next = m; + m0 = mhtail->m_next = m; m = mh; mh = NULL; - } + } else + m0 = m; if (m == NULL) { KASSERT(softerr, ("%s: m NULL, no error", __func__)); error = softerr; - free(sfio, M_TEMP); + sendfile_iodone(sfio, NULL, 0, 0); goto done; } @@ -1052,14 +1050,13 @@ prepend_header: if (nios == 0) { /* * If sendfile_swapin() didn't initiate any I/Os, - * which happens if all data is cached in VM, then - * we can send data right now without the - * PRUS_NOTREADY flag. + * which happens if all data is cached in VM, or if + * the header consumed all socket buffer space and + * sfio is NULL, then we can send data right now + * without the PRUS_NOTREADY flag. */ - if (sfio != NULL) { - vm_object_pip_wakeup(sfio->obj); - free(sfio, M_TEMP); - } + if (sfio != NULL) + sendfile_iodone(sfio, NULL, 0, 0); #ifdef KERN_TLS if (tls != NULL && tls->mode == TCP_TLS_MODE_SW) { error = (*so->so_proto->pr_usrreqs->pru_send) @@ -1071,6 +1068,8 @@ prepend_header: error = (*so->so_proto->pr_usrreqs->pru_send) (so, 0, m, NULL, NULL, td); } else { + sfio->so = so; + sfio->m = m0; sfio->npages = npages; soref(so); error = (*so->so_proto->pr_usrreqs->pru_send) From owner-svn-src-head@freebsd.org Tue Feb 25 20:02:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1481A23DEFA; Tue, 25 Feb 2020 20:02:33 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RqbX6sWFz3Clc; Tue, 25 Feb 2020 20:02:32 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [172.17.133.228] (unknown [12.202.168.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 4B4A51C43; Tue, 25 Feb 2020 20:02:32 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.22.0.200209 Date: Tue, 25 Feb 2020 12:02:29 -0800 Subject: Re: svn commit: r358317 - head/sys/kern From: Ravi Pokala To: Gleb Smirnoff , , , Message-ID: <23A820B4-2E13-4E3E-B734-C7950298C286@panasas.com> Thread-Topic: svn commit: r358317 - head/sys/kern References: <202002251911.01PJBLDP091875@repo.freebsd.org> In-Reply-To: <202002251911.01PJBLDP091875@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 20:02:33 -0000 -----Original Message----- From: on behalf of Gleb Smirnoff Date: 2020-02-25, Tuesday at 11:11 To: , , Subject: svn commit: r358317 - head/sys/kern Author: glebius Date: Tue Feb 25 19:11:20 2020 New Revision: 358317 URL: https://svnweb.freebsd.org/changeset/base/358317 Log: When sendfile_swapin() sweeps through pages in search for a bogus page skip first and last pages. This is a micro optimisation. Yes, but *why* skip the first and last pages? -Ravi Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Tue Feb 25 19:04:39 2020 (r358316) +++ head/sys/kern/kern_sendfile.c Tue Feb 25 19:11:20 2020 (r358317) @@ -462,7 +462,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i * Restore the valid page pointers. They are already * unbusied, but still wired. */ - for (j = i; j < i + count; j++) + for (j = i + 1; j < i + count - 1; j++) if (pa[j] == bogus_page) { pa[j] = vm_page_lookup(obj, OFF_TO_IDX(vmoff(j, off))); From owner-svn-src-head@freebsd.org Tue Feb 25 22:03:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98A2A241E23; Tue, 25 Feb 2020 22:03:31 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RtH73dTNz41nr; Tue, 25 Feb 2020 22:03:31 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75EC51D5B3; Tue, 25 Feb 2020 22:03:31 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01PM3VJU002390; Tue, 25 Feb 2020 22:03:31 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PM3UmJ002387; Tue, 25 Feb 2020 22:03:30 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202002252203.01PM3UmJ002387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Tue, 25 Feb 2020 22:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358322 - in head/sys: contrib/ncsw/inc contrib/ncsw/user/env dev/dpaa X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head/sys: contrib/ncsw/inc contrib/ncsw/user/env dev/dpaa X-SVN-Commit-Revision: 358322 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 22:03:31 -0000 Author: bdragon Date: Tue Feb 25 22:03:30 2020 New Revision: 358322 URL: https://svnweb.freebsd.org/changeset/base/358322 Log: [PowerPC] [Book-E] Remove obsolete interrupt binding workaround Remove an old workaround that is no longer necessary since rS343824. There used to be a problem with FMan interrupts firing on multiple CPUS at the same time. This ended up being due to multicast interrupts being unsupported in the Freescale PIC (so instead of using a selection algorithm, it would do some unspecified action, such as interrupting multiple cpus at random.) Reviewed by: jhibbits Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D23829 Modified: head/sys/contrib/ncsw/inc/xx_ext.h head/sys/contrib/ncsw/user/env/xx.c head/sys/dev/dpaa/fman.c Modified: head/sys/contrib/ncsw/inc/xx_ext.h ============================================================================== --- head/sys/contrib/ncsw/inc/xx_ext.h Tue Feb 25 21:02:52 2020 (r358321) +++ head/sys/contrib/ncsw/inc/xx_ext.h Tue Feb 25 22:03:30 2020 (r358322) @@ -794,5 +794,4 @@ t_Error XX_IpcSendMessage(t_Handle h_Session void XX_PortalSetInfo(device_t dev); -void XX_FmanFixIntr(int irq); #endif /* __XX_EXT_H */ Modified: head/sys/contrib/ncsw/user/env/xx.c ============================================================================== --- head/sys/contrib/ncsw/user/env/xx.c Tue Feb 25 21:02:52 2020 (r358321) +++ head/sys/contrib/ncsw/user/env/xx.c Tue Feb 25 22:03:30 2020 (r358322) @@ -95,7 +95,6 @@ MTX_SYSINIT(XX_MallocTrackLockInit, &XX_MallocTrackLoc /* Interrupt info */ #define XX_INTR_FLAG_PREALLOCATED (1 << 0) -#define XX_INTR_FLAG_FMAN_FIX (1 << 1) struct XX_IntrInfo { driver_intr_t *handler; @@ -295,23 +294,6 @@ XX_IsPortalIntr(uintptr_t irq) return (0); } -void -XX_FmanFixIntr(int irq) -{ - - XX_IntrInfo[irq].flags |= XX_INTR_FLAG_FMAN_FIX; -} - -static bool -XX_FmanNeedsIntrFix(int irq) -{ - - if (XX_IntrInfo[irq].flags & XX_INTR_FLAG_FMAN_FIX) - return (1); - - return (0); -} - static void XX_Dispatch(void *arg) { @@ -398,21 +380,7 @@ XX_SetIntr(uintptr_t irq, t_Isr *f_Isr, t_Handle handl err = bus_setup_intr(dev, r, flags, NULL, f_Isr, handle, &XX_IntrInfo[irq].cookie); - if (err) - goto finish; - /* - * XXX: Bind FMan IRQ to CPU0. Current interrupt subsystem directs each - * interrupt to all CPUs. Race between an interrupt assertion and - * masking may occur and interrupt handler may be called multiple times - * per one interrupt. FMan doesn't support such a situation. Workaround - * is to bind FMan interrupt to one CPU0 only. - */ -#ifdef SMP - if (XX_FmanNeedsIntrFix(irq)) - err = powerpc_bind_intr(irq, 0); -#endif -finish: return (err); } Modified: head/sys/dev/dpaa/fman.c ============================================================================== --- head/sys/dev/dpaa/fman.c Tue Feb 25 21:02:52 2020 (r358321) +++ head/sys/dev/dpaa/fman.c Tue Feb 25 22:03:30 2020 (r358322) @@ -455,13 +455,6 @@ fman_attach(device_t dev) goto err; } - /* - * XXX: Fix FMan interrupt. This is workaround for the issue with - * interrupts directed to multiple CPUs by the interrupts subsystem. - * Workaround is to bind the interrupt to only one CPU0. - */ - XX_FmanFixIntr(rman_get_start(sc->irq_res)); - sc->err_irq_rid = 1; sc->err_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->err_irq_rid, RF_ACTIVE | RF_SHAREABLE); From owner-svn-src-head@freebsd.org Tue Feb 25 22:15:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6EE3E2423AE; Tue, 25 Feb 2020 22:15:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RtXt0GRSz4Qkq; Tue, 25 Feb 2020 22:15:26 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C7ECD1D791; Tue, 25 Feb 2020 22:15:25 +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 01PMFPJK008599; Tue, 25 Feb 2020 22:15:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01PMFP4Q008598; Tue, 25 Feb 2020 22:15:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002252215.01PMFP4Q008598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 25 Feb 2020 22:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358323 - head/crypto/openssh X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/crypto/openssh X-SVN-Commit-Revision: 358323 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 22:15:26 -0000 Author: emaste Date: Tue Feb 25 22:15:25 2020 New Revision: 358323 URL: https://svnweb.freebsd.org/changeset/base/358323 Log: Add a note about deleted files in OpenSSH upgrade instructions Modified: head/crypto/openssh/FREEBSD-upgrade Modified: head/crypto/openssh/FREEBSD-upgrade ============================================================================== --- head/crypto/openssh/FREEBSD-upgrade Tue Feb 25 22:03:30 2020 (r358322) +++ head/crypto/openssh/FREEBSD-upgrade Tue Feb 25 22:15:25 2020 (r358323) @@ -46,6 +46,11 @@ $ svn merge -cNNNNNN \^/vendor-crypto/openssh/dist . + A number of files have been deleted from FreeBSD's copy of ssh, + including rendered man pages (which have a .0 extension). When + svn prompts for these deleted files during the merge, choose 'r' + (leaving them deleted). + 0A) Resolve conflicts. Remember to bump the version addendum in version.h, and update the default value in ssh{,d}_config and ssh{,d}_config.5. From owner-svn-src-head@freebsd.org Wed Feb 26 04:54:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16DBA24B5F7; Wed, 26 Feb 2020 04:54:53 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48S3Pm22Kyz4Xwl; Wed, 26 Feb 2020 04:54:52 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36F4522144; Wed, 26 Feb 2020 04:54:51 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01Q4spuL047464; Wed, 26 Feb 2020 04:54:51 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01Q4spSQ047463; Wed, 26 Feb 2020 04:54:51 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202002260454.01Q4spSQ047463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 26 Feb 2020 04:54:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358324 - head/tests/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/netpfil/pf X-SVN-Commit-Revision: 358324 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 04:54:53 -0000 Author: lwhsu Date: Wed Feb 26 04:54:50 2020 New Revision: 358324 URL: https://svnweb.freebsd.org/changeset/base/358324 Log: Revert r358309 after r358311. PR: 244393 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/netpfil/pf/fragmentation.sh Modified: head/tests/sys/netpfil/pf/fragmentation.sh ============================================================================== --- head/tests/sys/netpfil/pf/fragmentation.sh Tue Feb 25 22:15:25 2020 (r358323) +++ head/tests/sys/netpfil/pf/fragmentation.sh Wed Feb 26 04:54:50 2020 (r358324) @@ -80,10 +80,6 @@ v6_head() v6_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/244393" - fi - pft_init epair_send=$(vnet_mkepair) From owner-svn-src-head@freebsd.org Wed Feb 26 08:47:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A83F250F5C; Wed, 26 Feb 2020 08:47:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48S8Yz38Lcz4MCj; Wed, 26 Feb 2020 08:47:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 64DD824B3B; Wed, 26 Feb 2020 08:47:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01Q8lJMe084509; Wed, 26 Feb 2020 08:47:19 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01Q8lI61084506; Wed, 26 Feb 2020 08:47:18 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202002260847.01Q8lI61084506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 26 Feb 2020 08:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358325 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 358325 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 08:47:19 -0000 Author: kp Date: Wed Feb 26 08:47:18 2020 New Revision: 358325 URL: https://svnweb.freebsd.org/changeset/base/358325 Log: bridge: Move locking defines into if_bridge.c The locking defines for if_bridge used to live in if_bridgevar.h, but they're only ever used by the bridge implementation itself (in if_bridge.c). Moving them into the .c file. Reported by: philip, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23808 Modified: head/sys/net/if_bridge.c head/sys/net/if_bridgevar.h Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Wed Feb 26 04:54:50 2020 (r358324) +++ head/sys/net/if_bridge.c Wed Feb 26 08:47:18 2020 (r358325) @@ -185,6 +185,47 @@ extern void nd6_setmtu(struct ifnet *); #define BRIDGE_IFCAPS_STRIP IFCAP_LRO /* + * Bridge locking + */ +#define BRIDGE_LOCK_INIT(_sc) do { \ + mtx_init(&(_sc)->sc_mtx, "if_bridge", NULL, MTX_DEF); \ + cv_init(&(_sc)->sc_cv, "if_bridge_cv"); \ +} while (0) +#define BRIDGE_LOCK_DESTROY(_sc) do { \ + mtx_destroy(&(_sc)->sc_mtx); \ + cv_destroy(&(_sc)->sc_cv); \ +} while (0) +#define BRIDGE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define BRIDGE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define BRIDGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) +#define BRIDGE_UNLOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED) +#define BRIDGE_LOCK2REF(_sc, _err) do { \ + mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ + if ((_sc)->sc_iflist_xcnt > 0) \ + (_err) = EBUSY; \ + else \ + (_sc)->sc_iflist_ref++; \ + mtx_unlock(&(_sc)->sc_mtx); \ +} while (0) +#define BRIDGE_UNREF(_sc) do { \ + mtx_lock(&(_sc)->sc_mtx); \ + (_sc)->sc_iflist_ref--; \ + if (((_sc)->sc_iflist_xcnt > 0) && ((_sc)->sc_iflist_ref == 0)) \ + cv_broadcast(&(_sc)->sc_cv); \ + mtx_unlock(&(_sc)->sc_mtx); \ +} while (0) +#define BRIDGE_XLOCK(_sc) do { \ + mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ + (_sc)->sc_iflist_xcnt++; \ + while ((_sc)->sc_iflist_ref > 0) \ + cv_wait(&(_sc)->sc_cv, &(_sc)->sc_mtx); \ +} while (0) +#define BRIDGE_XDROP(_sc) do { \ + mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ + (_sc)->sc_iflist_xcnt--; \ +} while (0) + +/* * Bridge interface list entry. */ struct bridge_iflist { Modified: head/sys/net/if_bridgevar.h ============================================================================== --- head/sys/net/if_bridgevar.h Wed Feb 26 04:54:50 2020 (r358324) +++ head/sys/net/if_bridgevar.h Wed Feb 26 08:47:18 2020 (r358325) @@ -271,44 +271,6 @@ struct ifbpstpconf { #ifdef _KERNEL -#define BRIDGE_LOCK_INIT(_sc) do { \ - mtx_init(&(_sc)->sc_mtx, "if_bridge", NULL, MTX_DEF); \ - cv_init(&(_sc)->sc_cv, "if_bridge_cv"); \ -} while (0) -#define BRIDGE_LOCK_DESTROY(_sc) do { \ - mtx_destroy(&(_sc)->sc_mtx); \ - cv_destroy(&(_sc)->sc_cv); \ -} while (0) -#define BRIDGE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define BRIDGE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define BRIDGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) -#define BRIDGE_UNLOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED) -#define BRIDGE_LOCK2REF(_sc, _err) do { \ - mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ - if ((_sc)->sc_iflist_xcnt > 0) \ - (_err) = EBUSY; \ - else \ - (_sc)->sc_iflist_ref++; \ - mtx_unlock(&(_sc)->sc_mtx); \ -} while (0) -#define BRIDGE_UNREF(_sc) do { \ - mtx_lock(&(_sc)->sc_mtx); \ - (_sc)->sc_iflist_ref--; \ - if (((_sc)->sc_iflist_xcnt > 0) && ((_sc)->sc_iflist_ref == 0)) \ - cv_broadcast(&(_sc)->sc_cv); \ - mtx_unlock(&(_sc)->sc_mtx); \ -} while (0) -#define BRIDGE_XLOCK(_sc) do { \ - mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ - (_sc)->sc_iflist_xcnt++; \ - while ((_sc)->sc_iflist_ref > 0) \ - cv_wait(&(_sc)->sc_cv, &(_sc)->sc_mtx); \ -} while (0) -#define BRIDGE_XDROP(_sc) do { \ - mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ - (_sc)->sc_iflist_xcnt--; \ -} while (0) - #define BRIDGE_INPUT(_ifp, _m) do { \ KASSERT((_ifp)->if_bridge_input != NULL, \ ("%s: if_bridge not loaded!", __func__)); \ From owner-svn-src-head@freebsd.org Wed Feb 26 11:29:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BDBD8254C88; Wed, 26 Feb 2020 11:29:04 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SD8c47tbz4LLN; Wed, 26 Feb 2020 11:29:04 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60C6626921; Wed, 26 Feb 2020 11:29:04 +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 01QBT4jQ079533; Wed, 26 Feb 2020 11:29:04 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QBT3cU079532; Wed, 26 Feb 2020 11:29:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202002261129.01QBT3cU079532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 26 Feb 2020 11:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358326 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 358326 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 11:29:04 -0000 Author: andrew Date: Wed Feb 26 11:29:03 2020 New Revision: 358326 URL: https://svnweb.freebsd.org/changeset/base/358326 Log: Add more arm64 CTR_EL0 register fields While here make the _SIZE macros return the size in bytes, not the log2 of the size Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/machdep.c head/sys/arm64/include/armreg.h Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Wed Feb 26 08:47:18 2020 (r358325) +++ head/sys/arm64/arm64/machdep.c Wed Feb 26 11:29:03 2020 (r358326) @@ -1047,20 +1047,16 @@ bus_probe(void) static void cache_setup(void) { - int dcache_line_shift, icache_line_shift, dczva_line_shift; + int dczva_line_shift; uint32_t ctr_el0; uint32_t dczid_el0; ctr_el0 = READ_SPECIALREG(ctr_el0); - /* Read the log2 words in each D cache line */ - dcache_line_shift = CTR_DLINE_SIZE(ctr_el0); /* Get the D cache line size */ - dcache_line_size = sizeof(int) << dcache_line_shift; - + dcache_line_size = CTR_DLINE_SIZE(ctr_el0); /* And the same for the I cache */ - icache_line_shift = CTR_ILINE_SIZE(ctr_el0); - icache_line_size = sizeof(int) << icache_line_shift; + icache_line_size = CTR_ILINE_SIZE(ctr_el0); idcache_line_size = MIN(dcache_line_size, icache_line_size); Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Wed Feb 26 08:47:18 2020 (r358325) +++ head/sys/arm64/include/armreg.h Wed Feb 26 11:29:03 2020 (r358326) @@ -82,12 +82,39 @@ #define CPACR_TTA (0x1 << 28) /* CTR_EL0 - Cache Type Register */ +#define CTR_RES1 (1 << 31) +#define CTR_TminLine_SHIFT 32 +#define CTR_TminLine_MASK (UL(0x3f) << CTR_TminLine_SHIFT) +#define CTR_TminLine_VAL(reg) ((reg) & CTR_TminLine_MASK) +#define CTR_DIC_SHIFT 29 +#define CTR_DIC_MASK (0x1 << CTR_DIC_SHIFT) +#define CTR_DIC_VAL(reg) ((reg) & CTR_DIC_MASK) +#define CTR_IDC_SHIFT 28 +#define CTR_IDC_MASK (0x1 << CTR_IDC_SHIFT) +#define CTR_IDC_VAL(reg) ((reg) & CTR_IDC_MASK) +#define CTR_CWG_SHIFT 24 +#define CTR_CWG_MASK (0xf << CTR_CWG_SHIFT) +#define CTR_CWG_VAL(reg) ((reg) & CTR_CWG_MASK) +#define CTR_CWG_SIZE(reg) (4 << (CTR_CWG_VAL(reg) >> CTR_CWG_SHIFT)) +#define CTR_ERG_SHIFT 20 +#define CTR_ERG_MASK (0xf << CTR_ERG_SHIFT) +#define CTR_ERG_VAL(reg) ((reg) & CTR_ERG_MASK) +#define CTR_ERG_SIZE(reg) (4 << (CTR_ERG_VAL(reg) >> CTR_ERG_SHIFT)) #define CTR_DLINE_SHIFT 16 #define CTR_DLINE_MASK (0xf << CTR_DLINE_SHIFT) -#define CTR_DLINE_SIZE(reg) (((reg) & CTR_DLINE_MASK) >> CTR_DLINE_SHIFT) +#define CTR_DLINE_VAL(reg) ((reg) & CTR_DLINE_MASK) +#define CTR_DLINE_SIZE(reg) (4 << (CTR_DLINE_VAL(reg) >> CTR_DLINE_SHIFT)) +#define CTR_L1IP_SHIFT 14 +#define CTR_L1IP_MASK (0x3 << CTR_L1IP_SHIFT) +#define CTR_L1IP_VAL(reg) ((reg) & CTR_L1IP_MASK) +#define CTR_L1IP_VPIPT (0 << CTR_L1IP_SHIFT) +#define CTR_L1IP_AIVIVT (1 << CTR_L1IP_SHIFT) +#define CTR_L1IP_VIVT (2 << CTR_L1IP_SHIFT) +#define CTR_L1IP_PIPT (3 << CTR_L1IP_SHIFT) #define CTR_ILINE_SHIFT 0 #define CTR_ILINE_MASK (0xf << CTR_ILINE_SHIFT) -#define CTR_ILINE_SIZE(reg) (((reg) & CTR_ILINE_MASK) >> CTR_ILINE_SHIFT) +#define CTR_ILINE_VAL(reg) ((reg) & CTR_ILINE_MASK) +#define CTR_ILINE_SIZE(reg) (4 << (CTR_ILINE_VAL(reg) >> CTR_ILINE_SHIFT)) /* DAIF - Interrupt Mask Bits */ #define DAIF_D_MASKED (1 << 9) From owner-svn-src-head@freebsd.org Wed Feb 26 11:47:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C2A72553CC; Wed, 26 Feb 2020 11:47:26 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SDYp23Cpz484m; Wed, 26 Feb 2020 11:47:26 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE0CB26CE7; Wed, 26 Feb 2020 11:47:24 +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 01QBlONd091732; Wed, 26 Feb 2020 11:47:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QBlOkN091730; Wed, 26 Feb 2020 11:47:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202002261147.01QBlOkN091730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 26 Feb 2020 11:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358327 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 358327 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 11:47:26 -0000 Author: andrew Date: Wed Feb 26 11:47:24 2020 New Revision: 358327 URL: https://svnweb.freebsd.org/changeset/base/358327 Log: Start to support multiple stages in the arm64 pmap. On arm64 the stage 1 and stage 2 pte formats are similar enough we can reuse the pmap code for both. As they are only similar and not identical we need to know if we are managing stage 1 or stage 2 tables. Add an enum to store this information and a check to make sure it is set to stage 1 when we manage stage 1 pte fields. Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D23830 Modified: head/sys/arm64/arm64/pmap.c head/sys/arm64/include/pmap.h Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Feb 26 11:29:03 2020 (r358326) +++ head/sys/arm64/arm64/pmap.c Wed Feb 26 11:47:24 2020 (r358327) @@ -150,6 +150,8 @@ __FBSDID("$FreeBSD$"); #include +#define PMAP_ASSERT_STAGE1(pmap) MPASS((pmap)->pm_stage == PM_STAGE1) + #define NL0PG (PAGE_SIZE/(sizeof (pd_entry_t))) #define NL1PG (PAGE_SIZE/(sizeof (pd_entry_t))) #define NL2PG (PAGE_SIZE/(sizeof (pd_entry_t))) @@ -586,9 +588,10 @@ CTASSERT(L1_BLOCK == L2_BLOCK); * Checks if the PTE is dirty. */ static inline int -pmap_pte_dirty(pt_entry_t pte) +pmap_pte_dirty(pmap_t pmap, pt_entry_t pte) { + PMAP_ASSERT_STAGE1(pmap); KASSERT((pte & ATTR_SW_MANAGED) != 0, ("pte %#lx is unmanaged", pte)); KASSERT((pte & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) != 0, ("pte %#lx is writeable and missing ATTR_SW_DBM", pte)); @@ -845,6 +848,7 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ PMAP_LOCK_INIT(kernel_pmap); kernel_pmap->pm_l0_paddr = l0pt - kern_delta; kernel_pmap->pm_cookie = COOKIE_FROM(-1, INT_MIN); + kernel_pmap->pm_stage = PM_STAGE1; /* Assume the address we were loaded to is a valid physical address */ min_pa = KERNBASE - kern_delta; @@ -1040,6 +1044,8 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) { uint64_t r; + PMAP_ASSERT_STAGE1(pmap); + dsb(ishst); if (pmap == kernel_pmap) { r = atop(va); @@ -1057,6 +1063,8 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm { uint64_t end, r, start; + PMAP_ASSERT_STAGE1(pmap); + dsb(ishst); if (pmap == kernel_pmap) { start = atop(sva); @@ -1079,6 +1087,8 @@ pmap_invalidate_all(pmap_t pmap) { uint64_t r; + PMAP_ASSERT_STAGE1(pmap); + dsb(ishst); if (pmap == kernel_pmap) { __asm __volatile("tlbi vmalle1is"); @@ -1153,6 +1163,8 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_ vm_page_t m; int lvl; + PMAP_ASSERT_STAGE1(pmap); + m = NULL; PMAP_LOCK(pmap); pte = pmap_pte(pmap, va, &lvl); @@ -1539,6 +1551,7 @@ pmap_pinit0(pmap_t pmap) pmap->pm_l0 = (pd_entry_t *)PHYS_TO_DMAP(pmap->pm_l0_paddr); pmap->pm_root.rt_root = 0; pmap->pm_cookie = COOKIE_FROM(ASID_RESERVED_FOR_PID_0, INT_MIN); + pmap->pm_stage = PM_STAGE1; PCPU_SET(curpmap, pmap); } @@ -1564,6 +1577,7 @@ pmap_pinit(pmap_t pmap) pmap->pm_root.rt_root = 0; bzero(&pmap->pm_stats, sizeof(pmap->pm_stats)); pmap->pm_cookie = COOKIE_FROM(-1, INT_MAX); + pmap->pm_stage = PM_STAGE1; /* XXX Temporarily disable deferred ASID allocation. */ pmap_alloc_asid(pmap); @@ -1828,6 +1842,7 @@ pmap_release(pmap_t pmap) pmap->pm_stats.resident_count)); KASSERT(vm_radix_is_empty(&pmap->pm_root), ("pmap_release: pmap has reserved page table page(s)")); + PMAP_ASSERT_STAGE1(pmap); mtx_lock_spin(&asid_set_mutex); if (COOKIE_TO_EPOCH(pmap->pm_cookie) == asid_epoch) { @@ -2089,7 +2104,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **l continue; tpte = pmap_load_clear(pte); m = PHYS_TO_VM_PAGE(tpte & ~ATTR_MASK); - if (pmap_pte_dirty(tpte)) + if (pmap_pte_dirty(pmap, tpte)) vm_page_dirty(m); if ((tpte & ATTR_AF) != 0) { pmap_invalidate_page(pmap, va); @@ -2588,7 +2603,7 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_ eva = sva + L2_SIZE; for (va = sva, m = PHYS_TO_VM_PAGE(old_l2 & ~ATTR_MASK); va < eva; va += PAGE_SIZE, m++) { - if (pmap_pte_dirty(old_l2)) + if (pmap_pte_dirty(pmap, old_l2)) vm_page_dirty(m); if (old_l2 & ATTR_AF) vm_page_aflag_set(m, PGA_REFERENCED); @@ -2633,7 +2648,7 @@ pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_ pmap_resident_count_dec(pmap, 1); if (old_l3 & ATTR_SW_MANAGED) { m = PHYS_TO_VM_PAGE(old_l3 & ~ATTR_MASK); - if (pmap_pte_dirty(old_l3)) + if (pmap_pte_dirty(pmap, old_l3)) vm_page_dirty(m); if (old_l3 & ATTR_AF) vm_page_aflag_set(m, PGA_REFERENCED); @@ -2683,7 +2698,7 @@ pmap_remove_l3_range(pmap_t pmap, pd_entry_t l2e, vm_o pmap_resident_count_dec(pmap, 1); if ((old_l3 & ATTR_SW_MANAGED) != 0) { m = PHYS_TO_VM_PAGE(old_l3 & ~ATTR_MASK); - if (pmap_pte_dirty(old_l3)) + if (pmap_pte_dirty(pmap, old_l3)) vm_page_dirty(m); if ((old_l3 & ATTR_AF) != 0) vm_page_aflag_set(m, PGA_REFERENCED); @@ -2880,6 +2895,7 @@ retry: } while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pmap = PV_PMAP(pv); + PMAP_ASSERT_STAGE1(pmap); if (!PMAP_TRYLOCK(pmap)) { pvh_gen = pvh->pv_gen; md_gen = m->md.pv_gen; @@ -2913,7 +2929,7 @@ retry: /* * Update the vm_page_t clean and reference bits. */ - if (pmap_pte_dirty(tpte)) + if (pmap_pte_dirty(pmap, tpte)) vm_page_dirty(m); pmap_unuse_pt(pmap, pv->pv_va, tpde, &free); TAILQ_REMOVE(&m->md.pv_list, pv, pv_next); @@ -2937,6 +2953,7 @@ pmap_protect_l2(pmap_t pmap, pt_entry_t *l2, vm_offset vm_page_t m, mt; PMAP_LOCK_ASSERT(pmap, MA_OWNED); + PMAP_ASSERT_STAGE1(pmap); KASSERT((sva & L2_OFFSET) == 0, ("pmap_protect_l2: sva is not 2mpage aligned")); old_l2 = pmap_load(l2); @@ -2958,7 +2975,7 @@ retry: */ if ((old_l2 & ATTR_SW_MANAGED) != 0 && (nbits & ATTR_S1_AP(ATTR_S1_AP_RO)) != 0 && - pmap_pte_dirty(old_l2)) { + pmap_pte_dirty(pmap, old_l2)) { m = PHYS_TO_VM_PAGE(old_l2 & ~ATTR_MASK); for (mt = m; mt < &m[L2_SIZE / PAGE_SIZE]; mt++) vm_page_dirty(mt); @@ -2985,6 +3002,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t pd_entry_t *l0, *l1, *l2; pt_entry_t *l3p, l3, mask, nbits; + PMAP_ASSERT_STAGE1(pmap); KASSERT((prot & ~VM_PROT_ALL) == 0, ("invalid prot %x", prot)); if (prot == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); @@ -3070,7 +3088,7 @@ retry: */ if ((l3 & ATTR_SW_MANAGED) != 0 && (nbits & ATTR_S1_AP(ATTR_S1_AP_RO)) != 0 && - pmap_pte_dirty(l3)) + pmap_pte_dirty(pmap, l3)) vm_page_dirty(PHYS_TO_VM_PAGE(l3 & ~ATTR_MASK)); if (!atomic_fcmpset_64(l3p, &l3, (l3 & ~mask) | nbits)) @@ -3208,6 +3226,7 @@ pmap_promote_l2(pmap_t pmap, pd_entry_t *l2, vm_offset vm_offset_t sva; PMAP_LOCK_ASSERT(pmap, MA_OWNED); + PMAP_ASSERT_STAGE1(pmap); sva = va & ~L2_OFFSET; firstl3 = pmap_l2_to_l3(l2, sva); @@ -3307,6 +3326,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v boolean_t nosleep; int lvl, rv; + PMAP_ASSERT_STAGE1(pmap); + va = trunc_page(va); if ((m->oflags & VPO_UNMANAGED) == 0) VM_PAGE_OBJECT_BUSY_ASSERT(m); @@ -3455,7 +3476,7 @@ havel3: * concurrent calls to pmap_page_test_mappings() and * pmap_ts_referenced(). */ - if (pmap_pte_dirty(orig_l3)) + if (pmap_pte_dirty(pmap, orig_l3)) vm_page_dirty(om); if ((orig_l3 & ATTR_AF) != 0) { pmap_invalidate_page(pmap, va); @@ -3526,7 +3547,7 @@ validate: orig_l3 = pmap_load_store(l3, new_l3); pmap_invalidate_page(pmap, va); if ((orig_l3 & ATTR_SW_MANAGED) != 0 && - pmap_pte_dirty(orig_l3)) + pmap_pte_dirty(pmap, orig_l3)) vm_page_dirty(m); } else { /* @@ -3581,6 +3602,7 @@ pmap_enter_2mpage(pmap_t pmap, vm_offset_t va, vm_page pd_entry_t new_l2; PMAP_LOCK_ASSERT(pmap, MA_OWNED); + PMAP_ASSERT_STAGE1(pmap); new_l2 = (pd_entry_t)(VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | ATTR_S1_IDX(m->md.pv_memattr) | ATTR_S1_AP(ATTR_S1_AP_RO) | @@ -3809,6 +3831,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); PMAP_LOCK_ASSERT(pmap, MA_OWNED); + PMAP_ASSERT_STAGE1(pmap); CTR2(KTR_PMAP, "pmap_enter_quick_locked: %p %lx", pmap, va); /* @@ -4044,6 +4067,9 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ vm_offset_t addr, end_addr, va_next; vm_page_t dst_l2pg, dstmpte, srcmpte; + PMAP_ASSERT_STAGE1(dst_pmap); + PMAP_ASSERT_STAGE1(src_pmap); + if (dst_addr != src_addr) return; end_addr = src_addr + len; @@ -4500,7 +4526,7 @@ pmap_remove_pages(pmap_t pmap) /* * Update the vm_page_t clean/reference bits. */ - if (pmap_pte_dirty(tpte)) { + if (pmap_pte_dirty(pmap, tpte)) { switch (lvl) { case 1: for (mt = m; mt < &m[L2_SIZE / PAGE_SIZE]; mt++) @@ -4598,6 +4624,7 @@ pmap_page_test_mappings(vm_page_t m, boolean_t accesse restart: TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); + PMAP_ASSERT_STAGE1(pmap); if (!PMAP_TRYLOCK(pmap)) { md_gen = m->md.pv_gen; rw_runlock(lock); @@ -4630,6 +4657,7 @@ restart: pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { pmap = PV_PMAP(pv); + PMAP_ASSERT_STAGE1(pmap); if (!PMAP_TRYLOCK(pmap)) { md_gen = m->md.pv_gen; pvh_gen = pvh->pv_gen; @@ -4752,6 +4780,7 @@ retry_pv_loop: rw_wlock(lock); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); + PMAP_ASSERT_STAGE1(pmap); if (!PMAP_TRYLOCK(pmap)) { pvh_gen = pvh->pv_gen; rw_wunlock(lock); @@ -4774,6 +4803,7 @@ retry_pv_loop: } TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); + PMAP_ASSERT_STAGE1(pmap); if (!PMAP_TRYLOCK(pmap)) { pvh_gen = pvh->pv_gen; md_gen = m->md.pv_gen; @@ -4872,7 +4902,7 @@ retry: ("pmap_ts_referenced: found an invalid l1 table")); pte = pmap_l1_to_l2(pde, pv->pv_va); tpte = pmap_load(pte); - if (pmap_pte_dirty(tpte)) { + if (pmap_pte_dirty(pmap, tpte)) { /* * Although "tpte" is mapping a 2MB page, because * this function is called at a 4KB page granularity, @@ -4947,7 +4977,7 @@ small_mappings: ("pmap_ts_referenced: found an invalid l2 table")); pte = pmap_l2_to_l3(pde, pv->pv_va); tpte = pmap_load(pte); - if (pmap_pte_dirty(tpte)) + if (pmap_pte_dirty(pmap, tpte)) vm_page_dirty(m); if ((tpte & ATTR_AF) != 0) { if ((tpte & ATTR_SW_WIRED) == 0) { @@ -4986,6 +5016,8 @@ pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t pd_entry_t *l0, *l1, *l2, oldl2; pt_entry_t *l3, oldl3; + PMAP_ASSERT_STAGE1(pmap); + if (advice != MADV_DONTNEED && advice != MADV_FREE) return; @@ -5062,7 +5094,7 @@ pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t if ((oldl3 & (ATTR_SW_MANAGED | ATTR_DESCR_MASK)) != (ATTR_SW_MANAGED | L3_PAGE)) goto maybe_invlrng; - else if (pmap_pte_dirty(oldl3)) { + else if (pmap_pte_dirty(pmap, oldl3)) { if (advice == MADV_DONTNEED) { /* * Future calls to pmap_is_modified() @@ -5123,6 +5155,7 @@ pmap_clear_modify(vm_page_t m) restart: TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); + PMAP_ASSERT_STAGE1(pmap); if (!PMAP_TRYLOCK(pmap)) { pvh_gen = pvh->pv_gen; rw_wunlock(lock); @@ -5157,6 +5190,7 @@ restart: } TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); + PMAP_ASSERT_STAGE1(pmap); if (!PMAP_TRYLOCK(pmap)) { md_gen = m->md.pv_gen; pvh_gen = pvh->pv_gen; @@ -5595,6 +5629,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_ vm_page_t ml3; PMAP_LOCK_ASSERT(pmap, MA_OWNED); + PMAP_ASSERT_STAGE1(pmap); l3 = NULL; oldl2 = pmap_load(l2); KASSERT((oldl2 & ATTR_DESCR_MASK) == L2_BLOCK, @@ -5755,6 +5790,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t int lvl, val; bool managed; + PMAP_ASSERT_STAGE1(pmap); PMAP_LOCK(pmap); pte = pmap_pte(pmap, addr, &lvl); if (pte != NULL) { @@ -5778,7 +5814,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t val = MINCORE_INCORE; if (lvl != 3) val |= MINCORE_SUPER; - if ((managed && pmap_pte_dirty(tpte)) || (!managed && + if ((managed && pmap_pte_dirty(pmap, tpte)) || (!managed && (tpte & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP(ATTR_S1_AP_RW))) val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER; if ((tpte & ATTR_AF) == ATTR_AF) @@ -5826,6 +5862,7 @@ pmap_reset_asid_set(void) if (cpuid == curcpu) continue; pmap = pcpu_find(cpuid)->pc_curpmap; + PMAP_ASSERT_STAGE1(pmap); asid = COOKIE_TO_ASID(pmap->pm_cookie); if (asid == -1) continue; @@ -5842,6 +5879,7 @@ pmap_alloc_asid(pmap_t pmap) { int new_asid; + PMAP_ASSERT_STAGE1(pmap); mtx_lock_spin(&asid_set_mutex); /* @@ -5879,6 +5917,7 @@ uint64_t pmap_to_ttbr0(pmap_t pmap) { + PMAP_ASSERT_STAGE1(pmap); return (ASID_TO_OPERAND(COOKIE_TO_ASID(pmap->pm_cookie)) | pmap->pm_l0_paddr); } @@ -5888,6 +5927,7 @@ pmap_activate_int(pmap_t pmap) { int epoch; + PMAP_ASSERT_STAGE1(pmap); KASSERT(PCPU_GET(curpmap) != NULL, ("no active pmap")); KASSERT(pmap != kernel_pmap, ("kernel pmap activation")); if (pmap == PCPU_GET(curpmap)) { @@ -5925,6 +5965,7 @@ pmap_activate(struct thread *td) pmap_t pmap; pmap = vmspace_pmap(td->td_proc->p_vmspace); + PMAP_ASSERT_STAGE1(pmap); critical_enter(); (void)pmap_activate_int(pmap); critical_exit(); @@ -5970,6 +6011,7 @@ void pmap_sync_icache(pmap_t pmap, vm_offset_t va, vm_size_t sz) { + PMAP_ASSERT_STAGE1(pmap); if (va >= VM_MIN_KERNEL_ADDRESS) { cpu_icache_sync_range(va, sz); } else { @@ -6003,6 +6045,7 @@ pmap_fault(pmap_t pmap, uint64_t esr, uint64_t far) uint64_t ec, par; int lvl, rv; + PMAP_ASSERT_STAGE1(pmap); rv = KERN_FAILURE; ec = ESR_ELx_EXCEPTION(esr); Modified: head/sys/arm64/include/pmap.h ============================================================================== --- head/sys/arm64/include/pmap.h Wed Feb 26 11:29:03 2020 (r358326) +++ head/sys/arm64/include/pmap.h Wed Feb 26 11:47:24 2020 (r358327) @@ -76,6 +76,11 @@ struct pv_addr { vm_paddr_t pv_pa; }; +enum pmap_stage { + PM_INVALID, + PM_STAGE1, + PM_STAGE2, +}; struct pmap { struct mtx pm_mtx; @@ -85,6 +90,7 @@ struct pmap { TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ struct vm_radix pm_root; /* spare page table pages */ long pm_cookie; /* encodes the pmap's ASID */ + enum pmap_stage pm_stage; }; typedef struct pmap *pmap_t; From owner-svn-src-head@freebsd.org Wed Feb 26 11:50:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 948A12555C9; Wed, 26 Feb 2020 11:50:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SDdF0CnMz4BnT; Wed, 26 Feb 2020 11:50:25 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D864F26D51; Wed, 26 Feb 2020 11:50:24 +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 01QBoOvm092078; Wed, 26 Feb 2020 11:50:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QBoOIs092076; Wed, 26 Feb 2020 11:50:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202002261150.01QBoOIs092076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 26 Feb 2020 11:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358328 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 358328 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 11:50:25 -0000 Author: andrew Date: Wed Feb 26 11:50:24 2020 New Revision: 358328 URL: https://svnweb.freebsd.org/changeset/base/358328 Log: Generalise the arm64 ASID allocator. The requirements of an Address Space ID allocator and a Virtual Machine ID allocator are similar. Generalise the former code so it can be used with the latter. Reviewed by: alc (previous version) Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D23831 Modified: head/sys/arm64/arm64/pmap.c head/sys/arm64/include/pmap.h Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Feb 26 11:47:24 2020 (r358327) +++ head/sys/arm64/arm64/pmap.c Wed Feb 26 11:50:24 2020 (r358328) @@ -283,19 +283,24 @@ static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, * numbers and INT_MAX are reserved for special cases that are described * below. */ +struct asid_set { + int asid_bits; + bitstr_t *asid_set; + int asid_set_size; + int asid_next; + int asid_epoch; + struct mtx asid_set_mutex; +}; + +static struct asid_set asids; + static SYSCTL_NODE(_vm_pmap, OID_AUTO, asid, CTLFLAG_RD, 0, "ASID allocator"); -static int asid_bits; -SYSCTL_INT(_vm_pmap_asid, OID_AUTO, bits, CTLFLAG_RD, &asid_bits, 0, +SYSCTL_INT(_vm_pmap_asid, OID_AUTO, bits, CTLFLAG_RD, &asids.asid_bits, 0, "The number of bits in an ASID"); -static bitstr_t *asid_set; -static int asid_set_size; -static int asid_next; -SYSCTL_INT(_vm_pmap_asid, OID_AUTO, next, CTLFLAG_RD, &asid_next, 0, +SYSCTL_INT(_vm_pmap_asid, OID_AUTO, next, CTLFLAG_RD, &asids.asid_next, 0, "The last allocated ASID plus one"); -static int asid_epoch; -SYSCTL_INT(_vm_pmap_asid, OID_AUTO, epoch, CTLFLAG_RD, &asid_epoch, 0, +SYSCTL_INT(_vm_pmap_asid, OID_AUTO, epoch, CTLFLAG_RD, &asids.asid_epoch, 0, "The current epoch number"); -static struct mtx asid_set_mutex; /* * A pmap's cookie encodes an ASID and epoch number. Cookies for reserved @@ -349,7 +354,7 @@ static int pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, pd_entry_t l1e, struct spglist *free, struct rwlock **lockp); static int pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_t sva, pd_entry_t l2e, struct spglist *free, struct rwlock **lockp); -static void pmap_reset_asid_set(void); +static void pmap_reset_asid_set(pmap_t pmap); static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m, struct rwlock **lockp); @@ -849,6 +854,7 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ kernel_pmap->pm_l0_paddr = l0pt - kern_delta; kernel_pmap->pm_cookie = COOKIE_FROM(-1, INT_MIN); kernel_pmap->pm_stage = PM_STAGE1; + kernel_pmap->pm_asid_set = &asids; /* Assume the address we were loaded to is a valid physical address */ min_pa = KERNBASE - kern_delta; @@ -950,6 +956,26 @@ pmap_page_init(vm_page_t m) m->md.pv_memattr = VM_MEMATTR_WRITE_BACK; } +static void +pmap_init_asids(struct asid_set *set, int bits) +{ + int i; + + set->asid_bits = bits; + + /* + * We may be too early in the overall initialization process to use + * bit_alloc(). + */ + set->asid_set_size = 1 << set->asid_bits; + set->asid_set = (bitstr_t *)kmem_malloc(bitstr_size(set->asid_set_size), + M_WAITOK | M_ZERO); + for (i = 0; i < ASID_FIRST_AVAILABLE; i++) + bit_set(set->asid_set, i); + set->asid_next = ASID_FIRST_AVAILABLE; + mtx_init(&set->asid_set_mutex, "asid set", NULL, MTX_SPIN); +} + /* * Initialize the pmap module. * Called by vm_init, to initialize any structures that the pmap @@ -962,11 +988,6 @@ pmap_init(void) int i, pv_npg; /* - * Determine whether an ASID is 8 or 16 bits in size. - */ - asid_bits = (READ_SPECIALREG(tcr_el1) & TCR_ASID_16) != 0 ? 16 : 8; - - /* * Are large page mappings enabled? */ TUNABLE_INT_FETCH("vm.pmap.superpages_enabled", &superpages_enabled); @@ -977,16 +998,10 @@ pmap_init(void) } /* - * Initialize the ASID allocator. At this point, we are still too - * early in the overall initialization process to use bit_alloc(). + * Initialize the ASID allocator. */ - asid_set_size = 1 << asid_bits; - asid_set = (bitstr_t *)kmem_malloc(bitstr_size(asid_set_size), - M_WAITOK | M_ZERO); - for (i = 0; i < ASID_FIRST_AVAILABLE; i++) - bit_set(asid_set, i); - asid_next = ASID_FIRST_AVAILABLE; - mtx_init(&asid_set_mutex, "asid set", NULL, MTX_SPIN); + pmap_init_asids(&asids, + (READ_SPECIALREG(tcr_el1) & TCR_ASID_16) != 0 ? 16 : 8); /* * Initialize the pv chunk list mutex. @@ -1552,6 +1567,7 @@ pmap_pinit0(pmap_t pmap) pmap->pm_root.rt_root = 0; pmap->pm_cookie = COOKIE_FROM(ASID_RESERVED_FOR_PID_0, INT_MIN); pmap->pm_stage = PM_STAGE1; + pmap->pm_asid_set = &asids; PCPU_SET(curpmap, pmap); } @@ -1578,6 +1594,7 @@ pmap_pinit(pmap_t pmap) bzero(&pmap->pm_stats, sizeof(pmap->pm_stats)); pmap->pm_cookie = COOKIE_FROM(-1, INT_MAX); pmap->pm_stage = PM_STAGE1; + pmap->pm_asid_set = &asids; /* XXX Temporarily disable deferred ASID allocation. */ pmap_alloc_asid(pmap); @@ -1834,6 +1851,7 @@ retry: void pmap_release(pmap_t pmap) { + struct asid_set *set; vm_page_t m; int asid; @@ -1844,14 +1862,18 @@ pmap_release(pmap_t pmap) ("pmap_release: pmap has reserved page table page(s)")); PMAP_ASSERT_STAGE1(pmap); - mtx_lock_spin(&asid_set_mutex); - if (COOKIE_TO_EPOCH(pmap->pm_cookie) == asid_epoch) { + set = pmap->pm_asid_set; + KASSERT(set != NULL, ("%s: NULL asid set", __func__)); + + mtx_lock_spin(&set->asid_set_mutex); + if (COOKIE_TO_EPOCH(pmap->pm_cookie) == set->asid_epoch) { asid = COOKIE_TO_ASID(pmap->pm_cookie); - KASSERT(asid >= ASID_FIRST_AVAILABLE && asid < asid_set_size, + KASSERT(asid >= ASID_FIRST_AVAILABLE && + asid < set->asid_set_size, ("pmap_release: pmap cookie has out-of-range asid")); - bit_clear(asid_set, asid); + bit_clear(set->asid_set, asid); } - mtx_unlock_spin(&asid_set_mutex); + mtx_unlock_spin(&set->asid_set_mutex); m = PHYS_TO_VM_PAGE(pmap->pm_l0_paddr); vm_page_unwire_noq(m); @@ -5839,35 +5861,41 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t * reserved. */ static void -pmap_reset_asid_set(void) +pmap_reset_asid_set(pmap_t pmap) { - pmap_t pmap; + pmap_t curpmap; int asid, cpuid, epoch; + struct asid_set *set; - mtx_assert(&asid_set_mutex, MA_OWNED); + PMAP_ASSERT_STAGE1(pmap); + set = pmap->pm_asid_set; + KASSERT(set != NULL, ("%s: NULL asid set", __func__)); + mtx_assert(&set->asid_set_mutex, MA_OWNED); + /* * Ensure that the store to asid_epoch is globally visible before the * loads from pc_curpmap are performed. */ - epoch = asid_epoch + 1; + epoch = set->asid_epoch + 1; if (epoch == INT_MAX) epoch = 0; - asid_epoch = epoch; + set->asid_epoch = epoch; dsb(ishst); __asm __volatile("tlbi vmalle1is"); dsb(ish); - bit_nclear(asid_set, ASID_FIRST_AVAILABLE, asid_set_size - 1); + bit_nclear(set->asid_set, ASID_FIRST_AVAILABLE, + set->asid_set_size - 1); CPU_FOREACH(cpuid) { if (cpuid == curcpu) continue; - pmap = pcpu_find(cpuid)->pc_curpmap; - PMAP_ASSERT_STAGE1(pmap); - asid = COOKIE_TO_ASID(pmap->pm_cookie); + curpmap = pcpu_find(cpuid)->pc_curpmap; + KASSERT(curpmap->pm_asid_set == set, ("Incorrect set")); + asid = COOKIE_TO_ASID(curpmap->pm_cookie); if (asid == -1) continue; - bit_set(asid_set, asid); - pmap->pm_cookie = COOKIE_FROM(asid, epoch); + bit_set(set->asid_set, asid); + curpmap->pm_cookie = COOKIE_FROM(asid, epoch); } } @@ -5877,36 +5905,41 @@ pmap_reset_asid_set(void) static void pmap_alloc_asid(pmap_t pmap) { + struct asid_set *set; int new_asid; PMAP_ASSERT_STAGE1(pmap); - mtx_lock_spin(&asid_set_mutex); + set = pmap->pm_asid_set; + KASSERT(set != NULL, ("%s: NULL asid set", __func__)); + mtx_lock_spin(&set->asid_set_mutex); + /* * While this processor was waiting to acquire the asid set mutex, * pmap_reset_asid_set() running on another processor might have * updated this pmap's cookie to the current epoch. In which case, we * don't need to allocate a new ASID. */ - if (COOKIE_TO_EPOCH(pmap->pm_cookie) == asid_epoch) + if (COOKIE_TO_EPOCH(pmap->pm_cookie) == set->asid_epoch) goto out; - bit_ffc_at(asid_set, asid_next, asid_set_size, &new_asid); + bit_ffc_at(set->asid_set, set->asid_next, set->asid_set_size, + &new_asid); if (new_asid == -1) { - bit_ffc_at(asid_set, ASID_FIRST_AVAILABLE, asid_next, - &new_asid); + bit_ffc_at(set->asid_set, ASID_FIRST_AVAILABLE, + set->asid_next, &new_asid); if (new_asid == -1) { - pmap_reset_asid_set(); - bit_ffc_at(asid_set, ASID_FIRST_AVAILABLE, - asid_set_size, &new_asid); + pmap_reset_asid_set(pmap); + bit_ffc_at(set->asid_set, ASID_FIRST_AVAILABLE, + set->asid_set_size, &new_asid); KASSERT(new_asid != -1, ("ASID allocation failure")); } } - bit_set(asid_set, new_asid); - asid_next = new_asid + 1; - pmap->pm_cookie = COOKIE_FROM(new_asid, asid_epoch); + bit_set(set->asid_set, new_asid); + set->asid_next = new_asid + 1; + pmap->pm_cookie = COOKIE_FROM(new_asid, set->asid_epoch); out: - mtx_unlock_spin(&asid_set_mutex); + mtx_unlock_spin(&set->asid_set_mutex); } /* @@ -5925,6 +5958,7 @@ pmap_to_ttbr0(pmap_t pmap) static bool pmap_activate_int(pmap_t pmap) { + struct asid_set *set; int epoch; PMAP_ASSERT_STAGE1(pmap); @@ -5943,6 +5977,9 @@ pmap_activate_int(pmap_t pmap) return (false); } + set = pmap->pm_asid_set; + KASSERT(set != NULL, ("%s: NULL asid set", __func__)); + /* * Ensure that the store to curpmap is globally visible before the * load from asid_epoch is performed. @@ -5950,7 +5987,7 @@ pmap_activate_int(pmap_t pmap) PCPU_SET(curpmap, pmap); dsb(ish); epoch = COOKIE_TO_EPOCH(pmap->pm_cookie); - if (epoch >= 0 && epoch != asid_epoch) + if (epoch >= 0 && epoch != set->asid_epoch) pmap_alloc_asid(pmap); set_ttbr0(pmap_to_ttbr0(pmap)); Modified: head/sys/arm64/include/pmap.h ============================================================================== --- head/sys/arm64/include/pmap.h Wed Feb 26 11:47:24 2020 (r358327) +++ head/sys/arm64/include/pmap.h Wed Feb 26 11:50:24 2020 (r358328) @@ -90,6 +90,7 @@ struct pmap { TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ struct vm_radix pm_root; /* spare page table pages */ long pm_cookie; /* encodes the pmap's ASID */ + struct asid_set *pm_asid_set; /* The ASID/VMID set to use */ enum pmap_stage pm_stage; }; typedef struct pmap *pmap_t; From owner-svn-src-head@freebsd.org Wed Feb 26 12:38:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F052D257135; Wed, 26 Feb 2020 12:38:22 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SFhZ4Njlz4dQq; Wed, 26 Feb 2020 12:38:22 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5ED932768E; Wed, 26 Feb 2020 12:38:22 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01QCcMpU021490; Wed, 26 Feb 2020 12:38:22 GMT (envelope-from gahr@FreeBSD.org) Received: (from gahr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QCcMfb021489; Wed, 26 Feb 2020 12:38:22 GMT (envelope-from gahr@FreeBSD.org) Message-Id: <202002261238.01QCcMfb021489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gahr set sender to gahr@FreeBSD.org using -f From: Pietro Cerutti Date: Wed, 26 Feb 2020 12:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358329 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: gahr X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358329 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 12:38:23 -0000 Author: gahr (ports committer) Date: Wed Feb 26 12:38:21 2020 New Revision: 358329 URL: https://svnweb.freebsd.org/changeset/base/358329 Log: Trim trailing white space in comment Approved by: cognet Modified: head/sys/sys/queue.h Modified: head/sys/sys/queue.h ============================================================================== --- head/sys/sys/queue.h Wed Feb 26 11:50:24 2020 (r358328) +++ head/sys/sys/queue.h Wed Feb 26 12:38:21 2020 (r358329) @@ -817,7 +817,7 @@ struct { \ /* * The FAST function is fast in that it causes no data access other * then the access to the head. The standard LAST function above - * will cause a data access of both the element you want and + * will cause a data access of both the element you want and * the previous element. FAST is very useful for instances when * you may want to prefetch the last data element. */ From owner-svn-src-head@freebsd.org Wed Feb 26 13:22:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23BD3258365; Wed, 26 Feb 2020 13:22:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SGgN6CJXz3KVb; Wed, 26 Feb 2020 13:22:24 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BECF527FBB; Wed, 26 Feb 2020 13:22:24 +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 01QDMNJu051417; Wed, 26 Feb 2020 13:22:23 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QDMN12051416; Wed, 26 Feb 2020 13:22:23 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202002261322.01QDMN12051416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 26 Feb 2020 13:22:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358330 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 358330 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 13:22:25 -0000 Author: andrew Date: Wed Feb 26 13:22:23 2020 New Revision: 358330 URL: https://svnweb.freebsd.org/changeset/base/358330 Log: Teach the arm64 ident CPU code to print non-ID registers Add support for non-ID registers when printing CPU information. This is used with the cache type register to print details of the cache on boot. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/identcpu.c Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Wed Feb 26 12:38:21 2020 (r358329) +++ head/sys/arm64/arm64/identcpu.c Wed Feb 26 13:22:23 2020 (r358330) @@ -112,6 +112,7 @@ struct cpu_desc { uint64_t id_aa64mmfr2; uint64_t id_aa64pfr0; uint64_t id_aa64pfr1; + uint64_t ctr; }; static struct cpu_desc cpu_desc[MAXCPU]; @@ -128,6 +129,7 @@ static u_int cpu_print_regs; #define PRINT_ID_AA64_MMFR2 0x00004000 #define PRINT_ID_AA64_PFR0 0x00010000 #define PRINT_ID_AA64_PFR1 0x00020000 +#define PRINT_CTR_EL0 0x10000000 struct cpu_parts { u_int part_id; @@ -1089,14 +1091,66 @@ parse_cpu_features_hwcap(u_int cpu) } static void -print_id_register(struct sbuf *sb, const char *reg_name, uint64_t reg, - struct mrs_field *fields) +print_ctr_fields(struct sbuf *sb, uint64_t reg, void *arg) { - struct mrs_field_value *fv; - int field, i, j, printed; + sbuf_printf(sb, "%u byte D-cacheline,", CTR_DLINE_SIZE(reg)); + sbuf_printf(sb, "%u byte I-cacheline,", CTR_ILINE_SIZE(reg)); + reg &= ~(CTR_DLINE_MASK | CTR_ILINE_MASK); + + switch(CTR_L1IP_VAL(reg)) { + case CTR_L1IP_VPIPT: + sbuf_printf(sb, "VPIPT"); + break; + case CTR_L1IP_AIVIVT: + sbuf_printf(sb, "AIVIVT"); + break; + case CTR_L1IP_VIVT: + sbuf_printf(sb, "VIVT"); + break; + case CTR_L1IP_PIPT: + sbuf_printf(sb, "PIPT"); + break; + } + sbuf_printf(sb, " ICache,"); + reg &= ~CTR_L1IP_MASK; + + sbuf_printf(sb, "%d byte ERG,", CTR_ERG_SIZE(reg)); + sbuf_printf(sb, "%d byte CWG", CTR_CWG_SIZE(reg)); + reg &= ~(CTR_ERG_MASK | CTR_CWG_MASK); + + if (CTR_IDC_VAL(reg) == 0) + sbuf_printf(sb, ",IDC"); + if (CTR_DIC_VAL(reg) == 0) + sbuf_printf(sb, ",DIC"); + reg &= ~(CTR_IDC_MASK | CTR_DIC_MASK); + reg &= ~CTR_RES1; + + if (reg != 0) + sbuf_printf(sb, ",%lx", reg); +} + +static void +print_register(struct sbuf *sb, const char *reg_name, uint64_t reg, + void (*print_fields)(struct sbuf *, uint64_t, void *), void *arg) +{ + sbuf_printf(sb, "%29s = <", reg_name); + print_fields(sb, reg, arg); + + sbuf_finish(sb); + printf("%s>\n", sbuf_data(sb)); + sbuf_clear(sb); +} + +static void +print_id_fields(struct sbuf *sb, uint64_t reg, void *arg) +{ + struct mrs_field *fields = arg; + struct mrs_field_value *fv; + int field, i, j, printed; + #define SEP_STR ((printed++) == 0) ? "" : "," printed = 0; for (i = 0; fields[i].type != 0; i++) { @@ -1125,10 +1179,14 @@ print_id_register(struct sbuf *sb, const char *reg_nam if (reg != 0) sbuf_printf(sb, "%s%#lx", SEP_STR, reg); #undef SEP_STR +} - sbuf_finish(sb); - printf("%s>\n", sbuf_data(sb)); - sbuf_clear(sb); +static void +print_id_register(struct sbuf *sb, const char *reg_name, uint64_t reg, + struct mrs_field *fields) +{ + + print_register(sb, reg_name, reg, print_id_fields, fields); } static void @@ -1184,6 +1242,12 @@ print_cpu_features(u_int cpu) "hardware bugs that may cause the incorrect operation of " "atomic operations.\n"); + /* Cache Type Register */ + if (cpu == 0 || (cpu_print_regs & PRINT_CTR_EL0) != 0) { + print_register(sb, "Cache Type", + cpu_desc[cpu].ctr, print_ctr_fields, NULL); + } + /* AArch64 Instruction Set Attribute Register 0 */ if (cpu == 0 || (cpu_print_regs & PRINT_ID_AA64_ISAR0) != 0) print_id_register(sb, "Instruction Set Attributes 0", @@ -1295,6 +1359,7 @@ identify_cpu(void) cpu_desc[cpu].mpidr = get_mpidr(); CPU_AFFINITY(cpu) = cpu_desc[cpu].mpidr & CPU_AFF_MASK; + cpu_desc[cpu].ctr = READ_SPECIALREG(ctr_el0); cpu_desc[cpu].id_aa64dfr0 = READ_SPECIALREG(id_aa64dfr0_el1); cpu_desc[cpu].id_aa64dfr1 = READ_SPECIALREG(id_aa64dfr1_el1); cpu_desc[cpu].id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); @@ -1363,6 +1428,9 @@ identify_cpu(void) cpu_print_regs |= PRINT_ID_AA64_PFR0; if (cpu_desc[cpu].id_aa64pfr1 != cpu_desc[0].id_aa64pfr1) cpu_print_regs |= PRINT_ID_AA64_PFR1; + + if (cpu_desc[cpu].ctr != cpu_desc[0].ctr) + cpu_print_regs |= PRINT_CTR_EL0; /* Wake up the other CPUs */ atomic_store_rel_int(&ident_lock, 0); From owner-svn-src-head@freebsd.org Wed Feb 26 13:48:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC987259291; Wed, 26 Feb 2020 13:48:34 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SHFZ3m2Nz3MKD; Wed, 26 Feb 2020 13:48:34 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 150103E5; Wed, 26 Feb 2020 13:48:34 +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 01QDmY9g063593; Wed, 26 Feb 2020 13:48:34 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QDmXmu063590; Wed, 26 Feb 2020 13:48:33 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <202002261348.01QDmXmu063590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 26 Feb 2020 13:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358332 - in head/sys: net netinet X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: in head/sys: net netinet X-SVN-Commit-Revision: 358332 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 13:48:35 -0000 Author: rrs Date: Wed Feb 26 13:48:33 2020 New Revision: 358332 URL: https://svnweb.freebsd.org/changeset/base/358332 Log: This commit expands tcp_ratelimit to be able to handle cards like the mlx-c5 and c6 that require a "setup" routine before the tcp_ratelimit code can declare and use a rate. I add the setup routine to if_var as well as fix tcp_ratelimit to call it. I also revisit the rates so that in the case of a mlx card of type c5/6 we will use about 100 rates concentrated in the range where the most gain can be had (1-200Mbps). Note that I have tested these on a c5 and they work and perform well. In fact in an unloaded system they pace right to the correct rate (great job mlx!). There will be a further commit here from Hans that will add the respective changes to the mlx driver to support this work (which I was testing with). Sponsored by: Netflix Inc. Differential Revision: ttps://reviews.freebsd.org/D23647 Modified: head/sys/net/if_var.h head/sys/netinet/tcp_ratelimit.c head/sys/netinet/tcp_ratelimit.h Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Wed Feb 26 13:23:52 2020 (r358331) +++ head/sys/net/if_var.h Wed Feb 26 13:48:33 2020 (r358332) @@ -252,6 +252,7 @@ union if_snd_tag_query_params { */ #define RT_IS_FIXED_TABLE 0x00000004 /* A fixed table is attached */ #define RT_IS_UNUSABLE 0x00000008 /* It is not usable for this */ +#define RT_IS_SETUP_REQ 0x00000010 /* The interface setup must be called before use */ struct if_ratelimit_query_results { const uint64_t *rate_table; /* Pointer to table if present */ @@ -268,8 +269,8 @@ typedef int (if_snd_tag_query_t)(struct m_snd_tag *, u typedef void (if_snd_tag_free_t)(struct m_snd_tag *); typedef void (if_ratelimit_query_t)(struct ifnet *, struct if_ratelimit_query_results *); +typedef int (if_ratelimit_setup_t)(struct ifnet *, uint64_t, uint32_t); - /* * Structure defining a network interface. */ @@ -368,7 +369,7 @@ struct ifnet { if_init_fn_t if_init; /* Init routine */ int (*if_resolvemulti) /* validate/resolve multicast */ (struct ifnet *, struct sockaddr **, struct sockaddr *); - if_qflush_fn_t if_qflush; /* flush any queue */ + if_qflush_fn_t if_qflush; /* flush any queue */ if_transmit_fn_t if_transmit; /* initiate output routine */ void (*if_reassign) /* reassign to vnet routine */ @@ -411,6 +412,7 @@ struct ifnet { if_snd_tag_query_t *if_snd_tag_query; if_snd_tag_free_t *if_snd_tag_free; if_ratelimit_query_t *if_ratelimit_query; + if_ratelimit_setup_t *if_ratelimit_setup; /* Ethernet PCP */ uint8_t if_pcp; @@ -555,7 +557,7 @@ struct ifaddr { u_int ifa_refcnt; /* references to this structure */ counter_u64_t ifa_ipackets; - counter_u64_t ifa_opackets; + counter_u64_t ifa_opackets; counter_u64_t ifa_ibytes; counter_u64_t ifa_obytes; struct epoch_context ifa_epoch_ctx; @@ -769,7 +771,7 @@ void if_setstartfn(if_t ifp, void (*)(if_t)); void if_settransmitfn(if_t ifp, if_transmit_fn_t); void if_setqflushfn(if_t ifp, if_qflush_fn_t); void if_setgetcounterfn(if_t ifp, if_get_counter_t); - + /* Revisit the below. These are inline functions originally */ int drbr_inuse_drv(if_t ifp, struct buf_ring *br); struct mbuf* drbr_dequeue_drv(if_t ifp, struct buf_ring *br); Modified: head/sys/netinet/tcp_ratelimit.c ============================================================================== --- head/sys/netinet/tcp_ratelimit.c Wed Feb 26 13:23:52 2020 (r358331) +++ head/sys/netinet/tcp_ratelimit.c Wed Feb 26 13:48:33 2020 (r358332) @@ -66,45 +66,199 @@ __FBSDID("$FreeBSD$"); * For the purposes of each send, what is the size * of an ethernet frame. */ -#ifndef ETHERNET_SEGMENT_SIZE -#define ETHERNET_SEGMENT_SIZE 1500 -#endif MALLOC_DEFINE(M_TCPPACE, "tcp_hwpace", "TCP Hardware pacing memory"); #ifdef RATELIMIT +/* + * The following preferred table will seem weird to + * the casual viewer. Why do we not have any rates below + * 1Mbps? Why do we have a rate at 1.44Mbps called common? + * Why do the rates cluster in the 1-100Mbps range more + * than others? Why does the table jump around at the beginnign + * and then be more consistently raising? + * + * Let me try to answer those questions. A lot of + * this is dependant on the hardware. We have three basic + * supporters of rate limiting + * + * Chelsio - Supporting 16 configurable rates. + * Mlx - c4 supporting 13 fixed rates. + * Mlx - c5 & c6 supporting 127 configurable rates. + * + * The c4 is why we have a common rate that is available + * in all rate tables. This is a selected rate from the + * c4 table and we assure its available in all ratelimit + * tables. This way the tcp_ratelimit code has an assured + * rate it should always be able to get. This answers a + * couple of the questions above. + * + * So what about the rest, well the table is built to + * try to get the most out of a joint hardware/software + * pacing system. The software pacer will always pick + * a rate higher than the b/w that it is estimating + * + * on the path. This is done for two reasons. + * a) So we can discover more b/w + * and + * b) So we can send a block of MSS's down and then + * have the software timer go off after the previous + * send is completely out of the hardware. + * + * But when we do we don't want to have the delay + * between the last packet sent by the hardware be + * excessively long (to reach our desired rate). + * + * So let me give an example for clarity. + * + * Lets assume that the tcp stack sees that 29,110,000 bps is + * what the bw of the path is. The stack would select the + * rate 31Mbps. 31Mbps means that each send that is done + * by the hardware will cause a 390 micro-second gap between + * the packets sent at that rate. For 29,110,000 bps we + * would need 416 micro-seconds gap between each send. + * + * Note that are calculating a complete time for pacing + * which includes the ethernet, IP and TCP overhead. So + * a full 1514 bytes is used for the above calculations. + * My testing has shown that both cards are also using this + * as their basis i.e. full payload size of the ethernet frame. + * The TCP stack caller needs to be aware of this and make the + * appropriate overhead calculations be included in its choices. + * + * Now, continuing our example, we pick a MSS size based on the + * delta between the two rates (416 - 390) divided into the rate + * we really wish to send at rounded up. That results in a MSS + * send of 17 mss's at once. The hardware then will + * run out of data in a single 17MSS send in 6,630 micro-seconds. + * + * On the other hand the software pacer will send more data + * in 7,072 micro-seconds. This means that we will refill + * the hardware 52 microseconds after it would have sent + * next if it had not ran out of data. This is a win since we are + * only sending every 7ms or so and yet all the packets are spaced on + * the wire with 94% of what they should be and only + * the last packet is delayed extra to make up for the + * difference. + * + * Note that the above formula has two important caveat. + * If we are above (b/w wise) over 100Mbps we double the result + * of the MSS calculation. The second caveat is if we are 500Mbps + * or more we just send the maximum MSS at once i.e. 45MSS. At + * the higher b/w's even the cards have limits to what times (timer granularity) + * they can insert between packets and start to send more than one + * packet at a time on the wire. + * + */ #define COMMON_RATE 180500 -uint64_t desired_rates[] = { - 62500, /* 500Kbps */ - 180500, /* 1.44Mpbs */ - 375000, /* 3Mbps */ - 500000, /* 4Mbps */ - 625000, /* 5Mbps */ - 750000, /* 6Mbps */ - 1000000, /* 8Mbps */ - 1250000, /* 10Mbps */ - 2500000, /* 20Mbps */ - 3750000, /* 30Mbps */ - 5000000, /* 40Meg */ - 6250000, /* 50Mbps */ - 12500000, /* 100Mbps */ - 25000000, /* 200Mbps */ - 50000000, /* 400Mbps */ - 100000000, /* 800Mbps */ - 12500, /* 100kbps */ - 25000, /* 200kbps */ - 875000, /* 7Mbps */ - 1125000, /* 9Mbps */ - 1875000, /* 15Mbps */ - 3125000, /* 25Mbps */ - 8125000, /* 65Mbps */ - 10000000, /* 80Mbps */ - 18750000, /* 150Mbps */ - 20000000, /* 250Mbps */ - 37500000, /* 350Mbps */ - 62500000, /* 500Mbps */ - 78125000, /* 625Mbps */ - 125000000, /* 1Gbps */ +const uint64_t desired_rates[] = { + 122500, /* 1Mbps - rate 1 */ + 180500, /* 1.44Mpbs - rate 2 common rate */ + 375000, /* 3Mbps - rate 3 */ + 625000, /* 5Mbps - rate 4 */ + 875000, /* 7Mbps - rate 5 */ + 1125000, /* 9Mbps - rate 6 */ + 1375000, /* 11Mbps - rate 7 */ + 1625000, /* 13Mbps - rate 8 */ + 2625000, /* 21Mbps - rate 9 */ + 3875000, /* 31Mbps - rate 10 */ + 5125000, /* 41Meg - rate 11 */ + 12500000, /* 100Mbps - rate 12 */ + 25000000, /* 200Mbps - rate 13 */ + 50000000, /* 400Mbps - rate 14 */ + 63750000, /* 51Mbps - rate 15 */ + 100000000, /* 800Mbps - rate 16 */ + 1875000, /* 15Mbps - rate 17 */ + 2125000, /* 17Mbps - rate 18 */ + 2375000, /* 19Mbps - rate 19 */ + 2875000, /* 23Mbps - rate 20 */ + 3125000, /* 25Mbps - rate 21 */ + 3375000, /* 27Mbps - rate 22 */ + 3625000, /* 29Mbps - rate 23 */ + 4125000, /* 33Mbps - rate 24 */ + 4375000, /* 35Mbps - rate 25 */ + 4625000, /* 37Mbps - rate 26 */ + 4875000, /* 39Mbps - rate 27 */ + 5375000, /* 43Mbps - rate 28 */ + 5625000, /* 45Mbps - rate 29 */ + 5875000, /* 47Mbps - rate 30 */ + 6125000, /* 49Mbps - rate 31 */ + 6625000, /* 53Mbps - rate 32 */ + 6875000, /* 55Mbps - rate 33 */ + 7125000, /* 57Mbps - rate 34 */ + 7375000, /* 59Mbps - rate 35 */ + 7625000, /* 61Mbps - rate 36 */ + 7875000, /* 63Mbps - rate 37 */ + 8125000, /* 65Mbps - rate 38 */ + 8375000, /* 67Mbps - rate 39 */ + 8625000, /* 69Mbps - rate 40 */ + 8875000, /* 71Mbps - rate 41 */ + 9125000, /* 73Mbps - rate 42 */ + 9375000, /* 75Mbps - rate 43 */ + 9625000, /* 77Mbps - rate 44 */ + 9875000, /* 79Mbps - rate 45 */ + 10125000, /* 81Mbps - rate 46 */ + 10375000, /* 83Mbps - rate 47 */ + 10625000, /* 85Mbps - rate 48 */ + 10875000, /* 87Mbps - rate 49 */ + 11125000, /* 89Mbps - rate 50 */ + 11375000, /* 91Mbps - rate 51 */ + 11625000, /* 93Mbps - rate 52 */ + 11875000, /* 95Mbps - rate 53 */ + 13125000, /* 105Mbps - rate 54 */ + 13750000, /* 110Mbps - rate 55 */ + 14375000, /* 115Mbps - rate 56 */ + 15000000, /* 120Mbps - rate 57 */ + 15625000, /* 125Mbps - rate 58 */ + 16250000, /* 130Mbps - rate 59 */ + 16875000, /* 135Mbps - rate 60 */ + 17500000, /* 140Mbps - rate 61 */ + 18125000, /* 145Mbps - rate 62 */ + 18750000, /* 150Mbps - rate 64 */ + 20000000, /* 160Mbps - rate 65 */ + 21250000, /* 170Mbps - rate 66 */ + 22500000, /* 180Mbps - rate 67 */ + 23750000, /* 190Mbps - rate 68 */ + 26250000, /* 210Mbps - rate 69 */ + 27500000, /* 220Mbps - rate 70 */ + 28750000, /* 230Mbps - rate 71 */ + 30000000, /* 240Mbps - rate 72 */ + 31250000, /* 250Mbps - rate 73 */ + 34375000, /* 275Mbps - rate 74 */ + 37500000, /* 300Mbps - rate 75 */ + 40625000, /* 325Mbps - rate 76 */ + 43750000, /* 350Mbps - rate 77 */ + 46875000, /* 375Mbps - rate 78 */ + 53125000, /* 425Mbps - rate 79 */ + 56250000, /* 450Mbps - rate 80 */ + 59375000, /* 475Mbps - rate 81 */ + 62500000, /* 500Mbps - rate 82 */ + 68750000, /* 550Mbps - rate 83 */ + 75000000, /* 600Mbps - rate 84 */ + 81250000, /* 650Mbps - rate 85 */ + 87500000, /* 700Mbps - rate 86 */ + 93750000, /* 750Mbps - rate 87 */ + 106250000, /* 850Mbps - rate 88 */ + 112500000, /* 900Mbps - rate 89 */ + 125000000, /* 1Gbps - rate 90 */ + 156250000, /* 1.25Gps - rate 91 */ + 187500000, /* 1.5Gps - rate 92 */ + 218750000, /* 1.75Gps - rate 93 */ + 250000000, /* 2Gbps - rate 94 */ + 281250000, /* 2.25Gps - rate 95 */ + 312500000, /* 2.5Gbps - rate 96 */ + 343750000, /* 2.75Gbps - rate 97 */ + 375000000, /* 3Gbps - rate 98 */ + 500000000, /* 4Gbps - rate 99 */ + 625000000, /* 5Gbps - rate 100 */ + 750000000, /* 6Gbps - rate 101 */ + 875000000, /* 7Gbps - rate 102 */ + 1000000000, /* 8Gbps - rate 103 */ + 1125000000, /* 9Gbps - rate 104 */ + 1250000000, /* 10Gbps - rate 105 */ + 1875000000, /* 15Gbps - rate 106 */ + 2500000000 /* 20Gbps - rate 107 */ }; + #define MAX_HDWR_RATES (sizeof(desired_rates)/sizeof(uint64_t)) #define RS_ORDERED_COUNT 16 /* * Number that are in order @@ -381,14 +535,18 @@ rt_setup_new_rs(struct ifnet *ifp, int *error) * We can do nothing if we cannot * get a query back from the driver. */ + printf("Warning:No query functions for %s:%d-- failed\n", + ifp->if_dname, ifp->if_dunit); return (NULL); } rs = malloc(sizeof(struct tcp_rate_set), M_TCPPACE, M_NOWAIT | M_ZERO); if (rs == NULL) { if (error) *error = ENOMEM; + printf("Warning:No memory for malloc of tcp_rate_set\n"); return (NULL); } + memset(&rl, 0, sizeof(rl)); rl.flags = RT_NOSUPPORT; ifp->if_ratelimit_query(ifp, &rl); if (rl.flags & RT_IS_UNUSABLE) { @@ -433,7 +591,7 @@ rt_setup_new_rs(struct ifnet *ifp, int *error) mtx_unlock(&rs_mtx); return (rs); } else if ((rl.flags & RT_IS_FIXED_TABLE) == RT_IS_FIXED_TABLE) { - /* Mellanox most likely */ + /* Mellanox C4 likely */ rs->rs_ifp = ifp; rs->rs_if_dunit = ifp->if_dunit; rs->rs_rate_cnt = rl.number_of_rates; @@ -444,7 +602,7 @@ rt_setup_new_rs(struct ifnet *ifp, int *error) rs->rs_disable = 0; rate_table_act = rl.rate_table; } else if ((rl.flags & RT_IS_SELECTABLE) == RT_IS_SELECTABLE) { - /* Chelsio */ + /* Chelsio, C5 and C6 of Mellanox? */ rs->rs_ifp = ifp; rs->rs_if_dunit = ifp->if_dunit; rs->rs_rate_cnt = rl.number_of_rates; @@ -467,9 +625,6 @@ rt_setup_new_rs(struct ifnet *ifp, int *error) if (rs->rs_rate_cnt >= ALL_HARDWARE_RATES) rs->rs_rate_cnt = ALL_HARDWARE_RATES; } else { - printf("Interface:%s unit:%d not one known to have rate-limits\n", - ifp->if_dname, - ifp->if_dunit); free(rs, M_TCPPACE); return (NULL); } @@ -536,6 +691,14 @@ bail: rs->rs_lowest_valid = i; } else { int err; + + if ((rl.flags & RT_IS_SETUP_REQ) && + (ifp->if_ratelimit_query)) { + err = ifp->if_ratelimit_setup(ifp, + rs->rs_rlt[i].rate, i); + if (err) + goto handle_err; + } #ifdef RSS hash_type = M_HASHTYPE_RSS_TCP_IPV4; #else @@ -547,6 +710,7 @@ bail: rs->rs_rlt[i].rate, &rs->rs_rlt[i].tag); if (err) { +handle_err: if (i == (rs->rs_rate_cnt - 1)) { /* * Huh - first rate and we can't get @@ -1087,6 +1251,7 @@ tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *if *error = EINVAL; rte = NULL; } + *error = 0; return (rte); } @@ -1194,6 +1359,120 @@ tcp_rel_pacing_rate(const struct tcp_hwrate_limit_tabl mtx_unlock(&rs_mtx); } in_pcbdetach_txrtlmt(tp->t_inpcb); +} + +#define ONE_POINT_TWO_MEG 150000 /* 1.2 megabits in bytes */ +#define ONE_HUNDRED_MBPS 12500000 /* 100Mbps in bytes per second */ +#define FIVE_HUNDRED_MBPS 62500000 /* 500Mbps in bytes per second */ +#define MAX_MSS_SENT 43 /* 43 mss = 43 x 1500 = 64,500 bytes */ + + +uint32_t +tcp_get_pacing_burst_size (uint64_t bw, uint32_t segsiz, int can_use_1mss, + const struct tcp_hwrate_limit_table *te, int *err) +{ + /* + * We use the google formula to calculate the + * TSO size. I.E. + * bw < 24Meg + * tso = 2mss + * else + * tso = min(bw/1000, 64k) + * + * Note for these calculations we ignore the + * packet overhead (enet hdr, ip hdr and tcp hdr). + */ + uint64_t lentim, res, bytes; + uint32_t new_tso, min_tso_segs; + + bytes = bw / 1000; + if (bytes > (64 * 1000)) + bytes = 64 * 1000; + /* Round up */ + new_tso = (bytes + segsiz - 1) / segsiz; + if (can_use_1mss && (bw < ONE_POINT_TWO_MEG)) + min_tso_segs = 1; + else + min_tso_segs = 2; + if (new_tso < min_tso_segs) + new_tso = min_tso_segs; + if (new_tso > MAX_MSS_SENT) + new_tso = MAX_MSS_SENT; + new_tso *= segsiz; + /* + * If we are not doing hardware pacing + * then we are done. + */ + if (te == NULL) { + if (err) + *err = 0; + return(new_tso); + } + /* + * For hardware pacing we look at the + * rate you are sending at and compare + * that to the rate you have in hardware. + * + * If the hardware rate is slower than your + * software rate then you are in error and + * we will build a queue in our hardware whic + * is probably not desired, in such a case + * just return the non-hardware TSO size. + * + * If the rate in hardware is faster (which + * it should be) then look at how long it + * takes to send one ethernet segment size at + * your b/w and compare that to the time it + * takes to send at the rate you had selected. + * + * If your time is greater (which we hope it is) + * we get the delta between the two, and then + * divide that into your pacing time. This tells + * us how many MSS you can send down at once (rounded up). + * + * Note we also double this value if the b/w is over + * 100Mbps. If its over 500meg we just set you to the + * max (43 segments). + */ + if (te->rate > FIVE_HUNDRED_MBPS) + return (segsiz * MAX_MSS_SENT); + if (te->rate == bw) { + /* We are pacing at exactly the hdwr rate */ + return (segsiz * MAX_MSS_SENT); + } + lentim = ETHERNET_SEGMENT_SIZE * USECS_IN_SECOND; + res = lentim / bw; + if (res > te->time_between) { + uint32_t delta, segs; + + delta = res - te->time_between; + segs = (res + delta - 1)/delta; + if (te->rate > ONE_HUNDRED_MBPS) + segs *= 2; + if (segs < min_tso_segs) + segs = min_tso_segs; + if (segs > MAX_MSS_SENT) + segs = MAX_MSS_SENT; + segs *= segsiz; + if (err) + *err = 0; + if (segs < new_tso) { + /* unexpected ? */ + return(new_tso); + } else { + return (segs); + } + } else { + /* + * Your time is smaller which means + * we will grow a queue on our + * hardware. Send back the non-hardware + * rate. + */ + if (err) + *err = -1; + return (new_tso); + } } static eventhandler_tag rl_ifnet_departs; Modified: head/sys/netinet/tcp_ratelimit.h ============================================================================== --- head/sys/netinet/tcp_ratelimit.h Wed Feb 26 13:23:52 2020 (r358331) +++ head/sys/netinet/tcp_ratelimit.h Wed Feb 26 13:48:33 2020 (r358332) @@ -88,6 +88,9 @@ CK_LIST_HEAD(head_tcp_rate_set, tcp_rate_set); #define RS_PACING_SUB_OK 0x0010 /* If a rate can't be found get the * next best rate (highest or lowest). */ #ifdef _KERNEL +#ifndef ETHERNET_SEGMENT_SIZE +#define ETHERNET_SEGMENT_SIZE 1514 +#endif #ifdef RATELIMIT #define DETAILED_RATELIMIT_SYSCTL 1 /* * Undefine this if you don't want @@ -135,7 +138,18 @@ tcp_rel_pacing_rate(const struct tcp_hwrate_limit_tabl { return; } - #endif +/* + * Given a b/w and a segsiz, and optional hardware + * rate limit, return the ideal size to burst + * out at once. Note the parameter can_use_1mss + * dictates if the transport will tolerate a 1mss + * limit, if not it will bottom out at 2mss (think + * delayed ack). + */ +uint32_t +tcp_get_pacing_burst_size(uint64_t bw, uint32_t segsiz, int can_use_1mss, + const struct tcp_hwrate_limit_table *te, int *err); + #endif #endif From owner-svn-src-head@freebsd.org Wed Feb 26 14:26:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8799725A327; Wed, 26 Feb 2020 14:26:46 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SJ5f3ZJSz3HQc; Wed, 26 Feb 2020 14:26:46 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43C3AB8E; Wed, 26 Feb 2020 14:26:46 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01QEQkwj087290; Wed, 26 Feb 2020 14:26:46 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QEQcUn087251; Wed, 26 Feb 2020 14:26:38 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002261426.01QEQcUn087251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Wed, 26 Feb 2020 14:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358333 - in head/sys: amd64/amd64 amd64/linux32 arm/altera/socfpga arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/mv arm/nvidia arm/nvidia/tegra124 arm/ti arm/ti/am335x arm/ti/cpsw... X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: in head/sys: amd64/amd64 amd64/linux32 arm/altera/socfpga arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/mv arm/nvidia arm/nvidia/tegra124 arm/ti arm/ti/am335x arm/ti/cpsw arm/ti/twl arm/xilinx ar... X-SVN-Commit-Revision: 358333 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 14:26:46 -0000 Author: kaktus Date: Wed Feb 26 14:26:36 2020 New Revision: 358333 URL: https://svnweb.freebsd.org/changeset/base/358333 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Modified: head/sys/amd64/amd64/efirt_machdep.c head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/pmap.c head/sys/amd64/amd64/prof_machdep.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/arm/altera/socfpga/socfpga_rstmgr.c head/sys/arm/arm/busdma_machdep.c head/sys/arm/arm/cpuinfo.c head/sys/arm/arm/machdep_boot.c head/sys/arm/arm/pmap-v6.c head/sys/arm/broadcom/bcm2835/bcm2835_audio.c head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c head/sys/arm/broadcom/bcm2835/bcm2835_rng.c head/sys/arm/broadcom/bcm2835/bcm2835_spi.c head/sys/arm/freescale/imx/imx6_anatop.c head/sys/arm/freescale/imx/imx_machdep.c head/sys/arm/mv/mv_thermal.c head/sys/arm/mv/mv_ts.c head/sys/arm/nvidia/tegra124/tegra124_coretemp.c head/sys/arm/nvidia/tegra_soctherm.c head/sys/arm/ti/am335x/am335x_ehrpwm.c head/sys/arm/ti/am335x/am335x_lcd.c head/sys/arm/ti/am335x/am335x_musb.c head/sys/arm/ti/cpsw/if_cpsw.c head/sys/arm/ti/ti_adc.c head/sys/arm/ti/ti_pruss.c head/sys/arm/ti/twl/twl_clks.c head/sys/arm/ti/twl/twl_vreg.c head/sys/arm/xilinx/zy7_devcfg.c head/sys/arm/xilinx/zy7_slcr.c head/sys/arm64/arm64/busdma_bounce.c head/sys/arm64/arm64/pmap.c head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_pmp.c head/sys/cam/cam.c head/sys/cam/cam_iosched.c head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_ha.c head/sys/cam/nvme/nvme_da.c head/sys/cam/scsi/scsi_all.c head/sys/cam/scsi/scsi_cd.c head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_enc.c head/sys/cam/scsi/scsi_sa.c head/sys/cam/scsi/scsi_xpt.c head/sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c head/sys/cddl/dev/dtrace/dtrace_sysctl.c head/sys/cddl/dev/dtrace/dtrace_test.c head/sys/cddl/dev/profile/profile.c head/sys/compat/ia32/ia32_sysvec.c head/sys/compat/linux/linux_mib.c head/sys/compat/ndis/subr_ntoskrnl.c head/sys/compat/x86bios/x86bios.c head/sys/contrib/rdma/krping/krping_dev.c head/sys/crypto/ccp/ccp_hardware.c head/sys/ddb/db_capture.c head/sys/ddb/db_main.c head/sys/ddb/db_script.c head/sys/ddb/db_textdump.c head/sys/dev/aac/aac.c head/sys/dev/aacraid/aacraid.c head/sys/dev/acpi_support/acpi_asus.c head/sys/dev/acpi_support/acpi_asus_wmi.c head/sys/dev/acpi_support/acpi_fujitsu.c head/sys/dev/acpi_support/acpi_hp.c head/sys/dev/acpi_support/acpi_ibm.c head/sys/dev/acpi_support/acpi_panasonic.c head/sys/dev/acpi_support/acpi_rapidstart.c head/sys/dev/acpi_support/acpi_sony.c head/sys/dev/acpi_support/acpi_toshiba.c head/sys/dev/acpi_support/atk0110.c head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_acad.c head/sys/dev/acpica/acpi_battery.c head/sys/dev/acpica/acpi_cpu.c head/sys/dev/acpica/acpi_dock.c head/sys/dev/acpica/acpi_ec.c head/sys/dev/acpica/acpi_smbat.c head/sys/dev/acpica/acpi_thermal.c head/sys/dev/acpica/acpi_timer.c head/sys/dev/acpica/acpi_video.c head/sys/dev/adb/adb_kbd.c head/sys/dev/adb/adb_mouse.c head/sys/dev/ae/if_ae.c head/sys/dev/age/if_age.c head/sys/dev/ahci/ahci.c head/sys/dev/aic7xxx/aic79xx_osm.c head/sys/dev/alc/if_alc.c head/sys/dev/ale/if_ale.c head/sys/dev/altera/atse/if_atse.c head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c head/sys/dev/amd_ecc_inject/ecc_inject.c head/sys/dev/amdtemp/amdtemp.c head/sys/dev/amr/amr.c head/sys/dev/an/if_an.c head/sys/dev/asmc/asmc.c head/sys/dev/ata/ata-all.c head/sys/dev/atkbdc/psm.c head/sys/dev/bce/if_bce.c head/sys/dev/bfe/if_bfe.c head/sys/dev/bge/if_bge.c head/sys/dev/bhnd/cores/pmu/bhnd_pmu.c head/sys/dev/bktr/bktr_os.c head/sys/dev/bnxt/bnxt_sysctl.c head/sys/dev/bwn/if_bwn.c head/sys/dev/bxe/bxe.c head/sys/dev/cadence/if_cgem.c head/sys/dev/cardbus/cardbus.c head/sys/dev/coretemp/coretemp.c head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_sge.c head/sys/dev/cxgbe/crypto/t4_crypto.c head/sys/dev/cxgbe/cxgbei/cxgbei.c head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c head/sys/dev/cxgbe/iw_cxgbe/cm.c head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c head/sys/dev/dcons/dcons_os.c head/sys/dev/efidev/efirt.c head/sys/dev/ena/ena_sysctl.c head/sys/dev/et/if_et.c head/sys/dev/etherswitch/mtkswitch/mtkswitch.c head/sys/dev/etherswitch/rtl8366/rtl8366rb.c head/sys/dev/evdev/evdev.c head/sys/dev/extres/clk/clk.c head/sys/dev/extres/regulator/regulator.c head/sys/dev/fb/vesa.c head/sys/dev/fdc/fdc.c head/sys/dev/fdt/fdt_common.c head/sys/dev/firewire/firewire.c head/sys/dev/firewire/fwmem.c head/sys/dev/firewire/if_fwe.c head/sys/dev/firewire/if_fwip.c head/sys/dev/firewire/sbp.c head/sys/dev/fxp/if_fxp.c head/sys/dev/gpio/gpiobacklight.c head/sys/dev/hifn/hifn7751.c head/sys/dev/hptmv/hptproc.c head/sys/dev/hwpmc/hwpmc_mod.c head/sys/dev/hyperv/netvsc/if_hn.c head/sys/dev/if_ndis/if_ndis_usb.c head/sys/dev/iicbus/ad7417.c head/sys/dev/iicbus/ad7418.c head/sys/dev/iicbus/ads111x.c head/sys/dev/iicbus/adt746x.c head/sys/dev/iicbus/ds1631.c head/sys/dev/iicbus/ds1775.c head/sys/dev/iicbus/max6690.c head/sys/dev/ioat/ioat.c head/sys/dev/ioat/ioat_test.c head/sys/dev/ipmi/ipmi.c head/sys/dev/ipw/if_ipw.c head/sys/dev/isci/isci_sysctl.c head/sys/dev/iscsi_initiator/isc_sm.c head/sys/dev/iscsi_initiator/iscsi.c head/sys/dev/iser/icl_iser.c head/sys/dev/isl/isl.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/iwi/if_iwi.c head/sys/dev/jme/if_jme.c head/sys/dev/kbd/kbd.c head/sys/dev/liquidio/lio_sysctl.c head/sys/dev/malo/if_malo.c head/sys/dev/malo/if_malo_pci.c head/sys/dev/mfi/mfi.c head/sys/dev/mge/if_mge.c head/sys/dev/mlx4/mlx4_core/mlx4_main.c head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c head/sys/dev/mlx5/mlx5_core/mlx5_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c head/sys/dev/mmc/mmc.c head/sys/dev/mmc/mmcsd.c head/sys/dev/mpr/mpr.c head/sys/dev/mps/mps.c head/sys/dev/mpt/mpt_raid.c head/sys/dev/mrsas/mrsas.c head/sys/dev/msk/if_msk.c head/sys/dev/mwl/if_mwl.c head/sys/dev/mwl/mwlhal.c head/sys/dev/mxge/if_mxge.c head/sys/dev/neta/if_mvneta.c head/sys/dev/netmap/netmap.c head/sys/dev/nfe/if_nfe.c head/sys/dev/nge/if_nge.c head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c head/sys/dev/ntb/ntb_transport.c head/sys/dev/ntb/test/ntb_tool.c head/sys/dev/nvd/nvd.c head/sys/dev/nvme/nvme_sysctl.c head/sys/dev/oce/oce_sysctl.c head/sys/dev/ocs_fc/ocs_ioctl.c head/sys/dev/ow/ow.c head/sys/dev/ow/ow_temp.c head/sys/dev/pccard/pccard.c head/sys/dev/pccbb/pccbb.c head/sys/dev/pccbb/pccbb_isa.c head/sys/dev/puc/puc.c head/sys/dev/qlnx/qlnxe/qlnx_os.c head/sys/dev/qlnx/qlnxr/qlnxr_os.c head/sys/dev/qlxgb/qla_os.c head/sys/dev/qlxgbe/ql_hw.c head/sys/dev/qlxgbe/ql_os.c head/sys/dev/qlxge/qls_hw.c head/sys/dev/qlxge/qls_os.c head/sys/dev/re/if_re.c head/sys/dev/rndtest/rndtest.c head/sys/dev/rt/if_rt.c head/sys/dev/safe/safe.c head/sys/dev/sdhci/sdhci.c head/sys/dev/sfxge/sfxge.c head/sys/dev/sfxge/sfxge_ev.c head/sys/dev/sfxge/sfxge_port.c head/sys/dev/sfxge/sfxge_rx.c head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sk/if_sk.c head/sys/dev/sound/clone.c head/sys/dev/sound/midi/midi.c head/sys/dev/sound/midi/sequencer.c head/sys/dev/sound/pci/atiixp.c head/sys/dev/sound/pci/emu10kx.c head/sys/dev/sound/pci/es137x.c head/sys/dev/sound/pci/hda/hdaa.c head/sys/dev/sound/pci/hda/hdac.c head/sys/dev/sound/pci/maestro.c head/sys/dev/sound/pci/via8233.c head/sys/dev/sound/pcm/ac97.c head/sys/dev/sound/pcm/channel.c head/sys/dev/sound/pcm/feeder_eq.c head/sys/dev/sound/pcm/feeder_rate.c head/sys/dev/sound/pcm/mixer.c head/sys/dev/sound/pcm/sndstat.c head/sys/dev/sound/pcm/sound.c head/sys/dev/sound/pcm/vchan.c head/sys/dev/ste/if_ste.c head/sys/dev/stge/if_stge.c head/sys/dev/syscons/syscons.c head/sys/dev/tsec/if_tsec.c head/sys/dev/twa/tw_osl_freebsd.c head/sys/dev/twe/twe_freebsd.c head/sys/dev/tws/tws.c head/sys/dev/uart/uart_core.c head/sys/dev/ubsec/ubsec.c head/sys/dev/vge/if_vge.c head/sys/dev/virtio/block/virtio_blk.c head/sys/dev/virtio/network/if_vtnet.c head/sys/dev/vmware/pvscsi/pvscsi.c head/sys/dev/vmware/vmxnet3/if_vmx.c head/sys/dev/vr/if_vr.c head/sys/dev/vt/vt_core.c head/sys/dev/vte/if_vte.c head/sys/dev/watchdog/watchdog.c head/sys/dev/wbwd/wbwd.c head/sys/dev/wi/if_wi.c head/sys/fs/cd9660/cd9660_vnops.c head/sys/fs/devfs/devfs_devs.c head/sys/fs/ext2fs/ext2_alloc.c head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/msdosfs/msdosfs_vnops.c head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfsclient/nfs_clnfsiod.c head/sys/fs/nfsserver/nfs_fha_new.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/fs/smbfs/smbfs_vfsops.c head/sys/fs/tmpfs/tmpfs_subr.c head/sys/gdb/gdb_main.c head/sys/gdb/netgdb.c head/sys/geom/cache/g_cache.c head/sys/geom/concat/g_concat.c head/sys/geom/gate/g_gate.c head/sys/geom/geom_dev.c head/sys/geom/geom_disk.c head/sys/geom/geom_kern.c head/sys/geom/journal/g_journal.c head/sys/geom/label/g_label.c head/sys/geom/label/g_label.h head/sys/geom/linux_lvm/g_linux_lvm.c head/sys/geom/mirror/g_mirror.c head/sys/geom/mountver/g_mountver.c head/sys/geom/multipath/g_multipath.c head/sys/geom/nop/g_nop.c head/sys/geom/part/g_part.c head/sys/geom/part/g_part_gpt.c head/sys/geom/part/g_part_ldm.c head/sys/geom/part/g_part_mbr.c head/sys/geom/raid/g_raid.c head/sys/geom/raid/g_raid.h head/sys/geom/raid3/g_raid3.c head/sys/geom/shsec/g_shsec.c head/sys/geom/stripe/g_stripe.c head/sys/geom/uzip/g_uzip.c head/sys/geom/vinum/geom_vinum.c head/sys/geom/virstor/g_virstor.c head/sys/geom/zero/g_zero.c head/sys/gnu/gcov/gcov_subr.c head/sys/i386/i386/elan-mmcr.c head/sys/i386/i386/longrun.c head/sys/i386/i386/machdep.c head/sys/i386/i386/mp_clock.c head/sys/i386/i386/pmap_base.c head/sys/i386/i386/prof_machdep.c head/sys/kern/imgact_binmisc.c head/sys/kern/imgact_elf.c head/sys/kern/kern_acct.c head/sys/kern/kern_clock.c head/sys/kern/kern_cons.c head/sys/kern/kern_cpu.c head/sys/kern/kern_et.c head/sys/kern/kern_fail.c head/sys/kern/kern_ffclock.c head/sys/kern/kern_fork.c head/sys/kern/kern_intr.c head/sys/kern/kern_jail.c head/sys/kern/kern_kcov.c head/sys/kern/kern_ktr.c head/sys/kern/kern_ktrace.c head/sys/kern/kern_linker.c head/sys/kern/kern_malloc.c head/sys/kern/kern_mbuf.c head/sys/kern/kern_mib.c head/sys/kern/kern_mutex.c head/sys/kern/kern_ntptime.c head/sys/kern/kern_pmc.c head/sys/kern/kern_poll.c head/sys/kern/kern_proc.c head/sys/kern/kern_prot.c head/sys/kern/kern_racct.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sendfile.c head/sys/kern/kern_shutdown.c head/sys/kern/kern_sig.c head/sys/kern/kern_switch.c head/sys/kern/kern_sx.c head/sys/kern/kern_tc.c head/sys/kern/kern_thr.c head/sys/kern/kern_umtx.c head/sys/kern/posix4_mib.c head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c head/sys/kern/subr_bus.c head/sys/kern/subr_devstat.c head/sys/kern/subr_epoch.c head/sys/kern/subr_kdb.c head/sys/kern/subr_lock.c head/sys/kern/subr_param.c head/sys/kern/subr_prof.c head/sys/kern/subr_rman.c head/sys/kern/subr_rtc.c head/sys/kern/subr_sleepqueue.c head/sys/kern/subr_smp.c head/sys/kern/subr_smr.c head/sys/kern/subr_stats.c head/sys/kern/subr_turnstile.c head/sys/kern/subr_witness.c head/sys/kern/sys_socket.c head/sys/kern/uipc_accf.c head/sys/kern/uipc_ktls.c head/sys/kern/uipc_mbuf.c head/sys/kern/uipc_mqueue.c head/sys/kern/uipc_sockbuf.c head/sys/kern/uipc_socket.c head/sys/kern/uipc_usrreq.c head/sys/kern/vfs_aio.c head/sys/kern/vfs_cache.c head/sys/libkern/iconv.c head/sys/mips/atheros/ar531x/ar5315_machdep.c head/sys/mips/atheros/if_arge.c head/sys/mips/cavium/octe/mv88e61xxphy.c head/sys/mips/cavium/octeon_machdep.c head/sys/mips/cavium/usb/octusb.c head/sys/mips/ingenic/jz4780_aic.c head/sys/mips/mips/busdma_machdep.c head/sys/mips/mips/pmap.c head/sys/mips/mips/tick.c head/sys/mips/nlm/cms.c head/sys/mips/nlm/dev/net/xlpge.c head/sys/mips/nlm/tick.c head/sys/net/bpf.c head/sys/net/bpf_jitter.c head/sys/net/debugnet.c head/sys/net/ieee8023ad_lacp.c head/sys/net/if.c head/sys/net/if_bridge.c head/sys/net/if_enc.c head/sys/net/if_epair.c head/sys/net/if_ethersubr.c head/sys/net/if_gif.c head/sys/net/if_gre.c head/sys/net/if_lagg.c head/sys/net/if_me.c head/sys/net/if_mib.c head/sys/net/if_stf.c head/sys/net/if_tuntap.c head/sys/net/if_vxlan.c head/sys/net/iflib.c head/sys/net/netisr.c head/sys/net/raw_cb.c head/sys/net/route.c head/sys/net/rss_config.c head/sys/net/rtsock.c head/sys/net/vnet.h head/sys/netgraph/bluetooth/common/ng_bluetooth.c head/sys/netgraph/bluetooth/socket/ng_btsocket.c head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c head/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c head/sys/netgraph/ng_base.c head/sys/netgraph/ng_iface.c head/sys/netgraph/ng_mppc.c head/sys/netgraph/ng_pptpgre.c head/sys/netgraph/ng_socket.c head/sys/netinet/accf_http.c head/sys/netinet/cc/cc.c head/sys/netinet/cc/cc_cdg.c head/sys/netinet/cc/cc_chd.c head/sys/netinet/cc/cc_dctcp.c head/sys/netinet/cc/cc_hd.c head/sys/netinet/cc/cc_htcp.c head/sys/netinet/cc/cc_newreno.c head/sys/netinet/cc/cc_vegas.c head/sys/netinet/if_ether.c head/sys/netinet/in_mcast.c head/sys/netinet/in_pcb.c head/sys/netinet/in_proto.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_id.c head/sys/netinet/ip_input.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_reass.c head/sys/netinet/libalias/alias.c head/sys/netinet/netdump/netdump_client.c head/sys/netinet/raw_ip.c head/sys/netinet/siftr.c head/sys/netinet/tcp_fastopen.c head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_hpts.c head/sys/netinet/tcp_input.c head/sys/netinet/tcp_log_buf.c head/sys/netinet/tcp_ratelimit.c head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_sack.c head/sys/netinet/tcp_stacks/bbr.c head/sys/netinet/tcp_stacks/rack.c head/sys/netinet/tcp_stats.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_timer.c head/sys/netinet/tcp_timewait.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/frag6.c head/sys/netinet6/in6_mcast.c head/sys/netinet6/in6_proto.c head/sys/netinet6/in6_src.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/mld6.c head/sys/netinet6/udp6_usrreq.c head/sys/netipsec/ipsec.c head/sys/netipsec/key.c head/sys/netipsec/keysock.c head/sys/netpfil/ipfw/dn_aqm_codel.c head/sys/netpfil/ipfw/dn_aqm_pie.c head/sys/netpfil/ipfw/dn_sched_fq_codel.c head/sys/netpfil/ipfw/dn_sched_fq_pie.c head/sys/netpfil/ipfw/ip_dn_io.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_dynamic.c head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/ipfw/nat64/ip_fw_nat64.c head/sys/netsmb/smb_conn.c head/sys/nfs/nfs_fha.c head/sys/nlm/nlm_prot_impl.c head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c head/sys/opencrypto/ktls_ocf.c head/sys/powerpc/amigaone/cpld_x5000.c head/sys/powerpc/fpu/fpu_emu.c head/sys/powerpc/ofw/ofw_syscons.c head/sys/powerpc/powermac/atibl.c head/sys/powerpc/powermac/fcu.c head/sys/powerpc/powermac/nvbl.c head/sys/powerpc/powermac/pmu.c head/sys/powerpc/powermac/smu.c head/sys/powerpc/powernv/opal_sensor.c head/sys/powerpc/powerpc/busdma_machdep.c head/sys/powerpc/powerpc/elf32_machdep.c head/sys/powerpc/ps3/ps3disk.c head/sys/riscv/riscv/busdma_bounce.c head/sys/riscv/riscv/pmap.c head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c head/sys/rpc/svc.c head/sys/security/audit/audit.c head/sys/security/mac/mac_framework.c head/sys/security/mac_biba/mac_biba.c head/sys/security/mac_bsdextended/mac_bsdextended.c head/sys/security/mac_ifoff/mac_ifoff.c head/sys/security/mac_lomac/mac_lomac.c head/sys/security/mac_mls/mac_mls.c head/sys/security/mac_ntpd/mac_ntpd.c head/sys/security/mac_partition/mac_partition.c head/sys/security/mac_portacl/mac_portacl.c head/sys/security/mac_seeotheruids/mac_seeotheruids.c head/sys/security/mac_stub/mac_stub.c head/sys/security/mac_test/mac_test.c head/sys/security/mac_veriexec/mac_veriexec.c head/sys/security/mac_veriexec/veriexec_fingerprint.c head/sys/sys/jail.h head/sys/tests/epoch/epoch_test.c head/sys/tests/framework/kern_testfrwk.c head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ufs/ufs_dirhash.c head/sys/ufs/ufs/ufs_vnops.c head/sys/vm/memguard.c head/sys/vm/redzone.c head/sys/vm/swap_pager.c head/sys/vm/uma_core.c head/sys/vm/vm_meter.c head/sys/vm/vm_object.c head/sys/vm/vm_page.c head/sys/vm/vm_pageout.c head/sys/vm/vm_phys.c head/sys/vm/vm_reserv.c head/sys/x86/bios/vpd.c head/sys/x86/cpufreq/hwpstate_intel.c head/sys/x86/iommu/intel_utils.c head/sys/x86/isa/clock.c head/sys/x86/x86/busdma_bounce.c head/sys/x86/x86/cpu_machdep.c head/sys/x86/x86/intr_machdep.c head/sys/x86/x86/local_apic.c head/sys/x86/x86/mca.c head/sys/x86/x86/mp_watchdog.c head/sys/x86/x86/mp_x86.c head/sys/x86/x86/tsc.c Modified: head/sys/amd64/amd64/efirt_machdep.c ============================================================================== --- head/sys/amd64/amd64/efirt_machdep.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/amd64/amd64/efirt_machdep.c Wed Feb 26 14:26:36 2020 (r358333) @@ -325,5 +325,7 @@ efi_time_sysctl_handler(SYSCTL_HANDLER_ARGS) return (error); } -SYSCTL_PROC(_debug, OID_AUTO, efi_time, CTLTYPE_INT | CTLFLAG_RW, NULL, 0, - efi_time_sysctl_handler, "I", ""); +SYSCTL_PROC(_debug, OID_AUTO, efi_time, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, + efi_time_sysctl_handler, "I", + ""); Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/amd64/amd64/machdep.c Wed Feb 26 14:26:36 2020 (r358333) @@ -1960,8 +1960,10 @@ smap_sysctl_handler(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_machdep, OID_AUTO, smap, CTLTYPE_OPAQUE|CTLFLAG_RD, NULL, 0, - smap_sysctl_handler, "S,bios_smap_xattr", "Raw BIOS SMAP data"); +SYSCTL_PROC(_machdep, OID_AUTO, smap, + CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, + smap_sysctl_handler, "S,bios_smap_xattr", + "Raw BIOS SMAP data"); static int efi_map_sysctl_handler(SYSCTL_HANDLER_ARGS) @@ -1980,8 +1982,10 @@ efi_map_sysctl_handler(SYSCTL_HANDLER_ARGS) efisize = *((uint32_t *)efihdr - 1); return (SYSCTL_OUT(req, efihdr, efisize)); } -SYSCTL_PROC(_machdep, OID_AUTO, efi_map, CTLTYPE_OPAQUE|CTLFLAG_RD, NULL, 0, - efi_map_sysctl_handler, "S,efi_map_header", "Raw EFI Memory Map"); +SYSCTL_PROC(_machdep, OID_AUTO, efi_map, + CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, + efi_map_sysctl_handler, "S,efi_map_header", + "Raw EFI Memory Map"); void spinlock_enter(void) Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/amd64/amd64/pmap.c Wed Feb 26 14:26:36 2020 (r358333) @@ -390,7 +390,8 @@ vm_paddr_t dmaplimit; vm_offset_t kernel_vm_end = VM_MIN_KERNEL_ADDRESS; pt_entry_t pg_nx; -static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); +static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "VM/pmap parameters"); static int pg_ps_enabled = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, @@ -2196,7 +2197,7 @@ SYSCTL_UINT(_vm_pmap, OID_AUTO, large_map_pml4_entries "Maximum number of PML4 entries for use by large map (tunable). " "Each entry corresponds to 512GB of address space."); -static SYSCTL_NODE(_vm_pmap, OID_AUTO, pde, CTLFLAG_RD, 0, +static SYSCTL_NODE(_vm_pmap, OID_AUTO, pde, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "2MB page mapping counters"); static u_long pmap_pde_demotions; @@ -2215,7 +2216,7 @@ static u_long pmap_pde_promotions; SYSCTL_ULONG(_vm_pmap_pde, OID_AUTO, promotions, CTLFLAG_RD, &pmap_pde_promotions, 0, "2MB page promotions"); -static SYSCTL_NODE(_vm_pmap, OID_AUTO, pdpe, CTLFLAG_RD, 0, +static SYSCTL_NODE(_vm_pmap, OID_AUTO, pdpe, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "1GB page mapping counters"); static u_long pmap_pdpe_demotions; Modified: head/sys/amd64/amd64/prof_machdep.c ============================================================================== --- head/sys/amd64/amd64/prof_machdep.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/amd64/amd64/prof_machdep.c Wed Feb 26 14:26:36 2020 (r358333) @@ -262,8 +262,10 @@ sysctl_machdep_cputime_clock(SYSCTL_HANDLER_ARGS) return (error); } -SYSCTL_PROC(_machdep, OID_AUTO, cputime_clock, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_cputime_clock, "I", ""); +SYSCTL_PROC(_machdep, OID_AUTO, cputime_clock, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, sizeof(u_int), + sysctl_machdep_cputime_clock, "I", + ""); /* * The start and stop routines need not be here since we turn off profiling Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/amd64/linux32/linux32_sysvec.c Wed Feb 26 14:26:36 2020 (r358333) @@ -837,7 +837,7 @@ linux_copyout_strings(struct image_params *imgp, uintp return (0); } -static SYSCTL_NODE(_compat, OID_AUTO, linux32, CTLFLAG_RW, 0, +static SYSCTL_NODE(_compat, OID_AUTO, linux32, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "32-bit Linux emulation"); static u_long linux32_maxdsiz = LINUX32_MAXDSIZ; Modified: head/sys/arm/altera/socfpga/socfpga_rstmgr.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_rstmgr.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/altera/socfpga/socfpga_rstmgr.c Wed Feb 26 14:26:36 2020 (r358333) @@ -190,13 +190,16 @@ rstmgr_add_sysctl(struct rstmgr_softc *sc) children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "fpga2hps", - CTLTYPE_UINT | CTLFLAG_RW, sc, RSTMGR_SYSCTL_FPGA2HPS, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, RSTMGR_SYSCTL_FPGA2HPS, rstmgr_sysctl, "I", "Enable fpga2hps bridge"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "lwhps2fpga", - CTLTYPE_UINT | CTLFLAG_RW, sc, RSTMGR_SYSCTL_LWHPS2FPGA, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, RSTMGR_SYSCTL_LWHPS2FPGA, rstmgr_sysctl, "I", "Enable lwhps2fpga bridge"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "hps2fpga", - CTLTYPE_UINT | CTLFLAG_RW, sc, RSTMGR_SYSCTL_HPS2FPGA, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, RSTMGR_SYSCTL_HPS2FPGA, rstmgr_sysctl, "I", "Enable hps2fpga bridge"); return (0); Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/arm/busdma_machdep.c Wed Feb 26 14:26:36 2020 (r358333) @@ -148,7 +148,8 @@ static counter_u64_t maploads_physmem; static STAILQ_HEAD(, bounce_zone) bounce_zone_list; -SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters"); +SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "Busdma parameters"); SYSCTL_UINT(_hw_busdma, OID_AUTO, tags_total, CTLFLAG_RD, &tags_total, 0, "Number of active tags"); SYSCTL_UINT(_hw_busdma, OID_AUTO, maps_total, CTLFLAG_RD, &maps_total, 0, @@ -1591,7 +1592,7 @@ alloc_bounce_zone(bus_dma_tag_t dmat) sysctl_ctx_init(&bz->sysctl_tree); bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree, SYSCTL_STATIC_CHILDREN(_hw_busdma), OID_AUTO, bz->zoneid, - CTLFLAG_RD, 0, ""); + CTLFLAG_RD | CTLFLAG_MPSAFE, 0, ""); if (bz->sysctl_tree_top == NULL) { sysctl_ctx_free(&bz->sysctl_tree); return (0); /* XXX error code? */ Modified: head/sys/arm/arm/cpuinfo.c ============================================================================== --- head/sys/arm/arm/cpuinfo.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/arm/cpuinfo.c Wed Feb 26 14:26:36 2020 (r358333) @@ -56,9 +56,9 @@ struct cpuinfo cpuinfo = .icache_line_mask = 31, }; -static SYSCTL_NODE(_hw, OID_AUTO, cpu, CTLFLAG_RD, 0, +static SYSCTL_NODE(_hw, OID_AUTO, cpu, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "CPU"); -static SYSCTL_NODE(_hw_cpu, OID_AUTO, quirks, CTLFLAG_RD, 0, +static SYSCTL_NODE(_hw_cpu, OID_AUTO, quirks, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "CPU quirks"); /* Modified: head/sys/arm/arm/machdep_boot.c ============================================================================== --- head/sys/arm/arm/machdep_boot.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/arm/machdep_boot.c Wed Feb 26 14:26:36 2020 (r358333) @@ -88,7 +88,8 @@ static char linux_command_line[LBABI_MAX_COMMAND_LINE static char atags[LBABI_MAX_COMMAND_LINE * 2]; #endif /* defined(LINUX_BOOT_ABI) */ -SYSCTL_NODE(_hw, OID_AUTO, board, CTLFLAG_RD, 0, "Board attributes"); +SYSCTL_NODE(_hw, OID_AUTO, board, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "Board attributes"); SYSCTL_UINT(_hw_board, OID_AUTO, revision, CTLFLAG_RD, &board_revision, 0, "Board revision"); SYSCTL_STRING(_hw_board, OID_AUTO, serial, CTLFLAG_RD, Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/arm/pmap-v6.c Wed Feb 26 14:26:36 2020 (r358333) @@ -1550,7 +1550,8 @@ pmap_pte2list_init(vm_offset_t *head, void *base, int * *****************************************************************************/ -SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); +SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "VM/pmap parameters"); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_max, CTLFLAG_RD, &pv_entry_max, 0, "Max number of PV entries"); @@ -1572,7 +1573,7 @@ pmap_ps_enabled(pmap_t pmap __unused) return (sp_enabled != 0); } -static SYSCTL_NODE(_vm_pmap, OID_AUTO, pte1, CTLFLAG_RD, 0, +static SYSCTL_NODE(_vm_pmap, OID_AUTO, pte1, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "1MB page mapping counters"); static u_long pmap_pte1_demotions; @@ -2108,8 +2109,9 @@ kvm_size(SYSCTL_HANDLER_ARGS) return (sysctl_handle_long(oidp, &ksize, 0, req)); } -SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD, - 0, 0, kvm_size, "IU", "Size of KVM"); +SYSCTL_PROC(_vm, OID_AUTO, kvm_size, + CTLTYPE_LONG | CTLFLAG_RD | CTLFLAG_NEEDGIANT, 0, 0, kvm_size, "IU", + "Size of KVM"); static int kvm_free(SYSCTL_HANDLER_ARGS) @@ -2118,8 +2120,9 @@ kvm_free(SYSCTL_HANDLER_ARGS) return (sysctl_handle_long(oidp, &kfree, 0, req)); } -SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD, - 0, 0, kvm_free, "IU", "Amount of KVM free"); +SYSCTL_PROC(_vm, OID_AUTO, kvm_free, + CTLTYPE_LONG | CTLFLAG_RD | CTLFLAG_NEEDGIANT, 0, 0, kvm_free, "IU", + "Amount of KVM free"); /*********************************************** * Modified: head/sys/arm/broadcom/bcm2835/bcm2835_audio.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_audio.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/broadcom/bcm2835/bcm2835_audio.c Wed Feb 26 14:26:36 2020 (r358333) @@ -810,7 +810,7 @@ vchi_audio_sysctl_init(struct bcm2835_audio_info *sc) tree_node = device_get_sysctl_tree(sc->dev); tree = SYSCTL_CHILDREN(tree_node); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "dest", - CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc), sysctl_bcm2835_audio_dest, "IU", "audio destination, " "0 - auto, 1 - headphones, 2 - HDMI"); SYSCTL_ADD_UQUAD(ctx, tree, OID_AUTO, "callbacks", Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Wed Feb 26 14:26:36 2020 (r358333) @@ -248,16 +248,20 @@ bcm_bsc_sysctl_init(struct bcm_bsc_softc *sc) tree_node = device_get_sysctl_tree(sc->sc_dev); tree = SYSCTL_CHILDREN(tree_node); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "frequency", - CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, + sc, sizeof(*sc), bcm_bsc_clock_proc, "IU", "I2C BUS clock frequency"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clock_stretch", - CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, + sc, sizeof(*sc), bcm_bsc_clkt_proc, "IU", "I2C BUS clock stretch timeout"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "fall_edge_delay", - CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, + sc, sizeof(*sc), bcm_bsc_fall_proc, "IU", "I2C BUS falling edge delay"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "rise_edge_delay", - CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, + sc, sizeof(*sc), bcm_bsc_rise_proc, "IU", "I2C BUS rising edge delay"); SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "debug", CTLFLAG_RWTUN, &sc->sc_debug, 0, Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Wed Feb 26 14:26:36 2020 (r358333) @@ -1245,7 +1245,8 @@ bcm2835_cpufreq_init(void *arg) ctx = device_get_sysctl_ctx(cpu); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(cpu)), OID_AUTO, - "temperature", CTLTYPE_INT | CTLFLAG_RD, sc, 0, + "temperature", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_devcpu_temperature, "IK", "Current SoC temperature"); } @@ -1312,57 +1313,67 @@ bcm2835_cpufreq_attach(device_t dev) /* create node for hw.cpufreq */ oid = SYSCTL_ADD_NODE(&bcm2835_sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, "cpufreq", - CTLFLAG_RD, NULL, ""); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, ""); /* Frequency (Hz) */ SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid), - OID_AUTO, "arm_freq", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + OID_AUTO, "arm_freq", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_cpufreq_arm_freq, "IU", "ARM frequency (Hz)"); SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid), - OID_AUTO, "core_freq", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + OID_AUTO, "core_freq", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_cpufreq_core_freq, "IU", "Core frequency (Hz)"); SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid), - OID_AUTO, "sdram_freq", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + OID_AUTO, "sdram_freq", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_cpufreq_sdram_freq, "IU", "SDRAM frequency (Hz)"); /* Turbo state */ SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid), - OID_AUTO, "turbo", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + OID_AUTO, "turbo", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_cpufreq_turbo, "IU", "Disables dynamic clocking"); /* Voltage (offset from 1.2V in units of 0.025V) */ SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid), - OID_AUTO, "voltage_core", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + OID_AUTO, "voltage_core", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_cpufreq_voltage_core, "I", "ARM/GPU core voltage" "(offset from 1.2V in units of 0.025V)"); SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid), - OID_AUTO, "voltage_sdram", CTLTYPE_INT | CTLFLAG_WR, sc, + OID_AUTO, "voltage_sdram", + CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_cpufreq_voltage_sdram, "I", "SDRAM voltage (offset from 1.2V in units of 0.025V)"); /* Voltage individual SDRAM */ SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid), - OID_AUTO, "voltage_sdram_c", CTLTYPE_INT | CTLFLAG_RW, sc, + OID_AUTO, "voltage_sdram_c", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_cpufreq_voltage_sdram_c, "I", "SDRAM controller voltage" "(offset from 1.2V in units of 0.025V)"); SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid), - OID_AUTO, "voltage_sdram_i", CTLTYPE_INT | CTLFLAG_RW, sc, + OID_AUTO, "voltage_sdram_i", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_cpufreq_voltage_sdram_i, "I", "SDRAM I/O voltage (offset from 1.2V in units of 0.025V)"); SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid), - OID_AUTO, "voltage_sdram_p", CTLTYPE_INT | CTLFLAG_RW, sc, + OID_AUTO, "voltage_sdram_p", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_cpufreq_voltage_sdram_p, "I", "SDRAM phy voltage (offset from 1.2V in units of 0.025V)"); /* Temperature */ SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid), - OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, sc, 0, + OID_AUTO, "temperature", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_cpufreq_temperature, "I", "SoC temperature (thousandths of a degree C)"); } Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Wed Feb 26 14:26:36 2020 (r358333) @@ -199,7 +199,7 @@ bcm_fb_sysctl_init(struct bcmsc_softc *sc) tree_node = device_get_sysctl_tree(sc->dev); tree = SYSCTL_CHILDREN(tree_node); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "resync", - CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc), bcm_fb_resync_sysctl, "IU", "Set to resync framebuffer with VC"); } Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Wed Feb 26 14:26:36 2020 (r358333) @@ -594,14 +594,14 @@ bcm_gpio_sysctl_init(struct bcm_gpio_softc *sc) tree_node = device_get_sysctl_tree(sc->sc_dev); tree = SYSCTL_CHILDREN(tree_node); pin_node = SYSCTL_ADD_NODE(ctx, tree, OID_AUTO, "pin", - CTLFLAG_RD, NULL, "GPIO Pins"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "GPIO Pins"); pin_tree = SYSCTL_CHILDREN(pin_node); for (i = 0; i < sc->sc_gpio_npins; i++) { snprintf(pinbuf, sizeof(pinbuf), "%d", i); pinN_node = SYSCTL_ADD_NODE(ctx, pin_tree, OID_AUTO, pinbuf, - CTLFLAG_RD, NULL, "GPIO Pin"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "GPIO Pin"); pinN_tree = SYSCTL_CHILDREN(pinN_node); sc->sc_sysctl[i].sc = sc; @@ -609,7 +609,7 @@ bcm_gpio_sysctl_init(struct bcm_gpio_softc *sc) sc_sysctl->sc = sc; sc_sysctl->pin = sc->sc_gpio_pins[i].gp_pin; SYSCTL_ADD_PROC(ctx, pinN_tree, OID_AUTO, "function", - CTLFLAG_RW | CTLTYPE_STRING, sc_sysctl, + CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_NEEDGIANT, sc_sysctl, sizeof(struct bcm_gpio_sysctl), bcm_gpio_func_proc, "A", "Pin Function"); } Modified: head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c Wed Feb 26 14:26:36 2020 (r358333) @@ -364,7 +364,8 @@ bcm_pwm_sysctl_init(struct bcm_pwm_softc *sc) if (bootverbose) { #define RR(x,y) \ SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, y, \ - CTLFLAG_RW | CTLTYPE_UINT, sc, 0x##x, \ + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, \ + sc, 0x##x, \ bcm_pwm_reg_proc, "IU", "Register 0x" #x " " y); RR(24, "DAT2") @@ -379,31 +380,31 @@ bcm_pwm_sysctl_init(struct bcm_pwm_softc *sc) } SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "pwm_freq", - CTLFLAG_RD | CTLTYPE_UINT, sc, 0, + CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0, bcm_pwm_pwm_freq_proc, "IU", "PWM frequency ch 1 (Hz)"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "period", - CTLFLAG_RW | CTLTYPE_UINT, sc, 0, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0, bcm_pwm_period_proc, "IU", "PWM period ch 1 (#clocks)"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "ratio", - CTLFLAG_RW | CTLTYPE_UINT, sc, 0, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0, bcm_pwm_ratio_proc, "IU", "PWM ratio ch 1 (0...period)"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "freq", - CTLFLAG_RW | CTLTYPE_UINT, sc, 0, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0, bcm_pwm_freq_proc, "IU", "PWM clock (Hz)"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "mode", - CTLFLAG_RW | CTLTYPE_UINT, sc, 0, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0, bcm_pwm_mode_proc, "IU", "PWM mode ch 1 (0=off, 1=pwm, 2=dither)"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "pwm_freq2", - CTLFLAG_RD | CTLTYPE_UINT, sc, 0, + CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0, bcm_pwm_pwm_freq2_proc, "IU", "PWM frequency ch 2 (Hz)"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "period2", - CTLFLAG_RW | CTLTYPE_UINT, sc, 0, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0, bcm_pwm_period2_proc, "IU", "PWM period ch 2 (#clocks)"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "ratio2", - CTLFLAG_RW | CTLTYPE_UINT, sc, 0, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0, bcm_pwm_ratio2_proc, "IU", "PWM ratio ch 2 (0...period)"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "mode2", - CTLFLAG_RW | CTLTYPE_UINT, sc, 0, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0, bcm_pwm_mode2_proc, "IU", "PWM mode ch 2 (0=off, 1=pwm, 2=dither)"); } Modified: head/sys/arm/broadcom/bcm2835/bcm2835_rng.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_rng.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/broadcom/bcm2835/bcm2835_rng.c Wed Feb 26 14:26:36 2020 (r358333) @@ -403,14 +403,14 @@ bcm2835_rng_attach(device_t dev) "underrun", CTLFLAG_RD, &sc->sc_underrun, "Number of FIFO underruns"); SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, - "2xspeed", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + "2xspeed", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_rng_2xspeed, "I", "Enable RBG 2X SPEED"); SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "stall_count", CTLFLAG_RW, &sc->sc_stall_count, RNG_STALL_COUNT_DEFAULT, "Number of underruns to assume RNG stall"); #ifdef BCM2835_RNG_DEBUG_REGISTERS SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, - "dumpregs", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, + "dumpregs", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, sysctl_bcm2835_rng_dump, "S", "Dump RNG registers"); #endif Modified: head/sys/arm/broadcom/bcm2835/bcm2835_spi.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_spi.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/broadcom/bcm2835/bcm2835_spi.c Wed Feb 26 14:26:36 2020 (r358333) @@ -204,22 +204,22 @@ bcm_spi_sysctl_init(struct bcm_spi_softc *sc) tree_node = device_get_sysctl_tree(sc->sc_dev); tree = SYSCTL_CHILDREN(tree_node); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clock", - CTLFLAG_RD | CTLTYPE_UINT, sc, sizeof(*sc), + CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc), bcm_spi_clock_proc, "IU", "SPI BUS clock frequency"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cpol", - CTLFLAG_RD | CTLTYPE_UINT, sc, sizeof(*sc), + CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc), bcm_spi_cpol_proc, "IU", "SPI BUS clock polarity"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cpha", - CTLFLAG_RD | CTLTYPE_UINT, sc, sizeof(*sc), + CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc), bcm_spi_cpha_proc, "IU", "SPI BUS clock phase"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cspol0", - CTLFLAG_RD | CTLTYPE_UINT, sc, sizeof(*sc), + CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc), bcm_spi_cspol0_proc, "IU", "SPI BUS chip select 0 polarity"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cspol1", - CTLFLAG_RD | CTLTYPE_UINT, sc, sizeof(*sc), + CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc), bcm_spi_cspol1_proc, "IU", "SPI BUS chip select 1 polarity"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cspol2", - CTLFLAG_RD | CTLTYPE_UINT, sc, sizeof(*sc), + CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc), bcm_spi_cspol2_proc, "IU", "SPI BUS chip select 2 polarity"); } Modified: head/sys/arm/freescale/imx/imx6_anatop.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_anatop.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/freescale/imx/imx6_anatop.c Wed Feb 26 14:26:36 2020 (r358333) @@ -400,11 +400,13 @@ cpufreq_initialize(struct imx6_anatop_softc *sc) "CPU frequency"); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx), - OID_AUTO, "cpu_minmhz", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + OID_AUTO, "cpu_minmhz", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_NEEDGIANT, sc, 0, cpufreq_sysctl_minmhz, "IU", "Minimum CPU frequency"); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx), - OID_AUTO, "cpu_maxmhz", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + OID_AUTO, "cpu_maxmhz", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_NEEDGIANT, sc, 0, cpufreq_sysctl_maxmhz, "IU", "Maximum CPU frequency"); SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx), @@ -627,10 +629,12 @@ initialize_tempmon(struct imx6_anatop_softc *sc) 0, tempmon_throttle_check, sc, 0); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx), - OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, sc, 0, + OID_AUTO, "temperature", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, temp_sysctl_handler, "IK", "Current die temperature"); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx), - OID_AUTO, "throttle_temperature", CTLTYPE_INT | CTLFLAG_RW, sc, + OID_AUTO, "throttle_temperature", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, temp_throttle_sysctl_handler, "IK", "Throttle CPU when exceeding this temperature"); } Modified: head/sys/arm/freescale/imx/imx_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx_machdep.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/freescale/imx/imx_machdep.c Wed Feb 26 14:26:36 2020 (r358333) @@ -47,7 +47,8 @@ __FBSDID("$FreeBSD$"); #include #include -SYSCTL_NODE(_hw, OID_AUTO, imx, CTLFLAG_RW, NULL, "i.MX container"); +SYSCTL_NODE(_hw, OID_AUTO, imx, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, + "i.MX container"); static int last_reset_status; SYSCTL_UINT(_hw_imx, OID_AUTO, last_reset_status, CTLFLAG_RD, Modified: head/sys/arm/mv/mv_thermal.c ============================================================================== --- head/sys/arm/mv/mv_thermal.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/mv/mv_thermal.c Wed Feb 26 14:26:36 2020 (r358333) @@ -333,7 +333,7 @@ mv_thermal_attach(device_t dev) oid = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); /* There is always at least one sensor */ SYSCTL_ADD_PROC(ctx, oid, OID_AUTO, "internal", - CTLTYPE_INT | CTLFLAG_RD, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, 0, mv_thermal_sysctl, "IK", "Internal Temperature"); @@ -342,7 +342,7 @@ mv_thermal_attach(device_t dev) snprintf(name, sizeof(name), "cpu%d", i); snprintf(desc, sizeof(desc), "CPU%d Temperature", i); SYSCTL_ADD_PROC(ctx, oid, OID_AUTO, name, - CTLTYPE_INT | CTLFLAG_RD, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, i + 1, mv_thermal_sysctl, "IK", desc); Modified: head/sys/arm/mv/mv_ts.c ============================================================================== --- head/sys/arm/mv/mv_ts.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/mv/mv_ts.c Wed Feb 26 14:26:36 2020 (r358333) @@ -150,7 +150,8 @@ ts_attach(device_t dev) } ctx = device_get_sysctl_ctx(dev); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, dev, + OID_AUTO, "temperature", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, 0, ts_sysctl_handler, "IK", "Current Temperature"); return (0); Modified: head/sys/arm/nvidia/tegra124/tegra124_coretemp.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_coretemp.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/nvidia/tegra124/tegra124_coretemp.c Wed Feb 26 14:26:36 2020 (r358333) @@ -220,7 +220,8 @@ tegra124_coretemp_attach(device_t dev) oid = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)), OID_AUTO, - "coretemp", CTLFLAG_RD, NULL, "Per-CPU thermal information"); + "coretemp", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, + "Per-CPU thermal information"); /* * Add the MIBs to dev.cpu.N and dev.cpu.N.coretemp. Modified: head/sys/arm/nvidia/tegra_soctherm.c ============================================================================== --- head/sys/arm/nvidia/tegra_soctherm.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/nvidia/tegra_soctherm.c Wed Feb 26 14:26:36 2020 (r358333) @@ -511,7 +511,7 @@ soctherm_init_sysctl(struct soctherm_softc *sc) /* create node for hw.temp */ oid = SYSCTL_ADD_NODE(&soctherm_sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, "temperature", - CTLFLAG_RD, NULL, ""); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, ""); if (oid == NULL) return (ENXIO); @@ -519,7 +519,7 @@ soctherm_init_sysctl(struct soctherm_softc *sc) for (i = sc->ntsensors - 1; i >= 0; i--) { tmp = SYSCTL_ADD_PROC(&soctherm_sysctl_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, sc->tsensors[i].name, - CTLTYPE_INT | CTLFLAG_RD, sc, i, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, i, soctherm_sysctl_temperature, "IK", "SoC Temperature"); if (tmp == NULL) return (ENXIO); Modified: head/sys/arm/ti/am335x/am335x_ehrpwm.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_ehrpwm.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/ti/am335x/am335x_ehrpwm.c Wed Feb 26 14:26:36 2020 (r358333) @@ -589,23 +589,23 @@ am335x_ehrpwm_attach(device_t dev) tree = device_get_sysctl_tree(sc->sc_dev); sc->sc_clkdiv_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "clkdiv", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + "clkdiv", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, am335x_ehrpwm_sysctl_clkdiv, "I", "PWM clock prescaler"); sc->sc_freq_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "freq", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + "freq", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, am335x_ehrpwm_sysctl_freq, "I", "PWM frequency"); sc->sc_period_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "period", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + "period", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, am335x_ehrpwm_sysctl_period, "I", "PWM period"); sc->sc_chanA_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "dutyA", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + "dutyA", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, am335x_ehrpwm_sysctl_duty, "I", "Channel A duty cycles"); sc->sc_chanB_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "dutyB", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + "dutyB", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, am335x_ehrpwm_sysctl_duty, "I", "Channel B duty cycles"); /* CONFIGURE EPWM1 */ Modified: head/sys/arm/ti/am335x/am335x_lcd.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_lcd.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/ti/am335x/am335x_lcd.c Wed Feb 26 14:26:36 2020 (r358333) @@ -1025,7 +1025,7 @@ am335x_lcd_attach(device_t dev) ctx = device_get_sysctl_ctx(sc->sc_dev); tree = device_get_sysctl_tree(sc->sc_dev); sc->sc_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "backlight", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + "backlight", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, am335x_lcd_sysctl_backlight, "I", "LCD backlight"); sc->sc_backlight = 0; /* Check if eCAS interface is available at this point */ Modified: head/sys/arm/ti/am335x/am335x_musb.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_musb.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/ti/am335x/am335x_musb.c Wed Feb 26 14:26:36 2020 (r358333) @@ -115,7 +115,9 @@ static struct resource_spec am335x_musbotg_mem_spec[] #ifdef USB_DEBUG static int usbssdebug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, am335x_usbss, CTLFLAG_RW, 0, "AM335x USBSS"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, am335x_usbss, + CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "AM335x USBSS"); SYSCTL_INT(_hw_usb_am335x_usbss, OID_AUTO, debug, CTLFLAG_RW, &usbssdebug, 0, "Debug level"); #endif Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/ti/cpsw/if_cpsw.c Wed Feb 26 14:26:36 2020 (r358333) @@ -2725,15 +2725,17 @@ cpsw_add_sysctls(struct cpsw_softc *sc) CTLFLAG_RW, &sc->debug, 0, "Enable switch debug messages"); SYSCTL_ADD_PROC(ctx, parent, OID_AUTO, "attachedSecs", - CTLTYPE_UINT | CTLFLAG_RD, sc, 0, cpsw_stat_attached, "IU", + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + sc, 0, cpsw_stat_attached, "IU", "Time since driver attach"); SYSCTL_ADD_PROC(ctx, parent, OID_AUTO, "intr_coalesce_us", - CTLTYPE_UINT | CTLFLAG_RW, sc, 0, cpsw_intr_coalesce, "IU", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, cpsw_intr_coalesce, "IU", "minimum time between interrupts"); node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "ports", - CTLFLAG_RD, NULL, "CPSW Ports Statistics"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "CPSW Ports Statistics"); ports_parent = SYSCTL_CHILDREN(node); for (i = 0; i < CPSW_PORTS; i++) { if (!sc->dualemac && i != sc->active_slave) @@ -2741,38 +2743,39 @@ cpsw_add_sysctls(struct cpsw_softc *sc) port[0] = '0' + i; port[1] = '\0'; node = SYSCTL_ADD_NODE(ctx, ports_parent, OID_AUTO, - port, CTLFLAG_RD, NULL, "CPSW Port Statistics"); + port, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, + "CPSW Port Statistics"); port_parent = SYSCTL_CHILDREN(node); SYSCTL_ADD_PROC(ctx, port_parent, OID_AUTO, "uptime", - CTLTYPE_UINT | CTLFLAG_RD, sc, i, + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, i, cpsw_stat_uptime, "IU", "Seconds since driver init"); } stats_node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "stats", - CTLFLAG_RD, NULL, "CPSW Statistics"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "CPSW Statistics"); stats_parent = SYSCTL_CHILDREN(stats_node); for (i = 0; i < CPSW_SYSCTL_COUNT; ++i) { SYSCTL_ADD_PROC(ctx, stats_parent, i, cpsw_stat_sysctls[i].oid, - CTLTYPE_U64 | CTLFLAG_RD, sc, 0, - cpsw_stats_sysctl, "IU", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + sc, 0, cpsw_stats_sysctl, "IU", cpsw_stat_sysctls[i].oid); } queue_node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "queue", - CTLFLAG_RD, NULL, "CPSW Queue Statistics"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "CPSW Queue Statistics"); queue_parent = SYSCTL_CHILDREN(queue_node); node = SYSCTL_ADD_NODE(ctx, queue_parent, OID_AUTO, "tx", - CTLFLAG_RD, NULL, "TX Queue Statistics"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "TX Queue Statistics"); cpsw_add_queue_sysctls(ctx, node, &sc->tx); node = SYSCTL_ADD_NODE(ctx, queue_parent, OID_AUTO, "rx", - CTLFLAG_RD, NULL, "RX Queue Statistics"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "RX Queue Statistics"); cpsw_add_queue_sysctls(ctx, node, &sc->rx); node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "watchdog", - CTLFLAG_RD, NULL, "Watchdog Statistics"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Watchdog Statistics"); cpsw_add_watchdog_sysctls(ctx, node, sc); } Modified: head/sys/arm/ti/ti_adc.c ============================================================================== --- head/sys/arm/ti/ti_adc.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/ti/ti_adc.c Wed Feb 26 14:26:36 2020 (r358333) @@ -562,10 +562,10 @@ ti_adc_sysctl_init(struct ti_adc_softc *sc) tree_node = device_get_sysctl_tree(sc->sc_dev); tree = SYSCTL_CHILDREN(tree_node); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clockdiv", - CTLFLAG_RW | CTLTYPE_UINT, sc, 0, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0, ti_adc_clockdiv_proc, "IU", "ADC clock prescaler"); inp_node = SYSCTL_ADD_NODE(ctx, tree, OID_AUTO, "ain", - CTLFLAG_RD, NULL, "ADC inputs"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "ADC inputs"); inp_tree = SYSCTL_CHILDREN(inp_node); for (i = 0; i < sc->sc_adc_nchannels; i++) { @@ -573,17 +573,20 @@ ti_adc_sysctl_init(struct ti_adc_softc *sc) snprintf(pinbuf, sizeof(pinbuf), "%d", ain); inpN_node = SYSCTL_ADD_NODE(ctx, inp_tree, OID_AUTO, pinbuf, - CTLFLAG_RD, NULL, "ADC input"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "ADC input"); inpN_tree = SYSCTL_CHILDREN(inpN_node); SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "enable", - CTLFLAG_RW | CTLTYPE_UINT, &ti_adc_inputs[ain], 0, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, + &ti_adc_inputs[ain], 0, ti_adc_enable_proc, "IU", "Enable ADC input"); SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "open_delay", - CTLFLAG_RW | CTLTYPE_UINT, &ti_adc_inputs[ain], 0, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, + &ti_adc_inputs[ain], 0, ti_adc_open_delay_proc, "IU", "ADC open delay"); SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "samples_avg", - CTLFLAG_RW | CTLTYPE_UINT, &ti_adc_inputs[ain], 0, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, + &ti_adc_inputs[ain], 0, ti_adc_samples_avg_proc, "IU", "ADC samples average"); SYSCTL_ADD_INT(ctx, inpN_tree, OID_AUTO, "input", CTLFLAG_RD, &ti_adc_inputs[ain].value, 0, Modified: head/sys/arm/ti/ti_pruss.c ============================================================================== --- head/sys/arm/ti/ti_pruss.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/ti/ti_pruss.c Wed Feb 26 14:26:36 2020 (r358333) @@ -542,10 +542,11 @@ ti_pruss_attach(device_t dev) sc->sc_glob_irqen = false; struct sysctl_oid *irq_root = SYSCTL_ADD_NODE(clist, SYSCTL_CHILDREN(poid), - OID_AUTO, "irq", CTLFLAG_RD, 0, + OID_AUTO, "irq", CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "PRUSS Host Interrupts"); SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(poid), OID_AUTO, - "global_interrupt_enable", CTLFLAG_RW | CTLTYPE_U8, + "global_interrupt_enable", + CTLFLAG_RW | CTLTYPE_U8 | CTLFLAG_NEEDGIANT, sc, 0, ti_pruss_global_interrupt_enable, "CU", "Global interrupt enable"); @@ -564,16 +565,19 @@ ti_pruss_attach(device_t dev) snprintf(name, sizeof(name), "%d", i); struct sysctl_oid *irq_nodes = SYSCTL_ADD_NODE(clist, SYSCTL_CHILDREN(irq_root), - OID_AUTO, name, CTLFLAG_RD, 0, + OID_AUTO, name, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "PRUSS Interrupts"); SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(irq_nodes), OID_AUTO, - "channel", CTLFLAG_RW | CTLTYPE_STRING, sc, i, ti_pruss_channel_map, + "channel", CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_NEEDGIANT, + sc, i, ti_pruss_channel_map, "A", "Channel attached to this irq"); SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(irq_nodes), OID_AUTO, - "event", CTLFLAG_RW | CTLTYPE_STRING, sc, i, ti_pruss_event_map, + "event", CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_NEEDGIANT, + sc, i, ti_pruss_event_map, "A", "Event attached to this irq"); SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(irq_nodes), OID_AUTO, - "enable", CTLFLAG_RW | CTLTYPE_U8, sc, i, ti_pruss_interrupt_enable, + "enable", CTLFLAG_RW | CTLTYPE_U8 | CTLFLAG_NEEDGIANT, + sc, i, ti_pruss_interrupt_enable, "CU", "Enable/Disable interrupt"); sc->sc_irq_devs[i].event = -1; Modified: head/sys/arm/ti/twl/twl_clks.c ============================================================================== --- head/sys/arm/ti/twl/twl_clks.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/ti/twl/twl_clks.c Wed Feb 26 14:26:36 2020 (r358333) @@ -471,7 +471,7 @@ twl_clks_add_clock(struct twl_clks_softc *sc, const ch /* Add a sysctl entry for the clock */ new->oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, name, - CTLTYPE_INT | CTLFLAG_RD, sc, 0, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, twl_clks_sysctl_clock, "I", "external clock"); /* Finally add the regulator to list of supported regulators */ Modified: head/sys/arm/ti/twl/twl_vreg.c ============================================================================== --- head/sys/arm/ti/twl/twl_vreg.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/ti/twl/twl_vreg.c Wed Feb 26 14:26:36 2020 (r358333) @@ -848,7 +848,7 @@ twl_vreg_add_regulator(struct twl_vreg_softc *sc, cons /* Add a sysctl entry for the voltage */ new->oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, name, - CTLTYPE_INT | CTLFLAG_RD, sc, 0, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, twl_vreg_sysctl_voltage, "I", "voltage regulator"); /* Finally add the regulator to list of supported regulators */ Modified: head/sys/arm/xilinx/zy7_devcfg.c ============================================================================== --- head/sys/arm/xilinx/zy7_devcfg.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/xilinx/zy7_devcfg.c Wed Feb 26 14:26:36 2020 (r358333) @@ -101,12 +101,14 @@ static struct zy7_fclk_config fclk_configs[FCLK_NUM]; #define RD4(sc, off) (bus_read_4((sc)->mem_res, (off))) #define WR4(sc, off, val) (bus_write_4((sc)->mem_res, (off), (val))) -SYSCTL_NODE(_hw, OID_AUTO, fpga, CTLFLAG_RD, 0, \ - "Xilinx Zynq-7000 PL (FPGA) section"); +SYSCTL_NODE(_hw, OID_AUTO, fpga, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "Xilinx Zynq-7000 PL (FPGA) section"); static int zy7_devcfg_sysctl_pl_done(SYSCTL_HANDLER_ARGS); -SYSCTL_PROC(_hw_fpga, OID_AUTO, pl_done, CTLTYPE_INT | CTLFLAG_RD, NULL, 0, - zy7_devcfg_sysctl_pl_done, "I", "PL section config DONE signal"); +SYSCTL_PROC(_hw_fpga, OID_AUTO, pl_done, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, NULL, 0, + zy7_devcfg_sysctl_pl_done, "I", + "PL section config DONE signal"); static int zy7_en_level_shifters = 1; SYSCTL_INT(_hw_fpga, OID_AUTO, en_level_shifters, CTLFLAG_RW, @@ -119,9 +121,9 @@ SYSCTL_INT(_hw, OID_AUTO, ps_vers, CTLFLAG_RD, &zy7_ps static int zy7_devcfg_fclk_sysctl_level_shifters(SYSCTL_HANDLER_ARGS); SYSCTL_PROC(_hw_fpga, OID_AUTO, level_shifters, - CTLFLAG_RW | CTLTYPE_INT, - NULL, 0, zy7_devcfg_fclk_sysctl_level_shifters, - "I", "Enable/disable level shifters"); + CTLFLAG_RW | CTLTYPE_INT | CTLFLAG_NEEDGIANT, NULL, 0, + zy7_devcfg_fclk_sysctl_level_shifters, "I", + "Enable/disable level shifters"); /* cdev entry points. */ static int zy7_devcfg_open(struct cdev *, int, int, struct thread *); @@ -360,7 +362,7 @@ zy7_devcfg_init_fclk_sysctl(struct zy7_devcfg_softc *s sysctl_ctx_init(&sc->sysctl_tree); sc->sysctl_tree_top = SYSCTL_ADD_NODE(&sc->sysctl_tree, SYSCTL_STATIC_CHILDREN(_hw_fpga), OID_AUTO, "fclk", - CTLFLAG_RD, 0, ""); + CTLFLAG_RD | CTLFLAG_MPSAFE, 0, ""); if (sc->sysctl_tree_top == NULL) { sysctl_ctx_free(&sc->sysctl_tree); return (-1); @@ -370,7 +372,7 @@ zy7_devcfg_init_fclk_sysctl(struct zy7_devcfg_softc *s snprintf(fclk_num, sizeof(fclk_num), "%d", i); fclk_node = SYSCTL_ADD_NODE(&sc->sysctl_tree, SYSCTL_CHILDREN(sc->sysctl_tree_top), OID_AUTO, fclk_num, - CTLFLAG_RD, 0, ""); + CTLFLAG_RD | CTLFLAG_MPSAFE, 0, ""); SYSCTL_ADD_INT(&sc->sysctl_tree, SYSCTL_CHILDREN(fclk_node), OID_AUTO, @@ -379,13 +381,13 @@ zy7_devcfg_init_fclk_sysctl(struct zy7_devcfg_softc *s "Actual frequency"); SYSCTL_ADD_PROC(&sc->sysctl_tree, SYSCTL_CHILDREN(fclk_node), OID_AUTO, - "freq", CTLFLAG_RW | CTLTYPE_INT, + "freq", CTLFLAG_RW | CTLTYPE_INT | CTLFLAG_NEEDGIANT, &fclk_configs[i], i, zy7_devcfg_fclk_sysctl_freq, "I", "Configured frequency"); SYSCTL_ADD_PROC(&sc->sysctl_tree, SYSCTL_CHILDREN(fclk_node), OID_AUTO, - "source", CTLFLAG_RW | CTLTYPE_STRING, + "source", CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_NEEDGIANT, &fclk_configs[i], i, zy7_devcfg_fclk_sysctl_source, "A", "Clock source"); Modified: head/sys/arm/xilinx/zy7_slcr.c ============================================================================== --- head/sys/arm/xilinx/zy7_slcr.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm/xilinx/zy7_slcr.c Wed Feb 26 14:26:36 2020 (r358333) @@ -80,7 +80,8 @@ extern void (*zynq7_cpu_reset); #define ZYNQ_DEFAULT_PS_CLK_FREQUENCY 33333333 /* 33.3 Mhz */ -SYSCTL_NODE(_hw, OID_AUTO, zynq, CTLFLAG_RD, 0, "Xilinx Zynq-7000"); +SYSCTL_NODE(_hw, OID_AUTO, zynq, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "Xilinx Zynq-7000"); static char zynq_bootmode[64]; SYSCTL_STRING(_hw_zynq, OID_AUTO, bootmode, CTLFLAG_RD, zynq_bootmode, 0, Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm64/arm64/busdma_bounce.c Wed Feb 26 14:26:36 2020 (r358333) @@ -113,7 +113,8 @@ static int total_bpages; static int busdma_zonecount; static STAILQ_HEAD(, bounce_zone) bounce_zone_list; -static SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters"); +static SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "Busdma parameters"); SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0, "Total bounce pages"); @@ -1146,7 +1147,7 @@ alloc_bounce_zone(bus_dma_tag_t dmat) sysctl_ctx_init(&bz->sysctl_tree); bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree, SYSCTL_STATIC_CHILDREN(_hw_busdma), OID_AUTO, bz->zoneid, - CTLFLAG_RD, 0, ""); + CTLFLAG_RD | CTLFLAG_MPSAFE, 0, ""); if (bz->sysctl_tree_top == NULL) { sysctl_ctx_free(&bz->sysctl_tree); return (0); /* XXX error code? */ Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/arm64/arm64/pmap.c Wed Feb 26 14:26:36 2020 (r358333) @@ -270,7 +270,8 @@ extern pt_entry_t pagetable_dmap[]; static vm_paddr_t physmap[PHYSMAP_SIZE]; static u_int physmap_idx; -static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); +static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "VM/pmap parameters"); /* * This ASID allocator uses a bit vector ("asid_set") to remember which ASIDs @@ -294,7 +295,8 @@ struct asid_set { static struct asid_set asids; -static SYSCTL_NODE(_vm_pmap, OID_AUTO, asid, CTLFLAG_RD, 0, "ASID allocator"); +static SYSCTL_NODE(_vm_pmap, OID_AUTO, asid, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "ASID allocator"); SYSCTL_INT(_vm_pmap_asid, OID_AUTO, bits, CTLFLAG_RD, &asids.asid_bits, 0, "The number of bits in an ASID"); SYSCTL_INT(_vm_pmap_asid, OID_AUTO, next, CTLFLAG_RD, &asids.asid_next, 0, @@ -1032,7 +1034,7 @@ pmap_init(void) vm_initialized = 1; } -static SYSCTL_NODE(_vm_pmap, OID_AUTO, l2, CTLFLAG_RD, 0, +static SYSCTL_NODE(_vm_pmap, OID_AUTO, l2, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "2MB page mapping counters"); static u_long pmap_l2_demotions; Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Feb 26 13:48:33 2020 (r358332) +++ head/sys/cam/ata/ata_da.c Wed Feb 26 14:26:36 2020 (r358333) @@ -881,8 +881,8 @@ static int ada_read_ahead = ADA_DEFAULT_READ_AHEAD; static int ada_write_cache = ADA_DEFAULT_WRITE_CACHE; static int ada_enable_biospeedup = 1; -static SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD, 0, - "CAM Direct Access Disk driver"); +static SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "CAM Direct Access Disk driver"); SYSCTL_INT(_kern_cam_ada, OID_AUTO, retry_count, CTLFLAG_RWTUN, &ada_retry_count, 0, "Normal I/O retry count"); SYSCTL_INT(_kern_cam_ada, OID_AUTO, default_timeout, CTLFLAG_RWTUN, @@ -1455,7 +1455,7 @@ adasysctlinit(void *context, int pending) softc->flags |= ADA_FLAG_SCTX_INIT; softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_kern_cam_ada), OID_AUTO, tmpstr2, - CTLFLAG_RD, 0, tmpstr, "device_index"); + CTLFLAG_RD | CTLFLAG_MPSAFE, 0, tmpstr, "device_index"); if (softc->sysctl_tree == NULL) { printf("adasysctlinit: unable to allocate sysctl tree\n"); cam_periph_release(periph); @@ -1463,7 +1463,8 @@ adasysctlinit(void *context, int pending) } SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RW, + OID_AUTO, "delete_method", + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT, softc, 0, adadeletemethodsysctl, "A", "BIO_DELETE execution method"); SYSCTL_ADD_UQUAD(&softc->sysctl_ctx, @@ -1491,11 +1492,13 @@ adasysctlinit(void *context, int pending) OID_AUTO, "rotating", CTLFLAG_RD | CTLFLAG_MPSAFE, &softc->rotating, 0, "Rotating media"); SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "zone_mode", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "zone_mode", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, softc, 0, adazonemodesysctl, "A", "Zone Mode"); SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "zone_support", CTLTYPE_STRING | CTLFLAG_RD, + OID_AUTO, "zone_support", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, softc, 0, adazonesupsysctl, "A", "Zone Support"); SYSCTL_ADD_UQUAD(&softc->sysctl_ctx, @@ -1540,7 +1543,7 @@ adasysctlinit(void *context, int pending) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Feb 26 15:12:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF24625B05C; Wed, 26 Feb 2020 15:12:39 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SK6b4KFXz4SsJ; Wed, 26 Feb 2020 15:12:39 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D61C14E8; Wed, 26 Feb 2020 15:12:39 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01QFCdRR017433; Wed, 26 Feb 2020 15:12:39 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QFCdnZ017432; Wed, 26 Feb 2020 15:12:39 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002261512.01QFCdnZ017432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Wed, 26 Feb 2020 15:12:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358334 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358334 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 15:12:39 -0000 Author: kaktus Date: Wed Feb 26 15:12:38 2020 New Revision: 358334 URL: https://svnweb.freebsd.org/changeset/base/358334 Log: Move the SYSCTL_ENFORCE_FLAGS to SYSCTL_NODE_WITH_LABEL where it should be at the beginning. Modified: head/sys/sys/sysctl.h Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Wed Feb 26 14:26:36 2020 (r358333) +++ head/sys/sys/sysctl.h Wed Feb 26 15:12:38 2020 (r358334) @@ -324,7 +324,6 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); SYSCTL_OID_RAW(sysctl___##name, &sysctl__children, \ nbr, #name, CTLTYPE_NODE|(access), NULL, 0, \ handler, "N", descr, NULL); \ - SYSCTL_ENFORCE_FLAGS(access); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_NODE) @@ -335,6 +334,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define SYSCTL_NODE_WITH_LABEL(parent, nbr, name, access, handler, descr, label) \ SYSCTL_OID_GLOBAL(parent, nbr, name, CTLTYPE_NODE|(access), \ NULL, 0, handler, "N", descr, label); \ + SYSCTL_ENFORCE_FLAGS(access); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_NODE) From owner-svn-src-head@freebsd.org Wed Feb 26 15:15:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C95B25B10A; Wed, 26 Feb 2020 15:15:56 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SKBM6bgGz4br8; Wed, 26 Feb 2020 15:15:55 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C925E14EA; Wed, 26 Feb 2020 15:15:55 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01QFFtwE017641; Wed, 26 Feb 2020 15:15:55 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QFFtHJ017640; Wed, 26 Feb 2020 15:15:55 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202002261515.01QFFtHJ017640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 26 Feb 2020 15:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358335 - head/tests/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/netinet X-SVN-Commit-Revision: 358335 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 15:15:56 -0000 Author: lwhsu Date: Wed Feb 26 15:15:55 2020 New Revision: 358335 URL: https://svnweb.freebsd.org/changeset/base/358335 Log: Skip the right test case PR: 244172 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/netinet/fibs_test.sh Modified: head/tests/sys/netinet/fibs_test.sh ============================================================================== --- head/tests/sys/netinet/fibs_test.sh Wed Feb 26 15:12:38 2020 (r358334) +++ head/tests/sys/netinet/fibs_test.sh Wed Feb 26 15:15:55 2020 (r358335) @@ -626,9 +626,6 @@ udp_dontroute_head() udp_dontroute_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/244172" - fi # Configure the TAP interface to use an RFC5737 nonrouteable address # and a non-default fib ADDR0="192.0.2.2" @@ -680,6 +677,9 @@ udp_dontroute6_head() udp_dontroute6_body() { + if [ "$(atf_config_get ci false)" = "true" ]; then + atf_skip "https://bugs.freebsd.org/244172" + fi # Configure the TAP interface to use an RFC3849 nonrouteable address # and a non-default fib ADDR0="2001:db8::2" From owner-svn-src-head@freebsd.org Wed Feb 26 15:38:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F16FE25BAAF; Wed, 26 Feb 2020 15:38:36 +0000 (UTC) (envelope-from pawel.biernacki@gmail.com) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SKhW3R85z42tx; Wed, 26 Feb 2020 15:38:35 +0000 (UTC) (envelope-from pawel.biernacki@gmail.com) Received: by mail-ed1-f48.google.com with SMTP id e10so4258932edv.9; Wed, 26 Feb 2020 07:38:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=CgCuk8k6Uw+2a81JBPsNlo3JjWqHy6mnEFgaWHpLwBs=; b=XBDwPqFac8sDrmK3UAjksJ0eXgAcP65IJ1ZMmC0ApQzLLJbuVY1cNwBQ/xhcGCDAWh G6mAFqEo6oFDs+Z8k2DSnH/n1df81/DvbaC7A3nMEc1ZrSng+aqAZQG3uPsmvrdfBgvi vFtOdxcwgyGHsXDNPBOSxhyIE0pcnvMxnunSKHYjIDMFftsruvUzX/IH1loosoKyLW83 v+imqntcRw+0PkasumCkCQLMQn3vkKaq4tPis+3FrcqVdjKNiljSXNM/4t4sjtF+UBLi AH3qOHGEtGD8K5hYjFh5pkZbdZo8TPxNJ2qv0o51veBhIofTBITtOPXrt74bEalP3BhQ PSUQ== X-Gm-Message-State: APjAAAWxSOOoYfvc5uEX0QTK9BJwus0AVC2AyoKzV/yIOstlarDqxCFh ifG0rnkPRdcrGRecmQmfJvS+PXlR X-Google-Smtp-Source: APXvYqyzNTps15P2c5kDmjATFMm+VGh7rCghmtD4j+pTEWm77BpOAytPv0tck1z3ftxmRp8bCfNvRA== X-Received: by 2002:ac2:5b08:: with SMTP id v8mr2881844lfn.92.1582730000677; Wed, 26 Feb 2020 07:13:20 -0800 (PST) Received: from macbook.localdomain (193-106-244-222.noc.fibertech.net.pl. [193.106.244.222]) by smtp.gmail.com with ESMTPSA id g78sm1187512lfd.21.2020.02.26.07.13.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 07:13:19 -0800 (PST) From: =?utf-8?Q?Pawe=C5=82_Biernacki?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358334 - head/sys/sys Date: Wed, 26 Feb 2020 16:13:17 +0100 References: <202002261512.01QFCdnZ017432@repo.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <202002261512.01QFCdnZ017432@repo.freebsd.org> Message-Id: X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48SKhW3R85z42tx X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pawelbiernacki@gmail.com designates 209.85.208.48 as permitted sender) smtp.mailfrom=pawelbiernacki@gmail.com X-Spamd-Result: default: False [5.08 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:209.85.128.0/17]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FORGED_SENDER(0.30)[kaktus@FreeBSD.org,pawelbiernacki@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_NEQ_ENVFROM(0.00)[kaktus@FreeBSD.org,pawelbiernacki@gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[222.244.106.193.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.4]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.55)[0.547,0]; BAD_REP_POLICIES(0.10)[]; IP_SCORE(-2.17)[ip: (-6.12), ipnet: 209.85.128.0/17(-2.99), asn: 15169(-1.67), country: US(-0.05)]; NEURAL_SPAM_LONG(0.90)[0.904,0]; RCVD_IN_DNSWL_NONE(0.00)[48.208.85.209.list.dnswl.org : 127.0.5.0]; RWL_MAILSPIKE_POSSIBLE(0.00)[48.208.85.209.rep.mailspike.net : 127.0.0.17]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 15:38:37 -0000 Approved by: kib (mentor, blanket) > On 26 Feb 2020, at 16:12, Pawel Biernacki wrote: >=20 > Author: kaktus > Date: Wed Feb 26 15:12:38 2020 > New Revision: 358334 > URL: https://svnweb.freebsd.org/changeset/base/358334 >=20 > Log: > Move the SYSCTL_ENFORCE_FLAGS to SYSCTL_NODE_WITH_LABEL where it = should be > at the beginning. >=20 > Modified: > head/sys/sys/sysctl.h >=20 > Modified: head/sys/sys/sysctl.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/sys/sysctl.h Wed Feb 26 14:26:36 2020 = (r358333) > +++ head/sys/sys/sysctl.h Wed Feb 26 15:12:38 2020 = (r358334) > @@ -324,7 +324,6 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); > SYSCTL_OID_RAW(sysctl___##name, &sysctl__children, \ > nbr, #name, CTLTYPE_NODE|(access), NULL, 0, \ > handler, "N", descr, NULL); \ > - SYSCTL_ENFORCE_FLAGS(access); \ > CTASSERT(((access) & CTLTYPE) =3D=3D 0 || = \ > ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_NODE) >=20 > @@ -335,6 +334,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); > #define SYSCTL_NODE_WITH_LABEL(parent, nbr, name, access, = handler, descr, label) \ > SYSCTL_OID_GLOBAL(parent, nbr, name, CTLTYPE_NODE|(access), = \ > NULL, 0, handler, "N", descr, label); = \ > + SYSCTL_ENFORCE_FLAGS(access); = \ > CTASSERT(((access) & CTLTYPE) =3D=3D 0 || = \ > ((access) & SYSCTL_CT_ASSERT_MASK) =3D=3D CTLTYPE_NODE) >=20 From owner-svn-src-head@freebsd.org Wed Feb 26 15:45:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F5AB25BE25; Wed, 26 Feb 2020 15:45:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SKr16fpxz4KKn; Wed, 26 Feb 2020 15:45:05 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B6E21A90; Wed, 26 Feb 2020 15:45:05 +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 01QFj5dk035326; Wed, 26 Feb 2020 15:45:05 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QFj5W9035325; Wed, 26 Feb 2020 15:45:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202002261545.01QFj5W9035325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 26 Feb 2020 15:45:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358336 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358336 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 15:45:06 -0000 Author: mav Date: Wed Feb 26 15:45:04 2020 New Revision: 358336 URL: https://svnweb.freebsd.org/changeset/base/358336 Log: MFZoL: Fix txg_sync_thread hang in scan_exec_io() When scn->scn_maxinflight_bytes has not been initialized it's possible to hang on the condition variable in scan_exec_io(). This issue was uncovered by ztest and is only possible when deduplication is enabled through the following call path. txg_sync_thread() spa_sync() ddt_sync_table() ddt_sync_entry() dsl_scan_ddt_entry() dsl_scan_scrub_cb() dsl_scan_enqueuei() scan_exec_io() cv_wait() Resolve the issue by always initializing scn_maxinflight_bytes to a reasonable minimum value. This value will be recalculated in dsl_scan_sync() to pick up changes to zfs_scan_vdev_limit and the addition/removal of vdevs. Reviewed-by: Tom Caputi Reviewed by: George Melikov Signed-off-by: Brian Behlendorf Closes #7098 zfsonlinux/zfs@f90a30ad1b32a971f62a540f8944e42f99b254ce MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Feb 26 15:15:55 2020 (r358335) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Feb 26 15:45:04 2020 (r358336) @@ -125,6 +125,7 @@ static boolean_t scan_ds_queue_contains(dsl_scan_t *sc static void scan_ds_queue_insert(dsl_scan_t *scn, uint64_t dsobj, uint64_t txg); static void scan_ds_queue_remove(dsl_scan_t *scn, uint64_t dsobj); static void scan_ds_queue_sync(dsl_scan_t *scn, dmu_tx_t *tx); +static uint64_t dsl_scan_count_leaves(vdev_t *vd); extern int zfs_vdev_async_write_active_min_dirty_percent; @@ -439,6 +440,14 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) scn->scn_async_destroying = spa_feature_is_active(dp->dp_spa, SPA_FEATURE_ASYNC_DESTROY); + /* + * Calculate the max number of in-flight bytes for pool-wide + * scanning operations (minimum 1MB). Limits for the issuing + * phase are done per top-level vdev and are handled separately. + */ + scn->scn_maxinflight_bytes = MAX(zfs_scan_vdev_limit * + dsl_scan_count_leaves(spa->spa_root_vdev), 1ULL << 20); + bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); @@ -2350,7 +2359,7 @@ dsl_scan_ddt_entry(dsl_scan_t *scn, enum zio_checksum zbookmark_phys_t zb = { 0 }; int p; - if (scn->scn_phys.scn_state != DSS_SCANNING) + if (!dsl_scan_is_running(scn)) return; for (p = 0; p < DDT_PHYS_TYPES; p++, ddp++) { @@ -3333,7 +3342,7 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) uint64_t nr_leaves = dsl_scan_count_leaves(spa->spa_root_vdev); /* - * Calculate the max number of in-flight bytes for pool-wide + * Recalculate the max number of in-flight bytes for pool-wide * scanning operations (minimum 1MB). Limits for the issuing * phase are done per top-level vdev and are handled separately. */ @@ -3652,6 +3661,8 @@ dsl_scan_scrub_done(zio_t *zio) dsl_scan_io_queue_t *queue = zio->io_private; abd_free(zio->io_abd); + + ASSERT3U(scn->scn_maxinflight_bytes, >, 0); if (queue == NULL) { mutex_enter(&spa->spa_scrub_lock); From owner-svn-src-head@freebsd.org Wed Feb 26 15:47:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 518B625BECB; Wed, 26 Feb 2020 15:47:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SKv11MKwz4QK9; Wed, 26 Feb 2020 15:47:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27C301A93; Wed, 26 Feb 2020 15:47:41 +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 01QFlfFt035477; Wed, 26 Feb 2020 15:47:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QFlfVW035476; Wed, 26 Feb 2020 15:47:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202002261547.01QFlfVW035476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 26 Feb 2020 15:47:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358337 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358337 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 15:47:41 -0000 Author: mav Date: Wed Feb 26 15:47:40 2020 New Revision: 358337 URL: https://svnweb.freebsd.org/changeset/base/358337 Log: MFZoL: Fix 2 small bugs with cached dsl_scan_phys_t This patch corrects 2 small bugs where scn->scn_phys_cached was not properly updated to match the primary copy when it needed to be. The first resulted in the pause state not being properly updated and the second resulted in the cached version being completely zeroed even if the primary was not. Reviewed-by: Brian Behlendorf Reviewed-by: Serapheim Dimitropoulos Reviewed-by: Matthew Ahrens Signed-off-by: Tom Caputi Closes #8010 zfsonlinux/zfs@8cb119e3dc0ac6c90b1517fbadc021b7e9741fc6 MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Feb 26 15:45:04 2020 (r358336) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Feb 26 15:47:40 2020 (r358337) @@ -448,7 +448,6 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) scn->scn_maxinflight_bytes = MAX(zfs_scan_vdev_limit * dsl_scan_count_leaves(spa->spa_root_vdev), 1ULL << 20); - bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); avl_create(&scn->scn_prefetch_queue, scan_prefetch_queue_compare, @@ -506,6 +505,8 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) } } + bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); + /* reload the queue into the in-core state */ if (scn->scn_phys.scn_queue_obj != 0) { zap_cursor_t zc; @@ -928,6 +929,7 @@ dsl_scrub_pause_resume_sync(void *arg, dmu_tx_t *tx) /* can't pause a scrub when there is no in-progress scrub */ spa->spa_scan_pass_scrub_pause = gethrestime_sec(); scn->scn_phys.scn_flags |= DSF_SCRUB_PAUSED; + scn->scn_phys_cached.scn_flags |= DSF_SCRUB_PAUSED; dsl_scan_sync_state(scn, tx, SYNC_CACHED); spa_event_notify(spa, NULL, NULL, ESC_ZFS_SCRUB_PAUSED); } else { @@ -942,6 +944,7 @@ dsl_scrub_pause_resume_sync(void *arg, dmu_tx_t *tx) gethrestime_sec() - spa->spa_scan_pass_scrub_pause; spa->spa_scan_pass_scrub_pause = 0; scn->scn_phys.scn_flags &= ~DSF_SCRUB_PAUSED; + scn->scn_phys_cached.scn_flags &= ~DSF_SCRUB_PAUSED; dsl_scan_sync_state(scn, tx, SYNC_CACHED); } } From owner-svn-src-head@freebsd.org Wed Feb 26 15:56:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE51925C12D; Wed, 26 Feb 2020 15:56:08 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SL4m34FZz3Hk7; Wed, 26 Feb 2020 15:56:08 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C8021C5B; Wed, 26 Feb 2020 15:56:08 +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 01QFu8iI041323; Wed, 26 Feb 2020 15:56:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QFu8AP041322; Wed, 26 Feb 2020 15:56:08 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202002261556.01QFu8AP041322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 26 Feb 2020 15:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358338 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 358338 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 15:56:08 -0000 Author: andrew Date: Wed Feb 26 15:56:07 2020 New Revision: 358338 URL: https://svnweb.freebsd.org/changeset/base/358338 Log: Fix the cache type identification DIC and IDC are supported when the field bits are set. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/identcpu.c Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Wed Feb 26 15:47:40 2020 (r358337) +++ head/sys/arm64/arm64/identcpu.c Wed Feb 26 15:56:07 2020 (r358338) @@ -1119,9 +1119,9 @@ print_ctr_fields(struct sbuf *sb, uint64_t reg, void * sbuf_printf(sb, "%d byte CWG", CTR_CWG_SIZE(reg)); reg &= ~(CTR_ERG_MASK | CTR_CWG_MASK); - if (CTR_IDC_VAL(reg) == 0) + if (CTR_IDC_VAL(reg) != 0) sbuf_printf(sb, ",IDC"); - if (CTR_DIC_VAL(reg) == 0) + if (CTR_DIC_VAL(reg) != 0) sbuf_printf(sb, ",DIC"); reg &= ~(CTR_IDC_MASK | CTR_DIC_MASK); reg &= ~CTR_RES1; From owner-svn-src-head@freebsd.org Wed Feb 26 15:59:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5EC1025C232; Wed, 26 Feb 2020 15:59:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SL8z0qbTz3wx3; Wed, 26 Feb 2020 15:59:47 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C255A1C8D; Wed, 26 Feb 2020 15:59:46 +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 01QFxkRj041512; Wed, 26 Feb 2020 15:59:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QFxk27041511; Wed, 26 Feb 2020 15:59:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202002261559.01QFxk27041511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 26 Feb 2020 15:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358339 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358339 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 15:59:47 -0000 Author: mav Date: Wed Feb 26 15:59:46 2020 New Revision: 358339 URL: https://svnweb.freebsd.org/changeset/base/358339 Log: MFZoL: Fix issue with scanning dedup blocks as scan ends This patch fixes an issue discovered by ztest where dsl_scan_ddt_entry() could add I/Os to the dsl scan queues between when the scan had finished all required work and when the scan was marked as complete. This caused the scan to spin indefinitely without ending. Reviewed-by: Brian Behlendorf Reviewed-by: Serapheim Dimitropoulos Reviewed-by: Matthew Ahrens Signed-off-by: Tom Caputi Closes #8010 zfsonlinux/zfs@5e0bd0ae056e26de36dee3c199c6fcff8f14ee15 MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Feb 26 15:56:07 2020 (r358338) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Feb 26 15:59:46 2020 (r358339) @@ -2365,6 +2365,20 @@ dsl_scan_ddt_entry(dsl_scan_t *scn, enum zio_checksum if (!dsl_scan_is_running(scn)) return; + /* + * This function is special because it is the only thing + * that can add scan_io_t's to the vdev scan queues from + * outside dsl_scan_sync(). For the most part this is ok + * as long as it is called from within syncing context. + * However, dsl_scan_sync() expects that no new sio's will + * be added between when all the work for a scan is done + * and the next txg when the scan is actually marked as + * completed. This check ensures we do not issue new sio's + * during this period. + */ + if (scn->scn_done_txg != 0) + return; + for (p = 0; p < DDT_PHYS_TYPES; p++, ddp++) { if (ddp->ddp_phys_birth == 0 || ddp->ddp_phys_birth > scn->scn_phys.scn_max_txg) @@ -3416,6 +3430,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) (longlong_t)tx->tx_txg); } } else if (scn->scn_is_sorted && scn->scn_bytes_pending != 0) { + ASSERT(scn->scn_clearing); + /* need to issue scrubbing IOs from per-vdev queues */ scn->scn_zio_root = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); From owner-svn-src-head@freebsd.org Wed Feb 26 16:04:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C66125C544; Wed, 26 Feb 2020 16:04:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SLGK00xpz40nM; Wed, 26 Feb 2020 16:04:25 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF9181E79; Wed, 26 Feb 2020 16:04:24 +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 01QG4OYZ047057; Wed, 26 Feb 2020 16:04:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QG4OWJ047056; Wed, 26 Feb 2020 16:04:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202002261604.01QG4OWJ047056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 26 Feb 2020 16:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358340 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358340 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 16:04:25 -0000 Author: mav Date: Wed Feb 26 16:04:24 2020 New Revision: 358340 URL: https://svnweb.freebsd.org/changeset/base/358340 Log: Fix patch mismerge in r358336. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Feb 26 15:59:46 2020 (r358339) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Feb 26 16:04:24 2020 (r358340) @@ -3681,8 +3681,6 @@ dsl_scan_scrub_done(zio_t *zio) abd_free(zio->io_abd); - ASSERT3U(scn->scn_maxinflight_bytes, >, 0); - if (queue == NULL) { mutex_enter(&spa->spa_scrub_lock); ASSERT3U(spa->spa_scrub_inflight, >=, BP_GET_PSIZE(bp)); @@ -3719,6 +3717,8 @@ scan_exec_io(dsl_pool_t *dp, const blkptr_t *bp, int z size_t size = BP_GET_PSIZE(bp); abd_t *data = abd_alloc_for_io(size, B_FALSE); unsigned int scan_delay = 0; + + ASSERT3U(scn->scn_maxinflight_bytes, >, 0); if (queue == NULL) { mutex_enter(&spa->spa_scrub_lock); From owner-svn-src-head@freebsd.org Wed Feb 26 16:22:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F2DC025CB3D; Wed, 26 Feb 2020 16:22:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SLg93pKDz3C0w; Wed, 26 Feb 2020 16:22:29 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50857220F; Wed, 26 Feb 2020 16:22:29 +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 01QGMTjx059202; Wed, 26 Feb 2020 16:22:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QGMTqb059201; Wed, 26 Feb 2020 16:22:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002261622.01QGMTqb059201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 26 Feb 2020 16:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358341 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358341 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 16:22:30 -0000 Author: imp Date: Wed Feb 26 16:22:28 2020 New Revision: 358341 URL: https://svnweb.freebsd.org/changeset/base/358341 Log: Remove trailing white space. Modified: head/sys/kern/bus_if.m Modified: head/sys/kern/bus_if.m ============================================================================== --- head/sys/kern/bus_if.m Wed Feb 26 16:04:24 2020 (r358340) +++ head/sys/kern/bus_if.m Wed Feb 26 16:22:28 2020 (r358341) @@ -96,7 +96,7 @@ CODE { * This is called from system code which prints out a description of a * device. It should describe the attachment that the child has with * the parent. For instance the TurboLaser bus prints which node the - * device is attached to. See bus_generic_print_child() for more + * device is attached to. See bus_generic_print_child() for more * information. * * @param _dev the device whose child is being printed @@ -117,7 +117,7 @@ METHOD int print_child { * * @param _dev the device whose child was being probed * @param _child the child device which failed to probe - */ + */ METHOD void probe_nomatch { device_t _dev; device_t _child; @@ -138,17 +138,17 @@ METHOD void probe_nomatch { * * This method copies the value of an instance variable to the * location specified by @p *_result. - * + * * @param _dev the device whose child was being examined * @param _child the child device whose instance variable is * being read * @param _index the instance variable to read * @param _result a location to receive the instance variable * value - * + * * @retval 0 success * @retval ENOENT no such instance variable is supported by @p - * _dev + * _dev */ METHOD int read_ivar { device_t _dev; @@ -159,18 +159,18 @@ METHOD int read_ivar { /** * @brief Write the value of a bus-specific attribute of a device - * + * * This method sets the value of an instance variable to @p _value. - * + * * @param _dev the device whose child was being updated * @param _child the child device whose instance variable is * being written * @param _index the instance variable to write * @param _value the value to write to that instance variable - * + * * @retval 0 success * @retval ENOENT no such instance variable is supported by @p - * _dev + * _dev * @retval EINVAL the instance variable was recognised but * contains a read-only value */ @@ -186,7 +186,7 @@ METHOD int write_ivar { * * Called at the beginning of device_delete_child() to allow the parent * to teardown any bus-specific state for the child. - * + * * @param _dev the device whose child is being deleted * @param _child the child device which is being deleted */ @@ -200,7 +200,7 @@ METHOD void child_deleted { * * Called after the child's DEVICE_DETACH() method to allow the parent * to reclaim any resources allocated on behalf of the child. - * + * * @param _dev the device whose child changed state * @param _child the child device which changed state */ @@ -211,11 +211,11 @@ METHOD void child_detached { /** * @brief Notify a bus that a new driver was added - * + * * Called when a new driver is added to the devclass which owns this * bus. The generic implementation of this method attempts to probe and * attach any un-matched children of the bus. - * + * * @param _dev the device whose devclass had a new driver * added to it * @param _driver the new driver which was added @@ -234,7 +234,7 @@ METHOD void driver_added { * existing child with the same order. Implementations of bus_add_child * call device_add_child_ordered to add the child and often add * a suitable ivar to the device specific to that bus. - * + * * @param _dev the bus device which will be the parent of the * new child device * @param _order a value which is used to partially sort the @@ -290,7 +290,7 @@ METHOD int rescan { * @param _flags any extra flags to control the resource * allocation - see @c RF_XXX flags in * for details - * + * * @returns the resource which was allocated or @c NULL if no * resource could be allocated */ @@ -378,7 +378,7 @@ METHOD int unmap_resource { * @brief Deactivate a resource * * Deactivate a resource previously allocated with - * BUS_ALLOC_RESOURCE(). + * BUS_ALLOC_RESOURCE(). * * @param _dev the parent device of @p _child * @param _child the device which allocated the resource @@ -465,7 +465,7 @@ METHOD int release_resource { * argument. The value returned in @p *_cookiep is used to cancel the * interrupt handler - the caller should save this value to use in a * future call to BUS_TEARDOWN_INTR(). - * + * * @param _dev the parent device of @p _child * @param _child the device which allocated the resource * @param _irq the resource representing the interrupt @@ -496,7 +496,7 @@ METHOD int setup_intr { * This method is used to disassociate an interrupt handler function * with an irq resource. The value of @p _cookie must be the value * returned from a previous call to BUS_SETUP_INTR(). - * + * * @param _dev the parent device of @p _child * @param _child the device which allocated the resource * @param _irq the resource representing the interrupt @@ -518,7 +518,7 @@ METHOD int teardown_intr { * for the, typically shared, interrupt. * The value of @p _irq must be the interrupt resource passed * to a previous call to BUS_SETUP_INTR(). - * + * * @param _dev the parent device of @p _child * @param _child the device which allocated the resource * @param _irq the resource representing the interrupt @@ -537,7 +537,7 @@ METHOD int suspend_intr { * again. * The value of @p _irq must be the interrupt resource passed * to a previous call to BUS_SETUP_INTR(). - * + * * @param _dev the parent device of @p _child * @param _child the device which allocated the resource * @param _irq the resource representing the interrupt @@ -557,7 +557,7 @@ METHOD int resume_intr { * allocate. The resource defined by @p _type and @p _rid is defined * to start at @p _start and to include @p _count indices in its * range. - * + * * @param _dev the parent device of @p _child * @param _child the device which owns the resource * @param _type the type of resource @@ -579,7 +579,7 @@ METHOD int set_resource { * * This method allows a driver to examine the range used for a given * resource without actually allocating it. - * + * * @param _dev the parent device of @p _child * @param _child the device which owns the resource * @param _type the type of resource @@ -600,10 +600,10 @@ METHOD int get_resource { /** * @brief Delete a resource. - * + * * Use this to delete a resource (possibly one previously added with * BUS_SET_RESOURCE()). - * + * * @param _dev the parent device of @p _child * @param _child the device which owns the resource * @param _type the type of resource @@ -622,7 +622,7 @@ METHOD void delete_resource { * Used by drivers which use bus_generic_rl_alloc_resource() etc. to * implement their resource handling. It should return the resource * list of the given child device. - * + * * @param _dev the parent device of @p _child * @param _child the device which owns the resource list */ @@ -642,7 +642,7 @@ METHOD struct resource_list * get_resource_list { * determining if it is there. Buses are to try to avoid returning * errors, but newcard will return an error if the device fails to * implement this method. - * + * * @param _dev the parent device of @p _child * @param _child the device which is being examined */ @@ -663,7 +663,7 @@ METHOD int child_present { * non-whitespace characters. Values containing whitespace can be * quoted with double quotes ('"'). Double quotes and backslashes in * quoted values can be escaped with backslashes ('\'). - * + * * @param _dev the parent device of @p _child * @param _child the device which is being examined * @param _buf the address of a buffer to receive the pnp @@ -706,7 +706,7 @@ METHOD int child_location_str { /** * @brief Allow drivers to request that an interrupt be bound to a specific * CPU. - * + * * @param _dev the parent device of @p _child * @param _child the device which allocated the resource * @param _irq the resource representing the interrupt @@ -722,7 +722,7 @@ METHOD int bind_intr { /** * @brief Allow (bus) drivers to specify the trigger mode and polarity * of the specified interrupt. - * + * * @param _dev the bus device * @param _irq the interrupt number to modify * @param _trig the trigger mode required From owner-svn-src-head@freebsd.org Wed Feb 26 16:51:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE75125D5FF; Wed, 26 Feb 2020 16:51:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SMJy3J5Lz4drj; Wed, 26 Feb 2020 16:51:46 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5CAC52700; Wed, 26 Feb 2020 16:51:46 +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 01QGpk7r076287; Wed, 26 Feb 2020 16:51:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QGpkAE076286; Wed, 26 Feb 2020 16:51:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202002261651.01QGpkAE076286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 26 Feb 2020 16:51:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358342 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358342 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 16:51:46 -0000 Author: mav Date: Wed Feb 26 16:51:45 2020 New Revision: 358342 URL: https://svnweb.freebsd.org/changeset/base/358342 Log: MFZoL: Fix resilver writes in vdev_indirect_io_start This patch addresses an issue found in ztest where resilver write zios that were passed to an indirect vdev would end up being handled as though they were resilver read zios. This caused issues where the zio->io_abd would be both read to and written from at the same time, causing asserts to fail. Reviewed-by: Brian Behlendorf Reviewed by: Matt Ahrens Reviewed-by: Serapheim Dimitropoulos Signed-off-by: Tom Caputi Closes #8193 zfsonlinux/zfs@5aa95ba0d3502779695341b5f55fa5ba1d3330ff MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Wed Feb 26 16:22:28 2020 (r358341) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Wed Feb 26 16:51:45 2020 (r358342) @@ -1243,6 +1243,8 @@ vdev_indirect_read_all(zio_t *zio) { indirect_vsd_t *iv = zio->io_vsd; + ASSERT3U(zio->io_type, ==, ZIO_TYPE_READ); + for (indirect_split_t *is = list_head(&iv->iv_splits); is != NULL; is = list_next(&iv->iv_splits, is)) { for (int i = 0; i < is->is_children; i++) { @@ -1332,7 +1334,8 @@ vdev_indirect_io_start(zio_t *zio) vdev_indirect_child_io_done, zio)); } else { iv->iv_split_block = B_TRUE; - if (zio->io_flags & (ZIO_FLAG_SCRUB | ZIO_FLAG_RESILVER)) { + if (zio->io_type == ZIO_TYPE_READ && + zio->io_flags & (ZIO_FLAG_SCRUB | ZIO_FLAG_RESILVER)) { /* * Read all copies. Note that for simplicity, * we don't bother consulting the DTL in the @@ -1341,13 +1344,17 @@ vdev_indirect_io_start(zio_t *zio) vdev_indirect_read_all(zio); } else { /* - * Read one copy of each split segment, from the - * top-level vdev. Since we don't know the - * checksum of each split individually, the child - * zio can't ensure that we get the right data. - * E.g. if it's a mirror, it will just read from a - * random (healthy) leaf vdev. We have to verify - * the checksum in vdev_indirect_io_done(). + * If this is a read zio, we read one copy of each + * split segment, from the top-level vdev. Since + * we don't know the checksum of each split + * individually, the child zio can't ensure that + * we get the right data. E.g. if it's a mirror, + * it will just read from a random (healthy) leaf + * vdev. We have to verify the checksum in + * vdev_indirect_io_done(). + * + * For write zios, the vdev code will ensure we write + * to all children. */ for (indirect_split_t *is = list_head(&iv->iv_splits); is != NULL; is = list_next(&iv->iv_splits, is)) { From owner-svn-src-head@freebsd.org Wed Feb 26 18:12:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83BF625FA55; Wed, 26 Feb 2020 18:12:14 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SP5p1Yk7z4GdD; Wed, 26 Feb 2020 18:12:14 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C417F3983; Wed, 26 Feb 2020 18:12:13 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01QICD8o090966; Wed, 26 Feb 2020 18:12:13 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QICDeE090938; Wed, 26 Feb 2020 18:12:13 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202002261812.01QICDeE090938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 26 Feb 2020 18:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358343 - in head: stand/libsa/zfs sys/cddl/boot/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head: stand/libsa/zfs sys/cddl/boot/zfs X-SVN-Commit-Revision: 358343 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 18:12:14 -0000 Author: tsoome Date: Wed Feb 26 18:12:12 2020 New Revision: 358343 URL: https://svnweb.freebsd.org/changeset/base/358343 Log: loader: replace zfs_alloc/zfs_free with malloc/free Use common memory management. Modified: head/stand/libsa/zfs/zfs.c head/stand/libsa/zfs/zfsimpl.c head/sys/cddl/boot/zfs/zfssubr.c Modified: head/stand/libsa/zfs/zfs.c ============================================================================== --- head/stand/libsa/zfs/zfs.c Wed Feb 26 16:51:45 2020 (r358342) +++ head/stand/libsa/zfs/zfs.c Wed Feb 26 18:12:12 2020 (r358343) @@ -419,7 +419,7 @@ vdev_read(vdev_t *vdev, void *priv, off_t offset, void /* Return of partial sector data requires a bounce buffer. */ if ((head > 0) || do_tail_read) { - bouncebuf = zfs_alloc(secsz); + bouncebuf = malloc(secsz); if (bouncebuf == NULL) { printf("vdev_read: out of memory\n"); return (ENOMEM); @@ -464,8 +464,7 @@ vdev_read(vdev_t *vdev, void *priv, off_t offset, void ret = 0; error: - if (bouncebuf != NULL) - zfs_free(bouncebuf, secsz); + free(bouncebuf); return (ret); } Modified: head/stand/libsa/zfs/zfsimpl.c ============================================================================== --- head/stand/libsa/zfs/zfsimpl.c Wed Feb 26 16:51:45 2020 (r358342) +++ head/stand/libsa/zfs/zfsimpl.c Wed Feb 26 18:12:12 2020 (r358343) @@ -138,10 +138,7 @@ static spa_list_t zfs_pools; static const dnode_phys_t *dnode_cache_obj; static uint64_t dnode_cache_bn; static char *dnode_cache_buf; -static char *zfs_temp_buf, *zfs_temp_end, *zfs_temp_ptr; -#define TEMP_SIZE (1024 * 1024) - static int zio_read(const spa_t *spa, const blkptr_t *bp, void *buf); static int zfs_get_root(const spa_t *spa, uint64_t *objid); static int zfs_rlookup(const spa_t *spa, uint64_t objnum, char *result); @@ -167,38 +164,11 @@ zfs_init(void) STAILQ_INIT(&zfs_vdevs); STAILQ_INIT(&zfs_pools); - zfs_temp_buf = malloc(TEMP_SIZE); - zfs_temp_end = zfs_temp_buf + TEMP_SIZE; - zfs_temp_ptr = zfs_temp_buf; dnode_cache_buf = malloc(SPA_MAXBLOCKSIZE); zfs_init_crc(); } -static void * -zfs_alloc(size_t size) -{ - char *ptr; - - if (zfs_temp_ptr + size > zfs_temp_end) { - panic("ZFS: out of temporary buffer space"); - } - ptr = zfs_temp_ptr; - zfs_temp_ptr += size; - - return (ptr); -} - -static void -zfs_free(void *ptr, size_t size) -{ - - zfs_temp_ptr -= size; - if (zfs_temp_ptr != ptr) { - panic("ZFS: zfs_alloc()/zfs_free() mismatch"); - } -} - static int xdr_int(const unsigned char **xdr, int *ip) { @@ -2151,17 +2121,20 @@ zio_read(const spa_t *spa, const blkptr_t *bp, void *b ASSERT(size <= BPE_PAYLOAD_SIZE); if (cpfunc != ZIO_COMPRESS_OFF) - pbuf = zfs_alloc(size); + pbuf = malloc(size); else pbuf = buf; + if (pbuf == NULL) + return (ENOMEM); + decode_embedded_bp_compressed(bp, pbuf); error = 0; if (cpfunc != ZIO_COMPRESS_OFF) { error = zio_decompress_data(cpfunc, pbuf, size, buf, BP_GET_LSIZE(bp)); - zfs_free(pbuf, size); + free(pbuf); } if (error != 0) printf("ZFS: i/o error - unable to decompress " @@ -2198,10 +2171,15 @@ zio_read(const spa_t *spa, const blkptr_t *bp, void *b size = P2ROUNDUP(size, align); } if (size != BP_GET_PSIZE(bp) || cpfunc != ZIO_COMPRESS_OFF) - pbuf = zfs_alloc(size); + pbuf = malloc(size); else pbuf = buf; + if (pbuf == NULL) { + error = ENOMEM; + break; + } + if (DVA_GET_GANG(dva)) error = zio_read_gang(spa, bp, pbuf); else @@ -2214,12 +2192,13 @@ zio_read(const spa_t *spa, const blkptr_t *bp, void *b bcopy(pbuf, buf, BP_GET_PSIZE(bp)); } if (buf != pbuf) - zfs_free(pbuf, size); + free(pbuf); if (error == 0) break; } if (error != 0) printf("ZFS: i/o error - all block copies unavailable\n"); + return (error); } @@ -3418,10 +3397,14 @@ zfs_dnode_stat(const spa_t *spa, dnode_phys_t *dn, str int error; size = BP_GET_LSIZE(bp); - buf = zfs_alloc(size); - error = zio_read(spa, bp, buf); + buf = malloc(size); + if (buf == NULL) + error = ENOMEM; + else + error = zio_read(spa, bp, buf); + if (error != 0) { - zfs_free(buf, size); + free(buf); return (error); } sahdrp = buf; @@ -3438,8 +3421,7 @@ zfs_dnode_stat(const spa_t *spa, dnode_phys_t *dn, str SA_GID_OFFSET); sb->st_size = *(uint64_t *)((char *)sahdrp + hdrsize + SA_SIZE_OFFSET); - if (buf != NULL) - zfs_free(buf, size); + free(buf); } return (0); @@ -3457,9 +3439,9 @@ zfs_dnode_readlink(const spa_t *spa, dnode_phys_t *dn, int hdrsize; char *p; - if (dn->dn_bonuslen != 0) + if (dn->dn_bonuslen != 0) { sahdrp = (sa_hdr_phys_t *)DN_BONUS(dn); - else { + } else { blkptr_t *bp; if ((dn->dn_flags & DNODE_FLAG_SPILL_BLKPTR) == 0) @@ -3467,10 +3449,13 @@ zfs_dnode_readlink(const spa_t *spa, dnode_phys_t *dn, bp = DN_SPILL_BLKPTR(dn); size = BP_GET_LSIZE(bp); - buf = zfs_alloc(size); - rc = zio_read(spa, bp, buf); + buf = malloc(size); + if (buf == NULL) + rc = ENOMEM; + else + rc = zio_read(spa, bp, buf); if (rc != 0) { - zfs_free(buf, size); + free(buf); return (rc); } sahdrp = buf; @@ -3478,8 +3463,7 @@ zfs_dnode_readlink(const spa_t *spa, dnode_phys_t *dn, hdrsize = SA_HDR_SIZE(sahdrp); p = (char *)((uintptr_t)sahdrp + hdrsize + SA_SYMLINK_OFFSET); memcpy(path, p, psize); - if (buf != NULL) - zfs_free(buf, size); + free(buf); return (0); } /* Modified: head/sys/cddl/boot/zfs/zfssubr.c ============================================================================== --- head/sys/cddl/boot/zfs/zfssubr.c Wed Feb 26 16:51:45 2020 (r358342) +++ head/sys/cddl/boot/zfs/zfssubr.c Wed Feb 26 18:12:12 2020 (r358343) @@ -43,9 +43,6 @@ static uint64_t zfs_crc64_table[256]; for (;;) ; \ } while (0) -#define kmem_alloc(size, flag) zfs_alloc((size)) -#define kmem_free(ptr, size) zfs_free((ptr), (size)) - static void zfs_init_crc(void) { @@ -376,9 +373,6 @@ zap_hash(uint64_t salt, const char *name) return (crc); } -static void *zfs_alloc(size_t size); -static void zfs_free(void *ptr, size_t size); - typedef struct raidz_col { uint64_t rc_devidx; /* child device index for I/O */ uint64_t rc_offset; /* device offset */ @@ -981,7 +975,11 @@ vdev_raidz_matrix_reconstruct(raidz_map_t *rm, int n, log = 0; /* gcc */ psize = sizeof (invlog[0][0]) * n * nmissing; - p = zfs_alloc(psize); + p = malloc(psize); + if (p == NULL) { + printf("Out of memory\n"); + return; + } for (pp = p, i = 0; i < nmissing; i++) { invlog[i] = pp; @@ -1037,7 +1035,7 @@ vdev_raidz_matrix_reconstruct(raidz_map_t *rm, int n, } } - zfs_free(p, psize); + free(p); } static int @@ -1098,7 +1096,11 @@ vdev_raidz_reconstruct_general(raidz_map_t *rm, int *t psize = (sizeof (rows[0][0]) + sizeof (invrows[0][0])) * nmissing_rows * n + sizeof (used[0]) * n; - p = kmem_alloc(psize, KM_SLEEP); + p = malloc(psize); + if (p == NULL) { + printf("Out of memory\n"); + return (code); + } for (pp = p, i = 0; i < nmissing_rows; i++) { rows[i] = pp; @@ -1141,7 +1143,7 @@ vdev_raidz_reconstruct_general(raidz_map_t *rm, int *t vdev_raidz_matrix_reconstruct(rm, n, nmissing_rows, missing_rows, invrows, used); - kmem_free(p, psize); + free(p); return (code); } @@ -1214,7 +1216,9 @@ vdev_raidz_map_alloc(void *data, off_t offset, size_t ASSERT3U(acols, <=, scols); - rm = zfs_alloc(offsetof(raidz_map_t, rm_col[scols])); + rm = malloc(offsetof(raidz_map_t, rm_col[scols])); + if (rm == NULL) + return (rm); rm->rm_cols = acols; rm->rm_scols = scols; @@ -1259,8 +1263,16 @@ vdev_raidz_map_alloc(void *data, off_t offset, size_t ASSERT3U(rm->rm_asize - asize, ==, rm->rm_nskip << unit_shift); ASSERT3U(rm->rm_nskip, <=, nparity); - for (c = 0; c < rm->rm_firstdatacol; c++) - rm->rm_col[c].rc_data = zfs_alloc(rm->rm_col[c].rc_size); + for (c = 0; c < rm->rm_firstdatacol; c++) { + rm->rm_col[c].rc_data = malloc(rm->rm_col[c].rc_size); + if (rm->rm_col[c].rc_data == NULL) { + c++; + while (c != 0) + free(rm->rm_col[--c].rc_data); + free(rm); + return (NULL); + } + } rm->rm_col[c].rc_data = data; @@ -1312,9 +1324,9 @@ vdev_raidz_map_free(raidz_map_t *rm) int c; for (c = rm->rm_firstdatacol - 1; c >= 0; c--) - zfs_free(rm->rm_col[c].rc_data, rm->rm_col[c].rc_size); + free(rm->rm_col[c].rc_data); - zfs_free(rm, offsetof(raidz_map_t, rm_col[rm->rm_scols])); + free(rm); } static vdev_t * @@ -1358,8 +1370,12 @@ raidz_parity_verify(raidz_map_t *rm) rc = &rm->rm_col[c]; if (!rc->rc_tried || rc->rc_error != 0) continue; - orig[c] = zfs_alloc(rc->rc_size); - bcopy(rc->rc_data, orig[c], rc->rc_size); + orig[c] = malloc(rc->rc_size); + if (orig[c] != NULL) { + bcopy(rc->rc_data, orig[c], rc->rc_size); + } else { + printf("Out of memory\n"); + } } vdev_raidz_generate_parity(rm); @@ -1368,11 +1384,12 @@ raidz_parity_verify(raidz_map_t *rm) rc = &rm->rm_col[c]; if (!rc->rc_tried || rc->rc_error != 0) continue; - if (bcmp(orig[c], rc->rc_data, rc->rc_size) != 0) { + if (orig[c] == NULL || + bcmp(orig[c], rc->rc_data, rc->rc_size) != 0) { rc->rc_error = ECKSUM; ret++; } - zfs_free(orig[c], rc->rc_size); + free(orig[c]); } return (ret); @@ -1440,7 +1457,11 @@ vdev_raidz_combrec(const spa_t *spa, raidz_map_t *rm, ASSERT(orig[i] != NULL); } - orig[n - 1] = zfs_alloc(rm->rm_col[0].rc_size); + orig[n - 1] = malloc(rm->rm_col[0].rc_size); + if (orig[n - 1] == NULL) { + ret = ENOMEM; + goto done; + } current = 0; next = tgts[current]; @@ -1523,7 +1544,7 @@ vdev_raidz_combrec(const spa_t *spa, raidz_map_t *rm, n--; done: for (i = n - 1; i >= 0; i--) { - zfs_free(orig[i], rm->rm_col[0].rc_size); + free(orig[i]); } return (ret); @@ -1552,6 +1573,8 @@ vdev_raidz_read(vdev_t *vd, const blkptr_t *bp, void * rm = vdev_raidz_map_alloc(data, offset, bytes, tvd->v_ashift, vd->v_nchildren, vd->v_nparity); + if (rm == NULL) + return (ENOMEM); /* * Iterate over the columns in reverse order so that we hit the parity From owner-svn-src-head@freebsd.org Wed Feb 26 18:46:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C4F82406AF; Wed, 26 Feb 2020 18:46:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SPsZ29z9z3Hbn; Wed, 26 Feb 2020 18:46:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 441C140BF; Wed, 26 Feb 2020 18:46:42 +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 01QIkgZ3034214; Wed, 26 Feb 2020 18:46:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QIkgdf034213; Wed, 26 Feb 2020 18:46:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002261846.01QIkgdf034213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 26 Feb 2020 18:46:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358344 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 358344 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 18:46:43 -0000 Author: emaste Date: Wed Feb 26 18:46:41 2020 New Revision: 358344 URL: https://svnweb.freebsd.org/changeset/base/358344 Log: mprotect.2: sort errors alphabetically Reported by: brooks MFC after: 3 days Modified: head/lib/libc/sys/mprotect.2 Modified: head/lib/libc/sys/mprotect.2 ============================================================================== --- head/lib/libc/sys/mprotect.2 Wed Feb 26 18:12:12 2020 (r358343) +++ head/lib/libc/sys/mprotect.2 Wed Feb 26 18:46:41 2020 (r358344) @@ -88,6 +88,12 @@ The .Fn mprotect system call will fail if: .Bl -tag -width Er +.It Bq Er EACCES +The calling process was not allowed to change +the protection to the value specified by +the +.Fa prot +argument. .It Bq Er EINVAL The virtual address range specified by the .Fa addr @@ -103,12 +109,6 @@ The .Fa prot argument contains permissions which are not a subset of the specified maximum permissions. -.It Bq Er EACCES -The calling process was not allowed to change -the protection to the value specified by -the -.Fa prot -argument. .El .Sh SEE ALSO .Xr madvise 2 , From owner-svn-src-head@freebsd.org Wed Feb 26 18:49:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B3B324082F; Wed, 26 Feb 2020 18:49:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SPwd6w3sz3LMY; Wed, 26 Feb 2020 18:49:21 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E80640C1; Wed, 26 Feb 2020 18:49:21 +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 01QInLY9034379; Wed, 26 Feb 2020 18:49:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QInKIk034373; Wed, 26 Feb 2020 18:49:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002261849.01QInKIk034373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 26 Feb 2020 18:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358345 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 358345 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 18:49:22 -0000 Author: imp Date: Wed Feb 26 18:49:20 2020 New Revision: 358345 URL: https://svnweb.freebsd.org/changeset/base/358345 Log: Remove sparc64 specific buid-system hacks Remove all the sparc64 hacks and tweaks to the build system. We don't need them anymore. Modified: head/share/mk/bsd.cpu.mk head/share/mk/bsd.endian.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.sys.mk head/share/mk/local.meta.sys.mk head/share/mk/src.opts.mk Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Wed Feb 26 18:46:41 2020 (r358344) +++ head/share/mk/bsd.cpu.mk Wed Feb 26 18:49:20 2020 (r358345) @@ -20,8 +20,6 @@ MACHINE_CPU = mips MACHINE_CPU = aim . elif ${MACHINE_CPUARCH} == "riscv" MACHINE_CPU = riscv -. elif ${MACHINE_CPUARCH} == "sparc64" -MACHINE_CPU = ultrasparc . endif .else @@ -75,12 +73,6 @@ CPUTYPE = pentium-mmx CPUTYPE = pentium . endif . endif -. elif ${MACHINE_ARCH} == "sparc64" -. if ${CPUTYPE} == "us" -CPUTYPE = ultrasparc -. elif ${CPUTYPE} == "us3" -CPUTYPE = ultrasparc3 -. endif . endif ############################################################################### @@ -152,14 +144,6 @@ _CPUCFLAGS = -march=${CPUTYPE} # sb1, xlp, xlr _CPUCFLAGS = -march=${CPUTYPE:S/^mips//} . endif -. elif ${MACHINE_ARCH} == "sparc64" -. if ${CPUTYPE} == "v9" -_CPUCFLAGS = -mcpu=v9 -. elif ${CPUTYPE} == "ultrasparc" -_CPUCFLAGS = -mcpu=ultrasparc -. elif ${CPUTYPE} == "ultrasparc3" -_CPUCFLAGS = -mcpu=ultrasparc3 -. endif . elif ${MACHINE_CPUARCH} == "aarch64" _CPUCFLAGS = -mcpu=${CPUTYPE} . endif @@ -298,15 +282,6 @@ MACHINE_CPU = booke softfp ########## riscv . elif ${MACHINE_CPUARCH} == "riscv" MACHINE_CPU = riscv -########## sparc64 -. elif ${MACHINE_ARCH} == "sparc64" -. if ${CPUTYPE} == "v9" -MACHINE_CPU = v9 -. elif ${CPUTYPE} == "ultrasparc" -MACHINE_CPU = v9 ultrasparc -. elif ${CPUTYPE} == "ultrasparc3" -MACHINE_CPU = v9 ultrasparc ultrasparc3 -. endif . endif .endif @@ -353,7 +328,7 @@ MACHINE_CPU += softfp # when CPUTYPE has 'soft' in it, we use the soft-float ABI to allow building of # soft-float ABI libraries. In this case, we have to add the -mfloat-abi=softfp # to force that. -.if ${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" +. if ${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" # Needs to be CFLAGS not _CPUCFLAGS because it's needed for the ABI # not a nice optimization. Please note: softfp ABI uses hardware floating # instructions, but passes arguments to function calls in integer regsiters. @@ -361,7 +336,7 @@ MACHINE_CPU += softfp # supported. softfp support in FreeBSD may disappear in FreeBSD 13.0 since # it was a transition tool from FreeBSD 10 to 11 and is a bit of an odd duck. CFLAGS += -mfloat-abi=softfp -.endif +. endif .endif .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe" Modified: head/share/mk/bsd.endian.mk ============================================================================== --- head/share/mk/bsd.endian.mk Wed Feb 26 18:46:41 2020 (r358344) +++ head/share/mk/bsd.endian.mk Wed Feb 26 18:49:20 2020 (r358345) @@ -12,7 +12,6 @@ LOCALEDEF_ENDIAN= -l .elif ${MACHINE_ARCH} == "powerpc" || \ ${MACHINE_ARCH} == "powerpc64" || \ ${MACHINE_ARCH} == "powerpcspe" || \ - ${MACHINE_ARCH} == "sparc64" || \ (${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} != "") || \ ${MACHINE_ARCH:Mmips*} != "" TARGET_ENDIANNESS= 4321 Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Wed Feb 26 18:46:41 2020 (r358344) +++ head/share/mk/bsd.lib.mk Wed Feb 26 18:49:20 2020 (r358345) @@ -111,13 +111,8 @@ CFLAGS += -mno-relax .SUFFIXES: .out .o .bc .ll .po .pico .nossppico .pieo .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln .if !defined(PICFLAG) -.if ${MACHINE_CPUARCH} == "sparc64" -PICFLAG=-fPIC -PIEFLAG=-fPIE -.else PICFLAG=-fpic PIEFLAG=-fpie -.endif .endif PO_FLAG=-pg Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Wed Feb 26 18:46:41 2020 (r358344) +++ head/share/mk/bsd.sys.mk Wed Feb 26 18:49:20 2020 (r358345) @@ -214,10 +214,6 @@ CLANG_OPT_SMALL+= -mllvm -enable-gvn=false CLANG_OPT_SMALL+= -mllvm -enable-load-pre=false .endif CFLAGS.clang+= -Qunused-arguments -.if ${MACHINE_CPUARCH} == "sparc64" -# Don't emit .cfi directives, since we must use GNU as on sparc64, for now. -CFLAGS.clang+= -fno-dwarf2-cfi-asm -.endif # SPARC64 # The libc++ headers use c++11 extensions. These are normally silenced because # they are treated as system headers, but we explicitly disable that warning # suppression when building the base system to catch bugs in our headers. Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Wed Feb 26 18:46:41 2020 (r358344) +++ head/share/mk/local.meta.sys.mk Wed Feb 26 18:49:20 2020 (r358345) @@ -25,7 +25,7 @@ BOOT_MACHINE_DIR.amd64 = boot/i386 MACHINE_ARCH.host = ${_HOST_ARCH} # the list of machines we support -ALL_MACHINE_LIST?= amd64 arm arm64 i386 mips powerpc riscv sparc64 +ALL_MACHINE_LIST?= amd64 arm arm64 i386 mips powerpc riscv .for m in ${ALL_MACHINE_LIST:O:u} MACHINE_ARCH_LIST.$m?= ${TARGET_ARCHES_${m}:U$m} MACHINE_ARCH.$m?= ${MACHINE_ARCH_LIST.$m:[1]} Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Feb 26 18:46:41 2020 (r358344) +++ head/share/mk/src.opts.mk Wed Feb 26 18:49:20 2020 (r358345) @@ -103,6 +103,7 @@ __DEFAULT_YES_OPTIONS = \ FTP \ GAMES \ GDB \ + GDB_LIBEXEC \ GNU_DIFF \ GNU_GREP \ GOOGLETEST \ @@ -271,9 +272,8 @@ __LLVM_TARGETS= \ mips \ powerpc \ riscv \ - sparc \ x86 -__LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/:S/powerpc64/powerpc/ +__LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/arm64/aarch64/:S/powerpc64/powerpc/ .for __llt in ${__LLVM_TARGETS} # Default enable the given TARGET's LLVM_TARGET support .if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt} @@ -286,6 +286,8 @@ __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_ARM/LLVM_TAR __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL .endif .endfor +# until we can unwind clang + sparc +MK_LLVM_TARGET_SPARC:=no __DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF @@ -293,10 +295,10 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF # If the compiler is not C++11 capable, disable Clang. External toolchain will # be required. -.if ${COMPILER_FEATURES:Mc++11} && (${__TT} != "mips" && ${__TT} != "sparc64") +.if ${COMPILER_FEATURES:Mc++11} && (${__TT} != "mips") # Clang is enabled, and will be installed as the default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD -.elif ${COMPILER_FEATURES:Mc++11} && ${__T} != "sparc64" +.elif ${COMPILER_FEATURES:Mc++11} # If an external compiler that supports C++11 is used as ${CC} and Clang # supports the target, then Clang is enabled but we still require an external # toolchain. @@ -319,8 +321,7 @@ __DEFAULT_NO_OPTIONS+=BINUTILS_BOOTSTRAP .if ${__T:Mriscv*} != "" BROKEN_OPTIONS+=OFED .endif -.if ${__TT} != "mips" && ${__T} != "powerpc" && ${__T} != "powerpcspe" && \ - ${__T} != "sparc64" +.if ${__TT} != "mips" && ${__T} != "powerpc" && ${__T} != "powerpcspe" __DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .else __DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD @@ -330,13 +331,6 @@ __DEFAULT_YES_OPTIONS+=LLDB .else __DEFAULT_NO_OPTIONS+=LLDB .endif -# GDB in base is generally less functional than GDB in ports. Ports GDB -# sparc64 kernel support has not been tested. -.if ${__T} == "sparc64" -__DEFAULT_NO_OPTIONS+=GDB_LIBEXEC -.else -__DEFAULT_YES_OPTIONS+=GDB_LIBEXEC -.endif # LIB32 is supported on amd64, mips64, and powerpc64 .if (${__T} == "amd64" || ${__T:Mmips64*} || ${__T} == "powerpc64") __DEFAULT_YES_OPTIONS+=LIB32 @@ -355,23 +349,23 @@ BROKEN_OPTIONS+=LIBSOFT # marked no longer broken with the switch to LLVM. BROKEN_OPTIONS+=GOOGLETEST SSP .endif -# EFI doesn't exist on mips, powerpc, sparc or riscv. -.if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Msparc64} || ${__T:Mriscv*} +# EFI doesn't exist on mips, powerpc, or riscv. +.if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Mriscv*} BROKEN_OPTIONS+=EFI .endif -# OFW is only for powerpc and sparc64, exclude others -.if ${__T:Mpowerpc*} == "" && ${__T:Msparc64} == "" +# OFW is only for powerpc, exclude others +.if ${__T:Mpowerpc*} == "" BROKEN_OPTIONS+=LOADER_OFW .endif # UBOOT is only for arm, mips and powerpc, exclude others .if ${__T:Marm*} == "" && ${__T:Mmips*} == "" && ${__T:Mpowerpc*} == "" BROKEN_OPTIONS+=LOADER_UBOOT .endif -# GELI and Lua in loader currently cause boot failures on sparc64 and powerpc. +# GELI and Lua in loader currently cause boot failures on powerpc. # Further debugging is required -- probably they are just broken on big # endian systems generically (they jump to null pointers or try to read # crazy high addresses, which is typical of endianness problems). -.if ${__T} == "sparc64" || ${__T:Mpowerpc*} +.if ${__T:Mpowerpc*} BROKEN_OPTIONS+=LOADER_GELI LOADER_LUA .endif @@ -380,7 +374,7 @@ BROKEN_OPTIONS+=LOADER_GELI LOADER_LUA BROKEN_OPTIONS+=PROFILE .endif .if ${__T} != "aarch64" && ${__T} != "amd64" && ${__T} != "i386" && \ - ${__T} != "powerpc64" && ${__T} != "sparc64" + ${__T} != "powerpc64" BROKEN_OPTIONS+=CXGBETOOL BROKEN_OPTIONS+=MLX5TOOL .endif @@ -396,11 +390,6 @@ BROKEN_OPTIONS+=HYPERV BROKEN_OPTIONS+=NVME .endif -.if ${__T:Msparc64} -# PR 233405 -BROKEN_OPTIONS+=LLVM_LIBUNWIND -.endif - .if ${COMPILER_FEATURES:Mc++11} && \ (${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc64") __DEFAULT_YES_OPTIONS+=OPENMP @@ -482,7 +471,7 @@ MK_BSDINSTALL:= no MK_SVNLITE:= no .endif -.if (${__TT} == "mips" || ${__TT} == "sparc64") && ${MK_GCC} == "no" +.if ${__TT} == "mips" && ${MK_GCC} == "no" MK_BINUTILS_BOOTSTRAP:= no .endif From owner-svn-src-head@freebsd.org Wed Feb 26 18:49:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ACA73240856; Wed, 26 Feb 2020 18:49:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SPwm1brDz3LQb; Wed, 26 Feb 2020 18:49:28 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC4CF40C3; Wed, 26 Feb 2020 18:49:26 +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 01QInQrj034438; Wed, 26 Feb 2020 18:49:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QInQxa034434; Wed, 26 Feb 2020 18:49:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002261849.01QInQxa034434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 26 Feb 2020 18:49:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358346 - in head/libexec/rtld-elf: . rtld-libc X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/libexec/rtld-elf: . rtld-libc X-SVN-Commit-Revision: 358346 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 18:49:30 -0000 Author: imp Date: Wed Feb 26 18:49:25 2020 New Revision: 358346 URL: https://svnweb.freebsd.org/changeset/base/358346 Log: Remove sparc64 specific parts of rtld-elf. Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld_tls.h Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc ============================================================================== --- head/libexec/rtld-elf/rtld-libc/Makefile.inc Wed Feb 26 18:49:20 2020 (r358345) +++ head/libexec/rtld-elf/rtld-libc/Makefile.inc Wed Feb 26 18:49:25 2020 (r358346) @@ -73,12 +73,6 @@ _libc_other_objects+=syncicache .if ${MACHINE_ARCH:Mmipsn32*} == "" && ${MACHINE_ARCH:Mmips64*} == "" _libc_other_objects+=umoddi3 udivdi3 qdivrem .endif -.elif ${LIBC_ARCH} == "sparc64" -# reloc.c uses __sparc_utrap which needs a lot of other object files -_libc_other_objects+=__sparc_utrap __sparc_utrap_fp_disabled __sparc_utrap_gen \ - __sparc_utrap_setup __sparc_utrap_align __sparc_utrap_emul kill getpid \ - fpu fpu_explode fpu_div fpu_reg fpu_sqrt fpu_implode fpu_subr fpu_add \ - fpu_compare fpu_mul .endif # Extract all the .o files from libc_nossp_pic.a. This ensures that Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Feb 26 18:49:20 2020 (r358345) +++ head/libexec/rtld-elf/rtld.c Wed Feb 26 18:49:25 2020 (r358346) @@ -4954,7 +4954,7 @@ free_tls(void *tcb, size_t tcbsize, size_t tcbalign __ #endif -#if defined(__i386__) || defined(__amd64__) || defined(__sparc64__) +#if defined(__i386__) || defined(__amd64__) /* * Allocate Static TLS using the Variant II method. Modified: head/libexec/rtld-elf/rtld_tls.h ============================================================================== --- head/libexec/rtld-elf/rtld_tls.h Wed Feb 26 18:49:20 2020 (r358345) +++ head/libexec/rtld-elf/rtld_tls.h Wed Feb 26 18:49:25 2020 (r358346) @@ -43,11 +43,10 @@ * block is returned by this function. For architectures using * 'Variant I' TLS, the thread local storage follows the TCB, and for * 'Variant II', the thread local storage precedes it. For - * architectures using the 'Variant II' model (e.g. i386, amd64, - * sparc64), the TCB must begin with two pointer fields which are used - * by rtld for its TLS implementation. For the 'Variant I' model, the - * TCB must begin with a single pointer field for rtld's - * implementation. + * architectures using the 'Variant II' model (e.g. i386, amd64) the + * TCB must begin with two pointer fields which are used by rtld for + * its TLS implementation. For the 'Variant I' model, the TCB must + * begin with a single pointer field for rtld's implementation. * * If the value of 'oldtls' is non-NULL, the new TLS block will be * initialised using the values contained in 'oldtls' and 'oldtls' From owner-svn-src-head@freebsd.org Wed Feb 26 18:55:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0B0C240D24; Wed, 26 Feb 2020 18:55:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SQ3D2NLJz3QyR; Wed, 26 Feb 2020 18:55:04 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8E7842B1; Wed, 26 Feb 2020 18:55:03 +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 01QIt3js040181; Wed, 26 Feb 2020 18:55:03 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QIt3hc040179; Wed, 26 Feb 2020 18:55:03 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002261855.01QIt3hc040179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 26 Feb 2020 18:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358347 - in head/lib/msun: ld128 sparc64 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/lib/msun: ld128 sparc64 X-SVN-Commit-Revision: 358347 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 18:55:05 -0000 Author: imp Date: Wed Feb 26 18:55:03 2020 New Revision: 358347 URL: https://svnweb.freebsd.org/changeset/base/358347 Log: Remove sparc64 specific parts of libm and fix comments Once upon a time, sparc64 was the only ld128 architecture. However, both aarch64 and riscv are now such architectures. Many of the comments about how slow multiplication was on old sparc64 processors are now no longer true. However, since no evaluation has been done for aarch64 yet, it's unclear if they are still relevant or not. If not, the code should be changed. If so, the comments should remove the uncertainty. Reviewed by: emaste@ Differential Revision: https://reviews.freebsd.org/D23658 Deleted: head/lib/msun/sparc64/Makefile.inc head/lib/msun/sparc64/Symbol.map head/lib/msun/sparc64/e_sqrt.S head/lib/msun/sparc64/e_sqrtf.S head/lib/msun/sparc64/fenv.c head/lib/msun/sparc64/fenv.h Modified: head/lib/msun/ld128/k_expl.h head/lib/msun/ld128/s_expl.c head/lib/msun/ld128/s_logl.c Modified: head/lib/msun/ld128/k_expl.h ============================================================================== --- head/lib/msun/ld128/k_expl.h Wed Feb 26 18:49:25 2020 (r358346) +++ head/lib/msun/ld128/k_expl.h Wed Feb 26 18:55:03 2020 (r358347) @@ -265,7 +265,8 @@ __k_expl(long double x, long double *hip, long double /* * XXX: the rest of the functions are identical for ld80 and ld128. * However, we should use scalbnl() for ld128, since long double - * multiplication is very slow on the only supported ld128 arch (sparc64). + * multiplication was very slow on sparc64 and no new evaluation has + * been made for aarch64 and/or riscv. */ static inline void Modified: head/lib/msun/ld128/s_expl.c ============================================================================== --- head/lib/msun/ld128/s_expl.c Wed Feb 26 18:49:25 2020 (r358346) +++ head/lib/msun/ld128/s_expl.c Wed Feb 26 18:55:03 2020 (r358347) @@ -92,7 +92,10 @@ expl(long double x) t = SUM2P(hi, lo); /* Scale by 2**k. */ - /* XXX sparc64 multiplication is so slow that scalbnl() is faster. */ + /* + * XXX sparc64 multiplication was so slow that scalbnl() is faster, + * but performance on aarch64 and riscv hasn't yet been quantified. + */ if (k >= LDBL_MIN_EXP) { if (k == LDBL_MAX_EXP) RETURNI(t * 2 * 0x1p16383L); Modified: head/lib/msun/ld128/s_logl.c ============================================================================== --- head/lib/msun/ld128/s_logl.c Wed Feb 26 18:49:25 2020 (r358346) +++ head/lib/msun/ld128/s_logl.c Wed Feb 26 18:55:03 2020 (r358347) @@ -535,16 +535,17 @@ logl(long double x) * efficiency than is gained. */ /* - * Use double precision operations wherever possible, since long - * double operations are emulated and are very slow on the only - * known machines that support ld128 (sparc64). Also, don't try - * to improve parallelism by increasing the number of operations, - * since any parallelism on such machines is needed for the - * emulation. Horner's method is good for this, and is also good - * for accuracy. Horner's method doesn't handle the `lo' term - * well, either for efficiency or accuracy. However, for accuracy - * we evaluate d * d * P2 separately to take advantage of - * by P2 being exact, and this gives a good place to sum the 'lo' + * Use double precision operations wherever possible, since + * long double operations are emulated and were very slow on + * the old sparc64 and unknown on the newer aarch64 and riscv + * machines. Also, don't try to improve parallelism by + * increasing the number of operations, since any parallelism + * on such machines is needed for the emulation. Horner's + * method is good for this, and is also good for accuracy. + * Horner's method doesn't handle the `lo' term well, either + * for efficiency or accuracy. However, for accuracy we + * evaluate d * d * P2 separately to take advantage of by P2 + * being exact, and this gives a good place to sum the 'lo' * term too. */ dd = (double)d; From owner-svn-src-head@freebsd.org Wed Feb 26 18:55:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8EB05240D51; Wed, 26 Feb 2020 18:55:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SQ3M3DY7z3R3Q; Wed, 26 Feb 2020 18:55:10 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FC4942B2; Wed, 26 Feb 2020 18:55:10 +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 01QItAX9040238; Wed, 26 Feb 2020 18:55:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QIt9Ip040234; Wed, 26 Feb 2020 18:55:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002261855.01QIt9Ip040234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 26 Feb 2020 18:55:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358348 - in head/lib/libc: . gdtoa gen sparc64 sparc64/fpu sparc64/gen sparc64/sys sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/lib/libc: . gdtoa gen sparc64 sparc64/fpu sparc64/gen sparc64/sys sys X-SVN-Commit-Revision: 358348 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 18:55:13 -0000 Author: imp Date: Wed Feb 26 18:55:09 2020 New Revision: 358348 URL: https://svnweb.freebsd.org/changeset/base/358348 Log: Remove sparc64 specific parts of libc. Also update comments for which architectures use 128 bit long doubles, as appropriate. The softfloat specialization routines weren't updated since they appear to be from an upstream source which we may want to update in the future to get a more favorable license. Reviewed by: emaste@ Differential Revision: https://reviews.freebsd.org/D23658 Deleted: head/lib/libc/sparc64/Makefile.inc head/lib/libc/sparc64/SYS.h head/lib/libc/sparc64/Symbol.map head/lib/libc/sparc64/_fpmath.h head/lib/libc/sparc64/arith.h head/lib/libc/sparc64/fpu/Makefile.inc head/lib/libc/sparc64/fpu/fpu.c head/lib/libc/sparc64/fpu/fpu_add.c head/lib/libc/sparc64/fpu/fpu_arith.h head/lib/libc/sparc64/fpu/fpu_compare.c head/lib/libc/sparc64/fpu/fpu_div.c head/lib/libc/sparc64/fpu/fpu_emu.h head/lib/libc/sparc64/fpu/fpu_explode.c head/lib/libc/sparc64/fpu/fpu_extern.h head/lib/libc/sparc64/fpu/fpu_implode.c head/lib/libc/sparc64/fpu/fpu_mul.c head/lib/libc/sparc64/fpu/fpu_qp.c head/lib/libc/sparc64/fpu/fpu_reg.S head/lib/libc/sparc64/fpu/fpu_reg.h head/lib/libc/sparc64/fpu/fpu_sqrt.c head/lib/libc/sparc64/fpu/fpu_subr.c head/lib/libc/sparc64/gd_qnan.h head/lib/libc/sparc64/gen/Makefile.inc head/lib/libc/sparc64/gen/_ctx_start.S head/lib/libc/sparc64/gen/_set_tp.c head/lib/libc/sparc64/gen/_setjmp.S head/lib/libc/sparc64/gen/assym.s head/lib/libc/sparc64/gen/fabs.S head/lib/libc/sparc64/gen/fixunsdfsi.S head/lib/libc/sparc64/gen/flt_rounds.c head/lib/libc/sparc64/gen/fpgetmask.c head/lib/libc/sparc64/gen/fpgetround.c head/lib/libc/sparc64/gen/fpgetsticky.c head/lib/libc/sparc64/gen/fpsetmask.c head/lib/libc/sparc64/gen/fpsetround.c head/lib/libc/sparc64/gen/infinity.c head/lib/libc/sparc64/gen/makecontext.c head/lib/libc/sparc64/gen/setjmp.S head/lib/libc/sparc64/gen/signalcontext.c head/lib/libc/sparc64/gen/sigsetjmp.S head/lib/libc/sparc64/static_tls.h head/lib/libc/sparc64/sys/Makefile.inc head/lib/libc/sparc64/sys/__sparc_sigtramp_setup.c head/lib/libc/sparc64/sys/__sparc_utrap.c head/lib/libc/sparc64/sys/__sparc_utrap_align.c head/lib/libc/sparc64/sys/__sparc_utrap_emul.c head/lib/libc/sparc64/sys/__sparc_utrap_fp_disabled.S head/lib/libc/sparc64/sys/__sparc_utrap_gen.S head/lib/libc/sparc64/sys/__sparc_utrap_install.c head/lib/libc/sparc64/sys/__sparc_utrap_private.h head/lib/libc/sparc64/sys/__sparc_utrap_setup.c head/lib/libc/sparc64/sys/assym.s head/lib/libc/sparc64/sys/cerror.S head/lib/libc/sparc64/sys/sigaction1.S head/lib/libc/sparc64/sys/sigcode.S Modified: head/lib/libc/Makefile head/lib/libc/gdtoa/machdep_ldisQ.c head/lib/libc/gen/tls.c head/lib/libc/sys/Makefile.inc Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Wed Feb 26 18:55:03 2020 (r358347) +++ head/lib/libc/Makefile Wed Feb 26 18:55:09 2020 (r358348) @@ -97,7 +97,6 @@ NOASM= ${LIBC_ARCH} != "amd64" && \ ${LIBC_ARCH} != "powerpc64" && \ ${LIBC_ARCH} != "riscv" && \ - ${LIBC_ARCH} != "sparc64" && \ ${MACHINE_ARCH:Mmipsn32*} == "" && \ ${MACHINE_ARCH:Mmips64*} == "" .include "${LIBC_SRCTOP}/quad/Makefile.inc" Modified: head/lib/libc/gdtoa/machdep_ldisQ.c ============================================================================== --- head/lib/libc/gdtoa/machdep_ldisQ.c Wed Feb 26 18:55:03 2020 (r358347) +++ head/lib/libc/gdtoa/machdep_ldisQ.c Wed Feb 26 18:55:09 2020 (r358348) @@ -34,7 +34,7 @@ /* * Machine-dependent glue to integrate David Gay's gdtoa * package into libc for architectures where a long double - * uses quad precision, such as sparc64. + * uses quad precision, such as aarch64 or riscv. */ #include Modified: head/lib/libc/gen/tls.c ============================================================================== --- head/lib/libc/gen/tls.c Wed Feb 26 18:55:03 2020 (r358347) +++ head/lib/libc/gen/tls.c Wed Feb 26 18:55:09 2020 (r358348) @@ -74,8 +74,7 @@ void __libc_free_tls(void *tls, size_t tcbsize, size_t #if defined(__amd64__) #define TLS_TCB_ALIGN 16 #elif defined(__aarch64__) || defined(__arm__) || defined(__i386__) || \ - defined(__mips__) || defined(__powerpc__) || defined(__riscv) || \ - defined(__sparc64__) + defined(__mips__) || defined(__powerpc__) || defined(__riscv) #define TLS_TCB_ALIGN sizeof(void *) #else #error TLS_TCB_ALIGN undefined for target architecture @@ -85,7 +84,7 @@ void __libc_free_tls(void *tls, size_t tcbsize, size_t defined(__powerpc__) || defined(__riscv) #define TLS_VARIANT_I #endif -#if defined(__i386__) || defined(__amd64__) || defined(__sparc64__) +#if defined(__i386__) || defined(__amd64__) #define TLS_VARIANT_II #endif Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Wed Feb 26 18:55:03 2020 (r358347) +++ head/lib/libc/sys/Makefile.inc Wed Feb 26 18:55:09 2020 (r358348) @@ -79,6 +79,7 @@ INTERPOSED = \ sendmsg \ sendto \ setcontext \ + sigaction \ sigprocmask \ sigsuspend \ sigtimedwait \ @@ -89,13 +90,6 @@ INTERPOSED = \ wait6 \ write \ writev - -.if ${MACHINE_CPUARCH} == "sparc64" -SRCS+= sigaction.c -NOASM+= sigaction.o -.else -INTERPOSED+= sigaction -.endif SRCS+= ${INTERPOSED:S/$/.c/} NOASM+= ${INTERPOSED:S/$/.o/} From owner-svn-src-head@freebsd.org Wed Feb 26 19:08:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78AFF2413E1; Wed, 26 Feb 2020 19:08:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SQLd0GFRz485p; Wed, 26 Feb 2020 19:08:24 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55CC744E8; Wed, 26 Feb 2020 19:08:24 +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 01QJ8OjQ046524; Wed, 26 Feb 2020 19:08:24 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QJ8Otx046523; Wed, 26 Feb 2020 19:08:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002261908.01QJ8Otx046523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 26 Feb 2020 19:08:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358349 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 358349 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 19:08:25 -0000 Author: emaste Date: Wed Feb 26 19:08:23 2020 New Revision: 358349 URL: https://svnweb.freebsd.org/changeset/base/358349 Log: src.opts.mk: drop MIPS special case for disabling BINUTILS_BOOTSTRAP Binutils has already been reduced to installing ld only on powerpc32 and as only on amd64. (Also objdump on every arch supported by binutils 2.17.50.) Although BINUTILS_BOOTSTRAP serves no purpose on MIPS there is no reason to have a special case for it. 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 Feb 26 18:55:09 2020 (r358348) +++ head/share/mk/src.opts.mk Wed Feb 26 19:08:23 2020 (r358349) @@ -471,10 +471,6 @@ MK_BSDINSTALL:= no MK_SVNLITE:= no .endif -.if ${__TT} == "mips" && ${MK_GCC} == "no" -MK_BINUTILS_BOOTSTRAP:= no -.endif - .if ${MK_MAIL} == "no" MK_MAILWRAPPER:= no MK_SENDMAIL:= no From owner-svn-src-head@freebsd.org Wed Feb 26 19:10:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC6C424151A; Wed, 26 Feb 2020 19:10:50 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SQPQ5Bg1z4Db9; Wed, 26 Feb 2020 19:10:50 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id B9C308D4A377; Wed, 26 Feb 2020 19:10:47 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 59057E707C0; Wed, 26 Feb 2020 19:10:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id P_9cxwy0Df_F; Wed, 26 Feb 2020 19:10:46 +0000 (UTC) Received: from [169.254.231.217] (unknown [IPv6:fde9:577b:c1a9:4902:1d3b:e16a:9291:89a9]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 2E6C6E707B5; Wed, 26 Feb 2020 19:10:45 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Warner Losh" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358348 - in head/lib/libc: . gdtoa gen sparc64 sparc64/fpu sparc64/gen sparc64/sys sys Date: Wed, 26 Feb 2020 19:10:45 +0000 X-Mailer: MailMate (2.0BETAr6146) Message-ID: In-Reply-To: <202002261855.01QIt9Ip040234@repo.freebsd.org> References: <202002261855.01QIt9Ip040234@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48SQPQ5Bg1z4Db9 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 19:10:51 -0000 On 26 Feb 2020, at 18:55, Warner Losh wrote: > Author: imp > Date: Wed Feb 26 18:55:09 2020 > New Revision: 358348 > URL: https://svnweb.freebsd.org/changeset/base/358348 > > Log: > Remove sparc64 specific parts of libc. I have a silly question for which it’s long been too late, but for the next time .. why do we need a gazillion of commits to remove sparc64 rather than 1 “atomic†one (or maybe 2 in case the one missed a bit) to remove it all (which would also allow other people to bring it back into private trees a lot more easily compared to tracking changes over weeks)? Bjoern From owner-svn-src-head@freebsd.org Wed Feb 26 19:12:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 33A5F241741; Wed, 26 Feb 2020 19:12:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SQRS5nG5z4JLX; Wed, 26 Feb 2020 19:12:36 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB17746AB; Wed, 26 Feb 2020 19:12:36 +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 01QJCaJ6052258; Wed, 26 Feb 2020 19:12:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QJCaUl052257; Wed, 26 Feb 2020 19:12:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002261912.01QJCaUl052257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 26 Feb 2020 19:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358350 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 358350 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 19:12:37 -0000 Author: emaste Date: Wed Feb 26 19:12:36 2020 New Revision: 358350 URL: https://svnweb.freebsd.org/changeset/base/358350 Log: src.conf.5: regen after sparc64 removal Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Feb 26 19:08:23 2020 (r358349) +++ head/share/man/man5/src.conf.5 Wed Feb 26 19:12:36 2020 (r358350) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd February 19, 2020 +.Dd February 26, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1028,10 +1028,6 @@ is set explicitly) (unless .Va WITH_LLVM_TARGET_RISCV is set explicitly) -.It Va WITHOUT_LLVM_TARGET_SPARC -(unless -.Va WITH_LLVM_TARGET_SPARC -is set explicitly) .El .It Va WITHOUT_LLVM_TARGET_ARM Set to not build LLVM target support for ARM. @@ -1058,8 +1054,8 @@ Set to not build LLVM target support for RISC-V. The .Va LLVM_TARGET_ALL option should be used rather than this in most cases. -.It Va WITHOUT_LLVM_TARGET_SPARC -Set to not build LLVM target support for SPARC. +.It Va WITH_LLVM_TARGET_SPARC +Set to build LLVM target support for SPARC. The .Va LLVM_TARGET_ALL option should be used rather than this in most cases. From owner-svn-src-head@freebsd.org Wed Feb 26 19:15:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5495F241869; Wed, 26 Feb 2020 19:15:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SQVP4d7Bz4PTp; Wed, 26 Feb 2020 19:15:09 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F59A46B3; Wed, 26 Feb 2020 19:15:09 +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 01QJF9A6052432; Wed, 26 Feb 2020 19:15:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QJF886052426; Wed, 26 Feb 2020 19:15:08 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002261915.01QJF886052426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 26 Feb 2020 19:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358351 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 358351 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 19:15:10 -0000 Author: imp Date: Wed Feb 26 19:15:08 2020 New Revision: 358351 URL: https://svnweb.freebsd.org/changeset/base/358351 Log: Remove support for all pre FreeBSD 11.0 versions from mpr and mps. Remove a number of workarounds for older versions of FreeBSD. FreeBSD stable/10 was branched over 6 years ago. All of these changes date from about that time or earlier. These workarounds are extensive and get in the way of understanding the current flow in the driver. Modified: head/sys/dev/mpr/mpr.c head/sys/dev/mpr/mpr_sas.c head/sys/dev/mpr/mpr_sas_lsi.c head/sys/dev/mpr/mprvar.h head/sys/dev/mps/mps_sas.c head/sys/dev/mps/mps_sas_lsi.c head/sys/dev/mps/mpsvar.h Modified: head/sys/dev/mpr/mpr.c ============================================================================== --- head/sys/dev/mpr/mpr.c Wed Feb 26 19:12:36 2020 (r358350) +++ head/sys/dev/mpr/mpr.c Wed Feb 26 19:15:08 2020 (r358351) @@ -165,11 +165,7 @@ mpr_diag_reset(struct mpr_softc *sc,int sleep_flag) * Force NO_SLEEP for threads prohibited to sleep * e.a Thread from interrupt handler are prohibited to sleep. */ -#if __FreeBSD_version >= 1000029 if (curthread->td_no_sleeping) -#else //__FreeBSD_version < 1000029 - if (curthread->td_pflags & TDP_NOSLEEPING) -#endif //__FreeBSD_version >= 1000029 sleep_flag = NO_SLEEP; mpr_dprint(sc, MPR_INIT, "sequence start, sleep_flag=%d\n", sleep_flag); @@ -1005,11 +1001,7 @@ mpr_request_sync(struct mpr_softc *sc, void *req, MPI2 int i, count, ioc_sz, residual; int sleep_flags = CAN_SLEEP; -#if __FreeBSD_version >= 1000029 if (curthread->td_no_sleeping) -#else //__FreeBSD_version < 1000029 - if (curthread->td_pflags & TDP_NOSLEEPING) -#endif //__FreeBSD_version >= 1000029 sleep_flags = NO_SLEEP; /* Step 1 */ @@ -3762,11 +3754,7 @@ mpr_wait_command(struct mpr_softc *sc, struct mpr_comm // Check for context and wait for 50 mSec at a time until time has // expired or the command has finished. If msleep can't be used, need // to poll. -#if __FreeBSD_version >= 1000029 if (curthread->td_no_sleeping) -#else //__FreeBSD_version < 1000029 - if (curthread->td_pflags & TDP_NOSLEEPING) -#endif //__FreeBSD_version >= 1000029 sleep_flag = NO_SLEEP; getmicrouptime(&start_time); if (mtx_owned(&sc->mpr_mtx) && sleep_flag == CAN_SLEEP) { Modified: head/sys/dev/mpr/mpr_sas.c ============================================================================== --- head/sys/dev/mpr/mpr_sas.c Wed Feb 26 19:12:36 2020 (r358350) +++ head/sys/dev/mpr/mpr_sas.c Wed Feb 26 19:15:08 2020 (r358351) @@ -69,9 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if __FreeBSD_version >= 900026 #include -#endif #include @@ -132,23 +130,14 @@ static int mprsas_send_abort(struct mpr_softc *sc, str struct mpr_command *cm); static void mprsas_async(void *callback_arg, uint32_t code, struct cam_path *path, void *arg); -#if (__FreeBSD_version < 901503) || \ - ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000006)) -static void mprsas_check_eedp(struct mpr_softc *sc, struct cam_path *path, - struct ccb_getdev *cgd); -static void mprsas_read_cap_done(struct cam_periph *periph, - union ccb *done_ccb); -#endif static int mprsas_send_portenable(struct mpr_softc *sc); static void mprsas_portenable_complete(struct mpr_softc *sc, struct mpr_command *cm); -#if __FreeBSD_version >= 900026 static void mprsas_smpio_complete(struct mpr_softc *sc, struct mpr_command *cm); static void mprsas_send_smpcmd(struct mprsas_softc *sassc, union ccb *ccb, uint64_t sasaddr); static void mprsas_action_smpio(struct mprsas_softc *sassc, union ccb *ccb); -#endif //FreeBSD_version >= 900026 struct mprsas_target * mprsas_find_target_by_handle(struct mprsas_softc *sassc, int start, @@ -183,10 +172,7 @@ mprsas_startup_increment(struct mprsas_softc *sassc) /* just starting, freeze the simq */ mpr_dprint(sassc->sc, MPR_INIT, "%s freezing simq\n", __func__); -#if (__FreeBSD_version >= 1000039) || \ - ((__FreeBSD_version < 1000000) && (__FreeBSD_version >= 902502)) xpt_hold_boot(); -#endif xpt_freeze_simq(sassc->sim, 1); } mpr_dprint(sassc->sc, MPR_INIT, "%s refcount %u\n", __func__, @@ -218,12 +204,7 @@ mprsas_startup_decrement(struct mprsas_softc *sassc) "%s releasing simq\n", __func__); sassc->flags &= ~MPRSAS_IN_STARTUP; xpt_release_simq(sassc->sim, 1); -#if (__FreeBSD_version >= 1000039) || \ - ((__FreeBSD_version < 1000000) && (__FreeBSD_version >= 902502)) xpt_release_boot(); -#else - mprsas_rescan_target(sassc->sc, NULL); -#endif } mpr_dprint(sassc->sc, MPR_INIT, "%s refcount %u\n", __func__, sassc->startup_refcount); @@ -843,54 +824,9 @@ mpr_attach_sas(struct mpr_softc *sc) } else { int event; -#if (__FreeBSD_version >= 1000006) || \ - ((__FreeBSD_version >= 901503) && (__FreeBSD_version < 1000000)) event = AC_ADVINFO_CHANGED | AC_FOUND_DEVICE; -#else - event = AC_FOUND_DEVICE; -#endif - - /* - * Prior to the CAM locking improvements, we can't call - * xpt_register_async() with a particular path specified. - * - * If a path isn't specified, xpt_register_async() will - * generate a wildcard path and acquire the XPT lock while - * it calls xpt_action() to execute the XPT_SASYNC_CB CCB. - * It will then drop the XPT lock once that is done. - * - * If a path is specified for xpt_register_async(), it will - * not acquire and drop the XPT lock around the call to - * xpt_action(). xpt_action() asserts that the caller - * holds the SIM lock, so the SIM lock has to be held when - * calling xpt_register_async() when the path is specified. - * - * But xpt_register_async calls xpt_for_all_devices(), - * which calls xptbustraverse(), which will acquire each - * SIM lock. When it traverses our particular bus, it will - * necessarily acquire the SIM lock, which will lead to a - * recursive lock acquisition. - * - * The CAM locking changes fix this problem by acquiring - * the XPT topology lock around bus traversal in - * xptbustraverse(), so the caller can hold the SIM lock - * and it does not cause a recursive lock acquisition. - * - * These __FreeBSD_version values are approximate, especially - * for stable/10, which is two months later than the actual - * change. - */ - -#if (__FreeBSD_version < 1000703) || \ - ((__FreeBSD_version >= 1100000) && (__FreeBSD_version < 1100002)) - mpr_unlock(sc); status = xpt_register_async(event, mprsas_async, sc, - NULL); - mpr_lock(sc); -#else - status = xpt_register_async(event, mprsas_async, sc, sassc->path); -#endif if (status != CAM_REQ_CMP) { mpr_dprint(sc, MPR_ERROR, @@ -1034,12 +970,7 @@ mprsas_action(struct cam_sim *sim, union ccb *ccb) cpi->version_num = 1; cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16; cpi->target_sprt = 0; -#if (__FreeBSD_version >= 1000039) || \ - ((__FreeBSD_version < 1000000) && (__FreeBSD_version >= 902502)) cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED | PIM_NOSCAN; -#else - cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; -#endif cpi->hba_eng_cnt = 0; cpi->max_target = sassc->maxtargets - 1; cpi->max_lun = 255; @@ -1135,11 +1066,9 @@ mprsas_action(struct cam_sim *sim, union ccb *ccb) case XPT_SCSI_IO: mprsas_action_scsiio(sassc, ccb); return; -#if __FreeBSD_version >= 900026 case XPT_SMP_IO: mprsas_action_smpio(sassc, ccb); return; -#endif default: mprsas_set_ccbstatus(ccb, CAM_FUNC_NOTAVAIL); break; @@ -1789,17 +1718,7 @@ mprsas_build_nvme_unmap(struct mpr_softc *sc, struct m uint64_t nvme_dsm_ranges_dma_handle; csio = &ccb->csio; -#if __FreeBSD_version >= 1100103 list_len = (scsiio_cdb_ptr(csio)[7] << 8 | scsiio_cdb_ptr(csio)[8]); -#else - if (csio->ccb_h.flags & CAM_CDB_POINTER) { - list_len = (ccb->csio.cdb_io.cdb_ptr[7] << 8 | - ccb->csio.cdb_io.cdb_ptr[8]); - } else { - list_len = (ccb->csio.cdb_io.cdb_bytes[7] << 8 | - ccb->csio.cdb_io.cdb_bytes[8]); - } -#endif if (!list_len) { mpr_dprint(sc, MPR_ERROR, "Parameter list length is Zero\n"); return -EINVAL; @@ -1896,13 +1815,8 @@ mprsas_build_nvme_unmap(struct mpr_softc *sc, struct m MPI26_REQ_DESCRIPT_FLAGS_PCIE_ENCAPSULATED; csio->ccb_h.qos.sim_data = sbinuptime(); -#if __FreeBSD_version >= 1000029 callout_reset_sbt(&cm->cm_callout, SBT_1MS * ccb->ccb_h.timeout, 0, mprsas_scsiio_timeout, cm, 0); -#else //__FreeBSD_version < 1000029 - callout_reset(&cm->cm_callout, (ccb->ccb_h.timeout * hz) / 1000, - mprsas_scsiio_timeout, cm); -#endif //__FreeBSD_version >= 1000029 targ->issued++; targ->outstanding++; @@ -2026,14 +1940,7 @@ mprsas_action_scsiio(struct mprsas_softc *sassc, union /* For NVME device's issue UNMAP command directly to NVME drives by * constructing equivalent native NVMe DataSetManagement command. */ -#if __FreeBSD_version >= 1100103 scsi_opcode = scsiio_cdb_ptr(csio)[0]; -#else - if (csio->ccb_h.flags & CAM_CDB_POINTER) - scsi_opcode = csio->cdb_io.cdb_ptr[0]; - else - scsi_opcode = csio->cdb_io.cdb_bytes[0]; -#endif if (scsi_opcode == UNMAP && targ->is_nvme && (csio->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_VADDR) { @@ -2219,13 +2126,8 @@ mprsas_action_scsiio(struct mprsas_softc *sassc, union } csio->ccb_h.qos.sim_data = sbinuptime(); -#if __FreeBSD_version >= 1000029 callout_reset_sbt(&cm->cm_callout, SBT_1MS * ccb->ccb_h.timeout, 0, mprsas_scsiio_timeout, cm, 0); -#else //__FreeBSD_version < 1000029 - callout_reset(&cm->cm_callout, (ccb->ccb_h.timeout * hz) / 1000, - mprsas_scsiio_timeout, cm); -#endif //__FreeBSD_version >= 1000029 targ->issued++; targ->outstanding++; @@ -2610,14 +2512,7 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mp * flag, and use it in a few places in the rest of this function for * convenience. Use the macro if available. */ -#if __FreeBSD_version >= 1100103 scsi_cdb = scsiio_cdb_ptr(csio); -#else - if (csio->ccb_h.flags & CAM_CDB_POINTER) - scsi_cdb = csio->cdb_io.cdb_ptr; - else - scsi_cdb = csio->cdb_io.cdb_bytes; -#endif /* * If this is a Start Stop Unit command and it was issued by the driver @@ -2939,7 +2834,6 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mp xpt_done(ccb); } -#if __FreeBSD_version >= 900026 static void mprsas_smpio_complete(struct mpr_softc *sc, struct mpr_command *cm) { @@ -3017,8 +2911,6 @@ mprsas_send_smpcmd(struct mprsas_softc *sassc, union c sg = NULL; error = 0; -#if (__FreeBSD_version >= 1000028) || \ - ((__FreeBSD_version >= 902001) && (__FreeBSD_version < 1000000)) switch (ccb->ccb_h.flags & CAM_DATA_MASK) { case CAM_DATA_PADDR: case CAM_DATA_SG_PADDR: @@ -3078,66 +2970,7 @@ mprsas_send_smpcmd(struct mprsas_softc *sassc, union c xpt_done(ccb); return; } -#else /* __FreeBSD_version < 1000028 */ - /* - * XXX We don't yet support physical addresses here. - */ - if (ccb->ccb_h.flags & (CAM_DATA_PHYS|CAM_SG_LIST_PHYS)) { - mpr_dprint(sc, MPR_ERROR, "%s: physical addresses not " - "supported\n", __func__); - mprsas_set_ccbstatus(ccb, CAM_REQ_INVALID); - xpt_done(ccb); - return; - } - /* - * If the user wants to send an S/G list, check to make sure they - * have single buffers. - */ - if (ccb->ccb_h.flags & CAM_SCATTER_VALID) { - /* - * The chip does not support more than one buffer for the - * request or response. - */ - if ((ccb->smpio.smp_request_sglist_cnt > 1) - || (ccb->smpio.smp_response_sglist_cnt > 1)) { - mpr_dprint(sc, MPR_ERROR, "%s: multiple request or " - "response buffer segments not supported for SMP\n", - __func__); - mprsas_set_ccbstatus(ccb, CAM_REQ_INVALID); - xpt_done(ccb); - return; - } - - /* - * The CAM_SCATTER_VALID flag was originally implemented - * for the XPT_SCSI_IO CCB, which only has one data pointer. - * We have two. So, just take that flag to mean that we - * might have S/G lists, and look at the S/G segment count - * to figure out whether that is the case for each individual - * buffer. - */ - if (ccb->smpio.smp_request_sglist_cnt != 0) { - bus_dma_segment_t *req_sg; - - req_sg = (bus_dma_segment_t *)ccb->smpio.smp_request; - request = (uint8_t *)(uintptr_t)req_sg[0].ds_addr; - } else - request = ccb->smpio.smp_request; - - if (ccb->smpio.smp_response_sglist_cnt != 0) { - bus_dma_segment_t *rsp_sg; - - rsp_sg = (bus_dma_segment_t *)ccb->smpio.smp_response; - response = (uint8_t *)(uintptr_t)rsp_sg[0].ds_addr; - } else - response = ccb->smpio.smp_response; - } else { - request = ccb->smpio.smp_request; - response = ccb->smpio.smp_response; - } -#endif /* __FreeBSD_version < 1000028 */ - cm = mpr_alloc_command(sc); if (cm == NULL) { mpr_dprint(sc, MPR_ERROR, "%s: cannot allocate command\n", @@ -3361,7 +3194,6 @@ bailout: xpt_done(ccb); } -#endif //__FreeBSD_version >= 900026 static void mprsas_action_resetdev(struct mprsas_softc *sassc, union ccb *ccb) @@ -3486,8 +3318,6 @@ mprsas_async(void *callback_arg, uint32_t code, struct sc = (struct mpr_softc *)callback_arg; switch (code) { -#if (__FreeBSD_version >= 1000006) || \ - ((__FreeBSD_version >= 901503) && (__FreeBSD_version < 1000000)) case AC_ADVINFO_CHANGED: { struct mprsas_target *target; struct mprsas_softc *sassc; @@ -3510,18 +3340,6 @@ mprsas_async(void *callback_arg, uint32_t code, struct break; /* - * See the comment in mpr_attach_sas() for a detailed - * explanation. In these versions of FreeBSD we register - * for all events and filter out the events that don't - * apply to us. - */ -#if (__FreeBSD_version < 1000703) || \ - ((__FreeBSD_version >= 1100000) && (__FreeBSD_version < 1100002)) - if (xpt_path_path_id(path) != sassc->sim->path_id) - break; -#endif - - /* * We should have a handle for this, but check to make sure. */ KASSERT(xpt_path_target_id(path) < sassc->maxtargets, @@ -3557,12 +3375,7 @@ mprsas_async(void *callback_arg, uint32_t code, struct cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.ccb_h.flags = CAM_DIR_IN; cdai.buftype = CDAI_TYPE_RCAPLONG; -#if (__FreeBSD_version >= 1100061) || \ - ((__FreeBSD_version >= 1001510) && (__FreeBSD_version < 1100000)) cdai.flags = CDAI_FLAG_NONE; -#else - cdai.flags = 0; -#endif cdai.bufsiz = sizeof(rcap_buf); cdai.buf = (uint8_t *)&rcap_buf; xpt_action((union ccb *)&cdai); @@ -3590,228 +3403,11 @@ mprsas_async(void *callback_arg, uint32_t code, struct } break; } -#endif - case AC_FOUND_DEVICE: { - struct ccb_getdev *cgd; - - /* - * See the comment in mpr_attach_sas() for a detailed - * explanation. In these versions of FreeBSD we register - * for all events and filter out the events that don't - * apply to us. - */ -#if (__FreeBSD_version < 1000703) || \ - ((__FreeBSD_version >= 1100000) && (__FreeBSD_version < 1100002)) - if (xpt_path_path_id(path) != sc->sassc->sim->path_id) - break; -#endif - - cgd = arg; -#if (__FreeBSD_version < 901503) || \ - ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000006)) - mprsas_check_eedp(sc, path, cgd); -#endif - break; - } + case AC_FOUND_DEVICE: default: break; } } - -#if (__FreeBSD_version < 901503) || \ - ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000006)) -static void -mprsas_check_eedp(struct mpr_softc *sc, struct cam_path *path, - struct ccb_getdev *cgd) -{ - struct mprsas_softc *sassc = sc->sassc; - struct ccb_scsiio *csio; - struct scsi_read_capacity_16 *scsi_cmd; - struct scsi_read_capacity_eedp *rcap_buf; - path_id_t pathid; - target_id_t targetid; - lun_id_t lunid; - union ccb *ccb; - struct cam_path *local_path; - struct mprsas_target *target; - struct mprsas_lun *lun; - uint8_t found_lun; - char path_str[64]; - - pathid = cam_sim_path(sassc->sim); - targetid = xpt_path_target_id(path); - lunid = xpt_path_lun_id(path); - - KASSERT(targetid < sassc->maxtargets, ("Target %d out of bounds in " - "mprsas_check_eedp\n", targetid)); - target = &sassc->targets[targetid]; - if (target->handle == 0x0) - return; - - /* - * Determine if the device is EEDP capable. - * - * If this flag is set in the inquiry data, the device supports - * protection information, and must support the 16 byte read capacity - * command, otherwise continue without sending read cap 16. - */ - if ((cgd->inq_data.spc3_flags & SPC3_SID_PROTECT) == 0) - return; - - /* - * Issue a READ CAPACITY 16 command. This info is used to determine if - * the LUN is formatted for EEDP support. - */ - ccb = xpt_alloc_ccb_nowait(); - if (ccb == NULL) { - mpr_dprint(sc, MPR_ERROR, "Unable to alloc CCB for EEDP " - "support.\n"); - return; - } - - if (xpt_create_path(&local_path, xpt_periph, pathid, targetid, lunid) != - CAM_REQ_CMP) { - mpr_dprint(sc, MPR_ERROR, "Unable to create path for EEDP " - "support.\n"); - xpt_free_ccb(ccb); - return; - } - - /* - * If LUN is already in list, don't create a new one. - */ - found_lun = FALSE; - SLIST_FOREACH(lun, &target->luns, lun_link) { - if (lun->lun_id == lunid) { - found_lun = TRUE; - break; - } - } - if (!found_lun) { - lun = malloc(sizeof(struct mprsas_lun), M_MPR, - M_NOWAIT | M_ZERO); - if (lun == NULL) { - mpr_dprint(sc, MPR_ERROR, "Unable to alloc LUN for " - "EEDP support.\n"); - xpt_free_path(local_path); - xpt_free_ccb(ccb); - return; - } - lun->lun_id = lunid; - SLIST_INSERT_HEAD(&target->luns, lun, lun_link); - } - - xpt_path_string(local_path, path_str, sizeof(path_str)); - mpr_dprint(sc, MPR_INFO, "Sending read cap: path %s handle %d\n", - path_str, target->handle); - - /* - * Issue a READ CAPACITY 16 command for the LUN. The - * mprsas_read_cap_done function will load the read cap info into the - * LUN struct. - */ - rcap_buf = malloc(sizeof(struct scsi_read_capacity_eedp), M_MPR, - M_NOWAIT | M_ZERO); - if (rcap_buf == NULL) { - mpr_dprint(sc, MPR_ERROR, "Unable to alloc read capacity " - "buffer for EEDP support.\n"); - xpt_free_path(ccb->ccb_h.path); - xpt_free_ccb(ccb); - return; - } - xpt_setup_ccb(&ccb->ccb_h, local_path, CAM_PRIORITY_XPT); - csio = &ccb->csio; - csio->ccb_h.func_code = XPT_SCSI_IO; - csio->ccb_h.flags = CAM_DIR_IN; - csio->ccb_h.retry_count = 4; - csio->ccb_h.cbfcnp = mprsas_read_cap_done; - csio->ccb_h.timeout = 60000; - csio->data_ptr = (uint8_t *)rcap_buf; - csio->dxfer_len = sizeof(struct scsi_read_capacity_eedp); - csio->sense_len = MPR_SENSE_LEN; - csio->cdb_len = sizeof(*scsi_cmd); - csio->tag_action = MSG_SIMPLE_Q_TAG; - - scsi_cmd = (struct scsi_read_capacity_16 *)&csio->cdb_io.cdb_bytes; - bzero(scsi_cmd, sizeof(*scsi_cmd)); - scsi_cmd->opcode = 0x9E; - scsi_cmd->service_action = SRC16_SERVICE_ACTION; - ((uint8_t *)scsi_cmd)[13] = sizeof(struct scsi_read_capacity_eedp); - - ccb->ccb_h.ppriv_ptr1 = sassc; - xpt_action(ccb); -} - -static void -mprsas_read_cap_done(struct cam_periph *periph, union ccb *done_ccb) -{ - struct mprsas_softc *sassc; - struct mprsas_target *target; - struct mprsas_lun *lun; - struct scsi_read_capacity_eedp *rcap_buf; - - if (done_ccb == NULL) - return; - - /* Driver need to release devq, it Scsi command is - * generated by driver internally. - * Currently there is a single place where driver - * calls scsi command internally. In future if driver - * calls more scsi command internally, it needs to release - * devq internally, since those command will not go back to - * cam_periph. - */ - if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) ) { - done_ccb->ccb_h.status &= ~CAM_DEV_QFRZN; - xpt_release_devq(done_ccb->ccb_h.path, - /*count*/ 1, /*run_queue*/TRUE); - } - - rcap_buf = (struct scsi_read_capacity_eedp *)done_ccb->csio.data_ptr; - - /* - * Get the LUN ID for the path and look it up in the LUN list for the - * target. - */ - sassc = (struct mprsas_softc *)done_ccb->ccb_h.ppriv_ptr1; - KASSERT(done_ccb->ccb_h.target_id < sassc->maxtargets, ("Target %d out " - "of bounds in mprsas_read_cap_done\n", done_ccb->ccb_h.target_id)); - target = &sassc->targets[done_ccb->ccb_h.target_id]; - SLIST_FOREACH(lun, &target->luns, lun_link) { - if (lun->lun_id != done_ccb->ccb_h.target_lun) - continue; - - /* - * Got the LUN in the target's LUN list. Fill it in with EEDP - * info. If the READ CAP 16 command had some SCSI error (common - * if command is not supported), mark the lun as not supporting - * EEDP and set the block size to 0. - */ - if ((mprsas_get_ccbstatus(done_ccb) != CAM_REQ_CMP) || - (done_ccb->csio.scsi_status != SCSI_STATUS_OK)) { - lun->eedp_formatted = FALSE; - lun->eedp_block_size = 0; - break; - } - - if (rcap_buf->protect & 0x01) { - mpr_dprint(sassc->sc, MPR_INFO, "LUN %d for target ID " - "%d is formatted for EEDP support.\n", - done_ccb->ccb_h.target_lun, - done_ccb->ccb_h.target_id); - lun->eedp_formatted = TRUE; - lun->eedp_block_size = scsi_4btoul(rcap_buf->length); - } - break; - } - - // Finished with this CCB and path. - free(rcap_buf, M_MPR); - xpt_free_path(done_ccb->ccb_h.path); - xpt_free_ccb(done_ccb); -} -#endif /* (__FreeBSD_version < 901503) || \ - ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000006)) */ /* * Set the INRESET flag for this target so that no I/O will be sent to Modified: head/sys/dev/mpr/mpr_sas_lsi.c ============================================================================== --- head/sys/dev/mpr/mpr_sas_lsi.c Wed Feb 26 19:12:36 2020 (r358350) +++ head/sys/dev/mpr/mpr_sas_lsi.c Wed Feb 26 19:15:08 2020 (r358351) @@ -998,11 +998,7 @@ mprsas_add_device(struct mpr_softc *sc, u16 handle, u8 "and connector name (%4s)\n", targ->encl_level, targ->connector_name); } -#if ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000039)) || \ - (__FreeBSD_version < 902502) - if ((sassc->flags & MPRSAS_IN_STARTUP) == 0) -#endif - mprsas_rescan_target(sc, targ); + mprsas_rescan_target(sc, targ); mpr_dprint(sc, MPR_MAPPING, "Target id 0x%x added\n", targ->tid); /* @@ -1379,11 +1375,7 @@ mprsas_add_pcie_device(struct mpr_softc *sc, u16 handl "and connector name (%4s)\n", targ->encl_level, targ->connector_name); } -#if ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000039)) || \ - (__FreeBSD_version < 902502) - if ((sassc->flags & MPRSAS_IN_STARTUP) == 0) -#endif - mprsas_rescan_target(sc, targ); + mprsas_rescan_target(sc, targ); mpr_dprint(sc, MPR_MAPPING, "Target id 0x%x added\n", targ->tid); out: @@ -1433,11 +1425,7 @@ mprsas_volume_add(struct mpr_softc *sc, u16 handle) free(lun, M_MPR); } SLIST_INIT(&targ->luns); -#if ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000039)) || \ - (__FreeBSD_version < 902502) - if ((sassc->flags & MPRSAS_IN_STARTUP) == 0) -#endif - mprsas_rescan_target(sc, targ); + mprsas_rescan_target(sc, targ); mpr_dprint(sc, MPR_MAPPING, "RAID target id %d added (WWID = 0x%jx)\n", targ->tid, wwid); out: Modified: head/sys/dev/mpr/mprvar.h ============================================================================== --- head/sys/dev/mpr/mprvar.h Wed Feb 26 19:12:36 2020 (r358350) +++ head/sys/dev/mpr/mprvar.h Wed Feb 26 19:15:08 2020 (r358351) @@ -909,35 +909,14 @@ int mprsas_send_reset(struct mpr_softc *sc, struct mpr SYSCTL_DECL(_hw_mpr); /* Compatibility shims for different OS versions */ -#if __FreeBSD_version >= 800001 #define mpr_kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) #define mpr_kproc_exit(arg) kproc_exit(arg) -#else -#define mpr_kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mpr_kproc_exit(arg) kthread_exit(arg) -#endif #if defined(CAM_PRIORITY_XPT) #define MPR_PRIORITY_XPT CAM_PRIORITY_XPT #else #define MPR_PRIORITY_XPT 5 -#endif - -#if __FreeBSD_version < 800107 -// Prior to FreeBSD-8.0 scp3_flags was not defined. -#define spc3_flags reserved - -#define SPC3_SID_PROTECT 0x01 -#define SPC3_SID_3PC 0x08 -#define SPC3_SID_TPGS_MASK 0x30 -#define SPC3_SID_TPGS_IMPLICIT 0x10 -#define SPC3_SID_TPGS_EXPLICIT 0x20 -#define SPC3_SID_ACC 0x40 -#define SPC3_SID_SCCS 0x80 - -#define CAM_PRIORITY_NORMAL CAM_PRIORITY_NONE #endif /* Definitions for SCSI unmap translation to NVMe DSM command */ Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Wed Feb 26 19:12:36 2020 (r358350) +++ head/sys/dev/mps/mps_sas.c Wed Feb 26 19:15:08 2020 (r358351) @@ -72,9 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if __FreeBSD_version >= 900026 #include -#endif #include #include @@ -131,21 +129,13 @@ static void mpssas_direct_drive_io(struct mpssas_softc static void mpssas_action_scsiio(struct mpssas_softc *, union ccb *); static void mpssas_scsiio_complete(struct mps_softc *, struct mps_command *); static void mpssas_action_resetdev(struct mpssas_softc *, union ccb *); -#if __FreeBSD_version >= 900026 static void mpssas_smpio_complete(struct mps_softc *sc, struct mps_command *cm); static void mpssas_send_smpcmd(struct mpssas_softc *sassc, union ccb *ccb, uint64_t sasaddr); static void mpssas_action_smpio(struct mpssas_softc *sassc, union ccb *ccb); -#endif //FreeBSD_version >= 900026 static void mpssas_resetdev_complete(struct mps_softc *, struct mps_command *); static void mpssas_async(void *callback_arg, uint32_t code, struct cam_path *path, void *arg); -#if (__FreeBSD_version < 901503) || \ - ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000006)) -static void mpssas_check_eedp(struct mps_softc *sc, struct cam_path *path, - struct ccb_getdev *cgd); -static void mpssas_read_cap_done(struct cam_periph *periph, union ccb *done_ccb); -#endif static int mpssas_send_portenable(struct mps_softc *sc); static void mpssas_portenable_complete(struct mps_softc *sc, struct mps_command *cm); @@ -182,9 +172,7 @@ mpssas_startup_increment(struct mpssas_softc *sassc) /* just starting, freeze the simq */ mps_dprint(sassc->sc, MPS_INIT, "%s freezing simq\n", __func__); -#if __FreeBSD_version >= 1000039 xpt_hold_boot(); -#endif xpt_freeze_simq(sassc->sim, 1); } mps_dprint(sassc->sc, MPS_INIT, "%s refcount %u\n", __func__, @@ -216,11 +204,7 @@ mpssas_startup_decrement(struct mpssas_softc *sassc) "%s releasing simq\n", __func__); sassc->flags &= ~MPSSAS_IN_STARTUP; xpt_release_simq(sassc->sim, 1); -#if __FreeBSD_version >= 1000039 xpt_release_boot(); -#else - mpssas_rescan_target(sassc->sc, NULL); -#endif } mps_dprint(sassc->sc, MPS_INIT, "%s refcount %u\n", __func__, sassc->startup_refcount); @@ -826,12 +810,7 @@ mps_attach_sas(struct mps_softc *sc) } else { int event; -#if (__FreeBSD_version >= 1000006) || \ - ((__FreeBSD_version >= 901503) && (__FreeBSD_version < 1000000)) event = AC_ADVINFO_CHANGED; -#else - event = AC_FOUND_DEVICE; -#endif status = xpt_register_async(event, mpssas_async, sc, sassc->path); if (status != CAM_REQ_CMP) { @@ -976,11 +955,7 @@ mpssas_action(struct cam_sim *sim, union ccb *ccb) cpi->version_num = 1; cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16; cpi->target_sprt = 0; -#if __FreeBSD_version >= 1000039 cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED | PIM_NOSCAN; -#else - cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; -#endif cpi->hba_eng_cnt = 0; cpi->max_target = sassc->maxtargets - 1; cpi->max_lun = 255; @@ -1068,11 +1043,9 @@ mpssas_action(struct cam_sim *sim, union ccb *ccb) case XPT_SCSI_IO: mpssas_action_scsiio(sassc, ccb); return; -#if __FreeBSD_version >= 900026 case XPT_SMP_IO: mpssas_action_smpio(sassc, ccb); return; -#endif default: mpssas_set_ccbstatus(ccb, CAM_FUNC_NOTAVAIL); break; @@ -2710,7 +2683,6 @@ mpssas_direct_drive_io(struct mpssas_softc *sassc, str } } -#if __FreeBSD_version >= 900026 static void mpssas_smpio_complete(struct mps_softc *sc, struct mps_command *cm) { @@ -3081,7 +3053,6 @@ bailout: xpt_done(ccb); } -#endif //__FreeBSD_version >= 900026 static void mpssas_action_resetdev(struct mpssas_softc *sassc, union ccb *ccb) @@ -3199,8 +3170,6 @@ mpssas_async(void *callback_arg, uint32_t code, struct sc = (struct mps_softc *)callback_arg; switch (code) { -#if (__FreeBSD_version >= 1000006) || \ - ((__FreeBSD_version >= 901503) && (__FreeBSD_version < 1000000)) case AC_ADVINFO_CHANGED: { struct mpssas_target *target; struct mpssas_softc *sassc; @@ -3258,12 +3227,7 @@ mpssas_async(void *callback_arg, uint32_t code, struct cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.ccb_h.flags = CAM_DIR_IN; cdai.buftype = CDAI_TYPE_RCAPLONG; -#if (__FreeBSD_version >= 1100061) || \ - ((__FreeBSD_version >= 1001510) && (__FreeBSD_version < 1100000)) cdai.flags = CDAI_FLAG_NONE; -#else - cdai.flags = 0; -#endif cdai.bufsiz = sizeof(rcap_buf); cdai.buf = (uint8_t *)&rcap_buf; xpt_action((union ccb *)&cdai); @@ -3292,224 +3256,10 @@ mpssas_async(void *callback_arg, uint32_t code, struct } break; } -#else - case AC_FOUND_DEVICE: { - struct ccb_getdev *cgd; - - cgd = arg; - mpssas_check_eedp(sc, path, cgd); - break; - } -#endif default: break; } } - -#if (__FreeBSD_version < 901503) || \ - ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000006)) -static void -mpssas_check_eedp(struct mps_softc *sc, struct cam_path *path, - struct ccb_getdev *cgd) -{ - struct mpssas_softc *sassc = sc->sassc; - struct ccb_scsiio *csio; - struct scsi_read_capacity_16 *scsi_cmd; - struct scsi_read_capacity_eedp *rcap_buf; - path_id_t pathid; - target_id_t targetid; - lun_id_t lunid; - union ccb *ccb; - struct cam_path *local_path; - struct mpssas_target *target; - struct mpssas_lun *lun; - uint8_t found_lun; - char path_str[64]; - - sassc = sc->sassc; - pathid = cam_sim_path(sassc->sim); - targetid = xpt_path_target_id(path); - lunid = xpt_path_lun_id(path); - - KASSERT(targetid < sassc->maxtargets, - ("Target %d out of bounds in mpssas_check_eedp\n", - targetid)); - target = &sassc->targets[targetid]; - if (target->handle == 0x0) - return; - - /* - * Determine if the device is EEDP capable. - * - * If this flag is set in the inquiry data, - * the device supports protection information, - * and must support the 16 byte read - * capacity command, otherwise continue without - * sending read cap 16 - */ - if ((cgd->inq_data.spc3_flags & SPC3_SID_PROTECT) == 0) - return; - - /* - * Issue a READ CAPACITY 16 command. This info - * is used to determine if the LUN is formatted - * for EEDP support. - */ - ccb = xpt_alloc_ccb_nowait(); - if (ccb == NULL) { - mps_dprint(sc, MPS_ERROR, "Unable to alloc CCB " - "for EEDP support.\n"); - return; - } - - if (xpt_create_path(&local_path, xpt_periph, - pathid, targetid, lunid) != CAM_REQ_CMP) { - mps_dprint(sc, MPS_ERROR, "Unable to create " - "path for EEDP support\n"); - xpt_free_ccb(ccb); - return; - } - - /* - * If LUN is already in list, don't create a new - * one. - */ - found_lun = FALSE; - SLIST_FOREACH(lun, &target->luns, lun_link) { - if (lun->lun_id == lunid) { - found_lun = TRUE; - break; - } - } - if (!found_lun) { - lun = malloc(sizeof(struct mpssas_lun), M_MPT2, - M_NOWAIT | M_ZERO); - if (lun == NULL) { - mps_dprint(sc, MPS_ERROR, - "Unable to alloc LUN for EEDP support.\n"); - xpt_free_path(local_path); - xpt_free_ccb(ccb); - return; - } - lun->lun_id = lunid; - SLIST_INSERT_HEAD(&target->luns, lun, - lun_link); - } - - xpt_path_string(local_path, path_str, sizeof(path_str)); - - mps_dprint(sc, MPS_INFO, "Sending read cap: path %s handle %d\n", - path_str, target->handle); - - /* - * Issue a READ CAPACITY 16 command for the LUN. - * The mpssas_read_cap_done function will load - * the read cap info into the LUN struct. - */ - rcap_buf = malloc(sizeof(struct scsi_read_capacity_eedp), - M_MPT2, M_NOWAIT | M_ZERO); - if (rcap_buf == NULL) { - mps_dprint(sc, MPS_FAULT, - "Unable to alloc read capacity buffer for EEDP support.\n"); - xpt_free_path(ccb->ccb_h.path); - xpt_free_ccb(ccb); - return; - } - xpt_setup_ccb(&ccb->ccb_h, local_path, CAM_PRIORITY_XPT); - csio = &ccb->csio; - csio->ccb_h.func_code = XPT_SCSI_IO; - csio->ccb_h.flags = CAM_DIR_IN; - csio->ccb_h.retry_count = 4; - csio->ccb_h.cbfcnp = mpssas_read_cap_done; - csio->ccb_h.timeout = 60000; - csio->data_ptr = (uint8_t *)rcap_buf; - csio->dxfer_len = sizeof(struct scsi_read_capacity_eedp); - csio->sense_len = MPS_SENSE_LEN; - csio->cdb_len = sizeof(*scsi_cmd); - csio->tag_action = MSG_SIMPLE_Q_TAG; - - scsi_cmd = (struct scsi_read_capacity_16 *)&csio->cdb_io.cdb_bytes; - bzero(scsi_cmd, sizeof(*scsi_cmd)); - scsi_cmd->opcode = 0x9E; - scsi_cmd->service_action = SRC16_SERVICE_ACTION; - ((uint8_t *)scsi_cmd)[13] = sizeof(struct scsi_read_capacity_eedp); - - ccb->ccb_h.ppriv_ptr1 = sassc; - xpt_action(ccb); -} - -static void -mpssas_read_cap_done(struct cam_periph *periph, union ccb *done_ccb) -{ - struct mpssas_softc *sassc; - struct mpssas_target *target; - struct mpssas_lun *lun; - struct scsi_read_capacity_eedp *rcap_buf; - - if (done_ccb == NULL) - return; - - /* Driver need to release devq, it Scsi command is - * generated by driver internally. - * Currently there is a single place where driver - * calls scsi command internally. In future if driver - * calls more scsi command internally, it needs to release - * devq internally, since those command will not go back to - * cam_periph. - */ - if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) ) { - done_ccb->ccb_h.status &= ~CAM_DEV_QFRZN; - xpt_release_devq(done_ccb->ccb_h.path, - /*count*/ 1, /*run_queue*/TRUE); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Feb 26 19:16:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A30B241937; Wed, 26 Feb 2020 19:16:25 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SQWr4dHRz4S2D; Wed, 26 Feb 2020 19:16:24 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3088646B5; Wed, 26 Feb 2020 19:16:24 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01QJGOmk052554; Wed, 26 Feb 2020 19:16:24 GMT (envelope-from carlavilla@FreeBSD.org) Received: (from carlavilla@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QJGNTq052551; Wed, 26 Feb 2020 19:16:23 GMT (envelope-from carlavilla@FreeBSD.org) Message-Id: <202002261916.01QJGNTq052551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: carlavilla set sender to carlavilla@FreeBSD.org using -f From: Sergio Carlavilla Delgado Date: Wed, 26 Feb 2020 19:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358352 - head/share/man/man3 X-SVN-Group: head X-SVN-Commit-Author: carlavilla X-SVN-Commit-Paths: head/share/man/man3 X-SVN-Commit-Revision: 358352 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 19:16:25 -0000 Author: carlavilla (doc committer) Date: Wed Feb 26 19:16:23 2020 New Revision: 358352 URL: https://svnweb.freebsd.org/changeset/base/358352 Log: Add HISTORY sections to tree(3), stdarg(3) and sigevent(3) Submitted by: gbergling_gmail.com Approved by: bcr@(mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23832 Modified: head/share/man/man3/sigevent.3 head/share/man/man3/stdarg.3 head/share/man/man3/tree.3 Modified: head/share/man/man3/sigevent.3 ============================================================================== --- head/share/man/man3/sigevent.3 Wed Feb 26 19:15:08 2020 (r358351) +++ head/share/man/man3/sigevent.3 Wed Feb 26 19:16:23 2020 (r358352) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2016 +.Dd February 25, 2020 .Dt SIGEVENT 3 .Os .Sh NAME @@ -119,6 +119,11 @@ notifications must link against the .Xr mq_notify 2 , .Xr timer_create 2 , .Xr siginfo 3 +.Sh HISTORY +The +.Va sigevent +structure first appeared in +.Fx 3.3 . .Sh STANDARDS The .Vt struct sigevent Modified: head/share/man/man3/stdarg.3 ============================================================================== --- head/share/man/man3/stdarg.3 Wed Feb 26 19:15:08 2020 (r358351) +++ head/share/man/man3/stdarg.3 Wed Feb 26 19:16:23 2020 (r358352) @@ -32,7 +32,7 @@ .\" @(#)stdarg.3 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd October 25, 2002 +.Dd February 25, 2020 .Dt STDARG 3 .Os .Sh NAME @@ -216,6 +216,18 @@ The and .Fn va_end macros conform to +.St -isoC-99 . +.Sh HISTORY +The +.Fn va_start , +.Fn va_arg +and +.Fn va_end +macros were introduced in +.St -ansiC . +The +.Fn va_copy +macro was introduced in .St -isoC-99 . .Sh BUGS Unlike the Modified: head/share/man/man3/tree.3 ============================================================================== --- head/share/man/man3/tree.3 Wed Feb 26 19:15:08 2020 (r358351) +++ head/share/man/man3/tree.3 Wed Feb 26 19:16:23 2020 (r358352) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 28, 2019 +.Dd February 25, 2020 .Dt TREE 3 .Os .Sh NAME @@ -697,6 +697,9 @@ to indicate an error. .Sh SEE ALSO .Xr arb 3 , .Xr queue 3 +.Sh HISTORY +The tree macros first appeared in +.Fx 4.6 . .Sh AUTHORS The author of the tree macros is .An Niels Provos . From owner-svn-src-head@freebsd.org Wed Feb 26 19:39:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44EA72420C3; Wed, 26 Feb 2020 19:39:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SR2x3ss3z4SfF; Wed, 26 Feb 2020 19:39:53 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1103A4AA8; Wed, 26 Feb 2020 19:39:53 +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 01QJdqd1064788; Wed, 26 Feb 2020 19:39:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QJdq3v064787; Wed, 26 Feb 2020 19:39:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002261939.01QJdq3v064787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 26 Feb 2020 19:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358353 - head/sys/dev/agp X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/agp X-SVN-Commit-Revision: 358353 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 19:39:54 -0000 Author: imp Date: Wed Feb 26 19:39:52 2020 New Revision: 358353 URL: https://svnweb.freebsd.org/changeset/base/358353 Log: Remove support for FreeBSD 4.x and earlier from agp driver Compile tested only, but do we still need this driver? Modified: head/sys/dev/agp/agp_nvidia.c Modified: head/sys/dev/agp/agp_nvidia.c ============================================================================== --- head/sys/dev/agp/agp_nvidia.c Wed Feb 26 19:16:23 2020 (r358352) +++ head/sys/dev/agp/agp_nvidia.c Wed Feb 26 19:39:52 2020 (r358353) @@ -41,15 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include #include - -#if __FreeBSD_version < 500000 -#include "opt_pci.h" -#endif - -#if __FreeBSD_version > 500000 #include #include -#endif #include #include From owner-svn-src-head@freebsd.org Wed Feb 26 19:40:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E10AC2420FE; Wed, 26 Feb 2020 19:40:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SR350Q71z4SvH; Wed, 26 Feb 2020 19:40:00 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C40A4AAD; Wed, 26 Feb 2020 19:40:00 +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 01QJe0e0064892; Wed, 26 Feb 2020 19:40:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QJdxfP064848; Wed, 26 Feb 2020 19:39:59 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002261939.01QJdxfP064848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 26 Feb 2020 19:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358354 - head/sys/dev/aic7xxx X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/aic7xxx X-SVN-Commit-Revision: 358354 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 19:40:02 -0000 Author: imp Date: Wed Feb 26 19:39:59 2020 New Revision: 358354 URL: https://svnweb.freebsd.org/changeset/base/358354 Log: Remove support for FreeBSD 4-7. It's doubtful this driver would still work unchanged there. Compile tested only because I no longer have ahc/ahd devices. Modified: head/sys/dev/aic7xxx/aic79xx_osm.h head/sys/dev/aic7xxx/aic7xxx_osm.h head/sys/dev/aic7xxx/aic_osm_lib.c head/sys/dev/aic7xxx/aic_osm_lib.h Modified: head/sys/dev/aic7xxx/aic79xx_osm.h ============================================================================== --- head/sys/dev/aic7xxx/aic79xx_osm.h Wed Feb 26 19:39:52 2020 (r358353) +++ head/sys/dev/aic7xxx/aic79xx_osm.h Wed Feb 26 19:39:59 2020 (r358354) @@ -43,9 +43,7 @@ #include #include #include /* For device_t */ -#if __FreeBSD_version >= 500000 #include -#endif #include #include #include @@ -60,13 +58,8 @@ #include -#if __FreeBSD_version >= 500000 #include #include -#else -#include -#include -#endif #include #include Modified: head/sys/dev/aic7xxx/aic7xxx_osm.h ============================================================================== --- head/sys/dev/aic7xxx/aic7xxx_osm.h Wed Feb 26 19:39:52 2020 (r358353) +++ head/sys/dev/aic7xxx/aic7xxx_osm.h Wed Feb 26 19:39:59 2020 (r358354) @@ -42,39 +42,22 @@ #include #include #include /* For device_t */ -#if __FreeBSD_version >= 500000 #include -#endif #include #include #include #include #include -#if __FreeBSD_version < 500000 -#include -#else -#define NPCI 1 -#endif - -#if NPCI > 0 #define AIC_PCI_CONFIG 1 -#endif #include #include #include #include -#if NPCI > 0 -#if __FreeBSD_version >= 500000 #include #include -#else -#include -#include -#endif -#endif #include #include Modified: head/sys/dev/aic7xxx/aic_osm_lib.c ============================================================================== --- head/sys/dev/aic7xxx/aic_osm_lib.c Wed Feb 26 19:39:52 2020 (r358353) +++ head/sys/dev/aic7xxx/aic_osm_lib.c Wed Feb 26 19:39:59 2020 (r358354) @@ -128,23 +128,6 @@ aic_recovery_thread(void *arg) void aic_calc_geometry(struct ccb_calc_geometry *ccg, int extended) { -#if __FreeBSD_version >= 500000 cam_calc_geometry(ccg, extended); -#else - uint32_t size_mb; - uint32_t secs_per_cylinder; - - size_mb = ccg->volume_size / ((1024L * 1024L) / ccg->block_size); - if (size_mb > 1024 && extended) { - ccg->heads = 255; - ccg->secs_per_track = 63; - } else { - ccg->heads = 64; - ccg->secs_per_track = 32; - } - secs_per_cylinder = ccg->heads * ccg->secs_per_track; - ccg->cylinders = ccg->volume_size / secs_per_cylinder; - ccg->ccb_h.status = CAM_REQ_CMP; -#endif } Modified: head/sys/dev/aic7xxx/aic_osm_lib.h ============================================================================== --- head/sys/dev/aic7xxx/aic_osm_lib.h Wed Feb 26 19:39:52 2020 (r358353) +++ head/sys/dev/aic7xxx/aic_osm_lib.h Wed Feb 26 19:39:59 2020 (r358354) @@ -36,9 +36,7 @@ */ /******************************** OS Includes *********************************/ -#if __FreeBSD_version >= 500000 #include -#endif /*************************** Library Symbol Mapping ***************************/ #define AIC_LIB_ENTRY_CONCAT(x, prefix) prefix ## x @@ -71,7 +69,6 @@ #define AIC_SHUTDOWN_RECOVERY AIC_CONST_ENTRY(_SHUTDOWN_RECOVERY) /********************************* Byte Order *********************************/ -#if __FreeBSD_version >= 500000 #define aic_htobe16(x) htobe16(x) #define aic_htobe32(x) htobe32(x) #define aic_htobe64(x) htobe64(x) @@ -85,22 +82,7 @@ #define aic_le16toh(x) le16toh(x) #define aic_le32toh(x) le32toh(x) #define aic_le64toh(x) le64toh(x) -#else -#define aic_htobe16(x) (x) -#define aic_htobe32(x) (x) -#define aic_htobe64(x) (x) -#define aic_htole16(x) (x) -#define aic_htole32(x) (x) -#define aic_htole64(x) (x) -#define aic_be16toh(x) (x) -#define aic_be32toh(x) (x) -#define aic_be64toh(x) (x) -#define aic_le16toh(x) (x) -#define aic_le32toh(x) (x) -#define aic_le64toh(x) (x) -#endif - /************************* Forward Declarations *******************************/ typedef device_t aic_dev_softc_t; typedef union ccb *aic_io_ctx_t; @@ -125,22 +107,11 @@ aic_wakeup_recovery_thread(struct aic_softc *aic) } /****************************** Kernel Threads ********************************/ -#if __FreeBSD_version > 500005 -#if __FreeBSD_version > 800001 #define aic_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#else -#define aic_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#endif -#else -#define aic_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, fmtstr, arg) -#endif /******************************* Bus Space/DMA ********************************/ -#if __FreeBSD_version >= 501102 #define aic_dma_tag_create(aic, parent_tag, alignment, boundary, \ lowaddr, highaddr, filter, filterarg, \ maxsize, nsegments, maxsegsz, flags, \ @@ -150,16 +121,6 @@ aic_wakeup_recovery_thread(struct aic_softc *aic) maxsize, nsegments, maxsegsz, flags, \ busdma_lock_mutex, &aic->platform_data->mtx, \ dma_tagp) -#else -#define aic_dma_tag_create(aic, parent_tag, alignment, boundary, \ - lowaddr, highaddr, filter, filterarg, \ - maxsize, nsegments, maxsegsz, flags, \ - dma_tagp) \ - bus_dma_tag_create(parent_tag, alignment, boundary, \ - lowaddr, highaddr, filter, filterarg, \ - maxsize, nsegments, maxsegsz, flags, \ - dma_tagp) -#endif #define aic_dma_tag_destroy(aic, tag) \ bus_dma_tag_destroy(tag) @@ -191,11 +152,7 @@ aic_wakeup_recovery_thread(struct aic_softc *aic) #include AIC_CORE_INCLUDE /***************************** Timer Facilities *******************************/ -#if __FreeBSD_version >= 500000 #define aic_timer_init(timer) callout_init(timer, /*mpsafe*/1) -#else -#define aic_timer_init callout_init -#endif #define aic_timer_stop callout_stop static __inline void aic_timer_reset(aic_timer_t *, u_int, From owner-svn-src-head@freebsd.org Wed Feb 26 20:03:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A3B724355F; Wed, 26 Feb 2020 20:03:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SRZS6MMXz400v; Wed, 26 Feb 2020 20:03:44 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8C2F5016; Wed, 26 Feb 2020 20:03:44 +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 01QK3i8S082764; Wed, 26 Feb 2020 20:03:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QK3iYx082761; Wed, 26 Feb 2020 20:03:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002262003.01QK3iYx082761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 26 Feb 2020 20:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358355 - in head: lib/libc/sys sys/vm X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: lib/libc/sys sys/vm X-SVN-Commit-Revision: 358355 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 20:03:45 -0000 Author: emaste Date: Wed Feb 26 20:03:43 2020 New Revision: 358355 URL: https://svnweb.freebsd.org/changeset/base/358355 Log: Return ENOTSUP for mmap/mprotect if prot not subset of prot_max From POSIX, [ENOTSUP] The implementation does not support the combination of accesses requested in the prot argument. This fits the case that prot contains permissions which are not a subset of prot_max. Reviewed by: brooks, cem Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23843 Modified: head/lib/libc/sys/mmap.2 head/lib/libc/sys/mprotect.2 head/sys/vm/vm_mmap.c Modified: head/lib/libc/sys/mmap.2 ============================================================================== --- head/lib/libc/sys/mmap.2 Wed Feb 26 19:39:59 2020 (r358354) +++ head/lib/libc/sys/mmap.2 Wed Feb 26 20:03:43 2020 (r358355) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd June 20, 2019 +.Dd February 26, 2020 .Dt MMAP 2 .Os .Sh NAME @@ -432,11 +432,6 @@ An invalid value was passed in the .Fa prot argument. .It Bq Er EINVAL -The -.Fa prot -argument contains permissions which are not a subset of the specified -maximum permissions. -.It Bq Er EINVAL An undefined option was set in the .Fa flags argument. @@ -530,6 +525,11 @@ was specified and the argument was not available. .Dv MAP_ANON was specified and insufficient memory was available. +.It Bq Er ENOTSUP +The +.Fa prot +argument contains permissions which are not a subset of the specified +maximum permissions. .El .Sh SEE ALSO .Xr madvise 2 , Modified: head/lib/libc/sys/mprotect.2 ============================================================================== --- head/lib/libc/sys/mprotect.2 Wed Feb 26 19:39:59 2020 (r358354) +++ head/lib/libc/sys/mprotect.2 Wed Feb 26 20:03:43 2020 (r358355) @@ -28,7 +28,7 @@ .\" @(#)mprotect.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 20, 2019 +.Dd February 26, 2020 .Dt MPROTECT 2 .Os .Sh NAME @@ -104,7 +104,7 @@ arguments is not valid. The .Fa prot argument contains unhandled bits. -.It Bq Er EINVAL +.It Bq Er ENOTSUP The .Fa prot argument contains permissions which are not a subset of the specified Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Wed Feb 26 19:39:59 2020 (r358354) +++ head/sys/vm/vm_mmap.c Wed Feb 26 20:03:43 2020 (r358355) @@ -225,7 +225,7 @@ kern_mmap_fpcheck(struct thread *td, uintptr_t addr0, max_prot = PROT_MAX_EXTRACT(prot); prot = PROT_EXTRACT(prot); if (max_prot != 0 && (max_prot & prot) != prot) - return (EINVAL); + return (ENOTSUP); p = td->td_proc; @@ -668,7 +668,7 @@ kern_mprotect(struct thread *td, uintptr_t addr0, size vm_error = KERN_SUCCESS; if (max_prot != 0) { if ((max_prot & prot) != prot) - return (EINVAL); + return (ENOTSUP); vm_error = vm_map_protect(&td->td_proc->p_vmspace->vm_map, addr, addr + size, max_prot, TRUE); } From owner-svn-src-head@freebsd.org Wed Feb 26 20:18:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70E84243A9C; Wed, 26 Feb 2020 20:18:39 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SRvg1C3Yz4QlW; Wed, 26 Feb 2020 20:18:39 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC73C5257; Wed, 26 Feb 2020 20:18:38 +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 01QKIcIL089119; Wed, 26 Feb 2020 20:18:38 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QKIc65089118; Wed, 26 Feb 2020 20:18:38 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202002262018.01QKIc65089118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 26 Feb 2020 20:18:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358356 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358356 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 20:18:39 -0000 Author: cy Date: Wed Feb 26 20:18:38 2020 New Revision: 358356 URL: https://svnweb.freebsd.org/changeset/base/358356 Log: With the planned removal of GIANT (sysctl uses GIANT), make future-proof ipfilter by making it sysctl locking mpsafe. Reviewed by: kaktus Differential Revision: https://reviews.freebsd.org/D23839 Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Wed Feb 26 20:03:43 2020 (r358355) +++ head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Wed Feb 26 20:18:38 2020 (r358356) @@ -84,23 +84,23 @@ static int ipfwrite __P((dev_t, struct uio *, int)); SYSCTL_DECL(_net_inet); #define SYSCTL_IPF(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, \ - CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT | access, \ + CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \ ptr, val, sysctl_ipf_int, "I", descr) #define SYSCTL_DYN_IPF_NAT(parent, nbr, name, access,ptr, val, descr) \ SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ - CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT |access, \ + CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE |access, \ ptr, val, sysctl_ipf_int_nat, "I", descr) #define SYSCTL_DYN_IPF_STATE(parent, nbr, name, access,ptr, val, descr) \ SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ - CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT | access, \ + CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \ ptr, val, sysctl_ipf_int_state, "I", descr) #define SYSCTL_DYN_IPF_FRAG(parent, nbr, name, access,ptr, val, descr) \ SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ - CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT | access, \ + CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \ ptr, val, sysctl_ipf_int_frag, "I", descr) #define SYSCTL_DYN_IPF_AUTH(parent, nbr, name, access,ptr, val, descr) \ SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \ - CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT | access, \ + CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \ ptr, val, sysctl_ipf_int_auth, "I", descr) static struct sysctl_ctx_list ipf_clist; #define CTLFLAG_OFF 0x00800000 /* IPFilter must be disabled */ @@ -343,13 +343,14 @@ sysctl_ipf_int ( SYSCTL_HANDLER_ARGS ) { int error = 0; + WRITE_ENTER(&V_ipfmain.ipf_mutex); if (arg1) error = SYSCTL_OUT(req, arg1, sizeof(int)); else error = SYSCTL_OUT(req, &arg2, sizeof(int)); if (error || !req->newptr) - return (error); + goto sysctl_error; if (!arg1) error = EPERM; @@ -359,6 +360,9 @@ sysctl_ipf_int ( SYSCTL_HANDLER_ARGS ) else error = SYSCTL_IN(req, arg1, sizeof(int)); } + +sysctl_error: + RWLOCK_EXIT(&V_ipfmain.ipf_mutex); return (error); } From owner-svn-src-head@freebsd.org Wed Feb 26 20:38:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4129244172; Wed, 26 Feb 2020 20:38:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SSLx342Jz4JSd; Wed, 26 Feb 2020 20:38:49 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56F7E560D; Wed, 26 Feb 2020 20:38:49 +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 01QKcncU001535; Wed, 26 Feb 2020 20:38:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QKcntE001534; Wed, 26 Feb 2020 20:38:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202002262038.01QKcntE001534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 26 Feb 2020 20:38:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358357 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358357 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 20:38:50 -0000 Author: mav Date: Wed Feb 26 20:38:48 2020 New Revision: 358357 URL: https://svnweb.freebsd.org/changeset/base/358357 Log: MFZoL: Relax restriction on zfs_ioc_next_obj() iteration Per the documentation for dnode_next_offset in dnode.c, the "txg" parameter specifies a lower bound on which transaction the dnode can be found in. We are interested in all dnodes that are removed between the first and last transaction in the snapshot. It doesn't need to be created in that snapshot to correspond to a removed file. In fact, the behavior of zfs diff in the test case exactly matches this: the transaction that created the data that was deleted in snapshot "2" was produced before, in snapshot "1", definitely predating the first transaction in snapshot "2". Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #2081 zfsonlinux/zfs@7290cd3c4ed19fb3f75b8133db2e36afcdd24beb MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Feb 26 20:18:38 2020 (r358356) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Feb 26 20:38:48 2020 (r358357) @@ -5553,8 +5553,7 @@ zfs_ioc_next_obj(zfs_cmd_t *zc) if (error != 0) return (error); - error = dmu_object_next(os, &zc->zc_obj, B_FALSE, - dsl_dataset_phys(os->os_dsl_dataset)->ds_prev_snap_txg); + error = dmu_object_next(os, &zc->zc_obj, B_FALSE, 0); dmu_objset_rele(os, FTAG); return (error); From owner-svn-src-head@freebsd.org Wed Feb 26 21:06:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1484C2451A5; Wed, 26 Feb 2020 21:06:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SSyk6szqz4HXY; Wed, 26 Feb 2020 21:06:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4741AD0D5; Wed, 26 Feb 2020 21:06:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358346 - in head/libexec/rtld-elf: . rtld-libc To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002261849.01QInQxa034434@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Wed, 26 Feb 2020 13:06:20 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <202002261849.01QInQxa034434@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 21:06:23 -0000 On 2/26/20 10:49 AM, Warner Losh wrote: > Author: imp > Date: Wed Feb 26 18:49:25 2020 > New Revision: 358346 > URL: https://svnweb.freebsd.org/changeset/base/358346 > > Log: > Remove sparc64 specific parts of rtld-elf. > > Modified: > head/libexec/rtld-elf/rtld-libc/Makefile.inc > head/libexec/rtld-elf/rtld.c > head/libexec/rtld-elf/rtld_tls.h libexec/rtld-elf/sparc64? -- John Baldwin From owner-svn-src-head@freebsd.org Wed Feb 26 21:56:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3FA71247E8E; Wed, 26 Feb 2020 21:56:01 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SV3z59jnz3xDC; Wed, 26 Feb 2020 21:55:59 +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 01QLtpW1086817 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 26 Feb 2020 13:55:51 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 01QLto6j086816; Wed, 26 Feb 2020 13:55:50 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Wed, 26 Feb 2020 13:55:50 -0800 From: Gleb Smirnoff To: Ravi Pokala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358317 - head/sys/kern Message-ID: <20200226215550.GO5741@FreeBSD.org> References: <202002251911.01PJBLDP091875@repo.freebsd.org> <23A820B4-2E13-4E3E-B734-C7950298C286@panasas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23A820B4-2E13-4E3E-B734-C7950298C286@panasas.com> X-Rspamd-Queue-Id: 48SV3z59jnz3xDC X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.65 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.66)[-0.661,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; NEURAL_HAM_LONG(-0.99)[-0.988,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 21:56:01 -0000 On Tue, Feb 25, 2020 at 12:02:29PM -0800, Ravi Pokala wrote: R> When sendfile_swapin() sweeps through pages in search for a bogus page R> skip first and last pages. This is a micro optimisation. R> R> Yes, but *why* skip the first and last pages? We may have inserted bogus pages in the middle of a request. We never substitute first or last. -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Wed Feb 26 22:47:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A8E0249744 for ; Wed, 26 Feb 2020 22:47:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SWCF2vGYz4Qbt for ; Wed, 26 Feb 2020 22:47:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72b.google.com with SMTP id a2so1240502qko.12 for ; Wed, 26 Feb 2020 14:47:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JM838ER433hEft5Dwx+YZqEvtwjq3YRxTX4KS5XJ0Hw=; b=iSsjaYVK+ZKbJ+N3dZ6j3KRHIaEfFjNuwGyNolm6kBbrAyk2K6eqQLzXldA97NkGcK XT2q7ZIA49JhTESXDmF0191ZJELX6mZck/wIWPbcfHsgw0OTtNAR+RX9h6ZJUubuK9MG 32BfQdJys/G3n6C8GQfjirCdypEg2X+WUcx6sc6fmCCU+FHFrX/hEwCC/IDH6IglSNI9 H+HPRgmSRXtRtxvsYJiPN4rfS9NjNCy7jdcOi6iT8a53Qik4mYmHjydurjLJ28GYKHRQ kenyJAJfhueMZCV/92RTAB0b5h4SXzsM3Jvni7TmuyIsfwDL/1TLT2pZHCGT8HOiYcAC sRwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JM838ER433hEft5Dwx+YZqEvtwjq3YRxTX4KS5XJ0Hw=; b=akwlEi3Y6YHvs0Flj76oZZLDsytyTFC6Ov3ASGuJ2d9u9UmAsv5tQM+f+KE3zh/Lem bgFi6EsUawKMReEoM1frBQ6LDVJ6/8HWgxnECzr85ftJOOOsSnlcZ6H5rut5xkOVIRBT 6zC/MIKHygPh7geEG1gvj6H+8bPkkE3C8OMLvS9hHdIiR8feVmcqsUkHewbVG7d+jO1w 5XVaFvaqgn/U65J3gc03XvU1QDB/HT6l+ZmNnhwfCR3U7GSx/ECyc3nRgHwJYSlVzjxk +moxz3PnHvmKahV1I/ZCwN3kkr815fTPIqjW34rnZYCB/2cMS5AYtShfdpAq0lFGqaOW bMKg== X-Gm-Message-State: APjAAAUwaUJlMaajxSTzIdeZIMDFnccdSRznofHMjUfrDsebrW61d3DQ IaA9mSYEJhwuKsKoPBOlez8fWyq29ly3ND3DGXpNYw== X-Google-Smtp-Source: APXvYqz0J43NfeoIq+0nF0GuP/Mwe0ufHJumT4l0RBK+L3W1mOkxP7u95QMY2OH+RrvURh+0ZYbJ75cReo3VJ9CjMYM= X-Received: by 2002:a37:993:: with SMTP id 141mr1668704qkj.240.1582757239563; Wed, 26 Feb 2020 14:47:19 -0800 (PST) MIME-Version: 1.0 References: <202002261855.01QIt9Ip040234@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 26 Feb 2020 15:47:08 -0700 Message-ID: Subject: Re: svn commit: r358348 - in head/lib/libc: . gdtoa gen sparc64 sparc64/fpu sparc64/gen sparc64/sys sys To: "Bjoern A. Zeeb" Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48SWCF2vGYz4Qbt X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=iSsjaYVK; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72b) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.59 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[b.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.59)[ip: (-9.33), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 22:47:22 -0000 On Wed, Feb 26, 2020 at 12:10 PM Bjoern A. Zeeb < bzeeb-lists@lists.zabbadoz.net> wrote: > On 26 Feb 2020, at 18:55, Warner Losh wrote: > > > Author: imp > > Date: Wed Feb 26 18:55:09 2020 > > New Revision: 358348 > > URL: https://svnweb.freebsd.org/changeset/base/358348 > > > > Log: > > Remove sparc64 specific parts of libc. > > I have a silly question for which it=E2=80=99s long been too late, but fo= r the > next time .. why do we need a gazillion of commits to remove sparc64 > rather than 1 =E2=80=9Catomic=E2=80=9D one (or maybe 2 in case the one mi= ssed a bit) > to remove it all (which would also allow other people to bring it back > into private trees a lot more easily compared to tracking changes over > weeks)? > One atomic commit is harder and more work for me. It's hard to get all the details right before pushing it. It's hard to develop it as other things in the tree change things which leads to more conflicts. It can be hard to MFC around (though these changes won't be MFC'd having too large a commit around them may generate more conflicts when those things are MFC'd). So I optimized for my convenience, not others wishing to import it into their trees. But I'd contend that the delta as far as bringing back as 10 commits isn't onerous for such a niche demand. We don't remove entire architectures often, and we usually do because they work poorly at best. Warner From owner-svn-src-head@freebsd.org Wed Feb 26 23:09:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D652D249DCD for ; Wed, 26 Feb 2020 23:09:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SWhd5VLvz49Lk for ; Wed, 26 Feb 2020 23:09:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x836.google.com with SMTP id i14so856360qtv.13 for ; Wed, 26 Feb 2020 15:09:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/cjkW0WPkrMPfdnRXH+HTNuIQQOflEnJKhBDMRdmTRk=; b=wjwGO5wGSv6FOuyq5HcsYYKYkgyhE1eS0D2pWXhERPotBiSx7KGAX5l+5jxsWgsnwB YCD5NF7AmTM5QDPH89T2+NsMeAQUwKrDfeAme+ELJs0wHulGLcTxD9hEpY61up5D0pM9 E5QGjmxtN3tUMjS1lDQ04fBmh8RkfqNhuEVqeumTVf9Dbxm1f+5fmd58GdR3ITRZ70k7 bJNUjGK1237845cR+1HIafvNl3YX4nVqLU/ikDGTi41SSGIzgyttlkCrtUJdNtJ20U7N k87viu7qRzxN+FUlKFJDQ0CDSIJPVlFIJwOALUOtZZ1emD3/3HbjoWM2IbMPGjriJLrL n/wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/cjkW0WPkrMPfdnRXH+HTNuIQQOflEnJKhBDMRdmTRk=; b=BLSQfkLrYQACfwgo440L7Pg6AbXOOA5S+f08cDXuy3m09Am5kGNDGV8ps6GoXzUAd6 KCCgGt9L4DBvuqjrxFVj3HAj3WXgwzUCXUZPtmXkV0vleWLTpEyg/449D2J1gTkR+t6z 88LbcA9Gq5N4fkxXXjxbA7sEcv53pxm4VZ1bERO+lp5XJ8jntCbXRAMM3sg7q/K1yopH KNxNKCo3jM0erds6u61M7MIP91dJE8T/UtHFUj/0FjkqfE9FAMWUhrGba2YIEcn0NK8L mKGVAzK0VaVc5CHfgAGbv40jgP9p5XcdNTM2eTB7RsT9syZiAy89wuk3XL6alQ5ziVEY lEmw== X-Gm-Message-State: APjAAAUrCSpzQbQx6Emb4TCeGqKreDx35fmq03xAy9r5S+ZyoTNNcGTG HdYslpRlXhmAhzdsybxeI3ybi163G893JFn40iBWmA== X-Google-Smtp-Source: APXvYqwlWQm9cBXvqKjyBx1GMb6VBIsCPXArYO+BsPdj8CZUBmoO+hvB19G3hur+a5FR/OZTFfvD/NxLa3YKpx3dCXI= X-Received: by 2002:aed:3e6d:: with SMTP id m42mr1411876qtf.187.1582758560300; Wed, 26 Feb 2020 15:09:20 -0800 (PST) MIME-Version: 1.0 References: <202002261855.01QIt9Ip040234@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 26 Feb 2020 16:09:09 -0700 Message-ID: Subject: Re: svn commit: r358348 - in head/lib/libc: . gdtoa gen sparc64 sparc64/fpu sparc64/gen sparc64/sys sys To: "Bjoern A. Zeeb" Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48SWhd5VLvz49Lk X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=wjwGO5wG; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::836) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.55 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[6.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.55)[ip: (-9.13), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 23:09:22 -0000 On Wed, Feb 26, 2020 at 3:47 PM Warner Losh wrote: > > > On Wed, Feb 26, 2020 at 12:10 PM Bjoern A. Zeeb < > bzeeb-lists@lists.zabbadoz.net> wrote: > >> On 26 Feb 2020, at 18:55, Warner Losh wrote: >> >> > Author: imp >> > Date: Wed Feb 26 18:55:09 2020 >> > New Revision: 358348 >> > URL: https://svnweb.freebsd.org/changeset/base/358348 >> > >> > Log: >> > Remove sparc64 specific parts of libc. >> >> I have a silly question for which it=E2=80=99s long been too late, but f= or the >> next time .. why do we need a gazillion of commits to remove sparc64 >> rather than 1 =E2=80=9Catomic=E2=80=9D one (or maybe 2 in case the one m= issed a bit) >> to remove it all (which would also allow other people to bring it back >> into private trees a lot more easily compared to tracking changes over >> weeks)? >> > > One atomic commit is harder and more work for me. > > It's hard to get all the details right before pushing it. It's hard to > develop it as other things in the tree change things which leads to more > conflicts. It can be hard to MFC around (though these changes won't be > MFC'd having too large a commit around them may generate more conflicts > when those things are MFC'd). So I optimized for my convenience, not othe= rs > wishing to import it into their trees. But I'd contend that the delta as > far as bringing back as 10 commits isn't onerous for such a niche demand. > Also, if I screw something up, it's easier to back out smaller commits should that be necessary. Backing out huge commits that remove lots of things and then reapplying them is tedious and error-prone. Doing it a little at a time also allows me to make sure that all the CI stuff works before moving on to the next step. > We don't remove entire architectures often, and we usually do because the= y > work poorly at best. > > Warner > From owner-svn-src-head@freebsd.org Wed Feb 26 23:12:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 876DB24A2E6; Wed, 26 Feb 2020 23:12:37 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SWmP1q64z4HZF; Wed, 26 Feb 2020 23:12:37 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [172.17.133.228] (unknown [12.202.168.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 8F393E026; Wed, 26 Feb 2020 23:12:36 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.22.0.200209 Date: Wed, 26 Feb 2020 15:12:32 -0800 Subject: Re: svn commit: r358317 - head/sys/kern From: Ravi Pokala To: Gleb Smirnoff CC: , , Message-ID: Thread-Topic: svn commit: r358317 - head/sys/kern References: <202002251911.01PJBLDP091875@repo.freebsd.org> <23A820B4-2E13-4E3E-B734-C7950298C286@panasas.com> <20200226215550.GO5741@FreeBSD.org> In-Reply-To: <20200226215550.GO5741@FreeBSD.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 23:12:37 -0000 -----Original Message----- From: Gleb Smirnoff Date: 2020-02-26, Wednesday at 13:55 To: Ravi Pokala Cc: , , Subject: Re: svn commit: r358317 - head/sys/kern On Tue, Feb 25, 2020 at 12:02:29PM -0800, Ravi Pokala wrote: R> When sendfile_swapin() sweeps through pages in search for a bogus page R> skip first and last pages. This is a micro optimisation. R> R> Yes, but *why* skip the first and last pages? We may have inserted bogus pages in the middle of a request. We never substitute first or last. -- Gleb Smirnoff Oh god, "bogus_page" -- Panasas had to jump through a bunch of hoops involving bogus_page and our RAIDing-across-sectors GEOM class years ago. -Ravi (rpokala@) From owner-svn-src-head@freebsd.org Wed Feb 26 23:17:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B090524A5D9; Wed, 26 Feb 2020 23:17:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SWsn3VSGz4STj; Wed, 26 Feb 2020 23:17:17 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24A23749F; Wed, 26 Feb 2020 23:17:17 +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 01QNHGtV003733; Wed, 26 Feb 2020 23:17:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01QNHGlX003732; Wed, 26 Feb 2020 23:17:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002262317.01QNHGlX003732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 26 Feb 2020 23:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358358 - head/libexec/rtld-elf/sparc64 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/libexec/rtld-elf/sparc64 X-SVN-Commit-Revision: 358358 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 23:17:17 -0000 Author: imp Date: Wed Feb 26 23:17:16 2020 New Revision: 358358 URL: https://svnweb.freebsd.org/changeset/base/358358 Log: Remove sparc64 source files from rtld-elf These were missed in the prior sweep. Submitted by: jhb@ Deleted: head/libexec/rtld-elf/sparc64/ From owner-svn-src-head@freebsd.org Thu Feb 27 02:37:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 54782250C23; Thu, 27 Feb 2020 02:37:28 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ScJm1RR7z4Ds1; Thu, 27 Feb 2020 02:37:28 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E29DF9A47; Thu, 27 Feb 2020 02:37:27 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01R2bRhn023801; Thu, 27 Feb 2020 02:37:27 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01R2bRLJ023799; Thu, 27 Feb 2020 02:37:27 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202002270237.01R2bRLJ023799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Thu, 27 Feb 2020 02:37:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358363 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358363 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 02:37:28 -0000 Author: jeff Date: Thu Feb 27 02:37:27 2020 New Revision: 358363 URL: https://svnweb.freebsd.org/changeset/base/358363 Log: Add unlocked grab* function variants that use lockless radix code to lookup pages. These variants will fall back to their locked counterparts if the page is not present. Discussed with: kib, markj Differential Revision: https://reviews.freebsd.org/D23449 Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Feb 27 00:57:36 2020 (r358362) +++ head/sys/vm/vm_page.c Thu Feb 27 02:37:27 2020 (r358363) @@ -830,47 +830,39 @@ vm_page_reference(vm_page_t m) vm_page_aflag_set(m, PGA_REFERENCED); } +/* + * vm_page_trybusy + * + * Helper routine for grab functions to trylock busy. + * + * Returns true on success and false on failure. + */ static bool -vm_page_acquire_flags(vm_page_t m, int allocflags) +vm_page_trybusy(vm_page_t m, int allocflags) { - bool locked; if ((allocflags & (VM_ALLOC_SBUSY | VM_ALLOC_IGN_SBUSY)) != 0) - locked = vm_page_trysbusy(m); + return (vm_page_trysbusy(m)); else - locked = vm_page_tryxbusy(m); - if (locked && (allocflags & VM_ALLOC_WIRED) != 0) - vm_page_wire(m); - return (locked); + return (vm_page_tryxbusy(m)); } /* - * vm_page_busy_sleep_flags + * vm_page_tryacquire * - * Sleep for busy according to VM_ALLOC_ parameters. Returns true - * if the caller should retry and false otherwise. + * Helper routine for grab functions to trylock busy and wire. + * + * Returns true on success and false on failure. */ -static bool -vm_page_busy_sleep_flags(vm_object_t object, vm_page_t m, const char *wmesg, - int allocflags) +static inline bool +vm_page_tryacquire(vm_page_t m, int allocflags) { + bool locked; - if ((allocflags & VM_ALLOC_NOWAIT) != 0) - return (false); - - /* - * Reference the page before unlocking and sleeping so that - * the page daemon is less likely to reclaim it. - */ - if ((allocflags & VM_ALLOC_NOCREAT) == 0) - vm_page_reference(m); - - if (_vm_page_busy_sleep(object, m, m->pindex, wmesg, allocflags, true)) - VM_OBJECT_WLOCK(object); - if ((allocflags & VM_ALLOC_WAITFAIL) != 0) - return (false); - - return (true); + locked = vm_page_trybusy(m, allocflags); + if (locked && (allocflags & VM_ALLOC_WIRED) != 0) + vm_page_wire(m); + return (locked); } /* @@ -894,7 +886,7 @@ vm_page_busy_acquire(vm_page_t m, int allocflags) */ obj = m->object; for (;;) { - if (vm_page_acquire_flags(m, allocflags)) + if (vm_page_tryacquire(m, allocflags)) return (true); if ((allocflags & VM_ALLOC_NOWAIT) != 0) return (false); @@ -1604,6 +1596,7 @@ vm_page_object_remove(vm_page_t m) if ((m->a.flags & PGA_SWAP_FREE) != 0) vm_pager_page_unswapped(m); + m->object = NULL; mrem = vm_radix_remove(&object->rtree, m->pindex); KASSERT(mrem == m, ("removed page %p, expected page %p", mrem, m)); @@ -1658,7 +1651,6 @@ vm_page_remove_xbusy(vm_page_t m) { vm_page_object_remove(m); - m->object = NULL; return (vm_page_drop(m, VPRC_OBJREF) == VPRC_OBJREF); } @@ -1679,6 +1671,38 @@ vm_page_lookup(vm_object_t object, vm_pindex_t pindex) } /* + * This should only be used by lockless functions for releasing transient + * incorrect acquires. The page may have been freed after we acquired a + * busy lock. In this case busy_lock == VPB_FREED and we have nothing + * further to do. + */ +static void +vm_page_busy_release(vm_page_t m) +{ + u_int x; + + x = atomic_load_int(&m->busy_lock); + for (;;) { + if (x == VPB_FREED) + break; + if ((x & VPB_BIT_SHARED) != 0 && VPB_SHARERS(x) > 1) { + if (atomic_fcmpset_int(&m->busy_lock, &x, + x - VPB_ONE_SHARER)) + break; + continue; + } + KASSERT((x & VPB_BIT_SHARED) != 0 || + (x & ~VPB_BIT_WAITERS) == VPB_CURTHREAD_EXCLUSIVE, + ("vm_page_busy_release: %p xbusy not owned.", m)); + if (!atomic_fcmpset_rel_int(&m->busy_lock, &x, VPB_UNBUSIED)) + continue; + if ((x & VPB_BIT_WAITERS) != 0) + wakeup(m); + break; + } +} + +/* * vm_page_find_least: * * Returns the page associated with the object with least pindex @@ -3688,7 +3712,6 @@ vm_page_free_prep(vm_page_t m) ("vm_page_free_prep: page %p has unexpected ref_count %u", m, m->ref_count)); vm_page_object_remove(m); - m->object = NULL; m->ref_count -= VPRC_OBJREF; } else vm_page_assert_unbusied(m); @@ -4245,18 +4268,81 @@ vm_page_advise(vm_page_t m, int advice) vm_page_launder(m); } -static inline int -vm_page_grab_pflags(int allocflags) +/* + * vm_page_grab_release + * + * Helper routine for grab functions to release busy on return. + */ +static inline void +vm_page_grab_release(vm_page_t m, int allocflags) { - int pflags; + if ((allocflags & VM_ALLOC_NOBUSY) != 0) { + if ((allocflags & VM_ALLOC_IGN_SBUSY) != 0) + vm_page_sunbusy(m); + else + vm_page_xunbusy(m); + } +} + +/* + * vm_page_grab_sleep + * + * Sleep for busy according to VM_ALLOC_ parameters. Returns true + * if the caller should retry and false otherwise. + * + * If the object is locked on entry the object will be unlocked with + * false returns and still locked but possibly having been dropped + * with true returns. + */ +static bool +vm_page_grab_sleep(vm_object_t object, vm_page_t m, vm_pindex_t pindex, + const char *wmesg, int allocflags, bool locked) +{ + + if ((allocflags & VM_ALLOC_NOWAIT) != 0) + return (false); + + /* + * Reference the page before unlocking and sleeping so that + * the page daemon is less likely to reclaim it. + */ + if (locked && (allocflags & VM_ALLOC_NOCREAT) == 0) + vm_page_reference(m); + + if (_vm_page_busy_sleep(object, m, m->pindex, wmesg, allocflags, + locked) && locked) + VM_OBJECT_WLOCK(object); + if ((allocflags & VM_ALLOC_WAITFAIL) != 0) + return (false); + + return (true); +} + +/* + * Assert that the grab flags are valid. + */ +static inline void +vm_page_grab_check(int allocflags) +{ + KASSERT((allocflags & VM_ALLOC_NOBUSY) == 0 || (allocflags & VM_ALLOC_WIRED) != 0, - ("vm_page_grab_pflags: the pages must be busied or wired")); + ("vm_page_grab*: the pages must be busied or wired")); + KASSERT((allocflags & VM_ALLOC_SBUSY) == 0 || (allocflags & VM_ALLOC_IGN_SBUSY) != 0, - ("vm_page_grab_pflags: VM_ALLOC_SBUSY/VM_ALLOC_IGN_SBUSY " - "mismatch")); + ("vm_page_grab*: VM_ALLOC_SBUSY/VM_ALLOC_IGN_SBUSY mismatch")); +} + +/* + * Calculate the page allocation flags for grab. + */ +static inline int +vm_page_grab_pflags(int allocflags) +{ + int pflags; + pflags = allocflags & ~(VM_ALLOC_NOWAIT | VM_ALLOC_WAITOK | VM_ALLOC_WAITFAIL | VM_ALLOC_NOBUSY); @@ -4283,15 +4369,15 @@ vm_page_t vm_page_grab(vm_object_t object, vm_pindex_t pindex, int allocflags) { vm_page_t m; - int pflags; VM_OBJECT_ASSERT_WLOCKED(object); - pflags = vm_page_grab_pflags(allocflags); + vm_page_grab_check(allocflags); + retrylookup: if ((m = vm_page_lookup(object, pindex)) != NULL) { - if (!vm_page_acquire_flags(m, allocflags)) { - if (vm_page_busy_sleep_flags(object, m, "pgrbwt", - allocflags)) + if (!vm_page_tryacquire(m, allocflags)) { + if (vm_page_grab_sleep(object, m, pindex, "pgrbwt", + allocflags, true)) goto retrylookup; return (NULL); } @@ -4299,7 +4385,7 @@ retrylookup: } if ((allocflags & VM_ALLOC_NOCREAT) != 0) return (NULL); - m = vm_page_alloc(object, pindex, pflags); + m = vm_page_alloc(object, pindex, vm_page_grab_pflags(allocflags)); if (m == NULL) { if ((allocflags & (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL)) != 0) return (NULL); @@ -4309,12 +4395,104 @@ retrylookup: pmap_zero_page(m); out: - if ((allocflags & VM_ALLOC_NOBUSY) != 0) { - if ((allocflags & VM_ALLOC_IGN_SBUSY) != 0) - vm_page_sunbusy(m); - else - vm_page_xunbusy(m); + vm_page_grab_release(m, allocflags); + + return (m); +} + +/* + * Locklessly attempt to acquire a page given a (object, pindex) tuple + * and an optional previous page to avoid the radix lookup. The resulting + * page will be validated against the identity tuple and busied or wired + * as requested. A NULL *mp return guarantees that the page was not in + * radix at the time of the call but callers must perform higher level + * synchronization or retry the operation under a lock if they require + * an atomic answer. This is the only lock free validation routine, + * other routines can depend on the resulting page state. + * + * The return value indicates whether the operation failed due to caller + * flags. The return is tri-state with mp: + * + * (true, *mp != NULL) - The operation was successful. + * (true, *mp == NULL) - The page was not found in tree. + * (false, *mp == NULL) - WAITFAIL or NOWAIT prevented acquisition. + */ +static bool +vm_page_acquire_unlocked(vm_object_t object, vm_pindex_t pindex, + vm_page_t prev, vm_page_t *mp, int allocflags) +{ + vm_page_t m; + + vm_page_grab_check(allocflags); + MPASS(prev == NULL || vm_page_busied(prev) || vm_page_wired(prev)); + + *mp = NULL; + for (;;) { + /* + * We may see a false NULL here because the previous page + * has been removed or just inserted and the list is loaded + * without barriers. Switch to radix to verify. + */ + if (prev == NULL || (m = TAILQ_NEXT(prev, listq)) == NULL || + m->pindex != pindex || + atomic_load_ptr(&m->object) != object) { + prev = NULL; + /* + * This guarantees the result is instantaneously + * correct. + */ + m = vm_radix_lookup_unlocked(&object->rtree, pindex); + } + if (m == NULL) + return (true); + if (vm_page_trybusy(m, allocflags)) { + if (m->object == object && m->pindex == pindex) + break; + /* relookup. */ + vm_page_busy_release(m); + cpu_spinwait(); + continue; + } + if (!vm_page_grab_sleep(object, m, pindex, "pgnslp", + allocflags, false)) + return (false); } + if ((allocflags & VM_ALLOC_WIRED) != 0) + vm_page_wire(m); + vm_page_grab_release(m, allocflags); + *mp = m; + return (true); +} + +/* + * Try to locklessly grab a page and fall back to the object lock if NOCREAT + * is not set. + */ +vm_page_t +vm_page_grab_unlocked(vm_object_t object, vm_pindex_t pindex, int allocflags) +{ + vm_page_t m; + + vm_page_grab_check(allocflags); + + if (!vm_page_acquire_unlocked(object, pindex, NULL, &m, allocflags)) + return (NULL); + if (m != NULL) + return (m); + + /* + * The radix lockless lookup should never return a false negative + * errors. If the user specifies NOCREAT they are guaranteed there + * was no page present at the instant of the call. A NOCREAT caller + * must handle create races gracefully. + */ + if ((allocflags & VM_ALLOC_NOCREAT) != 0) + return (NULL); + + VM_OBJECT_WLOCK(object); + m = vm_page_grab(object, pindex, allocflags); + VM_OBJECT_WUNLOCK(object); + return (m); } @@ -4330,7 +4508,6 @@ vm_page_grab_valid(vm_page_t *mp, vm_object_t object, { vm_page_t m; vm_page_t ma[VM_INITIAL_PAGEIN]; - bool sleep, xbusy; int after, i, pflags, rv; KASSERT((allocflags & VM_ALLOC_SBUSY) == 0 || @@ -4344,7 +4521,6 @@ vm_page_grab_valid(vm_page_t *mp, vm_object_t object, pflags |= VM_ALLOC_WAITFAIL; retrylookup: - xbusy = false; if ((m = vm_page_lookup(object, pindex)) != NULL) { /* * If the page is fully valid it can only become invalid @@ -4355,41 +4531,27 @@ retrylookup: * However, we will not end up with an invalid page and a * shared lock. */ - if (!vm_page_all_valid(m) || - (allocflags & (VM_ALLOC_IGN_SBUSY | VM_ALLOC_SBUSY)) == 0) { - sleep = !vm_page_tryxbusy(m); - xbusy = true; - } else - sleep = !vm_page_trysbusy(m); - if (sleep) { - (void)vm_page_busy_sleep_flags(object, m, "pgrbwt", - allocflags); + if (!vm_page_trybusy(m, + vm_page_all_valid(m) ? allocflags : 0)) { + (void)vm_page_grab_sleep(object, m, pindex, "pgrbwt", + allocflags, true); goto retrylookup; } - if ((allocflags & VM_ALLOC_NOCREAT) != 0 && - !vm_page_all_valid(m)) { - if (xbusy) - vm_page_xunbusy(m); - else - vm_page_sunbusy(m); + if (vm_page_all_valid(m)) + goto out; + if ((allocflags & VM_ALLOC_NOCREAT) != 0) { + vm_page_busy_release(m); *mp = NULL; return (VM_PAGER_FAIL); } - if ((allocflags & VM_ALLOC_WIRED) != 0) - vm_page_wire(m); - if (vm_page_all_valid(m)) - goto out; } else if ((allocflags & VM_ALLOC_NOCREAT) != 0) { *mp = NULL; return (VM_PAGER_FAIL); - } else if ((m = vm_page_alloc(object, pindex, pflags)) != NULL) { - xbusy = true; - } else { + } else if ((m = vm_page_alloc(object, pindex, pflags)) == NULL) { goto retrylookup; } vm_page_assert_xbusied(m); - MPASS(xbusy); if (vm_pager_has_page(object, pindex, NULL, &after)) { after = MIN(after, VM_INITIAL_PAGEIN); after = MIN(after, allocflags >> VM_ALLOC_COUNT_SHIFT); @@ -4415,8 +4577,6 @@ retrylookup: /* Pager may have replaced a page. */ m = ma[0]; if (rv != VM_PAGER_OK) { - if ((allocflags & VM_ALLOC_WIRED) != 0) - vm_page_unwire_noq(m); for (i = 0; i < after; i++) { if (!vm_page_wired(ma[i])) vm_page_free(ma[i]); @@ -4433,19 +4593,60 @@ retrylookup: vm_page_zero_invalid(m, TRUE); } out: - if ((allocflags & VM_ALLOC_NOBUSY) != 0) { - if (xbusy) - vm_page_xunbusy(m); - else - vm_page_sunbusy(m); - } - if ((allocflags & VM_ALLOC_SBUSY) != 0 && xbusy) + if ((allocflags & VM_ALLOC_WIRED) != 0) + vm_page_wire(m); + if ((allocflags & VM_ALLOC_SBUSY) != 0 && vm_page_xbusied(m)) vm_page_busy_downgrade(m); + else if ((allocflags & VM_ALLOC_NOBUSY) != 0) + vm_page_busy_release(m); *mp = m; return (VM_PAGER_OK); } /* + * Locklessly grab a valid page. If the page is not valid or not yet + * allocated this will fall back to the object lock method. + */ +int +vm_page_grab_valid_unlocked(vm_page_t *mp, vm_object_t object, + vm_pindex_t pindex, int allocflags) +{ + vm_page_t m; + int flags; + int error; + + KASSERT((allocflags & VM_ALLOC_SBUSY) == 0 || + (allocflags & VM_ALLOC_IGN_SBUSY) != 0, + ("vm_page_grab_valid_unlocked: VM_ALLOC_SBUSY/VM_ALLOC_IGN_SBUSY " + "mismatch")); + KASSERT((allocflags & + (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL | VM_ALLOC_ZERO)) == 0, + ("vm_page_grab_valid_unlocked: Invalid flags 0x%X", allocflags)); + + /* + * Attempt a lockless lookup and busy. We need at least an sbusy + * before we can inspect the valid field and return a wired page. + */ + flags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_WIRED); + if (!vm_page_acquire_unlocked(object, pindex, NULL, mp, flags)) + return (VM_PAGER_FAIL); + if ((m = *mp) != NULL) { + if (vm_page_all_valid(m)) { + if ((allocflags & VM_ALLOC_WIRED) != 0) + vm_page_wire(m); + vm_page_grab_release(m, allocflags); + return (VM_PAGER_OK); + } + vm_page_busy_release(m); + } + VM_OBJECT_WLOCK(object); + error = vm_page_grab_valid(mp, object, pindex, allocflags); + VM_OBJECT_WUNLOCK(object); + + return (error); +} + +/* * Return the specified range of pages from the given object. For each * page offset within the range, if a page already exists within the object * at that offset and it is busy, then wait for it to change state. If, @@ -4482,6 +4683,7 @@ vm_page_grab_pages(vm_object_t object, vm_pindex_t pin VM_OBJECT_ASSERT_WLOCKED(object); KASSERT(((u_int)allocflags >> VM_ALLOC_COUNT_SHIFT) == 0, ("vm_page_grap_pages: VM_ALLOC_COUNT() is not allowed")); + vm_page_grab_check(allocflags); pflags = vm_page_grab_pflags(allocflags); if (count == 0) @@ -4497,9 +4699,9 @@ retrylookup: mpred = TAILQ_PREV(m, pglist, listq); for (; i < count; i++) { if (m != NULL) { - if (!vm_page_acquire_flags(m, allocflags)) { - if (vm_page_busy_sleep_flags(object, m, - "grbmaw", allocflags)) + if (!vm_page_tryacquire(m, allocflags)) { + if (vm_page_grab_sleep(object, m, pindex, + "grbmaw", allocflags, true)) goto retrylookup; break; } @@ -4521,15 +4723,54 @@ retrylookup: pmap_zero_page(m); vm_page_valid(m); } - if ((allocflags & VM_ALLOC_NOBUSY) != 0) { - if ((allocflags & VM_ALLOC_IGN_SBUSY) != 0) - vm_page_sunbusy(m); - else - vm_page_xunbusy(m); - } + vm_page_grab_release(m, allocflags); ma[i] = mpred = m; m = vm_page_next(m); } + return (i); +} + +/* + * Unlocked variant of vm_page_grab_pages(). This accepts the same flags + * and will fall back to the locked variant to handle allocation. + */ +int +vm_page_grab_pages_unlocked(vm_object_t object, vm_pindex_t pindex, + int allocflags, vm_page_t *ma, int count) +{ + vm_page_t m, pred; + int flags; + int i; + + vm_page_grab_check(allocflags); + + /* + * Modify flags for lockless acquire to hold the page until we + * set it valid if necessary. + */ + flags = allocflags & ~VM_ALLOC_NOBUSY; + pred = NULL; + for (i = 0; i < count; i++, pindex++) { + if (!vm_page_acquire_unlocked(object, pindex, pred, &m, flags)) + return (i); + if (m == NULL) + break; + if ((flags & VM_ALLOC_ZERO) != 0 && vm_page_none_valid(m)) { + if ((m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + vm_page_valid(m); + } + /* m will still be wired or busy according to flags. */ + vm_page_grab_release(m, allocflags); + pred = ma[i] = m; + } + if ((allocflags & VM_ALLOC_NOCREAT) != 0) + return (i); + count -= i; + VM_OBJECT_WLOCK(object); + i += vm_page_grab_pages(object, pindex, allocflags, &ma[i], count); + VM_OBJECT_WUNLOCK(object); + return (i); } Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Thu Feb 27 00:57:36 2020 (r358362) +++ head/sys/vm/vm_page.h Thu Feb 27 02:37:27 2020 (r358363) @@ -614,11 +614,16 @@ vm_page_t vm_page_alloc_freelist(int, int); vm_page_t vm_page_alloc_freelist_domain(int, int, int); void vm_page_bits_set(vm_page_t m, vm_page_bits_t *bits, vm_page_bits_t set); bool vm_page_blacklist_add(vm_paddr_t pa, bool verbose); -vm_page_t vm_page_grab (vm_object_t, vm_pindex_t, int); +vm_page_t vm_page_grab(vm_object_t, vm_pindex_t, int); +vm_page_t vm_page_grab_unlocked(vm_object_t, vm_pindex_t, int); int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, vm_page_t *ma, int count); +int vm_page_grab_pages_unlocked(vm_object_t object, vm_pindex_t pindex, + int allocflags, vm_page_t *ma, int count); int vm_page_grab_valid(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, int allocflags); +int vm_page_grab_valid_unlocked(vm_page_t *mp, vm_object_t object, + vm_pindex_t pindex, int allocflags); void vm_page_deactivate(vm_page_t); void vm_page_deactivate_noreuse(vm_page_t); void vm_page_dequeue(vm_page_t m); @@ -629,7 +634,7 @@ void vm_page_initfake(vm_page_t m, vm_paddr_t paddr, v int vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); void vm_page_invalid(vm_page_t m); void vm_page_launder(vm_page_t m); -vm_page_t vm_page_lookup (vm_object_t, vm_pindex_t); +vm_page_t vm_page_lookup(vm_object_t, vm_pindex_t); vm_page_t vm_page_next(vm_page_t m); void vm_page_pqbatch_drain(void); void vm_page_pqbatch_submit(vm_page_t m, uint8_t queue); From owner-svn-src-head@freebsd.org Thu Feb 27 04:36:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E5FE254579; Thu, 27 Feb 2020 04:36:35 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SfyB4DSGz4LBV; Thu, 27 Feb 2020 04:36:34 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [192.168.0.3] (unknown [181.52.72.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: pfg) by smtp.freebsd.org (Postfix) with ESMTPSA id CFD45105F8; Thu, 27 Feb 2020 04:36:32 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r358348 - in head/lib/libc: . gdtoa gen sparc64 sparc64/fpu sparc64/gen sparc64/sys sys To: Warner Losh , "Bjoern A. Zeeb" Cc: src-committers , svn-src-all , svn-src-head References: <202002261855.01QIt9Ip040234@repo.freebsd.org> From: Pedro Giffuni Organization: FreeBSD Message-ID: Date: Wed, 26 Feb 2020 23:36:32 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 04:36:35 -0000 On 26/02/2020 18:09, Warner Losh wrote: > > > On Wed, Feb 26, 2020 at 3:47 PM Warner Losh > wrote: > > > > On Wed, Feb 26, 2020 at 12:10 PM Bjoern A. Zeeb > > wrote: > > On 26 Feb 2020, at 18:55, Warner Losh wrote: > > > Author: imp > > Date: Wed Feb 26 18:55:09 2020 > > New Revision: 358348 > > URL: https://svnweb.freebsd.org/changeset/base/358348 > > > > Log: > >   Remove sparc64 specific parts of libc. > > I have a silly question for which it’s long been too late, but > for the > next time .. why do we need a gazillion of commits to remove > sparc64 > rather than 1 “atomic†one (or maybe 2 in case the one missed > a bit) > to remove it all (which would also allow other people to bring > it back > into private trees a lot more easily compared to tracking > changes over > weeks)? > > > One atomic commit is harder and more work for me. > > It's hard to get all the details right before pushing it. It's > hard to develop it as other things in the tree change things which > leads to more conflicts. It can be hard to MFC around (though > these changes won't be MFC'd having too large a commit around them > may generate more conflicts when those things are MFC'd). So I > optimized for my convenience, not others wishing to import it into > their trees. But I'd contend that the delta as far as bringing > back as 10 commits isn't onerous for such a niche demand. > > > Also, if I screw something up, it's easier to back out smaller commits > should that be necessary. Backing out huge commits that remove lots of > things and then reapplying them is tedious and error-prone. Doing it a > little at a time also allows me to make sure that all the CI stuff > works before moving on to the next step. We should/could nevertheless, track the removal process in some PR, or in the Wiki, to make life easier to whomever hero wants to resurrect the changes (not that I see that happening). Pedro. From owner-svn-src-head@freebsd.org Thu Feb 27 04:44:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A24DB254B85; Thu, 27 Feb 2020 04:44:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Sg7v17V6z4Tbw; Thu, 27 Feb 2020 04:44:59 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E4EA8B34B; Thu, 27 Feb 2020 04:44:58 +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 01R4iwFg001878; Thu, 27 Feb 2020 04:44:58 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01R4iwLf001877; Thu, 27 Feb 2020 04:44:58 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002270444.01R4iwLf001877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 27 Feb 2020 04:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358364 - in head: lib/csu/sparc64 lib/libthr/arch/sparc64 lib/libthread_db/arch/sparc64 tools/test/testfloat/sparc64 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: lib/csu/sparc64 lib/libthr/arch/sparc64 lib/libthread_db/arch/sparc64 tools/test/testfloat/sparc64 X-SVN-Commit-Revision: 358364 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 04:44:59 -0000 Author: imp Date: Thu Feb 27 04:44:58 2020 New Revision: 358364 URL: https://svnweb.freebsd.org/changeset/base/358364 Log: Remove libthr, csu, libthread_db and testfloat sparc64 specific directories. Submitted by: kib@ (libthr) Deleted: head/lib/csu/sparc64/ head/lib/libthr/arch/sparc64/ head/lib/libthread_db/arch/sparc64/ head/tools/test/testfloat/sparc64/ From owner-svn-src-head@freebsd.org Thu Feb 27 04:47:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 71C19254C27; Thu, 27 Feb 2020 04:47:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SgBT6dJmz4WnB; Thu, 27 Feb 2020 04:47:13 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 781C5B34D; Thu, 27 Feb 2020 04:47:13 +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 01R4lDf8002040; Thu, 27 Feb 2020 04:47:13 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01R4lDwM002039; Thu, 27 Feb 2020 04:47:13 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002270447.01R4lDwM002039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 27 Feb 2020 04:47:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358365 - in head: lib/libc/sparc64 lib/msun/sparc64 stand/ficl/sparc64 stand/libsa/sparc64 stand/sparc64 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: lib/libc/sparc64 lib/msun/sparc64 stand/ficl/sparc64 stand/libsa/sparc64 stand/sparc64 X-SVN-Commit-Revision: 358365 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 04:47:14 -0000 Author: imp Date: Thu Feb 27 04:47:12 2020 New Revision: 358365 URL: https://svnweb.freebsd.org/changeset/base/358365 Log: Remove now empty sparc64 directories (oh, and stand/sparc64 files) Deleted: head/lib/libc/sparc64/ head/lib/msun/sparc64/ head/stand/ficl/sparc64/ head/stand/libsa/sparc64/ head/stand/sparc64/ From owner-svn-src-head@freebsd.org Thu Feb 27 05:00:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D8F62255050; Thu, 27 Feb 2020 05:00:21 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SgTd5TChz4356; Thu, 27 Feb 2020 05:00:21 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6B28B51D; Thu, 27 Feb 2020 05:00:21 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01R50LBR008129; Thu, 27 Feb 2020 05:00:21 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01R50LRA008128; Thu, 27 Feb 2020 05:00:21 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202002270500.01R50LRA008128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Thu, 27 Feb 2020 05:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358366 - head/sys/cam/ata X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/sys/cam/ata X-SVN-Commit-Revision: 358366 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 05:00:21 -0000 Author: scottl Date: Thu Feb 27 05:00:21 2020 New Revision: 358366 URL: https://svnweb.freebsd.org/changeset/base/358366 Log: Add a quirk for the WDC Green series of SSDs to disable NCQ TRIM, as this avoids silent data corruption. PR: 225666 Submitted by: anders lundgren MFC after: 3 days Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Thu Feb 27 04:47:12 2020 (r358365) +++ head/sys/cam/ata/ata_da.c Thu Feb 27 05:00:21 2020 (r358366) @@ -786,6 +786,11 @@ static struct ada_quirk_entry ada_quirk_table[] = /*quirks*/ADA_Q_SMR_DM }, { + /* WD Green SSD */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WDS?????G0*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, + { /* Default */ { T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, From owner-svn-src-head@freebsd.org Thu Feb 27 05:06:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62C4F25531B for ; Thu, 27 Feb 2020 05:06:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SgcG2RVvz45cw for ; Thu, 27 Feb 2020 05:06:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf44.google.com with SMTP id by15so956668qvb.11 for ; Wed, 26 Feb 2020 21:06:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qWwR6JdfqDtaiL7hNMY019muq7h5FkRJsp2YJTMsyJs=; b=Dtg3Gw6z512Vzu4k+/snuzY+5UoMqYCcwCbNh3XZsLJ8qdUWc8PD1YeprjW7mqwsGf S8B8QXOl1RNM7rfFvWiSspPuj7CWORNN0+h15uXQn9WH17OOaSEbMzoViw/615SNXxjx mxgL0lM5c5slxycD7NlYgC4AQ/sNCjpuJikAEwPlB4Dmhl1N82V6kS/k+F6h1li1yT1X TTUOINm5pHTNgI9LW4r2tuTSL88QGm/YAAaAF2vR6A6Gpat8rGPOvlXtzYABTJ0VZVpi MTSZGryn1EcSX8iDjC+Z1ETpJHH4t3NUJooVUverHY1DqwWKr9iV65Viun1h8n+62SKF d4fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qWwR6JdfqDtaiL7hNMY019muq7h5FkRJsp2YJTMsyJs=; b=ggH191jZ0ucvZH/nZ/ErfpxioMzgAOZMoSgWFvg8OgO/MEbv0z6WNe1ruVONAzlgjc IrsPnkhP/VWktwRX/4n3YI32XmISJ/YDyh+QcNGBbIdPYPQYDIFApjEd6e7xSFkoLCTG IwZ1bFSga8CYA/7RxTUmFZqmM0jt47pDzbLgmagP96WoZg6JFvl70/MftEgScrarz93f 8PXgU7sh50wNcn38xB5lJvXMrCPWJWhfG9iLxG8JjjVX8Uwb9VxmuTti5WWV6s4ZsVln 6hseqp7Z2ii9GvYqiINwj/84GIxB+eqxLV76HjQGnugKCdn2jxHMFyV1GFnx1PfVG5fK rnuQ== X-Gm-Message-State: APjAAAWvoCh6cKQ13OHFLd+cjvvTHVoLxoOG/s2WWz/yq6C/y0KSXUez uoii5HUil6QCO5FPntUOB6E06rkIf4OMAQoLsBCA2g== X-Google-Smtp-Source: APXvYqweKHOU7HjdFCuHyMFcRcxTANEMxCPgtVNYnJZMBfKMHctd+MgKnfNmdTK3tvtyIkU0D5u6gakYY7viN/ywwlY= X-Received: by 2002:a0c:ee91:: with SMTP id u17mr2723736qvr.22.1582779965319; Wed, 26 Feb 2020 21:06:05 -0800 (PST) MIME-Version: 1.0 References: <202002261855.01QIt9Ip040234@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 26 Feb 2020 22:05:53 -0700 Message-ID: Subject: Re: svn commit: r358348 - in head/lib/libc: . gdtoa gen sparc64 sparc64/fpu sparc64/gen sparc64/sys sys To: Pedro Giffuni Cc: "Bjoern A. Zeeb" , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48SgcG2RVvz45cw X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=Dtg3Gw6z; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f44) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.62 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.63)[ip: (0.48), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 05:06:07 -0000 On Wed, Feb 26, 2020, 9:36 PM Pedro Giffuni wrote: > > On 26/02/2020 18:09, Warner Losh wrote: > > > > On Wed, Feb 26, 2020 at 3:47 PM Warner Losh wrote: > >> >> >> On Wed, Feb 26, 2020 at 12:10 PM Bjoern A. Zeeb < >> bzeeb-lists@lists.zabbadoz.net> wrote: >> >>> On 26 Feb 2020, at 18:55, Warner Losh wrote: >>> >>> > Author: imp >>> > Date: Wed Feb 26 18:55:09 2020 >>> > New Revision: 358348 >>> > URL: https://svnweb.freebsd.org/changeset/base/358348 >>> > >>> > Log: >>> > Remove sparc64 specific parts of libc. >>> >>> I have a silly question for which it=E2=80=99s long been too late, but = for the >>> next time .. why do we need a gazillion of commits to remove sparc64 >>> rather than 1 =E2=80=9Catomic=E2=80=9D one (or maybe 2 in case the one = missed a bit) >>> to remove it all (which would also allow other people to bring it back >>> into private trees a lot more easily compared to tracking changes over >>> weeks)? >>> >> >> One atomic commit is harder and more work for me. >> >> It's hard to get all the details right before pushing it. It's hard to >> develop it as other things in the tree change things which leads to more >> conflicts. It can be hard to MFC around (though these changes won't be >> MFC'd having too large a commit around them may generate more conflicts >> when those things are MFC'd). So I optimized for my convenience, not oth= ers >> wishing to import it into their trees. But I'd contend that the delta as >> far as bringing back as 10 commits isn't onerous for such a niche demand= . >> > > Also, if I screw something up, it's easier to back out smaller commits > should that be necessary. Backing out huge commits that remove lots of > things and then reapplying them is tedious and error-prone. Doing it a > little at a time also allows me to make sure that all the CI stuff works > before moving on to the next step. > > We should/could nevertheless, track the removal process in some PR, or in > the Wiki, to make life easier to whomever hero wants to resurrect the > changes (not that I see that happening) > Go for it. Since I don't see anybody doing it either, I view it as wasted work. Git log can dig this out easily enough, though. Warner > From owner-svn-src-head@freebsd.org Thu Feb 27 08:23:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A0532258D5C; Thu, 27 Feb 2020 08:23:12 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Slzg0nnxz4GVf; Thu, 27 Feb 2020 08:23:10 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDE35DCED; Thu, 27 Feb 2020 08:23:10 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01R8NAVt032672; Thu, 27 Feb 2020 08:23:10 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01R8NAAQ032671; Thu, 27 Feb 2020 08:23:10 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202002270823.01R8NAAQ032671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Thu, 27 Feb 2020 08:23:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358377 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358377 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 08:23:12 -0000 Author: jeff Date: Thu Feb 27 08:23:10 2020 New Revision: 358377 URL: https://svnweb.freebsd.org/changeset/base/358377 Log: A pair of performance improvements. Swap buckets on free as well as alloc so that alloc is always the most cache-hot data. When selecting a zone domain for the round-robin bucket cache use the local domain unless there is a severe imbalance. This does not affinitize memory, only locks and queues. Reviewed by: markj, rlibby Differential Revision: https://reviews.freebsd.org/D23824 Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Thu Feb 27 07:02:33 2020 (r358376) +++ head/sys/vm/uma_core.c Thu Feb 27 08:23:10 2020 (r358377) @@ -564,26 +564,29 @@ zone_domain_lock(uma_zone_t zone, int domain) } /* - * Search for the domain with the least cached items and return it, breaking - * ties with a preferred domain by returning it. + * Search for the domain with the least cached items and return it if it + * is out of balance with the preferred domain. */ static __noinline int zone_domain_lowest(uma_zone_t zone, int pref) { - long least, nitems; + long least, nitems, prefitems; int domain; int i; - least = LONG_MAX; + prefitems = least = LONG_MAX; domain = 0; for (i = 0; i < vm_ndomains; i++) { nitems = ZDOM_GET(zone, i)->uzd_nitems; if (nitems < least) { domain = i; least = nitems; - } else if (nitems == least && (i == pref || domain == pref)) - domain = pref; + } + if (domain == pref) + prefitems = nitems; } + if (prefitems < least * 2) + return (pref); return (domain); } @@ -4102,8 +4105,11 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata bucket = &cache->uc_crossbucket; } else #endif - if (bucket->ucb_cnt >= bucket->ucb_entries) - bucket = &cache->uc_freebucket; + if (bucket->ucb_cnt == bucket->ucb_entries && + cache->uc_freebucket.ucb_cnt < + cache->uc_freebucket.ucb_entries) + cache_bucket_swap(&cache->uc_freebucket, + &cache->uc_allocbucket); if (__predict_true(bucket->ucb_cnt < bucket->ucb_entries)) { cache_bucket_push(cache, bucket, item); critical_exit(); From owner-svn-src-head@freebsd.org Thu Feb 27 10:58:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7343225CC33; Thu, 27 Feb 2020 10:58:14 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SqQZ1DYRz457M; Thu, 27 Feb 2020 10:58:13 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-x733.google.com with SMTP id m2so2642245qka.7; Thu, 27 Feb 2020 02:58:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Nv1x3ahO25/EfYijjNj8tNbSWtObpDnV/I/Om+F4Oyc=; b=u9Gmp0QGbUsL0geduurhV6EVvXnz2L5lg5Dq1tuvmCMo29gu5KCehGpaBG74XIWJMA zeabcjRtdfJvUYzj5mBr2wuZq08e5qqPL+s9JugeuDZcIDOnPJTfHMHuX9O40ibHp2J9 LgopnPXSIoI9MpiRFSeVjupIwoWH7UFXf1FBx9+mAGl0jh0UV4Q6jLer/DbUD3lkSz4E bMXSmLu0v1qouneppil5Izht3ZrZkrRWdkv5KE1o7wNlFqfM7vHch/+/AQDdVJenPFKK MReKOvY1q2+LTLlfpNpz9fQ6kPatm0cMNYdYee5Pwm26ritf6u1aEIGkvFD21ChTjG9A ZuZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Nv1x3ahO25/EfYijjNj8tNbSWtObpDnV/I/Om+F4Oyc=; b=lJN99RJ+qwitn+EcaNyCSwJb4mb1aFAVvo2JniZw2hnQmygjzkCago1/jN3YgFlInN XknLnp2QnwDfqxSAlPqJ4l7YNCB+pXHFFrr4TEjcZ2sP9rblwQi8nmVmlgTZitYPFJY+ rX94rSGTCA0Bg4coWUdyb/bkiEhQpPYXslTgxZBNOGZKP5Igd0NA/Eotc/RatuF2qK2m EpKc6Y9edFNKlQ+t/59Yw2Rbeqqhje9YO8RCenvJ/6TUSyhjZr1DBu8EcfzWw/3hRFn5 6KXZXPY6JeEjErHsdTESoYbBfYx13UjD/nOLcTmZjLrJ6PsZsucs/wyI69mCSwvHyJpB AFeQ== X-Gm-Message-State: APjAAAVmkDII9nFoWiIf+iCc85AfyIg2xznkgruqKqqynFemAS6V25F+ uUGp03/1/dbiPY/mcgvn6xdq/ySZ1CQRUay9nos+8bdB X-Google-Smtp-Source: APXvYqyvxYRncMjblaekySETADgdXJfrp3lNuEkbyhFm03Zt1s5zRnWyf/6rdD9EpjHGnn5DcEJCsCuIZC7J3u+8reY= X-Received: by 2002:a37:9fcf:: with SMTP id i198mr4552251qke.337.1582801091938; Thu, 27 Feb 2020 02:58:11 -0800 (PST) MIME-Version: 1.0 References: <202002270823.01R8NAAQ032671@repo.freebsd.org> In-Reply-To: <202002270823.01R8NAAQ032671@repo.freebsd.org> From: Ryan Libby Date: Thu, 27 Feb 2020 02:58:01 -0800 Message-ID: Subject: Re: svn commit: r358377 - head/sys/vm To: Jeff Roberson Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48SqQZ1DYRz457M X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 10:58:14 -0000 On Thu, Feb 27, 2020 at 12:23 AM Jeff Roberson wrote: > > Author: jeff > Date: Thu Feb 27 08:23:10 2020 > New Revision: 358377 > URL: https://svnweb.freebsd.org/changeset/base/358377 > > Log: > A pair of performance improvements. > > Swap buckets on free as well as alloc so that alloc is always the most > cache-hot data. > > When selecting a zone domain for the round-robin bucket cache use the > local domain unless there is a severe imbalance. This does not affinitize > memory, only locks and queues. > > Reviewed by: markj, rlibby > Differential Revision: https://reviews.freebsd.org/D23824 > > Modified: > head/sys/vm/uma_core.c > > Modified: head/sys/vm/uma_core.c > ============================================================================== > --- head/sys/vm/uma_core.c Thu Feb 27 07:02:33 2020 (r358376) > +++ head/sys/vm/uma_core.c Thu Feb 27 08:23:10 2020 (r358377) > @@ -564,26 +564,29 @@ zone_domain_lock(uma_zone_t zone, int domain) > } > > /* > - * Search for the domain with the least cached items and return it, breaking > - * ties with a preferred domain by returning it. > + * Search for the domain with the least cached items and return it if it > + * is out of balance with the preferred domain. > */ > static __noinline int > zone_domain_lowest(uma_zone_t zone, int pref) > { > - long least, nitems; > + long least, nitems, prefitems; > int domain; > int i; > > - least = LONG_MAX; > + prefitems = least = LONG_MAX; > domain = 0; > for (i = 0; i < vm_ndomains; i++) { > nitems = ZDOM_GET(zone, i)->uzd_nitems; > if (nitems < least) { > domain = i; > least = nitems; > - } else if (nitems == least && (i == pref || domain == pref)) > - domain = pref; > + } > + if (domain == pref) > + prefitems = nitems; > } > + if (prefitems < least * 2) > + return (pref); If think this does need to be <=, not <, for the case where prefitems=0, but it wasn't the first domain. So e.g. if all domains nitems are 0, but pref=1, then with < we return domain=0. > > return (domain); > } > @@ -4102,8 +4105,11 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata > bucket = &cache->uc_crossbucket; > } else > #endif > - if (bucket->ucb_cnt >= bucket->ucb_entries) > - bucket = &cache->uc_freebucket; > + if (bucket->ucb_cnt == bucket->ucb_entries && > + cache->uc_freebucket.ucb_cnt < > + cache->uc_freebucket.ucb_entries) > + cache_bucket_swap(&cache->uc_freebucket, > + &cache->uc_allocbucket); > if (__predict_true(bucket->ucb_cnt < bucket->ucb_entries)) { > cache_bucket_push(cache, bucket, item); > critical_exit(); From owner-svn-src-head@freebsd.org Thu Feb 27 11:23:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E58D925D7A7; Thu, 27 Feb 2020 11:23:45 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Sr014jlhz3xYv; Thu, 27 Feb 2020 11:23:45 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 495F7FED8; Thu, 27 Feb 2020 11:23:45 +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 01RBNjGP040261; Thu, 27 Feb 2020 11:23:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RBNjLY040260; Thu, 27 Feb 2020 11:23:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202002271123.01RBNjLY040260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 27 Feb 2020 11:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358378 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 358378 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 11:23:46 -0000 Author: bapt Date: Thu Feb 27 11:23:44 2020 New Revision: 358378 URL: https://svnweb.freebsd.org/changeset/base/358378 Log: Update pci_vendors to 2020.02.22 MFC after: 2 days Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors ============================================================================== --- head/share/misc/pci_vendors Thu Feb 27 08:23:10 2020 (r358377) +++ head/share/misc/pci_vendors Thu Feb 27 11:23:44 2020 (r358378) @@ -2,8 +2,8 @@ # List of PCI ID's # -# Version: 2019.01.29 -# Date: 2019-01-29 03:15:01 +# Version: 2020.02.22 +# Date: 2020-02-22 03:15:04 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -14,6 +14,10 @@ # This file can be distributed under either the GNU General Public License # (version 2 or higher) or the 3-clause BSD License. # +# The database is a compilation of factual data, and as such the copyright +# only covers the aggregation and formatting. The copyright is held by +# Martin Mares and Albert Pool. +# # Vendors, devices and subsystems. Please keep sorted. @@ -64,6 +68,7 @@ # 018a is not LevelOne but there is a board misprogrammed 018a LevelOne 0106 FPC-0106TX misprogrammed [RTL81xx] +01de Oxide Computer Company # 021b is not Compaq but there is a board misprogrammed 021b Compaq Computer Corporation 8139 HNE-300 (RealTek RTL8139c) [iPaq Networking] @@ -92,6 +97,7 @@ 6663 Butane II (MPEG2 encoder board) 6666 MediaPress (MPEG2 encoder board) 07d1 D-Link System Inc +0824 T1042 [Freescale] 0925 VIA Technologies, Inc. (Wrong ID) 0a89 BREA Technologies Inc 0b0b Rhino Equipment Corp. @@ -220,8 +226,7 @@ 0eac SHF Communication Technologies AG 0008 Ethernet Powerlink Managing Node 01 0f62 Acrox Technologies Co., Ltd. -# Formerly NCR -1000 LSI Logic / Symbios Logic +1000 Broadcom / LSI 0001 53c810 1000 1000 LSI53C810AE PCI to SCSI I/O Processor 0002 53c820 @@ -266,7 +271,10 @@ 0013 53c875a 1000 1000 LSI53C875A PCI to Ultra SCSI Controller 0014 MegaRAID Tri-Mode SAS3516 + 1028 1f3a PERC H745 Adapter + 1028 1f3b PERC H745 Front 1028 1fd4 PERC H745P MX + 1137 020e UCSC-RAID-M5 12G Modular RAID Controller 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter 1d49 0607 ThinkSystem RAID 930-16i 8GB Flash PCIe 12Gb Adapter @@ -274,6 +282,8 @@ 8086 9460 RAID Controller RSP3TD160F 8086 9480 RAID Controller RSP3MD088F 0015 MegaRAID Tri-Mode SAS3416 + 1028 1f3c PERC H345 Adapter + 1028 1f3d PERC H345 Front 1d49 0503 ThinkSystem RAID 530-16i PCIe 12Gb Adapter 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -401,7 +411,7 @@ 8086 3510 RMS25PB080 RAID Controller 8086 3511 RMS25PB040 RAID Controller 8086 3512 RMT3PB080 RAID Controller - 8086 3513 RMS25CB080 RAID Controller + 8086 3513 Integrated RAID Module RMS25CB080 8086 3514 RMS25CB040 RAID Controller 8086 351c RMS25PB080N RAID Controller 8086 351d RMS25CB080N RAID Controller @@ -428,6 +438,8 @@ 1028 1fd1 PERC H730P MX 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix + 1bd4 0014 6G SAS3108 2G + 1bd4 0015 6G SAS3108 4G 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter 1d49 0608 ThinkSystem RAID 730-8i 2GB Flash PCIe 12Gb Adapter 1d49 0609 ThinkSystem RAID 730-8i 4GB Flash PCIe 12Gb Adapter @@ -480,14 +492,18 @@ 0062 SAS1078 PCI-Express Fusion-MPT SAS 1000 0062 SAS1078 PCI-Express Fusion-MPT SAS 0064 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] + 1000 3030 9200-16e 6Gb/s SAS/SATA PCIe x8 External HBA 1000 30c0 SAS 9201-16i + 1000 30d0 9201-16e 6Gb/s SAS/SATA PCIe x8 External HBA 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] 1000 3010 SAS9211-4i + 1014 040e ServeRAID H1110 0071 MR SAS HBA 2004 0072 SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] 1000 3040 9210-8i + 1000 3080 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1000 30b0 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1028 1f1c 6Gbps SAS HBA Adapter 1028 1f1d PERC H200 Adapter @@ -495,6 +511,12 @@ 1028 1f1f PERC H200 Modular 1028 1f20 PERC H200 Embedded 1028 1f22 PERC H200 Internal Tape Adapter +# Fujitsu D2607 SAS2008 HBA controller + 1734 1177 HBA Ctrl SAS 6G 0/1 [D2607] + 1bd4 000d 6G SAS2008IT + 1bd4 000e 6G SAS2008IR + 1bd4 000f 6G SAS2008IT SA5248 + 1bd4 0010 6G SAS2008IR SA5248 8086 350f RMS2LL040 RAID Controller 8086 3700 SSD 910 Series 0073 MegaRAID SAS 2008 [Falcon] @@ -502,6 +524,7 @@ 1000 9241 MegaRAID SAS 9240-4i 1000 92a0 MegaRAID SAS 9220-8i 1014 03b1 ServeRAID M1015 SAS/SATA Controller + 1014 040d ServeRAID M1115 SAS/SATA Controller 1028 1f4e PERC H310 Adapter 1028 1f4f PERC H310 Integrated 1028 1f50 PERC H310 Mini Blades @@ -594,10 +617,16 @@ 15d9 0691 Onboard SAS2308 PCI-Express Fusion-MPT SAS-2 0087 SAS2308 PCI-Express Fusion-MPT SAS-2 1000 3020 9207-8i SAS2.1 HBA + 1000 3030 SAS9207-4i4e 1000 3040 9207-8e SAS2.1 HBA 1000 3050 SAS9217-8i + 1000 3060 SAS9217-4i4e 1014 0472 N2125 External Host Bus Adapter + 1590 0041 H220i + 1590 0042 H221 / 9207-8e 1590 0044 H220i + 1bd4 0009 6G SAS2308IR + 1bd4 000a 6G SAS2308IT 8086 3000 RS25GB008 RAID Controller 8086 3060 RS25FB044 RAID Controller 8086 3516 RMS25JB080 RAID Controller @@ -624,10 +653,26 @@ 1028 1f53 HBA330 Mini 1028 1fd2 HBA330 MX 1028 1fd3 HBA330 MMZ +# Supermicro AOC-S3008L-L8e uses 0808 for their SAS3008 SAS controller + 15d9 0808 AOC-S3008L-L8e + 1bd4 000b 12G SAS3008IR + 1bd4 000c 12G SAS3008IT 1bd4 0011 Inspur 12Gb 8i-3008 IT SAS HBA + 1bd4 0012 12Gb SAS3008IR UDM + 1bd4 0026 12G SAS3008IT RACK + 1bd4 0027 12G SAS3008IMR RACK + 1bd4 0028 12G SAS3008IR RACK 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) +# 8 Internal and 8 External port channel 9400 HBA + 1000 3040 HBA 9400-8i8e 8086 3530 Integrated RAID Module RMSP3JD160J 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) +# Channel 16 internal port HBA + 1000 3000 HBA 9400-16i +# Channel 16 external port HBA + 1000 3020 HBA 9400-16e + 1028 1fe3 HBA345 Adapter + 1028 1fe4 HBA345 Front 1d49 0201 ThinkSystem 430-16i SAS/SATA 12Gb HBA 1d49 0203 ThinkSystem 430-16e SAS/SATA 12Gb HBA 8086 3000 RAID Controller RSP3QD160J @@ -635,6 +680,8 @@ 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1000 3010 HBA 9400-8i +# 9400 Channel 8 external port HBA + 1000 3030 HBA 9400-8e 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA 1d49 0202 ThinkSystem 430-8e SAS/SATA 12Gb HBA 1d49 0204 ThinkSystem 430-8i SAS/SATA 12Gb Dense HBA @@ -656,16 +703,57 @@ 00cf MegaRAID SAS-3 3324 [Intruder] 1000 9370 MegaRAID SAS 9361-24i 00d0 SAS3716 Fusion-MPT Tri-Mode RAID Controller Chip (ROC) +# 9405W 16 internal port channel HBA + 1000 3050 HBA 9405W-16i +# 9405W 8 internal and 8 external port channel HBA + 1000 3070 HBA 9405W-8i8e 00d1 SAS3616 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) +# 9405W 16 external port Channel HBA + 1000 3080 HBA 9405W-16e +# 9405W 16 internal port Channel HBA + 1000 3090 HBA 9405W-16i 00d3 MegaRAID Tri-Mode SAS3716W 00e0 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx 00e1 Fusion-MPT 12GSAS/PCIe SAS39xx 00e2 Fusion-MPT 12GSAS/PCIe Secure SAS39xx 00e3 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx 00e4 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx +# Invalid part + 1028 200b HBA355i Adapter Invalid +# Invalid part + 1028 200c HBA355i Front Invalid +# Invalid part + 1028 200d HBA355e Adapter Invalid +# Invalid part + 1028 200e HBA350i MX Invalid +# Soft Secure 00e5 Fusion-MPT 12GSAS/PCIe SAS38xx +# Soft Secure + 1028 200b HBA355i Adapter +# Soft Secure + 1028 200c HBA355i Front +# Soft Secure + 1028 200d HBA355e Adapter +# Soft Secure + 1028 200e HBA350i MX + 1d49 0205 ThinkSystem 440-16i SAS/SATA PCIe Gen4 12Gb Internal HBA + 1d49 0206 ThinkSystem 440-16e SAS/SATA PCIe Gen4 12Gb HBA 00e6 Fusion-MPT 12GSAS/PCIe Secure SAS38xx + 1028 200b HBA355i Adapter + 1028 200c HBA355i Front + 1028 200d HBA355e Adapter + 1028 200e HBA355i MX + 1d49 0205 ThinkSystem 440-16i SAS/SATA PCIe Gen4 12Gb Internal HBA + 1d49 0206 ThinkSystem 440-16e SAS/SATA PCIe Gen4 12Gb HBA 00e7 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx +# Tampered part + 1028 200b HBA355i Adapter Tampered +# Tampered part + 1028 200c HBA355i Front Tampered +# Tampered part + 1028 200d HBA355e Adapter Tampered +# Tampered part + 1028 200e HBA350i MX Tampered 02b0 Virtual Endpoint on PCIe Switch 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter @@ -742,9 +830,37 @@ 0901 61C102 1000 63C815 10e0 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 1028 1ae0 PERC H755 Adapter - Invalid Device + 1028 1ae1 PERC H755 Front - Invalid Device + 1028 1ae2 PERC H755N Front - Invalid Device + 1028 1ae3 PERC H755 MX - Invalid Device 10e1 MegaRAID 12GSAS/PCIe SAS39xx + 1028 1ae0 PERC H755 Adapter + 1028 1ae1 PERC H755 Front + 1028 1ae2 PERC H755N Front + 1028 1ae3 PERC H755 MX + 1d49 060a ThinkSystem RAID 940-8i 4GB Flash PCIe Gen4 12Gb Adapter + 1d49 060b ThinkSystem RAID 940-8i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060c ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060d ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Internal Adapter + 1d49 060e ThinkSystem RAID 940-32i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060f ThinkSystem RAID 940-8e 4GB Flash PCIe Gen4 12Gb Adapter 10e2 MegaRAID 12GSAS/PCIe Secure SAS39xx + 1028 1ae0 PERC H755 Adapter + 1028 1ae1 PERC H755 Front + 1028 1ae2 PERC H755N Front + 1028 1ae3 PERC H755 MX + 1d49 060a ThinkSystem RAID 940-8i 4GB Flash PCIe Gen4 12Gb Adapter + 1d49 060b ThinkSystem RAID 940-8i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060c ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060d ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Internal Adapter + 1d49 060e ThinkSystem RAID 940-32i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060f ThinkSystem RAID 940-8e 4GB Flash PCIe Gen4 12Gb Adapter 10e3 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 1028 1ae0 PERC H755 Adapter - Tampered Device + 1028 1ae1 PERC H755 Front - Tampered Device + 1028 1ae2 PERC H755N Front - Tampered Device + 1028 1ae3 PERC H755 MX - Tampered Device 10e4 MegaRAID 12GSAS/PCIe Unsupported SAS38xx 10e5 MegaRAID 12GSAS/PCIe SAS38xx 10e6 MegaRAID 12GSAS/PCIe Secure SAS38xx @@ -781,7 +897,9 @@ 1306 Kaveri 1307 Kaveri 1308 Kaveri HDMI/DP Audio Controller + 17aa 3988 Z50-75 1309 Kaveri [Radeon R6/R7 Graphics] + 17aa 3830 Z50-75 130a Kaveri [Radeon R6 Graphics] 130b Kaveri [Radeon R4 Graphics] 130c Kaveri [Radeon R7 Graphics] @@ -802,16 +920,22 @@ 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] 13e9 Ariel + 1478 Navi 10 XL Upstream Port of PCI Express Switch + 1479 Navi 10 XL Downstream Port of PCI Express Switch 154c Kryptos 154e Garfield 1551 Arlene 1552 Pooky 1561 Anubis 15d8 Picasso + 103c 8615 Pavilion Laptop 15-cw1xxx 15dd Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] 103c 83c6 Radeon Vega 8 Mobile 1458 d000 Radeon RX Vega 11 - 15de Raven Ridge HDMI/DP Audio Controller + 15de Raven/Raven2/Fenghuang HDMI/DP Audio Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 15df Raven/Raven2/Fenghuang/Renoir Cryptographic Coprocessor + 103c 8615 Pavilion Laptop 15-cw1xxx 15ff Fenghuang [Zhongshan Subor Z+] 1607 Arden 1636 Renoir @@ -986,7 +1110,7 @@ 4382 SB600 AC97 Audio 4383 SBx00 Azalia (Intel HDA) 1019 2120 A785GM-M - 103c 1611 Pavilion DM1Z-3000 + 103c 1611 Pavilion dm1z-3000 103c 280a DC5750 Microtower 1043 8230 M3A78-EH Motherboard 1043 836c M4A785TD Motherboard @@ -1060,6 +1184,7 @@ 1458 b002 GA-MA770-DS3rev2.0 Motherboard 1849 4390 Motherboard (one of many) 4391 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1073,6 +1198,7 @@ 4395 SB8x0/SB9x0 SATA Controller [Storage mode] 4396 SB7x0/SB8x0/SB9x0 USB EHCI Controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1081,6 +1207,7 @@ 174b 1001 PURE Fusion Mini 4397 SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1101,10 +1228,12 @@ 439c SB7x0/SB8x0/SB9x0 IDE Controller 1002 4392 MSI MS-7713 motherboard 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 1043 82ef M3A78-EH Motherboard 105b 0e13 N15235/A74MX mainboard / AMD SB700 439d SB7x0/SB8x0/SB9x0 LPC host controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1214,6 +1343,44 @@ 4857 Xilleon 225 USB for X225 4858 Xilleon 225 DAIO-0 for X225 4859 Xilleon 225 DAIO-1 for X225 + 4860 Xilleon 210 HBIU for X210 + 4861 Xilleon 210 IDE for X210 + 4862 Xilleon 210 USB for X210 + 4863 Xilleon 210 DAIO-0 for X210 + 4864 Xilleon 210 DAIO-1 for X210 + 4865 Xilleon 226 HBIU for X226 + 4866 Xilleon 226 IDE for X226 + 4867 Xilleon 226 USB for X226 + 4868 Xilleon 226 DAIO-0 for X226 + 4869 Xilleon 226 DAIO-1 for X226 + 486a Xilleon 240S HBIU for X240S + 486b Xilleon 240H HBIU for X240H + 486c Xilleon 240S USB for X240S + 486d Xilleon 240H USB for X240H + 486e Xilleon 250 USB 1.1 for X250 + 486f Xilleon 260 USB 1.1 for X260 + 4870 Xilleon 250 HBIU for X250 + 4871 Xilleon 250 IDE for X250 + 4872 Xilleon 234/235 HBIU for X234/X235 + 4873 Xilleon 244/245 HBIU for X244/X245 + 4874 Xilleon 234/235 USB 1.1 for X234/X235 + 4875 Xilleon 260 HBIU for X260 + 4876 Xilleon 260 IDE for X260 + 4877 Xilleon 244/245 USB 1.1 for X244/X245 + 4878 Xilleon 270 HBIU for X270 + 487b Xilleon 242 HBIU for X242 + 487d Xilleon 242 USB 1.1 for X242 + 4880 Xilleon 254 HBIU for X254 + 4881 Xilleon 254 USB 1.1 for X254 + 4882 Xilleon 255 HBIU for X255 + 4883 Xilleon 255 USB 1.1 for X255 + 4884 Xilleon 243 HBIU for X243 + 4885 Xilleon 243 USB 1.1 for X243 + 4886 Xilleon 233 HBIU for X233 + 4887 Xilleon 233 USB 1.1 for X233 + 4888 Xilleon 143 HBIU for X143 + 4889 Xilleon 143 HBIU for X143L + 488a Xilleon 143 HBIU for X143S 4966 RV250 [Radeon 9000 Series] 10f1 0002 RV250 If [Tachyon G9000 PRO] 148c 2039 RV250 If [Radeon 9000 Pro "Evil Commando"] @@ -1443,9 +1610,9 @@ 1002 0028 Rage 128 AIW 1002 0029 Rage 128 AIW 1002 0068 Rage 128 AIW - 5246 Rage 4 [Rage Fury/Xpert 128/Xpert 2000 AGP] + 5246 Rage 128 (Rage 4) series 1002 0004 Magnum/Xpert 128/Xpert 99 - 1002 0008 Magnum/Xpert128/X99/Xpert2000 + 1002 0008 Rage 128 AGP 2x 1002 0028 Rage 128 AIW AGP 1002 0044 Rage Fury/Xpert 128/Xpert 2000 1002 0068 Rage 128 AIW AGP @@ -1688,8 +1855,6 @@ 103c 1952 ProBook 455 G1 6601 Mars [Radeon HD 8730M] 103c 2100 FirePro M4100 - 6602 Mars - 6603 Mars 6604 Opal XT [Radeon R7 M265/M365X/M465] 1025 0776 Aspire V5 Radeon R7 M265 103c 8006 FirePro M4170 @@ -1715,6 +1880,7 @@ 1642 3f09 Radeon R7 350 6611 Oland [Radeon HD 8570 / R7 240/340 OEM] 1028 210b Radeon R5 240 OEM + 1642 1869 AMD Radeon 520 174b 4248 Radeon R7 240 OEM 174b a240 Radeon R7 240 OEM 174b d340 Radeon R7 340 OEM @@ -1722,9 +1888,6 @@ 6613 Oland PRO [Radeon R7 240/340] 148c 7340 Radeon R7 340 1682 7240 R7 240 2048 MB - 6620 Mars - 6621 Mars PRO - 6623 Mars 6631 Oland 6640 Saturn XT [FirePro M6100] 106b 014b Tropo XT [Radeon R9 M380 Mac Edition] @@ -1783,7 +1946,7 @@ 17aa 3805 Radeon HD 8570M 6664 Jet XT [Radeon R5 M240] 6665 Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520 Mobile] - 17aa 1309 Radeon R7 M260DX + 17aa 1309 Z50-75 Radeon R7 M260DX 17aa 368f Radeon R5 A230 6667 Jet ULT [Radeon R5 M230] 666f Sun LE [Radeon HD 8550M / R5 M230] @@ -2412,18 +2575,22 @@ 1462 3413 Radeon RX 480 Gaming X 8GB 1462 3416 Radeon RX 570 1462 3418 Radeon RX 580 Armor 4G OC - 148c 2372 Radeon RX 480 + 1462 341e Radeon RX 570 Armor 4G OC + 1462 8a92 Radeon RX 580 + 148c 2372 Radeon RX 480 [Red Dragon] 148c 2373 Radeon RX 470 1682 9470 Radeon RX 470 1682 9480 Radeon RX 480 1682 9588 Radeon RX 580 XTR + 1682 c570 Radeon RX 570 174b e347 Radeon RX 470/480 174b e349 Radeon RX 470 1787 a470 Radeon RX 470 1787 a480 Radeon RX 480 1849 5001 Phantom Gaming X RX 580 OC + 1849 5030 Phantom Gaming D Radeon RX580 8G OC 1da2 e353 Radeon RX 570 Pulse 4GB - 1da2 e366 Nitro+ Radeon RX 570/580 + 1da2 e366 Nitro+ Radeon RX 570/580/590 67e0 Baffin [Radeon Pro WX 4170] 103c 8270 Radeon Pro WX 4170 103c 8272 Radeon Pro WX 4170 @@ -2441,6 +2608,8 @@ 67e9 Baffin [Polaris11] 67eb Baffin [Radeon Pro V5300X] 67ef Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] + 1028 1703 RX 560D OEM OC 2 GB + 103c 3421 Radeon RX 460 106b 0160 Radeon Pro 460 106b 0166 Radeon Pro 455 106b 0167 Radeon Pro 450 @@ -2456,6 +2625,7 @@ 1028 1726 Radeon RX 560DX 103c 8479 Radeon RX 560X Mobile 1043 04bc Radeon RX 560 + 1043 052f Radeon RX 560 1458 22ed Radeon RX 560 148c 2381 Radeon RX 560 1682 9560 Radeon RX 560 @@ -2679,6 +2849,8 @@ 6868 Vega 10 [Radeon PRO WX 8100/8200] 686c Vega 10 [Radeon Instinct MI25 MxGPU] 687f Vega 10 XL/XT [Radeon RX Vega 56/64] + 1002 0b36 RX Vega64 + 1002 6b76 RX Vega56 6880 Lexington [Radeon HD 6550M] 103c 163c Pavilion dv6 Radeon HD 6550M 6888 Cypress XT [FirePro V8800] @@ -3146,12 +3318,13 @@ 174b e180 Radeon HD 7350 17af 3015 Radeon HD 7350 68fe Cedar LE - 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] + 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile] 1025 1056 Radeon R7 M360 / R8 M365DX 1028 0640 Radeon R7 M260/M265 1028 0643 Radeon R7 M260/M265 1028 067f Radeon R7 M260 1028 0767 Radeon R7 M445 + 1028 0810 Radeon 530 1028 130a Radeon R7 M260 103c 2263 Radeon R7 M260 103c 2269 Radeon R7 M260 @@ -3198,12 +3371,12 @@ 694e Polaris 22 XL [Radeon RX Vega M GL] 694f Polaris 22 MGL XL [Radeon Pro WX Vega M GL] 6980 Polaris12 - 6981 Polaris12 + 6981 Lexa XT [Radeon PRO WX 3200] 6985 Lexa XT [Radeon PRO WX 3100] 6986 Polaris12 - 6987 Lexa [Radeon E9171 MCM] + 6987 Lexa [Radeon 540X/550X/630 / RX 640 / E9171 MCM] 6995 Lexa XT [Radeon PRO WX 2100] - 699f Lexa PRO [Radeon RX 550/550X] + 699f Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] 1028 1720 Radeon RX 550X 148c 2380 Lexa XL [Radeon RX 550] 1da2 e367 Lexa PRO [Radeon RX 550] @@ -3356,7 +3529,12 @@ 1043 04a0 Radeon R9 FURY X 174b e329 Radeon R9 FURY 7310 Navi 10 - 731f Navi 10 + 7312 Navi 10 [Radeon Pro W5700] + 731f Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] + 7340 Navi 14 [Radeon RX 5500/5500M / Pro 5500M] + 7341 Navi 14 [Radeon Pro W5500] + 7347 Navi 14 [Radeon Pro W5500M] + 734f Navi 14 [Radeon Pro W5300M] 7833 RS350 Host Bridge 7834 RS350 [Radeon 9100 PRO/XT IGP] 7835 RS350M [Mobility Radeon 9000 IGP] @@ -3570,16 +3748,16 @@ 9613 RS780MC [Mobility Radeon HD 3100] 9614 RS780D [Radeon HD 3300] 9616 RS780L [Radeon 3000] - 9640 BeaverCreek [Radeon HD 6550D] - 9641 BeaverCreek [Radeon HD 6620G] - 9642 Sumo [Radeon HD 6370D] - 9643 Sumo [Radeon HD 6380G] - 9644 Sumo [Radeon HD 6410D] - 9645 Sumo [Radeon HD 6410D] - 9647 BeaverCreek [Radeon HD 6520G] + 9640 Sumo [Radeon HD 6550D] + 9641 Sumo [Radeon HD 6620G] + 9642 SuperSumo [Radeon HD 6370D] + 9643 SuperSumo [Radeon HD 6380G] + 9644 SuperSumo [Radeon HD 6410D] + 9645 SuperSumo [Radeon HD 6410D] + 9647 Sumo [Radeon HD 6520G] 9648 Sumo [Radeon HD 6480G] - 9649 Sumo [Radeon HD 6480G] - 964a BeaverCreek [Radeon HD 6530D] + 9649 SuperSumo [Radeon HD 6480G] + 964a Sumo [Radeon HD 6530D] 964b Sumo 964c Sumo 964e Sumo @@ -3592,6 +3770,7 @@ 1019 2120 A785GM-M 1043 83a2 M4A785TD Motherboard 9712 RS880M [Mobility Radeon HD 4225/4250] + 103c 1609 ProLiant MicroServer N36L 9713 RS880M [Mobility Radeon HD 4100] 9714 RS880 [Radeon HD 4290] 9715 RS880 [Radeon HD 4250] @@ -3610,6 +3789,7 @@ 9830 Kabini [Radeon HD 8400 / R3 Series] 9831 Kabini [Radeon HD 8400E] 9832 Kabini [Radeon HD 8330] + 1849 9832 QC5000-ITX/PH 9833 Kabini [Radeon HD 8330E] 9834 Kabini [Radeon HD 8210] 9835 Kabini [Radeon HD 8310E] @@ -3619,6 +3799,7 @@ 9839 Kabini [Radeon HD 8180] 983d Temash [Radeon HD 8250/8280G] 9840 Kabini HDMI/DP Audio + 1849 9840 QC5000-ITX/PH 9850 Mullins [Radeon R3 Graphics] 9851 Mullins [Radeon R4/R5 Graphics] 1179 f928 Beema [Radeon R5 Graphics] @@ -3682,9 +3863,10 @@ 991e Bishop 9920 Liverpool [Playstation 4 APU] 9921 Liverpool HDMI/DP Audio Controller - 9922 Starship + 9922 Starshp 9923 Starsha2 [Kingston/Clayton] 9924 Gladius + 9925 Kingston/Clayton/Jupiter/Gladius/Montego HDMI Controller 9926 Jupiter 9990 Trinity 2 [Radeon HD 7520G] 9991 Trinity 2 [Radeon HD 7540D] @@ -3698,7 +3880,7 @@ 9999 Richland [Radeon HD 8510G] 999a Richland [Radeon HD 8410G] 999b Richland [Radeon HD 8310G] - 999c Richland + 999c Richland [Radeon HD 8650D] # AMD Quad-Core A8-Series APU A8-6500T with Radeon HD 8550D 999d Richland [Radeon HD 8550D] 99a0 Trinity 2 [Radeon HD 7520G] @@ -3732,7 +3914,8 @@ aa98 Caicos HDMI Audio [Radeon HD 6450 / 7450/8450/8490 OEM / R5 230/235/235X OEM] 174b aa98 Radeon HD 6450 1GB DDR3 aaa0 Tahiti HDMI Audio [Radeon HD 7870 XT / 7950/7970] - aab0 Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] + aab0 Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] + aab8 Tiran HDMI Audio aac0 Tobago HDMI Audio [Radeon R7 360 / R9 360 OEM] aac8 Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X] aad8 Tonga HDMI Audio [Radeon R9 285/380] @@ -4274,6 +4457,35 @@ 1302 Family 11h Processor DRAM Controller 1303 Family 11h Processor Miscellaneous Control 1304 Family 11h Processor Link Control + 1305 Griffin Function 5 + 1306 Griffin Function 6 + 1307 Griffin Function 7 + 1308 Kaveri Audio Controller + 1314 Wrestler/Bheem/Ontario/Krishna Audio Controller + 13e0 Ariel Root Complex + 13e1 Ariel IOMMU + 13e2 Ariel PCIe Dummy Host Bridge + 13e3 Ariel PCIe GPP Bridge + 13e4 Ariel PCIe Dummy Host Bridge + 13e5 Ariel Internal PCIe GPP Bridge 0 to Bus A + 13e6 Ariel Internal PCIe GPP Bridge 0 to Bus B + 13e7 Ariel SMBus Controller + 13e8 Ariel LPC Bridge + 13e9 Ariel Internal GPU + 13ea Ariel HD Audio Controller + 13eb Ariel HD Audio Coprocessor + 13ec Ariel Cryptographic Coprocessor + 13ed Ariel USB 3.1 Type C: Gen2 x 1port + DP Alt Mode + 13ee Ariel USB 3.1 Type A: Gen2 x 2 ports + 13ef Ariel ZCN/MP4 + 13f0 Ariel Device 24: Function 0 + 13f1 Ariel Device 24: Function 1 + 13f2 Ariel Device 24: Function 2 + 13f3 Ariel Device 24: Function 3 + 13f4 Ariel Device 24: Function 4 + 13f5 Ariel Device 24: Function 5 + 13f6 Ariel Device 24: Function 6 + 13f7 Ariel Device 24: Function 7 1400 Family 15h (Models 10h-1fh) Processor Function 0 1401 Family 15h (Models 10h-1fh) Processor Function 1 1402 Family 15h (Models 10h-1fh) Processor Function 2 @@ -4301,26 +4513,51 @@ 1422 Family 15h (Models 30h-3fh) Processor Root Complex 1423 Family 15h (Models 30h-3fh) I/O Memory Management Unit 1424 Family 15h (Models 30h-3fh) Processor Root Port + 1425 Kaveri P2P Bridge for GFX PCIe Port [1:0] 1426 Family 15h (Models 30h-3fh) Processor Root Port - 142e Liverpool Processor Function 0 - 142f Liverpool Processor Function 1 - 1430 Liverpool Processor Function 2 - 1431 Liverpool Processor Function 3 - 1432 Liverpool Processor Function 4 + 142e Liverpool Processor HT configuration + 142f Liverpool Processor Address Maps + 1430 Liverpool Processor DRAM configuration + 1431 Liverpool Processor Misc configuration + 1432 Liverpool Processor PM configuration + 1433 Liverpool Processor NB Performance Monitor + 1434 Liverpool Processor SPLL Configuration 1436 Liverpool Processor Root Complex 1437 Liverpool I/O Memory Management Unit - 1438 Liverpool Processor Root Port + 1438 Liverpool UMI PCIe Dummy Host Bridge 1439 Family 16h Processor Functions 5:1 + 143a Kingston/Clayton/Gladius/Montego Root Complex + 143b Kingston/Clayton/Gladius/Montego P2P Bridge for UMI Link + 1440 Matisse Device 24: Function 0 + 1441 Matisse Device 24: Function 1 + 1442 Matisse Device 24: Function 2 + 1443 Matisse Device 24: Function 3 + 1444 Matisse Device 24: Function 4 + 1445 Matisse Device 24: Function 5 + 1446 Matisse Device 24: Function 6 + 1447 Matisse Device 24: Function 7 + 1448 Renoir Device 24: Function 0 + 1449 Renoir Device 24: Function 1 + 144a Renoir Device 24: Function 2 + 144b Renoir Device 24: Function 3 + 144c Renoir Device 24: Function 4 + 144d Renoir Device 24: Function 5 + 144e Renoir Device 24: Function 6 + 144f Renoir Device 24: Function 7 1450 Family 17h (Models 00h-0fh) Root Complex 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit 1452 Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge 1453 Family 17h (Models 00h-0fh) PCIe GPP Bridge 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B + 1455 Zeppelin/Renoir PCIe Dummy Function 1456 Family 17h (Models 00h-0fh) Platform Security Processor 1457 Family 17h (Models 00h-0fh) HD Audio Controller + 145a Zeppelin/Raven/Raven2 PCIe Dummy Function 145b Zeppelin Non-Transparent Bridge 145c Family 17h (Models 00h-0fh) USB 3.0 Host Controller - 145f USB 3.0 Host controller + 145d Zeppelin Switch Upstream (PCIE SW.US) + 145e Zeppelin Switch Downstream (PCIE SW.DS) + 145f Zeppelin USB 3.0 Host controller 1460 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0 1461 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1 1462 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2 @@ -4329,6 +4566,39 @@ 1465 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 1466 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6 1467 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 + 1468 Zeppelin Cryptographic Coprocessor NTBCCP + 1480 Starship/Matisse Root Complex + 1462 7c37 X570-A PRO motherboard + 1481 Starship/Matisse IOMMU + 1482 Starship/Matisse PCIe Dummy Host Bridge + 1483 Starship/Matisse GPP Bridge + 1484 Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] + 1485 Starship/Matisse Reserved SPP + 1486 Starship/Matisse Cryptographic Coprocessor PSPCPP + 1487 Starship/Matisse HD Audio Controller + 1462 9c37 X570-A PRO motherboard + 1488 Starship Reserved SSP + 1489 Starship Reserved SSP + 148a Starship/Matisse PCIe Dummy Function + 148b Starship/Matisse Non-Transparent Bridge + 148c Starship USB 3.0 Host Controller + 148d Starship/Matisse Switch Upstream (PCIE SW.US) + 148e Starship/Matisse Switch Downstream (PCIE SW.DS) + 148f Starship Reserved SSP + 1490 Starship Device 24; Function 0 + 1491 Starship Device 24; Function 1 + 1492 Starship Device 24; Function 2 + 1493 Starship Device 24; Function 3 + 1494 Starship Device 24; Function 4 + 1495 Starship Device 24; Function 5 + 1496 Starship Device 24; Function 6 + 1497 Starship Device 24; Function 7 + 1498 Starship/Matisse PTDMA + 1499 Starship/Matisse NVMe + 149a Starship PCIe GPP Bridge [1:0] + 149b Starship Reserved SSP + 149c Matisse USB 3.0 Host Controller + 1462 7c37 X570-A PRO motherboard 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4343,8 +4613,33 @@ 1534 Family 16h Processor Function 4 1535 Family 16h Processor Function 5 1536 Family 16h Processor Root Complex + 1849 1536 QC5000-ITX/PH + 1537 Kabini/Mullins PSP-Platform Security Processor 1538 Family 16h Processor Function 0 + 1539 Kabini P2P Bridge for PCIe Ports[4:0] + 1540 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky HT Configuration + 1541 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Address Maps + 1542 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky DRAM Configuration + 1543 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Miscellaneous Configuration + 1544 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky PM Configuration + 1545 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky NB Performance Monitor + 1546 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Root Complex + 1547 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky IOMMU + 1548 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky UMI PCIe Dummy Host Bridge + 1549 Kryptos/Cato/Garfield/Garfield+ P2P Bridge for PCIe Port [3:0] + 154a Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Audio Processor + 154b Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Security Processor + 154d Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky/Anubis HDMI Controller + 154f Anubis Audio Processor + 1550 Garfield+/Arlene/Pooky/Anubis SPLL Configuration + 1553 Arlene/Pooky P2P Bridge for PCIE (3:0) + 155b Anubis Root Complex + 155c Anubis IOMMU + 155d Anubis UMI PCIe Dummy Bridge + 155e Anubis P2P Bridge for PCIe Ports [4:0] + 1560 Anubis Security Processor 1566 Family 16h (Models 30h-3fh) Processor Root Complex + 1567 Mullins IOMMU 156b Family 16h (Models 30h-3fh) Host Bridge 1570 Family 15h (Models 60h-6fh) Processor Function 0 1571 Family 15h (Models 60h-6fh) Processor Function 1 @@ -4354,29 +4649,132 @@ 1575 Family 15h (Models 60h-6fh) Processor Function 5 1576 Family 15h (Models 60h-6fh) Processor Root Complex 1577 Family 15h (Models 60h-6fh) I/O Memory Management Unit + 1578 Carrizo Platform Security Processor + 1579 Carrizo Audio Processor 157a Family 15h (Models 60h-6fh) Audio Controller 157b Family 15h (Models 60h-6fh) Host Bridge 157c Family 15h (Models 60h-6fh) Processor Root Port + 157d Carrizo Audio Dummy Host Bridge + 157e Carrizo Audio Controller 1580 Family 16h (Models 30h-3fh) Processor Function 0 1581 Family 16h (Models 30h-3fh) Processor Function 1 1582 Family 16h (Models 30h-3fh) Processor Function 2 1583 Family 16h (Models 30h-3fh) Processor Function 3 1584 Family 16h (Models 30h-3fh) Processor Function 4 1585 Family 16h (Models 30h-3fh) Processor Function 5 + 1590 Amur/Nolan HT Configuration + 1591 Amur/Nolan Address Maps + 1592 Amur/Nolan DRAM Configuration + 1593 Amur/Nolan Miscellaneous Configuration + 1594 Amur/Nolan PM Configuration + 1595 Amur/Nolan NB Performance Monitor + 1596 Amur/Nolan Root Complex + 1597 Amur/Nolan IOMMU + 1598 Amur/Nolan Platform Security Processor + 1599 Amur/Nolan PCIe Dummy Host Bridge + 159d Amur Function 6: Gasket + 15b0 Stoney HT Configuration + 15b1 Stoney Address Maps + 15b2 Stoney DRAM Configuration + 15b3 Stoney Miscellaneous Configuration + 15b4 Stoney PM Configuration + 15b5 Stoney NB Performance Monitor + 15bc Stoney PCIe [GFX,GPP] Bridge [4:0] + 15be Stoney Audio Processor + 15d0 Raven/Raven2 Root Complex + 103c 8615 Pavilion Laptop 15-cw1xxx + 15d1 Raven/Raven2 IOMMU + 103c 8615 Pavilion Laptop 15-cw1xxx + 15d2 Raven/Raven2 PCIe Dummy Host Bridge + 15d3 Raven/Raven2 PCIe GPP Bridge [6:0] + 15d4 FireFlight USB 3.1 + 15d5 FireFlight USB 3.1 + 15da Raven/Raven2 PCIe Dummy Host Bridge + 15db Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A + 15dc Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus B + 15de Raven/Raven2/FireFlight HD Audio Controller 15df Family 17h (Models 10h-1fh) Platform Security Processor + 15e0 Raven USB 3.1 + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e1 Raven USB 3.1 + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e2 Raven/Raven2/FireFlight/Renoir Audio Processor 15e3 Family 17h (Models 10h-1fh) HD Audio Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e4 Raven/Raven2/Renoir Sensor Fusion Hub + 15e5 Raven2 USB 3.1 + 15e6 Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver + 1022 15e4 Raven/Raven2/Renoir Sensor Fusion Hub + 15e8 Raven/Raven2 Device 24: Function 0 + 15e9 Raven/Raven2 Device 24: Function 1 + 15ea Raven/Raven2 Device 24: Function 2 + 15eb Raven/Raven2 Device 24: Function 3 + 15ec Raven/Raven2 Device 24: Function 4 + 15ed Raven/Raven2 Device 24: Function 5 + 15ee Raven/Raven2 Device 24: Function 6 + 15ef Raven/Raven2 Device 24: Function 7 + 15f0 FireFlight Device 24: Function 0 + 15f1 FireFlight Device 24: Function 1 + 15f2 FireFlight Device 24: Function 2 + 15f3 FireFlight Device 24: Function 3 + 15f4 FireFlight Device 24: Function 4 + 15f5 FireFlight Device 24: Function 5 + 15f6 FireFlight Device 24: Function 6 + 15f7 FireFlight Device 24: Function 7 + 15f8 FireFlight Root Complex + 15f9 FireFlight IOMMU + 15fa FireFlight PCIe Dummy Host Bridge + 15fb FireFlight PCIe GPP Bride 3:0 + 15fc FireFlight PCIe Dummy Host Bridge + 15fd FireFlight Internal PCIe GPP Bridge 0 to Bus A + 15fe FireFlight Internal PCIe GPP Bridge 0 to Bus B + 15ff FireFlight Bus A; Device 0: Function 0: Internal GPU 1600 Family 15h Processor Function 0 1601 Family 15h Processor Function 1 1602 Family 15h Processor Function 2 1603 Family 15h Processor Function 3 1604 Family 15h Processor Function 4 1605 Family 15h Processor Function 5 + 1606 Arden Security Processor + 1608 Arden Device 18h: Function 0 + 1609 Arden Device 18h: Function 1 + 160a Arden Device 18h: Function 2 + 160b Arden Device 18h: Function 3 + 160c Arden Device 18h: Function 4 + 160d Arden Device 18h: Function 5 + 160e Arden Device 18h: Function 6 + 160f Arden Device 18h: Function 7 + 1620 Anubis HT Configuration + 1621 Anubis Address Maps + 1622 Anubis DRAM Configuration + 1623 Anubis Miscellaneous Configuration + 1624 Anubis PM Configuration + 1625 Anubis NB Performance Monitor + 1626 Arden Root Complex + 1627 Arden IOMMU + 1628 Arden PCIe Dummy Host Bridge + 1629 Arden PCIe GPP Bridge + 162a Arden Internal PCIe GPP Bridge 0 to bus X + 162b Arden PCIe Non-Transparent Bridge + 1630 Renoir Root Complex + 1631 Renoir IOMMU + 1632 Renoir PCIe Dummy Host Bridge + 1633 Renoir PCIe GPP Bridge + 1634 Renoir PCIe GPP Bridge + 1635 Renoir Internal PCIe GPP Bridge to Bus + 1637 Renoir HD Audio Controller + 1639 Renoir USB 3.1 + 1641 Renoir 10GbE Controller Port 0 (XGBE0/1) + 1642 Renoir WLAN + 1643 Renoir BT + 1644 Renoir I2S 1700 Family 12h/14h Processor Function 0 1701 Family 12h/14h Processor Function 1 1702 Family 12h/14h Processor Function 2 1703 Family 12h/14h Processor Function 3 1704 Family 12h/14h Processor Function 4 1705 Family 12h Processor Root Complex + 1706 Llano P2P Bridge to external GPU 1707 Family 12h Processor Root Port 1708 Family 12h Processor Root Port 1709 Family 12h Processor Root Port @@ -4450,6 +4848,9 @@ 43c7 400 Series Chipset PCIe Port 43c8 400 Series Chipset SATA Controller 43d5 400 Series Chipset USB 3.1 XHCI Controller + 57a3 Matisse PCIe GPP Bridge + 57a4 Matisse PCIe GPP Bridge + 57ad Matisse Switch Upstream 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -4508,6 +4909,8 @@ 7801 FCH SATA Controller [AHCI mode] 103c 168b ProBook 4535s Notebook 103c 194e ProBook 455 G1 Notebook + 17aa 3988 Z50-75 + 1849 7801 QC5000-ITX/PH 7802 FCH SATA Controller [RAID mode] 7803 FCH SATA Controller [RAID mode] 7804 FCH SATA Controller [AHCI mode] @@ -4517,37 +4920,57 @@ 7807 FCH USB OHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7807 QC5000-ITX/PH 7808 FCH USB EHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7808 QC5000-ITX/PH 7809 FCH USB OHCI Controller 103c 194e ProBook 455 G1 Notebook + 17aa 3988 Z50-75 + 780a Kabini/Mullins SATA Raid/AHCI Mode (DotHill driver) 780b FCH SMBus Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 780b QC5000-ITX/PH 780c FCH IDE Controller 780d FCH Azalia Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC 1043 8444 F2A85-M Series + 17aa 3988 Z50-75 + 1849 8892 QC5000-ITX/PH 780e FCH LPC Bridge 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 780e QC5000-ITX/PH 780f FCH PCI Bridge 7812 FCH USB XHCI Controller 7813 FCH SD Flash Controller 7814 FCH USB XHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7814 QC5000-ITX/PH 7900 FCH SATA Controller [IDE mode] 7901 FCH SATA Controller [AHCI mode] + 103c 8615 Pavilion Laptop 15-cw1xxx + 1462 7c37 X570-A PRO motherboard 7902 FCH SATA Controller [RAID mode] 7903 FCH SATA Controller [RAID mode] 7904 FCH SATA Controller [AHCI mode] 7906 FCH SD Flash Controller 7908 FCH USB EHCI Controller 790b FCH SMBus Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 1462 7c37 X570-A PRO motherboard *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Feb 27 13:12:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D3AD241283; Thu, 27 Feb 2020 13:12:16 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48StPD0Njzz4XYp; Thu, 27 Feb 2020 13:12:16 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E60AC193EA; Thu, 27 Feb 2020 13:12:15 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01RDCFPT005985; Thu, 27 Feb 2020 13:12:15 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RDCFJ7005981; Thu, 27 Feb 2020 13:12:15 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002271312.01RDCFJ7005981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Thu, 27 Feb 2020 13:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358379 - head/sys/dev/random X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/dev/random X-SVN-Commit-Revision: 358379 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 13:12:16 -0000 Author: kaktus Date: Thu Feb 27 13:12:14 2020 New Revision: 358379 URL: https://svnweb.freebsd.org/changeset/base/358379 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (18 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Reviewed by: cem Approved by: csprng, kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23841 Modified: head/sys/dev/random/fortuna.c head/sys/dev/random/ivy.c head/sys/dev/random/random_harvestq.c head/sys/dev/random/random_infra.c Modified: head/sys/dev/random/fortuna.c ============================================================================== --- head/sys/dev/random/fortuna.c Thu Feb 27 11:23:44 2020 (r358378) +++ head/sys/dev/random/fortuna.c Thu Feb 27 13:12:14 2020 (r358379) @@ -299,14 +299,14 @@ random_fortuna_init_alg(void *unused __unused) fortuna_state.fs_lasttime = 0; random_fortuna_o = SYSCTL_ADD_NODE(&random_clist, SYSCTL_STATIC_CHILDREN(_kern_random), - OID_AUTO, "fortuna", CTLFLAG_RW, 0, + OID_AUTO, "fortuna", CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Fortuna Parameters"); SYSCTL_ADD_PROC(&random_clist, - SYSCTL_CHILDREN(random_fortuna_o), OID_AUTO, - "minpoolsize", CTLTYPE_UINT | CTLFLAG_RWTUN, - &fortuna_state.fs_minpoolsize, RANDOM_FORTUNA_DEFPOOLSIZE, - random_check_uint_fs_minpoolsize, "IU", - "Minimum pool size necessary to cause a reseed"); + SYSCTL_CHILDREN(random_fortuna_o), OID_AUTO, "minpoolsize", + CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &fortuna_state.fs_minpoolsize, RANDOM_FORTUNA_DEFPOOLSIZE, + random_check_uint_fs_minpoolsize, "IU", + "Minimum pool size necessary to cause a reseed"); KASSERT(fortuna_state.fs_minpoolsize > 0, ("random: Fortuna threshold must be > 0 at startup")); SYSCTL_ADD_BOOL(&random_clist, SYSCTL_CHILDREN(random_fortuna_o), Modified: head/sys/dev/random/ivy.c ============================================================================== --- head/sys/dev/random/ivy.c Thu Feb 27 11:23:44 2020 (r358378) +++ head/sys/dev/random/ivy.c Thu Feb 27 13:12:14 2020 (r358379) @@ -60,7 +60,7 @@ static struct random_source random_ivy = { .rs_read = random_ivy_read }; -SYSCTL_NODE(_kern_random, OID_AUTO, rdrand, CTLFLAG_RW, 0, +SYSCTL_NODE(_kern_random, OID_AUTO, rdrand, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "rdrand (ivy) entropy source"); static bool acquire_independent_seed_samples = false; SYSCTL_BOOL(_kern_random_rdrand, OID_AUTO, rdrand_independent_seed, Modified: head/sys/dev/random/random_harvestq.c ============================================================================== --- head/sys/dev/random/random_harvestq.c Thu Feb 27 11:23:44 2020 (r358378) +++ head/sys/dev/random/random_harvestq.c Thu Feb 27 13:12:14 2020 (r358379) @@ -111,7 +111,7 @@ struct random_sources { static CK_LIST_HEAD(sources_head, random_sources) source_list = CK_LIST_HEAD_INITIALIZER(source_list); -SYSCTL_NODE(_kern_random, OID_AUTO, harvest, CTLFLAG_RW, 0, +SYSCTL_NODE(_kern_random, OID_AUTO, harvest, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Entropy Device Parameters"); /* @@ -305,8 +305,10 @@ random_check_uint_harvestmask(SYSCTL_HANDLER_ARGS) (orig_value & user_immutable_mask); return (0); } -SYSCTL_PROC(_kern_random_harvest, OID_AUTO, mask, CTLTYPE_UINT | CTLFLAG_RW, - NULL, 0, random_check_uint_harvestmask, "IU", "Entropy harvesting mask"); +SYSCTL_PROC(_kern_random_harvest, OID_AUTO, mask, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, NULL, 0, + random_check_uint_harvestmask, "IU", + "Entropy harvesting mask"); /* ARGSUSED */ static int @@ -326,7 +328,8 @@ random_print_harvestmask(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_random_harvest, OID_AUTO, mask_bin, - CTLTYPE_STRING | CTLFLAG_RD, NULL, 0, random_print_harvestmask, "A", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, + random_print_harvestmask, "A", "Entropy harvesting mask (printable)"); static const char *random_source_descr[ENTROPYSOURCE] = { @@ -387,8 +390,9 @@ random_print_harvestmask_symbolic(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_random_harvest, OID_AUTO, mask_symbolic, - CTLTYPE_STRING | CTLFLAG_RD, NULL, 0, random_print_harvestmask_symbolic, - "A", "Entropy harvesting mask (symbolic)"); + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, + random_print_harvestmask_symbolic, "A", + "Entropy harvesting mask (symbolic)"); /* ARGSUSED */ static void Modified: head/sys/dev/random/random_infra.c ============================================================================== --- head/sys/dev/random/random_infra.c Thu Feb 27 11:23:44 2020 (r358378) +++ head/sys/dev/random/random_infra.c Thu Feb 27 13:12:14 2020 (r358379) @@ -38,9 +38,10 @@ __FBSDID("$FreeBSD$"); #include /* Set up the sysctl root node for the entropy device */ -SYSCTL_NODE(_kern, OID_AUTO, random, CTLFLAG_RW, 0, +SYSCTL_NODE(_kern, OID_AUTO, random, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Cryptographically Secure Random Number Generator"); -SYSCTL_NODE(_kern_random, OID_AUTO, initial_seeding, CTLFLAG_RW, 0, +SYSCTL_NODE(_kern_random, OID_AUTO, initial_seeding, + CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Initial seeding control and information"); /* From owner-svn-src-head@freebsd.org Thu Feb 27 14:12:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BC53242B9D; Thu, 27 Feb 2020 14:12:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Svl00rSfz4YbB; Thu, 27 Feb 2020 14:12:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7BD419F6B; Thu, 27 Feb 2020 14:12:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01REChec042441; Thu, 27 Feb 2020 14:12:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01REChVC042440; Thu, 27 Feb 2020 14:12:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202002271412.01REChVC042440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 27 Feb 2020 14:12:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358380 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358380 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 14:12:44 -0000 Author: avg Date: Thu Feb 27 14:12:43 2020 New Revision: 358380 URL: https://svnweb.freebsd.org/changeset/base/358380 Log: dsl_dataset_promote_sync: populate 'oldname' before using it It's very unlikely that zfsvfs_update_fromname() and zvol_rename_minors() ever did anything during the promote operation as the old name was not initialized. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu Feb 27 13:12:14 2020 (r358379) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu Feb 27 14:12:43 2020 (r358380) @@ -3109,6 +3109,10 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx) ds->ds_objset = NULL; } +#if defined(__FreeBSD__) && defined(_KERNEL) + dsl_dataset_name(ds, oldname); +#endif + /* move snap name entry */ VERIFY0(dsl_dataset_get_snapname(ds)); VERIFY0(dsl_dataset_snap_remove(origin_head, From owner-svn-src-head@freebsd.org Thu Feb 27 14:21:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD09E242CD3; Thu, 27 Feb 2020 14:21:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SvwZ4tq5z3wtn; Thu, 27 Feb 2020 14:21:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6458F19FA5; Thu, 27 Feb 2020 14:21:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01REL2hT043603; Thu, 27 Feb 2020 14:21:02 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01REL2nF043602; Thu, 27 Feb 2020 14:21:02 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202002271421.01REL2nF043602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 27 Feb 2020 14:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358381 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358381 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 14:21:03 -0000 Author: avg Date: Thu Feb 27 14:21:01 2020 New Revision: 358381 URL: https://svnweb.freebsd.org/changeset/base/358381 Log: use ZFS_MAX_DATASET_NAME_LEN instead of MAXPATHLEN for dataset names The change affects only FreeBSD specific code as the common code already mostly uses the more idiomatic and correct ZFS_MAX_DATASET_NAME_LEN. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu Feb 27 14:12:43 2020 (r358380) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu Feb 27 14:21:01 2020 (r358381) @@ -2528,16 +2528,16 @@ dsl_dataset_rename_snapshot_sync_impl(dsl_pool_t *dp, #ifdef __FreeBSD__ #ifdef _KERNEL - oldname = kmem_alloc(MAXPATHLEN, KM_SLEEP); - newname = kmem_alloc(MAXPATHLEN, KM_SLEEP); - snprintf(oldname, MAXPATHLEN, "%s@%s", ddrsa->ddrsa_fsname, - ddrsa->ddrsa_oldsnapname); - snprintf(newname, MAXPATHLEN, "%s@%s", ddrsa->ddrsa_fsname, - ddrsa->ddrsa_newsnapname); + oldname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); + newname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); + snprintf(oldname, ZFS_MAX_DATASET_NAME_LEN, "%s@%s", + ddrsa->ddrsa_fsname, ddrsa->ddrsa_oldsnapname); + snprintf(newname, ZFS_MAX_DATASET_NAME_LEN, "%s@%s", + ddrsa->ddrsa_fsname, ddrsa->ddrsa_newsnapname); zfsvfs_update_fromname(oldname, newname); zvol_rename_minors(oldname, newname); - kmem_free(newname, MAXPATHLEN); - kmem_free(oldname, MAXPATHLEN); + kmem_free(newname, ZFS_MAX_DATASET_NAME_LEN); + kmem_free(oldname, ZFS_MAX_DATASET_NAME_LEN); #endif #endif dsl_dataset_rele(ds, FTAG); @@ -3090,8 +3090,8 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx) /* Take the spa_namespace_lock early so zvol renames don't deadlock. */ mutex_enter(&spa_namespace_lock); - oldname = kmem_alloc(MAXPATHLEN, KM_SLEEP); - newname = kmem_alloc(MAXPATHLEN, KM_SLEEP); + oldname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); + newname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); #endif /* move snapshots to this dir */ @@ -3179,8 +3179,8 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx) #if defined(__FreeBSD__) && defined(_KERNEL) mutex_exit(&spa_namespace_lock); - kmem_free(newname, MAXPATHLEN); - kmem_free(oldname, MAXPATHLEN); + kmem_free(newname, ZFS_MAX_DATASET_NAME_LEN); + kmem_free(oldname, ZFS_MAX_DATASET_NAME_LEN); #endif /* * Change space accounting. From owner-svn-src-head@freebsd.org Thu Feb 27 14:27:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46240242FC7; Thu, 27 Feb 2020 14:27:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Sw4G736zz4DYG; Thu, 27 Feb 2020 14:27:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D7BB71A13B; Thu, 27 Feb 2020 14:27:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01RERgN3048425; Thu, 27 Feb 2020 14:27:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RERgob048424; Thu, 27 Feb 2020 14:27:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202002271427.01RERgob048424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 27 Feb 2020 14:27:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358382 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358382 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 14:27:43 -0000 Author: avg Date: Thu Feb 27 14:27:42 2020 New Revision: 358382 URL: https://svnweb.freebsd.org/changeset/base/358382 Log: remove stray space symbol in r358380 MFC after: 1 week X-MFC with: r358380 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu Feb 27 14:21:01 2020 (r358381) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu Feb 27 14:27:42 2020 (r358382) @@ -3110,7 +3110,7 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx) } #if defined(__FreeBSD__) && defined(_KERNEL) - dsl_dataset_name(ds, oldname); + dsl_dataset_name(ds, oldname); #endif /* move snap name entry */ From owner-svn-src-head@freebsd.org Thu Feb 27 15:21:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00EBC244CF2; Thu, 27 Feb 2020 15:21:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SxFt5Gqdz47b6; Thu, 27 Feb 2020 15:21:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8ECB61AB5A; Thu, 27 Feb 2020 15:21:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01RFL6kH079911; Thu, 27 Feb 2020 15:21:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RFL6XL079909; Thu, 27 Feb 2020 15:21:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002271521.01RFL6XL079909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 27 Feb 2020 15:21:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358387 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 358387 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 15:21:07 -0000 Author: hselasky Date: Thu Feb 27 15:21:05 2020 New Revision: 358387 URL: https://svnweb.freebsd.org/changeset/base/358387 Log: Extend the range of the return value from nsecs_to_jiffies64() to support Mesa's drm_syncobj usage, in the LinuxKPI. While at it optimise the jiffies conversion functions to avoid repeated and constant calculations. Submitted by: Greg V Differential Revision: https://reviews.freebsd.org/D23846 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/jiffies.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/jiffies.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/jiffies.h Thu Feb 27 15:08:43 2020 (r358386) +++ head/sys/compat/linuxkpi/common/include/linux/jiffies.h Thu Feb 27 15:21:05 2020 (r358387) @@ -54,6 +54,18 @@ #define HZ hz +extern uint64_t lkpi_nsec2hz_rem; +extern uint64_t lkpi_nsec2hz_div; +extern uint64_t lkpi_nsec2hz_max; + +extern uint64_t lkpi_usec2hz_rem; +extern uint64_t lkpi_usec2hz_div; +extern uint64_t lkpi_usec2hz_max; + +extern uint64_t lkpi_msec2hz_rem; +extern uint64_t lkpi_msec2hz_div; +extern uint64_t lkpi_msec2hz_max; + static inline int timespec_to_jiffies(const struct timespec *ts) { @@ -70,12 +82,11 @@ timespec_to_jiffies(const struct timespec *ts) static inline int msecs_to_jiffies(uint64_t msec) { - uint64_t msec_max, result; + uint64_t result; - msec_max = -1ULL / (uint64_t)hz; - if (msec > msec_max) - msec = msec_max; - result = howmany(msec * (uint64_t)hz, 1000ULL); + if (msec > lkpi_msec2hz_max) + msec = lkpi_msec2hz_max; + result = howmany(msec * lkpi_msec2hz_rem, lkpi_msec2hz_div); if (result > MAX_JIFFY_OFFSET) result = MAX_JIFFY_OFFSET; @@ -85,12 +96,11 @@ msecs_to_jiffies(uint64_t msec) static inline int usecs_to_jiffies(uint64_t usec) { - uint64_t usec_max, result; + uint64_t result; - usec_max = -1ULL / (uint64_t)hz; - if (usec > usec_max) - usec = usec_max; - result = howmany(usec * (uint64_t)hz, 1000000ULL); + if (usec > lkpi_usec2hz_max) + usec = lkpi_usec2hz_max; + result = howmany(usec * lkpi_usec2hz_rem, lkpi_usec2hz_div); if (result > MAX_JIFFY_OFFSET) result = MAX_JIFFY_OFFSET; @@ -100,23 +110,24 @@ usecs_to_jiffies(uint64_t usec) static inline uint64_t nsecs_to_jiffies64(uint64_t nsec) { - uint64_t nsec_max, result; - nsec_max = -1ULL / (uint64_t)hz; - if (nsec > nsec_max) - nsec = nsec_max; - result = howmany(nsec * (uint64_t)hz, 1000000000ULL); - if (result > MAX_JIFFY_OFFSET) - result = MAX_JIFFY_OFFSET; - - return (result); + if (nsec > lkpi_nsec2hz_max) + nsec = lkpi_nsec2hz_max; + return (howmany(nsec * lkpi_nsec2hz_rem, lkpi_nsec2hz_div)); } -static inline uint64_t -nsecs_to_jiffies(uint64_t n) +static inline unsigned long +nsecs_to_jiffies(uint64_t nsec) { - return (usecs_to_jiffies(howmany(n, 1000ULL))); + if (sizeof(unsigned long) >= sizeof(uint64_t)) { + if (nsec > lkpi_nsec2hz_max) + nsec = lkpi_nsec2hz_max; + } else { + if (nsec > (lkpi_nsec2hz_max >> 32)) + nsec = (lkpi_nsec2hz_max >> 32); + } + return (howmany(nsec * lkpi_nsec2hz_rem, lkpi_nsec2hz_div)); } static inline uint64_t Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Feb 27 15:08:43 2020 (r358386) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Feb 27 15:21:05 2020 (r358387) @@ -1934,9 +1934,38 @@ del_timer(struct timer_list *timer) return (1); } +/* greatest common divisor, Euclid equation */ +static uint64_t +lkpi_gcd_64(uint64_t a, uint64_t b) +{ + uint64_t an; + uint64_t bn; + + while (b != 0) { + an = b; + bn = a % b; + a = an; + b = bn; + } + return (a); +} + +uint64_t lkpi_nsec2hz_rem; +uint64_t lkpi_nsec2hz_div = 1000000000ULL; +uint64_t lkpi_nsec2hz_max; + +uint64_t lkpi_usec2hz_rem; +uint64_t lkpi_usec2hz_div = 1000000ULL; +uint64_t lkpi_usec2hz_max; + +uint64_t lkpi_msec2hz_rem; +uint64_t lkpi_msec2hz_div = 1000ULL; +uint64_t lkpi_msec2hz_max; + static void linux_timer_init(void *arg) { + uint64_t gcd; /* * Compute an internal HZ value which can divide 2**32 to @@ -1947,6 +1976,27 @@ linux_timer_init(void *arg) while (linux_timer_hz_mask < (unsigned long)hz) linux_timer_hz_mask *= 2; linux_timer_hz_mask--; + + /* compute some internal constants */ + + lkpi_nsec2hz_rem = hz; + lkpi_usec2hz_rem = hz; + lkpi_msec2hz_rem = hz; + + gcd = lkpi_gcd_64(lkpi_nsec2hz_rem, lkpi_nsec2hz_div); + lkpi_nsec2hz_rem /= gcd; + lkpi_nsec2hz_div /= gcd; + lkpi_nsec2hz_max = -1ULL / lkpi_nsec2hz_rem; + + gcd = lkpi_gcd_64(lkpi_usec2hz_rem, lkpi_usec2hz_div); + lkpi_usec2hz_rem /= gcd; + lkpi_usec2hz_div /= gcd; + lkpi_usec2hz_max = -1ULL / lkpi_usec2hz_rem; + + gcd = lkpi_gcd_64(lkpi_msec2hz_rem, lkpi_msec2hz_div); + lkpi_msec2hz_rem /= gcd; + lkpi_msec2hz_div /= gcd; + lkpi_msec2hz_max = -1ULL / lkpi_msec2hz_rem; } SYSINIT(linux_timer, SI_SUB_DRIVERS, SI_ORDER_FIRST, linux_timer_init, NULL); From owner-svn-src-head@freebsd.org Thu Feb 27 15:25:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E559244F74; Thu, 27 Feb 2020 15:25:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SxLp43ssz4KKq; Thu, 27 Feb 2020 15:25:22 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A3E41AD29; Thu, 27 Feb 2020 15:25:22 +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 01RFPMVO086661; Thu, 27 Feb 2020 15:25:22 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RFPLMe086658; Thu, 27 Feb 2020 15:25:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002271525.01RFPLMe086658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 27 Feb 2020 15:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358389 - in head/sys/dev/sfxge: . common X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/dev/sfxge: . common X-SVN-Commit-Revision: 358389 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 15:25:23 -0000 Author: imp Date: Thu Feb 27 15:25:21 2020 New Revision: 358389 URL: https://svnweb.freebsd.org/changeset/base/358389 Log: Remove support for FreeBSD 7 and 8 Also, unifdef -DSFXGE_HAVE_DESCRIBE_INTR since it's now always defined. Modified: head/sys/dev/sfxge/common/efsys.h head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_intr.c Modified: head/sys/dev/sfxge/common/efsys.h ============================================================================== --- head/sys/dev/sfxge/common/efsys.h Thu Feb 27 15:22:18 2020 (r358388) +++ head/sys/dev/sfxge/common/efsys.h Thu Feb 27 15:25:21 2020 (r358389) @@ -72,11 +72,6 @@ extern "C" { #endif #include "efx_types.h" -/* Common code requires this */ -#if __FreeBSD_version < 800068 -#define memmove(d, s, l) bcopy(s, d, l) -#endif - #ifndef B_FALSE #define B_FALSE FALSE #endif @@ -88,7 +83,7 @@ extern "C" { #define ISP2(x) (((x) & ((x) - 1)) == 0) #endif -#if defined(__x86_64__) && __FreeBSD_version >= 1000000 +#if defined(__x86_64__) #define SFXGE_USE_BUS_SPACE_8 1 Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Thu Feb 27 15:22:18 2020 (r358388) +++ head/sys/dev/sfxge/sfxge.h Thu Feb 27 15:25:21 2020 (r358389) @@ -93,11 +93,6 @@ #define IFM_40G_CR4 IFM_UNKNOWN #endif -#if (__FreeBSD_version >= 800501 && __FreeBSD_version < 900000) || \ - __FreeBSD_version >= 900003 -#define SFXGE_HAVE_DESCRIBE_INTR -#endif - #ifdef IFM_ETH_RXPAUSE #define SFXGE_HAVE_PAUSE_MEDIAOPTS #endif Modified: head/sys/dev/sfxge/sfxge_intr.c ============================================================================== --- head/sys/dev/sfxge/sfxge_intr.c Thu Feb 27 15:22:18 2020 (r358388) +++ head/sys/dev/sfxge/sfxge_intr.c Thu Feb 27 15:25:21 2020 (r358389) @@ -195,11 +195,9 @@ sfxge_intr_bus_enable(struct sfxge_softc *sc) sc->evq[index], &table[index].eih_tag)) != 0) { goto fail; } -#ifdef SFXGE_HAVE_DESCRIBE_INTR if (intr->n_alloc > 1) bus_describe_intr(sc->dev, table[index].eih_res, table[index].eih_tag, "%d", index); -#endif #ifdef RSS bus_bind_intr(sc->dev, table[index].eih_res, rss_getcpu(index)); From owner-svn-src-head@freebsd.org Thu Feb 27 15:25:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D9CF2244F9B; Thu, 27 Feb 2020 15:25:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SxLw1ZHfz4KXs; Thu, 27 Feb 2020 15:25:28 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9119D1AD2A; Thu, 27 Feb 2020 15:25:27 +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 01RFPRAh086719; Thu, 27 Feb 2020 15:25:27 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RFPQgb086714; Thu, 27 Feb 2020 15:25:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002271525.01RFPQgb086714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 27 Feb 2020 15:25:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358390 - head/sys/dev/oce X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/oce X-SVN-Commit-Revision: 358390 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 15:25:29 -0000 Author: imp Date: Thu Feb 27 15:25:26 2020 New Revision: 358390 URL: https://svnweb.freebsd.org/changeset/base/358390 Log: Remove FreeBSD 7-9 support from oce Use newer pci_find_cap API now that the need to remap the old API is gone. Modified: head/sys/dev/oce/oce_hw.c head/sys/dev/oce/oce_if.c head/sys/dev/oce/oce_queue.c Modified: head/sys/dev/oce/oce_hw.c ============================================================================== --- head/sys/dev/oce/oce_hw.c Thu Feb 27 15:25:21 2020 (r358389) +++ head/sys/dev/oce/oce_hw.c Thu Feb 27 15:25:26 2020 (r358390) @@ -206,16 +206,12 @@ void oce_get_pci_capabilities(POCE_SOFTC sc) { uint32_t val; -#if __FreeBSD_version >= 1000000 - #define pci_find_extcap pci_find_cap -#endif - - if (pci_find_extcap(sc->dev, PCIY_PCIX, &val) == 0) { + if (pci_find_cap(sc->dev, PCIY_PCIX, &val) == 0) { if (val != 0) sc->flags |= OCE_FLAGS_PCIX; } - if (pci_find_extcap(sc->dev, PCIY_EXPRESS, &val) == 0) { + if (pci_find_cap(sc->dev, PCIY_EXPRESS, &val) == 0) { if (val != 0) { uint16_t link_status = pci_read_config(sc->dev, val + 0x12, 2); @@ -226,12 +222,12 @@ void oce_get_pci_capabilities(POCE_SOFTC sc) } } - if (pci_find_extcap(sc->dev, PCIY_MSI, &val) == 0) { + if (pci_find_cap(sc->dev, PCIY_MSI, &val) == 0) { if (val != 0) sc->flags |= OCE_FLAGS_MSI_CAPABLE; } - if (pci_find_extcap(sc->dev, PCIY_MSIX, &val) == 0) { + if (pci_find_cap(sc->dev, PCIY_MSIX, &val) == 0) { if (val != 0) { val = pci_msix_count(sc->dev); sc->flags |= OCE_FLAGS_MSIX_CAPABLE; Modified: head/sys/dev/oce/oce_if.c ============================================================================== --- head/sys/dev/oce/oce_if.c Thu Feb 27 15:25:21 2020 (r358389) +++ head/sys/dev/oce/oce_if.c Thu Feb 27 15:25:26 2020 (r358390) @@ -1291,11 +1291,7 @@ oce_tx_restart(POCE_SOFTC sc, struct oce_wq *wq) if ((sc->ifp->if_drv_flags & IFF_DRV_RUNNING) != IFF_DRV_RUNNING) return; -#if __FreeBSD_version >= 800000 if (!drbr_empty(sc->ifp, wq->br)) -#else - if (!IFQ_DRV_IS_EMPTY(&sc->ifp->if_snd)) -#endif taskqueue_enqueue(taskqueue_swi, &wq->txtask); } @@ -1378,7 +1374,6 @@ oce_tx_task(void *arg, int npending) struct ifnet *ifp = sc->ifp; int rc = 0; -#if __FreeBSD_version >= 800000 LOCK(&wq->tx_lock); rc = oce_multiq_transmit(ifp, NULL, wq); if (rc) { @@ -1386,10 +1381,6 @@ oce_tx_task(void *arg, int npending) "TX[%d] restart failed\n", wq->queue_index); } UNLOCK(&wq->tx_lock); -#else - oce_start(ifp); -#endif - } @@ -1676,13 +1667,12 @@ oce_rx_lro(struct oce_rq *rq, struct nic_hwlro_singlet } m->m_pkthdr.rcvif = sc->ifp; -#if __FreeBSD_version >= 800000 if (rq->queue_index) m->m_pkthdr.flowid = (rq->queue_index - 1); else m->m_pkthdr.flowid = rq->queue_index; M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); -#endif + /* This deternies if vlan tag is Valid */ if (cq_info.vtp) { if (sc->function_mode & FNM_FLEX10_MODE) { @@ -1754,13 +1744,12 @@ oce_rx(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe) if (m) { m->m_pkthdr.rcvif = sc->ifp; -#if __FreeBSD_version >= 800000 if (rq->queue_index) m->m_pkthdr.flowid = (rq->queue_index - 1); else m->m_pkthdr.flowid = rq->queue_index; M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); -#endif + /* This deternies if vlan tag is Valid */ if (oce_cqe_vtp_valid(sc, cqe)) { if (sc->function_mode & FNM_FLEX10_MODE) { @@ -2182,10 +2171,8 @@ oce_attach_ifp(POCE_SOFTC sc) sc->ifp->if_init = oce_init; sc->ifp->if_mtu = ETHERMTU; sc->ifp->if_softc = sc; -#if __FreeBSD_version >= 800000 sc->ifp->if_transmit = oce_multiq_start; sc->ifp->if_qflush = oce_multiq_flush; -#endif if_initname(sc->ifp, device_get_name(sc->dev), device_get_unit(sc->dev)); @@ -2211,11 +2198,9 @@ oce_attach_ifp(POCE_SOFTC sc) sc->ifp->if_capenable = sc->ifp->if_capabilities; sc->ifp->if_baudrate = IF_Gbps(10); -#if __FreeBSD_version >= 1000000 sc->ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); sc->ifp->if_hw_tsomaxsegcount = OCE_MAX_TX_ELEMENTS; sc->ifp->if_hw_tsomaxsegsize = 4096; -#endif ether_ifattach(sc->ifp, sc->macaddr.mac_addr); Modified: head/sys/dev/oce/oce_queue.c ============================================================================== --- head/sys/dev/oce/oce_queue.c Thu Feb 27 15:25:21 2020 (r358389) +++ head/sys/dev/oce/oce_queue.c Thu Feb 27 15:25:26 2020 (r358390) @@ -263,13 +263,11 @@ oce_wq *oce_wq_init(POCE_SOFTC sc, uint32_t q_len, uin LOCK_CREATE(&wq->tx_lock, "TX_lock"); LOCK_CREATE(&wq->tx_compl_lock, "WQ_HANDLER_LOCK"); -#if __FreeBSD_version >= 800000 /* Allocate buf ring for multiqueue*/ wq->br = buf_ring_alloc(4096, M_DEVBUF, M_WAITOK, &wq->tx_lock.mutex); if (!wq->br) goto free_wq; -#endif return wq; From owner-svn-src-head@freebsd.org Thu Feb 27 15:25:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0F02244FEB; Thu, 27 Feb 2020 15:25:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SxM13cRPz4KkP; Thu, 27 Feb 2020 15:25: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61B8C1AD2D; Thu, 27 Feb 2020 15:25: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 01RFPWnh086775; Thu, 27 Feb 2020 15:25:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RFPWpQ086774; Thu, 27 Feb 2020 15:25:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002271525.01RFPWpQ086774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 27 Feb 2020 15:25:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358391 - head/sys/dev/rndtest X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/rndtest X-SVN-Commit-Revision: 358391 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 15:25:33 -0000 Author: imp Date: Thu Feb 27 15:25:31 2020 New Revision: 358391 URL: https://svnweb.freebsd.org/changeset/base/358391 Log: Remove FreeBSD 4 support Modified: head/sys/dev/rndtest/rndtest.c Modified: head/sys/dev/rndtest/rndtest.c ============================================================================== --- head/sys/dev/rndtest/rndtest.c Thu Feb 27 15:25:26 2020 (r358390) +++ head/sys/dev/rndtest/rndtest.c Thu Feb 27 15:25:31 2020 (r358391) @@ -97,11 +97,7 @@ rndtest_attach(device_t dev) rsp->rs_discard = 1; rsp->rs_collect = 1; rsp->rs_parent = dev; -#if __FreeBSD_version < 500000 - callout_init(&rsp->rs_to); -#else callout_init(&rsp->rs_to, 1); -#endif } else device_printf(dev, "rndtest_init: no memory for state block\n"); return (rsp); From owner-svn-src-head@freebsd.org Thu Feb 27 15:30:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F2612451B5; Thu, 27 Feb 2020 15:30:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SxSQ38CZz4VgK; Thu, 27 Feb 2020 15:30:14 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E91221AD36; Thu, 27 Feb 2020 15:30:13 +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 01RFUDpp087175; Thu, 27 Feb 2020 15:30:13 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RFUDJA087174; Thu, 27 Feb 2020 15:30:13 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002271530.01RFUDJA087174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 27 Feb 2020 15:30:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358392 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 358392 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 15:30:14 -0000 Author: imp Date: Thu Feb 27 15:30:13 2020 New Revision: 358392 URL: https://svnweb.freebsd.org/changeset/base/358392 Log: _Static_assert is to be preferred to CTASSERT. Document the existing prefernce that _Static_assert be used in preference to the old CTASSERT we used to use for compile time assertions. Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Thu Feb 27 15:25:31 2020 (r358391) +++ head/share/man/man9/style.9 Thu Feb 27 15:30:13 2020 (r358392) @@ -25,7 +25,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd December 13, 2019 +.Dd January 10, 2020 .Dt STYLE 9 .Os .Sh NAME @@ -893,6 +893,11 @@ Whenever possible, code should be run through a code c (e.g., various static analyzers or .Nm cc Fl Wall ) and produce minimal warnings. +.Pp +New code should use +.Fn _Static_assert +instead of the older +.Fn CTASSERT . .Sh FILES .Bl -tag -width indent .It Pa /usr/src/tools/tools/editing/freebsd.el From owner-svn-src-head@freebsd.org Thu Feb 27 15:34:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C8F824544A; Thu, 27 Feb 2020 15:34:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SxYN13CGz3Cjs; Thu, 27 Feb 2020 15:34:32 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D162C1AEFF; Thu, 27 Feb 2020 15:34: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 01RFYVcO092592; Thu, 27 Feb 2020 15:34:31 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RFYVnu092589; Thu, 27 Feb 2020 15:34:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002271534.01RFYVnu092589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 27 Feb 2020 15:34:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358393 - in head/sys: conf riscv/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: conf riscv/include X-SVN-Commit-Revision: 358393 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 15:34:32 -0000 Author: imp Date: Thu Feb 27 15:34:30 2020 New Revision: 358393 URL: https://svnweb.freebsd.org/changeset/base/358393 Log: Better check for floating point type. Use __riscv_flen instead of __riscv_float_abi_soft. While the latter works for userland (and one could argue it's more correct), it fails for the kernel. We compile the kernel with -mabi=lp64 (eg soft float abi) to avoid floating point instructions in the kernel. We also compile the kernel -march=rv64imafdc for hard float kernels (eg those with options FPE), but with -march=rv64imac for softfloat kernels (eg those with FPE). Since we do this, in the kernel (as in userland) __riscv_flen will be defined for 'riscv64' and not for 'riscv64sf'. This also removes the -DMACHINE_ARCH hack now that it's no longer needed. Longer term, we should return the ABI from the sysctl hw.machine_arch like on amd64 for i386 binaries. Suggested by: mhorne@ Differential Revision: https://reviews.freebsd.org/D23813 Modified: head/sys/conf/Makefile.riscv head/sys/conf/kern.mk head/sys/riscv/include/param.h Modified: head/sys/conf/Makefile.riscv ============================================================================== --- head/sys/conf/Makefile.riscv Thu Feb 27 15:30:13 2020 (r358392) +++ head/sys/conf/Makefile.riscv Thu Feb 27 15:34:30 2020 (r358393) @@ -46,10 +46,6 @@ SYSTEM_LD= @${LD} -N -m ${LD_EMULATION} -Bdynamic -T $ CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls .endif -# Currently, the compile flags don't let the kernel know if this is a hard-float -# ABI build or a soft-float ABI build. We need to pass in this information. -CFLAGS += -DMACHINE_ARCH=\"${MACHINE_ARCH}\" - # hack because genassym.c includes sys/bus.h which includes these. genassym.o: bus_if.h device_if.h Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Thu Feb 27 15:30:13 2020 (r358392) +++ head/sys/conf/kern.mk Thu Feb 27 15:34:30 2020 (r358393) @@ -139,14 +139,23 @@ INLINE_LIMIT?= 8000 # # For RISC-V we specify the soft-float ABI (lp64) to avoid the use of floating -# point registers within the kernel. We also specify the "medium" code model, -# which generates code suitable for a 2GiB addressing range located at any -# offset, allowing modules to be located anywhere in the 64-bit address space. -# Note that clang and GCC refer to this code model as "medium" and "medany" -# respectively. +# point registers within the kernel. However, for kernels supporting hardware +# float (FPE), we have to include that in the march so we can have limited +# floating point support in context switching needed for that. This is different +# than userland where we use a hard-float ABI (lp64d). # +# We also specify the "medium" code model, which generates code suitable for a +# 2GiB addressing range located at any offset, allowing modules to be located +# anywhere in the 64-bit address space. Note that clang and GCC refer to this +# code model as "medium" and "medany" respectively. +# .if ${MACHINE_CPUARCH} == "riscv" -CFLAGS+= -march=rv64imafdc -mabi=lp64 +.if ${MACHINE_ARCH:Mriscv*sf} +CFLAGS+= -march=rv64imac +.else +CFLAGS+= -march=rv64imafdc +.endif +CFLAGS+= -mabi=lp64 CFLAGS.clang+= -mcmodel=medium CFLAGS.gcc+= -mcmodel=medany INLINE_LIMIT?= 8000 Modified: head/sys/riscv/include/param.h ============================================================================== --- head/sys/riscv/include/param.h Thu Feb 27 15:30:13 2020 (r358392) +++ head/sys/riscv/include/param.h Thu Feb 27 15:34:30 2020 (r358393) @@ -46,10 +46,17 @@ #define MACHINE "riscv" #endif #ifndef MACHINE_ARCH -#ifdef __riscv_float_abi_soft -#define MACHINE_ARCH "riscv64sf" -#else +/* + * Check to see if we're building with hardware floating instructions + * allowed. We check this instead of hard vs soft float ABI because we build the + * kernel with soft float ABI to avoid hard float instruction generation. If + * we ever allow a 'soft ABI but with hard floats' userland, then we'll need + * to rethink this. + */ +#ifdef __riscv_flen #define MACHINE_ARCH "riscv64" +#else +#define MACHINE_ARCH "riscv64sf" #endif #endif From owner-svn-src-head@freebsd.org Thu Feb 27 16:51:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83CEA2477FD; Thu, 27 Feb 2020 16:51:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SzGQ1yYjz3Mld; Thu, 27 Feb 2020 16:51:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4DB51BDE2; Thu, 27 Feb 2020 16:51: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 01RGpfQm038510; Thu, 27 Feb 2020 16:51:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RGpf4x038509; Thu, 27 Feb 2020 16:51:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202002271651.01RGpf4x038509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 27 Feb 2020 16:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358394 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 358394 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 16:51:42 -0000 Author: jhb Date: Thu Feb 27 16:51:41 2020 New Revision: 358394 URL: https://svnweb.freebsd.org/changeset/base/358394 Log: Use stream_read() to read all 12 bytes of the RFB client version. read() can return a short read, whereas stream_read() waits until the full version string is read. Submitted by: Ka Ho Ng Reviewed by: grehan MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23591 Modified: head/usr.sbin/bhyve/rfb.c Modified: head/usr.sbin/bhyve/rfb.c ============================================================================== --- head/usr.sbin/bhyve/rfb.c Thu Feb 27 15:34:30 2020 (r358393) +++ head/usr.sbin/bhyve/rfb.c Thu Feb 27 16:51:41 2020 (r358394) @@ -76,6 +76,7 @@ static int rfb_debug = 0; #define DPRINTF(params) if (rfb_debug) PRINTLN params #define WPRINTF(params) PRINTLN params +#define VERSION_LENGTH 12 #define AUTH_LENGTH 16 #define PASSWD_LENGTH 8 @@ -769,7 +770,7 @@ rfb_handle(struct rfb_softc *rc, int cfd) stream_write(cfd, vbuf, strlen(vbuf)); /* 1b. Read client version */ - len = read(cfd, buf, sizeof(buf)); + len = stream_read(cfd, buf, VERSION_LENGTH); /* 2a. Send security type */ buf[0] = 1; From owner-svn-src-head@freebsd.org Thu Feb 27 16:55:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 824D4247927; Thu, 27 Feb 2020 16:55:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SzLF1NHRz40YT; Thu, 27 Feb 2020 16:55:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 6D86C17A66; Thu, 27 Feb 2020 16:55:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358392 - head/share/man/man9 To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002271530.01RFUDJA087174@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <5a876bf9-56b5-9465-07f4-2c540313755d@FreeBSD.org> Date: Thu, 27 Feb 2020 08:54:55 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <202002271530.01RFUDJA087174@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 16:55:01 -0000 On 2/27/20 7:30 AM, Warner Losh wrote: > Author: imp > Date: Thu Feb 27 15:30:13 2020 > New Revision: 358392 > URL: https://svnweb.freebsd.org/changeset/base/358392 > > Log: > _Static_assert is to be preferred to CTASSERT. > > Document the existing prefernce that _Static_assert be used in preference to the > old CTASSERT we used to use for compile time assertions. Actually, I think what we want to use is static_assert(). The intention in userland C is that _Static_assert() is an internal keyword and adds static_assert() as an alias, similar to defining alignas, etc. I think what we should do for the kernel is have define map static_assert to _Static_assert and replace existing _Static_assert usage with the proper spelling. -- John Baldwin From owner-svn-src-head@freebsd.org Thu Feb 27 17:13:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B792A247F09; Thu, 27 Feb 2020 17:13:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Szm53bj2z4bY3; Thu, 27 Feb 2020 17:13:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76BAE1C205; Thu, 27 Feb 2020 17:13:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01RHDvJG052210; Thu, 27 Feb 2020 17:13:57 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RHDv4M052209; Thu, 27 Feb 2020 17:13:57 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202002271713.01RHDv4M052209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 27 Feb 2020 17:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358395 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 358395 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 17:13:57 -0000 Author: hrs Date: Thu Feb 27 17:13:57 2020 New Revision: 358395 URL: https://svnweb.freebsd.org/changeset/base/358395 Log: Add workaround for models which do not follow the ACPI specification strictly. Extra objects are now simply ignored instead of rejecting everything. Modified: head/sys/dev/acpica/acpi_cmbat.c Modified: head/sys/dev/acpica/acpi_cmbat.c ============================================================================== --- head/sys/dev/acpica/acpi_cmbat.c Thu Feb 27 16:51:41 2020 (r358394) +++ head/sys/dev/acpica/acpi_cmbat.c Thu Feb 27 17:13:57 2020 (r358395) @@ -393,21 +393,34 @@ acpi_cmbat_get_bix(void *arg) } while (0) if (ACPI_PKG_VALID_EQ(res, 21)) { /* ACPI 6.0 _BIX */ - if (sc->bix.rev != ACPI_BIX_REV_1) + /* + * Some models have rev.0 _BIX with 21 members. + * In that case, treat the first 20 members as rev.0 _BIX. + */ + if (sc->bix.rev != ACPI_BIX_REV_0 && + sc->bix.rev != ACPI_BIX_REV_1) ACPI_BIX_REV_MISMATCH_ERR(sc->bix.rev, ACPI_BIX_REV_1); } else if (ACPI_PKG_VALID_EQ(res, 20)) {/* ACPI 4.0 _BIX */ if (sc->bix.rev != ACPI_BIX_REV_0) ACPI_BIX_REV_MISMATCH_ERR(sc->bix.rev, ACPI_BIX_REV_0); - } else if (ACPI_PKG_VALID(res, 22) && - ACPI_BIX_REV_MIN_CHECK(sc->bix.rev, ACPI_BIX_REV_1 + 1)) { + } else if (ACPI_PKG_VALID(res, 22)) { + /* _BIX with 22 or more members. */ + if (ACPI_BIX_REV_MIN_CHECK(sc->bix.rev, ACPI_BIX_REV_1 + 1)) { /* - * Unknown _BIX with 22 or more members. + * Unknown revision number. * Assume 21 members are compatible with 6.0 _BIX. */ ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), "Unknown _BIX revision(%u). " "Assuming compatible with revision %u.\n", sc->bix.rev, ACPI_BIX_REV_1); + } else { + /* + * Known revision number. Ignore the extra members. + */ + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), + "Extra objects found in _BIX were ignored.\n"); + } } else { /* Invalid _BIX. Ignore it. */ ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), From owner-svn-src-head@freebsd.org Thu Feb 27 19:05:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 26A6724B322; Thu, 27 Feb 2020 19:05:27 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T2Dk6ZWmz45N9; Thu, 27 Feb 2020 19:05:26 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC5FB1D70E; Thu, 27 Feb 2020 19:05:26 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01RJ5QC1018283; Thu, 27 Feb 2020 19:05:26 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RJ5Qs1018281; Thu, 27 Feb 2020 19:05:26 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202002271905.01RJ5Qs1018281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Thu, 27 Feb 2020 19:05:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358400 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 358400 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 19:05:27 -0000 Author: jeff Date: Thu Feb 27 19:05:26 2020 New Revision: 358400 URL: https://svnweb.freebsd.org/changeset/base/358400 Log: Simplify lazy advance with a 64bit atomic cmpset. This provides the potential to force a lazy (tick based) SMR to advance when there are blocking waiters by decoupling the wr_seq value from the ticks value. Add some missing compiler barriers. Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D23825 Modified: head/sys/kern/subr_smr.c head/sys/sys/smr.h Modified: head/sys/kern/subr_smr.c ============================================================================== --- head/sys/kern/subr_smr.c Thu Feb 27 19:04:39 2020 (r358399) +++ head/sys/kern/subr_smr.c Thu Feb 27 19:05:26 2020 (r358400) @@ -184,12 +184,9 @@ static uma_zone_t smr_zone; * that will flush the store buffer or prevent access to the section protected * data. For example, an idle processor, or an system management interrupt, * or a vm exit. - * - * We must wait one additional tick if we are around the wrap condition - * because the write seq will move forward by two with one interrupt. */ #define SMR_LAZY_GRACE 2 -#define SMR_LAZY_GRACE_MAX (SMR_LAZY_GRACE + 1) +#define SMR_LAZY_INCR (SMR_LAZY_GRACE * SMR_SEQ_INCR) /* * The maximum sequence number ahead of wr_seq that may still be valid. The @@ -197,7 +194,7 @@ static uma_zone_t smr_zone; * case poll needs to attempt to forward the sequence number if the goal is * within wr_seq + SMR_SEQ_ADVANCE. */ -#define SMR_SEQ_ADVANCE MAX(SMR_SEQ_INCR, SMR_LAZY_GRACE_MAX) +#define SMR_SEQ_ADVANCE SMR_LAZY_INCR static SYSCTL_NODE(_debug, OID_AUTO, smr, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, "SMR Stats"); @@ -214,66 +211,45 @@ SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, poll_fail, CT /* * Advance a lazy write sequence number. These move forward at the rate of - * ticks. Grace is two ticks in the future. lazy write sequence numbers can - * be even but not SMR_SEQ_INVALID so we pause time for a tick when we wrap. + * ticks. Grace is SMR_LAZY_INCR (2 ticks) in the future. * - * This returns the _current_ write sequence number. The lazy goal sequence - * number is SMR_LAZY_GRACE ticks ahead. + * This returns the goal write sequence number. */ static smr_seq_t smr_lazy_advance(smr_t smr, smr_shared_t s) { - smr_seq_t s_rd_seq, s_wr_seq, goal; - int t; + union s_wr s_wr, old; + int t, d; CRITICAL_ASSERT(curthread); /* - * Load s_wr_seq prior to ticks to ensure that the thread that - * observes the largest value wins. + * Load the stored ticks value before the current one. This way the + * current value can only be the same or larger. */ - s_wr_seq = atomic_load_acq_int(&s->s_wr_seq); - - /* - * We must not allow a zero tick value. We go back in time one tick - * and advance the grace period forward one tick around zero. - */ + old._pair = s_wr._pair = atomic_load_acq_64(&s->s_wr._pair); t = ticks; - if (t == SMR_SEQ_INVALID) - t--; /* * The most probable condition that the update already took place. */ - if (__predict_true(t == s_wr_seq)) + d = t - s_wr.ticks; + if (__predict_true(d == 0)) goto out; + /* Cap the rate of advancement and handle long idle periods. */ + if (d > SMR_LAZY_GRACE || d < 0) + d = SMR_LAZY_GRACE; + s_wr.ticks = t; + s_wr.seq += d * SMR_SEQ_INCR; /* - * After long idle periods the read sequence may fall too far - * behind write. Prevent poll from ever seeing this condition - * by updating the stale rd_seq. This assumes that there can - * be no valid section 2bn ticks old. The rd_seq update must - * be visible before wr_seq to avoid races with other advance - * callers. + * This can only fail if another thread races to call advance(). + * Strong cmpset semantics mean we are guaranteed that the update + * happened. */ - s_rd_seq = atomic_load_int(&s->s_rd_seq); - if (SMR_SEQ_GT(s_rd_seq, t)) - atomic_cmpset_rel_int(&s->s_rd_seq, s_rd_seq, t); - - /* - * Release to synchronize with the wr_seq load above. Ignore - * cmpset failures from simultaneous updates. - */ - atomic_cmpset_rel_int(&s->s_wr_seq, s_wr_seq, t); - counter_u64_add(advance, 1); - /* If we lost either update race another thread did it. */ - s_wr_seq = t; + atomic_cmpset_64(&s->s_wr._pair, old._pair, s_wr._pair); out: - goal = s_wr_seq + SMR_LAZY_GRACE; - /* Skip over the SMR_SEQ_INVALID tick. */ - if (goal < SMR_LAZY_GRACE) - goal++; - return (goal); + return (s_wr.seq + SMR_LAZY_INCR); } /* @@ -285,7 +261,7 @@ static smr_seq_t smr_shared_advance(smr_shared_t s) { - return (atomic_fetchadd_int(&s->s_wr_seq, SMR_SEQ_INCR) + SMR_SEQ_INCR); + return (atomic_fetchadd_int(&s->s_wr.seq, SMR_SEQ_INCR) + SMR_SEQ_INCR); } /* @@ -346,8 +322,8 @@ smr_deferred_advance(smr_t smr, smr_shared_t s, smr_t * This function may busy loop if the readers are roughly 1 billion * sequence numbers behind the writers. * - * Lazy SMRs will not busy loop and the wrap happens every 49.6 days - * at 1khz and 119 hours at 10khz. Readers can block for no longer + * Lazy SMRs will not busy loop and the wrap happens every 25 days + * at 1khz and 60 hours at 10khz. Readers can block for no longer * than half of this for SMR_SEQ_ macros to continue working. */ smr_seq_t @@ -478,7 +454,7 @@ smr_poll_scan(smr_t smr, smr_shared_t s, smr_seq_t s_r * Advance the rd_seq as long as we observed a more recent value. */ s_rd_seq = atomic_load_int(&s->s_rd_seq); - if (SMR_SEQ_GEQ(rd_seq, s_rd_seq)) { + if (SMR_SEQ_GT(rd_seq, s_rd_seq)) { atomic_cmpset_int(&s->s_rd_seq, s_rd_seq, rd_seq); s_rd_seq = rd_seq; } @@ -530,7 +506,7 @@ smr_poll(smr_t smr, smr_seq_t goal, bool wait) /* * Conditionally advance the lazy write clock on any writer - * activity. This may reset s_rd_seq. + * activity. */ if ((flags & SMR_LAZY) != 0) smr_lazy_advance(smr, s); @@ -552,7 +528,7 @@ smr_poll(smr_t smr, smr_seq_t goal, bool wait) * wr_seq must be loaded prior to any c_seq value so that a * stale c_seq can only reference time after this wr_seq. */ - s_wr_seq = atomic_load_acq_int(&s->s_wr_seq); + s_wr_seq = atomic_load_acq_int(&s->s_wr.seq); /* * This is the distance from s_wr_seq to goal. Positive values @@ -567,7 +543,7 @@ smr_poll(smr_t smr, smr_seq_t goal, bool wait) * smr. If we are not blocking we can not succeed but the * sequence number is valid. */ - if (delta > 0 && delta <= SMR_SEQ_MAX_ADVANCE && + if (delta > 0 && delta <= SMR_SEQ_ADVANCE && (flags & (SMR_LAZY | SMR_DEFERRED)) != 0) { if (!wait) { success = false; @@ -617,10 +593,8 @@ smr_create(const char *name, int limit, int flags) smr = uma_zalloc_pcpu(smr_zone, M_WAITOK); s->s_name = name; - if ((flags & SMR_LAZY) == 0) - s->s_rd_seq = s->s_wr_seq = SMR_SEQ_INIT; - else - s->s_rd_seq = s->s_wr_seq = ticks; + s->s_rd_seq = s->s_wr.seq = SMR_SEQ_INIT; + s->s_wr.ticks = ticks; /* Initialize all CPUS, not just those running. */ for (i = 0; i <= mp_maxid; i++) { Modified: head/sys/sys/smr.h ============================================================================== --- head/sys/sys/smr.h Thu Feb 27 19:04:39 2020 (r358399) +++ head/sys/sys/smr.h Thu Feb 27 19:05:26 2020 (r358400) @@ -56,9 +56,16 @@ #define SMR_SEQ_INVALID 0 /* Shared SMR state. */ +union s_wr { + struct { + smr_seq_t seq; /* Current write sequence #. */ + int ticks; /* tick of last update (LAZY) */ + }; + uint64_t _pair; +}; struct smr_shared { const char *s_name; /* Name for debugging/reporting. */ - smr_seq_t s_wr_seq; /* Current write sequence #. */ + union s_wr s_wr; /* Write sequence */ smr_seq_t s_rd_seq; /* Minimum observed read sequence. */ }; typedef struct smr_shared *smr_shared_t; @@ -189,7 +196,7 @@ static inline smr_seq_t smr_shared_current(smr_shared_t s) { - return (atomic_load_int(&s->s_wr_seq)); + return (atomic_load_int(&s->s_wr.seq)); } static inline smr_seq_t @@ -281,7 +288,7 @@ smr_lazy_enter(smr_t smr) * If we assign a stale wr_seq value due to interrupt we use the * same algorithm that renders smr_enter() safe. */ - smr->c_seq = smr_shared_current(smr->c_shared); + atomic_store_int(&smr->c_seq, smr_shared_current(smr->c_shared)); } /* @@ -306,7 +313,7 @@ smr_lazy_exit(smr_t smr) * time and wait 1 tick longer. */ atomic_thread_fence_rel(); - smr->c_seq = SMR_SEQ_INVALID; + atomic_store_int(&smr->c_seq, SMR_SEQ_INVALID); critical_exit(); } From owner-svn-src-head@freebsd.org Thu Feb 27 19:35:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 253C624BE0F; Thu, 27 Feb 2020 19:35:19 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T2vB3XZ3z4NxK; Thu, 27 Feb 2020 19:35:18 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B8281DCA8; Thu, 27 Feb 2020 19:35:18 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01RJZImM035938; Thu, 27 Feb 2020 19:35:18 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RJZH2N035937; Thu, 27 Feb 2020 19:35:17 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202002271935.01RJZH2N035937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 27 Feb 2020 19:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358402 - head/sys/dev/rtwn/pci X-SVN-Group: head X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: head/sys/dev/rtwn/pci X-SVN-Commit-Revision: 358402 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 19:35:19 -0000 Author: hrs Date: Thu Feb 27 19:35:17 2020 New Revision: 358402 URL: https://svnweb.freebsd.org/changeset/base/358402 Log: Add MODULE_PNP_INFO() to autoload the rtwn_pci(4) kernel module. Reviewed by: imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23807 Modified: head/sys/dev/rtwn/pci/rtwn_pci_attach.c head/sys/dev/rtwn/pci/rtwn_pci_attach.h Modified: head/sys/dev/rtwn/pci/rtwn_pci_attach.c ============================================================================== --- head/sys/dev/rtwn/pci/rtwn_pci_attach.c Thu Feb 27 19:07:10 2020 (r358401) +++ head/sys/dev/rtwn/pci/rtwn_pci_attach.c Thu Feb 27 19:35:17 2020 (r358402) @@ -96,15 +96,16 @@ static void rtwn_pci_attach_methods(struct rtwn_softc static const struct rtwn_pci_ident * rtwn_pci_probe_sub(device_t dev) { - const struct rtwn_pci_ident *ident; - int vendor_id, device_id; + int i, vendor_id, device_id; vendor_id = pci_get_vendor(dev); device_id = pci_get_device(dev); - for (ident = rtwn_pci_ident_table; ident->name != NULL; ident++) - if (vendor_id == ident->vendor && device_id == ident->device) - return (ident); + for (i = 0; i < nitems(rtwn_pci_ident_table); i++) { + if (vendor_id == rtwn_pci_ident_table[i].vendor && + device_id == rtwn_pci_ident_table[i].device) + return (&rtwn_pci_ident_table[i]); + } return (NULL); } @@ -788,6 +789,8 @@ static devclass_t rtwn_pci_devclass; DRIVER_MODULE(rtwn_pci, pci, rtwn_pci_driver, rtwn_pci_devclass, NULL, NULL); MODULE_VERSION(rtwn_pci, 1); +MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, rtwn, rtwn_pci_ident_table, + nitems(rtwn_pci_ident_table)); MODULE_DEPEND(rtwn_pci, pci, 1, 1, 1); MODULE_DEPEND(rtwn_pci, wlan, 1, 1, 1); MODULE_DEPEND(rtwn_pci, rtwn, 2, 2, 2); Modified: head/sys/dev/rtwn/pci/rtwn_pci_attach.h ============================================================================== --- head/sys/dev/rtwn/pci/rtwn_pci_attach.h Thu Feb 27 19:07:10 2020 (r358401) +++ head/sys/dev/rtwn/pci/rtwn_pci_attach.h Thu Feb 27 19:35:17 2020 (r358402) @@ -36,7 +36,6 @@ static const struct rtwn_pci_ident rtwn_pci_ident_tabl { 0x10ec, 0x8176, "Realtek RTL8188CE", RTWN_CHIP_RTL8192CE }, { 0x10ec, 0x8179, "Realtek RTL8188EE", RTWN_CHIP_RTL8188EE }, { 0x10ec, 0x8178, "Realtek RTL8192CE", RTWN_CHIP_RTL8192CE }, - { 0, 0, NULL, RTWN_CHIP_MAX_PCI } }; typedef void (*chip_pci_attach)(struct rtwn_pci_softc *); From owner-svn-src-head@freebsd.org Thu Feb 27 19:40:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3AB7924C18E; Thu, 27 Feb 2020 19:40:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T3123hQDz4WDs; Thu, 27 Feb 2020 19:40:22 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A58CA1DCB0; Thu, 27 Feb 2020 19:40:21 +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 01RJeLsO036246; Thu, 27 Feb 2020 19:40:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RJeLxq036245; Thu, 27 Feb 2020 19:40:21 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202002271940.01RJeLxq036245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 27 Feb 2020 19:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358403 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 358403 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 19:40:23 -0000 Author: trasz Date: Thu Feb 27 19:40:20 2020 New Revision: 358403 URL: https://svnweb.freebsd.org/changeset/base/358403 Log: Make linuxulator warn about unsupported getsockopt/setsockopt flags. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23791 Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Thu Feb 27 19:35:17 2020 (r358402) +++ head/sys/compat/linux/linux_socket.c Thu Feb 27 19:40:20 2020 (r358403) @@ -1451,10 +1451,13 @@ linux_setsockopt(struct thread *td, struct linux_setso name = -1; break; } - if (name == -1) + if (name == -1) { + linux_msg(curthread, + "unsupported setsockopt level %d optname %d", + args->level, args->optname); return (ENOPROTOOPT); + } - if (name == IPV6_NEXTHOP) { len = args->optlen; error = linux_to_bsd_sockaddr(PTRIN(args->optval), &sa, &len); @@ -1546,8 +1549,12 @@ linux_getsockopt(struct thread *td, struct linux_getso name = -1; break; } - if (name == -1) + if (name == -1) { + linux_msg(curthread, + "unsupported getsockopt level %d optname %d", + args->level, args->optname); return (EINVAL); + } if (name == IPV6_NEXTHOP) { error = copyin(PTRIN(args->optlen), &len, sizeof(len)); From owner-svn-src-head@freebsd.org Thu Feb 27 19:40:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A36A224C1B1; Thu, 27 Feb 2020 19:40:33 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T31D2KW2z4WKt; Thu, 27 Feb 2020 19:40:32 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D0AA21DCB1; Thu, 27 Feb 2020 19:40:29 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01RJeTt2036298; Thu, 27 Feb 2020 19:40:29 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RJeTsG036297; Thu, 27 Feb 2020 19:40:29 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202002271940.01RJeTsG036297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 27 Feb 2020 19:40:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358404 - head/contrib/sendmail/src X-SVN-Group: head X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: head/contrib/sendmail/src X-SVN-Commit-Revision: 358404 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 19:40:33 -0000 Author: hrs Date: Thu Feb 27 19:40:29 2020 New Revision: 358404 URL: https://svnweb.freebsd.org/changeset/base/358404 Log: Fix broken STARTTLS when SharedMemoryKey is enabled. OpenSSL 1.1 API patch for sendmail had a bug which prevented sm_RSA_generate_key() function from working. This function is used to generate a temporary RSA key for a shared memory region used for TLS processing. Note that 12.0 and 12.1-RELEASE include this bug. This affects only if SM_CONF_SHM compile-time option (enabled by default) and SharedMemoryKey run-time option (not enabled by default) in a .cf file are specified. The latter corresponds to confSHARED_MEMORY_KEY in a .mc file. PR: 242861 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23734 Modified: head/contrib/sendmail/src/tls.c Modified: head/contrib/sendmail/src/tls.c ============================================================================== --- head/contrib/sendmail/src/tls.c Thu Feb 27 19:40:20 2020 (r358403) +++ head/contrib/sendmail/src/tls.c Thu Feb 27 19:40:29 2020 (r358404) @@ -745,18 +745,15 @@ sm_RSA_generate_key(num, e) { RSA *rsa = NULL; BIGNUM *bn_rsa_r4; - int rc; bn_rsa_r4 = BN_new(); - rc = BN_set_word(bn_rsa_r4, RSA_F4); - if ((bn_rsa_r4 != NULL) && BN_set_word(bn_rsa_r4, RSA_F4) && (rsa = RSA_new()) != NULL) + if ((bn_rsa_r4 != NULL) && BN_set_word(bn_rsa_r4, e) && (rsa = RSA_new()) != NULL) { - if (!RSA_generate_key_ex(rsa, RSA_KEYLENGTH, bn_rsa_r4, NULL)) + if (!RSA_generate_key_ex(rsa, num, bn_rsa_r4, NULL)) { RSA_free(rsa); rsa = NULL; } - return NULL; } BN_free(bn_rsa_r4); return rsa; From owner-svn-src-head@freebsd.org Thu Feb 27 19:50:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07C4624C53F; Thu, 27 Feb 2020 19:50:02 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T3D925MWz4gC7; Thu, 27 Feb 2020 19:50:01 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E02C11DEC1; Thu, 27 Feb 2020 19:50:00 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01RJo0UW042312; Thu, 27 Feb 2020 19:50:00 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RJnx1H042269; Thu, 27 Feb 2020 19:49:59 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202002271949.01RJnx1H042269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 27 Feb 2020 19:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358405 - head/contrib/tnftp/src X-SVN-Group: head X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: head/contrib/tnftp/src X-SVN-Commit-Revision: 358405 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 19:50:02 -0000 Author: hrs Date: Thu Feb 27 19:49:59 2020 New Revision: 358405 URL: https://svnweb.freebsd.org/changeset/base/358405 Log: Fix poor performance of ftp(1) due to small SO_SNDBUF and SO_RCVBUF. ftp(1) from vendor/tnftp always tried the following for every TCP connection: 1. Get the current buffer length of SO_SNDBUF and SO_RCVBUF by getsockopt(2). 2. Invoke setsockopt(2) to set them to the same values after checking if they are in a range between 8 KiB to 8 MiB. This behavior broke dynamic buffer sizing enabled by default (net.inet.tcp.{recv,send}buf_auto sysctls) and led to a very poor transfer rate. The fetch(1) utility does not have this problem. This change prevents SO_SNDBUF and SO_RCVBUF from configuring when the buffer auto-sizing is enabled unless the buffer sizes are explicitly specified. PR: 240827 Spotted by: Yuichiro NAITO MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23732 Modified: head/contrib/tnftp/src/cmds.c head/contrib/tnftp/src/ftp_var.h head/contrib/tnftp/src/main.c head/contrib/tnftp/src/util.c Modified: head/contrib/tnftp/src/cmds.c ============================================================================== --- head/contrib/tnftp/src/cmds.c Thu Feb 27 19:40:29 2020 (r358404) +++ head/contrib/tnftp/src/cmds.c Thu Feb 27 19:49:59 2020 (r358405) @@ -2653,10 +2653,14 @@ setxferbuf(int argc, char *argv[]) goto usage; } - if (dir & RATE_PUT) + if (dir & RATE_PUT) { sndbuf_size = size; - if (dir & RATE_GET) + auto_sndbuf = 0; + } + if (dir & RATE_GET) { rcvbuf_size = size; + auto_rcvbuf = 0; + } fprintf(ttyout, "Socket buffer sizes: send %d, receive %d.\n", sndbuf_size, rcvbuf_size); code = 0; Modified: head/contrib/tnftp/src/ftp_var.h ============================================================================== --- head/contrib/tnftp/src/ftp_var.h Thu Feb 27 19:40:29 2020 (r358404) +++ head/contrib/tnftp/src/ftp_var.h Thu Feb 27 19:49:59 2020 (r358405) @@ -298,6 +298,8 @@ GLOBAL int options; /* used during socket creation */ GLOBAL int sndbuf_size; /* socket send buffer size */ GLOBAL int rcvbuf_size; /* socket receive buffer size */ +GLOBAL int auto_sndbuf; /* flag: if != 0 then use auto sndbuf size */ +GLOBAL int auto_rcvbuf; /* flag: if != 0 then use auto rcvbuf size */ GLOBAL int macnum; /* number of defined macros */ GLOBAL struct macel macros[16]; Modified: head/contrib/tnftp/src/main.c ============================================================================== --- head/contrib/tnftp/src/main.c Thu Feb 27 19:40:29 2020 (r358404) +++ head/contrib/tnftp/src/main.c Thu Feb 27 19:49:59 2020 (r358405) @@ -127,6 +127,9 @@ __RCSID(" NetBSD: main.c,v 1.117 2009/07/13 19:05:41 r #include #endif /* tnftp */ +#ifdef __FreeBSD__ +#include +#endif #define GLOBAL /* force GLOBAL decls in ftp_var.h to be declared */ #include "ftp_var.h" @@ -509,6 +512,13 @@ main(int volatile argc, char **volatile argv) (void)xsignal(SIGUSR1, crankrate); (void)xsignal(SIGUSR2, crankrate); (void)xsignal(SIGWINCH, setttywidth); + + auto_rcvbuf = ((sysctlbyname("net.inet.tcp.recvbuf_auto", + &auto_rcvbuf, &(size_t []){[0] = sizeof(int)}[0], NULL, 0) == 0) && + auto_rcvbuf == 1); + auto_sndbuf = ((sysctlbyname("net.inet.tcp.sendbuf_auto", + &auto_sndbuf, &(size_t []){[0] = sizeof(int)}[0], NULL, 0) == 0) && + auto_sndbuf == 1); if (argc > 0) { if (isupload) { Modified: head/contrib/tnftp/src/util.c ============================================================================== --- head/contrib/tnftp/src/util.c Thu Feb 27 19:40:29 2020 (r358404) +++ head/contrib/tnftp/src/util.c Thu Feb 27 19:49:59 2020 (r358405) @@ -1087,13 +1087,27 @@ setupsockbufsize(int sock) sndbuf_size); } +#ifdef __FreeBSD__ + DPRINTF("auto_rcvbuf = %d\n", auto_rcvbuf); + if (auto_sndbuf == 0) { +#endif if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (void *)&sndbuf_size, sizeof(sndbuf_size)) == -1) warn("Unable to set sndbuf size %d", sndbuf_size); +#ifdef __FreeBSD__ + } +#endif +#ifdef __FreeBSD__ + DPRINTF("auto_sndbuf = %d\n", auto_sndbuf); + if (auto_rcvbuf == 0) { +#endif if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void *)&rcvbuf_size, sizeof(rcvbuf_size)) == -1) warn("Unable to set rcvbuf size %d", rcvbuf_size); +#ifdef __FreeBSD__ + } +#endif } /* From owner-svn-src-head@freebsd.org Thu Feb 27 19:59:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C095424C96B; Thu, 27 Feb 2020 19:59:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T3Qt5BZ3z3Qmq; Thu, 27 Feb 2020 19:59:18 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 854371E0B5; Thu, 27 Feb 2020 19:59:18 +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 01RJxIjE048259; Thu, 27 Feb 2020 19:59:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RJxIpP048258; Thu, 27 Feb 2020 19:59:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002271959.01RJxIpP048258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 27 Feb 2020 19:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358407 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 358407 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 19:59:19 -0000 Author: dim Date: Thu Feb 27 19:59:17 2020 New Revision: 358407 URL: https://svnweb.freebsd.org/changeset/base/358407 Log: Merge r358406 from the clang1000-import branch: Fix the following -Werror warning from clang 10.0.0: sys/arm/arm/identcpu-v6.c:227:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] if (val & CPUV7_CT_CTYPE_RA) ^ sys/arm/arm/identcpu-v6.c:225:4: note: previous statement is here if (val & CPUV7_CT_CTYPE_WB) ^ This was due to an accidentally inserted tab before the if statement. MFC after: 3 days Modified: head/sys/arm/arm/identcpu-v6.c Directory Properties: head/ (props changed) Modified: head/sys/arm/arm/identcpu-v6.c ============================================================================== --- head/sys/arm/arm/identcpu-v6.c Thu Feb 27 19:58:20 2020 (r358406) +++ head/sys/arm/arm/identcpu-v6.c Thu Feb 27 19:59:17 2020 (r358407) @@ -224,7 +224,7 @@ print_v7_cache(void ) printf(" WT"); if (val & CPUV7_CT_CTYPE_WB) printf(" WB"); - if (val & CPUV7_CT_CTYPE_RA) + if (val & CPUV7_CT_CTYPE_RA) printf(" Read-Alloc"); if (val & CPUV7_CT_CTYPE_WA) printf(" Write-Alloc"); From owner-svn-src-head@freebsd.org Thu Feb 27 20:08:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7516524CE28; Thu, 27 Feb 2020 20:08:47 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T3dq2CM0z46Qx; Thu, 27 Feb 2020 20:08:47 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 357091E2D0; Thu, 27 Feb 2020 20:08:47 +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 01RK8l7N054419; Thu, 27 Feb 2020 20:08:47 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RK8kaG054417; Thu, 27 Feb 2020 20:08:46 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202002272008.01RK8kaG054417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 27 Feb 2020 20:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358408 - head/contrib/llvm-project/llvm/lib/Target/RISCV X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/contrib/llvm-project/llvm/lib/Target/RISCV X-SVN-Commit-Revision: 358408 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 20:08:47 -0000 Author: brooks Date: Thu Feb 27 20:08:46 2020 New Revision: 358408 URL: https://svnweb.freebsd.org/changeset/base/358408 Log: Merge commit 7214f7a79 from llvm git (by Sam Elliott): [RISCV] Lower llvm.trap and llvm.debugtrap Summary: Until this commit, these have lowered to a call to abort(). `llvm.trap()` now lowers to `unimp`, which should trap on all systems. `llvm.debugtrap()` now lowers to `ebreak`, which is exactly what this instruction is for. Reviewers: asb, luismarques Reviewed By: asb Tags: #llvm Differential Revision: https://reviews.llvm.org/D69390 This fixes miscompilation resulting in linking failures with INVARIANTS disabled. Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D23857 Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp Thu Feb 27 19:59:17 2020 (r358407) +++ head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp Thu Feb 27 20:08:46 2020 (r358408) @@ -185,6 +185,9 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetM setOperationAction(ISD::READCYCLECOUNTER, MVT::i64, Subtarget.is64Bit() ? Legal : Custom); + setOperationAction(ISD::TRAP, MVT::Other, Legal); + setOperationAction(ISD::DEBUGTRAP, MVT::Other, Legal); + if (Subtarget.hasStdExtA()) { setMaxAtomicSizeInBitsSupported(Subtarget.getXLen()); setMinCmpXchgSizeInBits(32); Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td Thu Feb 27 19:59:17 2020 (r358407) +++ head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td Thu Feb 27 20:08:46 2020 (r358408) @@ -1075,6 +1075,16 @@ let Predicates = [IsRV32], usesCustomInserter = 1, has mayLoad = 0, mayStore = 0, hasNoSchedulingInfo = 1 in def ReadCycleWide : Pseudo<(outs GPR:$lo, GPR:$hi), (ins), [], "", "">; +/// traps + +// We lower `trap` to `unimp`, as this causes a hard exception on nearly all +// systems. +def : Pat<(trap), (UNIMP)>; + +// We lower `debugtrap` to `ebreak`, as this will get the attention of the +// debugger if possible. +def : Pat<(debugtrap), (EBREAK)>; + //===----------------------------------------------------------------------===// // Standard extensions //===----------------------------------------------------------------------===// From owner-svn-src-head@freebsd.org Thu Feb 27 20:26:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CC4724D678; Thu, 27 Feb 2020 20:26:38 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T42Q0wYBz3P4m; Thu, 27 Feb 2020 20:26:38 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 135531E675; Thu, 27 Feb 2020 20:26:38 +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 01RKQbxB066082; Thu, 27 Feb 2020 20:26:37 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RKQb81066081; Thu, 27 Feb 2020 20:26:37 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202002272026.01RKQb81066081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 27 Feb 2020 20:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358409 - head/sys/riscv/conf X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/riscv/conf X-SVN-Commit-Revision: 358409 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 20:26:38 -0000 Author: brooks Date: Thu Feb 27 20:26:37 2020 New Revision: 358409 URL: https://svnweb.freebsd.org/changeset/base/358409 Log: riscv: Add a GENERIC-NODEBUG (copied from amd64) Sponsored by: DARPA Added: head/sys/riscv/conf/GENERIC-NODEBUG - copied, changed from r358301, head/sys/amd64/conf/GENERIC-NODEBUG Copied and modified: head/sys/riscv/conf/GENERIC-NODEBUG (from r358301, head/sys/amd64/conf/GENERIC-NODEBUG) ============================================================================== --- head/sys/amd64/conf/GENERIC-NODEBUG Mon Feb 24 21:07:30 2020 (r358301, copy source) +++ head/sys/riscv/conf/GENERIC-NODEBUG Thu Feb 27 20:26:37 2020 (r358409) @@ -1,6 +1,6 @@ # -# GENERIC-NODEBUG -- WITNESS and INVARIANTS free kernel configuration file -# for FreeBSD/amd64 +# GENERIC-NODEBUG -- WITNESS and INVARIANTS free kernel configuration file +# for FreeBSD/riscv # # This configuration file removes several debugging options, including # WITNESS and INVARIANTS checking, which are known to have significant From owner-svn-src-head@freebsd.org Thu Feb 27 20:46:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E00524E01E; Thu, 27 Feb 2020 20:46:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T4TL6T2Pz4jB8; Thu, 27 Feb 2020 20:46:30 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A63E1EA40; Thu, 27 Feb 2020 20:46:30 +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 01RKkUvS078003; Thu, 27 Feb 2020 20:46:30 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RKkUIi078002; Thu, 27 Feb 2020 20:46:30 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202002272046.01RKkUIi078002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 27 Feb 2020 20:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358410 - head/contrib/sendmail/src X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/contrib/sendmail/src X-SVN-Commit-Revision: 358410 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 20:46:31 -0000 Author: jkim Date: Thu Feb 27 20:46:30 2020 New Revision: 358410 URL: https://svnweb.freebsd.org/changeset/base/358410 Log: Fix a white space. Modified: head/contrib/sendmail/src/tls.c Modified: head/contrib/sendmail/src/tls.c ============================================================================== --- head/contrib/sendmail/src/tls.c Thu Feb 27 20:26:37 2020 (r358409) +++ head/contrib/sendmail/src/tls.c Thu Feb 27 20:46:30 2020 (r358410) @@ -744,7 +744,7 @@ sm_RSA_generate_key(num, e) unsigned long e; { RSA *rsa = NULL; - BIGNUM *bn_rsa_r4; + BIGNUM *bn_rsa_r4; bn_rsa_r4 = BN_new(); if ((bn_rsa_r4 != NULL) && BN_set_word(bn_rsa_r4, e) && (rsa = RSA_new()) != NULL) From owner-svn-src-head@freebsd.org Thu Feb 27 21:59:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8361F2509CE; Thu, 27 Feb 2020 21:59:55 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48T6630KvRz40C4; Thu, 27 Feb 2020 21:59:54 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 01RLxjMC009389; Thu, 27 Feb 2020 13:59:45 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 01RLxjN3009388; Thu, 27 Feb 2020 13:59:45 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202002272159.01RLxjN3009388@gndrsh.dnsmgr.net> Subject: Re: svn commit: r358409 - head/sys/riscv/conf In-Reply-To: <202002272026.01RKQb81066081@repo.freebsd.org> To: Brooks Davis Date: Thu, 27 Feb 2020 13:59:45 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 48T6630KvRz40C4 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 21:59:55 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: brooks > Date: Thu Feb 27 20:26:37 2020 > New Revision: 358409 > URL: https://svnweb.freebsd.org/changeset/base/358409 > > Log: > riscv: Add a GENERIC-NODEBUG (copied from amd64) > > Sponsored by: DARPA > > Added: > head/sys/riscv/conf/GENERIC-NODEBUG > - copied, changed from r358301, head/sys/amd64/conf/GENERIC-NODEBUG > > Copied and modified: head/sys/riscv/conf/GENERIC-NODEBUG (from r358301, head/sys/amd64/conf/GENERIC-NODEBUG) > ============================================================================== > --- head/sys/amd64/conf/GENERIC-NODEBUG Mon Feb 24 21:07:30 2020 (r358301, copy source) > +++ head/sys/riscv/conf/GENERIC-NODEBUG Thu Feb 27 20:26:37 2020 (r358409) > @@ -1,6 +1,6 @@ > # > -# GENERIC-NODEBUG -- WITNESS and INVARIANTS free kernel configuration file Maybe go clean the trailing white space off here too? > -# for FreeBSD/amd64 > +# GENERIC-NODEBUG -- WITNESS and INVARIANTS free kernel configuration file > +# for FreeBSD/riscv > # > # This configuration file removes several debugging options, including > # WITNESS and INVARIANTS checking, which are known to have significant > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu Feb 27 22:02:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5450C250D25; Thu, 27 Feb 2020 22:02:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T68T0YF9z41ZQ; Thu, 27 Feb 2020 22:02:01 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E0AF1F9E5; Thu, 27 Feb 2020 22:02:01 +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 01RM20F8030411; Thu, 27 Feb 2020 22:02:00 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RM20j9030410; Thu, 27 Feb 2020 22:02:00 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202002272202.01RM20j9030410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 27 Feb 2020 22:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358411 - head/contrib/sendmail/src X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/contrib/sendmail/src X-SVN-Commit-Revision: 358411 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 22:02:01 -0000 Author: jkim Date: Thu Feb 27 22:02:00 2020 New Revision: 358411 URL: https://svnweb.freebsd.org/changeset/base/358411 Log: Fix style inconsistencies near our OpenSSL 1.1.x patch. Modified: head/contrib/sendmail/src/tls.c Modified: head/contrib/sendmail/src/tls.c ============================================================================== --- head/contrib/sendmail/src/tls.c Thu Feb 27 20:46:30 2020 (r358410) +++ head/contrib/sendmail/src/tls.c Thu Feb 27 22:02:00 2020 (r358411) @@ -56,10 +56,10 @@ DH_set0_pqg(dh, p, q, g) BIGNUM *q; BIGNUM *g; { - dh->p=p; + dh->p = p; if (q != NULL) - dh->q=q; - dh->g=g; + dh->q = q; + dh->g = g; return 1; /* success */ } # endif /* !defined() || OPENSSL_VERSION_NUMBER < 0x00907000L */ @@ -95,7 +95,7 @@ get_dh512() DH_free(dh); BN_free(dhp_bn); BN_free(dhg_bn); - return(NULL); + return NULL; } return dh; } @@ -117,7 +117,7 @@ oK0jjSXgFyeU4/NfyA+zuNeWzUL6bHmigwIBAg== static DH * get_dh2048() { - static unsigned char dh2048_p[]={ + static unsigned char dh2048_p[] = { 0xAC,0x37,0x20,0x70,0xBA,0x71,0x12,0x4B,0x10,0x1C,0xF9,0x68, 0x95,0x12,0x82,0x50,0x9D,0xAC,0xCC,0xA4,0x73,0x8A,0xC7,0x96, 0x57,0xD7,0x14,0x49,0x03,0x59,0x1B,0x1A,0x06,0xC3,0xB2,0xA4, @@ -141,22 +141,22 @@ get_dh2048() 0xE3,0xF3,0x5F,0xC8,0x0F,0xB3,0xB8,0xD7,0x96,0xCD,0x42,0xFA, 0x6C,0x79,0xA2,0x83, }; - static unsigned char dh2048_g[]={ 0x02, }; + static unsigned char dh2048_g[] = { 0x02, }; DH *dh; BIGNUM *dhp_bn, *dhg_bn; - if ((dh=DH_new()) == NULL) - return(NULL); - dhp_bn = BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL); - dhg_bn = BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL); + if ((dh = DH_new()) == NULL) + return NULL; + dhp_bn = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL); + dhg_bn = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL); if ((dhp_bn == NULL) || (dhg_bn == NULL) || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) { DH_free(dh); BN_free(dhp_bn); BN_free(dhg_bn); - return(NULL); + return NULL; } - return(dh); + return dh; } # endif /* !NO_DH */ @@ -1260,7 +1260,7 @@ inittls(ctx, req, options, srv, certfile, keyfile, cac if (tTd(96, 2)) sm_dprintf("inittls: Generating %d bit DH parameters\n", bits); - dsa=DSA_new(); + dsa = DSA_new(); /* this takes a while! */ (void)DSA_generate_parameters_ex(dsa, bits, NULL, 0, NULL, NULL, NULL); From owner-svn-src-head@freebsd.org Thu Feb 27 22:36:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9BE76251B07; Thu, 27 Feb 2020 22:36:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T6w124d5z449l; Thu, 27 Feb 2020 22:36:17 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E03F1FFC5; Thu, 27 Feb 2020 22:36:17 +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 01RMaGQf049094; Thu, 27 Feb 2020 22:36:16 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RMaGup049093; Thu, 27 Feb 2020 22:36:16 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202002272236.01RMaGup049093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 27 Feb 2020 22:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358412 - head/contrib/sendmail/src X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/contrib/sendmail/src X-SVN-Commit-Revision: 358412 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 22:36:17 -0000 Author: jkim Date: Thu Feb 27 22:36:16 2020 New Revision: 358412 URL: https://svnweb.freebsd.org/changeset/base/358412 Log: Do not free p and g parameters after calling DH_set0_pqg(3). It is specifically mentioned in the manual page. Note it has no functional change in reality because DH_set0_pqg() cannot fail when both p and g are not NULL. Modified: head/contrib/sendmail/src/tls.c Modified: head/contrib/sendmail/src/tls.c ============================================================================== --- head/contrib/sendmail/src/tls.c Thu Feb 27 22:02:00 2020 (r358411) +++ head/contrib/sendmail/src/tls.c Thu Feb 27 22:36:16 2020 (r358412) @@ -83,20 +83,24 @@ static unsigned char dh512_g[] = static DH * get_dh512() { - DH *dh = NULL; + DH *dh; BIGNUM *dhp_bn, *dhg_bn; if ((dh = DH_new()) == NULL) return NULL; dhp_bn = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL); dhg_bn = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL); - if ((dhp_bn == NULL) || (dhg_bn == NULL) || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) + if ((dhp_bn == NULL) || (dhg_bn == NULL)) { - DH_free(dh); BN_free(dhp_bn); BN_free(dhg_bn); return NULL; } + if (!DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) + { + DH_free(dh); + return NULL; + } return dh; } @@ -149,11 +153,15 @@ get_dh2048() return NULL; dhp_bn = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL); dhg_bn = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL); - if ((dhp_bn == NULL) || (dhg_bn == NULL) || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) + if ((dhp_bn == NULL) || (dhg_bn == NULL)) { - DH_free(dh); BN_free(dhp_bn); BN_free(dhg_bn); + return NULL; + } + if (!DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) + { + DH_free(dh); return NULL; } return dh; From owner-svn-src-head@freebsd.org Thu Feb 27 22:45:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C1B25251F6A for ; Thu, 27 Feb 2020 22:45:08 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-3.consmr.mail.bf2.yahoo.com (sonic305-3.consmr.mail.bf2.yahoo.com [74.6.133.42]) (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 48T76B3QR7z4S1d for ; Thu, 27 Feb 2020 22:45:06 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: G00wc4YVM1kYd.zI9c182nOEGTl0sTJt5tg.Y2s_1wrqN6yZR7Bc67YWj7vu3tw LcpWlJsK7vVAkAvl5utHQIElc7g5tSoXIzXX4EAMFv7fMmxu_QNLjI4ElpsDtVSEphzQ5PXX4oKY JsV0VZm1u058WUC9jtcvFBgLhFUQbUh2iqJcfoM7RwzQ.EUg4rdZC8OU2aNRMu53T7GiBgJaPWyp lC3Fkj.fk3Il_jGjY88_Ad9AVZOna5GGFmcOir06qTBHr7gWJWgxsmMa8qiWGdzKKpANs8XwrsqD MAxFN6wt23lQ0wPZnMlyP0UyGpYDVzCcqnZr1durAisu7bppj1Z7KEcMsWEe9NZiKshf_ea6JzxT LRTEaT2ho0a84LckKJmS8RKIpA1TPcEB9taGTM9c_KwpZ_1BQTYBzaLXsI4lgLLcca4eTjJsrMxr zI1UG1dOr_J4dPUCER0ol8Pi64HjrX2VZGiICgS6j4mvOOzWUKHUe8irEpqYszh5LvoBUp91A4Hk cTnEXmXPM_nXRqkdC1Go2vXuD5qGL71ikEH_Cmgn8o7UDdTUW.YBq0xAi_Nl.BUWmBQ.SErToBpY lK1dtpw2y.Xjyb6Sd7_l3hRR9HLMhGjywh4afzMc8s8MipNPvDMOcYFmDb3mPrZze9pxQtmzYM3U xr924LIVuz.75XX5aJK6YORZmWDnPgwto8SxOM8aMkuago0ISXA2Mvr40cuohASw9kKjehcUZ.Lt RpqKuBxRWEpdHdNN8sBzG38J7QKhrOE4.gpsRhPe4UgGFXAqBOk5WonvbLLyvmyOi_eIHe1d0gp4 ujKoxIUg.pu.H4RD4DXIIPowZ.OlgbjP_uVlVII.EhVOtgzlVLPjru4ZntkTQUuy5oE1sDVxHPLY nQvNn9zn9q6eCGJ6UnNhxZE4yrsrsHWqt0DUW7H2P_9TGmZ.sFev27ierjlY1fySaA38OGj7N5f6 WjTXzHEoq7EvtTMEqpeGlUptO7aWVnvYbJWoiP_._ex5xdSQNQ3PcoDmNA1n8O.hGM3WYae4Wjfj fTTiG1gBMcwRtFV8GmGJ_LgkGiltQQDsozmlA2QkOFQ8B0zqkTikGFHx2EKNL8TggduC0k0hIqjc 87P8PmcYFiCCXf_0WUrqWlf5TG4_HUOyQBpQNOq1I_6Bg5JqWJKBoP2w7XfPdakBkwBVomN_LnOW G2b_muyEsPVG.iyKqNIkR0HhMYplN7Gtj79fsozdA0FtPW2qUuqoq7_L.qlASP8m91DUOwz4z3mJ 1NmH9C2zhvmFrW7AVk._9POK9pkbTnfUmgd9Ygjxq6IAOzbXsVpvVCLgWXkFR4QUamoCdpneElLh VN_dCyJBNVTSZR_EvKiUMT9Ix6mEwoNPFrM5IujekogBZa0eG8GnFEN0pGMlNNZ73YBeQFMYxO2z jHYdU81wkjv2u4a7r4T9SnEI- Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.bf2.yahoo.com with HTTP; Thu, 27 Feb 2020 22:45:04 +0000 Received: by smtp414.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID d4a57e2133a3ea4ed1cedac2f056cbd1; Thu, 27 Feb 2020 22:45:03 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358392 - head/share/man/man9 Message-Id: <217D39BA-4FDC-490C-8490-533D244E79CE@yahoo.com> Date: Thu, 27 Feb 2020 14:45:02 -0800 Cc: Warner Losh To: John Baldwin , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3608.60.0.2.5) References: <217D39BA-4FDC-490C-8490-533D244E79CE.ref@yahoo.com> X-Rspamd-Queue-Id: 48T76B3QR7z4S1d X-Spamd-Bar: - X-Spamd-Result: default: False [-1.68 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.39)[-0.393,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.78)[-0.784,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[42.133.6.74.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:26101, ipnet:74.6.128.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (3.38), ipnet: 74.6.128.0/21(1.30), asn: 26101(1.04), country: US(-0.05)]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 22:45:08 -0000 John Baldwin jhb at FreeBSD.org wrote on Thu Feb 27 16:55:01 UTC 2020: > On 2/27/20 7:30 AM, Warner Losh wrote: > > Author: imp > > Date: Thu Feb 27 15:30:13 2020 > > New Revision: 358392 > > URL: https://svnweb.freebsd.org/changeset/base/358392 > >=20 > > Log: > > _Static_assert is to be preferred to CTASSERT. > > =20 > > Document the existing prefernce that _Static_assert be used in = preference to the > > old CTASSERT we used to use for compile time assertions. >=20 > Actually, I think what we want to use is static_assert(). The = intention in > userland C is that _Static_assert() is an internal keyword and = > adds static_assert() as an alias, similar to defining = alignas, > etc. I think what we should do for the kernel is have = define > map static_assert to _Static_assert and replace existing = _Static_assert > usage with the proper spelling. >=20 Be warned static_assert is a C++ keyword as of C++11. c++11 added: static_assert(bool_constexpr,message) c++17 added: static_assert(bool_constexpr) C11 added _Static_assert(expression,message) C2x gets _Static_assert(expression) C11 added "#define static_assert _Static_assert" to It makes for a bit of a mess in code to be allowed to be processed by both C and C++. The wording may need to specify enough to tell what to do for such code and the headers may need logic to cause that context to exist across both languages when the header is allowed for both. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Thu Feb 27 23:06:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6BCF325249D; Thu, 27 Feb 2020 23:06:13 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T7ZY2Fv6z4BgW; Thu, 27 Feb 2020 23:06:13 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48C0320572; Thu, 27 Feb 2020 23:06:13 +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 01RN6DUl067129; Thu, 27 Feb 2020 23:06:13 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RN6Dg7067128; Thu, 27 Feb 2020 23:06:13 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202002272306.01RN6Dg7067128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 27 Feb 2020 23:06:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358413 - head/contrib/sendmail/src X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/contrib/sendmail/src X-SVN-Commit-Revision: 358413 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 23:06:13 -0000 Author: jkim Date: Thu Feb 27 23:06:12 2020 New Revision: 358413 URL: https://svnweb.freebsd.org/changeset/base/358413 Log: Plug possible memory leaks in the previous patch. Two DH_free() calls were accidentally removed. Pointyhat to: jkim Modified: head/contrib/sendmail/src/tls.c Modified: head/contrib/sendmail/src/tls.c ============================================================================== --- head/contrib/sendmail/src/tls.c Thu Feb 27 22:36:16 2020 (r358412) +++ head/contrib/sendmail/src/tls.c Thu Feb 27 23:06:12 2020 (r358413) @@ -92,6 +92,7 @@ get_dh512() dhg_bn = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL); if ((dhp_bn == NULL) || (dhg_bn == NULL)) { + DH_free(dh); BN_free(dhp_bn); BN_free(dhg_bn); return NULL; @@ -155,6 +156,7 @@ get_dh2048() dhg_bn = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL); if ((dhp_bn == NULL) || (dhg_bn == NULL)) { + DH_free(dh); BN_free(dhp_bn); BN_free(dhg_bn); return NULL; From owner-svn-src-head@freebsd.org Thu Feb 27 23:06:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57A6D25252C; Thu, 27 Feb 2020 23:06:41 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T7b51klnz4C2p; Thu, 27 Feb 2020 23:06:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 352E620573; Thu, 27 Feb 2020 23:06:41 +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 01RN6eOl067191; Thu, 27 Feb 2020 23:06:40 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01RN6eUs067190; Thu, 27 Feb 2020 23:06:40 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202002272306.01RN6eUs067190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 27 Feb 2020 23:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358414 - head/sys/amd64/conf X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/amd64/conf X-SVN-Commit-Revision: 358414 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2020 23:06:41 -0000 Author: brooks Date: Thu Feb 27 23:06:40 2020 New Revision: 358414 URL: https://svnweb.freebsd.org/changeset/base/358414 Log: Remove trailing whitespace. Modified: head/sys/amd64/conf/GENERIC-NODEBUG Modified: head/sys/amd64/conf/GENERIC-NODEBUG ============================================================================== --- head/sys/amd64/conf/GENERIC-NODEBUG Thu Feb 27 23:06:12 2020 (r358413) +++ head/sys/amd64/conf/GENERIC-NODEBUG Thu Feb 27 23:06:40 2020 (r358414) @@ -1,5 +1,5 @@ # -# GENERIC-NODEBUG -- WITNESS and INVARIANTS free kernel configuration file +# GENERIC-NODEBUG -- WITNESS and INVARIANTS free kernel configuration file # for FreeBSD/amd64 # # This configuration file removes several debugging options, including From owner-svn-src-head@freebsd.org Fri Feb 28 00:37:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 691C0254BF1 for ; Fri, 28 Feb 2020 00:37:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T9cJ0ymFz43mv; Fri, 28 Feb 2020 00:37:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 8074C1B0BB; Fri, 28 Feb 2020 00:37:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358392 - head/share/man/man9 To: Mark Millard , svn-src-head@freebsd.org Cc: Warner Losh References: <217D39BA-4FDC-490C-8490-533D244E79CE.ref@yahoo.com> <217D39BA-4FDC-490C-8490-533D244E79CE@yahoo.com> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <59374055-922a-81f1-1b05-a572e1cb6b1a@FreeBSD.org> Date: Thu, 27 Feb 2020 16:37:49 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <217D39BA-4FDC-490C-8490-533D244E79CE@yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 00:37:52 -0000 On 2/27/20 2:45 PM, Mark Millard wrote: > John Baldwin jhb at FreeBSD.org wrote on > Thu Feb 27 16:55:01 UTC 2020: > >> On 2/27/20 7:30 AM, Warner Losh wrote: >>> Author: imp >>> Date: Thu Feb 27 15:30:13 2020 >>> New Revision: 358392 >>> URL: https://svnweb.freebsd.org/changeset/base/358392 >>> >>> Log: >>> _Static_assert is to be preferred to CTASSERT. >>> >>> Document the existing prefernce that _Static_assert be used in preference to the >>> old CTASSERT we used to use for compile time assertions. >> >> Actually, I think what we want to use is static_assert(). The intention in >> userland C is that _Static_assert() is an internal keyword and >> adds static_assert() as an alias, similar to defining alignas, >> etc. I think what we should do for the kernel is have define >> map static_assert to _Static_assert and replace existing _Static_assert >> usage with the proper spelling. >> > > Be warned static_assert is a C++ keyword as of C++11. > > c++11 added: static_assert(bool_constexpr,message) > c++17 added: static_assert(bool_constexpr) > > C11 added _Static_assert(expression,message) > C2x gets _Static_assert(expression) > > C11 added "#define static_assert _Static_assert" to > > It makes for a bit of a mess in code to be allowed > to be processed by both C and C++. > > The wording may need to specify enough to tell what to > do for such code and the headers may need logic to > cause that context to exist across both languages > when the header is allowed for both. The intent of the C11 changes is to permit equivalent use of static_assert() in both languages. The #define in is guarded to not kick in for C++. -- John Baldwin From owner-svn-src-head@freebsd.org Fri Feb 28 00:42:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBA47254DE9; Fri, 28 Feb 2020 00:42:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48T9jc6G17z4Fwr; Fri, 28 Feb 2020 00:42:28 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A11802178E; Fri, 28 Feb 2020 00:42:28 +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 01S0gSte026381; Fri, 28 Feb 2020 00:42:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01S0gSgJ026377; Fri, 28 Feb 2020 00:42:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202002280042.01S0gSgJ026377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 28 Feb 2020 00:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358415 - in head/sys/dev/cxgbe: . tom X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . tom X-SVN-Commit-Revision: 358415 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 00:42:30 -0000 Author: jhb Date: Fri Feb 28 00:42:27 2020 New Revision: 358415 URL: https://svnweb.freebsd.org/changeset/base/358415 Log: Rename TOE TLS stats from [rt]x_tls_* to [rt]x_toe_tls_*. This more clearly differentiates TLS records encrypted and decrypted in TOE connections from those encrypted via NIC TLS. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/tom/t4_tls.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu Feb 27 23:06:40 2020 (r358414) +++ head/sys/dev/cxgbe/adapter.h Fri Feb 28 00:42:27 2020 (r358415) @@ -308,10 +308,10 @@ struct port_info { struct port_stats stats; u_int tnl_cong_drops; u_int tx_parse_error; - u_long tx_tls_records; - u_long tx_tls_octets; - u_long rx_tls_records; - u_long rx_tls_octets; + u_long tx_toe_tls_records; + u_long tx_toe_tls_octets; + u_long rx_toe_tls_records; + u_long rx_toe_tls_octets; struct callout tick; }; Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Feb 27 23:06:40 2020 (r358414) +++ head/sys/dev/cxgbe/t4_main.c Fri Feb 28 00:42:27 2020 (r358415) @@ -7047,17 +7047,17 @@ cxgbe_sysctls(struct port_info *pi) #undef SYSCTL_ADD_T4_PORTSTAT - SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_records", - CTLFLAG_RD, &pi->tx_tls_records, + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_toe_tls_records", + CTLFLAG_RD, &pi->tx_toe_tls_records, "# of TOE TLS records transmitted"); - SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_octets", - CTLFLAG_RD, &pi->tx_tls_octets, + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_toe_tls_octets", + CTLFLAG_RD, &pi->tx_toe_tls_octets, "# of payload octets in transmitted TOE TLS records"); - SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_records", - CTLFLAG_RD, &pi->rx_tls_records, + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_toe_tls_records", + CTLFLAG_RD, &pi->rx_toe_tls_records, "# of TOE TLS records received"); - SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_octets", - CTLFLAG_RD, &pi->rx_tls_octets, + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_toe_tls_octets", + CTLFLAG_RD, &pi->rx_toe_tls_octets, "# of payload octets in received TOE TLS records"); } Modified: head/sys/dev/cxgbe/tom/t4_tls.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tls.c Thu Feb 27 23:06:40 2020 (r358414) +++ head/sys/dev/cxgbe/tom/t4_tls.c Fri Feb 28 00:42:27 2020 (r358415) @@ -1559,8 +1559,8 @@ t4_push_tls_records(struct adapter *sc, struct toepcb } toep->txsd_avail--; - atomic_add_long(&toep->vi->pi->tx_tls_records, 1); - atomic_add_long(&toep->vi->pi->tx_tls_octets, plen); + atomic_add_long(&toep->vi->pi->tx_toe_tls_records, 1); + atomic_add_long(&toep->vi->pi->tx_toe_tls_octets, plen); t4_l2t_send(sc, wr, toep->l2te); } @@ -1862,8 +1862,8 @@ t4_push_ktls(struct adapter *sc, struct toepcb *toep, } toep->txsd_avail--; - atomic_add_long(&toep->vi->pi->tx_tls_records, 1); - atomic_add_long(&toep->vi->pi->tx_tls_octets, m->m_len); + atomic_add_long(&toep->vi->pi->tx_toe_tls_records, 1); + atomic_add_long(&toep->vi->pi->tx_toe_tls_octets, m->m_len); t4_l2t_send(sc, wr, toep->l2te); } @@ -1899,7 +1899,7 @@ do_tls_data(struct sge_iq *iq, const struct rss_header m_adj(m, sizeof(*cpl)); len = m->m_pkthdr.len; - atomic_add_long(&toep->vi->pi->rx_tls_octets, len); + atomic_add_long(&toep->vi->pi->rx_toe_tls_octets, len); KASSERT(len == G_CPL_TLS_DATA_LENGTH(be32toh(cpl->length_pkd)), ("%s: payload length mismatch", __func__)); @@ -1962,7 +1962,7 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_head m_adj(m, sizeof(*cpl)); len = m->m_pkthdr.len; - atomic_add_long(&toep->vi->pi->rx_tls_records, 1); + atomic_add_long(&toep->vi->pi->rx_toe_tls_records, 1); KASSERT(len == G_CPL_RX_TLS_CMP_LENGTH(be32toh(cpl->pdulength_length)), ("%s: payload length mismatch", __func__)); From owner-svn-src-head@freebsd.org Fri Feb 28 01:02:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BADC25546F; Fri, 28 Feb 2020 01:02:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TB8B2m08z3yG0; Fri, 28 Feb 2020 01:02:02 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55BE421B62; Fri, 28 Feb 2020 01:02:02 +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 01S122nf036984; Fri, 28 Feb 2020 01:02:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01S1223Q036983; Fri, 28 Feb 2020 01:02:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002280102.01S1223Q036983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 28 Feb 2020 01:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358416 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358416 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 01:02:02 -0000 Author: imp Date: Fri Feb 28 01:02:01 2020 New Revision: 358416 URL: https://svnweb.freebsd.org/changeset/base/358416 Log: Remove duplicated ATA_CHECK_POWER_MODE Modified: head/sys/sys/ata.h Modified: head/sys/sys/ata.h ============================================================================== --- head/sys/sys/ata.h Fri Feb 28 00:42:27 2020 (r358415) +++ head/sys/sys/ata.h Fri Feb 28 01:02:01 2020 (r358416) @@ -507,7 +507,6 @@ struct ata_params { #define ATA_SF_DIS_SRVIRQ 0xde /* disable service interrupt */ #define ATA_SF_LPSAERC 0x62 /* Long Phys Sect Align ErrRep*/ #define ATA_SF_DSN 0x63 /* Device Stats Notification */ -#define ATA_CHECK_POWER_MODE 0xe5 /* Check Power Mode */ #define ATA_SECURITY_SET_PASSWORD 0xf1 /* set drive password */ #define ATA_SECURITY_UNLOCK 0xf2 /* unlock drive using passwd */ #define ATA_SECURITY_ERASE_PREPARE 0xf3 /* prepare to erase drive */ From owner-svn-src-head@freebsd.org Fri Feb 28 01:18:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79BE425590A; Fri, 28 Feb 2020 01:18:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TBVr0Tvlz4TBN; Fri, 28 Feb 2020 01:18:12 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEC9F21D63; Fri, 28 Feb 2020 01:18:11 +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 01S1IB0a044621; Fri, 28 Feb 2020 01:18:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01S1IBRl044620; Fri, 28 Feb 2020 01:18:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002280118.01S1IBRl044620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 28 Feb 2020 01:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358417 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 358417 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 01:18:12 -0000 Author: imp Date: Fri Feb 28 01:18:11 2020 New Revision: 358417 URL: https://svnweb.freebsd.org/changeset/base/358417 Log: This is a FALLTHROUGH for sure. no need for xxx comment. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Fri Feb 28 01:02:01 2020 (r358416) +++ head/sys/cam/cam_xpt.c Fri Feb 28 01:18:11 2020 (r358417) @@ -2690,7 +2690,7 @@ xpt_action_default(union ccb *start_ccb) case XPT_NVME_ADMIN: /* FALLTHROUGH */ case XPT_MMC_IO: - /* XXX just like nmve_io? */ + /* FALLTHROUGH */ case XPT_RESET_DEV: case XPT_ENG_EXEC: case XPT_SMP_IO: From owner-svn-src-head@freebsd.org Fri Feb 28 01:27:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66767255BB5; Fri, 28 Feb 2020 01:27:21 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TBjN6NFGz3L6h; Fri, 28 Feb 2020 01:27:20 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot1-x32c.google.com with SMTP id a36so1129223otb.7; Thu, 27 Feb 2020 17:27:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RMy8NnAxBkXpJi+8Zo0z2vV42C3w9rQaAFyltfhXYH4=; b=Zs+x3BbWNwiw3mw2KjQQrnnOSp/8Wz5agfzku2on2OlHBwgJ26dW+9Xb+WqYpiSJ4q mAggKAWix7KIBeqrTFo7JOgUk1K+xbBdcBFmw36MOHnQVAswTUpYwEwrgz58oaowEgne jycxZIbGBb/wi0BCh2TYW22GNMNkbvpiO6rvAylU9XdYLHAbBf6tR8wSURhyTWx+PsQH Mml2MJ+gT9rlyoYAcJgmTHluZFQAiXWEQQ7ca4jeZSICk/mfjdWp8ghLx+xgayffXHY7 2AQzhtB4y0HY4yR64gu4jccnDImnwxkLt+73XBXOfvwzvMrHwA4VWwliEMI7ROZeph8X FniQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RMy8NnAxBkXpJi+8Zo0z2vV42C3w9rQaAFyltfhXYH4=; b=hdGVC++tKl2LnXcDstZJsXVWYkHBi2gxYNmOUGRvRsAietEg8YJKAtwZSImMEMCe+t DD1koEjHP4MiESgLGgt/l3RflA4mlZNY3Cq2bLSRN+xk6X7jbdxjlshHZ30KK5stFsIl DrRkFCji86SrYfPzek2AsjhBruUQOxoJ3AxKYrP7x1WhGTPwdpf/JPiISBejTXjY29YW ZkTYt/gJLUVDHLtJyO//D/dJrYej1ku3dw6iyBsyb9WPNaU+N+H87kytvykMUiSrdVcX UxwIFdCyC4/AwguDVB8dFjlCPq2tIIB7mtFtucfSKQ50LwXIh17HC3qD/XrXwhKK3Q5G 38Gg== X-Gm-Message-State: APjAAAXq/kErwXlNWmc+oXRyPtwaXgFQlCDG/x4m5EH4KN/Yt2m0DAvs Zw+HfIXbJKGmiJQut6s9F2YiPcOE59Xv8Kzhj+l/w/lW X-Google-Smtp-Source: APXvYqyOXENHhdEWRSWO8FdXTS8OXq34LTfonDaXM3sGdBmCoqnDQytc1a+uFxXVoQ+dZg6hNSCz/nOE8/uDcB7/39s= X-Received: by 2002:a05:6830:22d8:: with SMTP id q24mr1494754otc.0.1582853238857; Thu, 27 Feb 2020 17:27:18 -0800 (PST) MIME-Version: 1.0 References: <202002280118.01S1IBRl044620@repo.freebsd.org> In-Reply-To: <202002280118.01S1IBRl044620@repo.freebsd.org> From: Benjamin Kaduk Date: Thu, 27 Feb 2020 17:27:08 -0800 Message-ID: Subject: Re: svn commit: r358417 - head/sys/cam To: Warner Losh Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 48TBjN6NFGz3L6h X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 01:27:21 -0000 On Thu, Feb 27, 2020 at 5:18 PM Warner Losh wrote: > Author: imp > Date: Fri Feb 28 01:18:11 2020 > New Revision: 358417 > URL: https://svnweb.freebsd.org/changeset/base/358417 > > Log: > This is a FALLTHROUGH for sure. no need for xxx comment. > > Modified: > head/sys/cam/cam_xpt.c > > Modified: head/sys/cam/cam_xpt.c > > ============================================================================== > --- head/sys/cam/cam_xpt.c Fri Feb 28 01:02:01 2020 (r358416) > +++ head/sys/cam/cam_xpt.c Fri Feb 28 01:18:11 2020 (r358417) > @@ -2690,7 +2690,7 @@ xpt_action_default(union ccb *start_ccb) > case XPT_NVME_ADMIN: > /* FALLTHROUGH */ > case XPT_MMC_IO: > - /* XXX just like nmve_io? */ > + /* FALLTHROUGH */ > case XPT_RESET_DEV: > case XPT_ENG_EXEC: > case XPT_SMP_IO: > > Okay, I'll bite. Why do XPT_NVME_ADMIN and XPT_MMC_IO get "FALLTHROUGH" comments but XPT_RESET_DEV and XPT_ENG_EXEC just get listed as part of the same grouping as XPT_SMP_IO? -Ben From owner-svn-src-head@freebsd.org Fri Feb 28 02:02:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A965B25654B for ; Fri, 28 Feb 2020 02:02:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TCTW4bfJz4qv6 for ; Fri, 28 Feb 2020 02:02:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf33.google.com with SMTP id by15so629706qvb.11 for ; Thu, 27 Feb 2020 18:02:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gUiczxBpokjl0OovfrbB20BwP9W584TK2wcfUspYBNw=; b=qZUu8ZCYvcX/e4L1za6IbMhwS4RfXHrhTeg9AgBuXVDcbBlVCRx7DeLzl4GSzTDwHO hH/g6goVCL/XCErgRoNL+N/5DGiRP1rGhp+GyhiJCtWzlZwC2iC5ovDWDNg2MWJHYfGZ 3GMyyLpHPXASpoDzuEN9HE9XDTtByQvSgLdSUQAXq3vjp8zoclxEGVm3R449niZtO6FR RZlOjznOuQ9u3+33Er6BUQXAhvOcD12rZIz/U4CmhvRwNLgn8/QnfXOq79+GPwGDM4s/ XbJYHprwxPex7qTK40nSvCntNm1U1Ug6dp3aQY2L2YWU0GHIPQMP+/1JDSpo7TZC9G8D GMlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gUiczxBpokjl0OovfrbB20BwP9W584TK2wcfUspYBNw=; b=BuB6rSgNVzjRwIxabb62j2hR0oZ8RRLNfuD/GF4wA6np+tdfexpZ64/cmwCaug3AbJ UZwSSefahJNdx7ihUVBGsQeB1R/b1g8egG2CWRVrAd0XiTyeKpAPXMQUz4OhncVtRIiR PnXEUL1MIMCCZpN46dFfdUc9P2TOB98VeopFoKxu8HDZZBwg7Dl1vSrKB2G8htK6rZAJ +Ytra1wc900fJQL9npa61NxxHRkjoKQUZT0xwrgU3/+7yZpDFBxiBIzLAE5N6GqbRThh ICtFIh15P7woDJZJtGGrIl9vhXSvLGKWz0zKp8mUXWJFv45xVSLkvTnBVfc5/eE0r6Tz pWeg== X-Gm-Message-State: APjAAAV0pqsYt7+Gfgz9laEHX/Mu1AWnN1RqRdhyuBTmZjpDbN4f5/NN EM+eW7mMMGjuF9Zx6KmQS3QpqQy/k5MrsQJbVH1wsQ== X-Google-Smtp-Source: APXvYqxmuSL0hteFTupUjJn3wUN3kcHsQP9rIYmoxW19WvjEH30AU+ksa0O6R0/8x8TO4EBd+97rum1aVOZ9w4stMaw= X-Received: by 2002:a05:6214:b92:: with SMTP id fe18mr1926044qvb.118.1582855320739; Thu, 27 Feb 2020 18:02:00 -0800 (PST) MIME-Version: 1.0 References: <202002280118.01S1IBRl044620@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 27 Feb 2020 19:01:46 -0700 Message-ID: Subject: Re: svn commit: r358417 - head/sys/cam To: Benjamin Kaduk Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 48TCTW4bfJz4qv6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=qZUu8ZCY; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f33) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.91 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-1.91)[ip: (-5.96), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 02:02:08 -0000 On Thu, Feb 27, 2020, 6:27 PM Benjamin Kaduk wrote: > On Thu, Feb 27, 2020 at 5:18 PM Warner Losh wrote: > >> Author: imp >> Date: Fri Feb 28 01:18:11 2020 >> New Revision: 358417 >> URL: https://svnweb.freebsd.org/changeset/base/358417 >> >> Log: >> This is a FALLTHROUGH for sure. no need for xxx comment. >> >> Modified: >> head/sys/cam/cam_xpt.c >> >> Modified: head/sys/cam/cam_xpt.c >> >> ============================================================================== >> --- head/sys/cam/cam_xpt.c Fri Feb 28 01:02:01 2020 (r358416) >> +++ head/sys/cam/cam_xpt.c Fri Feb 28 01:18:11 2020 (r358417) >> @@ -2690,7 +2690,7 @@ xpt_action_default(union ccb *start_ccb) >> case XPT_NVME_ADMIN: >> /* FALLTHROUGH */ >> case XPT_MMC_IO: >> - /* XXX just like nmve_io? */ >> + /* FALLTHROUGH */ >> case XPT_RESET_DEV: >> case XPT_ENG_EXEC: >> case XPT_SMP_IO: >> >> > Okay, I'll bite. Why do XPT_NVME_ADMIN and XPT_MMC_IO get "FALLTHROUGH" > comments but XPT_RESET_DEV and XPT_ENG_EXEC just get listed as part of the > same grouping as XPT_SMP_IO? > Good question. I just fixed a dubious xxx comment, but you mat be right. Warner > From owner-svn-src-head@freebsd.org Fri Feb 28 03:04:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4BFD257AFB for ; Fri, 28 Feb 2020 03:04:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-22.consmr.mail.gq1.yahoo.com (sonic310-22.consmr.mail.gq1.yahoo.com [98.137.69.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 48TDrz33Tcz4cZ0 for ; Fri, 28 Feb 2020 03:04:03 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: yMsHelgVM1lSLGqTMxwejMjEOcqo72dUbHhLnwFV5Q3KJrAFAu6O4JVVId8djNg JuJ0i36WPHaN3.8ZQKpFl7Z5D.TuwTisu3YFT.ewXnFtdBLzQkNafd4mTrEr.InfhVe2U58nzdkR Ol3gBl8YNLbOWrgQBLrc2ZdZ9uiOVVWJkTXZKOpDNBVNaZFyZS0RA0SCbDaluJZkiliQQvAdnFNt LYKVJFIM64APE.TUPMUiwRpXbNuxVtyxuUQQyCKD0GIUX08a9K4JLDSDuRb05jF1PUt8jQJ2eM3s RHPHuOr8tT9fHSP7aiR1PAjYsfU8ePi1sx91gZo5mrOI1mBxcCmu_qsoaRhRIgNP0lZw1Kh3MxAE Iu6Nc.8a.mkl_7vKUznlFJmCj8.e.quBueuu3vk4enidpBt.nKebzrTCC47sI_Njl6A_koJZyJC0 7xzrpVOeGuC5NExRIfyO9p9y_pziaWih8jDMbE9d3P9pL5qgxv68ayHYslXeMhhRGx.fpm62d6o6 UEuajckG4tXtrKDvZOdm_Sw1HxpjN9EY.O9xzssyGSZ2tHqClPV7tLLnuWobJtoo.Iyf189dzNqn xJ69klau3KvfjfUH2ZAWnjc8LjX4JXpUCOgRK3KMLo73f0MgZeSwZyyNTgqKLJdVy04SjNLO3KMf o6T.0WvZ8Ov.mZkw2Lu22vZE2mjAc1ASF.L7Qntm8GBMEAKD74nc99klui3PN8MFpwbbq5HdBXqp BKCEtoy1UTfAa9g5B8ttOZbCo3PjORwsTc6p4bNL67d4PYt9_XqLuh9putsjRhZqBa7Q6BMxW8bU Zh0gSqAvc6jVMIbAPI498S3iWEFvNvHQrVMYl3xKqr7peS8RMEtYAy_5KVGjMfjJVwkDfZROpJbY i1AJLuWUDC8_8vRiOj.9KFgTwzkNOHNm0FeCEcuu_h8ysUkUHnt0rdd.ChzNtkrnRuSRJ8YXS49J 3VZ_6Nw.iS0JWyF9PPnQavDmomNwIXuU5GXNO9g3VNJ.vOaivxTcS6aHKbWPCcCut_sM_mmSVo2C SMeHTklARlHdbAcFJeJo3jYmEcKHESyHesn_gksmPSXhrm.5NLNHSiHEJwIf2IF.E5Ln3vGfM3VP EsiayoDS4Jn1xdiAzIUSeaMmGfuh3zCrKOOAPiwc0tvfRknxZnW8YkwyBjZLHLE7.05uBDOLEtkw whMla.zRT1N4uv30end8xCxbsUIWR1tuRorMQNJ1t5g8EIRAwXpWyM_nLCfht6tyad7SOmPkFgxI y9t8h2y7Vq2zJWeGW1k7510hA_N8rJVnY2.DmYtWq.cMKgHsLBK7unjYVUWRfIpFXxMF0XB5gBPy qhq0P0XCed7UmeCWpLIzkcxBT9rdGP5nxPSbBcEGOlwpNnHWYHNLaMFtLV0YqetNkoBD0ppU6bJE FrasYPYaUc31QYG2xwAVF78O38Yw8AtbW3gzEcoC6AUUSw_ooqCiL0GOG Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Fri, 28 Feb 2020 03:04:01 +0000 Received: by smtp417.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID e3bdedc1f3abe575e4464ee07df14f6a; Fri, 28 Feb 2020 03:03:58 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358392 - head/share/man/man9 From: Mark Millard In-Reply-To: <59374055-922a-81f1-1b05-a572e1cb6b1a@FreeBSD.org> Date: Thu, 27 Feb 2020 19:03:58 -0800 Cc: svn-src-head@freebsd.org, Warner Losh Content-Transfer-Encoding: quoted-printable Message-Id: References: <217D39BA-4FDC-490C-8490-533D244E79CE.ref@yahoo.com> <217D39BA-4FDC-490C-8490-533D244E79CE@yahoo.com> <59374055-922a-81f1-1b05-a572e1cb6b1a@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48TDrz33Tcz4cZ0 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.47 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.974,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[148.69.137.98.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (-0.23), ipnet: 98.137.64.0/21(0.83), asn: 36647(0.66), country: US(-0.05)]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 03:04:04 -0000 On 2020-Feb-27, at 16:37, John Baldwin wrote: > On 2/27/20 2:45 PM, Mark Millard wrote: >> John Baldwin jhb at FreeBSD.org wrote on >> Thu Feb 27 16:55:01 UTC 2020: >>=20 >>> On 2/27/20 7:30 AM, Warner Losh wrote: >>>> Author: imp >>>> Date: Thu Feb 27 15:30:13 2020 >>>> New Revision: 358392 >>>> URL: https://svnweb.freebsd.org/changeset/base/358392 >>>>=20 >>>> Log: >>>> _Static_assert is to be preferred to CTASSERT. >>>>=20 >>>> Document the existing prefernce that _Static_assert be used in = preference to the >>>> old CTASSERT we used to use for compile time assertions. >>>=20 >>> Actually, I think what we want to use is static_assert(). The = intention in >>> userland C is that _Static_assert() is an internal keyword and = >>> adds static_assert() as an alias, similar to defining = alignas, >>> etc. I think what we should do for the kernel is have = define >>> map static_assert to _Static_assert and replace existing = _Static_assert >>> usage with the proper spelling. >>>=20 >>=20 >> Be warned static_assert is a C++ keyword as of C++11. >>=20 >> c++11 added: static_assert(bool_constexpr,message) >> c++17 added: static_assert(bool_constexpr) >>=20 >> C11 added _Static_assert(expression,message) >> C2x gets _Static_assert(expression) >>=20 >> C11 added "#define static_assert _Static_assert" to >>=20 >> It makes for a bit of a mess in code to be allowed >> to be processed by both C and C++. >>=20 >> The wording may need to specify enough to tell what to >> do for such code and the headers may need logic to >> cause that context to exist across both languages >> when the header is allowed for both. >=20 > The intent of the C11 changes is to permit equivalent use of = static_assert() > in both languages. The #define in is guarded to not kick = in for > C++. Ahh. I had vague memories of past oddities in the area that I was involved in. So I looked and found (in head -r3578132 source) : # more /usr/src/sys/sys/cdefs.h . . . #if !__has_extension(c_static_assert) #if (defined(__cplusplus) && __cplusplus >=3D 201103L) || \ __has_extension(cxx_static_assert) #define _Static_assert(x, y) static_assert(x, y) #elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus) /* Nothing, gcc 4.6 and higher has _Static_assert built-in */ #elif defined(__COUNTER__) #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) #define __Static_assert(x, y) ___Static_assert(x, y) #define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : = -1] \ __unused #else #define _Static_assert(x, y) struct __hack #endif #endif . . . # more /usr/include/assert.h . . . /* * Static assertions. In principle we could define static_assert for * C++ older than C++11, but this breaks if _Static_assert is * implemented as a macro. * * C++ template parameters may contain commas, even if not enclosed in * parentheses, causing the _Static_assert macro to be invoked with more * than two parameters. */ #if __ISO_C_VISIBLE >=3D 2011 && !defined(__cplusplus) #define static_assert _Static_assert #endif . . . So one can define a _Static_assert macro, sometimes in terms of static_assert, and the other sometimes defines a static_assert macro in terms of _Static_assert. Messy, but possibly localized. That prompted a more general grep: # grep -r "define[ _]*[Ss]tatic_assert" /usr/src/* | more /usr/src/contrib/llvm-project/libcxx/include/__config:# define = static_assert(...) _Static_assert(__VA_ARGS__) /usr/src/contrib/llvm-project/libunwind/src/config.h: #define = static_assert(__b, __m) \ /usr/src/include/assert.h: * Static assertions. In principle we could = define static_assert for /usr/src/include/assert.h:#define static_assert _Static_assert /usr/src/sys/sys/cdefs.h:#define _Static_assert(x, y) = static_assert(x, y) /usr/src/sys/sys/cdefs.h:#define _Static_assert(x, y) = __Static_assert(x, __COUNTER__) /usr/src/sys/sys/cdefs.h:#define __Static_assert(x, y) = ___Static_assert(x, y) /usr/src/sys/sys/cdefs.h:#define ___Static_assert(x, y) typedef = char __assert_ ## y[(x) ? 1 : -1] \ /usr/src/sys/sys/cdefs.h:#define _Static_assert(x, y) struct = __hack /usr/src/usr.bin/dtc/util.hh:#define static_assert(x, y) ((void)0) So not much else. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Feb 28 03:38:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CAEC2584E3; Fri, 28 Feb 2020 03:38:58 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TFdG060mz4flL; Fri, 28 Feb 2020 03:38:57 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D74EE23745; Fri, 28 Feb 2020 03:38:57 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01S3cvLp029227; Fri, 28 Feb 2020 03:38:57 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01S3cvBs029225; Fri, 28 Feb 2020 03:38:57 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202002280338.01S3cvBs029225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Fri, 28 Feb 2020 03:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358418 - in head/usr.sbin/bsdconfig: include share/media X-SVN-Group: head X-SVN-Commit-Author: philip X-SVN-Commit-Paths: in head/usr.sbin/bsdconfig: include share/media X-SVN-Commit-Revision: 358418 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 03:38:58 -0000 Author: philip Date: Fri Feb 28 03:38:57 2020 New Revision: 358418 URL: https://svnweb.freebsd.org/changeset/base/358418 Log: bsdconfig: remove the Italian mirror ftp.it.FreeBSD.org has been down for several years. PR: 244481 Reported by: xgeoplasma6@gmail.com MFC after: 3 days Modified: head/usr.sbin/bsdconfig/include/messages.subr head/usr.sbin/bsdconfig/share/media/ftp.subr Modified: head/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/include/messages.subr Fri Feb 28 01:18:11 2020 (r358417) +++ head/usr.sbin/bsdconfig/include/messages.subr Fri Feb 28 03:38:57 2020 (r358418) @@ -201,7 +201,6 @@ msg_ipv6_ready="IPv6 ready" msg_irc_desc="Internet Relay Chat utilities." msg_ireland="Ireland" msg_israel="Israel" -msg_italy="Italy" msg_japan="Japan" msg_japanese_desc="Ported software for the Japanese market." msg_java_desc="Java language support." Modified: head/usr.sbin/bsdconfig/share/media/ftp.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/ftp.subr Fri Feb 28 01:18:11 2020 (r358417) +++ head/usr.sbin/bsdconfig/share/media/ftp.subr Fri Feb 28 03:38:57 2020 (r358418) @@ -127,7 +127,6 @@ f_dialog_menu_media_ftp() ' $msg_greece #2' 'ftp2.gr.freebsd.org' '$msg_ireland' 'ftp3.ie.freebsd.org' '$msg_israel' 'ftp.il.freebsd.org' - '$msg_italy' 'ftp.it.freebsd.org' '$msg_japan' 'ftp.jp.freebsd.org' ' $msg_japan #2' 'ftp2.jp.freebsd.org' ' $msg_japan #3' 'ftp3.jp.freebsd.org' From owner-svn-src-head@freebsd.org Fri Feb 28 03:39:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C287258505; Fri, 28 Feb 2020 03:39:02 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TFdK2Sztz4fsp; Fri, 28 Feb 2020 03:39:01 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0607F23747; Fri, 28 Feb 2020 03:39:01 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01S3d0OX029291; Fri, 28 Feb 2020 03:39:00 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01S3d0NN029290; Fri, 28 Feb 2020 03:39:00 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202002280339.01S3d0NN029290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Fri, 28 Feb 2020 03:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358419 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: philip X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 358419 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 03:39:02 -0000 Author: philip Date: Fri Feb 28 03:39:00 2020 New Revision: 358419 URL: https://svnweb.freebsd.org/changeset/base/358419 Log: bsdinstall: remove the Italian mirror ftp.it.FreeBSD.org has been down for several years. PR: 244481 Reported by: xgeoplasma6@gmail.com MFC after: 3 days Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- head/usr.sbin/bsdinstall/scripts/mirrorselect Fri Feb 28 03:38:57 2020 (r358418) +++ head/usr.sbin/bsdinstall/scripts/mirrorselect Fri Feb 28 03:39:00 2020 (r358419) @@ -89,7 +89,6 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ ftp://ftp2.gr.freebsd.org "Greece #2"\ ftp://ftp3.ie.freebsd.org "Ireland #3"\ ftp://ftp.il.freebsd.org "Israel"\ - ftp://ftp.it.freebsd.org "Italy"\ ftp://ftp.jp.freebsd.org "Japan"\ ftp://ftp2.jp.freebsd.org "Japan #2"\ ftp://ftp3.jp.freebsd.org "Japan #3"\ From owner-svn-src-head@freebsd.org Fri Feb 28 04:17:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0827259231 for ; Fri, 28 Feb 2020 04:17:47 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-8.consmr.mail.gq1.yahoo.com (sonic316-8.consmr.mail.gq1.yahoo.com [98.137.69.32]) (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 48TGTz3vJXz438w for ; Fri, 28 Feb 2020 04:17:42 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: EU7j6HwVM1mGDGXKkPTKNHc6b5Hsh4634HdidzWDpLVXPS.J0ty34I78lUNVJkS BxRUeIuSX5bfQpRZaDbs8f9fn3LgfvvzNgnFw_YqMJ0mp9N1IYCu1m7QD3xn5.HaSCybjNlIfGd_ bYYSRCUBlqcxsierhYiqZGRMyCRrUbDqv_ZjqctvED59SkW7HdowxVge6karlLPmX7G1e3zPrxrP vDwozBkeu_8zi11.YygljDRlzRI0h8L6XgxvzcFfB0i5ntMvbyaGW2WJmWOwHuajAdKUUUkMP0kN BIE03WtoG9OyqinFYCGdycsMOrP5NGvOnPitHhbU1g7SV37Qpw6BeCfpqlpwgeDonbppxAHDyVeE 4zObXmfesOiW2CadscZxIsSuZFNqBlzA2XQcaYh8evKjM9yFrAwUNBDjghaaDkEc24tCyMEMlv1_ Do6QCrlCZOw.kVfgRmZNikcH1srCHwyr_QAnQNq80MY.P7rpNc4EvUOMuapheI6bSC.3ampxnbWj OmMFTmnqrhAGU7AsQO5ibreeQCufmRkSQfq_vHwFix1XL2TD9BAu_m_ldc5I92pjLXsyp4tlSqoc tpiMNRXZ7ZQ0E9wfvhvEWegPl3uoBEabPiaCZ4qFrLLiNUACyRuouJJlgMZ07GX0HkpyH2Kfz2By DyPvsxjqIUWpXnJZHp1eS1GWlX6vE0ZaqsY5qoI1.3LUgFvITG2oJgDIweJX6H_4jST38.WEWv2U g5Pi2jCZf.Kqw9DuEvMkSqbw0ztjlluTS7.k6gU9U6TthBINjEA.gjJQp1gHfpWQl9bFVlI2p0m2 0Wn34O4iwUOH72TuOPQjQ.bM3QPW9yc7ZlOiEG_ryaJAh5OqrJbns9DU7xAmPcPO8OAF4XhvHZiG 2sbVgW.UEkyIfHnehzO_jtXhfyF2MI3P7UHYj0aKt4XWXIYKRXiRpSe8fZFFNuUD5F1CFyXABCwJ 6RzCwC5XwnlUOQ1dwgHbmrunBDcP0SaMAobaNNVLO9EI7xqsWp9X89uz2aBagBlwm_FMEIRQ6NrV OSAlzk4y1MM73v1dSMpMmBVRmXEL1uzMkOOEL1cs4yRIa.FMBKBhixu7tQFQpdLjqBVxBbuAg4JW xqiquC4A0NG6DjreGAtdZcuqIMZPqLmf74kuk7otX8Y7fklm_ejbtjtCeDJb5QXizTk289j0Lv7j 7pjniY1F0V1JYnSQ6KYZJNKU2d0jMLh5psbtKwPkRpQbI7MkS_HDAEl0Z1oIOz0UqS.YI8k5Li6H ClVZvwQ3sOadY4VpMlJG3s1zWlWY3bDEnu8K_p2itL64xVDmspa69UNPG9VWoELXwbxw34euoqK_ UTxcE4X..UPFD7QReN9JX703TmsyyCtdsbTqvhvhkHT7K5HuXIzUhFbzadQWzazzhoOjeSJLz0uo NTQWefDTV2cSn1tg.m.G9Yws- Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Fri, 28 Feb 2020 04:17:41 +0000 Received: by smtp404.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 35fc1966e254083aa321d27842bab59d; Fri, 28 Feb 2020 04:17:40 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358392 - head/share/man/man9 From: Mark Millard In-Reply-To: Date: Thu, 27 Feb 2020 20:17:39 -0800 Cc: svn-src-head@freebsd.org, Warner Losh Content-Transfer-Encoding: quoted-printable Message-Id: <45DC452F-C753-46D7-A071-0B231F6F6206@yahoo.com> References: <217D39BA-4FDC-490C-8490-533D244E79CE.ref@yahoo.com> <217D39BA-4FDC-490C-8490-533D244E79CE@yahoo.com> <59374055-922a-81f1-1b05-a572e1cb6b1a@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48TGTz3vJXz438w X-Spamd-Bar: - X-Spamd-Result: default: False [-1.31 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.18)[-0.176,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-0.64)[-0.636,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (5.13), ipnet: 98.137.64.0/21(0.83), asn: 36647(0.66), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[32.69.137.98.list.dnswl.org : 127.0.5.0]; RWL_MAILSPIKE_POSSIBLE(0.00)[32.69.137.98.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 04:17:47 -0000 [Ignoring llvm-project and libstdc++, I only find about 24 other instances of "static_assert".] On 2020-Feb-27, at 19:03, Mark Millard wrote > On 2020-Feb-27, at 16:37, John Baldwin wrote: >=20 >> On 2/27/20 2:45 PM, Mark Millard wrote: >>> John Baldwin jhb at FreeBSD.org wrote on >>> Thu Feb 27 16:55:01 UTC 2020: >>>=20 >>>> On 2/27/20 7:30 AM, Warner Losh wrote: >>>>> Author: imp >>>>> Date: Thu Feb 27 15:30:13 2020 >>>>> New Revision: 358392 >>>>> URL: https://svnweb.freebsd.org/changeset/base/358392 >>>>>=20 >>>>> Log: >>>>> _Static_assert is to be preferred to CTASSERT. >>>>>=20 >>>>> Document the existing prefernce that _Static_assert be used in = preference to the >>>>> old CTASSERT we used to use for compile time assertions. >>>>=20 >>>> Actually, I think what we want to use is static_assert(). The = intention in >>>> userland C is that _Static_assert() is an internal keyword and = >>>> adds static_assert() as an alias, similar to defining = alignas, >>>> etc. I think what we should do for the kernel is have = define >>>> map static_assert to _Static_assert and replace existing = _Static_assert >>>> usage with the proper spelling. >>>>=20 >>>=20 >>> Be warned static_assert is a C++ keyword as of C++11. >>>=20 >>> c++11 added: static_assert(bool_constexpr,message) >>> c++17 added: static_assert(bool_constexpr) >>>=20 >>> C11 added _Static_assert(expression,message) >>> C2x gets _Static_assert(expression) >>>=20 >>> C11 added "#define static_assert _Static_assert" to >>>=20 >>> It makes for a bit of a mess in code to be allowed >>> to be processed by both C and C++. >>>=20 >>> The wording may need to specify enough to tell what to >>> do for such code and the headers may need logic to >>> cause that context to exist across both languages >>> when the header is allowed for both. >>=20 >> The intent of the C11 changes is to permit equivalent use of = static_assert() >> in both languages. The #define in is guarded to not kick = in for >> C++. >=20 > Ahh. I had vague memories of past oddities in the area > that I was involved in. So I looked and found (in head > -r3578132 source) : >=20 > # more /usr/src/sys/sys/cdefs.h > . . . > #if !__has_extension(c_static_assert) > #if (defined(__cplusplus) && __cplusplus >=3D 201103L) || \ > __has_extension(cxx_static_assert) > #define _Static_assert(x, y) static_assert(x, y) > #elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus) > /* Nothing, gcc 4.6 and higher has _Static_assert built-in */ > #elif defined(__COUNTER__) > #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) > #define __Static_assert(x, y) ___Static_assert(x, y) > #define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : = -1] \ > __unused > #else > #define _Static_assert(x, y) struct __hack > #endif > #endif > . . . >=20 > # more /usr/include/assert.h > . . . > /* > * Static assertions. In principle we could define static_assert for > * C++ older than C++11, but this breaks if _Static_assert is > * implemented as a macro. > * > * C++ template parameters may contain commas, even if not enclosed in > * parentheses, causing the _Static_assert macro to be invoked with = more > * than two parameters. > */ > #if __ISO_C_VISIBLE >=3D 2011 && !defined(__cplusplus) > #define static_assert _Static_assert > #endif > . . . >=20 > So one can define a _Static_assert macro, sometimes in terms of > static_assert, and the other sometimes defines a static_assert > macro in terms of _Static_assert. >=20 > Messy, but possibly localized. >=20 > That prompted a more general grep: >=20 > # grep -r "define[ _]*[Ss]tatic_assert" /usr/src/* | more > /usr/src/contrib/llvm-project/libcxx/include/__config:# define = static_assert(...) _Static_assert(__VA_ARGS__) > /usr/src/contrib/llvm-project/libunwind/src/config.h: #define = static_assert(__b, __m) \ > /usr/src/include/assert.h: * Static assertions. In principle we could = define static_assert for > /usr/src/include/assert.h:#define static_assert _Static_assert > /usr/src/sys/sys/cdefs.h:#define _Static_assert(x, y) = static_assert(x, y) > /usr/src/sys/sys/cdefs.h:#define _Static_assert(x, y) = __Static_assert(x, __COUNTER__) > /usr/src/sys/sys/cdefs.h:#define __Static_assert(x, y) = ___Static_assert(x, y) > /usr/src/sys/sys/cdefs.h:#define ___Static_assert(x, y) = typedef char __assert_ ## y[(x) ? 1 : -1] \ > /usr/src/sys/sys/cdefs.h:#define _Static_assert(x, y) struct = __hack > /usr/src/usr.bin/dtc/util.hh:#define static_assert(x, y) ((void)0) >=20 > So not much else. Just an FYI: Looks like static_assert is little used (outside llvm-project and libstdc++): # grep -r "\" /usr/src/* | grep -v llvm-project | grep = -v "libstdc\+\+" | more /usr/src/contrib/googletest/googlemock/include/gmock/gmock-matchers.h: = static_assert( /usr/src/contrib/googletest/googlemock/include/gmock/gmock-matchers.h: = static_assert(sizeof...(Args) > 0, "Must have at least one matcher."); /usr/src/contrib/googletest/googlemock/docs/DesignDoc.md:Google Test = (the name is chosen to match `static_assert` in C++0x). = /usr/src/contrib/googletest/googletest/include/gtest/internal/gtest-port.h= :# define GTEST_COMPILE_ASSERT_(expr, msg) static_assert(expr, #msg) = /usr/src/contrib/googletest/googletest/include/gtest/internal/gtest-port.h= :// (In C++11, we simply use static_assert instead of the following) /usr/src/contrib/bsnmp/snmpd/trans_inet.c:static_assert(offsetof(struct = port_sock, input) =3D=3D 0, /usr/src/contrib/bsnmp/snmpd/trans_inet.c:static_assert(offsetof(struct = inet_port, tport) =3D=3D 0, /usr/src/contrib/libcxxrt/guard.cc:static_assert(sizeof(guard_t) =3D=3D = sizeof(uint64_t), ""); /usr/src/contrib/ofed/libibumad/umad.c:static_assert(sizeof(struct = ib_user_mad_reg_req) =3D=3D IOCPARM_LEN(IB_USER_MAD_REGISTER_AGENT), /usr/src/contrib/ofed/libibumad/umad.c:static_assert(sizeof(struct = ib_user_mad_reg_req2) =3D=3D IOCPARM_LEN(IB_USER_MAD_REGISTER_AGENT2), /usr/src/include/assert.h: * Static assertions. In principle we could = define static_assert for /usr/src/include/assert.h:#define static_assert _Static_assert /usr/src/sys/sys/cdefs.h:#define _Static_assert(x, y) = static_assert(x, y) /usr/src/sys/contrib/zstd/contrib/pzstd/utils/FileSystem.h: = static_assert(false, "No POSIX stat() support."); /usr/src/sys/contrib/zstd/contrib/pzstd/utils/FileSystem.h: = static_assert(false, "NO POSIX stat() support."); /usr/src/usr.bin/dtc/HACKING:The code also makes use of = `static_assert()` to track compile-time invariants. /usr/src/usr.bin/dtc/util.hh:#ifndef static_assert /usr/src/usr.bin/dtc/util.hh:#define static_assert(x, y) ((void)0) /usr/src/usr.bin/dtc/util.hh: static_assert(sizeof(T) > 1, /usr/src/usr.sbin/bhyve/task_switch.c:static_assert(sizeof(struct tss32) = =3D=3D 104, "compile-time assertion failed"); /usr/src/usr.sbin/bhyve/pci_emul.h:static_assert(sizeof(struct msicap) = =3D=3D 14, "compile-time assertion failed"); /usr/src/usr.sbin/bhyve/pci_emul.h:static_assert(sizeof(struct msixcap) = =3D=3D 12, "compile-time assertion failed"); /usr/src/usr.sbin/bhyve/pci_emul.h:static_assert(sizeof(struct pciecap) = =3D=3D 60, "compile-time assertion failed"); /usr/src/usr.sbin/syslogd/syslogd.c: = static_assert(sizeof(f->f_prevline) =3D=3D sizeof(saved), _Static_assert looks to be far more common. (Too long to list here.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Feb 28 05:46:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE64B25AA07 for ; Fri, 28 Feb 2020 05:46:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TJSr4SPsz48t0 for ; Fri, 28 Feb 2020 05:46:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x833.google.com with SMTP id l16so1250834qtq.1 for ; Thu, 27 Feb 2020 21:46:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X0mnjLlFpg1dAL++Y/0Mm+Ul0c4lrq1QtiPihbMx/go=; b=ahPQaPcR7jXC1nzaYtCbL77XB1Y4ewQwpkC8Cuxa97SsnStgmhuAyYu1Bsp0nTow5A usJWA0tfNuef83gqiUt+TrL5uLP1KvjpQH0rpl126VcrRJDSzzEOI7IL1vKAU7E3rfTz 6I6+j+u2wSEJTrMr/cAdfgIS9FQRN3foRRPRzXt3Bl6hQY8zD35/m0jNMnrLjuwHgkkQ ioh+au2ktpQ+C2L7PLrV7WsbWzbsiSnbyp/azvGi+eyzls0mIyqTHLOQpjaV1wCgUzR8 f9wuMVlWynfpp0mwIVuPTsWMLWKX9sc5g3apmmuKYqLEC00Hke7eexvJf7EFRhTILUBR BTkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X0mnjLlFpg1dAL++Y/0Mm+Ul0c4lrq1QtiPihbMx/go=; b=OIFhb/6lkOvIKlTMVR8o4pro4rdqwFWMrARstar63iOSobQ5jjG31jFEOHTc4j/va6 ykkTQAehbSePKKkJiH7ekYg48HvfX3REpZ/4nj5nHm+jS13nM8rZatswjctF3EnQizbi vDURI6Dxh0QCg4vHKW8nUWI5HznJVcmVquisZawOcYDgmG4HbMujlMqSYxy4JOeNZ8nr +I8FhOsT/Ck69EZfnpCVpJUTlYwHUFBoSnrMWYD47Qq9NY6RNJnYdoT8dzyCNI16Huh3 G4cAZ4OUxM/FhaXBqqiIar82O0xIYPMPUXqVcoaOnVYVt4UqTtBduGCBZoZkbxzCcTxW B7cg== X-Gm-Message-State: APjAAAUyHIQg0vyMbTiDSRCyZ7TRS3ruOvNHiuL6K2Kw9vGyfaq3YsAF LWdeMw0KHJeg7hLuN70KHfFwp3W+Vgktf1DstWT7zQ== X-Google-Smtp-Source: APXvYqwVUDAn10RqedkGWJUTuHsXujlUJjpr5ZUnzkClJd8WaeFYg5yedEuv0xQzLerx37f8vMLtTJC/ZPKeHBAnIT8= X-Received: by 2002:ac8:4e93:: with SMTP id 19mr2796148qtp.32.1582868810831; Thu, 27 Feb 2020 21:46:50 -0800 (PST) MIME-Version: 1.0 References: <217D39BA-4FDC-490C-8490-533D244E79CE.ref@yahoo.com> <217D39BA-4FDC-490C-8490-533D244E79CE@yahoo.com> <59374055-922a-81f1-1b05-a572e1cb6b1a@FreeBSD.org> <45DC452F-C753-46D7-A071-0B231F6F6206@yahoo.com> In-Reply-To: <45DC452F-C753-46D7-A071-0B231F6F6206@yahoo.com> From: Warner Losh Date: Thu, 27 Feb 2020 22:46:38 -0700 Message-ID: Subject: Re: svn commit: r358392 - head/share/man/man9 To: Mark Millard Cc: John Baldwin , svn-src-head X-Rspamd-Queue-Id: 48TJSr4SPsz48t0 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=ahPQaPcR; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::833) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.56 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[9]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[3.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_TO(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.56)[ip: (-9.19), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 05:46:55 -0000 On Thu, Feb 27, 2020, 9:17 PM Mark Millard wrote: > [Ignoring llvm-project and libstdc++, I only find > about 24 other instances of "static_assert".] > > On 2020-Feb-27, at 19:03, Mark Millard wrote > > > On 2020-Feb-27, at 16:37, John Baldwin wrote: > > > >> On 2/27/20 2:45 PM, Mark Millard wrote: > >>> John Baldwin jhb at FreeBSD.org wrote on > >>> Thu Feb 27 16:55:01 UTC 2020: > >>> > >>>> On 2/27/20 7:30 AM, Warner Losh wrote: > >>>>> Author: imp > >>>>> Date: Thu Feb 27 15:30:13 2020 > >>>>> New Revision: 358392 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/358392 > >>>>> > >>>>> Log: > >>>>> _Static_assert is to be preferred to CTASSERT. > >>>>> > >>>>> Document the existing prefernce that _Static_assert be used in > preference to the > >>>>> old CTASSERT we used to use for compile time assertions. > >>>> > >>>> Actually, I think what we want to use is static_assert(). The > intention in > >>>> userland C is that _Static_assert() is an internal keyword and > > >>>> adds static_assert() as an alias, similar to defining > alignas, > >>>> etc. I think what we should do for the kernel is have > define > >>>> map static_assert to _Static_assert and replace existing > _Static_assert > >>>> usage with the proper spelling. > >>>> > >>> > >>> Be warned static_assert is a C++ keyword as of C++11. > >>> > >>> c++11 added: static_assert(bool_constexpr,message) > >>> c++17 added: static_assert(bool_constexpr) > >>> > >>> C11 added _Static_assert(expression,message) > >>> C2x gets _Static_assert(expression) > >>> > >>> C11 added "#define static_assert _Static_assert" to > >>> > >>> It makes for a bit of a mess in code to be allowed > >>> to be processed by both C and C++. > >>> > >>> The wording may need to specify enough to tell what to > >>> do for such code and the headers may need logic to > >>> cause that context to exist across both languages > >>> when the header is allowed for both. > >> > >> The intent of the C11 changes is to permit equivalent use of > static_assert() > >> in both languages. The #define in is guarded to not kick in > for > >> C++. > > > > Ahh. I had vague memories of past oddities in the area > > that I was involved in. So I looked and found (in head > > -r3578132 source) : > > > > # more /usr/src/sys/sys/cdefs.h > > . . . > > #if !__has_extension(c_static_assert) > > #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > > __has_extension(cxx_static_assert) > > #define _Static_assert(x, y) static_assert(x, y) > > #elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus) > > /* Nothing, gcc 4.6 and higher has _Static_assert built-in */ > > #elif defined(__COUNTER__) > > #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) > > #define __Static_assert(x, y) ___Static_assert(x, y) > > #define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : > -1] \ > > __unused > > #else > > #define _Static_assert(x, y) struct __hack > > #endif > > #endif > > . . . > > > > # more /usr/include/assert.h > > . . . > > /* > > * Static assertions. In principle we could define static_assert for > > * C++ older than C++11, but this breaks if _Static_assert is > > * implemented as a macro. > > * > > * C++ template parameters may contain commas, even if not enclosed in > > * parentheses, causing the _Static_assert macro to be invoked with more > > * than two parameters. > > */ > > #if __ISO_C_VISIBLE >= 2011 && !defined(__cplusplus) > > #define static_assert _Static_assert > > #endif > > . . . > > > > So one can define a _Static_assert macro, sometimes in terms of > > static_assert, and the other sometimes defines a static_assert > > macro in terms of _Static_assert. > > > > Messy, but possibly localized. > > > > That prompted a more general grep: > > > > # grep -r "define[ _]*[Ss]tatic_assert" /usr/src/* | more > > /usr/src/contrib/llvm-project/libcxx/include/__config:# define > static_assert(...) _Static_assert(__VA_ARGS__) > > /usr/src/contrib/llvm-project/libunwind/src/config.h: #define > static_assert(__b, __m) \ > > /usr/src/include/assert.h: * Static assertions. In principle we could > define static_assert for > > /usr/src/include/assert.h:#define static_assert _Static_assert > > /usr/src/sys/sys/cdefs.h:#define _Static_assert(x, y) > static_assert(x, y) > > /usr/src/sys/sys/cdefs.h:#define _Static_assert(x, y) > __Static_assert(x, __COUNTER__) > > /usr/src/sys/sys/cdefs.h:#define __Static_assert(x, y) > ___Static_assert(x, y) > > /usr/src/sys/sys/cdefs.h:#define ___Static_assert(x, y) typedef > char __assert_ ## y[(x) ? 1 : -1] \ > > /usr/src/sys/sys/cdefs.h:#define _Static_assert(x, y) struct > __hack > > /usr/src/usr.bin/dtc/util.hh:#define static_assert(x, y) ((void)0) > > > > So not much else. > > Just an FYI: Looks like static_assert is little used (outside > llvm-project and libstdc++): > > # grep -r "\" /usr/src/* | grep -v llvm-project | grep -v > "libstdc\+\+" | more > /usr/src/contrib/googletest/googlemock/include/gmock/gmock-matchers.h: > static_assert( > /usr/src/contrib/googletest/googlemock/include/gmock/gmock-matchers.h: > static_assert(sizeof...(Args) > 0, "Must have at least one matcher."); > /usr/src/contrib/googletest/googlemock/docs/DesignDoc.md:Google Test (the > name is chosen to match `static_assert` in C++0x). > /usr/src/contrib/googletest/googletest/include/gtest/internal/gtest-port.h:# > define GTEST_COMPILE_ASSERT_(expr, msg) static_assert(expr, #msg) > /usr/src/contrib/googletest/googletest/include/gtest/internal/gtest-port.h:// > (In C++11, we simply use static_assert instead of the following) > /usr/src/contrib/bsnmp/snmpd/trans_inet.c:static_assert(offsetof(struct > port_sock, input) == 0, > /usr/src/contrib/bsnmp/snmpd/trans_inet.c:static_assert(offsetof(struct > inet_port, tport) == 0, > /usr/src/contrib/libcxxrt/guard.cc:static_assert(sizeof(guard_t) == > sizeof(uint64_t), ""); > /usr/src/contrib/ofed/libibumad/umad.c:static_assert(sizeof(struct > ib_user_mad_reg_req) == IOCPARM_LEN(IB_USER_MAD_REGISTER_AGENT), > /usr/src/contrib/ofed/libibumad/umad.c:static_assert(sizeof(struct > ib_user_mad_reg_req2) == IOCPARM_LEN(IB_USER_MAD_REGISTER_AGENT2), > /usr/src/include/assert.h: * Static assertions. In principle we could > define static_assert for > /usr/src/include/assert.h:#define static_assert _Static_assert > /usr/src/sys/sys/cdefs.h:#define _Static_assert(x, y) > static_assert(x, y) > /usr/src/sys/contrib/zstd/contrib/pzstd/utils/FileSystem.h: > static_assert(false, "No POSIX stat() support."); > /usr/src/sys/contrib/zstd/contrib/pzstd/utils/FileSystem.h: > static_assert(false, "NO POSIX stat() support."); > /usr/src/usr.bin/dtc/HACKING:The code also makes use of `static_assert()` > to track compile-time invariants. > /usr/src/usr.bin/dtc/util.hh:#ifndef static_assert > /usr/src/usr.bin/dtc/util.hh:#define static_assert(x, y) ((void)0) > /usr/src/usr.bin/dtc/util.hh: static_assert(sizeof(T) > 1, > /usr/src/usr.sbin/bhyve/task_switch.c:static_assert(sizeof(struct tss32) > == 104, "compile-time assertion failed"); > /usr/src/usr.sbin/bhyve/pci_emul.h:static_assert(sizeof(struct msicap) == > 14, "compile-time assertion failed"); > /usr/src/usr.sbin/bhyve/pci_emul.h:static_assert(sizeof(struct msixcap) == > 12, "compile-time assertion failed"); > /usr/src/usr.sbin/bhyve/pci_emul.h:static_assert(sizeof(struct pciecap) == > 60, "compile-time assertion failed"); > /usr/src/usr.sbin/syslogd/syslogd.c: > static_assert(sizeof(f->f_prevline) == sizeof(saved), > > _Static_assert looks to be far more common. (Too long > to list here.) > Right.. originally I was going to document static_asset(), but then people on irc said the other was far more common. A quick grep confirmed it. So it met my test of documenting an overwhelming practice. Whether we should change or not is a separate question. Warner === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > > From owner-svn-src-head@freebsd.org Fri Feb 28 05:54:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D4FC25ABA6 for ; Fri, 28 Feb 2020 05:54:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TJdr6Hggz4W6c for ; Fri, 28 Feb 2020 05:54:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf31.google.com with SMTP id by15so813860qvb.11 for ; Thu, 27 Feb 2020 21:54:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PL1jwe2bOJ9yWk9NLjkjxt8LuSrX3ODR6EijMNrESZA=; b=GsX7lwAEDt/DQ+kTqbRG6rWH0XNKLCVEiDzjUDU31+2aUZyVTiExyJcRhZ8G7OM080 PEbsNYaCoIk2rLico1MemHvKCorZR471Tf/VNhSu98mDME9+VfgbrUs/T+MMpi/L06Zb XKMFjvD69Mk9dDDLgiImMstHm0VpzB4RypLv8vKWhw0Q3iM3ICSOp9mNKIVvJaTmcINz EAU9g7MFVUq0sRLfdkE/fxh7HHJD6jmZNJNd/aXSdUM8KneUO/KuwAogT1W5WCI42rmQ NNZHuD2awMdi3yCkl3jPpXgpYzt7EkK06rfLRQHrAA43j71ZbMhbwtOcjHUSKRdVu0sy 81XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PL1jwe2bOJ9yWk9NLjkjxt8LuSrX3ODR6EijMNrESZA=; b=KWL8Mwmj8PpepuEz0Qa+QIZRZLzB7UJKlbcFWi9oQoAwGHeKLeC5R1RQBhl5D5M/W/ mUQncKCOt2opz+io+iYG9dwqLqzH6YQHWlHJfnZ3rEA9+mNKGO1u898dFgDfVSw7bDWf /qi9wahpZbuPAIrtn6n6ozM7sN80/cAmklf9S3lWqz7cfvdDNZNaoWXGiaa09IV0xovh PbX143glAk9pJhD6WAJtbT0nD9rxbyBZErmiSD5fGARQiIkpFUXViyFMmepa8hN5p6vK BlGhXrxV3pzsUPW4btxgkgrxLuY5cg94pJJDPYvJtvKbc16UF5qz+honaIjqQyVVOdnE pMbg== X-Gm-Message-State: APjAAAXRn/7NuCF6jumDF2v/qfn0z3vT03FFT4mFiijp8FHZoTVfivEO u8CD/x6q7oetQ9kzLkizWeWiScTUXYb+gNvj5/W4uA== X-Google-Smtp-Source: APXvYqztBQo292/U73H4p8PL+sGCeitM6u6c9Wv05yUUcJAKKraJKrXxiik4FHGvh01Tazvm5GwA0rpXq7jKUu15+BE= X-Received: by 2002:a05:6214:965:: with SMTP id do5mr2432436qvb.202.1582869273652; Thu, 27 Feb 2020 21:54:33 -0800 (PST) MIME-Version: 1.0 References: <202002271530.01RFUDJA087174@repo.freebsd.org> <5a876bf9-56b5-9465-07f4-2c540313755d@FreeBSD.org> In-Reply-To: <5a876bf9-56b5-9465-07f4-2c540313755d@FreeBSD.org> From: Warner Losh Date: Thu, 27 Feb 2020 22:54:21 -0700 Message-ID: Subject: Re: svn commit: r358392 - head/share/man/man9 To: John Baldwin Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 48TJdr6Hggz4W6c X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=GsX7lwAE; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f31) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.92 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-1.92)[ip: (-6.03), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 05:54:42 -0000 On Thu, Feb 27, 2020, 9:55 AM John Baldwin wrote: > On 2/27/20 7:30 AM, Warner Losh wrote: > > Author: imp > > Date: Thu Feb 27 15:30:13 2020 > > New Revision: 358392 > > URL: https://svnweb.freebsd.org/changeset/base/358392 > > > > Log: > > _Static_assert is to be preferred to CTASSERT. > > > > Document the existing prefernce that _Static_assert be used in > preference to the > > old CTASSERT we used to use for compile time assertions. > > Actually, I think what we want to use is static_assert(). The intention in > userland C is that _Static_assert() is an internal keyword and > adds static_assert() as an alias, similar to defining alignas, > etc. I think what we should do for the kernel is have define > map static_assert to _Static_assert and replace existing _Static_assert > usage with the proper spelling. > I originally did just that when people pointed out that there were hundreds of instances in the tree of _Static_assert and less than 10 of static_assert. We could do a sweep and change, but I wanted to document it. Even more so because I was originally mistaken. Warner John Baldwin > From owner-svn-src-head@freebsd.org Fri Feb 28 08:03:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 490FD25D388; Fri, 28 Feb 2020 08:03:29 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48TMVT0Rvvz3DDL; Fri, 28 Feb 2020 08:03:28 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 01S83PvS011398; Fri, 28 Feb 2020 00:03:25 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 01S83P9X011397; Fri, 28 Feb 2020 00:03:25 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202002280803.01S83P9X011397@gndrsh.dnsmgr.net> Subject: Re: svn commit: r358414 - head/sys/amd64/conf In-Reply-To: <202002272306.01RN6eUs067190@repo.freebsd.org> To: Brooks Davis Date: Fri, 28 Feb 2020 00:03:25 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 48TMVT0Rvvz3DDL X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 08:03:29 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: brooks > Date: Thu Feb 27 23:06:40 2020 > New Revision: 358414 > URL: https://svnweb.freebsd.org/changeset/base/358414 > > Log: > Remove trailing whitespace. Thank you. > Modified: > head/sys/amd64/conf/GENERIC-NODEBUG > > Modified: head/sys/amd64/conf/GENERIC-NODEBUG > ============================================================================== > --- head/sys/amd64/conf/GENERIC-NODEBUG Thu Feb 27 23:06:12 2020 (r358413) > +++ head/sys/amd64/conf/GENERIC-NODEBUG Thu Feb 27 23:06:40 2020 (r358414) > @@ -1,5 +1,5 @@ > # > -# GENERIC-NODEBUG -- WITNESS and INVARIANTS free kernel configuration file > +# GENERIC-NODEBUG -- WITNESS and INVARIANTS free kernel configuration file > # for FreeBSD/amd64 > # > # This configuration file removes several debugging options, including > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Feb 28 10:57:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7207B260193; Fri, 28 Feb 2020 10:57:24 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TRM81XXQz4S0q; Fri, 28 Feb 2020 10:57:24 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 242057A3; Fri, 28 Feb 2020 10:57:24 +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 01SAvOhN091327; Fri, 28 Feb 2020 10:57:24 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SAvN2f091324; Fri, 28 Feb 2020 10:57:23 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202002281057.01SAvN2f091324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 28 Feb 2020 10:57:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358426 - in head/sys: arm/conf arm/xilinx dts/arm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/conf arm/xilinx dts/arm X-SVN-Commit-Revision: 358426 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 10:57:24 -0000 Author: manu Date: Fri Feb 28 10:57:23 2020 New Revision: 358426 URL: https://svnweb.freebsd.org/changeset/base/358426 Log: arm: zynq: An SPI driver for Zynq platforms Submitted by: Thomas Skibo Differential Revision: https://reviews.freebsd.org/D23319 Added: head/sys/arm/xilinx/zy7_spi.c (contents, props changed) Modified: head/sys/arm/conf/ZEDBOARD head/sys/arm/xilinx/files.zynq7 head/sys/dts/arm/zynq-7000.dtsi Modified: head/sys/arm/conf/ZEDBOARD ============================================================================== --- head/sys/arm/conf/ZEDBOARD Fri Feb 28 07:49:44 2020 (r358425) +++ head/sys/arm/conf/ZEDBOARD Fri Feb 28 10:57:23 2020 (r358426) @@ -58,8 +58,10 @@ device uart device gpio device spibus +device spigen device mx25l device zy7_qspi # Xilinx Zynq QSPI controller +device zy7_spi # Xilinx Zynq SPI controller device md device mmc # mmc/sd bus Modified: head/sys/arm/xilinx/files.zynq7 ============================================================================== --- head/sys/arm/xilinx/files.zynq7 Fri Feb 28 07:49:44 2020 (r358425) +++ head/sys/arm/xilinx/files.zynq7 Fri Feb 28 10:57:23 2020 (r358426) @@ -14,4 +14,5 @@ arm/xilinx/zy7_ehci.c optional ehci arm/xilinx/uart_dev_cdnc.c optional uart arm/xilinx/zy7_gpio.c optional gpio arm/xilinx/zy7_qspi.c optional zy7_qspi +arm/xilinx/zy7_spi.c optional zy7_spi Added: head/sys/arm/xilinx/zy7_spi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/xilinx/zy7_spi.c Fri Feb 28 10:57:23 2020 (r358426) @@ -0,0 +1,606 @@ +/*- + * Copyright (c) 2018 Thomas Skibo + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "spibus_if.h" + +static struct ofw_compat_data compat_data[] = { + {"xlnx,zy7_spi", 1}, + {"xlnx,zynq-spi-1.0", 1}, + {"cdns,spi-r1p6", 1}, + {NULL, 0} +}; + +struct zy7_spi_softc { + device_t dev; + device_t child; + struct mtx sc_mtx; + struct resource *mem_res; + struct resource *irq_res; + void *intrhandle; + + uint32_t cfg_reg_shadow; + uint32_t spi_clock; + uint32_t ref_clock; + unsigned int spi_clk_real_freq; + unsigned int rx_overflows; + unsigned int tx_underflows; + unsigned int interrupts; + unsigned int stray_ints; + struct spi_command *cmd; + int tx_bytes; /* tx_cmd_sz + tx_data_sz */ + int tx_bytes_sent; + int rx_bytes; /* rx_cmd_sz + rx_data_sz */ + int rx_bytes_rcvd; + int busy; +}; + +#define ZY7_SPI_DEFAULT_SPI_CLOCK 50000000 + +#define SPI_SC_LOCK(sc) mtx_lock(&(sc)->sc_mtx) +#define SPI_SC_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) +#define SPI_SC_LOCK_INIT(sc) \ + mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->dev), NULL, MTX_DEF) +#define SPI_SC_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx) +#define SPI_SC_ASSERT_LOCKED(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) + +#define RD4(sc, off) (bus_read_4((sc)->mem_res, (off))) +#define WR4(sc, off, val) (bus_write_4((sc)->mem_res, (off), (val))) + +/* + * SPI device registers. + * Reference: Zynq-7000 All Programmable SoC Technical Reference Manual. + * (v1.12.1) December 6, 2017. Xilinx doc UG585. + */ +#define ZY7_SPI_CONFIG_REG 0x0000 +#define ZY7_SPI_CONFIG_MODEFAIL_GEN_EN (1 << 17) +#define ZY7_SPI_CONFIG_MAN_STRT (1 << 16) +#define ZY7_SPI_CONFIG_MAN_STRT_EN (1 << 15) +#define ZY7_SPI_CONFIG_MAN_CS (1 << 14) +#define ZY7_SPI_CONFIG_CS_MASK (0xf << 10) +#define ZY7_SPI_CONFIG_CS(x) ((0xf ^ (1 << (x))) << 10) +#define ZY7_SPI_CONFIG_PERI_SEL (1 << 9) +#define ZY7_SPI_CONFIG_REF_CLK (1 << 8) +#define ZY7_SPI_CONFIG_BAUD_RATE_DIV_MASK (7 << 3) +#define ZY7_SPI_CONFIG_BAUD_RATE_DIV_SHIFT 3 +#define ZY7_SPI_CONFIG_BAUD_RATE_DIV(x) ((x) << 3) /* divide by 2< 0) { + if (sc->tx_bytes_sent < sc->cmd->tx_cmd_sz) + /* Writing command. */ + byte = *((uint8_t *)sc->cmd->tx_cmd + + sc->tx_bytes_sent); + else + /* Writing data. */ + byte = *((uint8_t *)sc->cmd->tx_data + + (sc->tx_bytes_sent - sc->cmd->tx_cmd_sz)); + + WR4(sc, ZY7_SPI_TX_DATA_REG, (uint32_t)byte); + + sc->tx_bytes_sent++; + nbytes--; + } +} + + +/* Read hardware fifo data into command response and data buffers. */ +static void +zy7_spi_read_fifo(struct zy7_spi_softc *sc) +{ + uint8_t byte; + + do { + byte = RD4(sc, ZY7_SPI_RX_DATA_REG) & 0xff; + + if (sc->rx_bytes_rcvd < sc->cmd->rx_cmd_sz) + /* Reading command. */ + *((uint8_t *)sc->cmd->rx_cmd + sc->rx_bytes_rcvd) = + byte; + else + /* Reading data. */ + *((uint8_t *)sc->cmd->rx_data + + (sc->rx_bytes_rcvd - sc->cmd->rx_cmd_sz)) = + byte; + + sc->rx_bytes_rcvd++; + + } while (sc->rx_bytes_rcvd < sc->rx_bytes && + (RD4(sc, ZY7_SPI_INTR_STAT_REG) & + ZY7_SPI_INTR_RX_FIFO_NOT_EMPTY) != 0); +} + +/* End a transfer early by draining rx fifo and disabling interrupts. */ +static void +zy7_spi_abort_transfer(struct zy7_spi_softc *sc) +{ + /* Drain receive fifo. */ + while ((RD4(sc, ZY7_SPI_INTR_STAT_REG) & + ZY7_SPI_INTR_RX_FIFO_NOT_EMPTY) != 0) + (void)RD4(sc, ZY7_SPI_RX_DATA_REG); + + /* Shut down interrupts. */ + WR4(sc, ZY7_SPI_INTR_DIS_REG, + ZY7_SPI_INTR_RX_OVERFLOW | + ZY7_SPI_INTR_RX_FIFO_NOT_EMPTY | + ZY7_SPI_INTR_TX_FIFO_NOT_FULL); +} + + +static void +zy7_spi_intr(void *arg) +{ + struct zy7_spi_softc *sc = (struct zy7_spi_softc *)arg; + uint32_t istatus; + + SPI_SC_LOCK(sc); + + sc->interrupts++; + + istatus = RD4(sc, ZY7_SPI_INTR_STAT_REG); + + /* Stray interrupts can happen if a transfer gets interrupted. */ + if (!sc->busy) { + sc->stray_ints++; + SPI_SC_UNLOCK(sc); + return; + } + + if ((istatus & ZY7_SPI_INTR_RX_OVERFLOW) != 0) { + device_printf(sc->dev, "rx fifo overflow!\n"); + sc->rx_overflows++; + + /* Clear status bit. */ + WR4(sc, ZY7_SPI_INTR_STAT_REG, + ZY7_SPI_INTR_RX_OVERFLOW); + } + + /* Empty receive fifo before any more transmit data is sent. */ + if (sc->rx_bytes_rcvd < sc->rx_bytes && + (istatus & ZY7_SPI_INTR_RX_FIFO_NOT_EMPTY) != 0) { + zy7_spi_read_fifo(sc); + if (sc->rx_bytes_rcvd == sc->rx_bytes) + /* Disable receive interrupts. */ + WR4(sc, ZY7_SPI_INTR_DIS_REG, + ZY7_SPI_INTR_RX_FIFO_NOT_EMPTY | + ZY7_SPI_INTR_RX_OVERFLOW); + } + + /* Count tx underflows. They probably shouldn't happen. */ + if ((istatus & ZY7_SPI_INTR_TX_FIFO_UNDERFLOW) != 0) { + sc->tx_underflows++; + + /* Clear status bit. */ + WR4(sc, ZY7_SPI_INTR_STAT_REG, + ZY7_SPI_INTR_TX_FIFO_UNDERFLOW); + } + + /* Fill transmit fifo. */ + if (sc->tx_bytes_sent < sc->tx_bytes && + (istatus & ZY7_SPI_INTR_TX_FIFO_NOT_FULL) != 0) { + zy7_spi_write_fifo(sc, MIN(96, sc->tx_bytes - + sc->tx_bytes_sent)); + + if (sc->tx_bytes_sent == sc->tx_bytes) { + /* Disable transmit FIFO interrupt, enable receive + * FIFO interrupt. + */ + WR4(sc, ZY7_SPI_INTR_DIS_REG, + ZY7_SPI_INTR_TX_FIFO_NOT_FULL); + WR4(sc, ZY7_SPI_INTR_EN_REG, + ZY7_SPI_INTR_RX_FIFO_NOT_EMPTY); + } + } + + /* Finished with transfer? */ + if (sc->tx_bytes_sent == sc->tx_bytes && + sc->rx_bytes_rcvd == sc->rx_bytes) { + + /* De-assert CS. */ + sc->cfg_reg_shadow &= + ~(ZY7_SPI_CONFIG_CLK_PH | ZY7_SPI_CONFIG_CLK_POL); + sc->cfg_reg_shadow |= ZY7_SPI_CONFIG_CS_MASK; + WR4(sc, ZY7_SPI_CONFIG_REG, sc->cfg_reg_shadow); + + wakeup(sc->dev); + } + + SPI_SC_UNLOCK(sc); +} + +/* Initialize hardware. */ +static int +zy7_spi_init_hw(struct zy7_spi_softc *sc) +{ + uint32_t baud_div; + + /* Find best clock divider. Divide by 2 not supported. */ + baud_div = 1; + while ((sc->ref_clock >> (baud_div + 1)) > sc->spi_clock && + baud_div < 8) + baud_div++; + if (baud_div >= 8) { + device_printf(sc->dev, "cannot configure clock divider: ref=%d" + " spi=%d.\n", sc->ref_clock, sc->spi_clock); + return (EINVAL); + } + sc->spi_clk_real_freq = sc->ref_clock >> (baud_div + 1); + + /* Set up configuration register. */ + sc->cfg_reg_shadow = + ZY7_SPI_CONFIG_MAN_CS | + ZY7_SPI_CONFIG_CS_MASK | + ZY7_SPI_CONFIG_BAUD_RATE_DIV(baud_div) | + ZY7_SPI_CONFIG_MODE_SEL; + WR4(sc, ZY7_SPI_CONFIG_REG, sc->cfg_reg_shadow); + + /* Set thresholds. */ + WR4(sc, ZY7_SPI_TX_THRESH_REG, 32); + WR4(sc, ZY7_SPI_RX_THRESH_REG, 1); + + /* Clear and disable all interrupts. */ + WR4(sc, ZY7_SPI_INTR_STAT_REG, ~0); + WR4(sc, ZY7_SPI_INTR_DIS_REG, ~0); + + /* Enable SPI. */ + WR4(sc, ZY7_SPI_EN_REG, ZY7_SPI_ENABLE); + + return (0); +} + + +static void +zy7_spi_add_sysctls(device_t dev) +{ + struct zy7_spi_softc *sc = device_get_softc(dev); + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *child; + + ctx = device_get_sysctl_ctx(dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "spi_clk_real_freq", CTLFLAG_RD, + &sc->spi_clk_real_freq, 0, "SPI clock real frequency"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_overflows", CTLFLAG_RD, + &sc->rx_overflows, 0, "RX FIFO overflow events"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_underflows", CTLFLAG_RD, + &sc->tx_underflows, 0, "TX FIFO underflow events"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "interrupts", CTLFLAG_RD, + &sc->interrupts, 0, "interrupt calls"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "stray_ints", CTLFLAG_RD, + &sc->stray_ints, 0, "stray interrupts"); +} + + +static int +zy7_spi_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Zynq SPI Controller"); + + return (BUS_PROBE_DEFAULT); +} + + +static int zy7_spi_detach(device_t); + +static int +zy7_spi_attach(device_t dev) +{ + struct zy7_spi_softc *sc; + int rid, err; + phandle_t node; + pcell_t cell; + + sc = device_get_softc(dev); + sc->dev = dev; + + SPI_SC_LOCK_INIT(sc); + + /* Get ref-clock and spi-clock properties. */ + node = ofw_bus_get_node(dev); + if (OF_getprop(node, "ref-clock", &cell, sizeof(cell)) > 0) + sc->ref_clock = fdt32_to_cpu(cell); + else { + device_printf(dev, "must have ref-clock property\n"); + return (ENXIO); + } + if (OF_getprop(node, "spi-clock", &cell, sizeof(cell)) > 0) + sc->spi_clock = fdt32_to_cpu(cell); + else + sc->spi_clock = ZY7_SPI_DEFAULT_SPI_CLOCK; + + /* Get memory resource. */ + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->mem_res == NULL) { + device_printf(dev, "could not allocate memory resources.\n"); + zy7_spi_detach(dev); + return (ENOMEM); + } + + /* Allocate IRQ. */ + rid = 0; + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE); + if (sc->irq_res == NULL) { + device_printf(dev, "could not allocate IRQ resource.\n"); + zy7_spi_detach(dev); + return (ENOMEM); + } + + /* Activate the interrupt. */ + err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_MPSAFE, + NULL, zy7_spi_intr, sc, &sc->intrhandle); + if (err) { + device_printf(dev, "could not setup IRQ.\n"); + zy7_spi_detach(dev); + return (err); + } + + /* Configure the device. */ + err = zy7_spi_init_hw(sc); + if (err) { + zy7_spi_detach(dev); + return (err); + } + + sc->child = device_add_child(dev, "spibus", -1); + + zy7_spi_add_sysctls(dev); + + /* Attach spibus driver as a child later when interrupts work. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + + return (0); +} + +static int +zy7_spi_detach(device_t dev) +{ + struct zy7_spi_softc *sc = device_get_softc(dev); + + if (device_is_attached(dev)) + bus_generic_detach(dev); + + /* Delete child bus. */ + if (sc->child) + device_delete_child(dev, sc->child); + + /* Disable hardware. */ + if (sc->mem_res != NULL) { + /* Disable SPI. */ + WR4(sc, ZY7_SPI_EN_REG, 0); + + /* Clear and disable all interrupts. */ + WR4(sc, ZY7_SPI_INTR_STAT_REG, ~0); + WR4(sc, ZY7_SPI_INTR_DIS_REG, ~0); + } + + /* Teardown and release interrupt. */ + if (sc->irq_res != NULL) { + if (sc->intrhandle) + bus_teardown_intr(dev, sc->irq_res, sc->intrhandle); + bus_release_resource(dev, SYS_RES_IRQ, + rman_get_rid(sc->irq_res), sc->irq_res); + } + + /* Release memory resource. */ + if (sc->mem_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->mem_res), sc->mem_res); + + SPI_SC_LOCK_DESTROY(sc); + + return (0); +} + + +static phandle_t +zy7_spi_get_node(device_t bus, device_t dev) +{ + + return (ofw_bus_get_node(bus)); +} + + +static int +zy7_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) +{ + struct zy7_spi_softc *sc = device_get_softc(dev); + uint32_t cs; + uint32_t mode; + int err = 0; + + KASSERT(cmd->tx_cmd_sz == cmd->rx_cmd_sz, + ("TX/RX command sizes should be equal")); + KASSERT(cmd->tx_data_sz == cmd->rx_data_sz, + ("TX/RX data sizes should be equal")); + + /* Get chip select and mode for this child. */ + spibus_get_cs(child, &cs); + cs &= ~SPIBUS_CS_HIGH; + if (cs > 2) { + device_printf(dev, "Invalid chip select %d requested by %s", + cs, device_get_nameunit(child)); + return (EINVAL); + } + spibus_get_mode(child, &mode); + + SPI_SC_LOCK(sc); + + /* Wait for controller available. */ + while (sc->busy != 0) { + err = mtx_sleep(dev, &sc->sc_mtx, 0, "zspi0", 0); + if (err) { + SPI_SC_UNLOCK(sc); + return (err); + } + } + + /* Start transfer. */ + sc->busy = 1; + sc->cmd = cmd; + sc->tx_bytes = sc->cmd->tx_cmd_sz + sc->cmd->tx_data_sz; + sc->tx_bytes_sent = 0; + sc->rx_bytes = sc->cmd->rx_cmd_sz + sc->cmd->rx_data_sz; + sc->rx_bytes_rcvd = 0; + + /* Enable interrupts. zy7_spi_intr() will handle transfer. */ + WR4(sc, ZY7_SPI_INTR_EN_REG, + ZY7_SPI_INTR_TX_FIFO_NOT_FULL | + ZY7_SPI_INTR_RX_OVERFLOW); + + /* Handle polarity and phase. */ + if (mode == SPIBUS_MODE_CPHA || mode == SPIBUS_MODE_CPOL_CPHA) + sc->cfg_reg_shadow |= ZY7_SPI_CONFIG_CLK_PH; + if (mode == SPIBUS_MODE_CPOL || mode == SPIBUS_MODE_CPOL_CPHA) + sc->cfg_reg_shadow |= ZY7_SPI_CONFIG_CLK_POL; + + /* Assert CS. */ + sc->cfg_reg_shadow &= ~ZY7_SPI_CONFIG_CS_MASK; + sc->cfg_reg_shadow |= ZY7_SPI_CONFIG_CS(cs); + WR4(sc, ZY7_SPI_CONFIG_REG, sc->cfg_reg_shadow); + + /* Wait for completion. */ + err = mtx_sleep(dev, &sc->sc_mtx, 0, "zspi1", hz * 2); + if (err) + zy7_spi_abort_transfer(sc); + + /* Release controller. */ + sc->busy = 0; + wakeup_one(dev); + + SPI_SC_UNLOCK(sc); + + return (err); +} + +static device_method_t zy7_spi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, zy7_spi_probe), + DEVMETHOD(device_attach, zy7_spi_attach), + DEVMETHOD(device_detach, zy7_spi_detach), + + /* SPI interface */ + DEVMETHOD(spibus_transfer, zy7_spi_transfer), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, zy7_spi_get_node), + + DEVMETHOD_END +}; + + +static driver_t zy7_spi_driver = { + "zy7_spi", + zy7_spi_methods, + sizeof(struct zy7_spi_softc), +}; +static devclass_t zy7_spi_devclass; + +DRIVER_MODULE(zy7_spi, simplebus, zy7_spi_driver, zy7_spi_devclass, 0, 0); +DRIVER_MODULE(ofw_spibus, zy7_spi, ofw_spibus_driver, ofw_spibus_devclass, 0, 0); +SIMPLEBUS_PNP_INFO(compat_data); +MODULE_DEPEND(zy7_spi, ofw_spibus, 1, 1, 1); Modified: head/sys/dts/arm/zynq-7000.dtsi ============================================================================== --- head/sys/dts/arm/zynq-7000.dtsi Fri Feb 28 07:49:44 2020 (r358425) +++ head/sys/dts/arm/zynq-7000.dtsi Fri Feb 28 10:57:23 2020 (r358426) @@ -206,6 +206,23 @@ spi-clock = <50000000>; // 50 Mhz }; + // SPI controllers + spi0: spi0@6000 { + compatible = "xlnx,zy7_spi"; + status = "disabled"; + reg = <0x6000 0x100>; + interrupts = <0 26 4>; + interrupt-parent = <&GIC>; + }; + + spi1: spi0@7000 { + compatible = "xlnx,zy7_spi"; + status = "disabled"; + reg = <0x7000 0x100>; + interrupts = <0 49 4>; + interrupt-parent = <&GIC>; + }; + // SDIO controllers sdhci0: sdhci@100000 { compatible = "xlnx,zy7_sdhci"; From owner-svn-src-head@freebsd.org Fri Feb 28 11:06:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07A4226045C; Fri, 28 Feb 2020 11:06:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48TRYc2G8zz4dQJ; Fri, 28 Feb 2020 11:06:27 +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 01SB6Isx085486 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 28 Feb 2020 13:06:21 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 01SB6Isx085486 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 01SB6ILA085485; Fri, 28 Feb 2020 13:06:18 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 28 Feb 2020 13:06:18 +0200 From: Konstantin Belousov To: Warner Losh Cc: John Baldwin , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358392 - head/share/man/man9 Message-ID: <20200228110618.GO29554@kib.kiev.ua> References: <202002271530.01RFUDJA087174@repo.freebsd.org> <5a876bf9-56b5-9465-07f4-2c540313755d@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 48TRYc2G8zz4dQJ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCPT_COUNT_FIVE(0.00)[6]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(0.00)[ip: (-3.14), ipnet: 2001:470::/32(-4.65), asn: 6939(-3.58), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 11:06:30 -0000 On Thu, Feb 27, 2020 at 10:54:21PM -0700, Warner Losh wrote: > On Thu, Feb 27, 2020, 9:55 AM John Baldwin wrote: > > > On 2/27/20 7:30 AM, Warner Losh wrote: > > > Author: imp > > > Date: Thu Feb 27 15:30:13 2020 > > > New Revision: 358392 > > > URL: https://svnweb.freebsd.org/changeset/base/358392 > > > > > > Log: > > > _Static_assert is to be preferred to CTASSERT. > > > > > > Document the existing prefernce that _Static_assert be used in > > preference to the > > > old CTASSERT we used to use for compile time assertions. > > > > Actually, I think what we want to use is static_assert(). The intention in > > userland C is that _Static_assert() is an internal keyword and > > adds static_assert() as an alias, similar to defining alignas, > > etc. I think what we should do for the kernel is have define > > map static_assert to _Static_assert and replace existing _Static_assert > > usage with the proper spelling. > > > > I originally did just that when people pointed out that there were hundreds > of instances in the tree of _Static_assert and less than 10 of > static_assert. > > We could do a sweep and change, but I wanted to document it. Even more so > because I was originally mistaken. It could be declared to be a fault of the C standard, but I believe that _Static_assert() use is actually better over static_assert(). The standard defines _Static_assert() as the language feature, while static_assert() comes from the assert.h header that is not required by a freestanding environment. Note that this situation is not similar to _Bool/bool, because stdbool.h is required for conforming freestanding env. From owner-svn-src-head@freebsd.org Fri Feb 28 11:16:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3034D2607EC; Fri, 28 Feb 2020 11:16:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TRnQ2rGGz3L7D; Fri, 28 Feb 2020 11:16:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE480B60; Fri, 28 Feb 2020 11:16:41 +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 01SBGfKp003045; Fri, 28 Feb 2020 11:16:41 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SBGf22003044; Fri, 28 Feb 2020 11:16:41 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202002281116.01SBGf22003044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 28 Feb 2020 11:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358427 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 358427 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 11:16:43 -0000 Author: bz Date: Fri Feb 28 11:16:41 2020 New Revision: 358427 URL: https://svnweb.freebsd.org/changeset/base/358427 Log: mld6: initialize oifp to avoid bogus results/panics in edge cases In certain cases (probably not during normal operation but observed in the lab during development) ip6_ouput() could return without error and ifpp (&oifp) not updated. Given oifp was never initialized we would take the later branch as oifp was not NULL, and when calling icmp6_ifstat_inc() we would panic dereferencing a garbage pointer. For code stability initialize oifp to NULL before first use to always have a deterministic value and not rely on a called function to behave and always and for ever do the work for us as we hope for. MFC after: 3 days Sponsored by: Netflix Modified: head/sys/netinet6/mld6.c Modified: head/sys/netinet6/mld6.c ============================================================================== --- head/sys/netinet6/mld6.c Fri Feb 28 10:57:23 2020 (r358426) +++ head/sys/netinet6/mld6.c Fri Feb 28 11:16:41 2020 (r358427) @@ -3159,6 +3159,7 @@ mld_dispatch_packet(struct mbuf *m) mld = (struct mld_hdr *)(mtod(md, uint8_t *) + off); type = mld->mld_type; + oifp = NULL; error = ip6_output(m0, &mld_po, NULL, IPV6_UNSPECSRC, &im6o, &oifp, NULL); if (error) { From owner-svn-src-head@freebsd.org Fri Feb 28 13:46:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 450372632DF for ; Fri, 28 Feb 2020 13:46:05 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TW5k3fjwz3JCJ; Fri, 28 Feb 2020 13:46:02 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 01SDjjk3091214 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Feb 2020 13:45:50 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jkim@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 01SDjggV076860 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 28 Feb 2020 20:45:42 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Jung-uk Kim , src-committers@freebsd.org, svn-src-head@freebsd.org References: <202002272202.01RM20j9030410@repo.freebsd.org> From: Eugene Grosbein Message-ID: <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> Date: Fri, 28 Feb 2020 20:45:32 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <202002272202.01RM20j9030410@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48TW5k3fjwz3JCJ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.84)[ip: (-5.08), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.55), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 13:46:05 -0000 28.02.2020 5:02, Jung-uk Kim wrote: > Author: jkim > Date: Thu Feb 27 22:02:00 2020 > New Revision: 358411 > URL: https://svnweb.freebsd.org/changeset/base/358411 > > Log: > Fix style inconsistencies near our OpenSSL 1.1.x patch. Our Handbook describes how to use stock sendmail with SSL and SASL enabled: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/SMTP-Auth.html Now we have no openssl 1.0.2 in ports anymore, and sasl support builds with openssl-1.1.1, so stable/11 world building breaks due to stock sendmail using old 1.0.2 SSL API if one follows noted guide adding to /etc/make.conf: SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL SENDMAIL_LDFLAGS=-L/usr/local/lib SENDMAIL_LDADD=-lsasl2 For upcoming 11.4-RELEASE to be able to run stock sendmail with SSL/SASL please consider merging "OpenSSL 1.1.x patch" to stable/11 before the release. I'm willing to test the change before merge with my stable/11 workstation utilizing these features because I'm stuck at 11.2-STABLE being unable to upgrade to due to this problem. Could you please supply me with the diff ready to apply to stable/11 or describe how do I make it myself? From owner-svn-src-head@freebsd.org Fri Feb 28 15:21:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AB5C26503B for ; Fri, 28 Feb 2020 15:21:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TYDF0Fpyz4KFk; Fri, 28 Feb 2020 15:21:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id B29532386; Fri, 28 Feb 2020 15:21:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Eugene Grosbein , src-committers@freebsd.org, svn-src-head@freebsd.org References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: Date: Fri, 28 Feb 2020 10:21:41 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 15:21:49 -0000 On 20. 2. 28., Eugene Grosbein wrote: > 28.02.2020 5:02, Jung-uk Kim wrote: > >> Author: jkim >> Date: Thu Feb 27 22:02:00 2020 >> New Revision: 358411 >> URL: https://svnweb.freebsd.org/changeset/base/358411 >> >> Log: >> Fix style inconsistencies near our OpenSSL 1.1.x patch. > > Our Handbook describes how to use stock sendmail with SSL and SASL enabled: > https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/SMTP-Auth.html > > Now we have no openssl 1.0.2 in ports anymore, and sasl support builds with openssl-1.1.1, > so stable/11 world building breaks due to stock sendmail using old 1.0.2 SSL API > if one follows noted guide adding to /etc/make.conf: > > SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL > SENDMAIL_LDFLAGS=-L/usr/local/lib > SENDMAIL_LDADD=-lsasl2 > > For upcoming 11.4-RELEASE to be able to run stock sendmail with SSL/SASL > please consider merging "OpenSSL 1.1.x patch" to stable/11 before the release. > > I'm willing to test the change before merge with my stable/11 workstation utilizing these features > because I'm stuck at 11.2-STABLE being unable to upgrade to due to this problem. > > Could you please supply me with the diff ready to apply to stable/11 or describe how do I make it myself? All you have to do is rebuilding security/cyrus-sasl2 with system OpenSSL, i.e., disable SSL option. Jung-uk Kim From owner-svn-src-head@freebsd.org Fri Feb 28 15:33:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E03C226528C for ; Fri, 28 Feb 2020 15:33:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TYTc0qY4z4qJd; Fri, 28 Feb 2020 15:33:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id DFD7024AD; Fri, 28 Feb 2020 15:33:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src From: Jung-uk Kim To: Eugene Grosbein , src-committers@freebsd.org, svn-src-head@freebsd.org References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: <056cfbda-1100-c1d6-15d6-b77cdb14001f@FreeBSD.org> Date: Fri, 28 Feb 2020 10:33:20 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 15:33:24 -0000 On 20. 2. 28., Jung-uk Kim wrote: > On 20. 2. 28., Eugene Grosbein wrote: >> 28.02.2020 5:02, Jung-uk Kim wrote: >> >>> Author: jkim Date: Thu Feb 27 22:02:00 2020 New Revision: >>> 358411 URL: https://svnweb.freebsd.org/changeset/base/358411 >>> >>> Log: Fix style inconsistencies near our OpenSSL 1.1.x patch. >> >> Our Handbook describes how to use stock sendmail with SSL and >> SASL enabled: >> https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/SMTP-Auth.html >> >> >> Now we have no openssl 1.0.2 in ports anymore, and sasl support builds with openssl-1.1.1, >> so stable/11 world building breaks due to stock sendmail using >> old 1.0.2 SSL API if one follows noted guide adding to >> /etc/make.conf: >> >> SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL >> SENDMAIL_LDFLAGS=-L/usr/local/lib SENDMAIL_LDADD=-lsasl2 >> >> For upcoming 11.4-RELEASE to be able to run stock sendmail with >> SSL/SASL please consider merging "OpenSSL 1.1.x patch" to >> stable/11 before the release. >> >> I'm willing to test the change before merge with my stable/11 >> workstation utilizing these features because I'm stuck at >> 11.2-STABLE being unable to upgrade to due to this problem. >> >> Could you please supply me with the diff ready to apply to >> stable/11 or describe how do I make it myself? > > All you have to do is rebuilding security/cyrus-sasl2 with system > OpenSSL, i.e., disable SSL option. I just found that you added the option. X-) The option is quite misleading. You need to fix the port first as some people suggested at the time. Jung-uk Kim From owner-svn-src-head@freebsd.org Fri Feb 28 15:42:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62D58265520; Fri, 28 Feb 2020 15:42:58 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TYhf1YFMz41tw; Fri, 28 Feb 2020 15:42:58 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E87BE4058; Fri, 28 Feb 2020 15:42:57 +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 01SFgv8j065735; Fri, 28 Feb 2020 15:42:57 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SFgqce065708; Fri, 28 Feb 2020 15:42:52 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202002281542.01SFgqce065708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 28 Feb 2020 15:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358430 - in head/sys/gnu/dts: arm arm64/actions arm64/allwinner arm64/altera arm64/amlogic arm64/arm arm64/broadcom arm64/exynos arm64/freescale arm64/hisilicon arm64/intel arm64/lg ar... X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys/gnu/dts: arm arm64/actions arm64/allwinner arm64/altera arm64/amlogic arm64/arm arm64/broadcom arm64/exynos arm64/freescale arm64/hisilicon arm64/intel arm64/lg arm64/marvell arm64/mediate... X-SVN-Commit-Revision: 358430 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 15:42:58 -0000 Author: manu Date: Fri Feb 28 15:42:51 2020 New Revision: 358430 URL: https://svnweb.freebsd.org/changeset/base/358430 Log: dts: Update our copy for arm, arm64 and riscv dts to Linux 5.5 MFC after: 2 months Added: - copied unchanged from r358428, vendor/device-tree/dist/src/arm/am335x-netcan-plus-1xx.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/am335x-netcom-plus-2xx.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/am335x-netcom-plus-8xx.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/aspeed-bmc-ibm-rainier.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/aspeed-bmc-opp-tacoma.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/ast2500-facebook-netbmc-common.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/at91-kizbox2-2.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/at91-kizbox2-common.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/at91-kizbox3-hs.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/at91-kizbox3_common.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/bcm2711-rpi-4-b.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/bcm2711.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/bcm2835-common.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/bcm283x-rpi-usb-peripheral.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/bcm47094-luxul-xwc-2000.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/e60k02.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/imx6sll-kobo-clarahd.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/imx6ul-imx6ull-opos6ul.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/imx6ul-imx6ull-opos6uldev.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/imx6ul-kontron-n6311-s.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/imx6ul-kontron-n6311-som.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/imx6ul-kontron-n6x1x-s.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/imx6ul-kontron-n6x1x-som-common.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/imx6ull-kontron-n6411-s.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/imx6ull-kontron-n6411-som.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/imx6ull-opos6ul.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/imx6ull-opos6uldev.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/mmp3-dell-ariel.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/mmp3.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/motorola-mapphone-common.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/omap4-droid-bionic-xt875.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/openbmc-flash-layout-128.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/sun8i-h3-nanopi-duo2.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm/tegra20-cpu-opp-microvolt.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/tegra20-cpu-opp.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/tegra30-cpu-opp-microvolt.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm/tegra30-cpu-opp.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/amlogic/meson-a1-ad401.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/amlogic/meson-a1.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/amlogic/meson-g12.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/amlogic/meson-g12b-ugoos-am6.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/broadcom/bcm2711-rpi-4-b.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/freescale/imx8mn-evk.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/freescale/imx8mn-evk.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/freescale/imx8qxp-colibri-eval-v3.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/freescale/imx8qxp-colibri-eval-v3.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/freescale/imx8qxp-colibri.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/freescale/s32v234-evb.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/freescale/s32v234.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/armada-3720-espressobin-emmc.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/armada-3720-espressobin-v7-emmc.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/armada-3720-espressobin-v7.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/armada-3720-espressobin.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/armada-ap807-quad.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/armada-ap807.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/armada-ap80x.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/armada-cp115.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/armada-cp11x.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/cn9130-db.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/cn9130.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/cn9131-db.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/marvell/cn9132-db.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/realtek/rtd1293-ds418j.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/realtek/rtd1293.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/realtek/rtd1296-ds418.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/realtek/rtd1296.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/renesas/r8a774b1-hihope-rzg2n-ex.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/renesas/r8a774b1-hihope-rzg2n.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/renesas/r8a774b1.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/renesas/r8a77961-salvator-xs.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/renesas/r8a77961.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/renesas/rzg2-advantech-idk-1110wr-panel.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/rockchip/rk3308-evb.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/rockchip/rk3308-roc-cc.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/rockchip/rk3308.dtsi - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/rockchip/rk3328-a1.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/rockchip/rk3399-roc-pc-mezzanine.dts - copied unchanged from r358428, vendor/device-tree/dist/src/arm64/rockchip/rk3399-roc-pc.dtsi - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/clock/bm1880-clock.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-sc7180.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/clock/qcom,q6sstopcc-qcs404.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/clock/r8a774b1-cpg-mssr.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/clock/r8a77961-cpg-mssr.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/clock/x1000-cgu.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/dma/x1000-dma.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/gpio/meson-a1-gpio.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/interconnect/qcom,msm8974.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/net/qca-ar803x.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/net/ti-dp83869.h head/sys/gnu/dts/include/dt-bindings/pmu/ - copied from r358428, vendor/device-tree/dist/include/dt-bindings/pmu/ - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/power/r8a774b1-sysc.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/power/r8a77961-sysc.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/regulator/dlg,da9063-regulator.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/reset/amlogic,meson-a1-reset.h - copied unchanged from r358428, vendor/device-tree/dist/include/dt-bindings/reset/realtek,rtd1295.h Directory Properties: head/sys/gnu/dts/arm/am335x-netcan-plus-1xx.dts (props changed) head/sys/gnu/dts/arm/am335x-netcom-plus-2xx.dts (props changed) head/sys/gnu/dts/arm/am335x-netcom-plus-8xx.dts (props changed) head/sys/gnu/dts/arm/aspeed-bmc-ibm-rainier.dts (props changed) head/sys/gnu/dts/arm/aspeed-bmc-opp-tacoma.dts (props changed) head/sys/gnu/dts/arm/ast2500-facebook-netbmc-common.dtsi (props changed) head/sys/gnu/dts/arm/at91-kizbox2-2.dts (props changed) head/sys/gnu/dts/arm/at91-kizbox2-common.dtsi (props changed) head/sys/gnu/dts/arm/at91-kizbox3-hs.dts (props changed) head/sys/gnu/dts/arm/at91-kizbox3_common.dtsi (props changed) head/sys/gnu/dts/arm/bcm2711-rpi-4-b.dts (props changed) head/sys/gnu/dts/arm/bcm2711.dtsi (props changed) head/sys/gnu/dts/arm/bcm2835-common.dtsi (props changed) head/sys/gnu/dts/arm/bcm283x-rpi-usb-peripheral.dtsi (props changed) head/sys/gnu/dts/arm/bcm47094-luxul-xwc-2000.dts (props changed) head/sys/gnu/dts/arm/e60k02.dtsi (props changed) head/sys/gnu/dts/arm/imx6sll-kobo-clarahd.dts (props changed) head/sys/gnu/dts/arm/imx6ul-imx6ull-opos6ul.dtsi (props changed) head/sys/gnu/dts/arm/imx6ul-imx6ull-opos6uldev.dtsi (props changed) head/sys/gnu/dts/arm/imx6ul-kontron-n6311-s.dts (props changed) head/sys/gnu/dts/arm/imx6ul-kontron-n6311-som.dtsi (props changed) head/sys/gnu/dts/arm/imx6ul-kontron-n6x1x-s.dtsi (props changed) head/sys/gnu/dts/arm/imx6ul-kontron-n6x1x-som-common.dtsi (props changed) head/sys/gnu/dts/arm/imx6ull-kontron-n6411-s.dts (props changed) head/sys/gnu/dts/arm/imx6ull-kontron-n6411-som.dtsi (props changed) head/sys/gnu/dts/arm/imx6ull-opos6ul.dtsi (props changed) head/sys/gnu/dts/arm/imx6ull-opos6uldev.dts (props changed) head/sys/gnu/dts/arm/mmp3-dell-ariel.dts (props changed) head/sys/gnu/dts/arm/mmp3.dtsi (props changed) head/sys/gnu/dts/arm/motorola-mapphone-common.dtsi (props changed) head/sys/gnu/dts/arm/omap4-droid-bionic-xt875.dts (props changed) head/sys/gnu/dts/arm/openbmc-flash-layout-128.dtsi (props changed) head/sys/gnu/dts/arm/sun8i-h3-nanopi-duo2.dts (props changed) head/sys/gnu/dts/arm/tegra20-cpu-opp-microvolt.dtsi (props changed) head/sys/gnu/dts/arm/tegra20-cpu-opp.dtsi (props changed) head/sys/gnu/dts/arm/tegra30-cpu-opp-microvolt.dtsi (props changed) head/sys/gnu/dts/arm/tegra30-cpu-opp.dtsi (props changed) head/sys/gnu/dts/arm64/amlogic/meson-a1-ad401.dts (props changed) head/sys/gnu/dts/arm64/amlogic/meson-a1.dtsi (props changed) head/sys/gnu/dts/arm64/amlogic/meson-g12.dtsi (props changed) head/sys/gnu/dts/arm64/amlogic/meson-g12b-ugoos-am6.dts (props changed) head/sys/gnu/dts/arm64/broadcom/bcm2711-rpi-4-b.dts (props changed) head/sys/gnu/dts/arm64/freescale/imx8mn-evk.dts (props changed) head/sys/gnu/dts/arm64/freescale/imx8mn-evk.dtsi (props changed) head/sys/gnu/dts/arm64/freescale/imx8qxp-colibri-eval-v3.dts (props changed) head/sys/gnu/dts/arm64/freescale/imx8qxp-colibri-eval-v3.dtsi (props changed) head/sys/gnu/dts/arm64/freescale/imx8qxp-colibri.dtsi (props changed) head/sys/gnu/dts/arm64/freescale/s32v234-evb.dts (props changed) head/sys/gnu/dts/arm64/freescale/s32v234.dtsi (props changed) head/sys/gnu/dts/arm64/marvell/armada-3720-espressobin-emmc.dts (props changed) head/sys/gnu/dts/arm64/marvell/armada-3720-espressobin-v7-emmc.dts (props changed) head/sys/gnu/dts/arm64/marvell/armada-3720-espressobin-v7.dts (props changed) head/sys/gnu/dts/arm64/marvell/armada-3720-espressobin.dtsi (props changed) head/sys/gnu/dts/arm64/marvell/armada-ap807-quad.dtsi (props changed) head/sys/gnu/dts/arm64/marvell/armada-ap807.dtsi (props changed) head/sys/gnu/dts/arm64/marvell/armada-ap80x.dtsi (props changed) head/sys/gnu/dts/arm64/marvell/armada-cp115.dtsi (props changed) head/sys/gnu/dts/arm64/marvell/armada-cp11x.dtsi (props changed) head/sys/gnu/dts/arm64/marvell/cn9130-db.dts (props changed) head/sys/gnu/dts/arm64/marvell/cn9130.dtsi (props changed) head/sys/gnu/dts/arm64/marvell/cn9131-db.dts (props changed) head/sys/gnu/dts/arm64/marvell/cn9132-db.dts (props changed) head/sys/gnu/dts/arm64/realtek/rtd1293-ds418j.dts (props changed) head/sys/gnu/dts/arm64/realtek/rtd1293.dtsi (props changed) head/sys/gnu/dts/arm64/realtek/rtd1296-ds418.dts (props changed) head/sys/gnu/dts/arm64/realtek/rtd1296.dtsi (props changed) head/sys/gnu/dts/arm64/renesas/r8a774b1-hihope-rzg2n-ex.dts (props changed) head/sys/gnu/dts/arm64/renesas/r8a774b1-hihope-rzg2n.dts (props changed) head/sys/gnu/dts/arm64/renesas/r8a774b1.dtsi (props changed) head/sys/gnu/dts/arm64/renesas/r8a77961-salvator-xs.dts (props changed) head/sys/gnu/dts/arm64/renesas/r8a77961.dtsi (props changed) head/sys/gnu/dts/arm64/renesas/rzg2-advantech-idk-1110wr-panel.dtsi (props changed) head/sys/gnu/dts/arm64/rockchip/rk3308-evb.dts (props changed) head/sys/gnu/dts/arm64/rockchip/rk3308-roc-cc.dts (props changed) head/sys/gnu/dts/arm64/rockchip/rk3308.dtsi (props changed) head/sys/gnu/dts/arm64/rockchip/rk3328-a1.dts (props changed) head/sys/gnu/dts/arm64/rockchip/rk3399-roc-pc-mezzanine.dts (props changed) head/sys/gnu/dts/arm64/rockchip/rk3399-roc-pc.dtsi (props changed) head/sys/gnu/dts/include/dt-bindings/clock/bm1880-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sc7180.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,q6sstopcc-qcs404.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a774b1-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a77961-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/x1000-cgu.h (props changed) head/sys/gnu/dts/include/dt-bindings/dma/x1000-dma.h (props changed) head/sys/gnu/dts/include/dt-bindings/gpio/meson-a1-gpio.h (props changed) head/sys/gnu/dts/include/dt-bindings/interconnect/qcom,msm8974.h (props changed) head/sys/gnu/dts/include/dt-bindings/net/qca-ar803x.h (props changed) head/sys/gnu/dts/include/dt-bindings/net/ti-dp83869.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a774b1-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a77961-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/regulator/dlg,da9063-regulator.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-a1-reset.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/realtek,rtd1295.h (props changed) Deleted: head/sys/gnu/dts/arm/at91-kizbox2.dts Modified: head/sys/gnu/dts/arm/am335x-baltos.dtsi head/sys/gnu/dts/arm/am335x-bone-common.dtsi head/sys/gnu/dts/arm/am335x-boneblack-common.dtsi head/sys/gnu/dts/arm/am335x-boneblue.dts head/sys/gnu/dts/arm/am335x-chiliboard.dts head/sys/gnu/dts/arm/am335x-cm-t335.dts head/sys/gnu/dts/arm/am335x-evm.dts head/sys/gnu/dts/arm/am335x-evmsk.dts head/sys/gnu/dts/arm/am335x-guardian.dts head/sys/gnu/dts/arm/am335x-igep0033.dtsi head/sys/gnu/dts/arm/am335x-lxm.dts head/sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi head/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts head/sys/gnu/dts/arm/am335x-osd3358-sm-red.dts head/sys/gnu/dts/arm/am335x-pcm-953.dtsi head/sys/gnu/dts/arm/am335x-pdu001.dts head/sys/gnu/dts/arm/am335x-pepper.dts head/sys/gnu/dts/arm/am335x-pocketbeagle.dts head/sys/gnu/dts/arm/am335x-regor.dtsi head/sys/gnu/dts/arm/am335x-sancloud-bbe.dts head/sys/gnu/dts/arm/am335x-shc.dts head/sys/gnu/dts/arm/am335x-sl50.dts head/sys/gnu/dts/arm/am335x-wega.dtsi head/sys/gnu/dts/arm/am33xx-l4.dtsi head/sys/gnu/dts/arm/am33xx.dtsi head/sys/gnu/dts/arm/am3517.dtsi head/sys/gnu/dts/arm/am3517_mt_ventoux.dts head/sys/gnu/dts/arm/am4372.dtsi head/sys/gnu/dts/arm/am437x-gp-evm.dts head/sys/gnu/dts/arm/am437x-l4.dtsi head/sys/gnu/dts/arm/am43x-epos-evm.dts head/sys/gnu/dts/arm/am571x-idk.dts head/sys/gnu/dts/arm/am572x-idk-common.dtsi head/sys/gnu/dts/arm/am572x-idk.dts head/sys/gnu/dts/arm/am574x-idk.dts head/sys/gnu/dts/arm/am57xx-beagle-x15-common.dtsi head/sys/gnu/dts/arm/am57xx-beagle-x15-revb1.dts head/sys/gnu/dts/arm/am57xx-beagle-x15-revc.dts head/sys/gnu/dts/arm/am57xx-idk-common.dtsi head/sys/gnu/dts/arm/armada-38x.dtsi head/sys/gnu/dts/arm/armada-xp-98dx3236.dtsi head/sys/gnu/dts/arm/armada-xp-db-xc3-24g4xg.dts head/sys/gnu/dts/arm/armada-xp.dtsi head/sys/gnu/dts/arm/aspeed-ast2500-evb.dts head/sys/gnu/dts/arm/aspeed-ast2600-evb.dts (contents, props changed) head/sys/gnu/dts/arm/aspeed-bmc-arm-stardragon4800-rep2.dts head/sys/gnu/dts/arm/aspeed-bmc-facebook-cmm.dts head/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts (contents, props changed) head/sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts head/sys/gnu/dts/arm/aspeed-bmc-facebook-yamp.dts head/sys/gnu/dts/arm/aspeed-bmc-inspur-fp5280g2.dts head/sys/gnu/dts/arm/aspeed-bmc-inspur-on5263m5.dts head/sys/gnu/dts/arm/aspeed-bmc-intel-s2600wf.dts head/sys/gnu/dts/arm/aspeed-bmc-lenovo-hr630.dts head/sys/gnu/dts/arm/aspeed-bmc-lenovo-hr855xg2.dts (contents, props changed) head/sys/gnu/dts/arm/aspeed-bmc-opp-lanyang.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-mihawk.dts (contents, props changed) head/sys/gnu/dts/arm/aspeed-bmc-opp-palmetto.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-romulus.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-swift.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-vesnin.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-witherspoon.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-zaius.dts head/sys/gnu/dts/arm/aspeed-bmc-portwell-neptune.dts head/sys/gnu/dts/arm/aspeed-g4.dtsi head/sys/gnu/dts/arm/aspeed-g5.dtsi head/sys/gnu/dts/arm/aspeed-g6-pinctrl.dtsi (contents, props changed) head/sys/gnu/dts/arm/aspeed-g6.dtsi (contents, props changed) head/sys/gnu/dts/arm/at91-sama5d27_som1_ek.dts head/sys/gnu/dts/arm/at91-sama5d2_xplained.dts head/sys/gnu/dts/arm/at91-sama5d4_xplained.dts head/sys/gnu/dts/arm/atlas7-evb.dts head/sys/gnu/dts/arm/bcm-cygnus.dtsi head/sys/gnu/dts/arm/bcm-hr2.dtsi head/sys/gnu/dts/arm/bcm2835-rpi.dtsi head/sys/gnu/dts/arm/bcm2835.dtsi head/sys/gnu/dts/arm/bcm2836.dtsi head/sys/gnu/dts/arm/bcm2837.dtsi head/sys/gnu/dts/arm/bcm283x.dtsi head/sys/gnu/dts/arm/bcm5301x.dtsi head/sys/gnu/dts/arm/dove.dtsi head/sys/gnu/dts/arm/dra7-l4.dtsi head/sys/gnu/dts/arm/dra7.dtsi head/sys/gnu/dts/arm/emev2.dtsi head/sys/gnu/dts/arm/exynos3250.dtsi head/sys/gnu/dts/arm/exynos4.dtsi head/sys/gnu/dts/arm/exynos4210.dtsi head/sys/gnu/dts/arm/exynos4412.dtsi head/sys/gnu/dts/arm/exynos5.dtsi head/sys/gnu/dts/arm/exynos5250-arndale.dts head/sys/gnu/dts/arm/exynos5250.dtsi head/sys/gnu/dts/arm/exynos5260.dtsi head/sys/gnu/dts/arm/exynos5410.dtsi head/sys/gnu/dts/arm/exynos5420-peach-pit.dts head/sys/gnu/dts/arm/exynos5420.dtsi head/sys/gnu/dts/arm/exynos5422-odroid-core.dtsi head/sys/gnu/dts/arm/exynos5422-odroidxu3-lite.dts head/sys/gnu/dts/arm/exynos54xx.dtsi head/sys/gnu/dts/arm/exynos5800-peach-pi.dts head/sys/gnu/dts/arm/exynos5800.dtsi head/sys/gnu/dts/arm/imx27.dtsi head/sys/gnu/dts/arm/imx31.dtsi head/sys/gnu/dts/arm/imx51.dtsi head/sys/gnu/dts/arm/imx53-qsb-common.dtsi head/sys/gnu/dts/arm/imx53-usbarmory.dts head/sys/gnu/dts/arm/imx6dl-apf6dev.dts head/sys/gnu/dts/arm/imx6dl-colibri-eval-v3.dts head/sys/gnu/dts/arm/imx6dl-icore-mipi.dts head/sys/gnu/dts/arm/imx6dl-yapp4-common.dtsi head/sys/gnu/dts/arm/imx6dl-yapp4-hydra.dts head/sys/gnu/dts/arm/imx6dl.dtsi head/sys/gnu/dts/arm/imx6q-apalis-eval.dts head/sys/gnu/dts/arm/imx6q-apalis-ixora-v1.1.dts head/sys/gnu/dts/arm/imx6q-apalis-ixora.dts head/sys/gnu/dts/arm/imx6q-apf6dev.dts head/sys/gnu/dts/arm/imx6q-dhcom-pdk2.dts head/sys/gnu/dts/arm/imx6q-dhcom-som.dtsi head/sys/gnu/dts/arm/imx6q-gw54xx.dts head/sys/gnu/dts/arm/imx6q.dtsi head/sys/gnu/dts/arm/imx6qdl-apalis.dtsi head/sys/gnu/dts/arm/imx6qdl-apf6.dtsi head/sys/gnu/dts/arm/imx6qdl-apf6dev.dtsi head/sys/gnu/dts/arm/imx6qdl-colibri.dtsi head/sys/gnu/dts/arm/imx6qdl-gw551x.dtsi head/sys/gnu/dts/arm/imx6qdl-rex.dtsi head/sys/gnu/dts/arm/imx6qdl-sabresd.dtsi head/sys/gnu/dts/arm/imx6qdl-udoo.dtsi head/sys/gnu/dts/arm/imx6qdl-wandboard.dtsi head/sys/gnu/dts/arm/imx6qdl-zii-rdu2.dtsi head/sys/gnu/dts/arm/imx6sl-evk.dts head/sys/gnu/dts/arm/imx6sl.dtsi head/sys/gnu/dts/arm/imx6sll-evk.dts head/sys/gnu/dts/arm/imx6sll.dtsi head/sys/gnu/dts/arm/imx6sx-sdb-reva.dts head/sys/gnu/dts/arm/imx6sx-sdb.dts head/sys/gnu/dts/arm/imx6sx.dtsi head/sys/gnu/dts/arm/imx6ul-14x14-evk.dtsi head/sys/gnu/dts/arm/imx6ul-kontron-n6310-s.dts (contents, props changed) head/sys/gnu/dts/arm/imx6ul-kontron-n6310-som.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6ul-opos6ul.dtsi head/sys/gnu/dts/arm/imx6ul-opos6uldev.dts head/sys/gnu/dts/arm/imx6ul-phytec-phycore-som.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6ul.dtsi head/sys/gnu/dts/arm/imx6ull-colibri-eval-v3.dtsi head/sys/gnu/dts/arm/imx6ull-colibri-nonwifi.dtsi head/sys/gnu/dts/arm/imx6ull-colibri-wifi.dtsi head/sys/gnu/dts/arm/imx6ull-colibri.dtsi head/sys/gnu/dts/arm/imx7-colibri-eval-v3.dtsi head/sys/gnu/dts/arm/imx7-colibri.dtsi head/sys/gnu/dts/arm/imx7d.dtsi head/sys/gnu/dts/arm/imx7s-colibri.dtsi head/sys/gnu/dts/arm/imx7s.dtsi head/sys/gnu/dts/arm/imx7ulp-evk.dts head/sys/gnu/dts/arm/imx7ulp.dtsi head/sys/gnu/dts/arm/keystone-clocks.dtsi head/sys/gnu/dts/arm/keystone-k2e-clocks.dtsi head/sys/gnu/dts/arm/keystone-k2e-netcp.dtsi head/sys/gnu/dts/arm/keystone-k2hk-netcp.dtsi head/sys/gnu/dts/arm/keystone-k2l-netcp.dtsi head/sys/gnu/dts/arm/kirkwood-synology.dtsi head/sys/gnu/dts/arm/logicpd-som-lv-35xx-devkit.dts head/sys/gnu/dts/arm/logicpd-torpedo-35xx-devkit.dts head/sys/gnu/dts/arm/logicpd-torpedo-37xx-devkit-28.dts head/sys/gnu/dts/arm/logicpd-torpedo-37xx-devkit.dts head/sys/gnu/dts/arm/logicpd-torpedo-baseboard.dtsi head/sys/gnu/dts/arm/logicpd-torpedo-som.dtsi head/sys/gnu/dts/arm/meson8.dtsi head/sys/gnu/dts/arm/motorola-cpcap-mapphone.dtsi head/sys/gnu/dts/arm/mt6323.dtsi head/sys/gnu/dts/arm/omap3-beagle-xm.dts head/sys/gnu/dts/arm/omap3-beagle.dts head/sys/gnu/dts/arm/omap3-cm-t3530.dts head/sys/gnu/dts/arm/omap3-cm-t3730.dts head/sys/gnu/dts/arm/omap3-devkit8000-lcd43.dts head/sys/gnu/dts/arm/omap3-devkit8000-lcd70.dts head/sys/gnu/dts/arm/omap3-devkit8000.dts head/sys/gnu/dts/arm/omap3-gta04.dtsi head/sys/gnu/dts/arm/omap3-ha-lcd.dts head/sys/gnu/dts/arm/omap3-ha.dts head/sys/gnu/dts/arm/omap3-igep0020-rev-f.dts head/sys/gnu/dts/arm/omap3-igep0020.dts head/sys/gnu/dts/arm/omap3-igep0030-rev-g.dts head/sys/gnu/dts/arm/omap3-igep0030.dts head/sys/gnu/dts/arm/omap3-ldp.dts head/sys/gnu/dts/arm/omap3-lilly-a83x.dtsi head/sys/gnu/dts/arm/omap3-lilly-dbb056.dts head/sys/gnu/dts/arm/omap3-n9.dts head/sys/gnu/dts/arm/omap3-n900.dts head/sys/gnu/dts/arm/omap3-n950-n9.dtsi head/sys/gnu/dts/arm/omap3-n950.dts head/sys/gnu/dts/arm/omap3-overo-storm-alto35.dts head/sys/gnu/dts/arm/omap3-overo-storm-chestnut43.dts head/sys/gnu/dts/arm/omap3-overo-storm-gallop43.dts head/sys/gnu/dts/arm/omap3-overo-storm-palo35.dts head/sys/gnu/dts/arm/omap3-overo-storm-palo43.dts head/sys/gnu/dts/arm/omap3-overo-storm-summit.dts head/sys/gnu/dts/arm/omap3-overo-storm-tobi.dts head/sys/gnu/dts/arm/omap3-overo-storm-tobiduo.dts head/sys/gnu/dts/arm/omap3-pandora-1ghz.dts head/sys/gnu/dts/arm/omap3-pandora-common.dtsi head/sys/gnu/dts/arm/omap3-sbc-t3530.dts head/sys/gnu/dts/arm/omap3-sbc-t3730.dts head/sys/gnu/dts/arm/omap3-sniper.dts head/sys/gnu/dts/arm/omap3-tao3530.dtsi head/sys/gnu/dts/arm/omap3-thunder.dts head/sys/gnu/dts/arm/omap3-zoom3.dts head/sys/gnu/dts/arm/omap3.dtsi head/sys/gnu/dts/arm/omap3430-sdp.dts head/sys/gnu/dts/arm/omap34xx-omap36xx-clocks.dtsi head/sys/gnu/dts/arm/omap34xx.dtsi head/sys/gnu/dts/arm/omap36xx-clocks.dtsi head/sys/gnu/dts/arm/omap36xx.dtsi head/sys/gnu/dts/arm/omap3xxx-clocks.dtsi head/sys/gnu/dts/arm/omap4-droid4-xt894.dts head/sys/gnu/dts/arm/omap4-l4-abe.dtsi head/sys/gnu/dts/arm/omap4-l4.dtsi head/sys/gnu/dts/arm/omap4.dtsi head/sys/gnu/dts/arm/omap5-l4-abe.dtsi head/sys/gnu/dts/arm/omap5-l4.dtsi head/sys/gnu/dts/arm/omap5.dtsi head/sys/gnu/dts/arm/qcom-ipq4019.dtsi head/sys/gnu/dts/arm/qcom-msm8974-fairphone-fp2.dts head/sys/gnu/dts/arm/qcom-msm8974.dtsi head/sys/gnu/dts/arm/qcom-pm8941.dtsi head/sys/gnu/dts/arm/r8a7790-lager.dts head/sys/gnu/dts/arm/r8a7793-gose.dts head/sys/gnu/dts/arm/rda8810pl.dtsi head/sys/gnu/dts/arm/rk3036.dtsi head/sys/gnu/dts/arm/rk3288-rock2-som.dtsi head/sys/gnu/dts/arm/rk3288-tinker.dtsi head/sys/gnu/dts/arm/rk3288-veyron-analog-audio.dtsi head/sys/gnu/dts/arm/rk3288-veyron-edp.dtsi (contents, props changed) head/sys/gnu/dts/arm/rk3288-veyron-jaq.dts head/sys/gnu/dts/arm/rk3288-veyron-mickey.dts head/sys/gnu/dts/arm/rk3288-veyron-minnie.dts head/sys/gnu/dts/arm/rk3288-veyron-tiger.dts (contents, props changed) head/sys/gnu/dts/arm/rk3288.dtsi head/sys/gnu/dts/arm/s3c6410-mini6410.dts head/sys/gnu/dts/arm/s3c6410-smdk6410.dts head/sys/gnu/dts/arm/sama5d2.dtsi head/sys/gnu/dts/arm/socfpga_arria10_socdk_qspi.dts head/sys/gnu/dts/arm/stm32429i-eval.dts head/sys/gnu/dts/arm/stm32746g-eval.dts head/sys/gnu/dts/arm/stm32f429-disco.dts head/sys/gnu/dts/arm/stm32f469-disco.dts head/sys/gnu/dts/arm/stm32f469.dtsi head/sys/gnu/dts/arm/stm32f746-disco.dts head/sys/gnu/dts/arm/stm32f769-disco.dts head/sys/gnu/dts/arm/stm32h743i-disco.dts head/sys/gnu/dts/arm/stm32h743i-eval.dts head/sys/gnu/dts/arm/stm32mp157-pinctrl.dtsi head/sys/gnu/dts/arm/stm32mp157a-avenger96.dts head/sys/gnu/dts/arm/stm32mp157a-dk1.dts head/sys/gnu/dts/arm/stm32mp157c-dk2.dts head/sys/gnu/dts/arm/stm32mp157c-ed1.dts head/sys/gnu/dts/arm/stm32mp157c-ev1.dts head/sys/gnu/dts/arm/stm32mp157c.dtsi head/sys/gnu/dts/arm/sun5i-a10s-olinuxino-micro.dts head/sys/gnu/dts/arm/sun6i-a31.dtsi head/sys/gnu/dts/arm/sun8i-a83t-cubietruck-plus.dts head/sys/gnu/dts/arm/sun8i-a83t-tbs-a711.dts head/sys/gnu/dts/arm/sun8i-a83t.dtsi head/sys/gnu/dts/arm/sun8i-h3.dtsi head/sys/gnu/dts/arm/sun8i-r40.dtsi head/sys/gnu/dts/arm/sun9i-a80.dtsi head/sys/gnu/dts/arm/sunxi-h3-h5.dtsi head/sys/gnu/dts/arm/tegra124-nyan-big-emc.dtsi head/sys/gnu/dts/arm/tegra124-venice2.dts head/sys/gnu/dts/arm/tegra124.dtsi head/sys/gnu/dts/arm/tegra20-paz00.dts head/sys/gnu/dts/arm/tegra20-trimslice.dts head/sys/gnu/dts/arm/tegra20.dtsi head/sys/gnu/dts/arm/tegra30-apalis-v1.1.dtsi head/sys/gnu/dts/arm/tegra30-apalis.dtsi head/sys/gnu/dts/arm/tegra30-cardhu-a04.dts head/sys/gnu/dts/arm/tegra30-colibri.dtsi head/sys/gnu/dts/arm/tegra30.dtsi head/sys/gnu/dts/arm/vf-colibri.dtsi head/sys/gnu/dts/arm/vf500-colibri.dtsi head/sys/gnu/dts/arm/vf610-bk4.dts head/sys/gnu/dts/arm/vf610-zii-scu4-aib.dts head/sys/gnu/dts/arm64/actions/s900-bubblegum-96.dts head/sys/gnu/dts/arm64/actions/s900.dtsi head/sys/gnu/dts/arm64/allwinner/sun50i-a64-olinuxino-emmc.dts (contents, props changed) head/sys/gnu/dts/arm64/allwinner/sun50i-a64-olinuxino.dts head/sys/gnu/dts/arm64/allwinner/sun50i-a64-orangepi-win.dts head/sys/gnu/dts/arm64/allwinner/sun50i-a64-sopine-baseboard.dts head/sys/gnu/dts/arm64/allwinner/sun50i-a64-teres-i.dts head/sys/gnu/dts/arm64/allwinner/sun50i-a64.dtsi head/sys/gnu/dts/arm64/allwinner/sun50i-h5-emlid-neutis-n5.dtsi head/sys/gnu/dts/arm64/allwinner/sun50i-h5.dtsi head/sys/gnu/dts/arm64/allwinner/sun50i-h6-beelink-gs1.dts head/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi-3.dts head/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi.dtsi head/sys/gnu/dts/arm64/allwinner/sun50i-h6-pine-h64.dts head/sys/gnu/dts/arm64/allwinner/sun50i-h6-tanix-tx6.dts (contents, props changed) head/sys/gnu/dts/arm64/allwinner/sun50i-h6.dtsi head/sys/gnu/dts/arm64/altera/socfpga_stratix10.dtsi head/sys/gnu/dts/arm64/altera/socfpga_stratix10_socdk.dts head/sys/gnu/dts/arm64/amlogic/meson-axg.dtsi head/sys/gnu/dts/arm64/amlogic/meson-g12-common.dtsi (contents, props changed) head/sys/gnu/dts/arm64/amlogic/meson-g12a-sei510.dts head/sys/gnu/dts/arm64/amlogic/meson-g12a-x96-max.dts head/sys/gnu/dts/arm64/amlogic/meson-g12a.dtsi head/sys/gnu/dts/arm64/amlogic/meson-g12b-a311d-khadas-vim3.dts (contents, props changed) head/sys/gnu/dts/arm64/amlogic/meson-g12b-odroid-n2.dts head/sys/gnu/dts/arm64/amlogic/meson-g12b-s922x-khadas-vim3.dts (contents, props changed) head/sys/gnu/dts/arm64/amlogic/meson-g12b.dtsi head/sys/gnu/dts/arm64/amlogic/meson-gx-p23x-q20x.dtsi head/sys/gnu/dts/arm64/amlogic/meson-gx.dtsi head/sys/gnu/dts/arm64/amlogic/meson-gxbb-nanopi-k2.dts head/sys/gnu/dts/arm64/amlogic/meson-gxbb-nexbox-a95x.dts head/sys/gnu/dts/arm64/amlogic/meson-gxbb-odroidc2.dts head/sys/gnu/dts/arm64/amlogic/meson-gxbb-p20x.dtsi head/sys/gnu/dts/arm64/amlogic/meson-gxbb-vega-s95.dtsi head/sys/gnu/dts/arm64/amlogic/meson-gxbb-wetek.dtsi head/sys/gnu/dts/arm64/amlogic/meson-gxl-s805x-libretech-ac.dts head/sys/gnu/dts/arm64/amlogic/meson-gxl-s805x-p241.dts head/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-khadas-vim.dts head/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-libretech-cc.dts head/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-nexbox-a95x.dts head/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-p212.dtsi head/sys/gnu/dts/arm64/amlogic/meson-gxl.dtsi head/sys/gnu/dts/arm64/amlogic/meson-gxm-khadas-vim2.dts head/sys/gnu/dts/arm64/amlogic/meson-gxm-rbox-pro.dts head/sys/gnu/dts/arm64/amlogic/meson-gxm-vega-s96.dts head/sys/gnu/dts/arm64/amlogic/meson-gxm.dtsi head/sys/gnu/dts/arm64/amlogic/meson-khadas-vim3.dtsi (contents, props changed) head/sys/gnu/dts/arm64/amlogic/meson-sm1-khadas-vim3l.dts (contents, props changed) head/sys/gnu/dts/arm64/amlogic/meson-sm1-sei610.dts (contents, props changed) head/sys/gnu/dts/arm64/amlogic/meson-sm1.dtsi (contents, props changed) head/sys/gnu/dts/arm64/arm/juno-base.dtsi head/sys/gnu/dts/arm64/arm/juno-clocks.dtsi head/sys/gnu/dts/arm64/exynos/exynos5433.dtsi head/sys/gnu/dts/arm64/exynos/exynos7.dtsi head/sys/gnu/dts/arm64/freescale/fsl-ls1028a-qds.dts head/sys/gnu/dts/arm64/freescale/fsl-ls1028a-rdb.dts head/sys/gnu/dts/arm64/freescale/fsl-ls1028a.dtsi head/sys/gnu/dts/arm64/freescale/fsl-ls1046a-rdb.dts head/sys/gnu/dts/arm64/freescale/fsl-ls1088a-rdb.dts head/sys/gnu/dts/arm64/freescale/fsl-lx2160a.dtsi head/sys/gnu/dts/arm64/freescale/imx8mm-evk.dts head/sys/gnu/dts/arm64/freescale/imx8mm.dtsi head/sys/gnu/dts/arm64/freescale/imx8mn-ddr4-evk.dts (contents, props changed) head/sys/gnu/dts/arm64/freescale/imx8mn.dtsi (contents, props changed) head/sys/gnu/dts/arm64/freescale/imx8mq-evk.dts head/sys/gnu/dts/arm64/freescale/imx8mq-hummingboard-pulse.dts (contents, props changed) head/sys/gnu/dts/arm64/freescale/imx8mq-librem5-devkit.dts head/sys/gnu/dts/arm64/freescale/imx8mq-nitrogen.dts (contents, props changed) head/sys/gnu/dts/arm64/freescale/imx8mq-pico-pi.dts (contents, props changed) head/sys/gnu/dts/arm64/freescale/imx8mq-sr-som.dtsi (contents, props changed) head/sys/gnu/dts/arm64/freescale/imx8mq-zii-ultra.dtsi head/sys/gnu/dts/arm64/freescale/imx8mq.dtsi head/sys/gnu/dts/arm64/freescale/imx8qxp-ai_ml.dts (contents, props changed) head/sys/gnu/dts/arm64/freescale/imx8qxp-mek.dts head/sys/gnu/dts/arm64/freescale/imx8qxp.dtsi head/sys/gnu/dts/arm64/hisilicon/hi6220.dtsi head/sys/gnu/dts/arm64/intel/socfpga_agilex.dtsi head/sys/gnu/dts/arm64/intel/socfpga_agilex_socdk.dts head/sys/gnu/dts/arm64/lg/lg1312.dtsi head/sys/gnu/dts/arm64/lg/lg1313.dtsi head/sys/gnu/dts/arm64/marvell/armada-3720-espressobin.dts head/sys/gnu/dts/arm64/marvell/armada-3720-turris-mox.dts (contents, props changed) head/sys/gnu/dts/arm64/marvell/armada-70x0.dtsi head/sys/gnu/dts/arm64/marvell/armada-8040-mcbin.dtsi head/sys/gnu/dts/arm64/marvell/armada-80x0.dtsi head/sys/gnu/dts/arm64/marvell/armada-ap806-dual.dtsi head/sys/gnu/dts/arm64/marvell/armada-ap806-quad.dtsi head/sys/gnu/dts/arm64/marvell/armada-ap806.dtsi head/sys/gnu/dts/arm64/marvell/armada-common.dtsi head/sys/gnu/dts/arm64/marvell/armada-cp110.dtsi head/sys/gnu/dts/arm64/mediatek/mt8183.dtsi head/sys/gnu/dts/arm64/nvidia/tegra186-p2771-0000.dts head/sys/gnu/dts/arm64/nvidia/tegra186.dtsi head/sys/gnu/dts/arm64/nvidia/tegra194-p2888.dtsi head/sys/gnu/dts/arm64/nvidia/tegra194-p2972-0000.dts head/sys/gnu/dts/arm64/nvidia/tegra194.dtsi head/sys/gnu/dts/arm64/nvidia/tegra210-p2180.dtsi head/sys/gnu/dts/arm64/nvidia/tegra210-p2597.dtsi head/sys/gnu/dts/arm64/nvidia/tegra210-p3450-0000.dts head/sys/gnu/dts/arm64/nvidia/tegra210.dtsi head/sys/gnu/dts/arm64/qcom/apq8096-db820c.dtsi head/sys/gnu/dts/arm64/qcom/msm8916-longcheer-l8150.dts (contents, props changed) head/sys/gnu/dts/arm64/qcom/msm8916-samsung-a2015-common.dtsi (contents, props changed) head/sys/gnu/dts/arm64/qcom/msm8916-samsung-a5u-eur.dts (contents, props changed) head/sys/gnu/dts/arm64/qcom/msm8916.dtsi head/sys/gnu/dts/arm64/qcom/msm8996.dtsi head/sys/gnu/dts/arm64/qcom/msm8998-clamshell.dtsi (contents, props changed) head/sys/gnu/dts/arm64/qcom/msm8998-mtp.dtsi head/sys/gnu/dts/arm64/qcom/msm8998-pins.dtsi head/sys/gnu/dts/arm64/qcom/msm8998.dtsi head/sys/gnu/dts/arm64/qcom/qcs404.dtsi head/sys/gnu/dts/arm64/qcom/sdm845-cheza.dtsi head/sys/gnu/dts/arm64/qcom/sdm845-db845c.dts head/sys/gnu/dts/arm64/qcom/sdm845.dtsi head/sys/gnu/dts/arm64/qcom/sdm850-lenovo-yoga-c630.dts (contents, props changed) head/sys/gnu/dts/arm64/realtek/rtd1295-zidoo-x9s.dts head/sys/gnu/dts/arm64/realtek/rtd1295.dtsi head/sys/gnu/dts/arm64/realtek/rtd129x.dtsi head/sys/gnu/dts/arm64/renesas/hihope-common.dtsi head/sys/gnu/dts/arm64/renesas/hihope-rzg2-ex.dtsi head/sys/gnu/dts/arm64/renesas/r8a774a1-hihope-rzg2m-ex.dts head/sys/gnu/dts/arm64/renesas/r8a774a1-hihope-rzg2m.dts head/sys/gnu/dts/arm64/renesas/r8a774a1.dtsi head/sys/gnu/dts/arm64/renesas/r8a774c0.dtsi head/sys/gnu/dts/arm64/renesas/r8a7795-es1.dtsi head/sys/gnu/dts/arm64/renesas/r8a7795.dtsi head/sys/gnu/dts/arm64/renesas/r8a7796.dtsi head/sys/gnu/dts/arm64/renesas/r8a77965.dtsi head/sys/gnu/dts/arm64/renesas/r8a77970.dtsi head/sys/gnu/dts/arm64/renesas/r8a77980.dtsi head/sys/gnu/dts/arm64/renesas/r8a77990.dtsi head/sys/gnu/dts/arm64/renesas/r8a77995.dtsi head/sys/gnu/dts/arm64/rockchip/px30-evb.dts head/sys/gnu/dts/arm64/rockchip/px30.dtsi head/sys/gnu/dts/arm64/rockchip/rk3328-roc-cc.dts head/sys/gnu/dts/arm64/rockchip/rk3328.dtsi head/sys/gnu/dts/arm64/rockchip/rk3399-gru-bob.dts head/sys/gnu/dts/arm64/rockchip/rk3399-gru-scarlet.dtsi head/sys/gnu/dts/arm64/rockchip/rk3399-nanopi4.dtsi head/sys/gnu/dts/arm64/rockchip/rk3399-puma.dtsi head/sys/gnu/dts/arm64/rockchip/rk3399-roc-pc.dts head/sys/gnu/dts/arm64/rockchip/rk3399-rock-pi-4.dts head/sys/gnu/dts/arm64/rockchip/rk3399-rockpro64.dts head/sys/gnu/dts/arm64/rockchip/rk3399.dtsi head/sys/gnu/dts/arm64/ti/k3-am65-main.dtsi head/sys/gnu/dts/arm64/ti/k3-am654-base-board.dts head/sys/gnu/dts/arm64/ti/k3-j721e-common-proc-board.dts head/sys/gnu/dts/arm64/ti/k3-j721e-main.dtsi head/sys/gnu/dts/arm64/ti/k3-j721e.dtsi head/sys/gnu/dts/arm64/xilinx/zynqmp.dtsi head/sys/gnu/dts/include/dt-bindings/clock/aspeed-clock.h head/sys/gnu/dts/include/dt-bindings/clock/ast2600-clock.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/axg-audio-clkc.h head/sys/gnu/dts/include/dt-bindings/clock/imx7ulp-clock.h head/sys/gnu/dts/include/dt-bindings/clock/imx8mm-clock.h head/sys/gnu/dts/include/dt-bindings/clock/imx8mn-clock.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/imx8mq-clock.h head/sys/gnu/dts/include/dt-bindings/clock/omap5.h head/sys/gnu/dts/include/dt-bindings/clock/px30-cru.h head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8998.h head/sys/gnu/dts/include/dt-bindings/clock/sun8i-h3-ccu.h head/sys/gnu/dts/include/dt-bindings/clock/tegra124-car-common.h head/sys/gnu/dts/include/dt-bindings/clock/tegra210-car.h head/sys/gnu/dts/include/dt-bindings/iio/adc/ingenic,adc.h head/sys/gnu/dts/include/dt-bindings/input/linux-event-codes.h head/sys/gnu/dts/include/dt-bindings/pinctrl/at91.h head/sys/gnu/dts/include/dt-bindings/pinctrl/rockchip.h head/sys/gnu/dts/include/dt-bindings/power/qcom-rpmpd.h head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-axg-audio-arb.h head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson8b-reset.h head/sys/gnu/dts/include/dt-bindings/sound/samsung-i2s.h head/sys/gnu/dts/riscv/sifive/fu540-c000.dtsi (contents, props changed) Directory Properties: head/sys/gnu/dts/arm/ (props changed) head/sys/gnu/dts/arm/aspeed-bmc-facebook-wedge100.dts (props changed) head/sys/gnu/dts/arm/aspeed-bmc-facebook-wedge40.dts (props changed) head/sys/gnu/dts/arm/imx6ul-kontron-n6310-s-43.dts (props changed) head/sys/gnu/dts/arm/imx6ul-phytec-segin-ff-rdk-nand.dts (props changed) head/sys/gnu/dts/arm/imx6ul-phytec-segin-peb-eval-01.dtsi (props changed) head/sys/gnu/dts/arm/imx6ul-phytec-segin.dtsi (props changed) head/sys/gnu/dts/arm/imx6ull-phytec-phycore-som.dtsi (props changed) head/sys/gnu/dts/arm/imx6ull-phytec-segin-ff-rdk-emmc.dts (props changed) head/sys/gnu/dts/arm/imx6ull-phytec-segin-ff-rdk-nand.dts (props changed) head/sys/gnu/dts/arm/imx6ull-phytec-segin-lc-rdk-nand.dts (props changed) head/sys/gnu/dts/arm/imx6ull-phytec-segin-peb-eval-01.dtsi (props changed) head/sys/gnu/dts/arm/imx6ull-phytec-segin.dtsi (props changed) head/sys/gnu/dts/arm/imx7d-zii-rmu2.dts (props changed) head/sys/gnu/dts/arm/mmp2-olpc-xo-1-75.dts (props changed) head/sys/gnu/dts/arm/mt7629-rfb.dts (props changed) head/sys/gnu/dts/arm/mt7629.dtsi (props changed) head/sys/gnu/dts/arm/rk3229-xms6.dts (props changed) head/sys/gnu/dts/arm/rk3288-veyron-fievel.dts (props changed) head/sys/gnu/dts/arm/ste-ab8500.dtsi (props changed) head/sys/gnu/dts/arm/sun8i-s3-lichee-zero-plus.dts (props changed) head/sys/gnu/dts/arm/sun8i-v3.dtsi (props changed) head/sys/gnu/dts/arm64/ (props changed) head/sys/gnu/dts/arm64/amlogic/meson-g12b-a311d.dtsi (props changed) head/sys/gnu/dts/arm64/amlogic/meson-g12b-khadas-vim3.dtsi (props changed) head/sys/gnu/dts/arm64/amlogic/meson-g12b-s922x.dtsi (props changed) head/sys/gnu/dts/arm64/freescale/fsl-ls1046a-frwy.dts (props changed) head/sys/gnu/dts/arm64/qcom/msm8916-samsung-a3u-eur.dts (props changed) head/sys/gnu/dts/arm64/qcom/msm8998-asus-novago-tp370ql.dts (props changed) head/sys/gnu/dts/arm64/qcom/msm8998-hp-envy-x2.dts (props changed) head/sys/gnu/dts/arm64/qcom/msm8998-lenovo-miix-630.dts (props changed) head/sys/gnu/dts/arm64/qcom/pm8150.dtsi (props changed) head/sys/gnu/dts/arm64/qcom/pm8150b.dtsi (props changed) head/sys/gnu/dts/arm64/qcom/pm8150l.dtsi (props changed) head/sys/gnu/dts/arm64/qcom/sm8150-mtp.dts (props changed) head/sys/gnu/dts/arm64/qcom/sm8150.dtsi (props changed) head/sys/gnu/dts/arm64/rockchip/rk3399-leez-p710.dts (props changed) head/sys/gnu/dts/include/ (props changed) head/sys/gnu/dts/include/dt-bindings/bus/moxtet.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/ingenic,tcu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/mt6779-clk.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sm8150.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/rk3308-cru.h (props changed) head/sys/gnu/dts/include/dt-bindings/gce/mt8183-gce.h (props changed) head/sys/gnu/dts/include/dt-bindings/interconnect/qcom,qcs404.h (props changed) head/sys/gnu/dts/include/dt-bindings/memory/mt8183-larb-port.h (props changed) head/sys/gnu/dts/include/dt-bindings/phy/phy-lantiq-vrx200-pcie.h (props changed) head/sys/gnu/dts/include/dt-bindings/pmu/exynos_ppmu.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/meson-g12a-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/meson-sm1-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/regulator/active-semi,8865-regulator.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset-controller/mt8183-resets.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/mt7629-resets.h (props changed) head/sys/gnu/dts/include/dt-bindings/soc/ti,sci_pm_domain.h (props changed) head/sys/gnu/dts/riscv/ (props changed) head/sys/gnu/dts/riscv/sifive/hifive-unleashed-a00.dts (props changed) Modified: head/sys/gnu/dts/arm/am335x-baltos.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-baltos.dtsi Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-baltos.dtsi Fri Feb 28 15:42:51 2020 (r358430) @@ -258,18 +258,6 @@ }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&cppi41dma { - status = "okay"; -}; - #include "tps65910.dtsi" &tps { Modified: head/sys/gnu/dts/arm/am335x-bone-common.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-bone-common.dtsi Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-bone-common.dtsi Fri Feb 28 15:42:51 2020 (r358430) @@ -191,36 +191,14 @@ status = "okay"; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "peripheral"; interrupts-extended = <&intc 18 &tps 0>; interrupt-names = "mc", "vbus"; }; &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; &i2c0 { Modified: head/sys/gnu/dts/arm/am335x-boneblack-common.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-boneblack-common.dtsi Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-boneblack-common.dtsi Fri Feb 28 15:42:51 2020 (r358430) @@ -131,6 +131,11 @@ }; / { + memory@80000000 { + device_type = "memory"; + reg = <0x80000000 0x20000000>; /* 512 MB */ + }; + clk_mcasp0_fixed: clk_mcasp0_fixed { #clock-cells = <0>; compatible = "fixed-clock"; Modified: head/sys/gnu/dts/arm/am335x-boneblue.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-boneblue.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-boneblue.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -278,36 +278,14 @@ status = "okay"; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "peripheral"; interrupts-extended = <&intc 18 &tps 0>; interrupt-names = "mc", "vbus"; }; &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; &i2c0 { Modified: head/sys/gnu/dts/arm/am335x-chiliboard.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-chiliboard.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-chiliboard.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -153,28 +153,10 @@ }; /* USB */ -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb1 { pinctrl-names = "default"; pinctrl-0 = <&usb1_drvvbus>; - - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; /* microSD */ Modified: head/sys/gnu/dts/arm/am335x-cm-t335.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-cm-t335.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-cm-t335.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -330,26 +330,6 @@ status = "okay"; }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - -&cppi41dma { - status = "okay"; -}; - &epwmss0 { status = "okay"; Modified: head/sys/gnu/dts/arm/am335x-evm.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-evm.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-evm.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -433,33 +433,8 @@ }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; &i2c1 { Modified: head/sys/gnu/dts/arm/am335x-evmsk.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-evmsk.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-evmsk.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -523,33 +523,8 @@ }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; &epwmss2 { Modified: head/sys/gnu/dts/arm/am335x-guardian.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-guardian.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-guardian.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -115,10 +115,6 @@ }; }; -&cppi41dma { - status = "okay"; -}; - &elm { status = "okay"; }; @@ -328,30 +324,12 @@ status = "okay"; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - &usb0 { dr_mode = "peripheral"; - status = "okay"; }; -&usb0_phy { - status = "okay"; -}; - &usb1 { dr_mode = "host"; - status = "okay"; -}; - -&usb1_phy { - status = "okay"; }; &am33xx_pinmux { Modified: head/sys/gnu/dts/arm/am335x-igep0033.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-igep0033.dtsi Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-igep0033.dtsi Fri Feb 28 15:42:51 2020 (r358430) @@ -217,33 +217,8 @@ pinctrl-0 = <&uart0_pins>; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; #include "tps65910.dtsi" Modified: head/sys/gnu/dts/arm/am335x-lxm.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-lxm.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-lxm.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -283,34 +283,12 @@ status = "okay"; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "host"; }; &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; &cpsw_emac0 { Modified: head/sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi Fri Feb 28 15:42:51 2020 (r358430) @@ -111,25 +111,8 @@ }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; /* Power */ Modified: head/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -290,34 +290,12 @@ }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "host"; }; &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; #include "tps65910.dtsi" Copied: head/sys/gnu/dts/arm/am335x-netcan-plus-1xx.dts (from r358428, vendor/device-tree/dist/src/arm/am335x-netcan-plus-1xx.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-netcan-plus-1xx.dts Fri Feb 28 15:42:51 2020 (r358430, copy of r358428, vendor/device-tree/dist/src/arm/am335x-netcan-plus-1xx.dts) @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +/dts-v1/; + +#include "am335x-baltos.dtsi" +#include "am335x-baltos-leds.dtsi" + +/ { + model = "NetCAN"; + + leds { + pinctrl-names = "default"; + pinctrl-0 = <&user_leds_s0>; + + compatible = "gpio-leds"; + + led@1 { + label = "can_data"; + linux,default-trigger = "netdev"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + led@2 { + label = "can_error"; + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; +}; + +&am33xx_pinmux { + user_leds_s0: user_leds_s0 { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* CAN Data LED */ + AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* CAN Error LED */ + >; + }; + + dcan1_pins: pinmux_dcan1_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_OUTPUT, MUX_MODE2) /* CAN TX */ + AM33XX_PADCONF(AM335X_PIN_UART0_RTSN, PIN_INPUT, MUX_MODE2) /* CAN RX */ + >; + }; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&davinci_mdio { + phy0: ethernet-phy@0 { + reg = <1>; + }; +}; + +&cpsw_emac0 { + phy-mode = "rmii"; + dual_emac_res_vlan = <1>; + phy-handle = <&phy0>; +}; + +&cpsw_emac1 { + phy-mode = "rgmii-id"; + dual_emac_res_vlan = <2>; + phy-handle = <&phy1>; +}; + +&dcan1 { + pinctrl-names = "default"; + pinctrl-0 = <&dcan1_pins>; + + status = "okay"; +}; Copied: head/sys/gnu/dts/arm/am335x-netcom-plus-2xx.dts (from r358428, vendor/device-tree/dist/src/arm/am335x-netcom-plus-2xx.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-netcom-plus-2xx.dts Fri Feb 28 15:42:51 2020 (r358430, copy of r358428, vendor/device-tree/dist/src/arm/am335x-netcom-plus-2xx.dts) @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +/dts-v1/; + +#include "am335x-baltos.dtsi" +#include "am335x-baltos-leds.dtsi" + +/ { + model = "NetCom Plus"; +}; + +&am33xx_pinmux { + uart1_pins: pinmux_uart1_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT, MUX_MODE0) /* RX */ + AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_INPUT, MUX_MODE0) /* TX */ + AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE0) /* CTS */ + AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_OUTPUT_PULLDOWN, MUX_MODE0) /* RTS */ + AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* DTR */ + AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_INPUT_PULLDOWN, MUX_MODE7) /* DSR */ + AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_INPUT_PULLDOWN, MUX_MODE7) /* DCD */ + AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_INPUT_PULLDOWN, MUX_MODE7) /* RI */ + >; + }; + + uart2_pins: pinmux_uart2_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_SPI0_SCLK, PIN_INPUT, MUX_MODE1) /* RX */ + AM33XX_PADCONF(AM335X_PIN_SPI0_D0, PIN_OUTPUT, MUX_MODE1) /* TX */ + AM33XX_PADCONF(AM335X_PIN_I2C0_SDA, PIN_INPUT_PULLDOWN, MUX_MODE2) /* CTS */ + AM33XX_PADCONF(AM335X_PIN_I2C0_SCL, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* RTS */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* DTR */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT_PULLDOWN, MUX_MODE7) /* DSR */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLDOWN, MUX_MODE7) /* DCD */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLDOWN, MUX_MODE7) /* RI */ + >; + }; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + dtr-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; + dsr-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; + dcd-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>; + rng-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + dtr-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + dsr-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; + dcd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; + rng-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&davinci_mdio { + phy0: ethernet-phy@0 { + reg = <1>; + }; +}; + +&cpsw_emac0 { + phy-mode = "rmii"; + dual_emac_res_vlan = <1>; + phy-handle = <&phy0>; +}; + +&cpsw_emac1 { + phy-mode = "rgmii-id"; + dual_emac_res_vlan = <2>; + phy-handle = <&phy1>; +}; Copied: head/sys/gnu/dts/arm/am335x-netcom-plus-8xx.dts (from r358428, vendor/device-tree/dist/src/arm/am335x-netcom-plus-8xx.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-netcom-plus-8xx.dts Fri Feb 28 15:42:51 2020 (r358430, copy of r358428, vendor/device-tree/dist/src/arm/am335x-netcom-plus-8xx.dts) @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +/dts-v1/; + +#include "am335x-baltos.dtsi" + +/ { + model = "NetCom Plus"; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + pinctrl-0 = <&dip_switches>; + + dip_switches: pinmux_dip_switches { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLDOWN, MUX_MODE7) + AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLDOWN, MUX_MODE7) + >; + }; + + tca6416_pins: pinmux_tca6416_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR1, PIN_INPUT_PULLUP, MUX_MODE7) + >; + }; + + i2c2_pins: pinmux_i2c2_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE3) + AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_INPUT_PULLDOWN, MUX_MODE3) + >; + }; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb1_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&usb1 { + status = "okay"; + dr_mode = "host"; +}; + +&i2c1 { + tca6416a: gpio@20 { + compatible = "ti,tca6416"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + interrupt-parent = <&gpio0>; + interrupts = <20 IRQ_TYPE_EDGE_RISING>; + pinctrl-names = "default"; + pinctrl-0 = <&tca6416_pins>; + }; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; + + status = "okay"; + clock-frequency = <400000>; + + tca6416b: gpio@20 { + compatible = "ti,tca6416"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + }; + + tca6416c: gpio@21 { + compatible = "ti,tca6416"; + reg = <0x21>; + gpio-controller; + #gpio-cells = <2>; + }; +}; + +&davinci_mdio { + phy0: ethernet-phy@0 { + reg = <1>; + }; +}; + +&cpsw_emac0 { + phy-mode = "rmii"; + dual_emac_res_vlan = <1>; + phy-handle = <&phy0>; +}; + +&cpsw_emac1 { + phy-mode = "rgmii-id"; + dual_emac_res_vlan = <2>; + phy-handle = <&phy1>; +}; Modified: head/sys/gnu/dts/arm/am335x-osd3358-sm-red.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-osd3358-sm-red.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-osd3358-sm-red.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -384,36 +384,14 @@ status = "okay"; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "peripheral"; interrupts-extended = <&intc 18 &tps 0>; interrupt-names = "mc", "vbus"; }; &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; &i2c2 { Modified: head/sys/gnu/dts/arm/am335x-pcm-953.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-pcm-953.dtsi Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-pcm-953.dtsi Fri Feb 28 15:42:51 2020 (r358430) @@ -237,31 +237,6 @@ }; /* USB */ -&cppi41dma { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&usb1_phy { - status = "okay"; }; Modified: head/sys/gnu/dts/arm/am335x-pdu001.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-pdu001.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-pdu001.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -384,34 +384,6 @@ }; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - -&usb1 { - status = "okay"; -}; - -&cppi41dma { - status = "okay"; -}; - /* * Disable soc's rtc as we have no VBAT for it. This makes the board * rtc (Microchip MCP79400) the default rtc device 'rtc0'. Modified: head/sys/gnu/dts/arm/am335x-pepper.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-pepper.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-pepper.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -552,36 +552,16 @@ /* USB */ &usb { - status = "okay"; - pinctrl-names = "default"; pinctrl-0 = <&usb_pins>; }; -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "host"; }; &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; &am33xx_pinmux { Modified: head/sys/gnu/dts/arm/am335x-pocketbeagle.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-pocketbeagle.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-pocketbeagle.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -206,32 +206,10 @@ status = "okay"; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; - &usb0 { - status = "okay"; dr_mode = "otg"; }; -&usb1_phy { - status = "okay"; -}; - &usb1 { - status = "okay"; dr_mode = "host"; -}; - -&cppi41dma { - status = "okay"; }; Modified: head/sys/gnu/dts/arm/am335x-regor.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-regor.dtsi Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-regor.dtsi Fri Feb 28 15:42:51 2020 (r358430) @@ -200,24 +200,3 @@ status = "okay"; linux,rs485-enabled-at-boot-time; }; - -/* USB */ -&cppi41dma { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - -&usb0_phy { - status = "okay"; -}; Modified: head/sys/gnu/dts/arm/am335x-sancloud-bbe.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-sancloud-bbe.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-sancloud-bbe.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -108,7 +108,7 @@ &cpsw_emac0 { phy-handle = <ðphy0>; - phy-mode = "rgmii-txid"; + phy-mode = "rgmii-id"; }; &i2c0 { Modified: head/sys/gnu/dts/arm/am335x-shc.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-shc.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-shc.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -117,10 +117,6 @@ status = "okay"; }; -&cppi41dma { - status = "okay"; -}; - &davinci_mdio { pinctrl-names = "default", "sleep"; pinctrl-0 = <&davinci_mdio_default>; @@ -358,20 +354,7 @@ status = "okay"; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { - status = "okay"; -}; - -&usb1_phy { - status = "okay"; -}; - &usb1 { - status = "okay"; dr_mode = "host"; }; Modified: head/sys/gnu/dts/arm/am335x-sl50.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-sl50.dts Fri Feb 28 15:15:31 2020 (r358429) +++ head/sys/gnu/dts/arm/am335x-sl50.dts Fri Feb 28 15:42:51 2020 (r358430) @@ -512,34 +512,12 @@ status = "disabled"; }; -&usb { - status = "okay"; -}; - -&usb_ctrl_mod { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Feb 28 15:51:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A60152658AE for ; Fri, 28 Feb 2020 15:51:51 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TYts3hCYz4PKC; Fri, 28 Feb 2020 15:51:48 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 01SFpfLV092178 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Feb 2020 15:51:42 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jkim@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 01SFpeT0077724 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 28 Feb 2020 22:51:40 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Jung-uk Kim , src-committers@freebsd.org, svn-src-head@freebsd.org References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <056cfbda-1100-c1d6-15d6-b77cdb14001f@FreeBSD.org> From: Eugene Grosbein Message-ID: Date: Fri, 28 Feb 2020 22:51:30 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <056cfbda-1100-c1d6-15d6-b77cdb14001f@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48TYts3hCYz4PKC X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.84)[ip: (-5.08), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.55), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 15:51:51 -0000 28.02.2020 22:33, Jung-uk Kim wrote: >> All you have to do is rebuilding security/cyrus-sasl2 with system >> OpenSSL, i.e., disable SSL option. > > I just found that you added the option. X-) > > The option is quite misleading. You need to fix the port first as > some people suggested at the time. I thought that option would be enough but it appeared it is not, so that attempt was unsuccessfull and I'm stuck. Now I believe the only option is merge of new 1.1.1 SSL API to our sendmail. From owner-svn-src-head@freebsd.org Fri Feb 28 15:59:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFDB2265C7A; Fri, 28 Feb 2020 15:59:36 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TZ3r49hTz3DFJ; Fri, 28 Feb 2020 15:59:36 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D006425C; Fri, 28 Feb 2020 15:59:36 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01SFxZ8Z072155; Fri, 28 Feb 2020 15:59:35 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SFxZ4O072154; Fri, 28 Feb 2020 15:59:35 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202002281559.01SFxZ4O072154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 28 Feb 2020 15:59:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358431 - head/sys/dev/uart X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/uart X-SVN-Commit-Revision: 358431 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 15:59:37 -0000 Author: jhibbits Date: Fri Feb 28 15:59:35 2020 New Revision: 358431 URL: https://svnweb.freebsd.org/changeset/base/358431 Log: Add Denverton UART PCI ID MFC after: 3 days Sponsored by: Juniper Networks, Inc Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Fri Feb 28 15:42:51 2020 (r358430) +++ head/sys/dev/uart/uart_bus_pci.c Fri Feb 28 15:59:35 2020 (r358431) @@ -133,6 +133,7 @@ static const struct pci_id pci_ns8250_ids[] = { { 0x8086, 0x0f0c, 0xffff, 0, "Intel ValleyView LPIO1 HSUART#2", 0x10, 24 * DEFAULT_RCLK, 2 }, { 0x8086, 0x108f, 0xffff, 0, "Intel AMT - SOL", 0x10 }, +{ 0x8086, 0x19d8, 0xffff, 0, "Intel Denverton UART", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x1e3d, 0xffff, 0, "Intel Panther Point KT Controller", 0x10 }, From owner-svn-src-head@freebsd.org Fri Feb 28 16:01:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D223265DE8 for ; Fri, 28 Feb 2020 16:01:43 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TZ6G6h3Zz3G0g; Fri, 28 Feb 2020 16:01:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id D6F5F287D; Fri, 28 Feb 2020 16:01:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Eugene Grosbein , src-committers@freebsd.org, svn-src-head@freebsd.org References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <056cfbda-1100-c1d6-15d6-b77cdb14001f@FreeBSD.org> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: Date: Fri, 28 Feb 2020 11:01:39 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 16:01:43 -0000 On 20. 2. 28., Eugene Grosbein wrote: > 28.02.2020 22:33, Jung-uk Kim wrote: > >>> All you have to do is rebuilding security/cyrus-sasl2 with system >>> OpenSSL, i.e., disable SSL option. >> >> I just found that you added the option. X-) >> >> The option is quite misleading. You need to fix the port first as >> some people suggested at the time. > > I thought that option would be enough but it appeared it is not, > so that attempt was unsuccessfull and I'm stuck. Please revert the commit (r515574) because it does not make any sense. > Now I believe the only option is merge of new 1.1.1 SSL API to our sendmail. No, stable/11 will never be updated to OpenSSL 1.1.1 because of ABI incompatibility. Jung-uk Kim From owner-svn-src-head@freebsd.org Fri Feb 28 16:05:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 952DD26600B; Fri, 28 Feb 2020 16:05:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TZBS4DGgz3HqD; Fri, 28 Feb 2020 16:05:20 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D2564420; Fri, 28 Feb 2020 16:05:20 +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 01SG5KpV077836; Fri, 28 Feb 2020 16:05:20 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SG5Iox077824; Fri, 28 Feb 2020 16:05:18 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002281605.01SG5Iox077824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 28 Feb 2020 16:05:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358432 - in head/sys: kern sys vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: kern sys vm X-SVN-Commit-Revision: 358432 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 16:05:20 -0000 Author: markj Date: Fri Feb 28 16:05:18 2020 New Revision: 358432 URL: https://svnweb.freebsd.org/changeset/base/358432 Log: Add a blocking counter KPI. refcount(9) was recently extended to support waiting on a refcount to drop to zero, as this was needed for a lockless VM object paging-in-progress counter. However, this adds overhead to all uses of refcount(9) and doesn't really match traditional refcounting semantics: once a counter has dropped to zero, the protected object may be freed at any point and it is not safe to dereference the counter. This change removes that extension and instead adds a new set of KPIs, blockcount_*, for use by VM object PIP and busy. Reviewed by: jeff, kib, mjg Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23723 Added: head/sys/sys/_blockcount.h (contents, props changed) head/sys/sys/blockcount.h (contents, props changed) Modified: head/sys/kern/kern_synch.c head/sys/kern/vfs_bio.c head/sys/sys/refcount.h head/sys/vm/vm_fault.c head/sys/vm/vm_object.c head/sys/vm/vm_object.h head/sys/vm/vm_pager.h head/sys/vm/vm_swapout.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Fri Feb 28 15:59:35 2020 (r358431) +++ head/sys/kern/kern_synch.c Fri Feb 28 16:05:18 2020 (r358432) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -52,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -337,81 +337,6 @@ pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_ } /* - * Potentially release the last reference for refcount. Check for - * unlikely conditions and signal the caller as to whether it was - * the final ref. - */ -bool -refcount_release_last(volatile u_int *count, u_int n, u_int old) -{ - u_int waiter; - - waiter = old & REFCOUNT_WAITER; - old = REFCOUNT_COUNT(old); - if (__predict_false(n > old || REFCOUNT_SATURATED(old))) { - /* - * Avoid multiple destructor invocations if underflow occurred. - * This is not perfect since the memory backing the containing - * object may already have been reallocated. - */ - _refcount_update_saturated(count); - return (false); - } - - /* - * Attempt to atomically clear the waiter bit. Wakeup waiters - * if we are successful. - */ - if (waiter != 0 && atomic_cmpset_int(count, REFCOUNT_WAITER, 0)) - wakeup(__DEVOLATILE(u_int *, count)); - - /* - * Last reference. Signal the user to call the destructor. - * - * Ensure that the destructor sees all updates. This synchronizes - * with release fences from all routines which drop the count. - */ - atomic_thread_fence_acq(); - return (true); -} - -/* - * Wait for a refcount wakeup. This does not guarantee that the ref is still - * zero on return and may be subject to transient wakeups. Callers wanting - * a precise answer should use refcount_wait(). - */ -void -_refcount_sleep(volatile u_int *count, struct lock_object *lock, - const char *wmesg, int pri) -{ - void *wchan; - u_int old; - - if (REFCOUNT_COUNT(*count) == 0) { - if (lock != NULL) - LOCK_CLASS(lock)->lc_unlock(lock); - return; - } - wchan = __DEVOLATILE(void *, count); - sleepq_lock(wchan); - if (lock != NULL) - LOCK_CLASS(lock)->lc_unlock(lock); - old = *count; - for (;;) { - if (REFCOUNT_COUNT(old) == 0) { - sleepq_release(wchan); - return; - } - if (old & REFCOUNT_WAITER) - break; - if (atomic_fcmpset_int(count, &old, old | REFCOUNT_WAITER)) - break; - } - sleepq_add(wchan, NULL, wmesg, 0, 0); - sleepq_wait(wchan, pri); -} - -/* * Make all threads sleeping on the specified identifier runnable. */ void @@ -457,6 +382,82 @@ wakeup_any(const void *ident) sleepq_release(ident); if (wakeup_swapper) kick_proc0(); +} + +/* + * Signal sleeping waiters after the counter has reached zero. + */ +void +_blockcount_wakeup(blockcount_t *bc, u_int old) +{ + + KASSERT(_BLOCKCOUNT_WAITERS(old), + ("%s: no waiters on %p", __func__, bc)); + + if (atomic_cmpset_int(&bc->__count, _BLOCKCOUNT_WAITERS_FLAG, 0)) + wakeup(bc); +} + +/* + * Wait for a wakeup. This does not guarantee that the count is still zero on + * return and may be subject to transient wakeups. Callers wanting a precise + * answer should use blockcount_wait() with an interlock. + * + * Return 0 if there is no work to wait for, and 1 if we slept waiting for work + * to complete. In the latter case the counter value must be re-read. + */ +int +_blockcount_sleep(blockcount_t *bc, struct lock_object *lock, const char *wmesg, + int prio) +{ + void *wchan; + uintptr_t lock_state; + u_int old; + int ret; + + KASSERT(lock != &Giant.lock_object, + ("%s: cannot use Giant as the interlock", __func__)); + + /* + * Synchronize with the fence in blockcount_release(). If we end up + * waiting, the sleepqueue lock acquisition will provide the required + * side effects. + * + * If there is no work to wait for, but waiters are present, try to put + * ourselves to sleep to avoid jumping ahead. + */ + if (atomic_load_acq_int(&bc->__count) == 0) { + if (lock != NULL && (prio & PDROP) != 0) + LOCK_CLASS(lock)->lc_unlock(lock); + return (0); + } + lock_state = 0; + wchan = bc; + sleepq_lock(wchan); + DROP_GIANT(); + if (lock != NULL) + lock_state = LOCK_CLASS(lock)->lc_unlock(lock); + old = blockcount_read(bc); + do { + if (_BLOCKCOUNT_COUNT(old) == 0) { + sleepq_release(wchan); + ret = 0; + goto out; + } + if (_BLOCKCOUNT_WAITERS(old)) + break; + } while (!atomic_fcmpset_int(&bc->__count, &old, + old | _BLOCKCOUNT_WAITERS_FLAG)); + sleepq_add(wchan, NULL, wmesg, 0, 0); + sleepq_wait(wchan, prio); + ret = 1; + +out: + PICKUP_GIANT(); + if (lock != NULL && (prio & PDROP) == 0) + LOCK_CLASS(lock)->lc_lock(lock, lock_state); + + return (ret); } static void Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Fri Feb 28 15:59:35 2020 (r358431) +++ head/sys/kern/vfs_bio.c Fri Feb 28 16:05:18 2020 (r358432) @@ -2854,9 +2854,9 @@ vfs_vmio_iodone(struct buf *bp) bool bogus; obj = bp->b_bufobj->bo_object; - KASSERT(REFCOUNT_COUNT(obj->paging_in_progress) >= bp->b_npages, + KASSERT(blockcount_read(&obj->paging_in_progress) >= bp->b_npages, ("vfs_vmio_iodone: paging in progress(%d) < b_npages(%d)", - REFCOUNT_COUNT(obj->paging_in_progress), bp->b_npages)); + blockcount_read(&obj->paging_in_progress), bp->b_npages)); vp = bp->b_vp; VNPASS(vp->v_holdcnt > 0, vp); Added: head/sys/sys/_blockcount.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/_blockcount.h Fri Feb 28 16:05:18 2020 (r358432) @@ -0,0 +1,52 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 The FreeBSD Foundation + * + * This software was developed by Mark Johnston 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. + * + * $FreeBSD$ + */ + +#ifndef __SYS__BLOCKCOUNT_H__ +#define __SYS__BLOCKCOUNT_H__ + +#include + +typedef struct _blockcount { + unsigned int __count; +} blockcount_t; + +#define _BLOCKCOUNT_WAITERS_FLAG (1U << 31) +#define _BLOCKCOUNT_COUNT(c) ((c) & ~_BLOCKCOUNT_WAITERS_FLAG) +#define _BLOCKCOUNT_WAITERS(c) (((c) & _BLOCKCOUNT_WAITERS_FLAG) != 0) + +static inline unsigned int +blockcount_read(blockcount_t *count) +{ + return (_BLOCKCOUNT_COUNT(atomic_load_int(&count->__count))); +} + +#endif /* !__SYS__BLOCKCOUNT_H__ */ Added: head/sys/sys/blockcount.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/blockcount.h Fri Feb 28 16:05:18 2020 (r358432) @@ -0,0 +1,95 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2005 John Baldwin + * Copyright (c) 2020 The FreeBSD Foundation + * + * Portions of this software were developed by Mark Johnston 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. + * + * $FreeBSD$ + */ + +#ifndef __SYS_BLOCKCOUNT_H__ +#define __SYS_BLOCKCOUNT_H__ + +#ifdef _KERNEL + +#include +#include + +struct lock_object; + +int _blockcount_sleep(blockcount_t *bc, struct lock_object *, const char *wmesg, + int prio); +void _blockcount_wakeup(blockcount_t *bc, u_int old); + +static __inline void +blockcount_init(blockcount_t *bc) +{ + atomic_store_int(&bc->__count, 0); +} + +static __inline void +blockcount_acquire(blockcount_t *bc, u_int n) +{ +#ifdef INVARIANTS + u_int old; + + old = atomic_fetchadd_int(&bc->__count, n); + KASSERT(old + n > old, ("%s: counter overflow %p", __func__, bc)); +#else + atomic_add_int(&bc->__count, n); +#endif +} + +static __inline void +blockcount_release(blockcount_t *bc, u_int n) +{ + u_int old; + + atomic_thread_fence_rel(); + old = atomic_fetchadd_int(&bc->__count, -n); + KASSERT(old >= n, ("%s: counter underflow %p", __func__, bc)); + if (_BLOCKCOUNT_COUNT(old) == n && _BLOCKCOUNT_WAITERS(old)) + _blockcount_wakeup(bc, old); +} + +static __inline void +_blockcount_wait(blockcount_t *bc, struct lock_object *lo, const char *wmesg, + int prio) +{ + KASSERT((prio & PDROP) == 0, ("%s: invalid prio %x", __func__, prio)); + + while (_blockcount_sleep(bc, lo, wmesg, prio) != 0) + ; +} + +#define blockcount_sleep(bc, lo, wmesg, prio) \ + _blockcount_sleep((bc), (struct lock_object *)(lo), (wmesg), (prio)) +#define blockcount_wait(bc, lo, wmesg, prio) \ + _blockcount_wait((bc), (struct lock_object *)(lo), (wmesg), (prio)) + +#endif /* _KERNEL */ +#endif /* !__SYS_BLOCKCOUNT_H__ */ Modified: head/sys/sys/refcount.h ============================================================================== --- head/sys/sys/refcount.h Fri Feb 28 15:59:35 2020 (r358431) +++ head/sys/sys/refcount.h Fri Feb 28 16:05:18 2020 (r358432) @@ -34,19 +34,15 @@ #ifdef _KERNEL #include +#include #else #include #define KASSERT(exp, msg) /* */ #endif -#define REFCOUNT_WAITER (1U << 31) /* Refcount has waiter. */ -#define REFCOUNT_SATURATION_VALUE (3U << 29) +#define REFCOUNT_SATURATED(val) (((val) & (1U << 31)) != 0) +#define REFCOUNT_SATURATION_VALUE (3U << 30) -#define REFCOUNT_SATURATED(val) (((val) & (1U << 30)) != 0) -#define REFCOUNT_COUNT(x) ((x) & ~REFCOUNT_WAITER) - -bool refcount_release_last(volatile u_int *count, u_int n, u_int old); - /* * Attempt to handle reference count overflow and underflow. Force the counter * to stay at the saturation value so that a counter overflow cannot trigger @@ -111,56 +107,6 @@ refcount_acquire_checked(volatile u_int *count) } } -static __inline bool -refcount_releasen(volatile u_int *count, u_int n) -{ - u_int old; - - KASSERT(n < REFCOUNT_SATURATION_VALUE / 2, - ("refcount_releasen: n=%u too large", n)); - - /* - * Paired with acquire fence in refcount_release_last. - */ - atomic_thread_fence_rel(); - old = atomic_fetchadd_int(count, -n); - if (__predict_false(n >= REFCOUNT_COUNT(old) || - REFCOUNT_SATURATED(old))) - return (refcount_release_last(count, n, old)); - return (false); -} - -static __inline bool -refcount_release(volatile u_int *count) -{ - - return (refcount_releasen(count, 1)); -} - -#ifdef _KERNEL -struct lock_object; -void _refcount_sleep(volatile u_int *count, struct lock_object *, - const char *wmesg, int prio); - -static __inline void -refcount_sleep(volatile u_int *count, const char *wmesg, int prio) -{ - - _refcount_sleep(count, NULL, wmesg, prio); -} - -#define refcount_sleep_interlock(count, lock, wmesg, prio) \ - _refcount_sleep((count), (struct lock_object *)(lock), (wmesg), (prio)) - -static __inline void -refcount_wait(volatile u_int *count, const char *wmesg, int prio) -{ - - while (*count != 0) - refcount_sleep(count, wmesg, prio); -} -#endif - /* * This functions returns non-zero if the refcount was * incremented. Else zero is returned. @@ -172,7 +118,7 @@ refcount_acquire_if_gt(volatile u_int *count, u_int n) old = *count; for (;;) { - if (REFCOUNT_COUNT(old) <= n) + if (old <= n) return (false); if (__predict_false(REFCOUNT_SATURATED(old))) return (true); @@ -185,9 +131,43 @@ static __inline __result_use_check bool refcount_acquire_if_not_zero(volatile u_int *count) { - return refcount_acquire_if_gt(count, 0); + return (refcount_acquire_if_gt(count, 0)); } +static __inline bool +refcount_releasen(volatile u_int *count, u_int n) +{ + u_int old; + + KASSERT(n < REFCOUNT_SATURATION_VALUE / 2, + ("refcount_releasen: n=%u too large", n)); + + atomic_thread_fence_rel(); + old = atomic_fetchadd_int(count, -n); + if (__predict_false(old < n || REFCOUNT_SATURATED(old))) { + _refcount_update_saturated(count); + return (false); + } + if (old > n) + return (false); + + /* + * Last reference. Signal the user to call the destructor. + * + * Ensure that the destructor sees all updates. This synchronizes with + * release fences from all routines which drop the count. + */ + atomic_thread_fence_acq(); + return (true); +} + +static __inline bool +refcount_release(volatile u_int *count) +{ + + return (refcount_releasen(count, 1)); +} + static __inline __result_use_check bool refcount_release_if_gt(volatile u_int *count, u_int n) { @@ -197,12 +177,12 @@ refcount_release_if_gt(volatile u_int *count, u_int n) ("refcount_release_if_gt: Use refcount_release for final ref")); old = *count; for (;;) { - if (REFCOUNT_COUNT(old) <= n) + if (old <= n) return (false); if (__predict_false(REFCOUNT_SATURATED(old))) return (true); /* - * Paired with acquire fence in refcount_release_last. + * Paired with acquire fence in refcount_releasen(). */ if (atomic_fcmpset_rel_int(count, &old, old - 1)) return (true); @@ -213,6 +193,7 @@ static __inline __result_use_check bool refcount_release_if_not_last(volatile u_int *count) { - return refcount_release_if_gt(count, 1); + return (refcount_release_if_gt(count, 1)); } -#endif /* ! __SYS_REFCOUNT_H__ */ + +#endif /* !__SYS_REFCOUNT_H__ */ Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Fri Feb 28 15:59:35 2020 (r358431) +++ head/sys/vm/vm_fault.c Fri Feb 28 16:05:18 2020 (r358432) @@ -377,7 +377,7 @@ vm_fault_restore_map_lock(struct faultstate *fs) { VM_OBJECT_ASSERT_WLOCKED(fs->first_object); - MPASS(REFCOUNT_COUNT(fs->first_object->paging_in_progress) > 0); + MPASS(blockcount_read(&fs->first_object->paging_in_progress) > 0); if (!vm_map_trylock_read(fs->map)) { VM_OBJECT_WUNLOCK(fs->first_object); @@ -428,7 +428,7 @@ vm_fault_populate(struct faultstate *fs) MPASS(fs->object == fs->first_object); VM_OBJECT_ASSERT_WLOCKED(fs->first_object); - MPASS(REFCOUNT_COUNT(fs->first_object->paging_in_progress) > 0); + MPASS(blockcount_read(&fs->first_object->paging_in_progress) > 0); MPASS(fs->first_object->backing_object == NULL); MPASS(fs->lookup_still_valid); Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Fri Feb 28 15:59:35 2020 (r358431) +++ head/sys/vm/vm_object.c Fri Feb 28 16:05:18 2020 (r358432) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -201,12 +202,11 @@ vm_object_zdtor(void *mem, int size, void *arg) ("object %p has reservations", object)); #endif - KASSERT(REFCOUNT_COUNT(object->paging_in_progress) == 0, + KASSERT(blockcount_read(&object->paging_in_progress) == 0, ("object %p paging_in_progress = %d", - object, REFCOUNT_COUNT(object->paging_in_progress))); - KASSERT(object->busy == 0, - ("object %p busy = %d", - object, object->busy)); + object, blockcount_read(&object->paging_in_progress))); + KASSERT(!vm_object_busied(object), + ("object %p busy = %d", object, blockcount_read(&object->busy))); KASSERT(object->resident_page_count == 0, ("object %p resident_page_count = %d", object, object->resident_page_count)); @@ -231,8 +231,8 @@ vm_object_zinit(void *mem, int size, int flags) object->type = OBJT_DEAD; vm_radix_init(&object->rtree); refcount_init(&object->ref_count, 0); - refcount_init(&object->paging_in_progress, 0); - refcount_init(&object->busy, 0); + blockcount_init(&object->paging_in_progress); + blockcount_init(&object->busy); object->resident_page_count = 0; object->shadow_count = 0; object->flags = OBJ_DEAD; @@ -363,34 +363,36 @@ void vm_object_pip_add(vm_object_t object, short i) { - refcount_acquiren(&object->paging_in_progress, i); + if (i > 0) + blockcount_acquire(&object->paging_in_progress, i); } void vm_object_pip_wakeup(vm_object_t object) { - refcount_release(&object->paging_in_progress); + vm_object_pip_wakeupn(object, 1); } void vm_object_pip_wakeupn(vm_object_t object, short i) { - refcount_releasen(&object->paging_in_progress, i); + if (i > 0) + blockcount_release(&object->paging_in_progress, i); } /* - * Atomically drop the interlock and wait for pip to drain. This protects - * from sleep/wakeup races due to identity changes. The lock is not - * re-acquired on return. + * Atomically drop the object lock and wait for pip to drain. This protects + * from sleep/wakeup races due to identity changes. The lock is not re-acquired + * on return. */ static void vm_object_pip_sleep(vm_object_t object, const char *waitid) { - refcount_sleep_interlock(&object->paging_in_progress, - &object->lock, waitid, PVM); + (void)blockcount_sleep(&object->paging_in_progress, &object->lock, + waitid, PVM | PDROP); } void @@ -399,10 +401,8 @@ vm_object_pip_wait(vm_object_t object, const char *wai VM_OBJECT_ASSERT_WLOCKED(object); - while (REFCOUNT_COUNT(object->paging_in_progress) > 0) { - vm_object_pip_sleep(object, waitid); - VM_OBJECT_WLOCK(object); - } + blockcount_wait(&object->paging_in_progress, &object->lock, waitid, + PVM); } void @@ -411,8 +411,7 @@ vm_object_pip_wait_unlocked(vm_object_t object, const VM_OBJECT_ASSERT_UNLOCKED(object); - while (REFCOUNT_COUNT(object->paging_in_progress) > 0) - refcount_wait(&object->paging_in_progress, waitid, PVM); + blockcount_wait(&object->paging_in_progress, NULL, waitid, PVM); } /* @@ -955,7 +954,7 @@ vm_object_terminate(vm_object_t object) */ vm_object_pip_wait(object, "objtrm"); - KASSERT(!REFCOUNT_COUNT(object->paging_in_progress), + KASSERT(!blockcount_read(&object->paging_in_progress), ("vm_object_terminate: pageout in progress")); KASSERT(object->ref_count == 0, @@ -2458,7 +2457,7 @@ vm_object_busy(vm_object_t obj) VM_OBJECT_ASSERT_LOCKED(obj); - refcount_acquire(&obj->busy); + blockcount_acquire(&obj->busy, 1); /* The fence is required to order loads of page busy. */ atomic_thread_fence_acq_rel(); } @@ -2467,8 +2466,7 @@ void vm_object_unbusy(vm_object_t obj) { - - refcount_release(&obj->busy); + blockcount_release(&obj->busy, 1); } void @@ -2477,8 +2475,7 @@ vm_object_busy_wait(vm_object_t obj, const char *wmesg VM_OBJECT_ASSERT_UNLOCKED(obj); - if (obj->busy) - refcount_sleep(&obj->busy, wmesg, PVM); + (void)blockcount_sleep(&obj->busy, NULL, wmesg, PVM); } /* Modified: head/sys/vm/vm_object.h ============================================================================== --- head/sys/vm/vm_object.h Fri Feb 28 15:59:35 2020 (r358431) +++ head/sys/vm/vm_object.h Fri Feb 28 16:05:18 2020 (r358432) @@ -70,6 +70,7 @@ #define _VM_OBJECT_ #include +#include #include #include #include @@ -113,8 +114,8 @@ struct vm_object { objtype_t type; /* type of pager */ u_short flags; /* see below */ u_short pg_color; /* (c) color of first page in obj */ - volatile u_int paging_in_progress; /* Paging (in or out) so don't collapse or destroy */ - volatile u_int busy; /* (a) object is busy, disallow page busy. */ + blockcount_t paging_in_progress; /* (a) Paging (in or out) so don't collapse or destroy */ + blockcount_t busy; /* (a) object is busy, disallow page busy. */ int resident_page_count; /* number of resident pages */ struct vm_object *backing_object; /* object that I'm a shadow of */ vm_ooffset_t backing_object_offset;/* Offset in backing object */ @@ -265,7 +266,7 @@ extern struct vm_object kernel_object_store; lock_class_rw.lc_lock(&(object)->lock.lock_object, (state)) #define VM_OBJECT_ASSERT_PAGING(object) \ - KASSERT((object)->paging_in_progress != 0, \ + KASSERT(blockcount_read(&(object)->paging_in_progress) != 0, \ ("vm_object %p is not paging", object)) #define VM_OBJECT_ASSERT_REFERENCE(object) \ KASSERT((object)->reference_count != 0, \ @@ -348,7 +349,7 @@ static inline bool vm_object_busied(vm_object_t object) { - return (object->busy != 0); + return (blockcount_read(&object->busy) != 0); } #define VM_OBJECT_ASSERT_BUSY(object) MPASS(vm_object_busied((object))) Modified: head/sys/vm/vm_pager.h ============================================================================== --- head/sys/vm/vm_pager.h Fri Feb 28 15:59:35 2020 (r358431) +++ head/sys/vm/vm_pager.h Fri Feb 28 16:05:18 2020 (r358432) @@ -168,7 +168,7 @@ vm_pager_populate(vm_object_t object, vm_pindex_t pidx MPASS((object->flags & OBJ_POPULATE) != 0); MPASS(pidx < object->size); - MPASS(object->paging_in_progress > 0); + MPASS(blockcount_read(&object->paging_in_progress) > 0); return ((*pagertab[object->type]->pgo_populate)(object, pidx, fault_type, max_prot, first, last)); } Modified: head/sys/vm/vm_swapout.c ============================================================================== --- head/sys/vm/vm_swapout.c Fri Feb 28 15:59:35 2020 (r358431) +++ head/sys/vm/vm_swapout.c Fri Feb 28 16:05:18 2020 (r358432) @@ -218,7 +218,7 @@ vm_swapout_object_deactivate(pmap_t pmap, vm_object_t goto unlock_return; VM_OBJECT_ASSERT_LOCKED(object); if ((object->flags & OBJ_UNMANAGED) != 0 || - REFCOUNT_COUNT(object->paging_in_progress) > 0) + blockcount_read(&object->paging_in_progress) > 0) goto unlock_return; unmap = true; From owner-svn-src-head@freebsd.org Fri Feb 28 17:04:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B23FA267412; Fri, 28 Feb 2020 17:04:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TbVs4MPbz48GJ; Fri, 28 Feb 2020 17:04:37 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B1AD4F3A; Fri, 28 Feb 2020 17:04:37 +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 01SH4bvS015072; Fri, 28 Feb 2020 17:04:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SH4boW015071; Fri, 28 Feb 2020 17:04:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002281704.01SH4boW015071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 28 Feb 2020 17:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358433 - head/sys/cddl/dev/systrace X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/cddl/dev/systrace X-SVN-Commit-Revision: 358433 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 17:04:37 -0000 Author: markj Date: Fri Feb 28 17:04:36 2020 New Revision: 358433 URL: https://svnweb.freebsd.org/changeset/base/358433 Log: Clear systrace_args_func when systrace probes are disabled. This function pointer is invalidated when systrace.ko is unloaded. Reported by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/cddl/dev/systrace/systrace.c Modified: head/sys/cddl/dev/systrace/systrace.c ============================================================================== --- head/sys/cddl/dev/systrace/systrace.c Fri Feb 28 16:05:18 2020 (r358432) +++ head/sys/cddl/dev/systrace/systrace.c Fri Feb 28 17:04:36 2020 (r358433) @@ -298,9 +298,9 @@ systrace_destroy(void *arg, dtrace_id_t id, void *parg * disabled. */ if (SYSTRACE_ISENTRY((uintptr_t)parg)) { - ASSERT(sysent[sysnum].sy_entry == 0); + ASSERT(sysent[sysnum].sy_entry == DTRACE_IDNONE); } else { - ASSERT(sysent[sysnum].sy_return == 0); + ASSERT(sysent[sysnum].sy_return == DTRACE_IDNONE); } #endif } @@ -310,8 +310,7 @@ systrace_enable(void *arg, dtrace_id_t id, void *parg) { int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg); - if (SYSENT[sysnum].sy_systrace_args_func == NULL) - SYSENT[sysnum].sy_systrace_args_func = systrace_args; + SYSENT[sysnum].sy_systrace_args_func = systrace_args; if (SYSTRACE_ISENTRY((uintptr_t)parg)) SYSENT[sysnum].sy_entry = id; @@ -327,8 +326,9 @@ systrace_disable(void *arg, dtrace_id_t id, void *parg { int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg); - SYSENT[sysnum].sy_entry = 0; - SYSENT[sysnum].sy_return = 0; + SYSENT[sysnum].sy_systrace_args_func = NULL; + SYSENT[sysnum].sy_entry = DTRACE_IDNONE; + SYSENT[sysnum].sy_return = DTRACE_IDNONE; systrace_enabled_count--; if (systrace_enabled_count == 0) systrace_enabled = false; From owner-svn-src-head@freebsd.org Fri Feb 28 17:05:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F16CE267478; Fri, 28 Feb 2020 17:05:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TbWN6BNWz48YM; Fri, 28 Feb 2020 17:05: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFA8D4F3B; Fri, 28 Feb 2020 17:05: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 01SH54Vj015408; Fri, 28 Feb 2020 17:05:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SH54rL015405; Fri, 28 Feb 2020 17:05:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002281705.01SH54rL015405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 28 Feb 2020 17:05:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358434 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 358434 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 17:05:05 -0000 Author: markj Date: Fri Feb 28 17:05:04 2020 New Revision: 358434 URL: https://svnweb.freebsd.org/changeset/base/358434 Log: Fix standalone builds of systrace.ko after r357912. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/subr_syscall.c head/sys/sys/sysent.h Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Fri Feb 28 17:04:36 2020 (r358433) +++ head/sys/kern/subr_syscall.c Fri Feb 28 17:05:04 2020 (r358434) @@ -141,7 +141,8 @@ syscallenter(struct thread *td) /* Let system calls set td_errno directly. */ td->td_pflags &= ~TDP_NERRNO; - if (__predict_false(systrace_enabled || AUDIT_SYSCALL_ENTER(sa->code, td))) { + if (__predict_false(SYSTRACE_ENABLED() || + AUDIT_SYSCALL_ENTER(sa->code, td))) { #ifdef KDTRACE_HOOKS /* Give the syscall:::entry DTrace probe a chance to fire. */ if (__predict_false(sa->callp->sy_entry != 0)) Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Fri Feb 28 17:04:36 2020 (r358433) +++ head/sys/sys/sysent.h Fri Feb 28 17:05:04 2020 (r358434) @@ -42,6 +42,7 @@ struct thread; struct ksiginfo; struct syscall_args; +#ifdef _KERNEL enum systrace_probe_t { SYSTRACE_ENTRY, SYSTRACE_RETURN, @@ -53,14 +54,15 @@ typedef void (*systrace_probe_func_t)(struct syscall_a enum systrace_probe_t, int); typedef void (*systrace_args_func_t)(int, void *, uint64_t *, int *); -#ifdef _KERNEL -#ifdef KDTRACE_HOOKS +extern systrace_probe_func_t systrace_probe_func; extern bool systrace_enabled; + +#ifdef KDTRACE_HOOKS +#define SYSTRACE_ENABLED() (systrace_enabled) #else -#define systrace_enabled 0 +#define SYSTRACE_ENABLED() (0) #endif -#endif -extern systrace_probe_func_t systrace_probe_func; +#endif /* _KERNEL */ struct sysent { /* system call table */ int sy_narg; /* number of arguments */ From owner-svn-src-head@freebsd.org Fri Feb 28 17:05:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 330AD2674DD; Fri, 28 Feb 2020 17:05:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TbWr0b84z48mv; Fri, 28 Feb 2020 17:05:28 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 072244F3D; Fri, 28 Feb 2020 17:05:28 +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 01SH5R9q015678; Fri, 28 Feb 2020 17:05:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SH5R03015677; Fri, 28 Feb 2020 17:05:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002281705.01SH5R03015677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 28 Feb 2020 17:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358435 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Commit-Revision: 358435 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 17:05:28 -0000 Author: markj Date: Fri Feb 28 17:05:27 2020 New Revision: 358435 URL: https://svnweb.freebsd.org/changeset/base/358435 Log: Do not load dtraceall.ko if dtrace.ko is already loaded. This was the intent of the existing code, but instead it would unconditionally load dtraceall.ko because of a stale errno value. Reported by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Feb 28 17:05:04 2020 (r358434) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Feb 28 17:05:27 2020 (r358435) @@ -1105,7 +1105,7 @@ dt_vopen(int version, int flags, int *errp, dt_provmod_open(&provmod, &df); dtfd = open("/dev/dtrace/dtrace", O_RDWR | O_CLOEXEC); - err = errno; /* save errno from opening dtfd */ + err = dtfd == -1 ? errno : 0; /* save errno from opening dtfd */ #if defined(__FreeBSD__) /* * Automatically load the 'dtraceall' module if we couldn't open the From owner-svn-src-head@freebsd.org Fri Feb 28 17:16:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D5772679EE for ; Fri, 28 Feb 2020 17:16:24 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TbmQ4fl6z4TY1; Fri, 28 Feb 2020 17:16:22 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 01SHGDCO093144 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Feb 2020 17:16:13 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jkim@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 01SHGBiB078504 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 29 Feb 2020 00:16:11 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Jung-uk Kim , src-committers@freebsd.org, svn-src-head@freebsd.org References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <056cfbda-1100-c1d6-15d6-b77cdb14001f@FreeBSD.org> From: Eugene Grosbein Message-ID: <38d705b4-0b33-9147-b89b-366903211810@grosbein.net> Date: Sat, 29 Feb 2020 00:16:01 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48TbmQ4fl6z4TY1 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.84)[ip: (-5.08), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.55), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 17:16:24 -0000 28.02.2020 23:01, Jung-uk Kim wrote: >> Now I believe the only option is merge of new 1.1.1 SSL API to our sendmail. > > No, stable/11 will never be updated to OpenSSL 1.1.1 because of ABI > incompatibility. I'm not talking about upgrading base system OpenSSL to 1.1.1 in stable/11. I'm talking about switching base system Sendmail to 1.1.1 SSL API only because it is impossible building SASL with 1.1.1 and link it with sendmail using base openssl 1.0.2. This is real problem. From owner-svn-src-head@freebsd.org Fri Feb 28 17:23:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1DF3D267C89; Fri, 28 Feb 2020 17:23:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Tbx65ZlDz4gFv; Fri, 28 Feb 2020 17:23: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 57BA052DA; Fri, 28 Feb 2020 17:23: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 01SHNr7H029739; Fri, 28 Feb 2020 17:23:53 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SHNrGL029738; Fri, 28 Feb 2020 17:23:53 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002281723.01SHNrGL029738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 28 Feb 2020 17:23:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358436 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358436 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 17:23:55 -0000 Author: markj Date: Fri Feb 28 17:23:53 2020 New Revision: 358436 URL: https://svnweb.freebsd.org/changeset/base/358436 Log: sy_call_t and systrace_args_func_t need to be visible to userspace. Reported by: Jenkins Modified: head/sys/sys/sysent.h Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Fri Feb 28 17:05:27 2020 (r358435) +++ head/sys/sys/sysent.h Fri Feb 28 17:23:53 2020 (r358436) @@ -42,7 +42,6 @@ struct thread; struct ksiginfo; struct syscall_args; -#ifdef _KERNEL enum systrace_probe_t { SYSTRACE_ENTRY, SYSTRACE_RETURN, @@ -57,6 +56,7 @@ typedef void (*systrace_args_func_t)(int, void *, uint extern systrace_probe_func_t systrace_probe_func; extern bool systrace_enabled; +#ifdef _KERNEL #ifdef KDTRACE_HOOKS #define SYSTRACE_ENABLED() (systrace_enabled) #else From owner-svn-src-head@freebsd.org Fri Feb 28 17:34:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 544662401EC for ; Fri, 28 Feb 2020 17:34:28 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Tc9H6qrmz41w3; Fri, 28 Feb 2020 17:34:27 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from vsuiko.mahoroba.org (vsuiko.mahoroba.org [IPv6:2001:2f0:104:8010:a00:27ff:feb0:c2e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: ume) by smtp.freebsd.org (Postfix) with ESMTPSA id EB1993336; Fri, 28 Feb 2020 17:34:26 +0000 (UTC) (envelope-from ume@FreeBSD.org) Date: Sat, 29 Feb 2020 02:34:21 +0900 Message-ID: From: Hajimu UMEMOTO To: Jung-uk Kim Cc: Eugene Grosbein , src-committers@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358411 - head/contrib/sendmail/src In-Reply-To: References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> User-Agent: xcite1.60> Wanderlust/2.15.9 (Almost Unreal) Emacs/26.3 Mule/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 12.1-STABLE X-PGP-Key: http://www.mahoroba.org/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 17:34:28 -0000 Hi, >>>>> On Fri, 28 Feb 2020 10:21:41 -0500 >>>>> Jung-uk Kim said: jkim> All you have to do is rebuilding security/cyrus-sasl2 with system jkim> OpenSSL, i.e., disable SSL option. Perhaps, you mean: DEFAULT_VERSIONS= ssl=base I'm using base sendmail with cyrus-sasl2 quite well on 12-STABLE. % freebsd-version 12.1-STABLE % ldd /usr/libexec/sendmail/sendmail /usr/libexec/sendmail/sendmail: libsasl2.so.3 => /usr/local/lib/libsasl2.so.3 (0x8002ff000) libutil.so.9 => /lib/libutil.so.9 (0x800320000) libssl.so.111 => /usr/lib/libssl.so.111 (0x800337000) libcrypto.so.111 => /lib/libcrypto.so.111 (0x8003cd000) libwrap.so.6 => /usr/lib/libwrap.so.6 (0x8006ba000) libc.so.7 => /lib/libc.so.7 (0x8006c5000) libdl.so.1 => /usr/lib/libdl.so.1 (0x800abb000) libthr.so.3 => /lib/libthr.so.3 (0x800abf000) Sincerely, -- Hajimu UMEMOTO ume@mahoroba.org ume@FreeBSD.org http://www.mahoroba.org/~ume/ From owner-svn-src-head@freebsd.org Fri Feb 28 17:38:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1946724033C; Fri, 28 Feb 2020 17:38:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TcG059PRz4C7x; Fri, 28 Feb 2020 17:38:32 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6353454E2; Fri, 28 Feb 2020 17:38:32 +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 01SHcWub035671; Fri, 28 Feb 2020 17:38:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SHcWwS035670; Fri, 28 Feb 2020 17:38:32 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002281738.01SHcWwS035670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 28 Feb 2020 17:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358437 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358437 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 17:38:33 -0000 Author: markj Date: Fri Feb 28 17:38:31 2020 New Revision: 358437 URL: https://svnweb.freebsd.org/changeset/base/358437 Log: Fix r358436 to not declare kernel symbols when _KERNEL is not defined. Reported by: Jenkins, Michael Butler Pointy hat: markj Modified: head/sys/sys/sysent.h Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Fri Feb 28 17:23:53 2020 (r358436) +++ head/sys/sys/sysent.h Fri Feb 28 17:38:31 2020 (r358437) @@ -53,10 +53,10 @@ typedef void (*systrace_probe_func_t)(struct syscall_a enum systrace_probe_t, int); typedef void (*systrace_args_func_t)(int, void *, uint64_t *, int *); +#ifdef _KERNEL extern systrace_probe_func_t systrace_probe_func; extern bool systrace_enabled; -#ifdef _KERNEL #ifdef KDTRACE_HOOKS #define SYSTRACE_ENABLED() (systrace_enabled) #else From owner-svn-src-head@freebsd.org Fri Feb 28 18:13:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F235240F85 for ; Fri, 28 Feb 2020 18:13:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Td2k0Xwkz4QT5; Fri, 28 Feb 2020 18:13:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 32DA73998; Fri, 28 Feb 2020 18:13:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Eugene Grosbein , src-committers@freebsd.org, svn-src-head@freebsd.org References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <056cfbda-1100-c1d6-15d6-b77cdb14001f@FreeBSD.org> <38d705b4-0b33-9147-b89b-366903211810@grosbein.net> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: <441b8ef9-4fb0-4926-47e6-10ccd909a70a@FreeBSD.org> Date: Fri, 28 Feb 2020 13:13:42 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <38d705b4-0b33-9147-b89b-366903211810@grosbein.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 18:13:50 -0000 On 20. 2. 28., Eugene Grosbein wrote: > 28.02.2020 23:01, Jung-uk Kim wrote: > >>> Now I believe the only option is merge of new 1.1.1 SSL API to our sendmail. >> >> No, stable/11 will never be updated to OpenSSL 1.1.1 because of ABI >> incompatibility. > > I'm not talking about upgrading base system OpenSSL to 1.1.1 in stable/11. > > I'm talking about switching base system Sendmail to 1.1.1 SSL API only > because it is impossible building SASL with 1.1.1 and link it with sendmail using base openssl 1.0.2. > > This is real problem. You should not link a binary with two ABI incompatible libraries. Jung-uk Kim From owner-svn-src-head@freebsd.org Fri Feb 28 18:32:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4D602416ED; Fri, 28 Feb 2020 18:32:36 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TdSN4VSYz47bp; Fri, 28 Feb 2020 18:32:36 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 808DE6029; Fri, 28 Feb 2020 18:32:36 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01SIWahu071686; Fri, 28 Feb 2020 18:32:36 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SIWaEL071685; Fri, 28 Feb 2020 18:32:36 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202002281832.01SIWaEL071685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 28 Feb 2020 18:32:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358439 - head/sys/amd64/include X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/amd64/include X-SVN-Commit-Revision: 358439 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 18:32:37 -0000 Author: rlibby Date: Fri Feb 28 18:32:36 2020 New Revision: 358439 URL: https://svnweb.freebsd.org/changeset/base/358439 Log: amd64 atomic.h: minor codegen optimization in flag access Previously the pattern to extract status flags from inline assembly blocks was to use setcc in the block to write the flag to a register. This was suboptimal in a few ways: - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag would just be loaded into a register and then reloaded to a flag. - The setcc would force the block to use an additional register. - If the client code didn't care for the flag value then the setcc would be entirely pointless but could not be eliminated by the optimizer. A more modern inline asm construct (since gcc 6 and clang 9) allows for "flag output operands", where a C variable can be written directly from a flag. The optimizer can then use this to produce direct code where the flag does not take a trip through a register. In practice this makes each affected operation sequence shorter by five bytes of instructions. It's unlikely this has a measurable performance impact. Reviewed by: kib, markj, mjg Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D23869 Modified: head/sys/amd64/include/atomic.h Modified: head/sys/amd64/include/atomic.h ============================================================================== --- head/sys/amd64/include/atomic.h Fri Feb 28 17:41:46 2020 (r358438) +++ head/sys/amd64/include/atomic.h Fri Feb 28 18:32:36 2020 (r358439) @@ -201,9 +201,8 @@ atomic_cmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE __asm __volatile( \ " " MPLOCKED " " \ " cmpxchg %3,%1 ; " \ - " sete %0 ; " \ "# atomic_cmpset_" #TYPE " " \ - : "=q" (res), /* 0 */ \ + : "=@cce" (res), /* 0 */ \ "+m" (*dst), /* 1 */ \ "+a" (expect) /* 2 */ \ : "r" (src) /* 3 */ \ @@ -219,9 +218,8 @@ atomic_fcmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE __asm __volatile( \ " " MPLOCKED " " \ " cmpxchg %3,%1 ; " \ - " sete %0 ; " \ "# atomic_fcmpset_" #TYPE " " \ - : "=q" (res), /* 0 */ \ + : "=@cce" (res), /* 0 */ \ "+m" (*dst), /* 1 */ \ "+a" (*expect) /* 2 */ \ : "r" (src) /* 3 */ \ @@ -278,9 +276,8 @@ atomic_testandset_int(volatile u_int *p, u_int v) __asm __volatile( " " MPLOCKED " " " btsl %2,%1 ; " - " setc %0 ; " "# atomic_testandset_int" - : "=q" (res), /* 0 */ + : "=@ccc" (res), /* 0 */ "+m" (*p) /* 1 */ : "Ir" (v & 0x1f) /* 2 */ : "cc"); @@ -295,9 +292,8 @@ atomic_testandset_long(volatile u_long *p, u_int v) __asm __volatile( " " MPLOCKED " " " btsq %2,%1 ; " - " setc %0 ; " "# atomic_testandset_long" - : "=q" (res), /* 0 */ + : "=@ccc" (res), /* 0 */ "+m" (*p) /* 1 */ : "Jr" ((u_long)(v & 0x3f)) /* 2 */ : "cc"); @@ -312,9 +308,8 @@ atomic_testandclear_int(volatile u_int *p, u_int v) __asm __volatile( " " MPLOCKED " " " btrl %2,%1 ; " - " setc %0 ; " "# atomic_testandclear_int" - : "=q" (res), /* 0 */ + : "=@ccc" (res), /* 0 */ "+m" (*p) /* 1 */ : "Ir" (v & 0x1f) /* 2 */ : "cc"); @@ -329,9 +324,8 @@ atomic_testandclear_long(volatile u_long *p, u_int v) __asm __volatile( " " MPLOCKED " " " btrq %2,%1 ; " - " setc %0 ; " "# atomic_testandclear_long" - : "=q" (res), /* 0 */ + : "=@ccc" (res), /* 0 */ "+m" (*p) /* 1 */ : "Jr" ((u_long)(v & 0x3f)) /* 2 */ : "cc"); From owner-svn-src-head@freebsd.org Fri Feb 28 18:32:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DCAF624171A; Fri, 28 Feb 2020 18:32:41 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TdST4qyfz47lr; Fri, 28 Feb 2020 18:32:41 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D5C7602B; Fri, 28 Feb 2020 18:32:41 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01SIWe1r071740; Fri, 28 Feb 2020 18:32:40 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SIWeiH071739; Fri, 28 Feb 2020 18:32:40 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202002281832.01SIWeiH071739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 28 Feb 2020 18:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358440 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 358440 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 18:32:42 -0000 Author: rlibby Date: Fri Feb 28 18:32:40 2020 New Revision: 358440 URL: https://svnweb.freebsd.org/changeset/base/358440 Log: amd64 pmap.c: minor codegen optimization in flag access Following previous revision, apply the same minor optimization to hand-rolled atomic_fcmpset_128 in pmap.c. Reviewed by: kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D23870 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Feb 28 18:32:36 2020 (r358439) +++ head/sys/amd64/amd64/pmap.c Fri Feb 28 18:32:40 2020 (r358440) @@ -714,8 +714,8 @@ pmap_di_load_invl(struct pmap_invl_gen *ptr, struct pm old_low = new_low = 0; old_high = new_high = (uintptr_t)0; - __asm volatile("lock;cmpxchg16b\t%1;sete\t%0" - : "=r" (res), "+m" (*ptr), "+a" (old_low), "+d" (old_high) + __asm volatile("lock;cmpxchg16b\t%1" + : "=@cce" (res), "+m" (*ptr), "+a" (old_low), "+d" (old_high) : "b"(new_low), "c" (new_high) : "memory", "cc"); if (res == 0) { @@ -742,8 +742,8 @@ pmap_di_store_invl(struct pmap_invl_gen *ptr, struct p old_low = old_val->gen; old_high = (uintptr_t)old_val->next; - __asm volatile("lock;cmpxchg16b\t%1;sete\t%0" - : "=r" (res), "+m" (*ptr), "+a" (old_low), "+d" (old_high) + __asm volatile("lock;cmpxchg16b\t%1" + : "=@cce" (res), "+m" (*ptr), "+a" (old_low), "+d" (old_high) : "b"(new_low), "c" (new_high) : "memory", "cc"); return (res); From owner-svn-src-head@freebsd.org Fri Feb 28 20:29:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 585B024474E; Fri, 28 Feb 2020 20:29:54 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Th3k0y19z4JyZ; Fri, 28 Feb 2020 20:29:54 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E480075B9; Fri, 28 Feb 2020 20:29:53 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01SKTrfJ042546; Fri, 28 Feb 2020 20:29:53 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SKTruW042544; Fri, 28 Feb 2020 20:29:53 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202002282029.01SKTruW042544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Fri, 28 Feb 2020 20:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358443 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358443 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 20:29:54 -0000 Author: jeff Date: Fri Feb 28 20:29:53 2020 New Revision: 358443 URL: https://svnweb.freebsd.org/changeset/base/358443 Log: Eliminate object locking in zfs where possible with the new lockless grab APIs. Reviewed by: kib, markj, mmacy Differential Revision: https://reviews.freebsd.org/D23848 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Feb 28 18:35:36 2020 (r358442) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Feb 28 20:29:53 2020 (r358443) @@ -1738,11 +1738,10 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_ #endif vmobj = ma[0]->object; - zfs_vmobject_wlock(vmobj); db = dbp[0]; for (i = 0; i < *rbehind; i++) { - m = vm_page_grab(vmobj, ma[0]->pindex - 1 - i, + m = vm_page_grab_unlocked(vmobj, ma[0]->pindex - 1 - i, VM_ALLOC_NORMAL | VM_ALLOC_NOWAIT | VM_ALLOC_SBUSY | VM_ALLOC_IGN_SBUSY); if (m == NULL) @@ -1857,7 +1856,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_ } for (i = 0; i < *rahead; i++) { - m = vm_page_grab(vmobj, ma[count - 1]->pindex + 1 + i, + m = vm_page_grab_unlocked(vmobj, ma[count - 1]->pindex + 1 + i, VM_ALLOC_NORMAL | VM_ALLOC_NOWAIT | VM_ALLOC_SBUSY | VM_ALLOC_IGN_SBUSY); if (m == NULL) @@ -1889,7 +1888,6 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_ vm_page_sunbusy(m); } *rahead = i; - zfs_vmobject_wunlock(vmobj); dmu_buf_rele_array(dbp, numbufs, FTAG); return (0); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Feb 28 18:35:36 2020 (r358442) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Feb 28 20:29:53 2020 (r358443) @@ -410,10 +410,10 @@ page_busy(vnode_t *vp, int64_t start, int64_t off, int nbytes = end - off; obj = vp->v_object; - zfs_vmobject_assert_wlocked(obj); - vm_page_grab_valid(&pp, obj, OFF_TO_IDX(start), VM_ALLOC_NOCREAT | - VM_ALLOC_SBUSY | VM_ALLOC_NORMAL | VM_ALLOC_IGN_SBUSY); + vm_page_grab_valid_unlocked(&pp, obj, OFF_TO_IDX(start), + VM_ALLOC_NOCREAT | VM_ALLOC_SBUSY | VM_ALLOC_NORMAL | + VM_ALLOC_IGN_SBUSY); if (pp != NULL) { ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); vm_object_pip_add(obj, 1); @@ -439,10 +439,9 @@ page_wire(vnode_t *vp, int64_t start) vm_page_t m; obj = vp->v_object; - zfs_vmobject_assert_wlocked(obj); - - vm_page_grab_valid(&m, obj, OFF_TO_IDX(start), VM_ALLOC_NOCREAT | - VM_ALLOC_WIRED | VM_ALLOC_IGN_SBUSY | VM_ALLOC_NOBUSY); + vm_page_grab_valid_unlocked(&m, obj, OFF_TO_IDX(start), + VM_ALLOC_NOCREAT | VM_ALLOC_WIRED | VM_ALLOC_IGN_SBUSY | + VM_ALLOC_NOBUSY); return (m); } @@ -475,28 +474,22 @@ update_pages(vnode_t *vp, int64_t start, int len, objs ASSERT(obj != NULL); off = start & PAGEOFFSET; - zfs_vmobject_wlock(obj); vm_object_pip_add(obj, 1); for (start &= PAGEMASK; len > 0; start += PAGESIZE) { vm_page_t pp; int nbytes = imin(PAGESIZE - off, len); if ((pp = page_busy(vp, start, off, nbytes)) != NULL) { - zfs_vmobject_wunlock(obj); - va = zfs_map_page(pp, &sf); (void) dmu_read(os, oid, start+off, nbytes, va+off, DMU_READ_PREFETCH);; zfs_unmap_page(sf); - - zfs_vmobject_wlock(obj); page_unbusy(pp); } len -= nbytes; off = 0; } vm_object_pip_wakeup(obj); - zfs_vmobject_wunlock(obj); } /* @@ -528,29 +521,31 @@ mappedread_sf(vnode_t *vp, int nbytes, uio_t *uio) ASSERT(obj != NULL); ASSERT((uio->uio_loffset & PAGEOFFSET) == 0); - zfs_vmobject_wlock(obj); for (start = uio->uio_loffset; len > 0; start += PAGESIZE) { int bytes = MIN(PAGESIZE, len); - pp = vm_page_grab(obj, OFF_TO_IDX(start), VM_ALLOC_SBUSY | - VM_ALLOC_NORMAL | VM_ALLOC_IGN_SBUSY); + pp = vm_page_grab_unlocked(obj, OFF_TO_IDX(start), + VM_ALLOC_SBUSY | VM_ALLOC_NORMAL | VM_ALLOC_IGN_SBUSY); if (vm_page_none_valid(pp)) { - zfs_vmobject_wunlock(obj); va = zfs_map_page(pp, &sf); error = dmu_read(os, zp->z_id, start, bytes, va, DMU_READ_PREFETCH); if (bytes != PAGESIZE && error == 0) bzero(va + bytes, PAGESIZE - bytes); zfs_unmap_page(sf); - zfs_vmobject_wlock(obj); if (error == 0) { vm_page_valid(pp); vm_page_activate(pp); + vm_page_sunbusy(pp); + } else { + zfs_vmobject_wlock(obj); + if (!vm_page_wired(pp) && pp->valid == 0 && + vm_page_busy_tryupgrade(pp)) + vm_page_free(pp); + else + vm_page_sunbusy(pp); + zfs_vmobject_wunlock(obj); } - vm_page_sunbusy(pp); - if (error != 0 && !vm_page_wired(pp) && - pp->valid == 0 && vm_page_tryxbusy(pp)) - vm_page_free(pp); } else { ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); vm_page_sunbusy(pp); @@ -561,7 +556,6 @@ mappedread_sf(vnode_t *vp, int nbytes, uio_t *uio) uio->uio_offset += bytes; len -= bytes; } - zfs_vmobject_wunlock(obj); return (error); } @@ -592,7 +586,6 @@ mappedread(vnode_t *vp, int nbytes, uio_t *uio) start = uio->uio_loffset; off = start & PAGEOFFSET; - zfs_vmobject_wlock(obj); for (start &= PAGEMASK; len > 0; start += PAGESIZE) { vm_page_t pp; uint64_t bytes = MIN(PAGESIZE - off, len); @@ -601,7 +594,6 @@ mappedread(vnode_t *vp, int nbytes, uio_t *uio) struct sf_buf *sf; caddr_t va; - zfs_vmobject_wunlock(obj); va = zfs_map_page(pp, &sf); #ifdef illumos error = uiomove(va + off, bytes, UIO_READ, uio); @@ -609,20 +601,16 @@ mappedread(vnode_t *vp, int nbytes, uio_t *uio) error = vn_io_fault_uiomove(va + off, bytes, uio); #endif zfs_unmap_page(sf); - zfs_vmobject_wlock(obj); page_unwire(pp); } else { - zfs_vmobject_wunlock(obj); error = dmu_read_uio_dbuf(sa_get_db(zp->z_sa_hdl), uio, bytes); - zfs_vmobject_wlock(obj); } len -= bytes; off = 0; if (error) break; } - zfs_vmobject_wunlock(obj); return (error); } From owner-svn-src-head@freebsd.org Fri Feb 28 20:30:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E2922447FD; Fri, 28 Feb 2020 20:30:55 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Th4t6WZQz4M8R; Fri, 28 Feb 2020 20:30:54 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 315A975E8; Fri, 28 Feb 2020 20:30:54 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01SKUsO0044937; Fri, 28 Feb 2020 20:30:54 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SKUs41044936; Fri, 28 Feb 2020 20:30:54 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202002282030.01SKUs41044936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Fri, 28 Feb 2020 20:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358444 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358444 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 20:30:55 -0000 Author: jeff Date: Fri Feb 28 20:30:53 2020 New Revision: 358444 URL: https://svnweb.freebsd.org/changeset/base/358444 Log: Simplify vref() code in object_reference. The local temporary is no longer necessary. Fix formatting errors. Reported by: mjg Discussed with: kib Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Fri Feb 28 20:29:53 2020 (r358443) +++ head/sys/vm/vm_object.c Fri Feb 28 20:30:53 2020 (r358444) @@ -484,7 +484,6 @@ vm_object_allocate_anon(vm_pindex_t size, vm_object_t static void vm_object_reference_vnode(vm_object_t object) { - struct vnode *vp; u_int old; /* @@ -494,10 +493,8 @@ vm_object_reference_vnode(vm_object_t object) if (!refcount_acquire_if_gt(&object->ref_count, 0)) { VM_OBJECT_RLOCK(object); old = refcount_acquire(&object->ref_count); - if (object->type == OBJT_VNODE && old == 0) { - vp = object->handle; - vref(vp); - } + if (object->type == OBJT_VNODE && old == 0) + vref(object->handle); VM_OBJECT_RUNLOCK(object); } } @@ -532,13 +529,12 @@ vm_object_reference(vm_object_t object) void vm_object_reference_locked(vm_object_t object) { - struct vnode *vp; u_int old; VM_OBJECT_ASSERT_LOCKED(object); old = refcount_acquire(&object->ref_count); - if (object->type == OBJT_VNODE && old == 0) { - vp = object->handle; vref(vp); } + if (object->type == OBJT_VNODE && old == 0) + vref(object->handle); KASSERT((object->flags & OBJ_DEAD) == 0, ("vm_object_reference: Referenced dead object.")); } From owner-svn-src-head@freebsd.org Fri Feb 28 20:32:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B5FA244A20; Fri, 28 Feb 2020 20:32:36 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Th6q62K1z4Qht; Fri, 28 Feb 2020 20:32:35 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C343777C; Fri, 28 Feb 2020 20:32:35 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01SKWZcM048037; Fri, 28 Feb 2020 20:32:35 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SKWZUd048036; Fri, 28 Feb 2020 20:32:35 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202002282032.01SKWZUd048036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Fri, 28 Feb 2020 20:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358445 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358445 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 20:32:36 -0000 Author: jeff Date: Fri Feb 28 20:32:35 2020 New Revision: 358445 URL: https://svnweb.freebsd.org/changeset/base/358445 Log: Support the NOCREAT flag for grab_valid_unlocked. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D23865 Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Feb 28 20:30:53 2020 (r358444) +++ head/sys/vm/vm_page.c Fri Feb 28 20:32:35 2020 (r358445) @@ -4639,6 +4639,10 @@ vm_page_grab_valid_unlocked(vm_page_t *mp, vm_object_t } vm_page_busy_release(m); } + if ((allocflags & VM_ALLOC_NOCREAT) != 0) { + *mp = NULL; + return (VM_PAGER_FAIL); + } VM_OBJECT_WLOCK(object); error = vm_page_grab_valid(mp, object, pindex, allocflags); VM_OBJECT_WUNLOCK(object); From owner-svn-src-head@freebsd.org Fri Feb 28 20:33:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AB8D244AB8; Fri, 28 Feb 2020 20:33:29 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Th7s34FNz4Sgl; Fri, 28 Feb 2020 20:33:29 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D55B7786; Fri, 28 Feb 2020 20:33:29 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01SKXT2f048142; Fri, 28 Feb 2020 20:33:29 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SKXTYn048141; Fri, 28 Feb 2020 20:33:29 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202002282033.01SKXTYn048141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Fri, 28 Feb 2020 20:33:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358446 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358446 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 20:33:29 -0000 Author: jeff Date: Fri Feb 28 20:33:28 2020 New Revision: 358446 URL: https://svnweb.freebsd.org/changeset/base/358446 Log: Use unlocked grab for uipc_shm/tmpfs. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D23865 Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Fri Feb 28 20:32:35 2020 (r358445) +++ head/sys/kern/uipc_shm.c Fri Feb 28 20:33:28 2020 (r358446) @@ -176,23 +176,25 @@ uiomove_object_page(vm_object_t obj, size_t len, struc offset = uio->uio_offset & PAGE_MASK; tlen = MIN(PAGE_SIZE - offset, len); - VM_OBJECT_WLOCK(obj); + rv = vm_page_grab_valid_unlocked(&m, obj, idx, + VM_ALLOC_SBUSY | VM_ALLOC_IGN_SBUSY | VM_ALLOC_NOCREAT); + if (rv == VM_PAGER_OK) + goto found; /* * Read I/O without either a corresponding resident page or swap * page: use zero_region. This is intended to avoid instantiating * pages on read from a sparse region. */ - if (uio->uio_rw == UIO_READ && vm_page_lookup(obj, idx) == NULL && + VM_OBJECT_WLOCK(obj); + m = vm_page_lookup(obj, idx); + if (uio->uio_rw == UIO_READ && m == NULL && !vm_pager_has_page(obj, idx, NULL, NULL)) { VM_OBJECT_WUNLOCK(obj); return (uiomove(__DECONST(void *, zero_region), tlen, uio)); } /* - * Parallel reads of the page content from disk are prevented - * by exclusive busy. - * * Although the tmpfs vnode lock is held here, it is * nonetheless safe to sleep waiting for a free page. The * pageout daemon does not need to acquire the tmpfs vnode @@ -208,6 +210,8 @@ uiomove_object_page(vm_object_t obj, size_t len, struc return (EIO); } VM_OBJECT_WUNLOCK(obj); + +found: error = uiomove_fromphys(&m, offset, tlen, uio); if (uio->uio_rw == UIO_WRITE && error == 0) vm_page_set_dirty(m); From owner-svn-src-head@freebsd.org Fri Feb 28 20:34:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0653244B52; Fri, 28 Feb 2020 20:34:31 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Th935lnQz4Vtb; Fri, 28 Feb 2020 20:34:31 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF3887787; Fri, 28 Feb 2020 20:34:31 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01SKYVjW048242; Fri, 28 Feb 2020 20:34:31 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SKYUC0048237; Fri, 28 Feb 2020 20:34:30 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202002282034.01SKYUC0048237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Fri, 28 Feb 2020 20:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358447 - in head/sys: dev/drm2/ttm dev/md kern vm X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: in head/sys: dev/drm2/ttm dev/md kern vm X-SVN-Commit-Revision: 358447 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 20:34:32 -0000 Author: jeff Date: Fri Feb 28 20:34:30 2020 New Revision: 358447 URL: https://svnweb.freebsd.org/changeset/base/358447 Log: Convert a few triviail consumers to the new unlocked grab API. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D23847 Modified: head/sys/dev/drm2/ttm/ttm_tt.c head/sys/dev/md/md.c head/sys/kern/kern_exec.c head/sys/kern/kern_sendfile.c head/sys/kern/vfs_bio.c head/sys/vm/vm_glue.c Modified: head/sys/dev/drm2/ttm/ttm_tt.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_tt.c Fri Feb 28 20:33:28 2020 (r358446) +++ head/sys/dev/drm2/ttm/ttm_tt.c Fri Feb 28 20:34:30 2020 (r358447) @@ -285,24 +285,24 @@ int ttm_tt_swapin(struct ttm_tt *ttm) obj = ttm->swap_storage; - VM_OBJECT_WLOCK(obj); vm_object_pip_add(obj, 1); for (i = 0; i < ttm->num_pages; ++i) { - rv = vm_page_grab_valid(&from_page, obj, i, - VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY); + rv = vm_page_grab_valid_unlocked(&from_page, obj, i, + VM_ALLOC_NORMAL | VM_ALLOC_SBUSY | VM_ALLOC_IGN_SBUSY); if (rv != VM_PAGER_OK) { ret = -EIO; goto err_ret; } to_page = ttm->pages[i]; if (unlikely(to_page == NULL)) { + vm_page_sunbusy(from_page); ret = -ENOMEM; goto err_ret; } pmap_copy_page(from_page, to_page); + vm_page_sunbusy(from_page); } vm_object_pip_wakeup(obj); - VM_OBJECT_WUNLOCK(obj); if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP)) vm_object_deallocate(obj); @@ -312,7 +312,6 @@ int ttm_tt_swapin(struct ttm_tt *ttm) err_ret: vm_object_pip_wakeup(obj); - VM_OBJECT_WUNLOCK(obj); return (ret); } Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Fri Feb 28 20:33:28 2020 (r358446) +++ head/sys/dev/md/md.c Fri Feb 28 20:34:30 2020 (r358447) @@ -1060,9 +1060,7 @@ mdstart_swap(struct md_s *sc, struct bio *bp) vm_object_pip_add(sc->object, 1); for (i = bp->bio_offset / PAGE_SIZE; i <= lastp; i++) { len = ((i == lastp) ? lastend : PAGE_SIZE) - offs; - VM_OBJECT_WLOCK(sc->object); - m = vm_page_grab(sc->object, i, VM_ALLOC_SYSTEM); - VM_OBJECT_WUNLOCK(sc->object); + m = vm_page_grab_unlocked(sc->object, i, VM_ALLOC_SYSTEM); if (bp->bio_cmd == BIO_READ) { if (vm_page_all_valid(m)) rv = VM_PAGER_OK; Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Fri Feb 28 20:33:28 2020 (r358446) +++ head/sys/kern/kern_exec.c Fri Feb 28 20:34:30 2020 (r358447) @@ -984,14 +984,16 @@ exec_map_first_page(struct image_params *imgp) object = imgp->vp->v_object; if (object == NULL) return (EACCES); - VM_OBJECT_WLOCK(object); #if VM_NRESERVLEVEL > 0 - vm_object_color(object, 0); + if ((object->flags & OBJ_COLORED) == 0) { + VM_OBJECT_WLOCK(object); + vm_object_color(object, 0); + VM_OBJECT_WUNLOCK(object); + } #endif - error = vm_page_grab_valid(&m, object, 0, + error = vm_page_grab_valid_unlocked(&m, object, 0, VM_ALLOC_COUNT(VM_INITIAL_PAGEIN) | VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_WIRED); - VM_OBJECT_WUNLOCK(object); if (error != VM_PAGER_OK) return (EIO); Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Fri Feb 28 20:33:28 2020 (r358446) +++ head/sys/kern/kern_sendfile.c Fri Feb 28 20:34:30 2020 (r358447) @@ -350,6 +350,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i { vm_page_t *pa = sfio->pa; int grabbed; + bool locked; *nios = 0; flags = (flags & SF_NODISKIO) ? VM_ALLOC_NOWAIT : 0; @@ -358,9 +359,9 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i * First grab all the pages and wire them. Note that we grab * only required pages. Readahead pages are dealt with later. */ - VM_OBJECT_WLOCK(obj); + locked = false; - grabbed = vm_page_grab_pages(obj, OFF_TO_IDX(off), + grabbed = vm_page_grab_pages_unlocked(obj, OFF_TO_IDX(off), VM_ALLOC_NORMAL | VM_ALLOC_WIRED | flags, pa, npages); if (grabbed < npages) { for (int i = grabbed; i < npages; i++) @@ -380,6 +381,10 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i i++; continue; } + if (!locked) { + VM_OBJECT_WLOCK(obj); + locked = true; + } /* * Next page is invalid. Check if it belongs to pager. It @@ -480,7 +485,8 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i (*nios)++; } - VM_OBJECT_WUNLOCK(obj); + if (locked) + VM_OBJECT_WUNLOCK(obj); if (*nios == 0 && npages != 0) SFSTAT_INC(sf_noiocnt); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Fri Feb 28 20:33:28 2020 (r358446) +++ head/sys/kern/vfs_bio.c Fri Feb 28 20:34:30 2020 (r358447) @@ -3046,13 +3046,11 @@ vfs_vmio_extend(struct buf *bp, int desiredpages, int * deadlocks once allocbuf() is called after * pages are vfs_busy_pages(). */ - VM_OBJECT_WLOCK(obj); - (void)vm_page_grab_pages(obj, + (void)vm_page_grab_pages_unlocked(obj, OFF_TO_IDX(bp->b_offset) + bp->b_npages, VM_ALLOC_SYSTEM | VM_ALLOC_IGN_SBUSY | VM_ALLOC_NOBUSY | VM_ALLOC_WIRED, &bp->b_pages[bp->b_npages], desiredpages - bp->b_npages); - VM_OBJECT_WUNLOCK(obj); bp->b_npages = desiredpages; } @@ -5237,11 +5235,13 @@ next_page:; } end_pages: - VM_OBJECT_WLOCK(object); redo = false; for (i = 0; i < count; i++) { - vm_page_sunbusy(ma[i]); - ma[i] = vm_page_grab(object, ma[i]->pindex, VM_ALLOC_NORMAL); + if (vm_page_busy_tryupgrade(ma[i]) == 0) { + vm_page_sunbusy(ma[i]); + ma[i] = vm_page_grab_unlocked(object, ma[i]->pindex, + VM_ALLOC_NORMAL); + } /* * Since the pages were only sbusy while neither the @@ -5259,7 +5259,6 @@ end_pages: if (!vm_page_all_valid(ma[i])) redo = true; } - VM_OBJECT_WUNLOCK(object); if (redo && error == 0) goto again; return (error != 0 ? VM_PAGER_ERROR : VM_PAGER_OK); Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Fri Feb 28 20:33:28 2020 (r358446) +++ head/sys/vm/vm_glue.c Fri Feb 28 20:34:30 2020 (r358447) @@ -222,10 +222,8 @@ vm_imgact_hold_page(vm_object_t object, vm_ooffset_t o vm_pindex_t pindex; pindex = OFF_TO_IDX(offset); - VM_OBJECT_WLOCK(object); - (void)vm_page_grab_valid(&m, object, pindex, + (void)vm_page_grab_valid_unlocked(&m, object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_WIRED); - VM_OBJECT_WUNLOCK(object); return (m); } From owner-svn-src-head@freebsd.org Fri Feb 28 20:43:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6295D245103; Fri, 28 Feb 2020 20:43:38 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ThMY0YbZz3LmH; Fri, 28 Feb 2020 20:43:37 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3FE537958; Fri, 28 Feb 2020 20:43:36 +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 01SKhaxK054121; Fri, 28 Feb 2020 20:43:36 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SKhaj9054120; Fri, 28 Feb 2020 20:43:36 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <202002282043.01SKhaj9054120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 28 Feb 2020 20:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358448 - head/usr.sbin/services_mkdb X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/usr.sbin/services_mkdb X-SVN-Commit-Revision: 358448 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 20:43:38 -0000 Author: pfg Date: Fri Feb 28 20:43:35 2020 New Revision: 358448 URL: https://svnweb.freebsd.org/changeset/base/358448 Log: /etc/services: attempt to bring the database to this century 1/2. This is the result of splitting r358153 in two, in order to avoid a build system bug and being able to merge the change to previous releases.. Document better this file, updating the URL to the IANA registry and closely match the official services. For system ports (0 to 1023) we now try to follow the registry closely, noting some historical differences where applicable. As a side effect: drop references to unofficial Kerberos IV which was EOL'ed on Oct 2006[1]. While it is conceivable some people may still use it in some very old FreeBSD machines that can't be replaced easily, the use of it is considered a security risk. Also drop the unofficial netatalk, which we supported long ago in the kernel but was dropped long ago. Leave for now smtps, even though it conflicts with IANA's submissions. The change should have very little visibility, if any, but should be a step closer to the current IANA database. [1] https://web.mit.edu/kerberos/krb4-end-of-life.html MFC after: 2 weeks Modified: head/usr.sbin/services_mkdb/services Modified: head/usr.sbin/services_mkdb/services ============================================================================== --- head/usr.sbin/services_mkdb/services Fri Feb 28 20:34:30 2020 (r358447) +++ head/usr.sbin/services_mkdb/services Fri Feb 28 20:43:35 2020 (r358448) @@ -1,65 +1,62 @@ # # Network services, Internet style # -# Note that it is presently the policy of IANA to assign a single well-known -# port number for both TCP and UDP; hence, most entries here have two entries -# even if the protocol doesn't support UDP operations. +# Service names and port numbers are used to distinguish between different +# services that run over transport protocols such as TCP, UDP, DCCP, and +# SCTP. # # The latest IANA port assignments can be gotten from # -# http://www.iana.org/assignments/port-numbers +# https://www.iana.org/assignments/service-names-port-numbers/ # -# The Well Known Ports are those from 0 through 1023. -# The Registered Ports are those from 1024 through 49151 -# The Dynamic and/or Private Ports are those from 49152 through 65535 +# System Ports are those from 0 through 1023. +# User Ports are those from 1024 through 49151. +# Dynamic and/or Private Ports are those from 49152 through 65535. # -# Kerberos services are for Kerberos v4, and are unofficial. Sites running -# v5 should uncomment v5 entries and comment v4 entries. +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, most entries here have two entries +# even if the protocol doesn't support UDP operations. # # $FreeBSD$ # From: @(#)services 5.8 (Berkeley) 5/9/91 # # WELL KNOWN PORT NUMBERS # -rtmp 1/ddp #Routing Table Maintenance Protocol tcpmux 1/tcp #TCP Port Service Multiplexer tcpmux 1/udp #TCP Port Service Multiplexer -nbp 2/ddp #Name Binding Protocol compressnet 2/tcp #Management Utility compressnet 2/udp #Management Utility compressnet 3/tcp #Compression Process compressnet 3/udp #Compression Process -echo 4/ddp #AppleTalk Echo Protocol rje 5/tcp #Remote Job Entry rje 5/udp #Remote Job Entry -zip 6/ddp #Zone Information Protocol -echo 7/sctp echo 7/tcp echo 7/udp -discard 9/sctp sink null +echo 7/sctp discard 9/tcp sink null discard 9/udp sink null +discard 9/sctp sink null systat 11/tcp users #Active Users systat 11/udp users #Active Users -daytime 13/sctp daytime 13/tcp daytime 13/udp +daytime 13/sctp qotd 17/tcp quote #Quote of the Day qotd 17/udp quote #Quote of the Day msp 18/tcp #Message Send Protocol msp 18/udp #Message Send Protocol -chargen 19/sctp ttytst source #Character Generator chargen 19/tcp ttytst source #Character Generator chargen 19/udp ttytst source #Character Generator -ftp-data 20/sctp #File Transfer [Default Data] +chargen 19/sctp ttytst source #Character Generator ftp-data 20/tcp #File Transfer [Default Data] ftp-data 20/udp #File Transfer [Default Data] -ftp 21/sctp #File Transfer [Control] +ftp-data 20/sctp #File Transfer [Default Data] ftp 21/tcp #File Transfer [Control] ftp 21/udp #File Transfer [Control] -ssh 22/sctp #Secure Shell Login +ftp 21/sctp #File Transfer [Control] ssh 22/tcp #Secure Shell Login ssh 22/udp #Secure Shell Login +ssh 22/sctp #Secure Shell Login telnet 23/tcp telnet 23/udp # 24/tcp any private mail system @@ -114,24 +111,22 @@ isi-gl 55/tcp #ISI Graphics Language isi-gl 55/udp #ISI Graphics Language xns-auth 56/tcp #XNS Authentication xns-auth 56/udp #XNS Authentication -# 57/tcp any private terminal access -# 57/udp any private terminal access +# 57/tcp any private terminal access +# 57/udp any private terminal access xns-mail 58/tcp #XNS Mail xns-mail 58/udp #XNS Mail # 59/tcp any private file service # 59/udp any private file service -ni-mail 61/tcp #NI MAIL -ni-mail 61/udp #NI MAIL acas 62/tcp #ACA Services acas 62/udp #ACA Services -whois++ 63/tcp -whois++ 63/udp +whoispp 63/tcp whois++ +whoispp 63/udp whois++ covia 64/tcp #Communications Integrator (CI) covia 64/udp #Communications Integrator (CI) tacacs-ds 65/tcp #TACACS-Database Service tacacs-ds 65/udp #TACACS-Database Service -sql*net 66/tcp #Oracle SQL*NET -sql*net 66/udp #Oracle SQL*NET +sql-net 66/tcp sql*net #Oracle SQL*NET / replacement +sql-net 66/udp sql*net #Oracle SQL*NET replacement bootps 67/tcp dhcps #Bootstrap Protocol Server bootps 67/udp dhcps #Bootstrap Protocol Server bootpc 68/tcp dhcpc #Bootstrap Protocol Client @@ -158,11 +153,9 @@ vettcp 78/tcp vettcp 78/udp finger 79/tcp finger 79/udp -http 80/sctp www www-http #World Wide Web HTTP http 80/tcp www www-http #World Wide Web HTTP http 80/udp www www-http #World Wide Web HTTP -hosts2-ns 81/tcp #HOSTS2 Name Server -hosts2-ns 81/udp #HOSTS2 Name Server +http 80/sctp www www-http #World Wide Web HTTP xfer 82/tcp #XFER Utility xfer 82/udp #XFER Utility mit-ml-dev 83/tcp #MIT ML Device @@ -195,8 +188,8 @@ dixie 96/tcp #DIXIE Protocol Specification dixie 96/udp #DIXIE Protocol Specification swift-rvf 97/tcp #Swift Remote Virtural File Protocol swift-rvf 97/udp #Swift Remote Virtural File Protocol -tacnews 98/tcp #TAC News, Unofficial: Red Hat linuxconf -tacnews 98/udp #TAC News, Unofficial: Red Hat linuxconf +tacnews 98/tcp #TAC News +tacnews 98/udp #TAC News metagram 99/tcp #Metagram Relay metagram 99/udp #Metagram Relay newacct 100/tcp #[unauthorized use] @@ -248,8 +241,8 @@ ansatrader 124/tcp #ANSA REX Trader ansatrader 124/udp #ANSA REX Trader locus-map 125/tcp #Locus PC-Interface Net Map Ser locus-map 125/udp #Locus PC-Interface Net Map Ser -unitary 126/tcp #Unisys Unitary Login -unitary 126/udp #Unisys Unitary Login +nxedit 126/tcp #NXEdit +nxedit 126/udp #NXEdit locus-con 127/tcp #Locus PC-Interface Conn Server locus-con 127/udp #Locus PC-Interface Conn Server gss-xlicen 128/tcp #GSS X License Verification @@ -266,8 +259,8 @@ statsrv 133/tcp #Statistics Service statsrv 133/udp #Statistics Service ingres-net 134/tcp #INGRES-NET Service ingres-net 134/udp #INGRES-NET Service -loc-srv 135/tcp epmap #Location Service -loc-srv 135/udp epmap #Location Service +epmap 135/tcp #DCE endpoint resolution +epmap 135/udp #DCE endpoint resolution profile 136/tcp #PROFILE Naming System profile 136/udp #PROFILE Naming System netbios-ns 137/tcp #NETBIOS Name Service @@ -284,20 +277,16 @@ bl-idm 142/tcp #Britton-Lee IDM bl-idm 142/udp #Britton-Lee IDM imap 143/tcp imap2 imap4 #Interim Mail Access Protocol v2 imap 143/udp imap2 imap4 #Interim Mail Access Protocol v2 -NeWS 144/tcp # Window System -NeWS 144/udp # Window System -#PROBLEMS!============================================================== -#uma 144/tcp #Universal Management Architecture -#uma 144/udp #Universal Management Architecture -#PROBLEMS!============================================================== +uma 144/tcp #Universal Management Architecture +uma 144/udp #Universal Management Architecture uaac 145/tcp #UAAC Protocol uaac 145/udp #UAAC Protocol iso-tp0 146/tcp iso-tp0 146/udp iso-ip 147/tcp iso-ip 147/udp -cronus 148/tcp jargon #CRONUS-SUPPORT -cronus 148/udp jargon #CRONUS-SUPPORT +jargon 148/tcp #Jargon +jargon 148/udp #Jargon aed-512 149/tcp #AED 512 Emulation Service aed-512 149/udp #AED 512 Emulation Service sql-net 150/tcp @@ -356,11 +345,11 @@ genrad-mux 176/tcp genrad-mux 176/udp xdmcp 177/tcp #X Display Manager Control Protocol xdmcp 177/udp #X Display Manager Control Protocol -NextStep 178/tcp nextstep NeXTStep #NextStep Window Server -NextStep 178/udp nextstep NeXTStep #NextStep Window Server -bgp 179/sctp #Border Gateway Protocol +nextstep 178/tcp #NextStep Window Server +nextstep 178/udp #NextStep Window Server bgp 179/tcp #Border Gateway Protocol bgp 179/udp #Border Gateway Protocol +bgp 179/sctp #Border Gateway Protocol ris 180/tcp #Intergraph ris 180/udp #Intergraph unify 181/tcp @@ -421,14 +410,10 @@ at-8 208/tcp #AppleTalk Unused at-8 208/udp #AppleTalk Unused qmtp 209/tcp #The Quick Mail Transfer Protocol qmtp 209/udp #The Quick Mail Transfer Protocol -#PROBLEMS!============================================================== -#tam 209/tcp #Trivial Authenticated Mail Protocol -#tam 209/udp #Trivial Authenticated Mail Protocol -#PROBLEMS!============================================================== -z39.50 210/tcp wais #ANSI Z39.50 -z39.50 210/udp wais #ANSI Z39.50 -914c/g 211/tcp #Texas Instruments 914C/G Terminal -914c/g 211/udp #Texas Instruments 914C/G Terminal +z39-50 210/tcp z39.50 wais #ANSI Z39.50 +z39-50 210/udp z39.50 wais #ANSI Z39.50 +914c-g 211/tcp 914c/g #Texas Instruments 914C/G Terminal +914c-g 211/udp 914c/g #Texas Instruments 914C/G Terminal anet 212/tcp #ATEXSSTR anet 212/udp #ATEXSSTR ipx 213/tcp @@ -459,14 +444,14 @@ direct 242/tcp direct 242/udp sur-meas 243/tcp #Survey Measurement sur-meas 243/udp #Survey Measurement -dayna 244/tcp -dayna 244/udp +inbusiness 244/tcp +inbusiness 244/udp link 245/tcp link 245/udp dsp3270 246/tcp #Display Systems Protocol dsp3270 246/udp #Display Systems Protocol -subntbcst_tftp 247/tcp #subntbcst_tftp -subntbcst_tftp 247/udp #subntbcst_tftp +subntbcst-tftp 247/tcp subntbcst_tftp #subntbcst_tftp +subntbcst-tftp 247/udp subntbcst_tftp #subntbcst_tftp bhfhs 248/tcp bhfhs 248/udp # 249-255 reserved @@ -494,7 +479,11 @@ td-service 267/tcp #Tobit David Service Layer td-service 267/udp #Tobit David Service Layer td-replica 268/tcp #Tobit David Replica td-replica 268/udp #Tobit David Replica -# 269-279 unassigned +manet 269/tcp #MANET Protocols [RFC5498] +manet 269/ucp #MANET Protocols [RFC5498] +gist 270/ucp #Q-mode encapsulation for [RFC5971] +pt-tls 271/tcp #Assessment (NEA) Posture +# 272-279 unassigned http-mgmt 280/tcp http-mgmt 280/udp personal-link 281/tcp @@ -541,9 +530,11 @@ pip 321/tcp pip 321/udp rtsps 322/tcp rtsps 322/udp -# 323-332 #unassigned -texar 333/tcp #Texar Security Port -texar 333/udp #Texar Security Port +rpki-rtr 323/tcp #Resource PKI to Router Protocol +rpki-rtr-tls 324/tcp #Resource PKI to Router Protocol over TLS +# 325-332 #unassigned +texar 333/tcp #Texar Security Port +texar 333/udp #Texar Security Port # 334-343 #unassigned pdap 344/tcp #Prospero Data Access Protocol pdap 344/udp #Prospero Data Access Protocol @@ -579,8 +570,8 @@ bhevent 357/tcp bhevent 357/udp shrinkwrap 358/tcp shrinkwrap 358/udp -tenebris_nts 359/tcp #Tenebris Network Trace Service -tenebris_nts 359/udp #Tenebris Network Trace Service +nsrmp 359/tcp #Network Security Risk Management Protocol +nsrmp 359/udp #Network Security Risk Management Protocol scoi2odialog 360/tcp scoi2odialog 360/udp semantix 361/tcp @@ -641,14 +632,14 @@ unidata-ldm 388/tcp #Unidata LDM Version 4 unidata-ldm 388/udp #Unidata LDM Version 4 ldap 389/tcp #Lightweight Directory Access Protocol ldap 389/udp #Lightweight Directory Access Protocol -uis 390/tcp -uis 390/udp +uis 390/tcp #UIS +uis 390/udp #UIS synotics-relay 391/tcp #SynOptics SNMP Relay Port synotics-relay 391/udp #SynOptics SNMP Relay Port synotics-broker 392/tcp #SynOptics Port Broker Port synotics-broker 392/udp #SynOptics Port Broker Port -dis 393/tcp #Data Interpretation System -dis 393/udp #Data Interpretation System +meta5 393/tcp #Meta5 +meta5 393/udp #Meta5 embl-ndt 394/tcp #EMBL Nucleic Data Transfer embl-ndt 394/udp #EMBL Nucleic Data Transfer netcp 395/tcp #NETscout Control Protocol @@ -661,8 +652,8 @@ kryptolan 398/tcp kryptolan 398/udp iso-tsap-c2 399/tcp #ISO-TSAP Class 2 iso-tsap-c2 399/udp #ISO-TSAP Class 2 -work-sol 400/tcp #Workstation Solutions -work-sol 400/udp #Workstation Solutions +osb-sd 400/tcp #Oracle Secure Backup +osb-sd 400/udp #Oracle Secure Backup ups 401/tcp #Uninterruptible Power Supply ups 401/udp #Uninterruptible Power Supply genie 402/tcp #Genie Protocol @@ -747,9 +738,9 @@ decvms-sysmgt 441/tcp decvms-sysmgt 441/udp cvc_hostd 442/tcp cvc_hostd 442/udp -https 443/sctp https 443/tcp https 443/udp +https 443/sctp snpp 444/tcp #Simple Network Paging Protocol snpp 444/udp #Simple Network Paging Protocol # [RFC1568] @@ -792,15 +783,16 @@ datasurfsrvsec 462/udp alpes 463/tcp alpes 463/udp # -kpasswd5 464/tcp # Kerberos (v5) -kpasswd5 464/udp # Kerberos (v5) +kpasswd 464/tcp kpasswd5 # Kerberos (v5) +kpasswd 464/udp kpasswd5 # Kerberos (v5) #PROBLEMS!============================================================== -# IANA has officially assigned these two ports as ``kpasswd'' -#kpasswd 464/tcp # Kerberos (v5) -#kpasswd 464/udp # Kerberos (v5) +# IANA has officially assigned these two ports +smtps 465/tcp #smtp protocol over TLS/SSL (was ssmtp) +smtps 465/udp #smtp protocol over TLS/SSL (was ssmtp) #PROBLEMS!============================================================== -smtps 465/tcp #smtp protocol over TLS/SSL (was ssmtp) -smtps 465/udp #smtp protocol over TLS/SSL (was ssmtp) +urd 465/tcp #URL Rendezvous Directory for SSM +submissions 465/tcp #Message Submission over TLS +igmpv3lite 465/udp #IGMP over UDP for SSM digital-vrc 466/tcp digital-vrc 466/udp mylex-mapd 467/tcp @@ -857,14 +849,14 @@ ticf-1 492/tcp #Transport Independent Convergence ticf-1 492/udp #Transport Independent Convergence for FNA ticf-2 493/tcp #Transport Independent Convergence for FNA ticf-2 493/udp #Transport Independent Convergence for FNA -pov-ray 494/tcp -pov-ray 494/udp +pov-ray 494/tcp #POV-Ray +pov-ray 494/udp #POV-Ray intecourier 495/tcp intecourier 495/udp pim-rp-disc 496/tcp pim-rp-disc 496/udp -dantz 497/tcp -dantz 497/udp +retrospect 497/tcp #Retrospect backup and restore service +retrospect 497/udp #Retrospect backup and restore service siam 498/tcp siam 498/udp iso-ill 499/tcp #ISO ILL Protocol @@ -964,8 +956,8 @@ netnews 532/tcp readnews netnews 532/udp readnews netwall 533/tcp #for emergency broadcasts netwall 533/udp #for emergency broadcasts -mm-admin 534/tcp #MegaMedia Admin -mm-admin 534/udp #MegaMedia Admin +windream 534/tcp #windream Admin +windream 534/udp #windream Admin iiop 535/tcp iiop 535/udp opalis-rdv 536/tcp @@ -1000,8 +992,8 @@ new-rwho 550/tcp new-who new-rwho 550/udp new-who cybercash 551/tcp cybercash 551/udp -deviceshare 552/tcp -deviceshare 552/udp +devshr-nts 552/tcp deviceshare +devshr-nts 552/udp deviceshare pirp 553/tcp pirp 553/udp rtsp 554/tcp #Real Time Stream Control Protocol @@ -1066,9 +1058,6 @@ philips-vc 583/tcp #Philips Video-Conferencing philips-vc 583/udp #Philips Video-Conferencing keyserver 584/tcp keyserver 584/udp -#imap4-ssl@585 never should have been allocated. See PR 46294. -#imap4-ssl 585/tcp #IMAP4+SSL (use of 585 is not recommended, -#imap4-ssl 585/udp # use 993 instead) password-chg 586/tcp password-chg 586/udp submission 587/tcp @@ -1147,8 +1136,8 @@ asf-rmcp 623/tcp #ASF Remote Management and Control asf-rmcp 623/udp #ASF Remote Management and Control Protocol cryptoadmin 624/tcp #Crypto Admin cryptoadmin 624/udp #Crypto Admin -dec_dlm 625/tcp #DEC DLM -dec_dlm 625/udp #DEC DLM +dec-dlm 625/tcp dec_dlm #DEC DLM +dec-dlm 625/udp dec_dlm #DEC DLM asia 626/tcp asia 626/udp passgo-tivoli 627/tcp #PassGo Tivoli @@ -1159,8 +1148,8 @@ qmqp 628/udp 3com-amp3 629/udp #3Com AMP3 rda 630/tcp rda 630/udp -ipp 631/tcp #IPP (Internet Printing Protocol) -ipp 631/udp #IPP (Internet Printing Protocol) +ipp 631/tcp ipps #IPP (Internet Printing Protocol) +ipp 631/udp ipps #IPP (Internet Printing Protocol) bmpp 632/tcp bmpp 632/udp servstat 633/tcp #Service Status update (Sterling Software) @@ -1327,14 +1316,17 @@ iris-xpcs 714/tcp #IRIS over XPCS iris-xpcs 714/udp #IRIS over XPCS iris-lwz 715/tcp iris-lwz 715/udp +pana 716/udp #PANA Messages +# 717-728 #unassigned netviewdm1 729/tcp #IBM NetView DM/6000 Server/Client netviewdm1 729/udp #IBM NetView DM/6000 Server/Client netviewdm2 730/tcp #IBM NetView DM/6000 send/tcp netviewdm2 730/udp #IBM NetView DM/6000 send/tcp netviewdm3 731/tcp #IBM NetView DM/6000 receive/tcp netviewdm3 731/udp #IBM NetView DM/6000 receive/tcp -netgw 741/tcp -netgw 741/udp +# 732-740 #unassigned +netgw 741/tcp #netGW +netgw 741/udp #netGW netrcs 742/tcp #Network based Rev. Cont. Sys. netrcs 742/udp #Network based Rev. Cont. Sys. flexlm 744/tcp #Flexible License Manager @@ -1345,18 +1337,11 @@ ris-cm 748/tcp #Russell Info Sci Calendar Manager ris-cm 748/udp #Russell Info Sci Calendar Manager kerberos-adm 749/tcp #Kerberos administration (v5) kerberos-adm 749/udp #Kerberos administration (v5) +rfile 750/tcp +loadav 750/udp kerberos-iv 750/udp kdc # Kerberos (v4) -kerberos-iv 750/tcp kdc # Kerberos (v4) -#PROBLEMS!======================================================== -#rfile 750/tcp -#loadav 750/udp -#PROBLEMS!======================================================== -kerberos_master 751/tcp # Kerberos `kadmin' (v4) -kerberos_master 751/udp # Kerberos `kadmin' (v4) -#PROBLEMS!======================================================== pump 751/tcp pump 751/udp -#PROBLEMS!======================================================== qrh 752/tcp qrh 752/udp rrh 753/tcp @@ -1366,19 +1351,14 @@ krb_prop 754/tcp krb5_prop # kerberos/v5 server pro tell 754/tcp #send #PROBLEMS!======================================================== tell 754/udp #send +# 755-757 #unassigned nlogin 758/tcp nlogin 758/udp con 759/tcp con 759/udp -krbupdate 760/tcp kreg # Kerberos (v4) registration -#PROBLEMS!======================================================== ns 760/tcp -#PROBLEMS!======================================================== ns 760/udp -kpasswd 761/tcp kpwd # Kerberos (v4) "passwd" -#PROBLEMS!======================================================== rxe 761/tcp -#PROBLEMS!======================================================== rxe 761/udp quotad 762/tcp quotad 762/udp @@ -1401,17 +1381,17 @@ cycleserv2 772/udp submit 773/tcp notify 773/udp rpasswd 774/tcp -acmaint_dbd 774/udp +acmaint-dbd 774/udp acmaint_dbd entomb 775/tcp -acmaint_transd 775/udp +acmaint-transd 775/udp acmaint_transd wpages 776/tcp wpages 776/udp multiling-http 777/tcp #Multiling HTTP multiling-http 777/udp #Multiling HTTP wpgs 780/tcp wpgs 780/udp -mdbs_daemon 800/tcp -mdbs_daemon 800/udp +mdbs-daemon 800/tcp mdbs_daemon +mdbs-daemon 800/udp mdbs_daemon device 801/tcp device 801/udp mbap-s 802/tcp # Modbus Application Protocol Secure @@ -1434,11 +1414,18 @@ dhcp-failover2 847/tcp #dhcp-failover 2 dhcp-failover2 847/udp #dhcp-failover 2 gdoi 848/tcp gdoi 848/udp +# 849-852 #unassigned +domain-s 853/tcp #DNS query-response protocol +domain-s 853/udp #DNS query-response protocol +# 855-859 #unassigned iscsi 860/tcp iscsi 860/udp owamp-control 861/tcp owamp-control 861/udp -supfilesrv 871/tcp # for SUP +twamp-control 862/tcp +twamp-control 862/udp +# 863-872 #unassigned +supfilesrv 871/tcp # for SUP rsync 873/tcp rsync 873/udp iclcnet-locate 886/tcp #ICL coNETion locate server @@ -1491,477 +1478,106 @@ puprouter 999/tcp puprouter 999/udp cadlock2 1000/tcp cadlock2 1000/udp +webpush 1001/tcp #HTTP Web Push surf 1010/tcp surf 1010/udp exp1 1021/tcp #RFC3692-style Experiment 1 (*) [RFC4727] exp1 1021/udp #RFC3692-style Experiment 1 (*) [RFC4727] +exp1 1021/sctp #RFC3692-style Experiment 1 (*) [RFC4727] exp2 1022/tcp #RFC3692-style Experiment 2 (*) [RFC4727] exp2 1022/udp #RFC3692-style Experiment 2 (*) [RFC4727] +exp2 1022/sctp #RFC3692-style Experiment 2 (*) [RFC4727] # # REGISTERED PORT NUMBERS # blackjack 1025/tcp #network blackjack blackjack 1025/udp #network blackjack -iad1 1030/tcp #BBN IAD -iad1 1030/udp #BBN IAD -iad2 1031/tcp #BBN IAD -iad2 1031/udp #BBN IAD -iad3 1032/tcp #BBN IAD -iad3 1032/udp #BBN IAD +cap 1026/tcp #Calendar Access Protocol +cap 1026/udp #Calendar Access Protocol +6a44 1027/udp #IPv6 Behind NAT44 CPEs +boinc-client 1043/tcp #BOINC Client Control +boinc-client 1043/udp #BOINC Client Control nim 1058/tcp nim 1058/udp nimreg 1059/tcp nimreg 1059/udp -instl_boots 1067/tcp #Installation Bootstrap Proto. Serv. -instl_boots 1067/udp #Installation Bootstrap Proto. Serv. -instl_bootc 1068/tcp #Installation Bootstrap Proto. Cli. -instl_bootc 1068/udp #Installation Bootstrap Proto. Cli. +instl-boots 1067/tcp instl_boots #Installation Bootstrap Proto. Serv. +instl-boots 1067/udp instl_boots #Installation Bootstrap Proto. Serv. +instl-bootc 1068/tcp instl_bootc #Installation Bootstrap Proto. Cli. +instl-bootc 1068/udp instl_bootc #Installation Bootstrap Proto. Cli. socks 1080/tcp socks 1080/udp -ansoft-lm-1 1083/tcp #Anasoft License Manager -ansoft-lm-1 1083/udp #Anasoft License Manager -ansoft-lm-2 1084/tcp #Anasoft License Manager -ansoft-lm-2 1084/udp #Anasoft License Manager webobjects 1085/tcp #Web Objects webobjects 1085/udp #Web Objects +ff-annunc 1089/tcp #FF Annunciation +ff-annunc 1089/udp #FF Annunciation +ff-fms 1090/tcp #FF Fieldbus Message Specification +ff-fms 1090/udp #FF Fieldbus Message Specification +ff-sm 1091/tcp #FF System Management +ff-sm 1091/udp #FF System Management +cnrprotocol 1096/tcp #Common Name Resolution Protocol +cnrprotocol 1096/udp #Common Name Resolution Protocol +rmiactivation 1098/tcp #RMI Activation +rmiactivation 1098/udp #RMI Activation +rmiregistry 1099/tcp #RMI Registry +rmiregistry 1099/udp #RMI Registry +mctp 1100/tcp #MCTP +mctp 1100/udp #MCTP kpop 1109/tcp #Unofficial kpop 1109/udp #Unofficial nfsd-status 1110/tcp #Cluster status info nfsd-keepalive 1110/udp #Client status info supfiledbg 1127/tcp # for SUP +c1222-acse 1153/tcp #ANSI C12.22 Port +c1222-acse 1153/udp #ANSI C12.22 Port nfa 1155/tcp #Network File Access nfa 1155/udp #Network File Access -cisco-ipsla 1167/sctp #Cisco IP SLAs Control Protocol cisco-ipsla 1167/tcp #Cisco IP SLAs Control Protocol cisco-ipsla 1167/udp #Cisco IP SLAs Control Protocol +cisco-ipsla 1167/sctp #Cisco IP SLAs Control Protocol +tripwire 1169/tcp #TRIPWIRE +tripwire 1169/udp #TRIPWIRE skkserv 1178/tcp #SKK (kanji input) +mysql-cluster 1186/tcp #MySQL Cluster Manager +mysql-cluster 1186/udp #MySQL Cluster Manager openvpn 1194/tcp #OpenVPN openvpn 1194/udp #OpenVPN -lupa 1212/tcp -lupa 1212/udp -nerv 1222/tcp #SNI R&D network -nerv 1222/udp #SNI R&D network -hermes 1248/tcp -hermes 1248/udp +rsf-1 1195/tcp #RSF-1 clustering +rsf-1 1195/udp #RSF-1 clustering +qt-serveradmin 1220/tcp #QT SERVER ADMIN +qt-serveradmin 1220/udp #QT SERVER ADMIN healthd 1281/tcp #healthd healthd 1281/udp #healthd -alta-ana-lm 1346/tcp #Alta Analytics License Manager -alta-ana-lm 1346/udp #Alta Analytics License Manager -bbn-mmc 1347/tcp #multi media conferencing -bbn-mmc 1347/udp #multi media conferencing -bbn-mmx 1348/tcp #multi media conferencing -bbn-mmx 1348/udp #multi media conferencing -sbook 1349/tcp #Registration Network Protocol -sbook 1349/udp #Registration Network Protocol -editbench 1350/tcp #Registration Network Protocol -editbench 1350/udp #Registration Network Protocol -equationbuilder 1351/tcp #Digital Tool Works (MIT) -equationbuilder 1351/udp #Digital Tool Works (MIT) -lotusnote 1352/tcp #Lotus Note -lotusnote 1352/udp #Lotus Note -relief 1353/tcp #Relief Consulting -relief 1353/udp #Relief Consulting -rightbrain 1354/tcp #RightBrain Software -rightbrain 1354/udp #RightBrain Software -intuitive-edge 1355/tcp #Intuitive Edge -intuitive-edge 1355/udp #Intuitive Edge -cuillamartin 1356/tcp #CuillaMartin Company -cuillamartin 1356/udp #CuillaMartin Company -pegboard 1357/tcp #Electronic PegBoard -pegboard 1357/udp #Electronic PegBoard -connlcli 1358/tcp -connlcli 1358/udp -ftsrv 1359/tcp -ftsrv 1359/udp -mimer 1360/tcp -mimer 1360/udp -linx 1361/tcp -linx 1361/udp -timeflies 1362/tcp -timeflies 1362/udp -ndm-requester 1363/tcp #Network DataMover Requester -ndm-requester 1363/udp #Network DataMover Requester -ndm-server 1364/tcp #Network DataMover Server -ndm-server 1364/udp #Network DataMover Server -adapt-sna 1365/tcp #Network Software Associates -adapt-sna 1365/udp #Network Software Associates -netware-csp 1366/tcp #Novell NetWare Comm Service Platform -netware-csp 1366/udp #Novell NetWare Comm Service Platform -dcs 1367/tcp -dcs 1367/udp -screencast 1368/tcp -screencast 1368/udp -gv-us 1369/tcp #GlobalView to Unix Shell -gv-us 1369/udp #GlobalView to Unix Shell -us-gv 1370/tcp #Unix Shell to GlobalView -us-gv 1370/udp #Unix Shell to GlobalView -fc-cli 1371/tcp #Fujitsu Config Protocol -fc-cli 1371/udp #Fujitsu Config Protocol -fc-ser 1372/tcp #Fujitsu Config Protocol -fc-ser 1372/udp #Fujitsu Config Protocol -chromagrafx 1373/tcp -chromagrafx 1373/udp -molly 1374/tcp #EPI Software Systems -molly 1374/udp #EPI Software Systems -bytex 1375/tcp -bytex 1375/udp -ibm-pps 1376/tcp #IBM Person to Person Software -ibm-pps 1376/udp #IBM Person to Person Software -cichlid 1377/tcp #Cichlid License Manager -cichlid 1377/udp #Cichlid License Manager -elan 1378/tcp #Elan License Manager -elan 1378/udp #Elan License Manager -dbreporter 1379/tcp #Integrity Solutions -dbreporter 1379/udp #Integrity Solutions -telesis-licman 1380/tcp #Telesis Network License Manager -telesis-licman 1380/udp #Telesis Network License Manager -apple-licman 1381/tcp #Apple Network License Manager -apple-licman 1381/udp #Apple Network License Manager -#udt_os 1382/tcp -#udt_os 1382/udp -gwha 1383/tcp #GW Hannaway Network License Manager -gwha 1383/udp #GW Hannaway Network License Manager -os-licman 1384/tcp #Objective Solutions License Manager -os-licman 1384/udp #Objective Solutions License Manager -atex_elmd 1385/tcp #Atex Publishing License Manager -atex_elmd 1385/udp #Atex Publishing License Manager -checksum 1386/tcp #CheckSum License Manager -checksum 1386/udp #CheckSum License Manager -cadsi-lm 1387/tcp #Computer Aided Design Software Inc LM -cadsi-lm 1387/udp #Computer Aided Design Software Inc LM -objective-dbc 1388/tcp #Objective Solutions DataBase Cache -objective-dbc 1388/udp #Objective Solutions DataBase Cache -iclpv-dm 1389/tcp #Document Manager -iclpv-dm 1389/udp #Document Manager -iclpv-sc 1390/tcp #Storage Controller -iclpv-sc 1390/udp #Storage Controller -iclpv-sas 1391/tcp #Storage Access Server -iclpv-sas 1391/udp #Storage Access Server -iclpv-pm 1392/tcp #Print Manager -iclpv-pm 1392/udp #Print Manager -iclpv-nls 1393/tcp #Network Log Server -iclpv-nls 1393/udp #Network Log Server -iclpv-nlc 1394/tcp #Network Log Client -iclpv-nlc 1394/udp #Network Log Client -iclpv-wsm 1395/tcp #PC Workstation Manager software -iclpv-wsm 1395/udp #PC Workstation Manager software -dvl-activemail 1396/tcp #DVL Active Mail -dvl-activemail 1396/udp #DVL Active Mail -audio-activmail 1397/tcp #Audio Active Mail -audio-activmail 1397/udp #Audio Active Mail -video-activmail 1398/tcp #Video Active Mail -video-activmail 1398/udp #Video Active Mail -cadkey-licman 1399/tcp #Cadkey License Manager -cadkey-licman 1399/udp #Cadkey License Manager -cadkey-tablet 1400/tcp #Cadkey Tablet Daemon -cadkey-tablet 1400/udp #Cadkey Tablet Daemon -goldleaf-licman 1401/tcp #Goldleaf License Manager -goldleaf-licman 1401/udp #Goldleaf License Manager -prm-sm-np 1402/tcp #Prospero Resource Manager -prm-sm-np 1402/udp #Prospero Resource Manager -prm-nm-np 1403/tcp #Prospero Resource Manager -prm-nm-np 1403/udp #Prospero Resource Manager -igi-lm 1404/tcp #Infinite Graphics License Manager -igi-lm 1404/udp #Infinite Graphics License Manager -ibm-res 1405/tcp #IBM Remote Execution Starter -ibm-res 1405/udp #IBM Remote Execution Starter -netlabs-lm 1406/tcp #NetLabs License Manager -netlabs-lm 1406/udp #NetLabs License Manager -dbsa-lm 1407/tcp #DBSA License Manager -dbsa-lm 1407/udp #DBSA License Manager -sophia-lm 1408/tcp #Sophia License Manager -sophia-lm 1408/udp #Sophia License Manager -here-lm 1409/tcp #Here License Manager -here-lm 1409/udp #Here License Manager -hiq 1410/tcp #HiQ License Manager -hiq 1410/udp #HiQ License Manager -af 1411/tcp #AudioFile -af 1411/udp #AudioFile -innosys 1412/tcp -innosys 1412/udp -innosys-acl 1413/tcp -innosys-acl 1413/udp -ibm-mqseries 1414/tcp #IBM MQSeries -ibm-mqseries 1414/udp #IBM MQSeries -dbstar 1415/tcp -dbstar 1415/udp -novell-lu6.2 1416/tcp #Novell LU6.2 -novell-lu6.2 1416/udp #Novell LU6.2 -timbuktu-srv1 1417/tcp #Timbuktu Service 1 Port -timbuktu-srv1 1417/udp #Timbuktu Service 1 Port -timbuktu-srv2 1418/tcp #Timbuktu Service 2 Port -timbuktu-srv2 1418/udp #Timbuktu Service 2 Port -timbuktu-srv3 1419/tcp #Timbuktu Service 3 Port -timbuktu-srv3 1419/udp #Timbuktu Service 3 Port -timbuktu-srv4 1420/tcp #Timbuktu Service 4 Port -timbuktu-srv4 1420/udp #Timbuktu Service 4 Port -gandalf-lm 1421/tcp #Gandalf License Manager -gandalf-lm 1421/udp #Gandalf License Manager -autodesk-lm 1422/tcp #Autodesk License Manager -autodesk-lm 1422/udp #Autodesk License Manager -essbase 1423/tcp #Essbase Arbor Software -essbase 1423/udp #Essbase Arbor Software -hybrid 1424/tcp #Hybrid Encryption Protocol -hybrid 1424/udp #Hybrid Encryption Protocol -zion-lm 1425/tcp #Zion Software License Manager -zion-lm 1425/udp #Zion Software License Manager -sas-1 1426/tcp #Satellite-data Acquisition System 1 -sas-1 1426/udp #Satellite-data Acquisition System 1 -mloadd 1427/tcp #mloadd monitoring tool -mloadd 1427/udp #mloadd monitoring tool -informatik-lm 1428/tcp #Informatik License Manager -informatik-lm 1428/udp #Informatik License Manager -nms 1429/tcp #Hypercom NMS -nms 1429/udp #Hypercom NMS -tpdu 1430/tcp #Hypercom TPDU -tpdu 1430/udp #Hypercom TPDU -rgtp 1431/tcp #Reverse Gossip Transport -rgtp 1431/udp #Reverse Gossip Transport -blueberry-lm 1432/tcp #Blueberry Software License Manager -blueberry-lm 1432/udp #Blueberry Software License Manager +pkt-krb-ipsec 1293/tcp #PKT-KRB-IPSec +pkt-krb-ipsec 1293/udp #PKT-KRB-IPSec +h323hostcallsc 1300/tcp #H323 Host Call Secure +h323hostcallsc 1300/udp #H323 Host Call Secure +jtag-server 1309/tcp #JTAG server +jtag-server 1309/udp #JTAG server +hkrb5gatekeeper 1318/tcp #krb5gatekeeper +krb5gatekeeper 1318/udp #krb5gatekeeper +netdb-export 1329/tcp #netdb-export +netdb-export 1329/udp #netdb-export +digital-notary 1335/tcp #Digital Notary Protocol +digital-notary 1335/udp #Digital Notary Protocol +icap 1344/tcp #ICAP +icap 1344/udp #ICAP ms-sql-s 1433/tcp #Microsoft-SQL-Server ms-sql-s 1433/udp #Microsoft-SQL-Server ms-sql-m 1434/tcp #Microsoft-SQL-Monitor ms-sql-m 1434/udp #Microsoft-SQL-Monitor -ibm-cics 1435/tcp -ibm-cics 1435/udp -sas-2 1436/tcp #Satellite-data Acquisition System 2 -sas-2 1436/udp #Satellite-data Acquisition System 2 -tabula 1437/tcp -tabula 1437/udp -eicon-server 1438/tcp #Eicon Security Agent/Server -eicon-server 1438/udp #Eicon Security Agent/Server -eicon-x25 1439/tcp #Eicon X25/SNA Gateway -eicon-x25 1439/udp #Eicon X25/SNA Gateway -eicon-slp 1440/tcp #Eicon Service Location Protocol -eicon-slp 1440/udp #Eicon Service Location Protocol -cadis-1 1441/tcp #Cadis License Management -cadis-1 1441/udp #Cadis License Management -cadis-2 1442/tcp #Cadis License Management -cadis-2 1442/udp #Cadis License Management -ies-lm 1443/tcp #Integrated Engineering Software -ies-lm 1443/udp #Integrated Engineering Software -marcam-lm 1444/tcp #Marcam License Management -marcam-lm 1444/udp #Marcam License Management -proxima-lm 1445/tcp #Proxima License Manager -proxima-lm 1445/udp #Proxima License Manager -ora-lm 1446/tcp #Optical Research Associates License Manager -ora-lm 1446/udp #Optical Research Associates License Manager -apri-lm 1447/tcp #Applied Parallel Research LM -apri-lm 1447/udp #Applied Parallel Research LM -oc-lm 1448/tcp #OpenConnect License Manager -oc-lm 1448/udp #OpenConnect License Manager -peport 1449/tcp -peport 1449/udp -dwf 1450/tcp #Tandem Distributed Workbench Facility -dwf 1450/udp #Tandem Distributed Workbench Facility -infoman 1451/tcp #IBM Information Management -infoman 1451/udp #IBM Information Management -gtegsc-lm 1452/tcp #GTE Government Systems License Man -gtegsc-lm 1452/udp #GTE Government Systems License Man -genie-lm 1453/tcp #Genie License Manager -genie-lm 1453/udp #Genie License Manager -interhdl_elmd 1454/tcp #interHDL License Manager -interhdl_elmd 1454/udp #interHDL License Manager -esl-lm 1455/tcp #ESL License Manager -esl-lm 1455/udp #ESL License Manager -dca 1456/tcp -dca 1456/udp -valisys-lm 1457/tcp #Valisys License Manager -valisys-lm 1457/udp #Valisys License Manager -nrcabq-lm 1458/tcp #Nichols Research Corp. -nrcabq-lm 1458/udp #Nichols Research Corp. -proshare1 1459/tcp #Proshare Notebook Application -proshare1 1459/udp #Proshare Notebook Application -proshare2 1460/tcp #Proshare Notebook Application -proshare2 1460/udp #Proshare Notebook Application -ibm_wrless_lan 1461/tcp #IBM Wireless LAN -ibm_wrless_lan 1461/udp #IBM Wireless LAN -world-lm 1462/tcp #World License Manager -world-lm 1462/udp #World License Manager -nucleus 1463/tcp -nucleus 1463/udp -msl_lmd 1464/tcp #MSL License Manager -msl_lmd 1464/udp #MSL License Manager -pipes 1465/tcp #Pipes Platform -pipes 1465/udp #Pipes Platform mfarlin@peerlogic.com -oceansoft-lm 1466/tcp #Ocean Software License Manager -oceansoft-lm 1466/udp #Ocean Software License Manager -csdmbase 1467/tcp -csdmbase 1467/udp -csdm 1468/tcp -csdm 1468/udp -aal-lm 1469/tcp #Active Analysis Limited License Manager -aal-lm 1469/udp #Active Analysis Limited License Manager -uaiact 1470/tcp #Universal Analytics -uaiact 1470/udp #Universal Analytics -csdmbase 1471/tcp -csdmbase 1471/udp -csdm 1472/tcp -csdm 1472/udp -openmath 1473/tcp -openmath 1473/udp -telefinder 1474/tcp -telefinder 1474/udp -taligent-lm 1475/tcp #Taligent License Manager -taligent-lm 1475/udp #Taligent License Manager -clvm-cfg 1476/tcp -clvm-cfg 1476/udp -ms-sna-server 1477/tcp -ms-sna-server 1477/udp -ms-sna-base 1478/tcp -ms-sna-base 1478/udp -dberegister 1479/tcp -dberegister 1479/udp -pacerforum 1480/tcp -pacerforum 1480/udp -airs 1481/tcp -airs 1481/udp -miteksys-lm 1482/tcp #Miteksys License Manager -miteksys-lm 1482/udp #Miteksys License Manager -afs 1483/tcp #AFS License Manager -afs 1483/udp #AFS License Manager -confluent 1484/tcp #Confluent License Manager -confluent 1484/udp #Confluent License Manager -lansource 1485/tcp -lansource 1485/udp -nms_topo_serv 1486/tcp -nms_topo_serv 1486/udp -localinfosrvr 1487/tcp -localinfosrvr 1487/udp -docstor 1488/tcp -docstor 1488/udp -dmdocbroker 1489/tcp -dmdocbroker 1489/udp -insitu-conf 1490/tcp -insitu-conf 1490/udp -anynetgateway 1491/tcp -anynetgateway 1491/udp -stone-design-1 1492/tcp -stone-design-1 1492/udp -netmap_lm 1493/tcp -netmap_lm 1493/udp -ica 1494/tcp -ica 1494/udp -cvc 1495/tcp -cvc 1495/udp -liberty-lm 1496/tcp -liberty-lm 1496/udp -rfx-lm 1497/tcp -rfx-lm 1497/udp -watcom-sql 1498/tcp -watcom-sql 1498/udp -fhc 1499/tcp #Federico Heinz Consultora -fhc 1499/udp #Federico Heinz Consultora -vlsi-lm 1500/tcp #VLSI License Manager -vlsi-lm 1500/udp #VLSI License Manager -sas-3 1501/tcp #Satellite-data Acquisition System 3 -sas-3 1501/udp #Satellite-data Acquisition System 3 -shivadiscovery 1502/tcp #Shiva -shivadiscovery 1502/udp #Shiva -imtc-mcs 1503/tcp #Databeam -imtc-mcs 1503/udp #Databeam -evb-elm 1504/tcp #EVB Software Engineering License Manager -evb-elm 1504/udp #EVB Software Engineering License Manager -funkproxy 1505/tcp #Funk Software, Inc. -funkproxy 1505/udp #Funk Software, Inc. -utcd 1506/tcp #Universal Time daemon (utcd) -utcd 1506/udp #Universal Time daemon (utcd) -symplex 1507/tcp -symplex 1507/udp -diagmond 1508/tcp -diagmond 1508/udp -robcad-lm 1509/tcp #Robcad, Ltd. License Manager -robcad-lm 1509/udp #Robcad, Ltd. License Manager -mvx-lm 1510/tcp #Midland Valley Exploration Ltd. Lic. Man. -mvx-lm 1510/udp #Midland Valley Exploration Ltd. Lic. Man. -3l-l1 1511/tcp -3l-l1 1511/udp -wins 1512/tcp #Microsoft's Windows Internet Name Service -wins 1512/udp #Microsoft's Windows Internet Name Service -fujitsu-dtc 1513/tcp #Fujitsu Systems Business of America, Inc -fujitsu-dtc 1513/udp #Fujitsu Systems Business of America, Inc -fujitsu-dtcns 1514/tcp #Fujitsu Systems Business of America, Inc -fujitsu-dtcns 1514/udp #Fujitsu Systems Business of America, Inc -ifor-protocol 1515/tcp -ifor-protocol 1515/udp -vpad 1516/tcp #Virtual Places Audio data -vpad 1516/udp #Virtual Places Audio data -vpac 1517/tcp #Virtual Places Audio control -vpac 1517/udp #Virtual Places Audio control -vpvd 1518/tcp #Virtual Places Video data -vpvd 1518/udp #Virtual Places Video data -vpvc 1519/tcp #Virtual Places Video control -vpvc 1519/udp #Virtual Places Video control -atm-zip-office 1520/tcp #atm zip office -atm-zip-office 1520/udp #atm zip office -ncube-lm 1521/tcp #nCube License Manager -ncube-lm 1521/udp #nCube License Manager -rna-lm 1522/tcp #Ricardo North America License Manager -rna-lm 1522/udp #Ricardo North America License Manager -cichild-lm 1523/tcp -cichild-lm 1523/udp ingreslock 1524/tcp #ingres ingreslock 1524/udp #ingres -prospero-np 1525/tcp #Prospero Directory Service non-priv -prospero-np 1525/udp #Prospero Directory Service non-priv #PROBLEMS!======================================================== orasrv 1525/tcp #oracle orasrv 1525/udp #oracle #PROBLEMS!======================================================== +prospero-np 1525/tcp #Prospero Directory Service non-priv +prospero-np 1525/udp #Prospero Directory Service non-priv pdap-np 1526/tcp #Prospero Data Access Prot non-priv pdap-np 1526/udp #Prospero Data Access Prot non-priv tlisrv 1527/tcp #oracle tlisrv 1527/udp #oracle *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Feb 28 21:13:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FD92245DCC; Fri, 28 Feb 2020 21:13:16 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Tj1l5yBhz3MQy; Fri, 28 Feb 2020 21:13:15 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A92A37F49; Fri, 28 Feb 2020 21:13:15 +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 01SLDFBw072249; Fri, 28 Feb 2020 21:13:15 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SLDFah072248; Fri, 28 Feb 2020 21:13:15 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202002282113.01SLDFah072248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 28 Feb 2020 21:13:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358449 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 21:13:16 -0000 Author: brooks Date: Fri Feb 28 21:13:15 2020 New Revision: 358449 URL: https://svnweb.freebsd.org/changeset/base/358449 Log: Define SCTL_MASK32 when COMPAT_FREEBSD32 is defined. Remove the list of architectures and depend on COMPAT_FREEBSD32 which is defined (if relevent) in opt_global.h and thus defined everywhere in the kernel. This is a minor change in behavior in that 32-bit compat for sysctls now depends on COMPAT_FREEBSD32 rather than on the potential for 32-bit compat support. The prior arrangement may have been part of an attempt to allow 32-bit compat to be loadable, but such attempts are doomed to failure (due to the fact that ioctls have no meaning without the associated file descriptor) without vastly more refactoring and some sort of COMPAT_FREEBSD32_SUPPORT option. Reviewed by: jhb Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23748 Modified: head/sys/sys/sysctl.h Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Fri Feb 28 20:43:35 2020 (r358448) +++ head/sys/sys/sysctl.h Fri Feb 28 21:13:15 2020 (r358449) @@ -156,8 +156,7 @@ struct ctlname { #define REQ_WIRED 2 /* definitions for sysctl_req 'flags' member */ -#if defined(__aarch64__) || defined(__amd64__) || defined(__powerpc64__) ||\ - (defined(__mips__) && defined(__mips_n64)) +#ifdef COMPAT_FREEBSD32 #define SCTL_MASK32 1 /* 32 bit emulation */ #endif From owner-svn-src-head@freebsd.org Fri Feb 28 21:16:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03C3F246199; Fri, 28 Feb 2020 21:16:09 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Tj545vN8z3yY2; Fri, 28 Feb 2020 21:16:08 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id D606E3C0199; Fri, 28 Feb 2020 21:16:01 +0000 (UTC) Date: Fri, 28 Feb 2020 21:16:01 +0000 From: Brooks Davis To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358416 - head/sys/sys Message-ID: <20200228211601.GC48231@spindle.one-eyed-alien.net> References: <202002280102.01S1223Q036983@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lCAWRPmW1mITcIfM" Content-Disposition: inline In-Reply-To: <202002280102.01S1223Q036983@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 48Tj545vN8z3yY2 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 21:16:09 -0000 --lCAWRPmW1mITcIfM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 28, 2020 at 01:02:02AM +0000, Warner Losh wrote: > Author: imp > Date: Fri Feb 28 01:02:01 2020 > New Revision: 358416 > URL: https://svnweb.freebsd.org/changeset/base/358416 >=20 > Log: > Remove duplicated ATA_CHECK_POWER_MODE >=20 > Modified: > head/sys/sys/ata.h >=20 > Modified: head/sys/sys/ata.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/sys/ata.h Fri Feb 28 00:42:27 2020 (r358415) > +++ head/sys/sys/ata.h Fri Feb 28 01:02:01 2020 (r358416) > @@ -507,7 +507,6 @@ struct ata_params { > #define ATA_SF_DIS_SRVIRQ 0xde /* disable service inter= rupt */ > #define ATA_SF_LPSAERC 0x62 /* Long Phys Sect Align ErrRep*/ > #define ATA_SF_DSN 0x63 /* Device Stats Notification */ > -#define ATA_CHECK_POWER_MODE 0xe5 /* Check Power Mode */ > #define ATA_SECURITY_SET_PASSWORD 0xf1 /* set drive password */ > #define ATA_SECURITY_UNLOCK 0xf2 /* unlock drive using pa= sswd */ > #define ATA_SECURITY_ERASE_PREPARE 0xf3 /* prepare to erase driv= e */ >=20 I know that's not that you were working on, but that's a remarkable collection of whitespace decisions in the remaining lines. -- Brooks --lCAWRPmW1mITcIfM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJeWYMQAAoJEKzQXbSebgfAmtAH/jJ3qHhgihOuOQvcwFkfVWD4 GpUfA/Upa3Cn4AkT7iND8NcssBShz5FvF1P/V1A68tu64fDOMk8rxHiBMUVZY9jh NOTXtbj0wr0YZKK0RobSV03EV8ydSvW4bPmTdfpQArOmAAbPKyrW2ez7NaC+wJFC knAay+97BJRzwcfqVpPH1Z+wP6HXyphvMVTguFwU4rROG5+MbOg2Hf34ZwOurQgR JtFjW2seHQkQzod8icuMiqI3CSGwYvfUo03WuA1iaMedoq6SM2c9IrDKKdKrGAEM BYKCvflJFg6WleCcFGSfjD2wDjSdiEv5rWHnCSrHxRYEJWuYAyR87Ra0lOWmQpY= =S6nb -----END PGP SIGNATURE----- --lCAWRPmW1mITcIfM-- From owner-svn-src-head@freebsd.org Fri Feb 28 21:27:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 015F4246498 for ; Fri, 28 Feb 2020 21:27:46 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48TjLS4hyBz4V2H for ; Fri, 28 Feb 2020 21:27:44 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1582925262; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=upWXW9CDrcirzhbkmn3qGaDLlG0T5zisrKHpBD1rJCdyVdhmBXh/hlrQhlKe18enY6s9nZhMC5QLf 3Y62EiYp+G/wME63zAjCzdabFVyNxTKfjOVb4xwUPIuN87NcYDLVU3aL3P+TtVaagSez2aeL1TAMZZ YI/v1StqOhdbVJv1vCKEyHTh7IgPh85tXz6i8T5Xlrt0ENivqK7eJ7Ai9ySoMDW95vfO9kO5B2jPDo 47p4XLAXWPHkC11UGryeKzInA0VVrS8IqMToHf5JH0bYXPo6OJCSmeYV/dPwaDqtXvPsS88xW5b2uP W2y3yfqOzfVKGuI5O23Ou1qN2foWFdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=KfgiQEND/EweslOj1jsp542JhbfGNdtTx75vwYxkImA=; b=G7EKnySh0g4IVmVkASFR453roi3gLnN8yPma0W7ZfuGSde+N8MMRdrcBSuMTeW0Gq5vshxxmIUJ9r VI4V21o0JIpUbitxfSmp90lQgftwKzQNcrL0EgGcpTk5J8iEGkoQXSpkSBYcL49kV2FpDzsav6v2fm hBe8ll7Ct1XqRfJFRIad4quxxIyDN58SaMw8XwV4Le7wcdKAnx8CVW9/47iSyfcUueBlk+kf4c79li 1eCqVKD+NYAbU/N3to1gjA0j8mQaP5qj2CbO3K0+OQhz3+cFg0mnqEZm4/VwZ+H2rHukFKPrkE6cX0 rhGeoGdkegz4CnQbNwFx2Xpl+nldBpg== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=KfgiQEND/EweslOj1jsp542JhbfGNdtTx75vwYxkImA=; b=SRoyCOdnJ06Z4eEjcLE6Mne1IQj4rNpKrOD93zO1qt76SMjLksRsVUOMo5bF5Cq+peukzNQWjcYGj oBr4lI5DPdLgYeYncG3CIL1Fg341eNabj4Ng44TWFn5FT+hriEWT/NvxFYjqxUEL8sYK3jy/1UX85X ZHD/tbIp81bcqz7NKc3zSYwe8J4Ur7csOQs91204T0OiZsy/2feVmbZZFxkq6o5dF1SAE8kahBzy8m u62fis9pPTmn9/AsA6mEkb0x9Y8oJ6VeN3cb8kLZVxlnkvRmk2xUaKzAGfJu0blMx0MNJpZFKWjTmO Hniih41v2GlvS3GmboUJiwYPcdUddkg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 2649c1c5-5a71-11ea-9eb3-25e2dfa9fa8d X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 2649c1c5-5a71-11ea-9eb3-25e2dfa9fa8d; Fri, 28 Feb 2020 21:27:41 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 01SLReKk001612; Fri, 28 Feb 2020 14:27:40 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r358416 - head/sys/sys From: Ian Lepore To: Brooks Davis , Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 28 Feb 2020 14:27:40 -0700 In-Reply-To: <20200228211601.GC48231@spindle.one-eyed-alien.net> References: <202002280102.01S1223Q036983@repo.freebsd.org> <20200228211601.GC48231@spindle.one-eyed-alien.net> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48TjLS4hyBz4V2H X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.96 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.97)[-0.969,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; NEURAL_HAM_LONG(-0.99)[-0.994,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 21:27:46 -0000 On Fri, 2020-02-28 at 21:16 +0000, Brooks Davis wrote: > On Fri, Feb 28, 2020 at 01:02:02AM +0000, Warner Losh wrote: > > Author: imp > > Date: Fri Feb 28 01:02:01 2020 > > New Revision: 358416 > > URL: https://svnweb.freebsd.org/changeset/base/358416 > > > > Log: > > Remove duplicated ATA_CHECK_POWER_MODE > > > > Modified: > > head/sys/sys/ata.h > > > > Modified: head/sys/sys/ata.h > > =================================================================== > > =========== > > --- head/sys/sys/ata.h Fri Feb 28 00:42:27 2020 (r358415) > > +++ head/sys/sys/ata.h Fri Feb 28 01:02:01 2020 (r358416) > > @@ -507,7 +507,6 @@ struct ata_params { > > #define ATA_SF_DIS_SRVIRQ 0xde /* disable service > > interrupt */ > > #define ATA_SF_LPSAERC 0x62 /* Long Phys Sect > > Align ErrRep*/ > > #define ATA_SF_DSN 0x63 /* Device Stats > > Notification */ > > -#define ATA_CHECK_POWER_MODE 0xe5 /* Check > > Power Mode */ > > #define ATA_SECURITY_SET_PASSWORD 0xf1 /* set drive > > password */ > > #define ATA_SECURITY_UNLOCK 0xf2 /* unlock drive > > using passwd */ > > #define ATA_SECURITY_ERASE_PREPARE 0xf3 /* prepare to > > erase drive */ > > > > I know that's not that you were working on, but that's a remarkable > collection of whitespace decisions in the remaining lines. > > -- Brooks It's not as bad when you open the file in an editor. The indentation is consistent and sensible, but it contains a mix of spaces and tabs so it looks pretty bad in an email diff. -- Ian From owner-svn-src-head@freebsd.org Fri Feb 28 21:31:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57D3C246554; Fri, 28 Feb 2020 21:31:42 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TjR154Tsz4g1P; Fri, 28 Feb 2020 21:31:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76F038174; Fri, 28 Feb 2020 21:31:41 +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 01SLVf6c082667; Fri, 28 Feb 2020 21:31:41 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SLVfG4082666; Fri, 28 Feb 2020 21:31:41 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202002282131.01SLVfG4082666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 28 Feb 2020 21:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358450 - head/sys/dev/mmc/host X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/mmc/host X-SVN-Commit-Revision: 358450 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 21:31:42 -0000 Author: manu Date: Fri Feb 28 21:31:40 2020 New Revision: 358450 URL: https://svnweb.freebsd.org/changeset/base/358450 Log: mmc: dwmmc: Fix off by one error The IVAR_MAX_DATA is supposed to have the number of descriptor X the mmc block size and desc_count contain all this information + 1. Reported by: phk MFC after: 1 week Modified: head/sys/dev/mmc/host/dwmmc.c Modified: head/sys/dev/mmc/host/dwmmc.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc.c Fri Feb 28 21:13:15 2020 (r358449) +++ head/sys/dev/mmc/host/dwmmc.c Fri Feb 28 21:31:40 2020 (r358450) @@ -1278,7 +1278,7 @@ dwmmc_read_ivar(device_t bus, device_t child, int whic *(int *)result = sc->host.caps; break; case MMCBR_IVAR_MAX_DATA: - *(int *)result = sc->desc_count; + *(int *)result = sc->desc_count - 1; break; case MMCBR_IVAR_TIMING: *(int *)result = sc->host.ios.timing; From owner-svn-src-head@freebsd.org Fri Feb 28 21:42:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69EB224693D; Fri, 28 Feb 2020 21:42:50 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Tjgt0JxQz48FJ; Fri, 28 Feb 2020 21:42:50 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD47184B1; Fri, 28 Feb 2020 21:42:49 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01SLgnsw089944; Fri, 28 Feb 2020 21:42:49 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01SLgmnN089938; Fri, 28 Feb 2020 21:42:48 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202002282142.01SLgmnN089938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Fri, 28 Feb 2020 21:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358451 - in head/sys: kern vm X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: in head/sys: kern vm X-SVN-Commit-Revision: 358451 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 21:42:50 -0000 Author: jeff Date: Fri Feb 28 21:42:48 2020 New Revision: 358451 URL: https://svnweb.freebsd.org/changeset/base/358451 Log: Provide a lock free alternative to resolve bogus pages. This is not likely to be much of a perf win, just a nice code simplification. Reviewed by: markj, kib Differential Revision: https://reviews.freebsd.org/D23866 Modified: head/sys/kern/kern_sendfile.c head/sys/kern/vfs_bio.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Fri Feb 28 21:31:40 2020 (r358450) +++ head/sys/kern/kern_sendfile.c Fri Feb 28 21:42:48 2020 (r358451) @@ -350,7 +350,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i { vm_page_t *pa = sfio->pa; int grabbed; - bool locked; *nios = 0; flags = (flags & SF_NODISKIO) ? VM_ALLOC_NOWAIT : 0; @@ -359,8 +358,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i * First grab all the pages and wire them. Note that we grab * only required pages. Readahead pages are dealt with later. */ - locked = false; - grabbed = vm_page_grab_pages_unlocked(obj, OFF_TO_IDX(off), VM_ALLOC_NORMAL | VM_ALLOC_WIRED | flags, pa, npages); if (grabbed < npages) { @@ -381,10 +378,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i i++; continue; } - if (!locked) { - VM_OBJECT_WLOCK(obj); - locked = true; - } /* * Next page is invalid. Check if it belongs to pager. It @@ -396,8 +389,10 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i * stored in 'a', about how many pages we can pagein after * this page in a single I/O. */ + VM_OBJECT_RLOCK(obj); if (!vm_pager_has_page(obj, OFF_TO_IDX(vmoff(i, off)), NULL, &a)) { + VM_OBJECT_RUNLOCK(obj); pmap_zero_page(pa[i]); vm_page_valid(pa[i]); MPASS(pa[i]->dirty == 0); @@ -405,6 +400,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i i++; continue; } + VM_OBJECT_RUNLOCK(obj); /* * We want to pagein as many pages as possible, limited only @@ -435,11 +431,9 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i } refcount_acquire(&sfio->nios); - VM_OBJECT_WUNLOCK(obj); rv = vm_pager_get_pages_async(obj, pa + i, count, NULL, i + count == npages ? &rhpages : NULL, &sendfile_iodone, sfio); - VM_OBJECT_WLOCK(obj); if (__predict_false(rv != VM_PAGER_OK)) { /* * Perform full pages recovery before returning EIO. @@ -451,7 +445,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i for (j = 0; j < npages; j++) { if (j > i && j < i + count - 1 && pa[j] == bogus_page) - pa[j] = vm_page_lookup(obj, + pa[j] = vm_page_relookup(obj, OFF_TO_IDX(vmoff(j, off))); else if (j >= i) vm_page_xunbusy(pa[j]); @@ -460,7 +454,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i __func__, pa, j)); vm_page_unwire(pa[j], PQ_INACTIVE); } - VM_OBJECT_WUNLOCK(obj); return (EIO); } @@ -475,7 +468,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i */ for (j = i + 1; j < i + count - 1; j++) if (pa[j] == bogus_page) { - pa[j] = vm_page_lookup(obj, + pa[j] = vm_page_relookup(obj, OFF_TO_IDX(vmoff(j, off))); KASSERT(pa[j], ("%s: page %p[%d] disappeared", __func__, pa, j)); @@ -484,9 +477,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i i += count; (*nios)++; } - - if (locked) - VM_OBJECT_WUNLOCK(obj); if (*nios == 0 && npages != 0) SFSTAT_INC(sf_noiocnt); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Fri Feb 28 21:31:40 2020 (r358450) +++ head/sys/kern/vfs_bio.c Fri Feb 28 21:42:48 2020 (r358451) @@ -2878,11 +2878,8 @@ vfs_vmio_iodone(struct buf *bp) */ m = bp->b_pages[i]; if (m == bogus_page) { - if (bogus == false) { - bogus = true; - VM_OBJECT_RLOCK(obj); - } - m = vm_page_lookup(obj, OFF_TO_IDX(foff)); + bogus = true; + m = vm_page_relookup(obj, OFF_TO_IDX(foff)); if (m == NULL) panic("biodone: page disappeared!"); bp->b_pages[i] = m; @@ -2905,8 +2902,6 @@ vfs_vmio_iodone(struct buf *bp) foff = (foff + PAGE_SIZE) & ~(off_t)PAGE_MASK; iosize -= resid; } - if (bogus) - VM_OBJECT_RUNLOCK(obj); vm_object_pip_wakeupn(obj, bp->b_npages); if (bogus && buf_mapped(bp)) { BUF_CHECK_MAPPED(bp); @@ -4470,22 +4465,16 @@ vfs_unbusy_pages(struct buf *bp) int i; vm_object_t obj; vm_page_t m; - bool bogus; runningbufwakeup(bp); if (!(bp->b_flags & B_VMIO)) return; obj = bp->b_bufobj->bo_object; - bogus = false; for (i = 0; i < bp->b_npages; i++) { m = bp->b_pages[i]; if (m == bogus_page) { - if (bogus == false) { - bogus = true; - VM_OBJECT_RLOCK(obj); - } - m = vm_page_lookup(obj, OFF_TO_IDX(bp->b_offset) + i); + m = vm_page_relookup(obj, OFF_TO_IDX(bp->b_offset) + i); if (!m) panic("vfs_unbusy_pages: page missing\n"); bp->b_pages[i] = m; @@ -4498,8 +4487,6 @@ vfs_unbusy_pages(struct buf *bp) } vm_page_sunbusy(m); } - if (bogus) - VM_OBJECT_RUNLOCK(obj); vm_object_pip_wakeupn(obj, bp->b_npages); } Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Feb 28 21:31:40 2020 (r358450) +++ head/sys/vm/vm_page.c Fri Feb 28 21:42:48 2020 (r358451) @@ -1671,6 +1671,24 @@ vm_page_lookup(vm_object_t object, vm_pindex_t pindex) } /* + * vm_page_relookup: + * + * Returns a page that must already have been busied by + * the caller. Used for bogus page replacement. + */ +vm_page_t +vm_page_relookup(vm_object_t object, vm_pindex_t pindex) +{ + vm_page_t m; + + m = vm_radix_lookup_unlocked(&object->rtree, pindex); + KASSERT(m != NULL && vm_page_busied(m) && + m->object == object && m->pindex == pindex, + ("vm_page_relookup: Invalid page %p", m)); + return (m); +} + +/* * This should only be used by lockless functions for releasing transient * incorrect acquires. The page may have been freed after we acquired a * busy lock. In this case busy_lock == VPB_FREED and we have nothing Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Fri Feb 28 21:31:40 2020 (r358450) +++ head/sys/vm/vm_page.h Fri Feb 28 21:42:48 2020 (r358451) @@ -653,6 +653,7 @@ void vm_page_reference(vm_page_t m); #define VPR_NOREUSE 0x02 void vm_page_release(vm_page_t m, int flags); void vm_page_release_locked(vm_page_t m, int flags); +vm_page_t vm_page_relookup(vm_object_t, vm_pindex_t); bool vm_page_remove(vm_page_t); bool vm_page_remove_xbusy(vm_page_t); int vm_page_rename(vm_page_t, vm_object_t, vm_pindex_t); From owner-svn-src-head@freebsd.org Sat Feb 29 03:25:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A51A252678; Sat, 29 Feb 2020 03:25:53 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TsHj1BsJz44vd; Sat, 29 Feb 2020 03:25:53 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 144C4C789; Sat, 29 Feb 2020 03:25:53 +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 01T3Prf0094687; Sat, 29 Feb 2020 03:25:53 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01T3PpnO094677; Sat, 29 Feb 2020 03:25:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002290325.01T3PpnO094677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 29 Feb 2020 03:25:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358454 - in head: . etc/mtree gnu/lib gnu/lib/libgcov gnu/lib/libgomp gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/usr.bin gnu/usr.bin/cc gnu/usr.bin/gperf share/mk targets/pseudo/bootstrap... X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: . etc/mtree gnu/lib gnu/lib/libgcov gnu/lib/libgomp gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/usr.bin gnu/usr.bin/cc gnu/usr.bin/gperf share/mk targets/pseudo/bootstrap-tools targets/pseudo/too... X-SVN-Commit-Revision: 358454 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 03:25:53 -0000 Author: emaste Date: Sat Feb 29 03:25:51 2020 New Revision: 358454 URL: https://svnweb.freebsd.org/changeset/base/358454 Log: remove GCC 4.2.1 build infrastructure As described in Warner's email message[1] to the FreeBSD-arch mailing list we have reached GCC 4.2.1's retirement date. At this time all supported architectures either use in-tree Clang, or rely on external toolchain (i.e., a contemporary GCC version from ports). GCC 4.2.1 was released July 18, 2007 and was imported into FreeBSD later that year, in r171825. GCC has served us well, but version 4.2.1 is obsolete and not used by default on any architecture in FreeBSD. It does not support modern C and does not support arm64 or RISC-V. Thanks to everyone responsible for maintaining, updating, and testing GCC in the FreeBSD base system over the years. So long, and thanks for all the fish. [1] https://lists.freebsd.org/pipermail/freebsd-arch/2020-January/019823.html PR: 228919 Reviewed by: brooks, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23124 Deleted: head/gnu/lib/libgcov/ head/gnu/lib/libgomp/ head/gnu/lib/libstdc++/ head/gnu/lib/libsupc++/ head/gnu/usr.bin/cc/ head/gnu/usr.bin/gperf/ Modified: head/Makefile.inc1 head/ObsoleteFiles.inc head/UPDATING head/etc/mtree/BSD.include.dist head/gnu/lib/Makefile head/gnu/usr.bin/Makefile head/share/mk/local.dirdeps.mk head/share/mk/src.libnames.mk head/share/mk/src.opts.mk head/targets/pseudo/bootstrap-tools/Makefile head/targets/pseudo/toolchain/Makefile.depend head/targets/pseudo/userland/gnu/Makefile.depend head/tools/build/mk/OptionalObsoleteFiles.inc head/tools/build/options/WITHOUT_CLANG_IS_CC head/tools/build/options/WITHOUT_SYSTEM_COMPILER head/tools/build/options/WITH_SYSTEM_COMPILER head/tools/tools/nanobsd/dhcpd/common head/tools/tools/nanobsd/embedded/common head/usr.bin/clang/llvm-cov/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Feb 28 22:00:50 2020 (r358453) +++ head/Makefile.inc1 Sat Feb 29 03:25:51 2020 (r358454) @@ -87,7 +87,6 @@ X${COMPILER}?= ${${COMPILER}} # a cross compiler. .if ${XCC:N${CCACHE_BIN}:M/*} MK_CLANG_BOOTSTRAP= no -MK_GCC_BOOTSTRAP= no .endif # Pull in compiler metadata from buildworld/toolchain if possible to avoid @@ -207,8 +206,6 @@ _WANT_TOOLCHAIN_CROSS_VARS= t # Which compiler is expected to be used? .if ${MK_CLANG_BOOTSTRAP} == "yes" WANT_COMPILER_TYPE= clang -.elif ${MK_GCC_BOOTSTRAP} == "yes" -WANT_COMPILER_TYPE= gcc .else WANT_COMPILER_TYPE= .endif @@ -224,15 +221,6 @@ WANT_COMPILER_VERSION_FILE= lib/clang/include/clang/Ba WANT_COMPILER_VERSION!= \ awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ ${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}/${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}/${WANT_COMPILER_VERSION_FILE} || echo unknown .endif .export WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_VERSION .endif # !defined(WANT_COMPILER_FREEBSD_VERSION) @@ -243,7 +231,7 @@ WANT_COMPILER_VERSION!= \ # TARGET_ARCH!=MACHINE_ARCH. .if ${MK_SYSTEM_COMPILER} == "yes" && \ defined(WANT_COMPILER_FREEBSD_VERSION) && \ - (${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \ + ${MK_CLANG_BOOTSTRAP} == "yes" && \ !make(xdev*) && \ ${X_COMPILER_TYPE} == ${WANT_COMPILER_TYPE} && \ (${X_COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ @@ -251,7 +239,6 @@ WANT_COMPILER_VERSION!= \ ${X_COMPILER_FREEBSD_VERSION} == ${WANT_COMPILER_FREEBSD_VERSION} # Everything matches, disable the bootstrap compiler. MK_CLANG_BOOTSTRAP= no -MK_GCC_BOOTSTRAP= no USING_SYSTEM_COMPILER= yes .endif # ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} @@ -305,7 +292,7 @@ USING_SYSTEM_LINKER?= no TEST_SYSTEM_COMPILER_VARS= \ USING_SYSTEM_COMPILER MK_SYSTEM_COMPILER \ - MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP MK_GCC_BOOTSTRAP \ + MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP \ WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \ WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \ @@ -2128,10 +2115,6 @@ BOOTSTRAPPING_OSRELDATE:= 0 _strfile= usr.bin/fortune/strfile .endif -.if ${MK_GCC} != "no" && ${MK_CXX} != "no" -_gperf= gnu/usr.bin/gperf -.endif - .if ${MK_VT} != "no" _vtfontcvt= usr.bin/vtfontcvt .endif @@ -2377,7 +2360,6 @@ bootstrap-tools: ${_bt}-links .PHONY ${_clang_tblgen} \ ${_kerberos5_bootstrap_tools} \ ${_strfile} \ - ${_gperf} \ ${_dtc} \ ${_cat} \ ${_kbdcontrol} \ @@ -2419,10 +2401,6 @@ bootstrap-tools: ${_bt}-${_tool} _share= share/syscons/scrnmaps .endif -.if ${MK_GCC} != "no" -_gcc_tools= gnu/usr.bin/cc/cc_tools -.endif - .if ${MK_RESCUE} != "no" # rescue includes programs that have build-tools targets _rescue=rescue/rescue @@ -2460,8 +2438,7 @@ _bt_clean= ${CLEANDIR} ${_libmagic} \ usr.bin/mkesdb_static \ usr.bin/mkcsmapper_static \ - usr.bin/vi/catalog \ - ${_gcc_tools} + usr.bin/vi/catalog build-tools_${_tool}: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (${_bt_clean:D${_bt_clean},}obj,build-tools)"; \ cd ${.CURDIR}/${_tool}; \ @@ -2530,9 +2507,6 @@ _lld= usr.bin/clang/lld .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no" _clang_libs= lib/clang .endif -.if ${MK_GCC_BOOTSTRAP} != "no" -_gcc= gnu/usr.bin/cc -.endif .if ${MK_USB} != "no" _usb_tools= stand/usb/tools .endif @@ -2551,7 +2525,6 @@ cross-tools: .MAKE .PHONY ${_binutils} \ ${_elftctools} \ ${_dtrace_tools} \ - ${_gcc} \ ${_btxld} \ ${_usb_tools} ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ @@ -2647,9 +2620,6 @@ SUBDIR_DEPEND_usr.bin/clang= lib/clang NXBDIRS+= lib/clang NXBDIRS+= usr.bin/clang .endif -.if ${MK_GCC} != "no" -NXBDIRS+= gnu/usr.bin/cc -.endif .if ${MK_BINUTILS} != "no" NXBDIRS+= gnu/usr.bin/binutils .endif @@ -2713,27 +2683,23 @@ NXBMAKE+= ${NXBMAKEENV} ${MAKE} -f Makefile.inc1 ${NXB TARGET=${NXB_TARGET} TARGET_ARCH=${NXB_TARGET_ARCH} \ TARGET_TRIPLE=${MACHINE_TRIPLE:Q} # NXBDIRS is improperly based on MACHINE rather than NXB_TARGET. Need to -# invoke a sub-make to reevaluate MK_GCC, etc, for NXBDIRS. +# invoke a sub-make to reevaluate MK_CLANG, etc, for NXBDIRS. NXBMAKE+= SUBDIR_OVERRIDE='$${NXBDIRS:M*}' # Need to avoid the -isystem logic when using clang as an external toolchain # even if the TARGET being built for wants GCC. NXBMAKE+= WANT_COMPILER_TYPE='$${X_COMPILER_TYPE}' native-xtools: .PHONY - ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _cleanobj MK_GCC=yes + ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _cleanobj # Build the bootstrap/host/cross tools that produce native binaries - # Pass along MK_GCC=yes to ensure GCC-needed build tools are built. - # We don't quite know what the NXB_TARGET wants so just build it. - ${_+_}cd ${.CURDIR}; ${NXBTMAKE} kernel-toolchain MK_GCC=yes + ${_+_}cd ${.CURDIR}; ${NXBTMAKE} kernel-toolchain # Populate includes/libraries sysroot that produce native binaries. # This is split out from 'toolchain' above mostly so that target LLVM # libraries have a proper LLVM_DEFAULT_TARGET_TRIPLE without # polluting the cross-compiler build. The LLVM/GCC libs are skipped # here to avoid the problem but are kept in 'toolchain' so that # needed build tools are built. - ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _includes MK_CLANG=no MK_GCC=no - ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _libraries MK_CLANG=no MK_GCC=no - # Clean out improper TARGET=MACHINE files - ${_+_}cd ${.CURDIR}/gnu/usr.bin/cc/cc_tools; ${NXBTMAKE} cleandir + ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _includes MK_CLANG=no + ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _libraries MK_CLANG=no .if !defined(NO_OBJWALK) ${_+_}cd ${.CURDIR}; ${NXBMAKE} _obj .endif @@ -2832,12 +2798,6 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_secure_lib_libcrypto} ${_secure_lib_libssl} \ ${_lib_libldns} ${_secure_lib_libssh} -.if ${MK_GNUCXX} != "no" -_prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ -gnu/lib/libstdc++__L: lib/msun__L -gnu/lib/libsupc++__L: gnu/lib/libstdc++__L -.endif - .if ${MK_DIALOG} != "no" _prebuild_libs+= gnu/lib/libdialog gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L @@ -2995,13 +2955,9 @@ lib/libradius__L: lib/libmd__L lib/libproc__L: \ ${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} lib/libelf__L lib/librtld_db__L lib/libutil__L -.if ${MK_CXX} != "no" -.if ${MK_LIBCPLUSPLUS} != "no" +.if ${MK_CXX} != "no" && ${MK_LIBCPLUSPLUS} != "no" lib/libproc__L: lib/libcxxrt__L -.else # This implies MK_GNUCXX != "no"; see lib/libproc -lib/libproc__L: gnu/lib/libsupc++__L .endif -.endif .for _lib in ${_prereq_libs} ${_lib}__PL: .PHONY .MAKE @@ -3358,7 +3314,6 @@ _xb-worldtmp: .PHONY _xb-bootstrap-tools: .PHONY .for _tool in \ ${_clang_tblgen} \ - ${_gperf} \ ${_yacc} ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ @@ -3377,8 +3332,7 @@ XDEVDIRS= \ ${_binutils} \ ${_elftctools} \ usr.bin/ar \ - ${_clang} \ - ${_gcc} + ${_clang} _xb-cross-tools: .PHONY .for _tool in ${XDEVDIRS} Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Feb 28 22:00:50 2020 (r358453) +++ head/ObsoleteFiles.inc Sat Feb 29 03:25:51 2020 (r358454) @@ -36,6 +36,621 @@ # xargs -n1 | sort | uniq -d; # done +# 20200229: GCC 4.2.1 removed +.if !defined(WITH_PORT_BASE_GCC) +OLD_FILES+=usr/bin/g++ +OLD_FILES+=usr/bin/gcc +OLD_FILES+=usr/share/man/man1/g++.1.gz +OLD_FILES+=usr/share/man/man1/gcc.1.gz +.endif +OLD_FILES+=usr/bin/gcpp +OLD_FILES+=usr/bin/gperf +OLD_FILES+=usr/include/c++/4.2/algorithm +OLD_FILES+=usr/include/c++/4.2/backward/algo.h +OLD_FILES+=usr/include/c++/4.2/backward/algobase.h +OLD_FILES+=usr/include/c++/4.2/backward/alloc.h +OLD_FILES+=usr/include/c++/4.2/backward/backward_warning.h +OLD_FILES+=usr/include/c++/4.2/backward/bvector.h +OLD_FILES+=usr/include/c++/4.2/backward/complex.h +OLD_FILES+=usr/include/c++/4.2/backward/defalloc.h +OLD_FILES+=usr/include/c++/4.2/backward/deque.h +OLD_FILES+=usr/include/c++/4.2/backward/fstream.h +OLD_FILES+=usr/include/c++/4.2/backward/function.h +OLD_FILES+=usr/include/c++/4.2/backward/hash_map.h +OLD_FILES+=usr/include/c++/4.2/backward/hash_set.h +OLD_FILES+=usr/include/c++/4.2/backward/hashtable.h +OLD_FILES+=usr/include/c++/4.2/backward/heap.h +OLD_FILES+=usr/include/c++/4.2/backward/iomanip.h +OLD_FILES+=usr/include/c++/4.2/backward/iostream.h +OLD_FILES+=usr/include/c++/4.2/backward/istream.h +OLD_FILES+=usr/include/c++/4.2/backward/iterator.h +OLD_FILES+=usr/include/c++/4.2/backward/list.h +OLD_FILES+=usr/include/c++/4.2/backward/map.h +OLD_FILES+=usr/include/c++/4.2/backward/multimap.h +OLD_FILES+=usr/include/c++/4.2/backward/multiset.h +OLD_FILES+=usr/include/c++/4.2/backward/new.h +OLD_FILES+=usr/include/c++/4.2/backward/ostream.h +OLD_FILES+=usr/include/c++/4.2/backward/pair.h +OLD_FILES+=usr/include/c++/4.2/backward/queue.h +OLD_FILES+=usr/include/c++/4.2/backward/rope.h +OLD_FILES+=usr/include/c++/4.2/backward/set.h +OLD_FILES+=usr/include/c++/4.2/backward/slist.h +OLD_FILES+=usr/include/c++/4.2/backward/stack.h +OLD_FILES+=usr/include/c++/4.2/backward/stream.h +OLD_FILES+=usr/include/c++/4.2/backward/streambuf.h +OLD_FILES+=usr/include/c++/4.2/backward/strstream +OLD_FILES+=usr/include/c++/4.2/backward/tempbuf.h +OLD_FILES+=usr/include/c++/4.2/backward/tree.h +OLD_FILES+=usr/include/c++/4.2/backward/vector.h +OLD_FILES+=usr/include/c++/4.2/bits/allocator.h +OLD_FILES+=usr/include/c++/4.2/bits/atomic_word.h +OLD_FILES+=usr/include/c++/4.2/bits/basic_file.h +OLD_FILES+=usr/include/c++/4.2/bits/basic_ios.h +OLD_FILES+=usr/include/c++/4.2/bits/basic_ios.tcc +OLD_FILES+=usr/include/c++/4.2/bits/basic_string.h +OLD_FILES+=usr/include/c++/4.2/bits/basic_string.tcc +OLD_FILES+=usr/include/c++/4.2/bits/boost_concept_check.h +OLD_FILES+=usr/include/c++/4.2/bits/c++allocator.h +OLD_FILES+=usr/include/c++/4.2/bits/c++config.h +OLD_FILES+=usr/include/c++/4.2/bits/c++io.h +OLD_FILES+=usr/include/c++/4.2/bits/c++locale.h +OLD_FILES+=usr/include/c++/4.2/bits/c++locale_internal.h +OLD_FILES+=usr/include/c++/4.2/bits/char_traits.h +OLD_FILES+=usr/include/c++/4.2/bits/cmath.tcc +OLD_FILES+=usr/include/c++/4.2/bits/codecvt.h +OLD_FILES+=usr/include/c++/4.2/bits/compatibility.h +OLD_FILES+=usr/include/c++/4.2/bits/concept_check.h +OLD_FILES+=usr/include/c++/4.2/bits/cpp_type_traits.h +OLD_FILES+=usr/include/c++/4.2/bits/cpu_defines.h +OLD_FILES+=usr/include/c++/4.2/bits/ctype_base.h +OLD_FILES+=usr/include/c++/4.2/bits/ctype_inline.h +OLD_FILES+=usr/include/c++/4.2/bits/ctype_noninline.h +OLD_FILES+=usr/include/c++/4.2/bits/cxxabi_tweaks.h +OLD_FILES+=usr/include/c++/4.2/bits/deque.tcc +OLD_FILES+=usr/include/c++/4.2/bits/fstream.tcc +OLD_FILES+=usr/include/c++/4.2/bits/functexcept.h +OLD_FILES+=usr/include/c++/4.2/bits/gslice.h +OLD_FILES+=usr/include/c++/4.2/bits/gslice_array.h +OLD_FILES+=usr/include/c++/4.2/bits/gthr-default.h +OLD_FILES+=usr/include/c++/4.2/bits/gthr-posix.h +OLD_FILES+=usr/include/c++/4.2/bits/gthr-single.h +OLD_FILES+=usr/include/c++/4.2/bits/gthr-tpf.h +OLD_FILES+=usr/include/c++/4.2/bits/gthr.h +OLD_FILES+=usr/include/c++/4.2/bits/indirect_array.h +OLD_FILES+=usr/include/c++/4.2/bits/ios_base.h +OLD_FILES+=usr/include/c++/4.2/bits/istream.tcc +OLD_FILES+=usr/include/c++/4.2/bits/list.tcc +OLD_FILES+=usr/include/c++/4.2/bits/locale_classes.h +OLD_FILES+=usr/include/c++/4.2/bits/locale_facets.h +OLD_FILES+=usr/include/c++/4.2/bits/locale_facets.tcc +OLD_FILES+=usr/include/c++/4.2/bits/localefwd.h +OLD_FILES+=usr/include/c++/4.2/bits/mask_array.h +OLD_FILES+=usr/include/c++/4.2/bits/messages_members.h +OLD_FILES+=usr/include/c++/4.2/bits/os_defines.h +OLD_FILES+=usr/include/c++/4.2/bits/ostream.tcc +OLD_FILES+=usr/include/c++/4.2/bits/ostream_insert.h +OLD_FILES+=usr/include/c++/4.2/bits/postypes.h +OLD_FILES+=usr/include/c++/4.2/bits/slice_array.h +OLD_FILES+=usr/include/c++/4.2/bits/sstream.tcc +OLD_FILES+=usr/include/c++/4.2/bits/stl_algo.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_algobase.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_bvector.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_construct.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_deque.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_function.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_heap.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_iterator.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_iterator_base_funcs.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_iterator_base_types.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_list.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_map.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_multimap.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_multiset.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_numeric.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_pair.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_queue.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_raw_storage_iter.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_relops.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_set.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_stack.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_tempbuf.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_tree.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_uninitialized.h +OLD_FILES+=usr/include/c++/4.2/bits/stl_vector.h +OLD_FILES+=usr/include/c++/4.2/bits/stream_iterator.h +OLD_FILES+=usr/include/c++/4.2/bits/streambuf.tcc +OLD_FILES+=usr/include/c++/4.2/bits/streambuf_iterator.h +OLD_FILES+=usr/include/c++/4.2/bits/stringfwd.h +OLD_FILES+=usr/include/c++/4.2/bits/time_members.h +OLD_FILES+=usr/include/c++/4.2/bits/valarray_after.h +OLD_FILES+=usr/include/c++/4.2/bits/valarray_array.h +OLD_FILES+=usr/include/c++/4.2/bits/valarray_array.tcc +OLD_FILES+=usr/include/c++/4.2/bits/valarray_before.h +OLD_FILES+=usr/include/c++/4.2/bits/vector.tcc +OLD_FILES+=usr/include/c++/4.2/bitset +OLD_FILES+=usr/include/c++/4.2/cassert +OLD_FILES+=usr/include/c++/4.2/cctype +OLD_FILES+=usr/include/c++/4.2/cerrno +OLD_FILES+=usr/include/c++/4.2/cfloat +OLD_FILES+=usr/include/c++/4.2/ciso646 +OLD_FILES+=usr/include/c++/4.2/climits +OLD_FILES+=usr/include/c++/4.2/clocale +OLD_FILES+=usr/include/c++/4.2/cmath +OLD_FILES+=usr/include/c++/4.2/complex +OLD_FILES+=usr/include/c++/4.2/csetjmp +OLD_FILES+=usr/include/c++/4.2/csignal +OLD_FILES+=usr/include/c++/4.2/cstdarg +OLD_FILES+=usr/include/c++/4.2/cstddef +OLD_FILES+=usr/include/c++/4.2/cstdio +OLD_FILES+=usr/include/c++/4.2/cstdlib +OLD_FILES+=usr/include/c++/4.2/cstring +OLD_FILES+=usr/include/c++/4.2/ctime +OLD_FILES+=usr/include/c++/4.2/cwchar +OLD_FILES+=usr/include/c++/4.2/cwctype +OLD_FILES+=usr/include/c++/4.2/cxxabi.h +OLD_FILES+=usr/include/c++/4.2/debug/bitset +OLD_FILES+=usr/include/c++/4.2/debug/debug.h +OLD_FILES+=usr/include/c++/4.2/debug/deque +OLD_FILES+=usr/include/c++/4.2/debug/formatter.h +OLD_FILES+=usr/include/c++/4.2/debug/functions.h +OLD_FILES+=usr/include/c++/4.2/debug/hash_map +OLD_FILES+=usr/include/c++/4.2/debug/hash_map.h +OLD_FILES+=usr/include/c++/4.2/debug/hash_multimap.h +OLD_FILES+=usr/include/c++/4.2/debug/hash_multiset.h +OLD_FILES+=usr/include/c++/4.2/debug/hash_set +OLD_FILES+=usr/include/c++/4.2/debug/hash_set.h +OLD_FILES+=usr/include/c++/4.2/debug/list +OLD_FILES+=usr/include/c++/4.2/debug/macros.h +OLD_FILES+=usr/include/c++/4.2/debug/map +OLD_FILES+=usr/include/c++/4.2/debug/map.h +OLD_FILES+=usr/include/c++/4.2/debug/multimap.h +OLD_FILES+=usr/include/c++/4.2/debug/multiset.h +OLD_FILES+=usr/include/c++/4.2/debug/safe_base.h +OLD_FILES+=usr/include/c++/4.2/debug/safe_iterator.h +OLD_FILES+=usr/include/c++/4.2/debug/safe_iterator.tcc +OLD_FILES+=usr/include/c++/4.2/debug/safe_sequence.h +OLD_FILES+=usr/include/c++/4.2/debug/set +OLD_FILES+=usr/include/c++/4.2/debug/set.h +OLD_FILES+=usr/include/c++/4.2/debug/string +OLD_FILES+=usr/include/c++/4.2/debug/vector +OLD_FILES+=usr/include/c++/4.2/deque +OLD_FILES+=usr/include/c++/4.2/exception +OLD_FILES+=usr/include/c++/4.2/exception_defines.h +OLD_FILES+=usr/include/c++/4.2/ext/algorithm +OLD_FILES+=usr/include/c++/4.2/ext/array_allocator.h +OLD_FILES+=usr/include/c++/4.2/ext/atomicity.h +OLD_FILES+=usr/include/c++/4.2/ext/bitmap_allocator.h +OLD_FILES+=usr/include/c++/4.2/ext/codecvt_specializations.h +OLD_FILES+=usr/include/c++/4.2/ext/concurrence.h +OLD_FILES+=usr/include/c++/4.2/ext/debug_allocator.h +OLD_FILES+=usr/include/c++/4.2/ext/functional +OLD_FILES+=usr/include/c++/4.2/ext/hash_fun.h +OLD_FILES+=usr/include/c++/4.2/ext/hash_map +OLD_FILES+=usr/include/c++/4.2/ext/hash_set +OLD_FILES+=usr/include/c++/4.2/ext/hashtable.h +OLD_FILES+=usr/include/c++/4.2/ext/iterator +OLD_FILES+=usr/include/c++/4.2/ext/malloc_allocator.h +OLD_FILES+=usr/include/c++/4.2/ext/memory +OLD_FILES+=usr/include/c++/4.2/ext/mt_allocator.h +OLD_FILES+=usr/include/c++/4.2/ext/new_allocator.h +OLD_FILES+=usr/include/c++/4.2/ext/numeric +OLD_FILES+=usr/include/c++/4.2/ext/numeric_traits.h +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/assoc_container.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/basic_tree_policy/traits.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/basic_types.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/traits.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/const_iterator.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/entry_pred.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/resize_policy.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/standard_policies.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/cond_dealtor.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/container_base_dispatch.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/eq_fn/eq_by_less.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/standard_policies.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/lu_map_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_policy/counter_lu_policy_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_policy/mtf_lu_policy_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/map_debug_base.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_/cond_dtor.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_/traits.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/child_iterator.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/cond_dtor_entry_dealtor.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/const_child_iterator.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/head.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/internal_node.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/leaf.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/node_base.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/node_iterators.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/point_iterators.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/traits.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/priority_queue_base_dispatch.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rb_tree_map_/node.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rb_tree_map_/traits.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/resize_policy/sample_size_policy.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_/node.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_/traits.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/standard_policies.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/tree_policy/null_node_update_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/tree_trace_base.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/trie_policy/null_node_update_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/trie_policy/sample_trie_e_access_traits.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/trie_policy/string_trie_e_access_traits_imp.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/type_utils.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/types_traits.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/unordered_iterator/const_point_iterator.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/unordered_iterator/iterator.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/exception.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/hash_policy.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/list_update_policy.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/priority_queue.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/tag_and_trait.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/tree_policy.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pb_ds/trie_policy.hpp +OLD_FILES+=usr/include/c++/4.2/ext/pod_char_traits.h +OLD_FILES+=usr/include/c++/4.2/ext/pool_allocator.h +OLD_FILES+=usr/include/c++/4.2/ext/rb_tree +OLD_FILES+=usr/include/c++/4.2/ext/rc_string_base.h +OLD_FILES+=usr/include/c++/4.2/ext/rope +OLD_FILES+=usr/include/c++/4.2/ext/ropeimpl.h +OLD_FILES+=usr/include/c++/4.2/ext/slist +OLD_FILES+=usr/include/c++/4.2/ext/sso_string_base.h +OLD_FILES+=usr/include/c++/4.2/ext/stdio_filebuf.h +OLD_FILES+=usr/include/c++/4.2/ext/stdio_sync_filebuf.h +OLD_FILES+=usr/include/c++/4.2/ext/throw_allocator.h +OLD_FILES+=usr/include/c++/4.2/ext/type_traits.h +OLD_FILES+=usr/include/c++/4.2/ext/typelist.h +OLD_FILES+=usr/include/c++/4.2/ext/vstring.h +OLD_FILES+=usr/include/c++/4.2/ext/vstring.tcc +OLD_FILES+=usr/include/c++/4.2/ext/vstring_fwd.h +OLD_FILES+=usr/include/c++/4.2/ext/vstring_util.h +OLD_FILES+=usr/include/c++/4.2/fstream +OLD_FILES+=usr/include/c++/4.2/functional +OLD_FILES+=usr/include/c++/4.2/iomanip +OLD_FILES+=usr/include/c++/4.2/ios +OLD_FILES+=usr/include/c++/4.2/iosfwd +OLD_FILES+=usr/include/c++/4.2/iostream +OLD_FILES+=usr/include/c++/4.2/istream +OLD_FILES+=usr/include/c++/4.2/iterator +OLD_FILES+=usr/include/c++/4.2/limits +OLD_FILES+=usr/include/c++/4.2/list +OLD_FILES+=usr/include/c++/4.2/locale +OLD_FILES+=usr/include/c++/4.2/map +OLD_FILES+=usr/include/c++/4.2/memory +OLD_FILES+=usr/include/c++/4.2/new +OLD_FILES+=usr/include/c++/4.2/numeric +OLD_FILES+=usr/include/c++/4.2/ostream +OLD_FILES+=usr/include/c++/4.2/queue +OLD_FILES+=usr/include/c++/4.2/set +OLD_FILES+=usr/include/c++/4.2/sstream +OLD_FILES+=usr/include/c++/4.2/stack +OLD_FILES+=usr/include/c++/4.2/stdexcept +OLD_FILES+=usr/include/c++/4.2/streambuf +OLD_FILES+=usr/include/c++/4.2/string +OLD_FILES+=usr/include/c++/4.2/tr1/array +OLD_FILES+=usr/include/c++/4.2/tr1/bind_iterate.h +OLD_FILES+=usr/include/c++/4.2/tr1/bind_repeat.h +OLD_FILES+=usr/include/c++/4.2/tr1/boost_shared_ptr.h +OLD_FILES+=usr/include/c++/4.2/tr1/cctype +OLD_FILES+=usr/include/c++/4.2/tr1/cfenv +OLD_FILES+=usr/include/c++/4.2/tr1/cfloat +OLD_FILES+=usr/include/c++/4.2/tr1/cinttypes +OLD_FILES+=usr/include/c++/4.2/tr1/climits +OLD_FILES+=usr/include/c++/4.2/tr1/cmath +OLD_FILES+=usr/include/c++/4.2/tr1/common.h +OLD_FILES+=usr/include/c++/4.2/tr1/complex +OLD_FILES+=usr/include/c++/4.2/tr1/cstdarg +OLD_FILES+=usr/include/c++/4.2/tr1/cstdbool +OLD_FILES+=usr/include/c++/4.2/tr1/cstdint +OLD_FILES+=usr/include/c++/4.2/tr1/cstdio +OLD_FILES+=usr/include/c++/4.2/tr1/cstdlib +OLD_FILES+=usr/include/c++/4.2/tr1/ctgmath +OLD_FILES+=usr/include/c++/4.2/tr1/ctime +OLD_FILES+=usr/include/c++/4.2/tr1/ctype.h +OLD_FILES+=usr/include/c++/4.2/tr1/cwchar +OLD_FILES+=usr/include/c++/4.2/tr1/cwctype +OLD_FILES+=usr/include/c++/4.2/tr1/fenv.h +OLD_FILES+=usr/include/c++/4.2/tr1/float.h +OLD_FILES+=usr/include/c++/4.2/tr1/functional +OLD_FILES+=usr/include/c++/4.2/tr1/functional_hash.h +OLD_FILES+=usr/include/c++/4.2/tr1/functional_iterate.h +OLD_FILES+=usr/include/c++/4.2/tr1/hashtable +OLD_FILES+=usr/include/c++/4.2/tr1/hashtable_policy.h +OLD_FILES+=usr/include/c++/4.2/tr1/inttypes.h +OLD_FILES+=usr/include/c++/4.2/tr1/limits.h +OLD_FILES+=usr/include/c++/4.2/tr1/math.h +OLD_FILES+=usr/include/c++/4.2/tr1/memory +OLD_FILES+=usr/include/c++/4.2/tr1/mu_iterate.h +OLD_FILES+=usr/include/c++/4.2/tr1/random +OLD_FILES+=usr/include/c++/4.2/tr1/random.tcc +OLD_FILES+=usr/include/c++/4.2/tr1/ref_fwd.h +OLD_FILES+=usr/include/c++/4.2/tr1/ref_wrap_iterate.h +OLD_FILES+=usr/include/c++/4.2/tr1/repeat.h +OLD_FILES+=usr/include/c++/4.2/tr1/stdarg.h +OLD_FILES+=usr/include/c++/4.2/tr1/stdbool.h +OLD_FILES+=usr/include/c++/4.2/tr1/stdint.h +OLD_FILES+=usr/include/c++/4.2/tr1/stdio.h +OLD_FILES+=usr/include/c++/4.2/tr1/stdlib.h +OLD_FILES+=usr/include/c++/4.2/tr1/tgmath.h +OLD_FILES+=usr/include/c++/4.2/tr1/tuple +OLD_FILES+=usr/include/c++/4.2/tr1/tuple_defs.h +OLD_FILES+=usr/include/c++/4.2/tr1/tuple_iterate.h +OLD_FILES+=usr/include/c++/4.2/tr1/type_traits +OLD_FILES+=usr/include/c++/4.2/tr1/type_traits_fwd.h +OLD_FILES+=usr/include/c++/4.2/tr1/unordered_map +OLD_FILES+=usr/include/c++/4.2/tr1/unordered_set +OLD_FILES+=usr/include/c++/4.2/tr1/utility +OLD_FILES+=usr/include/c++/4.2/tr1/wchar.h +OLD_FILES+=usr/include/c++/4.2/tr1/wctype.h +OLD_FILES+=usr/include/c++/4.2/typeinfo +OLD_FILES+=usr/include/c++/4.2/utility +OLD_FILES+=usr/include/c++/4.2/valarray +OLD_FILES+=usr/include/c++/4.2/vector +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/gcc/4.2/__wmmintrin_aes.h +OLD_FILES+=usr/include/gcc/4.2/__wmmintrin_pclmul.h +OLD_FILES+=usr/include/gcc/4.2/ammintrin.h +OLD_FILES+=usr/include/gcc/4.2/emmintrin.h +OLD_FILES+=usr/include/gcc/4.2/mm3dnow.h +OLD_FILES+=usr/include/gcc/4.2/mm_malloc.h +OLD_FILES+=usr/include/gcc/4.2/mmintrin.h +OLD_FILES+=usr/include/gcc/4.2/pmmintrin.h +OLD_FILES+=usr/include/gcc/4.2/tmmintrin.h +OLD_FILES+=usr/include/gcc/4.2/wmmintrin.h +OLD_FILES+=usr/include/gcc/4.2/xmmintrin.h +.elif ${TARGET_ARCH} == "arm" +OLD_FILES+=usr/include/gcc/4.2/mmintrin.h +.elif ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64" +OLD_FILES+=usr/include/gcc/4.2/altivec.h +OLD_FILES+=usr/include/gcc/4.2/ppc-asm.h +OLD_FILES+=usr/include/gcc/4.2/spe.h +.endif +OLD_FILES+=usr/lib/libgcov.a +OLD_FILES+=usr/lib/libgomp.a +OLD_FILES+=usr/lib/libstdc++.a +OLD_FILES+=usr/lib/libstdc++.so +OLD_LIBS+=usr/lib/libstdc++.so.6 +OLD_FILES+=usr/lib/libstdc++_p.a +OLD_FILES+=usr/lib/libsupc++.a +OLD_FILES+=usr/lib/libsupc++.so +OLD_LIBS+=usr/lib/libsupc++.so.1 +OLD_FILES+=usr/lib/libsupc++_p.a +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" +OLD_FILES+=usr/lib32/libstdc++.a +OLD_FILES+=usr/lib32/libstdc++.so +OLD_LIBS+=usr/lib32/libstdc++.so.6 +OLD_FILES+=usr/lib32/libstdc++_p.a +OLD_FILES+=usr/lib32/libsupc++.a +OLD_FILES+=usr/lib32/libsupc++.so +OLD_LIBS+=usr/lib32/libsupc++.so.1 +OLD_FILES+=usr/lib32/libsupc++_p.a +.endif +OLD_FILES+=usr/libexec/cc1plus +OLD_LIBS+=usr/lib/libgomp.so.1 +OLD_FILES+=usr/lib/libgomp_p.a +OLD_FILES+=usr/lib32/libgcov.a +OLD_FILES+=usr/lib32/libgomp.a +OLD_LIBS+=usr/lib32/libgomp.so.1 +OLD_FILES+=usr/lib32/libgomp_p.a +OLD_FILES+=usr/libexec/cc1 +OLD_FILES+=usr/libexec/cc1plus +OLD_FILES+=usr/share/man/man1/gcpp.1.gz +OLD_FILES+=usr/share/man/man1/gperf.1.gz +OLD_FILES+=usr/share/man/man1/gperf.7.gz + # 20200220: Upgrade of ncurses, shlib bumped to version 9 OLD_LIBS+=lib/libncurses.so.8 OLD_LIBS+=lib/libncursesw.so.8 Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Feb 28 22:00:50 2020 (r358453) +++ head/UPDATING Sat Feb 29 03:25:51 2020 (r358454) @@ -26,6 +26,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20200229: + GCC 4.2.1 has been removed from the tree. The WITH_GCC, + WITH_GCC_BOOTSTRAP, and WITH_GNUCXX options are no longer available. + Users who wish to build FreeBSD with GCC must use the external toolchain + ports or packages. + 20200220: ncurses has been updated to a newer version (6.2-20200215). Given the ABI has changed, users will have to rebuild all the ports that are linked to Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Fri Feb 28 22:00:50 2020 (r358453) +++ head/etc/mtree/BSD.include.dist Sat Feb 29 03:25:51 2020 (r358454) @@ -16,68 +16,6 @@ bsnmp .. c++ - 4.2 - backward - .. - bits - .. - debug - .. - ext - pb_ds - detail - basic_tree_policy - .. - bin_search_tree_ - .. - binary_heap_ - .. - binomial_heap_ - .. - binomial_heap_base_ - .. - cc_hash_table_map_ - .. - eq_fn - .. - gp_hash_table_map_ - .. - hash_fn - .. - left_child_next_sibling_heap_ - .. - list_update_map_ - .. - list_update_policy - .. - ov_tree_map_ - .. - pairing_heap_ - .. - pat_trie_ - .. - rb_tree_map_ - .. - rc_binomial_heap_ - .. - resize_policy - .. - splay_tree_ - .. - thin_heap_ - .. - tree_policy - .. - trie_policy - .. - unordered_iterator - .. - .. - .. - .. - tr1 - .. - .. v1 experimental .. Modified: head/gnu/lib/Makefile ============================================================================== --- head/gnu/lib/Makefile Fri Feb 28 22:00:50 2020 (r358453) +++ head/gnu/lib/Makefile Sat Feb 29 03:25:51 2020 (r358454) @@ -4,22 +4,11 @@ SUBDIR= SUBDIR.${MK_DIALOG}+= libdialog -SUBDIR.${MK_GCC}+= libgcov -.if ${MK_GCC} != "no" && ${MK_OPENMP} == "no" -SUBDIR+= libgomp -.endif SUBDIR.${MK_TESTS}+= tests .if ${MK_GNU_GREP} != "no" || ${MK_GNU_GREP_COMPAT} != "no" || \ ${MK_GDB} != "no" SUBDIR+= libregex -.endif - -# libsupc++ uses libstdc++ headers, although 'make includes' should -# have taken care of that already. -.if ${MK_GNUCXX} != "no" -SUBDIR+= libstdc++ libsupc++ -SUBDIR_DEPENDS_libsupc++:= libstdc++ .endif SUBDIR_PARALLEL= Modified: head/gnu/usr.bin/Makefile ============================================================================== --- head/gnu/usr.bin/Makefile Fri Feb 28 22:00:50 2020 (r358453) +++ head/gnu/usr.bin/Makefile Sat Feb 29 03:25:51 2020 (r358454) @@ -3,16 +3,11 @@ .include -.if ${MK_CXX} != "no" -SUBDIR.${MK_GCC}+= gperf -.endif - .if ${MK_GDB} != "no" || ${MK_BINUTILS} != "no" SUBDIR+= binutils .endif SUBDIR.${MK_DIALOG}+= dialog -SUBDIR.${MK_GCC}+= cc SUBDIR.${MK_GNU_DIFF}+= diff3 SUBDIR.${MK_GNU_GREP}+= grep SUBDIR.${MK_GDB}+= gdb Modified: head/share/mk/local.dirdeps.mk ============================================================================== --- head/share/mk/local.dirdeps.mk Fri Feb 28 22:00:50 2020 (r358453) +++ head/share/mk/local.dirdeps.mk Sat Feb 29 03:25:51 2020 (r358454) @@ -172,8 +172,6 @@ DIRDEPS+= ${C_DIRDEPS} DIRDEPS+= ${C_DIRDEPS} .if ${MK_CLANG} == "yes" DIRDEPS+= lib/libc++ lib/libcxxrt -.else -DIRDEPS+= gnu/lib/libstdc++ gnu/lib/libsupc++ .endif # XXX: Clang and GCC always adds -lm currently, even when not needed. DIRDEPS+= lib/msun Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Fri Feb 28 22:00:50 2020 (r358453) +++ head/share/mk/src.libnames.mk Sat Feb 29 03:25:51 2020 (r358454) @@ -564,12 +564,9 @@ LIBOPENSMDIR= ${OBJTOP}/lib/ofed/libopensm LIBOSMVENDORDIR=${OBJTOP}/lib/ofed/libvendor LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialog -LIBGCOVDIR= ${OBJTOP}/gnu/lib/libgcov -LIBGOMPDIR= ${OBJTOP}/gnu/lib/libgomp LIBGNUREGEXDIR= ${OBJTOP}/gnu/lib/libregex LIBSSPDIR= ${OBJTOP}/lib/libssp LIBSSP_NONSHAREDDIR= ${OBJTOP}/lib/libssp_nonshared -LIBSUPCPLUSPLUSDIR= ${OBJTOP}/gnu/lib/libsupc++ LIBASN1DIR= ${OBJTOP}/kerberos5/lib/libasn1 LIBGSSAPI_KRB5DIR= ${OBJTOP}/kerberos5/lib/libgssapi_krb5 LIBGSSAPI_NTLMDIR= ${OBJTOP}/kerberos5/lib/libgssapi_ntlm Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Feb 28 22:00:50 2020 (r358453) +++ head/share/mk/src.opts.mk Sat Feb 29 03:25:51 2020 (r358454) @@ -199,10 +199,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_EXTRAS \ DTRACE_TESTS \ EXPERIMENTAL \ - GCC \ - GCC_BOOTSTRAP \ - GCOV \ - GNUCXX \ GNU_GREP_COMPAT \ GPL_DTC \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Feb 29 03:32:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10311252AED for ; Sat, 29 Feb 2020 03:32:08 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TsQt2HWCz4K2Q; Sat, 29 Feb 2020 03:32:05 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 01T3VsH6000673 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 29 Feb 2020 03:31:56 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jkim@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 01T3VnRJ083490 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 29 Feb 2020 10:31:50 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Jung-uk Kim , src-committers@freebsd.org, svn-src-head@freebsd.org References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <056cfbda-1100-c1d6-15d6-b77cdb14001f@FreeBSD.org> <38d705b4-0b33-9147-b89b-366903211810@grosbein.net> <441b8ef9-4fb0-4926-47e6-10ccd909a70a@FreeBSD.org> From: Eugene Grosbein Message-ID: Date: Sat, 29 Feb 2020 10:31:39 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <441b8ef9-4fb0-4926-47e6-10ccd909a70a@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48TsQt2HWCz4K2Q X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.84)[ip: (-5.08), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.55), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 03:32:08 -0000 29.02.2020 1:13, Jung-uk Kim wrote: > On 20. 2. 28., Eugene Grosbein wrote: >> 28.02.2020 23:01, Jung-uk Kim wrote: >> >>>> Now I believe the only option is merge of new 1.1.1 SSL API to our sendmail. >>> >>> No, stable/11 will never be updated to OpenSSL 1.1.1 because of ABI >>> incompatibility. >> >> I'm not talking about upgrading base system OpenSSL to 1.1.1 in stable/11. >> >> I'm talking about switching base system Sendmail to 1.1.1 SSL API only >> because it is impossible building SASL with 1.1.1 and link it with sendmail using base openssl 1.0.2. >> >> This is real problem. > You should not link a binary with two ABI incompatible libraries. Yes. And this is what buildworld tries to do currently for stable/11 and SSL-enabled sendmail, and fails. From owner-svn-src-head@freebsd.org Sat Feb 29 03:34:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03FA8252D0E for ; Sat, 29 Feb 2020 03:34:51 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TsV11Bt4z4RB3; Sat, 29 Feb 2020 03:34:48 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 01T3YdRZ000726 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 29 Feb 2020 03:34:40 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: ume@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 01T3YdZU083515 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 29 Feb 2020 10:34:39 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Hajimu UMEMOTO , Jung-uk Kim References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> Cc: src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: Date: Sat, 29 Feb 2020 10:34:28 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48TsV11Bt4z4RB3 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.84)[ip: (-5.09), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.55), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 03:34:51 -0000 29.02.2020 0:34, Hajimu UMEMOTO wrote: > jkim> All you have to do is rebuilding security/cyrus-sasl2 with system > jkim> OpenSSL, i.e., disable SSL option. > > Perhaps, you mean: > > DEFAULT_VERSIONS= ssl=base > > I'm using base sendmail with cyrus-sasl2 quite well on 12-STABLE. > > % freebsd-version > 12.1-STABLE > % ldd /usr/libexec/sendmail/sendmail > /usr/libexec/sendmail/sendmail: > libsasl2.so.3 => /usr/local/lib/libsasl2.so.3 (0x8002ff000) > libutil.so.9 => /lib/libutil.so.9 (0x800320000) > libssl.so.111 => /usr/lib/libssl.so.111 (0x800337000) > libcrypto.so.111 => /lib/libcrypto.so.111 (0x8003cd000) > libwrap.so.6 => /usr/lib/libwrap.so.6 (0x8006ba000) > libc.so.7 => /lib/libc.so.7 (0x8006c5000) > libdl.so.1 => /usr/lib/libdl.so.1 (0x800abb000) > libthr.so.3 => /lib/libthr.so.3 (0x800abf000) Base openssl uses 1.1.x API in stable/12, so it does not conflict with SASL2 from ports using same API. Base openssl uses 1.0.2 API in stable/11, so it conflicts with SASL2 from ports using 1.1.1 SSL API and linked with openss from ports. From owner-svn-src-head@freebsd.org Sat Feb 29 03:43:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5139C2533F8; Sat, 29 Feb 2020 03:43:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Tsgq6B0Bz4g1Z; Sat, 29 Feb 2020 03:43:19 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 703BECB7A; Sat, 29 Feb 2020 03:43:19 +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 01T3hJFD006636; Sat, 29 Feb 2020 03:43:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01T3hJq2006635; Sat, 29 Feb 2020 03:43:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002290343.01T3hJq2006635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 29 Feb 2020 03:43:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358455 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 358455 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 03:43:20 -0000 Author: emaste Date: Sat Feb 29 03:43:18 2020 New Revision: 358455 URL: https://svnweb.freebsd.org/changeset/base/358455 Log: regen src.conf.5 after r358454, GCC 4.2.1 retirement Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Feb 29 03:25:51 2020 (r358454) +++ head/share/man/man5/src.conf.5 Sat Feb 29 03:43:18 2020 (r358455) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd February 26, 2020 +.Dd February 29, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -379,9 +379,6 @@ Do not install links to the Clang C/C++ compiler as .Pa /usr/bin/c++ and .Pa /usr/bin/cpp . -If -.Va WITH_GCC -is set then links to the GCC C/C++ compiler will be installed instead. .Pp This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf and mips/mips64hf. @@ -420,8 +417,6 @@ When set, it enforces these options: .It .Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP .It -.Va WITHOUT_GCC_BOOTSTRAP -.It .Va WITHOUT_LLD_BOOTSTRAP .El .It Va WITHOUT_CRYPT @@ -493,8 +488,6 @@ When set, it enforces these options: .It .Va WITHOUT_DTRACE_TESTS .It -.Va WITHOUT_GNUCXX -.It .Va WITHOUT_GOOGLETEST .It .Va WITHOUT_LLVM_COV @@ -697,18 +690,6 @@ and .Xr ftpd 8 . .It Va WITHOUT_GAMES Set to not build games. -.It Va WITH_GCC -Set to build and install gcc and g++. -This option is deprecated and will be removed before -.Fx 13 . -.It Va WITH_GCC_BOOTSTRAP -Set to build gcc and g++ as part of the bootstrap process. -This option is deprecated and will be removed before -.Fx 13 . -.It Va WITH_GCOV -Build and install the GNU -.Xr gcov 1 -tool. .It Va WITHOUT_GDB Set to not build .Xr gdb 1 . @@ -726,10 +707,6 @@ Set to install .Xr gdb 1 into .Pa /usr/bin . -.It Va WITH_GNUCXX -Build the GNU C++ stack (g++, libstdc++). -This option is deprecated and will be removed before -.Fx 13 . .It Va WITHOUT_GNU_DIFF Set to not build GNU .Xr diff 1 @@ -1623,9 +1600,7 @@ This does not prevent a compiler from being built for only for building one for the build itself. The .Va WITHOUT_CLANG -and -.Va WITHOUT_GCC -options control those. +option controls that. .It Va WITHOUT_SYSTEM_LINKER Set to not opportunistically skip building a cross-linker during the bootstrap phase of the build. @@ -1719,8 +1694,6 @@ When set, it enforces these options: .Va WITHOUT_CLANG_EXTRAS .It .Va WITHOUT_CLANG_FULL -.It -.Va WITHOUT_GCC .It .Va WITHOUT_GDB .It From owner-svn-src-head@freebsd.org Sat Feb 29 04:05:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 04215254471 for ; Sat, 29 Feb 2020 04:05:28 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Tt9M6CZVz4HrT; Sat, 29 Feb 2020 04:05:27 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from vsuiko.mahoroba.org (vsuiko.mahoroba.org [IPv6:2001:2f0:104:8010:a00:27ff:feb0:c2e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: ume) by smtp.freebsd.org (Postfix) with ESMTPSA id EA8A68017; Sat, 29 Feb 2020 04:05:26 +0000 (UTC) (envelope-from ume@FreeBSD.org) Date: Sat, 29 Feb 2020 13:05:21 +0900 Message-ID: From: Hajimu UMEMOTO To: Eugene Grosbein Cc: Jung-uk Kim , src-committers@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358411 - head/contrib/sendmail/src In-Reply-To: References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> User-Agent: xcite1.60> Wanderlust/2.15.9 (Almost Unreal) Emacs/26.3 Mule/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 12.1-STABLE X-PGP-Key: http://www.mahoroba.org/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 04:05:28 -0000 Hi, >>>>> On Sat, 29 Feb 2020 10:34:28 +0700 >>>>> Eugene Grosbein said: eugen> Base openssl uses 1.1.x API in stable/12, so it does not conflict with SASL2 from ports using same API. eugen> Base openssl uses 1.0.2 API in stable/11, so it conflicts with SASL2 from ports using 1.1.1 SSL API and linked with openss from ports. No, I used to use base sendmail with cyrus-sasl2 on 11-STABLE as well. You should not specify other than "DEFAULT_VERSIONS= ssl=base". Sincerely, -- Hajimu UMEMOTO ume@mahoroba.org ume@FreeBSD.org http://www.mahoroba.org/~ume/ From owner-svn-src-head@freebsd.org Sat Feb 29 06:03:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80348256A7D for ; Sat, 29 Feb 2020 06:03:48 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-8.consmr.mail.gq1.yahoo.com (sonic316-8.consmr.mail.gq1.yahoo.com [98.137.69.32]) (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 48Twnv2PBhz3Fym for ; Sat, 29 Feb 2020 06:03:47 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: MfleSNAVM1kbsd0LIuH4Bs5xnuXT9v5f8dZj1yv74fRi1b.wWym1NGDuxd41gGG y2ki6yOtq7OR6OPEc6_95YHmNAA6_yFmaPqKp5aUxbTMxyjqVsqYuaclV42NB5S3XOEv3z.2HUss p2FOaCXW_GpL5ztg_1a6XVt91HSPFsk7MocxkZLHSg9k8QbFetWEyVEB.lcRpC6f03jSY2XbWf0p Cq3Km2CYmb6jqh9a3prXxII17_Mb45DIbpsevvXFYlff_gUI58Y4teXcxKj7WX5mPM62UwisNQhl _6j993955hu.43KkyYYDU1PSKrzhN6wk3f9mOw52UXhLr.h6jSuUcaoKozQiVXZxjEdGnEXofQLa fuKcaTwfnJy53I7HJxg2dnzSJfarjDJfQuhtJJIRT8eD5hUIiDGR9lwP.1n.yfgeRSY8uP9ZZYXY YJAjERfwNqcIGgZCp8UcapUo3LJvjC1kumTsOPUBr74Mr_jzLXDNJNTSKFi9zJwxViybQkyDK1jK bonx_Bbt82_Z2Eu5nG4rMghtMjoM54mCH6BWqPBk5MrIDVMoxN1obn9A73LskkRlSJUF_o4h9ePX wIDtX.nW0TeahLVZqIcvzjd844i1zjZTQziBxwJ9Zxieu5k3zH7gBBe7xuX9M.39YdthhVcVfWN_ L8blHx4DT7IksfzUTFdB3YWhYIscq_gqhi2HLwj61_UT3BL5qiE4rCynq3fhdNZHyfuZLH3gx9wI qVviRnXBmmk0A9sI_.n7lo2jPBHslf1ctLDLopu5xW.xv..ik8k3cPAAigTt1yl7EOsCyEovW6Gn ccYpeBjJ0f3PHNKbO.kvHNxSyMo51ZrNST0a3W0qS3R5bG4jAeDYH4uy5D8g_PzL.5KaXjBn52uC rEeQtu7kGRATDGstgwvsVnlmPUyFe3.371vOrQGlCs5hnaVLXVjQVVEh5dO7FFMV5FcJirbvBA0f KlU7FXr0RyTLVqQNi8HbzrTd1KpLytqkc8NhgTL3hZNNkVP2kYIu61ulGpFq5KfeGsuUYoUr8uoO U01g7pjj9uAwNWG8eaxV5XYb2QT4mk9BC.AmfZQVNwS55JiQsiOMSd6f_on3cJdkeeX2ubCDScdJ uAka._DP96pE1ClEXU408CzFKnePsBPICnUj6npRqXvWH0wrKh4xpxO.TFDmiH7l44Cp44LEVoV4 _w6S2_y70ivAAJvcGq50r4sW6euqXTYzqEH2Ks6DA79hhNDST2K0sdXaoQmOmi0idwPPIFdxktLN woOiCdS7z74wSjPmkbtkWR1SwgrMP21jCL9ckPdtOPk2flyjJx6pc62dAnzt5b3vB3s_gBQgVQUS c9EiND2Z1RnSHUXp_njFYt5jMSWJAV5pLnx.mG6g5oRaTkBRlaewvGwOGOCz.VVUNU8GvNAMGREi Eo4EqBOl12xy9EUVdXbIcJ4RsoK4mP.2CPrXZvmRsy4PCCDzylwD4Ox9K18L36A-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Sat, 29 Feb 2020 06:03:45 +0000 Received: by smtp432.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID d4cd289ca6f27d15bd27101f1dc90863; Sat, 29 Feb 2020 06:03:42 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358454 - in head: . etc/mtree gnu/lib gnu/lib/libgcov gnu/lib/libgomp gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/usr.bin gnu/usr.bin/cc gnu/usr.bin/gperf share/mk targets/pseudo/bootstrap... Message-Id: Date: Fri, 28 Feb 2020 22:03:40 -0800 To: Ed Maste , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3608.60.0.2.5) References: X-Rspamd-Queue-Id: 48Twnv2PBhz3Fym X-Spamd-Bar: / X-Spamd-Result: default: False [0.22 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; LONG_SUBJ(1.52)[202]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.22)[-0.219,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.58)[-0.576,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (5.25), ipnet: 98.137.64.0/21(0.83), asn: 36647(0.66), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[32.69.137.98.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 06:03:48 -0000 In cleaning out my old gcc 4.2.1 related material I have patches in places that have not been deleted: M /usr/src/contrib/gcc/unwind-dw2.c M /usr/src/contrib/gcc/unwind-dw2.h Is /head/contrib/gcc deliberately being kept? (binutils needing it for ld for 32-bit powerpc? System gdb needing it?) I do not have patches below /head/contrib/gcclibs but it exists as well. Similar questions, I guess. (I've still got things back at head -r358132 but am cleaning things out well before I update.) === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Sat Feb 29 12:40:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2D2D25E815; Sat, 29 Feb 2020 12:40:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48V5bc1rGwz3PFF; Sat, 29 Feb 2020 12:40: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E75A01ACDB; Sat, 29 Feb 2020 12:40: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 01TCeRwN023646; Sat, 29 Feb 2020 12:40:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TCeRU7023645; Sat, 29 Feb 2020 12:40:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002291240.01TCeRU7023645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 29 Feb 2020 12:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358459 - in head/contrib: gcc gcclibs X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/contrib: gcc gcclibs X-SVN-Commit-Revision: 358459 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 12:40:28 -0000 Author: emaste Date: Sat Feb 29 12:40:27 2020 New Revision: 358459 URL: https://svnweb.freebsd.org/changeset/base/358459 Log: Remove contrib/gcc and contrib/gcclibs GCC 4.2.1 was disconnected from FreeBSD in r358454. Sponsored by: The FreeBSD Foundation Deleted: head/contrib/gcc/ head/contrib/gcclibs/ From owner-svn-src-head@freebsd.org Sat Feb 29 12:43:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C5DD725EA11; Sat, 29 Feb 2020 12:43:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48V5gP4151z42gM; Sat, 29 Feb 2020 12:43: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B9241AE9D; Sat, 29 Feb 2020 12:43: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 01TChjWJ029200; Sat, 29 Feb 2020 12:43:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TChhlc029191; Sat, 29 Feb 2020 12:43:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002291243.01TChhlc029191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 29 Feb 2020 12:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358460 - in head: . contrib/bmake/mk lib share/mk targets/pseudo/userland/gnu targets/pseudo/userland/lib tools/build/options X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: . contrib/bmake/mk lib share/mk targets/pseudo/userland/gnu targets/pseudo/userland/lib tools/build/options X-SVN-Commit-Revision: 358460 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 12:43:45 -0000 Author: emaste Date: Sat Feb 29 12:43:43 2020 New Revision: 358460 URL: https://svnweb.freebsd.org/changeset/base/358460 Log: retire the LLVM_LIBUNWIND option LLVM's libunwind is used on all FreeBSD-supported CPU architectures and is a required component. Reviewed by: brooks (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23123 Deleted: head/tools/build/options/WITHOUT_LLVM_LIBUNWIND head/tools/build/options/WITH_LLVM_LIBUNWIND Modified: head/Makefile.inc1 head/UPDATING head/contrib/bmake/mk/meta2deps.sh head/lib/Makefile head/share/mk/local.dirdeps.mk head/share/mk/local.gendirdeps.mk head/share/mk/meta2deps.sh head/share/mk/src.opts.mk head/targets/pseudo/userland/gnu/Makefile.depend head/targets/pseudo/userland/lib/Makefile.depend Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Feb 29 12:40:27 2020 (r358459) +++ head/Makefile.inc1 Sat Feb 29 12:43:43 2020 (r358460) @@ -2747,7 +2747,7 @@ _prereq_libs+= lib/libssp_nonshared # These dependencies are not automatically generated: # -# gnu/lib/libgcc, lib/csu and lib/libc must be built before +# lib/csu and lib/libc must be built before # all shared libraries for ELF. # _startup_libs= lib/csu @@ -2757,7 +2757,6 @@ _startup_libs+= lib/libc_nonshared _startup_libs+= lib/libcxxrt .endif -.if ${MK_LLVM_LIBUNWIND} != "no" _prereq_libs+= lib/libgcc_eh lib/libgcc_s _startup_libs+= lib/libgcc_eh lib/libgcc_s @@ -2765,7 +2764,6 @@ lib/libgcc_s__L: lib/libc__L lib/libgcc_s__L: lib/libc_nonshared__L .if ${MK_LIBCPLUSPLUS} != "no" lib/libcxxrt__L: lib/libgcc_s__L -.endif .endif _prebuild_libs= ${_kerberos5_lib_libasn1} \ Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Feb 29 12:40:27 2020 (r358459) +++ head/UPDATING Sat Feb 29 12:43:43 2020 (r358460) @@ -27,6 +27,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20200229: + The WITHOUT_LLVM_LIBUNWIND option has been removed. LLVM's libunwind + is used by all supported CPU architectures. + +20200229: GCC 4.2.1 has been removed from the tree. The WITH_GCC, WITH_GCC_BOOTSTRAP, and WITH_GNUCXX options are no longer available. Users who wish to build FreeBSD with GCC must use the external toolchain Modified: head/contrib/bmake/mk/meta2deps.sh ============================================================================== --- head/contrib/bmake/mk/meta2deps.sh Sat Feb 29 12:40:27 2020 (r358459) +++ head/contrib/bmake/mk/meta2deps.sh Sat Feb 29 12:43:43 2020 (r358460) @@ -49,7 +49,6 @@ # The output, is a set of absolute paths with "SB" like: #.nf # -# $SB/obj-i386/bsd/gnu/lib/libgcc # $SB/obj-i386/bsd/include # $SB/obj-i386/bsd/lib/csu/i386 # $SB/obj-i386/bsd/lib/libc Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sat Feb 29 12:40:27 2020 (r358459) +++ head/lib/Makefile Sat Feb 29 12:43:43 2020 (r358460) @@ -53,6 +53,8 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libexpat \ libfetch \ libfigpar \ + libgcc_eh \ + libgcc_s \ libgeom \ libifconfig \ libipsec \ @@ -177,8 +179,6 @@ _libcplusplus+= libc++experimental SUBDIR.${MK_EFI}+= libefivar SUBDIR.${MK_GOOGLETEST}+= googletest SUBDIR.${MK_LIBTHR}+= libthr -SUBDIR.${MK_LLVM_LIBUNWIND}+= libgcc_eh -SUBDIR.${MK_LLVM_LIBUNWIND}+= libgcc_s SUBDIR.${MK_NETGRAPH}+= libnetgraph SUBDIR.${MK_NIS}+= libypclnt Modified: head/share/mk/local.dirdeps.mk ============================================================================== --- head/share/mk/local.dirdeps.mk Sat Feb 29 12:40:27 2020 (r358459) +++ head/share/mk/local.dirdeps.mk Sat Feb 29 12:43:43 2020 (r358460) @@ -91,13 +91,9 @@ DIRDEPS += \ # Add both gcc_s and gcc_eh as dependencies as the decision to build # -static or not is not known here. .if ${DEP_RELDIR:M*libgcc*} == "" && ${DIRDEPS:U:Mlib/libc} != "" -.if ${MK_LLVM_LIBUNWIND} == "yes" DIRDEPS+= \ lib/libgcc_eh \ lib/libgcc_s -.else -DIRDEPS+= gnu/lib/libgcc -.endif .endif # Bootstrap support. Give hints to DIRDEPS if there is no Makefile.depend* Modified: head/share/mk/local.gendirdeps.mk ============================================================================== --- head/share/mk/local.gendirdeps.mk Sat Feb 29 12:40:27 2020 (r358459) +++ head/share/mk/local.gendirdeps.mk Sat Feb 29 12:43:43 2020 (r358460) @@ -10,7 +10,6 @@ GENDIRDEPS_FILTER+= \ Nlib/libssp_nonshared \ Ncddl/usr.bin/ctf* \ Nlib/libc_nonshared \ - Ngnu/lib/libgcc \ Nlib/libgcc_eh \ Nlib/libgcc_s \ Nstand/libsa/* \ Modified: head/share/mk/meta2deps.sh ============================================================================== --- head/share/mk/meta2deps.sh Sat Feb 29 12:40:27 2020 (r358459) +++ head/share/mk/meta2deps.sh Sat Feb 29 12:43:43 2020 (r358460) @@ -49,7 +49,6 @@ # The output, is a set of absolute paths with "SB" like: #.nf # -# $SB/obj-i386/bsd/gnu/lib/libgcc # $SB/obj-i386/bsd/include # $SB/obj-i386/bsd/lib/csu/i386 # $SB/obj-i386/bsd/lib/libc Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sat Feb 29 12:40:27 2020 (r358459) +++ head/share/mk/src.opts.mk Sat Feb 29 12:43:43 2020 (r358460) @@ -127,7 +127,6 @@ __DEFAULT_YES_OPTIONS = \ LIBPTHREAD \ LIBTHR \ LLVM_COV \ - LLVM_LIBUNWIND \ LLVM_TARGET_ALL \ LOADER_GELI \ LOADER_LUA \ @@ -423,7 +422,6 @@ MK_${var}:= no # .if !${COMPILER_FEATURES:Mc++11} MK_GOOGLETEST:= no -MK_LLVM_LIBUNWIND:= no .endif .if ${MK_CAPSICUM} == "no" Modified: head/targets/pseudo/userland/gnu/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/gnu/Makefile.depend Sat Feb 29 12:40:27 2020 (r358459) +++ head/targets/pseudo/userland/gnu/Makefile.depend Sat Feb 29 12:43:43 2020 (r358460) @@ -37,7 +37,4 @@ DIRDEPS = \ DIRDEPS+= gnu/usr.bin/dtc .endif -.if ${MK_LLVM_LIBUNWIND} == "no" -.endif - .include Modified: head/targets/pseudo/userland/lib/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/lib/Makefile.depend Sat Feb 29 12:40:27 2020 (r358459) +++ head/targets/pseudo/userland/lib/Makefile.depend Sat Feb 29 12:43:43 2020 (r358460) @@ -237,11 +237,9 @@ DIRDEPS+= lib/libgpio DIRDEPS+= lib/libefivar .endif -.if ${MK_LLVM_LIBUNWIND} != "no" DIRDEPS+= \ lib/libgcc_eh \ lib/libgcc_s -.endif .if ${MK_PMC} != "no" DIRDEPS+= \ From owner-svn-src-head@freebsd.org Sat Feb 29 12:46:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57B8025EABB; Sat, 29 Feb 2020 12:46:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48V5k35TTjz47rZ; Sat, 29 Feb 2020 12:46:03 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 280C31AEA5; Sat, 29 Feb 2020 12:46:03 +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 01TCk2ad029385; Sat, 29 Feb 2020 12:46:02 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TCk2a3029384; Sat, 29 Feb 2020 12:46:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002291246.01TCk2a3029384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 29 Feb 2020 12:46:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358461 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 358461 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 12:46:04 -0000 Author: emaste Date: Sat Feb 29 12:46:02 2020 New Revision: 358461 URL: https://svnweb.freebsd.org/changeset/base/358461 Log: regen src.conf.5 after r358460, LLVM_LIBUNWIND option retirement Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Feb 29 12:43:43 2020 (r358460) +++ head/share/man/man5/src.conf.5 Sat Feb 29 12:46:02 2020 (r358461) @@ -972,8 +972,6 @@ amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386 Set to not build the .Xr llvm-cov 1 tool. -.It Va WITHOUT_LLVM_LIBUNWIND -Set to use GCC's stack unwinder (instead of LLVM's libunwind). .It Va WITHOUT_LLVM_TARGET_AARCH64 Set to not build LLVM target support for AArch64. The From owner-svn-src-head@freebsd.org Sat Feb 29 13:15:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A311525F080; Sat, 29 Feb 2020 13:15:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48V6MV2P6Tz4DMP; Sat, 29 Feb 2020 13:15:02 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F0C381B40C; Sat, 29 Feb 2020 13:15: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 01TDF1XU047219; Sat, 29 Feb 2020 13:15:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TDF1Dd047218; Sat, 29 Feb 2020 13:15:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002291315.01TDF1Dd047218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 29 Feb 2020 13:15:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358462 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 358462 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 13:15:02 -0000 Author: emaste Date: Sat Feb 29 13:15:01 2020 New Revision: 358462 URL: https://svnweb.freebsd.org/changeset/base/358462 Log: src.opts.mk: simplify Clang and lld bootstrap defaults With the retirement of GCC 4.2.1 we can assume the host compiler supports C++11, and can simplify the Clang and LLD defaults. Clang and lld are now enabled by default everywhere, and are used as the bootstrap compiler and linker for all targets except MIPS. 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 Sat Feb 29 12:46:02 2020 (r358461) +++ head/share/mk/src.opts.mk Sat Feb 29 13:15:01 2020 (r358462) @@ -78,6 +78,7 @@ __DEFAULT_YES_OPTIONS = \ CASPER \ CCD \ CDDL \ + CLANG \ CPP \ CROSS_COMPILER \ CRYPT \ @@ -126,6 +127,7 @@ __DEFAULT_YES_OPTIONS = \ LEGACY_CONSOLE \ LIBPTHREAD \ LIBTHR \ + LLD \ LLVM_COV \ LLVM_TARGET_ALL \ LOADER_GELI \ @@ -287,22 +289,13 @@ MK_LLVM_TARGET_SPARC:=no __DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF .include -# If the compiler is not C++11 capable, disable Clang. External toolchain will -# be required. -.if ${COMPILER_FEATURES:Mc++11} && (${__TT} != "mips") -# Clang is enabled, and will be installed as the default /usr/bin/cc. -__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD -.elif ${COMPILER_FEATURES:Mc++11} -# If an external compiler that supports C++11 is used as ${CC} and Clang -# supports the target, then Clang is enabled but we still require an external -# toolchain. -# default /usr/bin/cc. -__DEFAULT_YES_OPTIONS+=CLANG LLD -__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC +.if ${__TT} != "mips" +# Clang is installed as the default /usr/bin/cc. +__DEFAULT_YES_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .else -# Everything else disables Clang, and uses GCC instead. -__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD +# Clang is enabled but we still require an external toolchain. +__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .endif # In-tree binutils/gcc are older versions without modern architecture support. .if ${__T} == "aarch64" || ${__T:Mriscv*} != "" From owner-svn-src-head@freebsd.org Sat Feb 29 13:24:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1792F25F34C; Sat, 29 Feb 2020 13:24:44 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48V6Zf5TDLz4Yyf; Sat, 29 Feb 2020 13:24:42 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71BC41B5D5; Sat, 29 Feb 2020 13:24:42 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01TDOg5b053070; Sat, 29 Feb 2020 13:24:42 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TDOgpA053069; Sat, 29 Feb 2020 13:24:42 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202002291324.01TDOgpA053069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Sat, 29 Feb 2020 13:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358463 - head/sbin/pfctl/tests/files X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/sbin/pfctl/tests/files X-SVN-Commit-Revision: 358463 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 13:24:44 -0000 Author: lwhsu Date: Sat Feb 29 13:24:41 2020 New Revision: 358463 URL: https://svnweb.freebsd.org/changeset/base/358463 Log: Fix test cases after r358448 sbin.pfctl.pfctl_test.pf0087 sbin.pfctl.pfctl_test.selfpf0087 MFC with: r358448 Sponsored by: The FreeBSD Foundation Modified: head/sbin/pfctl/tests/files/pf0087.ok Modified: head/sbin/pfctl/tests/files/pf0087.ok ============================================================================== --- head/sbin/pfctl/tests/files/pf0087.ok Sat Feb 29 13:15:01 2020 (r358462) +++ head/sbin/pfctl/tests/files/pf0087.ok Sat Feb 29 13:24:41 2020 (r358463) @@ -5,7 +5,7 @@ pass in on lo1000000 inet proto udp from any to 10.0.0 pass in inet proto tcp from any to 10.0.0.1 port = http flags S/SA keep state pass out on lo1000001 inet proto udp from any to 10.0.0.2 port = domain keep state pass in inet proto tcp from any to 10.0.0.3 port = http flags S/SA keep state -pass out inet proto tcp from any to 10.0.0.1 port = hosts2-ns flags S/SA keep state +pass out inet proto tcp from any to 10.0.0.1 port = 81 flags S/SA keep state pass in inet proto udp from any to 10.0.0.3 port = domain keep state pass in on lo1000001 inet proto udp from 10.0.0.2 port = domain to 10.0.0.2 keep state pass out inet proto udp from any to 10.0.0.1 port = domain keep state From owner-svn-src-head@freebsd.org Sat Feb 29 13:25:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7CC025F3CA; Sat, 29 Feb 2020 13:25:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48V6bl2CbXz4b6c; Sat, 29 Feb 2020 13:25:39 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB8751B5D6; Sat, 29 Feb 2020 13:25:38 +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 01TDPcZ8053175; Sat, 29 Feb 2020 13:25:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TDPc2k053174; Sat, 29 Feb 2020 13:25:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002291325.01TDPc2k053174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 29 Feb 2020 13:25:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358464 - head/contrib/gperf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/gperf X-SVN-Commit-Revision: 358464 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 13:25:39 -0000 Author: emaste Date: Sat Feb 29 13:25:38 2020 New Revision: 358464 URL: https://svnweb.freebsd.org/changeset/base/358464 Log: remove contrib/gperf gperf was used only as a build tool for GCC, and is not needed after r358454. Sponsored by: The FreeBSD Foundation Deleted: head/contrib/gperf/ From owner-svn-src-head@freebsd.org Sat Feb 29 13:30:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB46425F6E1; Sat, 29 Feb 2020 13:30:59 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48V6jt5wfDz3Fx9; Sat, 29 Feb 2020 13:30:58 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4C9A6C29A; Sat, 29 Feb 2020 13:30:58 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [100.90.31.25] (unknown [188.188.159.25]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id D88CFEF70; Sat, 29 Feb 2020 14:30:56 +0100 (CET) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Kristof Provost Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r358463 - head/sbin/pfctl/tests/files Date: Sat, 29 Feb 2020 14:30:55 +0100 Message-Id: References: <202002291324.01TDOgpA053069@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <202002291324.01TDOgpA053069@repo.freebsd.org> To: Li-Wen Hsu X-Mailer: iPhone Mail (17D50) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 13:30:59 -0000 > On 29 Feb 2020, at 14:24, Li-Wen Hsu wrote: >=20 > =EF=BB=BFAuthor: lwhsu > Date: Sat Feb 29 13:24:41 2020 > New Revision: 358463 > URL: https://svnweb.freebsd.org/changeset/base/358463 >=20 > Log: > Fix test cases after r358448 >=20 > sbin.pfctl.pfctl_test.pf0087 > sbin.pfctl.pfctl_test.selfpf0087 >=20 Thanks! Kristof From owner-svn-src-head@freebsd.org Sat Feb 29 14:11:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A07426006E; Sat, 29 Feb 2020 14:11:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48V7cc00wfz3ycm; Sat, 29 Feb 2020 14:11:28 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFA8A1BE89; Sat, 29 Feb 2020 14:11:27 +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 01TEBRbk081416; Sat, 29 Feb 2020 14:11:27 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TEBRhd081415; Sat, 29 Feb 2020 14:11:27 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002291411.01TEBRhd081415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 29 Feb 2020 14:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358465 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 358465 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 14:11:28 -0000 Author: dim Date: Sat Feb 29 14:11:27 2020 New Revision: 358465 URL: https://svnweb.freebsd.org/changeset/base/358465 Log: Fix the following -Werror warning from clang 10.0.0: sys/arm64/arm64/identcpu.c:1170:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] break; ^ sys/arm64/arm64/identcpu.c:1168:4: note: previous statement is here if (fv[j].desc[0] != '\0') ^ The break should be after the if statement, indented one level less. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23871 Modified: head/sys/arm64/arm64/identcpu.c Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Sat Feb 29 13:25:38 2020 (r358464) +++ head/sys/arm64/arm64/identcpu.c Sat Feb 29 14:11:27 2020 (r358465) @@ -1167,7 +1167,7 @@ print_id_fields(struct sbuf *sb, uint64_t reg, void *a if (fv[j].desc[0] != '\0') sbuf_printf(sb, "%s%s", SEP_STR, fv[j].desc); - break; + break; } if (fv[j].desc == NULL) sbuf_printf(sb, "%sUnknown %s(%x)", SEP_STR, From owner-svn-src-head@freebsd.org Sat Feb 29 14:58:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E131261141 for ; Sat, 29 Feb 2020 14:58:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-21.consmr.mail.gq1.yahoo.com (sonic302-21.consmr.mail.gq1.yahoo.com [98.137.68.147]) (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 48V8ft1b2Vz3Ch0 for ; Sat, 29 Feb 2020 14:58:29 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 0R8YKnIVM1lF2eHc7VFKvaVqoTWpppFyR9d0.3oiB6wA7F5.Z0zuou0IpbMSr.l STrtSOw0K_qQqEgEhwQMhc1kVcbfXZ_R91qrcz1GJ4C20pr3_mXTta1.QMHTR2Q3xG4QWG3IL9wN uiJKQ5MVinW0jR1Dnlw045LNd3B40A9V8mPlWxA.Zk9VjJfxavYabgE.mezb49Ni2cSXh_UD6FA. fIUgf.WO.CmuZYhQFPGmbwYizjVAiXN3bra6u_GY4iGkkm81epMwkhstGpcAXTyf_lYcXgX9vZtB QAWhzj.4da91oLnDYy9..HKMXikJSUubzjjP1nzehfZM7QS53k0eWAdAqa3AldU6DRbfpMwZhoCg so7Ez9LrXnAuBvvZsSCysMQ84KTtW5eB61HEigVtyXz4m8WAZW0MHfQT8c8qNFOsNjCZ86.4Fttq Dvd4p0VKns49VJlysyv8RqmXej.LJbnqvocNdhnxgENmystSOiTtHOzfoy4ZaeXGpVP_936QxGda F1ebSzm3yHACxqEmQ7p8IG5SFOq496Nvi0zmCAFU2kA0a4G4g1JskStQn0DuXBpapdDhJCgUfuMZ G4Mm2GOAg3eSqaV8X9bGYJFjwvMzdl5lTcgAU3JAISXejfqy8ArBGnXtWaSY5z3Wbiphc8So.eMY QKSVnMo3JH.G32IQ0Rf5P3VlDilC9kEBvUIq4961tkUPNujnJbtWq6vkg57p.wUc1_TtLvDreVpC _XjDqmRSC_q98aGhOHjvcQc4BBtiMVClk0yLejr_06Z9XETvygueaF_JNX0wtggE.yigMUqrsv5G 5oCVNm0R0wvxwa0wtvNT9fXiQjHAlLf.fgNadAmkTxo3OA_rGn3xIvfsR3Nt6wJD6vzeSrCOndE7 0WzWPEQ..Ihqplh.8El_Y5vyxx5uGRmi8PZITBuXo91T00bWHSGbtxtyFatA0Bfjhy4rZ_BNJx7z RYzGK9N39OYhq.uQ5F8Wn7ys_6MsxC8_VfN1H4Xhbg8T9XqY3avaqj7etoluNyouGwHZui_5Tmf3 bgmJD43pvpVO0FE3aSBvIP0mzeMZKh8S.YQlkPySKClnrP3UibDhvbFGHPgpflmRx4g5zN_A1avl fKljdY25.12.J8xTWev32Dsdz9F25uDjHAp3R.ddzvdMl.tae8F8Fc2p4UMtWK2pXfZ1jeC36C1M mJCW0ebKc4AqoentKUbAdrcBW1bGKwTYSq5yhtARmE1EI1WxKEeoIkpCMapwtQAkuQHuCyvK40Qu ALu368j3ws2kMKKUzuS6qNXsnGwDsWEw_98JoqvsOKFkAGbUnwvmBMvznI09pN6ZPJecw8AZbIk5 mqEhgQW3C0CwlxIOWMaxS7uWl6FnaCWhDVgrbQ4lHDolgULXZ7tQ99VVd_HIqyUC4gv0FN9c6P9P PA2h0iYEqRTcLcRvHTdhLXPOcu7APOz42p4rU7UFbM8Ten79uAoQ- Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.gq1.yahoo.com with HTTP; Sat, 29 Feb 2020 14:58:27 +0000 Received: by smtp410.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID e34df1edbd5b9798045d5c403b9e323f; Sat, 29 Feb 2020 14:58:23 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358462 - head/share/mk Message-Id: <4AAD92DE-AFE9-420D-91C8-424F477E2FDC@yahoo.com> Date: Sat, 29 Feb 2020 06:58:22 -0800 To: Ed Maste , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3608.60.0.2.5) References: <4AAD92DE-AFE9-420D-91C8-424F477E2FDC.ref@yahoo.com> X-Rspamd-Queue-Id: 48V8ft1b2Vz3Ch0 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.25 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.12)[-0.125,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.62)[-0.625,0]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[147.68.137.98.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (6.60), ipnet: 98.137.64.0/21(0.83), asn: 36647(0.66), country: US(-0.05)]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 14:58:33 -0000 > Author: emaste > Date: Sat Feb 29 13:15:01 2020 > New Revision: 358462 > URL:=20 > https://svnweb.freebsd.org/changeset/base/358462 >=20 >=20 > Log: > src.opts.mk: simplify Clang and lld bootstrap defaults > =20 > With the retirement of GCC 4.2.1 we can assume the host compiler = supports > C++11, and can simplify the Clang and LLD defaults. Clang and lld = are now > enabled by default everywhere, and are used as the bootstrap = compiler and > linker for all targets except MIPS. lld vs. 32-bit powerpc? =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Sat Feb 29 15:42:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F2443261C35; Sat, 29 Feb 2020 15:42:33 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48V9dh31fXz4Np4; Sat, 29 Feb 2020 15:42:32 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [192.168.0.3] (unknown [181.52.72.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: pfg) by smtp.freebsd.org (Postfix) with ESMTPSA id 768E5D343; Sat, 29 Feb 2020 15:42:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r358459 - in head/contrib: gcc gcclibs To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002291240.01TCeRU7023645@repo.freebsd.org> From: Pedro Giffuni Organization: FreeBSD Message-ID: <47e9aa21-33c6-55b9-1b84-bcb1841705e4@FreeBSD.org> Date: Sat, 29 Feb 2020 10:42:31 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202002291240.01TCeRU7023645@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 15:42:34 -0000 On 29/02/2020 07:40, Ed Maste wrote: > Author: emaste > Date: Sat Feb 29 12:40:27 2020 > New Revision: 358459 > URL: https://svnweb.freebsd.org/changeset/base/358459 > > Log: > Remove contrib/gcc and contrib/gcclibs > > GCC 4.2.1 was disconnected from FreeBSD in r358454. > > Sponsored by: The FreeBSD Foundation > > Deleted: > head/contrib/gcc/ > head/contrib/gcclibs/ And now it's really gone! While I am no doubt very happy to see this happen, I just have to thank the FSF for keeping a competitive compiler for such a long time and raising the bar. When the project started and we needed a compiler, they were there. We will also not miss it since we will continue to enjoy it as an important package in FreeBSD ports collection :). Pedro. From owner-svn-src-head@freebsd.org Sat Feb 29 17:10:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE3DF263910; Sat, 29 Feb 2020 17:10:56 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VCbh493yz49lX; Sat, 29 Feb 2020 17:10:56 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7CF061DE67; Sat, 29 Feb 2020 17:10: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 01THAuMC090124; Sat, 29 Feb 2020 17:10:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01THAtF7090117; Sat, 29 Feb 2020 17:10:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002291710.01THAtF7090117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 29 Feb 2020 17:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358468 - in head: . contrib/dtc gnu/usr.bin gnu/usr.bin/dtc share/mk targets/pseudo/userland targets/pseudo/userland/gnu tools/build/options usr.bin X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: . contrib/dtc gnu/usr.bin gnu/usr.bin/dtc share/mk targets/pseudo/userland targets/pseudo/userland/gnu tools/build/options usr.bin X-SVN-Commit-Revision: 358468 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 17:10:57 -0000 Author: emaste Date: Sat Feb 29 17:10:54 2020 New Revision: 358468 URL: https://svnweb.freebsd.org/changeset/base/358468 Log: retire in-tree GPL dtc devicetree compiler Now that we no longer have GCC 4.2.1 in the tree and can assume FreeBSD is being built with a C++11 compiler available, we can use BSDL dtc unconditionally and retire the GPL dtc. GPL dtc now has FreeBSD CI support via Cirrus-CI to help ensure it continues to build/work on FreeBSD and is available in the ports tree if needed. The copy of (copyfree licensed) libfdt that we actually use is in sys/contrib/libfdt so the extra copy under contrib/dtc/libfdt can be removed along with the rest of the GPL dtc. Reviewed by: kevans, ian, imp, manu, theraven Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23192 Deleted: head/contrib/dtc/ head/gnu/usr.bin/dtc/ head/tools/build/options/WITHOUT_GPL_DTC head/tools/build/options/WITH_GPL_DTC Modified: head/Makefile.inc1 head/UPDATING head/gnu/usr.bin/Makefile head/share/mk/src.opts.mk head/targets/pseudo/userland/Makefile.depend head/targets/pseudo/userland/gnu/Makefile.depend head/usr.bin/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Feb 29 15:39:54 2020 (r358467) +++ head/Makefile.inc1 Sat Feb 29 17:10:54 2020 (r358468) @@ -2233,12 +2233,6 @@ ${_bt}-usr.bin/clang/llvm-tblgen: ${_bt}-lib/clang/lib ${_bt}-usr.bin/clang/lldb-tblgen: ${_bt}-lib/clang/libllvmminimal .endif -# Build BSDL or GPL DTC depending on GPL_DTC option. -_dtc= usr.bin/dtc -.if ${MK_GPL_DTC} != "no" -_dtc= gnu/usr.bin/dtc -.endif - .if ${MK_LOCALES} != "no" _localedef= usr.bin/localedef .endif @@ -2360,7 +2354,7 @@ bootstrap-tools: ${_bt}-links .PHONY ${_clang_tblgen} \ ${_kerberos5_bootstrap_tools} \ ${_strfile} \ - ${_dtc} \ + usr.bin/dtc \ ${_cat} \ ${_kbdcontrol} \ ${_elftoolchain_libs} \ Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Feb 29 15:39:54 2020 (r358467) +++ head/UPDATING Sat Feb 29 17:10:54 2020 (r358468) @@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20200229: + The WITH_GPL_DTC option has been removed. The BSD-licenced device tree + compiler in usr.bin/dtc is used on all architectures which use dtc, and + the GPL dtc is available (if needed) from the sysutils/dtc port. + +20200229: The WITHOUT_LLVM_LIBUNWIND option has been removed. LLVM's libunwind is used by all supported CPU architectures. Modified: head/gnu/usr.bin/Makefile ============================================================================== --- head/gnu/usr.bin/Makefile Sat Feb 29 15:39:54 2020 (r358467) +++ head/gnu/usr.bin/Makefile Sat Feb 29 17:10:54 2020 (r358468) @@ -12,7 +12,6 @@ SUBDIR.${MK_GNU_DIFF}+= diff3 SUBDIR.${MK_GNU_GREP}+= grep SUBDIR.${MK_GDB}+= gdb SUBDIR_DEPEND_gdb= binutils -SUBDIR.${MK_GPL_DTC}+= dtc SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sat Feb 29 15:39:54 2020 (r358467) +++ head/share/mk/src.opts.mk Sat Feb 29 17:10:54 2020 (r358468) @@ -201,7 +201,6 @@ __DEFAULT_NO_OPTIONS = \ DTRACE_TESTS \ EXPERIMENTAL \ GNU_GREP_COMPAT \ - GPL_DTC \ HESIOD \ LIBSOFT \ LOADER_FIREWIRE \ Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Sat Feb 29 15:39:54 2020 (r358467) +++ head/targets/pseudo/userland/Makefile.depend Sat Feb 29 17:10:54 2020 (r358468) @@ -188,6 +188,7 @@ DIRDEPS+= \ usr.bin/dirname \ usr.bin/dpv \ usr.bin/drill \ + usr.bin/dtc \ usr.bin/du \ usr.bin/ee \ usr.bin/elf2aout \ @@ -853,10 +854,6 @@ DIRDEPS+= usr.sbin/cxgbetool .if ${MK_MLX5TOOL} != "no" DIRDEPS+= usr.sbin/mlx5tool -.endif - -.if ${MK_GPL_DTC} != "yes" -DIRDEPS+= usr.bin/dtc .endif DIRDEPS+= ${DIRDEPS.${MACHINE}:U} Modified: head/targets/pseudo/userland/gnu/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/gnu/Makefile.depend Sat Feb 29 15:39:54 2020 (r358467) +++ head/targets/pseudo/userland/gnu/Makefile.depend Sat Feb 29 17:10:54 2020 (r358468) @@ -1,8 +1,6 @@ # $FreeBSD$ -.if !defined(MK_GPL_DTC) .include "${SRCTOP}/share/mk/src.opts.mk" -.endif # This file is not autogenerated - take care! @@ -32,9 +30,5 @@ DIRDEPS = \ gnu/usr.bin/gperf/doc \ gnu/usr.bin/grep \ gnu/usr.bin/grep/doc \ - -.if ${MK_GPL_DTC} != "no" -DIRDEPS+= gnu/usr.bin/dtc -.endif .include Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sat Feb 29 15:39:54 2020 (r358467) +++ head/usr.bin/Makefile Sat Feb 29 17:10:54 2020 (r358468) @@ -210,10 +210,8 @@ SUBDIR.${MK_GAMES}+= number SUBDIR.${MK_GAMES}+= pom SUBDIR.${MK_GAMES}+= primes SUBDIR.${MK_GAMES}+= random -.if ${MK_GPL_DTC} != "yes" .if ${COMPILER_FEATURES:Mc++11} SUBDIR+= dtc -.endif .endif SUBDIR.${MK_HESIOD}+= hesinfo SUBDIR.${MK_ICONV}+= iconv From owner-svn-src-head@freebsd.org Sat Feb 29 17:24:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE3A9263E29; Sat, 29 Feb 2020 17:24:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VCtq3yRqz4ZY0; Sat, 29 Feb 2020 17:24:03 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 626701E1E7; Sat, 29 Feb 2020 17:24:03 +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 01THO3rw001042; Sat, 29 Feb 2020 17:24:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01THO3Yr001041; Sat, 29 Feb 2020 17:24:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002291724.01THO3Yr001041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 29 Feb 2020 17:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358469 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 358469 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 17:24:04 -0000 Author: emaste Date: Sat Feb 29 17:24:02 2020 New Revision: 358469 URL: https://svnweb.freebsd.org/changeset/base/358469 Log: regen src.conf.5 for r358468, GPL_DTC removal Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Feb 29 17:10:54 2020 (r358468) +++ head/share/man/man5/src.conf.5 Sat Feb 29 17:24:02 2020 (r358469) @@ -739,9 +739,6 @@ amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386 Set to not build .Xr gpioctl 8 as part of the base system. -.It Va WITH_GPL_DTC -Set to build the GPL'd version of the device tree compiler from elinux.org, -instead of the BSD licensed one. .It Va WITHOUT_GSSAPI Set to not build libgssapi. .It Va WITHOUT_HAST From owner-svn-src-head@freebsd.org Sat Feb 29 18:41:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4436A2654D2; Sat, 29 Feb 2020 18:41:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VFcX5ktkz4WSY; Sat, 29 Feb 2020 18:41:48 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82F9D1EFA3; Sat, 29 Feb 2020 18:41:48 +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 01TIfmfb047309; Sat, 29 Feb 2020 18:41:48 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TIfmQs047308; Sat, 29 Feb 2020 18:41:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002291841.01TIfmQs047308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 29 Feb 2020 18:41:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358470 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358470 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 18:41:49 -0000 Author: markj Date: Sat Feb 29 18:41:48 2020 New Revision: 358470 URL: https://svnweb.freebsd.org/changeset/base/358470 Log: Ensure that arm64 thread structures are allocated from the direct map. Otherwise we can fail to handle translation faults on curthread, leading to a panic. Reviewed by: alc, rlibby Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23895 Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Sat Feb 29 17:24:02 2020 (r358469) +++ head/sys/kern/kern_thread.c Sat Feb 29 18:41:48 2020 (r358470) @@ -331,6 +331,7 @@ proc_linkup(struct proc *p, struct thread *td) void threadinit(void) { + uint32_t flags; mtx_init(&tid_lock, "TID lock", NULL, MTX_DEF); @@ -340,9 +341,20 @@ threadinit(void) */ tid_unrhdr = new_unrhdr(PID_MAX + 2, INT_MAX, &tid_lock); + flags = UMA_ZONE_NOFREE; +#ifdef __aarch64__ + /* + * Force thread structures to be allocated from the direct map. + * Otherwise, superpage promotions and demotions may temporarily + * invalidate thread structure mappings. For most dynamically allocated + * structures this is not a problem, but translation faults cannot be + * handled without accessing curthread. + */ + flags |= UMA_ZONE_CONTIG; +#endif thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(), thread_ctor, thread_dtor, thread_init, thread_fini, - 32 - 1, UMA_ZONE_NOFREE); + 32 - 1, flags); tidhashtbl = hashinit(maxproc / 2, M_TIDHASH, &tidhash); rw_init(&tidhash_lock, "tidhash"); } From owner-svn-src-head@freebsd.org Sat Feb 29 19:17:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA71E265FFD; Sat, 29 Feb 2020 19:17:25 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VGPd4h5cz3J9B; Sat, 29 Feb 2020 19:17:25 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 47FC71F673; Sat, 29 Feb 2020 19:17:25 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01TJHPf8068198; Sat, 29 Feb 2020 19:17:25 GMT (envelope-from csjp@FreeBSD.org) Received: (from csjp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TJHPoO068197; Sat, 29 Feb 2020 19:17:25 GMT (envelope-from csjp@FreeBSD.org) Message-Id: <202002291917.01TJHPoO068197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: csjp set sender to csjp@FreeBSD.org using -f From: "Christian S.J. Peron" Date: Sat, 29 Feb 2020 19:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358471 - head/sys/security/audit X-SVN-Group: head X-SVN-Commit-Author: csjp X-SVN-Commit-Paths: head/sys/security/audit X-SVN-Commit-Revision: 358471 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 19:17:25 -0000 Author: csjp Date: Sat Feb 29 19:17:24 2020 New Revision: 358471 URL: https://svnweb.freebsd.org/changeset/base/358471 Log: Currently kernel audit events for jail_set(2), jail_get(2), jail_attach(2), jail_remove(2) and finally setloginclass(2) are not being converted and committed into userspace. Add the cases for these syscalls and make sure they are being converted properly. Reviewed by: bz, kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23882 Modified: head/sys/security/audit/audit_bsm.c Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Sat Feb 29 18:41:48 2020 (r358470) +++ head/sys/security/audit/audit_bsm.c Sat Feb 29 19:17:24 2020 (r358471) @@ -809,6 +809,19 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_rec case AUE_FUTIMESAT: case AUE_GETATTRLIST: case AUE_JAIL: + break; + + /* + * NB: We may want to verify that the appropriate + * audit args are being processed here, but I think + * a bit analysis is required. + */ + case AUE_JAIL_GET: + case AUE_JAIL_SET: + case AUE_JAIL_ATTACH: + case AUE_JAIL_REMOVE: + break; + case AUE_LUTIMES: case AUE_NFS_GETFH: case AUE_LGETFH: @@ -1472,6 +1485,9 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_rec tok = au_to_text(ar->ar_arg_login); kau_write(rec, tok); } + break; + + case AUE_SETLOGINCLASS: break; case AUE_SETPRIORITY: From owner-svn-src-head@freebsd.org Sat Feb 29 19:59:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5DCE266E18; Sat, 29 Feb 2020 19:59:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VHL243ntz4M0L; Sat, 29 Feb 2020 19:59: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 539161FDD8; Sat, 29 Feb 2020 19:59: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 01TJxMbY092951; Sat, 29 Feb 2020 19:59:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TJxMpo092950; Sat, 29 Feb 2020 19:59:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002291959.01TJxMpo092950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 29 Feb 2020 19:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358472 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 358472 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 19:59:23 -0000 Author: emaste Date: Sat Feb 29 19:59:21 2020 New Revision: 358472 URL: https://svnweb.freebsd.org/changeset/base/358472 Log: CI: print wired page count on boot This is a first step in tracking kernel memory use over time. Modified: head/tools/boot/ci-qemu-test.sh Modified: head/tools/boot/ci-qemu-test.sh ============================================================================== --- head/tools/boot/ci-qemu-test.sh Sat Feb 29 19:17:24 2020 (r358471) +++ head/tools/boot/ci-qemu-test.sh Sat Feb 29 19:59:21 2020 (r358472) @@ -42,7 +42,7 @@ tempdir_setup() for dir in stand \ lib/libc lib/libedit lib/ncurses \ libexec/rtld-elf \ - bin/sh sbin/init sbin/shutdown; do + bin/sh sbin/init sbin/shutdown sbin/sysctl; do make -DNO_ROOT DESTDIR=${ROOTDIR} INSTALL="install -U" \ WITHOUT_DEBUG_FILES= \ WITHOUT_MAN= \ @@ -65,6 +65,7 @@ EOF #!/bin/sh echo "Hello world." +/sbin/sysctl vm.stats.vm.v_wire_count /sbin/shutdown -p now EOF From owner-svn-src-head@freebsd.org Sat Feb 29 20:23:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56F28267922 for ; Sat, 29 Feb 2020 20:23:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-55.consmr.mail.gq1.yahoo.com (sonic307-55.consmr.mail.gq1.yahoo.com [98.137.64.31]) (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 48VHsj53mdz48w9 for ; Sat, 29 Feb 2020 20:23:21 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: iG2tPEQVM1ljoJQZe.MKWp5AUykwVG_sy9QFZ9908gNqrwGAcfgRU5Cck3tcxWj 8e9kb6XNpfKD.xiNoLnAVgxFc6JTBYe4C2gIcei01QaHhUS.VHs2wWhf323wfcIoT4aJ6YrRum3y xGxFCTMQuEdjiwPnkPThRquIbubhttnMV68iKF96tapmZ2upCimj1ZsuIDn3O5DMmTj0mOYogXkZ iONLORDELmmntEEcG_jWAZsriHYBAJJRWkyz2A6Sj2OrI2xpNcAqurc4aadto17SwuZCvU5efi8k BOLzeo7Nul2xvZ6ZVMivPBJ0KYnvRLd3DCQFdvyR9YcfUeuNg5cXaZbebB2F.55eoqsxMFxeFMKn 7fILJRhOgiYebAWeANU269zwTqxuIMRavHUdosgFCHckIwAyLVy5iog_i8tiShr7CDD_jHBUW8fz g7CTqZ14D32LeQEToXZAiSvMRL.l1H67tMz7Z.W53fgyWsRtFKnxy.BuFo2hOpLj0qCa1rh4Gbgl NNRvZn_VdN84DSqt9TyvCw.pvk.C72uRT_fW0CplPCdYgJFcidQjaQ3dvezQYVAlegIdq5z_ifUq sAVTBTjWVd2QRGRounVa0H3DNPhXoBUI0DIh1U6nwjMZQ3XSu1FpSTzPFKcUgfL_RaSJ_ExegFCt OsATVhlycNBooa0ibGBQF8okyabU9vUdxE.OtuffZuDLEhLWZ_XnVWRlj9xf.Jcxs2p..WvFsZvP 2Ae_SYjy78cliaRA3Vnqt2eV1nQRIjiXYhjYtEQ2q_dJNCGBeSnWREd2wI1Yq3epe6pQWlhc.hDz 26H7t9iYW00XY3v6gRI8GMHa15pT7fBnqGVTvUtmPjsUovKWEkaQlkVv7ip.N3cUGNF0lZXdP3Qo UHPzc0VGtRovR3X5i_dIcGFXkeL6WdllXdBFzKDzasfOOeSm2J0DdNT1k_cfARqK_piSajzcI9.E .L83TC3T2AU_l3lWgQMX2ieeVh1PQakuXTzm5GwqLOkUnjDyytlVAkWUiEpP4kxppRzt31AndUSx H1fM1LU96INeYjP1CuzYajNsN_CQ9ngwck13T.2E57aMw88P0hPOBBZD.xsUXYSjuP4hP8o_TgD_ dMBPrsr80F0fi1f9145SdfEUGasfM5.wRssUasq1.4sMmqu9RWvIj0My7_71IHgwbw8WmnS_GpZ4 qOdgLn0nJt7SUc_h.ySai0t3PAhHDXZ837RxUqtJit5DS5u.1JghN4Z84dyuHKQLs4KuwkKXsukg t1PZoikXGHT8dtFm.yn1Hwp.cOk8ns9Y5H989HUQnguE3rqrZo.F7wMGMBzWTJHBceEQU9o1WS_L NpdiTsk7vGYq9nqwEGhC_52jgjkLr1_zq2.ZGolqkdGrZ5F2gnaChepToo0LOw0Ik587oNrhOQsp xj_ZtLi5VnnK.0xL7Ijchsg.7gAFOflW.dVMk8ma24QwE1NgW5OO9QfHCznwXL1o- Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.gq1.yahoo.com with HTTP; Sat, 29 Feb 2020 20:23:19 +0000 Received: by smtp432.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID f1c03cb123759321f2950298e3169be3; Sat, 29 Feb 2020 20:23:14 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358459 - in head/contrib: gcc gcclibs Message-Id: Date: Sat, 29 Feb 2020 12:23:12 -0800 Cc: Ed Maste To: Pedro Giffuni , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3608.60.0.2.5) References: X-Rspamd-Queue-Id: 48VHsj53mdz48w9 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.73 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.42)[-0.424,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.80)[-0.803,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[31.64.137.98.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (4.21), ipnet: 98.137.64.0/21(0.83), asn: 36647(0.66), country: US(-0.05)]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 20:23:24 -0000 Pedro Giffuni pfg at FreeBSD.org wrote on Sat Feb 29 15:42:34 UTC 2020 : > On 29/02/2020 07:40, Ed Maste wrote: > > Author: emaste > > Date: Sat Feb 29 12:40:27 2020 > > New Revision: 358459 > > URL: https://svnweb.freebsd.org/changeset/base/358459 > > > > Log: > > Remove contrib/gcc and contrib/gcclibs > > > > GCC 4.2.1 was disconnected from FreeBSD in r358454. > > > > Sponsored by: The FreeBSD Foundation > > > > Deleted: > > head/contrib/gcc/ > > head/contrib/gcclibs/ > And now it's really gone! > > While I am no doubt very happy to see this happen, I just have to thank > the FSF for keeping a competitive compiler for such a long time and > raising the bar. When the project started and we needed a compiler, they > were there. > > We will also not miss it since we will continue to enjoy it as an > important package in FreeBSD ports collection :). As of head -r358472 , it looks like contrib/libstdc++ has survived so far. It may be another thing that goes. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Sat Feb 29 20:24:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6431B2679DD; Sat, 29 Feb 2020 20:24:27 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VHtx0kwJz4Bg0; Sat, 29 Feb 2020 20:24:24 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1583007857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zny/Y6KQMWpiptetUX2jLSnGZSltblOON2SOLW6yCjc=; b=Aqc9EK5Up3qkTyEeUcrl9scPrTTDfrBH2Jx0ghwtz7BUrkasyYEMgrYINR8dxu0vrAvWdm vsbRuWqZodA6nUsXGbFPsTJUbcAhR+jjRt1X3yE++Teh90tPNQn82aquvqVix3LsrwVkEI +hksJyhXnr+5Vlx2SI1D/SiQSBidpAs= Received: from skull.home.blih.net (lfbn-idf2-1-900-181.w86-238.abo.wanadoo.fr [86.238.131.181]) by mx.blih.net (OpenSMTPD) with ESMTPSA id af832738 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 29 Feb 2020 20:24:17 +0000 (UTC) Date: Sat, 29 Feb 2020 21:24:11 +0100 From: Emmanuel Vadot To: Jeff Roberson Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Jan Beich Subject: Re: svn commit: r358363 - head/sys/vm Message-Id: <20200229212411.1e6aed2d49d6644937b78452@bidouilliste.com> In-Reply-To: <202002270237.01R2bRLJ023799@repo.freebsd.org> References: <202002270237.01R2bRLJ023799@repo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48VHtx0kwJz4Bg0 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=Aqc9EK5U; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-3.74 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[bidouilliste.com:+]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-1.24)[ip: (-8.46), ipnet: 212.83.128.0/19(1.97), asn: 12876(0.29), country: FR(0.00)]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 20:24:27 -0000 Hi Jeff, On Thu, 27 Feb 2020 02:37:27 +0000 (UTC) Jeff Roberson wrote: > Author: jeff > Date: Thu Feb 27 02:37:27 2020 > New Revision: 358363 > URL: https://svnweb.freebsd.org/changeset/base/358363 > > Log: > Add unlocked grab* function variants that use lockless radix code to > lookup pages. These variants will fall back to their locked counterparts > if the page is not present. > > Discussed with: kib, markj > Differential Revision: https://reviews.freebsd.org/D23449 > > Modified: > head/sys/vm/vm_page.c > head/sys/vm/vm_page.h > We're (jbeich@ and me) seeing wired memory leak since this commit. A simple way to reproduce is to have drm-kmod (either 4.16 or 5.0) and liba-intel-driver/libva-intel-media-driver and start mpv in a loop : while mpv --hwdec=vaapi --start=10.0 --end=10.1 /path/to/file ; do done Reverting this commit on one of my test machine shows that this is the culprit. If you need anymore info/debug let me know. Thanks. -- Emmanuel Vadot From owner-svn-src-head@freebsd.org Sat Feb 29 20:48:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 322C52406B2 for ; Sat, 29 Feb 2020 20:48:36 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-20.consmr.mail.gq1.yahoo.com (sonic306-20.consmr.mail.gq1.yahoo.com [98.137.68.83]) (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 48VJQp275Fz3GR7 for ; Sat, 29 Feb 2020 20:48:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: yC2kDEEVM1kHzFKDQqBTHO5lHc8i0XS2uEqk2rdeydqG6wVJPAaNtGostBq91s3 ZfvjXTufoMdGUq.Bn8Lj5zVrJEhIenxHb31_k8REaMJdTRF8wUYomRZdlc_cFqMtzWgLzh7dGF74 LgQa_Wns0DUBMNf.rHzOzbRd_5dXaPMMkMGpvyVr7j6XMrBZtek2UmJLCjijgm1ZIaL9RQnwLjIV TTxfm6_q6rXQcwa.P5UUP2NaejEzTHZtTlwm8ldaZfnM_B_DfPuYSzhVlbbme_uVhG7EFbsdXxPw wKM3PK0QxdGlvaLS4F5mWQ6bGc9Nx8agiAMyflW8gA7aGnis7Bju.yfmKG.2O1yhrEokb91h2w4g SzVO2AyWLiWFVlyPkfDDQhFkL18qHnONzAwPKdNRWFV.LrdO9yUt5dxc47Gs035wPgts39kLHnEN Y9zyPlcCw2rzTvwQ2LKXtdDyrxRrGRgvD2XjqnMFrePwryU3uyHeuuKyUsefpquWPJ.Tl8FkEzUF Grcq_vpICm2NpU47BvR8EPl2.AenIHgUQnSJr7iozvS_lmMdAAJ9X5m38Tz4mu3RFjYqasrqlNK4 RVC_VRF7f7b_e5SDtVp.bdEmV6neNjEJFRfNXFQvWVC1h7_K4NvEW6VSgzkG08hrtBl38E.14qwJ 2LZj5e..FMskka1obClDKieB.wSvmKO2dN.jik5DjopDYGaM33swpaQT9qug62P7rgAfpoHENABO a202Bk2JvF8WMWIEQV_oRt2.mVOSPcUGV5OM0GvIkn69zktkW413Yw_skj3ejgZyzWTgJO1y32KT dVYcIhIkUHcV3AJmOorVhJUA9sCK6EV9vGeQJOAP9jpdaML4puKVNStDIYFwegYRYczFhYSfwArB 6R4l8CTlUfUx4oIi9NWBhCuxjDCyOMuJoboWiQ5EoP8VdFnA8AWYZrdY9DPfz6gm8VNp97plwoeT vzrdKa_xuX_gtAtHHkTUFQSbO_Ucqsx3YM0ofaPsO7eY7ahxAp4LH6J2Mex9szFJkEFyFbBX7Zdp .WUwLYrYfbS4asLpeyWpDTWfMxq6GQPILi9YoHvWfId22uLkCtAGjiBscDj5FAIgxpWUBRpw4_Ci CnGJf1l5PAPAJAz.CjDC4vZDR7r3tnQf_ny3yEw9Nl5niJW7Xj00lu5b5fm6ft4VjK2OvqZXh..9 9RbW7pAPdw2K76SCUY7ZhIUenCodR.t9qb8qVkY6RaUUGZD0jjrIEYIHZ5_WU2INAINkJBrGniEj _b5yfH6FHEb.8AhZd_SInxC26EdcwvB0eWuq29V7..fMk4SOpLE3_dS5ABerMmKSjWLWXKvAqLsU 1tSZCTq9GCYm4PwF0TEuwdNyNoETy5QRJB5aYGjNZTgXvKgbQLmqFM.IQ8TWsa56kKcsAk82tYXm b6E9UnFm1Vi3qmmrftA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Sat, 29 Feb 2020 20:48:32 +0000 Received: by smtp420.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID aea7c45b70f10d92b967439c472cbd87; Sat, 29 Feb 2020 20:48:27 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358439 - head/sys/amd64/include Message-Id: <4ECBA9F2-CA0A-4A9B-A3E4-E8C1964C412E@yahoo.com> Date: Sat, 29 Feb 2020 12:48:26 -0800 To: " rlibby@freebsd.org " , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3608.60.0.2.5) References: <4ECBA9F2-CA0A-4A9B-A3E4-E8C1964C412E.ref@yahoo.com> X-Rspamd-Queue-Id: 48VJQp275Fz3GR7 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.13 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-0.66)[-0.659,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.97)[-0.967,0]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[83.68.137.98.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (2.90), ipnet: 98.137.64.0/21(0.83), asn: 36647(0.66), country: US(-0.05)]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 20:48:36 -0000 head -r358439 breaks unmodified ports that use, for example, clang70 and clang++70: = https://lists.freebsd.org/pipermail/freebsd-emulation/2020-February/017672= .html = https://lists.freebsd.org/pipermail/freebsd-emulation/2020-February/017675= .html show things like . . . kBuild: Compiling HGSMIGuestR0Lib - = /wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/s= rc/VBox/GuestHost/HGSMI/HGSMICommon.cpp clang-7: warning: argument unused during compilation: '--param = inline-unit-growth=3D100' [-Wunused-command-line-argument] clang-7: warning: argument unused during compilation: '--param = large-function-growth=3D1000' [-Wunused-command-line-argument] In file included from = /wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/s= rc/VBox/GuestHost/HGSMI/HGSMICommon.cpp:38: In file included from = /wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/i= nclude/VBox/Graphics/VBoxVideoIPRT.h:32: In file included from = /wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/i= nclude/iprt/string.h:45: In file included from /usr/src/sys/sys/libkern.h:41: In file included from /usr/src/sys/sys/systm.h:44: /usr/include/machine/atomic.h:230:1: error: invalid output constraint = '=3D@cce' in asm ATOMIC_CMPSET(char); ^ /usr/include/machine/atomic.h:205:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:230:1: error: invalid output constraint = '=3D@cce' in asm /usr/include/machine/atomic.h:222:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:231:1: error: invalid output constraint = '=3D@cce' in asm ATOMIC_CMPSET(short); ^ /usr/include/machine/atomic.h:205:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:231:1: error: invalid output constraint = '=3D@cce' in asm /usr/include/machine/atomic.h:222:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:232:1: error: invalid output constraint = '=3D@cce' in asm ATOMIC_CMPSET(int); ^ /usr/include/machine/atomic.h:205:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:232:1: error: invalid output constraint = '=3D@cce' in asm /usr/include/machine/atomic.h:222:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:233:1: error: invalid output constraint = '=3D@cce' in asm ATOMIC_CMPSET(long); ^ /usr/include/machine/atomic.h:205:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:233:1: error: invalid output constraint = '=3D@cce' in asm /usr/include/machine/atomic.h:222:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:280:4: error: invalid output constraint = '=3D@ccc' in asm : "=3D@ccc" (res), /* 0 */ ^ /usr/include/machine/atomic.h:296:4: error: invalid output constraint = '=3D@ccc' in asm : "=3D@ccc" (res), /* 0 */ ^ /usr/include/machine/atomic.h:312:4: error: invalid output constraint = '=3D@ccc' in asm : "=3D@ccc" (res), /* 0 */ ^ /usr/include/machine/atomic.h:328:4: error: invalid output constraint = '=3D@ccc' in asm : "=3D@ccc" (res), /* 0 */ ^ =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Sat Feb 29 21:23:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 229752414A3; Sat, 29 Feb 2020 21:23:38 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48VKCF6Wfzz46QH; Sat, 29 Feb 2020 21:23:37 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 682C93C0199; Sat, 29 Feb 2020 21:23:31 +0000 (UTC) Date: Sat, 29 Feb 2020 21:23:31 +0000 From: Brooks Davis To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358454 - in head: . etc/mtree gnu/lib gnu/lib/libgcov gnu/lib/libgomp gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/usr.bin gnu/usr.bin/cc gnu/usr.bin/gperf share/mk targets/pseudo/bootstrap... Message-ID: <20200229212331.GA89716@spindle.one-eyed-alien.net> References: <202002290325.01T3PpnO094677@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline In-Reply-To: <202002290325.01T3PpnO094677@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 48VKCF6Wfzz46QH X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 21:23:38 -0000 --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 29, 2020 at 03:25:51AM +0000, Ed Maste wrote: > Author: emaste > Date: Sat Feb 29 03:25:51 2020 > New Revision: 358454 > URL: https://svnweb.freebsd.org/changeset/base/358454 >=20 > Log: > remove GCC 4.2.1 build infrastructure > =20 > As described in Warner's email message[1] to the FreeBSD-arch mailing > list we have reached GCC 4.2.1's retirement date. At this time all > supported architectures either use in-tree Clang, or rely on external > toolchain (i.e., a contemporary GCC version from ports). > =20 > GCC 4.2.1 was released July 18, 2007 and was imported into FreeBSD later > that year, in r171825. GCC has served us well, but version 4.2.1 is > obsolete and not used by default on any architecture in FreeBSD. It > does not support modern C and does not support arm64 or RISC-V. > =20 > Thanks to everyone responsible for maintaining, updating, and testing > GCC in the FreeBSD base system over the years. > =20 > So long, and thanks for all the fish. Thanks to everyone who made this possible. We're approaching the 10th anniversary of the BSD Toolchain Summit held at BSDCan 2010[0]. We'd been foundering for most of the past three years since GCC went GPLv3, but with Clang starting to come together it was time to make a plan. Looking back, we didn't do a good job of writing down the plan, but in essence, the plan was to adopt Clang and ELF Toolchain to replace GCC and binutils. Today we've basically achieved that goal. Along the way we've added support for external toolchains and in addition to building most architectures with an integrated Clang and LLD (powerpc32 and mips await LLVM 10.0.0 which is in progress) we build most architectures against GCC 6 or 8 and will be migrating to GCC 9 soon. This has been a massive effort involving too many to name and I know I'm missing many major contributors, but I'd like to call out a few people's contributions: - Roman Divacky's initial work on ClangBSD got use bootstrapped. - Dimitry Andric has maintained our LLVM integration for many years. - Ed Maste has maintained our ELF toolchain integration and put in a lot of work to push us over the finish line. - Warner Losh for sitting down and drafting a final schedule for GCC removal (and not to incidentally sparc64, the last poorly supported architecture). For all that this has been a huge effort, moving early and aggressively has brought us benefits. We remain one of (if not *the*) best supported open source operating systems when using LLVM. This is enormously advantageous in the research world where LLVM is the research compiler of choice. In the DARPA SSITH program where I'm working three of five teams are using FreeBSD specifically due to our LLVM support. Further, our collaboration with Arm to bring CHERI[1] to ARMv8-A in the form of the Morello prototype[2] would have been much harder if not impossible without a permissively licensed operating system and toolchain. -- Brooks [0] https://wiki.freebsd.org/201005ToolchainSummit [1] http://cheri-cpu.org [2] https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/cheri-morello.ht= ml --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJeWtZRAAoJEKzQXbSebgfAS70H/2FUDttipv8Tkwid9RvO4G8m AO55HoGXIHePqQVm5veKRSBlJD/9zYHYbsVch6giouqLtgq4ZRAmOq/sGifchYIK +xwHpwoiTuLGEEuwt5I187wb7jXH05IIUJZfvTXtv7kSawP07Wqo90HAs7HU3ykb Sr6JjTuXz6uDbHoDZasAP8Osy4A1U0i3Qz75Olmk7DNKDZomdoUIpr4C3AziIqx/ S3UEjTjqFSJyLroG/AI0anM+eJzqOROpANFHo7iyRSvxQfyKa3VFuVLWyfbzeWaa p7ntsiTD4yVVlinODovDH9Git0P0bAqVY22cFxhsnNPTZRZtoGZeMumVq0LY4Rs= =PrHf -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd-- From owner-svn-src-head@freebsd.org Sat Feb 29 21:50:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 888E9241FA3; Sat, 29 Feb 2020 21:50:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VKns5YjWz40bp; Sat, 29 Feb 2020 21:50:09 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B7752132B; Sat, 29 Feb 2020 21:50:09 +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 01TLo8PV061356; Sat, 29 Feb 2020 21:50:08 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TLo8aN061354; Sat, 29 Feb 2020 21:50:08 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002292150.01TLo8aN061354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 29 Feb 2020 21:50:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358474 - in head: share/man/man4 sys/dev/bktr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/bktr X-SVN-Commit-Revision: 358474 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 21:50:10 -0000 Author: imp Date: Sat Feb 29 21:50:08 2020 New Revision: 358474 URL: https://svnweb.freebsd.org/changeset/base/358474 Log: add deprecation notice for bktr driver. We plan to remove bktr(4) in FreeBSD 13. Document that here. Relnotes: yes Modified: head/share/man/man4/bktr.4 head/sys/dev/bktr/bktr_os.c Modified: head/share/man/man4/bktr.4 ============================================================================== --- head/share/man/man4/bktr.4 Sat Feb 29 21:42:34 2020 (r358473) +++ head/share/man/man4/bktr.4 Sat Feb 29 21:50:08 2020 (r358474) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 18, 2006 +.Dd February 25, 2020 .Dt BKTR 4 .Os .Sh NAME @@ -13,6 +13,12 @@ .Cd device iicbus .Cd device iicbb .Cd device smbus +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. .Sh DESCRIPTION The .Nm bktr Modified: head/sys/dev/bktr/bktr_os.c ============================================================================== --- head/sys/dev/bktr/bktr_os.c Sat Feb 29 21:42:34 2020 (r358473) +++ head/sys/dev/bktr/bktr_os.c Sat Feb 29 21:50:08 2020 (r358474) @@ -464,6 +464,7 @@ bktr_attach( device_t dev ) } #endif + gone_in_dev(dev, 13, "bktr driver removed in FreeBSD 13.0\n"); return 0; fail: From owner-svn-src-head@freebsd.org Sat Feb 29 22:16:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D5842428F8; Sat, 29 Feb 2020 22:16:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VLNF0J9Nz3HT0; Sat, 29 Feb 2020 22:16:29 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9735021877; Sat, 29 Feb 2020 22:16:28 +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 01TMGSOG079273; Sat, 29 Feb 2020 22:16:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TMGS4Q079271; Sat, 29 Feb 2020 22:16:28 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002292216.01TMGS4Q079271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 29 Feb 2020 22:16:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358477 - head/sys/dev/arcmsr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/arcmsr X-SVN-Commit-Revision: 358477 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 22:16:30 -0000 Author: imp Date: Sat Feb 29 22:16:27 2020 New Revision: 358477 URL: https://svnweb.freebsd.org/changeset/base/358477 Log: Remove support for varios versions from FreeBSD 4 to 8. There's no way arcmsr will still work on those versions. Cleanup really old code that's no longer needed. Modified: head/sys/dev/arcmsr/arcmsr.c head/sys/dev/arcmsr/arcmsr.h Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Sat Feb 29 22:10:00 2020 (r358476) +++ head/sys/dev/arcmsr/arcmsr.c Sat Feb 29 22:16:27 2020 (r358477) @@ -130,27 +130,13 @@ __FBSDID("$FreeBSD$"); ************************************************************************** ************************************************************************** */ -#if __FreeBSD_version >= 500005 - #include - #include - #include - #include - #include -#else - #include - #include - #include -#endif +#include +#include +#include +#include +#include -#if !defined(CAM_NEW_TRAN_CODE) && __FreeBSD_version >= 700025 -#define CAM_NEW_TRAN_CODE 1 -#endif - -#if __FreeBSD_version > 500000 #define arcmsr_callout_init(a) callout_init(a, /*mpsafe*/1); -#else -#define arcmsr_callout_init(a) callout_init(a); -#endif #define ARCMSR_DRIVER_VERSION "arcmsr version 1.40.00.01 2017-10-30" #include @@ -220,12 +206,7 @@ static device_method_t arcmsr_methods[]={ DEVMETHOD(device_shutdown, arcmsr_shutdown), DEVMETHOD(device_suspend, arcmsr_suspend), DEVMETHOD(device_resume, arcmsr_resume), - -#if __FreeBSD_version >= 803000 DEVMETHOD_END -#else - { 0, 0 } -#endif }; static driver_t arcmsr_driver={ @@ -239,59 +220,23 @@ MODULE_DEPEND(arcmsr, cam, 1, 1, 1); #ifndef BUS_DMA_COHERENT #define BUS_DMA_COHERENT 0x04 /* hint: map memory in a coherent way */ #endif -#if __FreeBSD_version >= 501000 static struct cdevsw arcmsr_cdevsw={ - #if __FreeBSD_version >= 503000 .d_version = D_VERSION, - #endif - #if (__FreeBSD_version>=503000 && __FreeBSD_version<600034) - .d_flags = D_NEEDGIANT, - #endif .d_open = arcmsr_open, /* open */ .d_close = arcmsr_close, /* close */ .d_ioctl = arcmsr_ioctl, /* ioctl */ .d_name = "arcmsr", /* name */ }; -#else - #define ARCMSR_CDEV_MAJOR 180 - -static struct cdevsw arcmsr_cdevsw = { - arcmsr_open, /* open */ - arcmsr_close, /* close */ - noread, /* read */ - nowrite, /* write */ - arcmsr_ioctl, /* ioctl */ - nopoll, /* poll */ - nommap, /* mmap */ - nostrategy, /* strategy */ - "arcmsr", /* name */ - ARCMSR_CDEV_MAJOR, /* major */ - nodump, /* dump */ - nopsize, /* psize */ - 0 /* flags */ - }; -#endif /* ************************************************************************** ************************************************************************** */ -#if __FreeBSD_version < 500005 - static int arcmsr_open(dev_t dev, int flags, int fmt, struct proc *proc) -#else - #if __FreeBSD_version < 503000 - static int arcmsr_open(dev_t dev, int flags, int fmt, struct thread *proc) - #else - static int arcmsr_open(struct cdev *dev, int flags, int fmt, struct thread *proc) - #endif -#endif +static int arcmsr_open(struct cdev *dev, int flags, int fmt, struct thread *proc) { - #if __FreeBSD_version < 503000 - struct AdapterControlBlock *acb = dev->si_drv1; - #else - int unit = dev2unit(dev); - struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit); - #endif - if(acb == NULL) { + int unit = dev2unit(dev); + struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit); + + if (acb == NULL) { return ENXIO; } return (0); @@ -300,23 +245,12 @@ static struct cdevsw arcmsr_cdevsw = { ************************************************************************** ************************************************************************** */ -#if __FreeBSD_version < 500005 - static int arcmsr_close(dev_t dev, int flags, int fmt, struct proc *proc) -#else - #if __FreeBSD_version < 503000 - static int arcmsr_close(dev_t dev, int flags, int fmt, struct thread *proc) - #else - static int arcmsr_close(struct cdev *dev, int flags, int fmt, struct thread *proc) - #endif -#endif +static int arcmsr_close(struct cdev *dev, int flags, int fmt, struct thread *proc) { - #if __FreeBSD_version < 503000 - struct AdapterControlBlock *acb = dev->si_drv1; - #else - int unit = dev2unit(dev); - struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit); - #endif - if(acb == NULL) { + int unit = dev2unit(dev); + struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit); + + if (acb == NULL) { return ENXIO; } return 0; @@ -325,24 +259,12 @@ static struct cdevsw arcmsr_cdevsw = { ************************************************************************** ************************************************************************** */ -#if __FreeBSD_version < 500005 - static int arcmsr_ioctl(dev_t dev, u_long ioctl_cmd, caddr_t arg, int flags, struct proc *proc) -#else - #if __FreeBSD_version < 503000 - static int arcmsr_ioctl(dev_t dev, u_long ioctl_cmd, caddr_t arg, int flags, struct thread *proc) - #else - static int arcmsr_ioctl(struct cdev *dev, u_long ioctl_cmd, caddr_t arg, int flags, struct thread *proc) - #endif -#endif +static int arcmsr_ioctl(struct cdev *dev, u_long ioctl_cmd, caddr_t arg, int flags, struct thread *proc) { - #if __FreeBSD_version < 503000 - struct AdapterControlBlock *acb = dev->si_drv1; - #else - int unit = dev2unit(dev); - struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit); - #endif + int unit = dev2unit(dev); + struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit); - if(acb == NULL) { + if (acb == NULL) { return ENXIO; } return (arcmsr_iop_ioctlcmd(acb, ioctl_cmd, arg)); @@ -3160,7 +3082,6 @@ static void arcmsr_action(struct cam_sim *psim, union strlcpy(cpi->hba_vid, "ARCMSR", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(psim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(psim); - #ifdef CAM_NEW_TRAN_CODE if(acb->adapter_bus_speed == ACB_BUS_SPEED_12G) cpi->base_transfer_speed = 1200000; else if(acb->adapter_bus_speed == ACB_BUS_SPEED_6G) @@ -3183,7 +3104,6 @@ static void arcmsr_action(struct cam_sim *psim, union cpi->protocol_version = SCSI_REV_2; } cpi->protocol = PROTO_SCSI; - #endif cpi->ccb_h.status |= CAM_REQ_CMP; xpt_done(pccb); break; @@ -3241,7 +3161,6 @@ static void arcmsr_action(struct cam_sim *psim, union break; } cts = &pccb->cts; - #ifdef CAM_NEW_TRAN_CODE { struct ccb_trans_settings_scsi *scsi; struct ccb_trans_settings_spi *spi; @@ -3288,22 +3207,6 @@ static void arcmsr_action(struct cam_sim *psim, union | CTS_SPI_VALID_BUS_WIDTH; } } - #else - { - cts->flags = (CCB_TRANS_DISC_ENB | CCB_TRANS_TAG_ENB); - if (acb->adapter_bus_speed == ACB_BUS_SPEED_6G) - cts->sync_period = 1; - else - cts->sync_period = 2; - cts->sync_offset = 32; - cts->bus_width = MSG_EXT_WDTR_BUS_16_BIT; - cts->valid = CCB_TRANS_SYNC_RATE_VALID | - CCB_TRANS_SYNC_OFFSET_VALID | - CCB_TRANS_BUS_WIDTH_VALID | - CCB_TRANS_DISC_VALID | - CCB_TRANS_TQ_VALID; - } - #endif pccb->ccb_h.status |= CAM_REQ_CMP; xpt_done(pccb); break; @@ -3319,38 +3222,7 @@ static void arcmsr_action(struct cam_sim *psim, union xpt_done(pccb); break; } -#if __FreeBSD_version >= 500000 cam_calc_geometry(&pccb->ccg, 1); -#else - { - struct ccb_calc_geometry *ccg; - u_int32_t size_mb; - u_int32_t secs_per_cylinder; - - ccg = &pccb->ccg; - if (ccg->block_size == 0) { - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - } - if(((1024L * 1024L)/ccg->block_size) < 0) { - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - } - size_mb = ccg->volume_size/((1024L * 1024L)/ccg->block_size); - if(size_mb > 1024 ) { - ccg->heads = 255; - ccg->secs_per_track = 63; - } else { - ccg->heads = 64; - ccg->secs_per_track = 32; - } - secs_per_cylinder = ccg->heads * ccg->secs_per_track; - ccg->cylinders = ccg->volume_size / secs_per_cylinder; - pccb->ccb_h.status |= CAM_REQ_CMP; - } -#endif xpt_done(pccb); break; default: @@ -4480,11 +4352,7 @@ static u_int32_t arcmsr_initialize(device_t dev) return ENOMEM; } } -#if __FreeBSD_version >= 700000 if(bus_dma_tag_create( /*PCI parent*/ bus_get_dma_tag(dev), -#else - if(bus_dma_tag_create( /*PCI parent*/ NULL, -#endif /*alignemnt*/ 1, /*boundary*/ 0, /*lowaddr*/ BUS_SPACE_MAXADDR, @@ -4495,10 +4363,8 @@ static u_int32_t arcmsr_initialize(device_t dev) /*nsegments*/ BUS_SPACE_UNRESTRICTED, /*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT, /*flags*/ 0, -#if __FreeBSD_version >= 501102 /*lockfunc*/ NULL, /*lockarg*/ NULL, -#endif &acb->parent_dmat) != 0) { printf("arcmsr%d: parent_dmat bus_dma_tag_create failure!\n", device_get_unit(dev)); @@ -4521,10 +4387,8 @@ static u_int32_t arcmsr_initialize(device_t dev) /*nsegments*/ ARCMSR_MAX_SG_ENTRIES, /*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT, /*flags*/ 0, -#if __FreeBSD_version >= 501102 /*lockfunc*/ busdma_lock_mutex, /*lockarg*/ &acb->isr_lock, -#endif &acb->dm_segs_dmat) != 0) { bus_dma_tag_destroy(acb->parent_dmat); @@ -4544,10 +4408,8 @@ static u_int32_t arcmsr_initialize(device_t dev) /*nsegments*/ 1, /*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT, /*flags*/ 0, -#if __FreeBSD_version >= 501102 /*lockfunc*/ NULL, /*lockarg*/ NULL, -#endif &acb->srb_dmat) != 0) { bus_dma_tag_destroy(acb->dm_segs_dmat); @@ -4822,11 +4684,7 @@ static int arcmsr_attach(device_t dev) acb->irq_id[0] = 0; irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &acb->irq_id[0], RF_SHAREABLE | RF_ACTIVE); if(irqres == NULL || -#if __FreeBSD_version >= 700025 bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY|INTR_MPSAFE, NULL, arcmsr_intr_handler, acb, &acb->ih[0])) { -#else - bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY|INTR_MPSAFE, arcmsr_intr_handler, acb, &acb->ih[0])) { -#endif printf("arcmsr%d: unable to register interrupt handler!\n", unit); goto setup_intr_failed; } @@ -4843,21 +4701,13 @@ irqx: printf("arcmsr%d: cam_simq_alloc failure!\n", unit); goto simq_alloc_failed; } -#if __FreeBSD_version >= 700025 acb->psim = cam_sim_alloc(arcmsr_action, arcmsr_poll, "arcmsr", acb, unit, &acb->isr_lock, 1, ARCMSR_MAX_OUTSTANDING_CMD, devq); -#else - acb->psim = cam_sim_alloc(arcmsr_action, arcmsr_poll, "arcmsr", acb, unit, 1, ARCMSR_MAX_OUTSTANDING_CMD, devq); -#endif if(acb->psim == NULL) { printf("arcmsr%d: cam_sim_alloc failure!\n", unit); goto sim_alloc_failed; } ARCMSR_LOCK_ACQUIRE(&acb->isr_lock); -#if __FreeBSD_version >= 700044 if(xpt_bus_register(acb->psim, dev, 0) != CAM_SUCCESS) { -#else - if(xpt_bus_register(acb->psim, 0) != CAM_SUCCESS) { -#endif printf("arcmsr%d: xpt_bus_register failure!\n", unit); goto xpt_bus_failed; } @@ -4878,12 +4728,7 @@ irqx: /* Create the control device. */ acb->ioctl_dev = make_dev(&arcmsr_cdevsw, unit, UID_ROOT, GID_WHEEL /* GID_OPERATOR */, S_IRUSR | S_IWUSR, "arcmsr%d", unit); -#if __FreeBSD_version < 503000 - acb->ioctl_dev->si_drv1 = acb; -#endif -#if __FreeBSD_version > 500005 (void)make_dev_alias(acb->ioctl_dev, "arc%d", unit); -#endif arcmsr_callout_init(&acb->devmap_callout); callout_reset(&acb->devmap_callout, 60 * hz, arcmsr_polling_devmap, acb); return (0); Modified: head/sys/dev/arcmsr/arcmsr.h ============================================================================== --- head/sys/dev/arcmsr/arcmsr.h Sat Feb 29 22:10:00 2020 (r358476) +++ head/sys/dev/arcmsr/arcmsr.h Sat Feb 29 22:16:27 2020 (r358477) @@ -71,23 +71,13 @@ #define offsetof(type, member) ((size_t)(&((type *)0)->member)) #endif -#if __FreeBSD_version >= 500005 - #define ARCMSR_LOCK_INIT(l, s) mtx_init(l, s, NULL, MTX_DEF) - #define ARCMSR_LOCK_DESTROY(l) mtx_destroy(l) - #define ARCMSR_LOCK_ACQUIRE(l) mtx_lock(l) - #define ARCMSR_LOCK_RELEASE(l) mtx_unlock(l) - #define ARCMSR_LOCK_TRY(l) mtx_trylock(l) - #define arcmsr_htole32(x) htole32(x) - typedef struct mtx arcmsr_lock_t; -#else - #define ARCMSR_LOCK_INIT(l, s) simple_lock_init(l) - #define ARCMSR_LOCK_DESTROY(l) - #define ARCMSR_LOCK_ACQUIRE(l) simple_lock(l) - #define ARCMSR_LOCK_RELEASE(l) simple_unlock(l) - #define ARCMSR_LOCK_TRY(l) simple_lock_try(l) - #define arcmsr_htole32(x) (x) - typedef struct simplelock arcmsr_lock_t; -#endif +#define ARCMSR_LOCK_INIT(l, s) mtx_init(l, s, NULL, MTX_DEF) +#define ARCMSR_LOCK_DESTROY(l) mtx_destroy(l) +#define ARCMSR_LOCK_ACQUIRE(l) mtx_lock(l) +#define ARCMSR_LOCK_RELEASE(l) mtx_unlock(l) +#define ARCMSR_LOCK_TRY(l) mtx_trylock(l) +#define arcmsr_htole32(x) htole32(x) +typedef struct mtx arcmsr_lock_t; /* ********************************************************************************** @@ -1253,11 +1243,7 @@ struct AdapterControlBlock { bus_dma_tag_t srb_dmat; /* dmat for freesrb */ bus_dmamap_t srb_dmamap; device_t pci_dev; -#if __FreeBSD_version < 503000 - dev_t ioctl_dev; -#else struct cdev *ioctl_dev; -#endif int pci_unit; struct resource *sys_res_arcmsr[2]; From owner-svn-src-head@freebsd.org Sat Feb 29 22:31:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34C88242F28; Sat, 29 Feb 2020 22:31:24 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VLjR6nlwz4LLc; Sat, 29 Feb 2020 22:31:23 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9C9E21AE1; Sat, 29 Feb 2020 22:31:23 +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 01TMVNN7089097; Sat, 29 Feb 2020 22:31:23 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01TMVNSk089096; Sat, 29 Feb 2020 22:31:23 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202002292231.01TMVNSk089096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 29 Feb 2020 22:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358478 - head/usr.sbin/powerd X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/usr.sbin/powerd X-SVN-Commit-Revision: 358478 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Feb 2020 22:31:24 -0000 Author: cperciva Date: Sat Feb 29 22:31:23 2020 New Revision: 358478 URL: https://svnweb.freebsd.org/changeset/base/358478 Log: Add -N option to powerd(8) to ignore "nice" time. With powerd_flags="-N", this makes powerd(8) exclude "nice" time when computing the CPU utilization. This makes it possible to prevent CPU-intensive "background" processes from spinning up the CPU. Note that only *userland* CPU usage belonging to "nice" processes is excluded; we do not track whether time spent in the kernel is on behalf of nice or non-nice processes, so kernel-intensive nice processes can still result in the CPU being sped up. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23868 Modified: head/usr.sbin/powerd/powerd.8 head/usr.sbin/powerd/powerd.c Modified: head/usr.sbin/powerd/powerd.8 ============================================================================== --- head/usr.sbin/powerd/powerd.8 Sat Feb 29 22:16:27 2020 (r358477) +++ head/usr.sbin/powerd/powerd.8 Sat Feb 29 22:31:23 2020 (r358478) @@ -37,6 +37,7 @@ .Op Fl i Ar percent .Op Fl m Ar freq .Op Fl M Ar freq +.Op Fl N .Op Fl n Ar mode .Op Fl p Ar ival .Op Fl P Ar pidfile @@ -102,6 +103,10 @@ The default is 50% or lower. Specifies the minimum frequency to throttle down to. .It Fl M Ar freq Specifies the maximum frequency to throttle up to. +.It Fl N +Treat "nice" time as idle for the purpose of load calculation; +i.e. do not increase the CPU frequency if the CPU is only busy +with "nice" processes. .It Fl n Ar mode Selects the .Ar mode Modified: head/usr.sbin/powerd/powerd.c ============================================================================== --- head/usr.sbin/powerd/powerd.c Sat Feb 29 22:16:27 2020 (r358477) +++ head/usr.sbin/powerd/powerd.c Sat Feb 29 22:31:23 2020 (r358478) @@ -86,7 +86,7 @@ static const char *modes[] = { #define DEVDPIPE "/var/run/devd.pipe" #define DEVCTL_MAXBUF 1024 -static int read_usage_times(int *load); +static int read_usage_times(int *load, int nonice); static int read_freqs(int *numfreqs, int **freqs, int **power, int minfreq, int maxfreq); static int set_freq(int freq); @@ -135,15 +135,17 @@ static struct timeval tried_devd; * This function returns summary load of all CPUs. It was made so * intentionally to not reduce performance in scenarios when several * threads are processing requests as a pipeline -- running one at - * a time on different CPUs and waiting for each other. + * a time on different CPUs and waiting for each other. If nonice + * is nonzero, only user+sys+intr time will be counted as load; any + * nice time will be treated as if idle. */ static int -read_usage_times(int *load) +read_usage_times(int *load, int nonice) { static long *cp_times = NULL, *cp_times_old = NULL; static int ncpus = 0; size_t cp_times_len; - int error, cpu, i, total; + int error, cpu, i, total, excl; if (cp_times == NULL) { cp_times_len = 0; @@ -175,8 +177,12 @@ read_usage_times(int *load) } if (total == 0) continue; - *load += 100 - (cp_times[cpu * CPUSTATES + CP_IDLE] - - cp_times_old[cpu * CPUSTATES + CP_IDLE]) * 100 / total; + excl = cp_times[cpu * CPUSTATES + CP_IDLE] - + cp_times_old[cpu * CPUSTATES + CP_IDLE]; + if (nonice) + excl += cp_times[cpu * CPUSTATES + CP_NICE] - + cp_times_old[cpu * CPUSTATES + CP_NICE]; + *load += 100 - excl * 100 / total; } } @@ -473,7 +479,7 @@ usage(void) { fprintf(stderr, -"usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-m freq] [-M freq] [-n mode] [-p ival] [-r %%] [-s source] [-P pidfile]\n"); +"usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-m freq] [-M freq] [-N] [-n mode] [-p ival] [-r %%] [-s source] [-P pidfile]\n"); exit(1); } @@ -490,6 +496,7 @@ main(int argc, char * argv[]) int ch, mode, mode_ac, mode_battery, mode_none, idle, to; uint64_t mjoules_used; size_t len; + int nonice; /* Default mode for all AC states is adaptive. */ mode_ac = mode_none = MODE_HIADAPTIVE; @@ -499,12 +506,13 @@ main(int argc, char * argv[]) poll_ival = DEFAULT_POLL_INTERVAL; mjoules_used = 0; vflag = 0; + nonice = 0; /* User must be root to control frequencies. */ if (geteuid() != 0) errx(1, "must be root to run"); - while ((ch = getopt(argc, argv, "a:b:i:m:M:n:p:P:r:s:v")) != -1) + while ((ch = getopt(argc, argv, "a:b:i:m:M:Nn:p:P:r:s:v")) != -1) switch (ch) { case 'a': parse_mode(optarg, &mode_ac, ch); @@ -539,6 +547,9 @@ main(int argc, char * argv[]) usage(); } break; + case 'N': + nonice = 1; + break; case 'n': parse_mode(optarg, &mode_none, ch); break; @@ -584,7 +595,7 @@ main(int argc, char * argv[]) err(1, "lookup freq_levels"); /* Check if we can read the load and supported freqs. */ - if (read_usage_times(NULL)) + if (read_usage_times(NULL, nonice)) err(1, "read_usage_times"); if (read_freqs(&numfreqs, &freqs, &mwatts, minfreq, maxfreq)) err(1, "error reading supported CPU frequencies"); @@ -766,7 +777,7 @@ main(int argc, char * argv[]) } /* Adaptive mode; get the current CPU usage times. */ - if (read_usage_times(&load)) { + if (read_usage_times(&load, nonice)) { if (vflag) warn("read_usage_times() failed"); continue;