From nobody Mon Nov 25 21:28:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XxzMh1DzNz5fDdT; Mon, 25 Nov 2024 21:28:16 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XxzMh0pCpz45p8; Mon, 25 Nov 2024 21:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732570096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EE/EjoEFH69VQvWtovyU1UwY3/kFA+zWmg+FBVTXveo=; b=Bxfx7Am8u8Hq4EanEpDIUUrTucvpHWI5NJJbhlvk8d0SsZVY32gyALkFxTJ+2GFDl5tOMH iB2bNNCGMDPapbjZZ/kSX9b2iCQzuawctAPQu3al/ldCerXKwaIfCnuOlDBA4wJlWlSCh6 kGpjcO4lUpeIlvKw6LZ3JbaYr2OJjiEyZEViP+SvKglktpjm7Kfcg/vPxdjAayyuB/jBUn r0zIYVYtdSBdwxnr4HytvGzkomTDfARqcHMoM9tFUH61oPDOJ5jH8Dsq7rtiLCWABxFOxO BdjC3RGH71VCjRPZ0TIiLOiZlWBRpUh4lLjCoxK70KShXCsL297G2wgwGq6nhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732570096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EE/EjoEFH69VQvWtovyU1UwY3/kFA+zWmg+FBVTXveo=; b=Knk1+UGTKZyHT4nQiNPfGR03XLcwioOIwUfUzmezkWZJKMKj337uwNxU4d6bjTdsdWwMDx MAQiVNNSmV1kRX1kFPQjrFJ3mX7xN7JfCmfCzv4Oq1bWn8ZNnOPVfxi19A5pS2TlpwoPL9 iN2s2cPdYXeRDdkAb76radrPOTnhPCpbxBl9YWSKdaMCBOOzJ5JcyoRRIKqdHbEWbryVlQ fPm2l09jVVCOm32GVDtQvw8SGFqXs5mH8YWdYqpCGte50xqfa3q5mDcD17LiCj1xBb8Fvb 9brs6yCrw0UqvEtPZOc1s8b4Pdi0u+elnBZw7RHdAWOJXjHZ4uskdM4TjgF3Rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732570096; a=rsa-sha256; cv=none; b=x2EecrFa6SsuSVG8m3wfCa9m7NkIl04NM5cEQbNp385qz1V4ezRZ7x01z9D2/JnLIYM81V gNTAP3Oqj0ptY2h6lPpfg83c8U4h2dV+qWaIymjUQGRFGwpgU6krRuobLls6mm8YhenEBk Xp/UJtMRBb0TZdM1hDzv1RNdkXXXhIw9FLWTqHi97wKl+k95RMQP0FFFD3knCrKMmWGlTg 3gTogm+IEuUUSAFpNUYrxWSr+/NBM8lsw3cFNXyaNImjDCi7MSX4tsZP+MOrkVGF5hcsNl 1ZzTq4+4KZ2Tkvhs+FBoAloSg0QH8xEul6cimUkOEmSf/jNpqTo1VDiIK7mSYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XxzMh0PKhzwLB; Mon, 25 Nov 2024 21:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4APLSFRh048780; Mon, 25 Nov 2024 21:28:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4APLSFd3048777; Mon, 25 Nov 2024 21:28:15 GMT (envelope-from git) Date: Mon, 25 Nov 2024 21:28:15 GMT Message-Id: <202411252128.4APLSFd3048777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d4820e1727ec - stable/13 - mac_bsdextended: Remove \n from sysctl descriptions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d4820e1727ec1897ae265c1f410c2fecede01716 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d4820e1727ec1897ae265c1f410c2fecede01716 commit d4820e1727ec1897ae265c1f410c2fecede01716 Author: Ed Maste AuthorDate: 2024-11-21 15:22:27 +0000 Commit: Ed Maste CommitDate: 2024-11-25 21:28:07 +0000 mac_bsdextended: Remove \n from sysctl descriptions sysctl(8) prints a newline after the description; the description should not end with one itself. Sponsored by: The FreeBSD Foundation (cherry picked from commit 6b62e00da4ad0624fce5e6f0b5b39a6f44c8ba60) (cherry picked from commit 28092a8bc72e969d3736ff064ad3f1ca7d80ce0b) --- sys/security/mac_bsdextended/mac_bsdextended.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c index d143901330a1..95efc537735a 100644 --- a/sys/security/mac_bsdextended/mac_bsdextended.c +++ b/sys/security/mac_bsdextended/mac_bsdextended.c @@ -88,11 +88,11 @@ static int rule_slots = 0; static int rule_version = MB_VERSION; SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_count, CTLFLAG_RD, - &rule_count, 0, "Number of defined rules\n"); + &rule_count, 0, "Number of defined rules"); SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_slots, CTLFLAG_RD, - &rule_slots, 0, "Number of used rule slots\n"); + &rule_slots, 0, "Number of used rule slots"); SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_version, CTLFLAG_RD, - &rule_version, 0, "Version number for API\n"); + &rule_version, 0, "Version number for API"); /* * This is just used for logging purposes, eventually we would like to log From nobody Mon Nov 25 21:34:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XxzVc4hL8z5fDlk; Mon, 25 Nov 2024 21:34:16 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XxzVc2517z46X4; Mon, 25 Nov 2024 21:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732570456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M9UzVYgyQl9RqLYXf0qDjLwr9ToBP+QexELy72N4reI=; b=nlrd5tituNMmN1Yibpa9jlVSuw/Vwsdl0Zi9ZqGvwItVORaYzlDj5QmMJgoO9puORgRXwU F/08D5QN0+LyqQtRHgfSuUmQ4jc2DAa1TqUleersVCyxEM+5DgkNqJLvOifjbNp9pOFem0 xRyhMxSdIvHtlcNbMLZTxsecSMXb5oWWLCJx6YkfDQFWyXNplKPFIUP0p7KINEn5880IRV ukB3u5Vt8zCQ1pUyiV97jAZncywQpZ9L4z0eWXaooSygCf6+DAXg8PDbDIHCb0VXQGJLju fyJ/hngwH75Eer9p1lKWIWI3LTkWgvKcYUvTP3ucsdB4hh84ttzr5woSqPUDlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732570456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M9UzVYgyQl9RqLYXf0qDjLwr9ToBP+QexELy72N4reI=; b=LMwSE2YoIqjajHEAAtAqdNIhxnW/udehvB/ChBG7KNUo5YoAAFN8DWnwuQFfXailThq/fe 7KWj7SuAAwt8LW6eVzpQv4GCwNeXXHc3WGr24FM3uiCk/y8vFxO76QTJ/KAHnhZtb7nCnV QkzaN3IiGJE3Wj8tRakDk8GgMKx2xFphNiFl57i29TlvGLCZUtmC8Z32E1zqdeBjBw9ILN yB1Nxe+72qDZsjtEasei1vXdht8VyhUJH0kJg72pKiiDFI+Ig8FxgyXYc/zXJ/tbSJUwE3 JNrA46jFHt4lUDnkKVdqQWA8XvAecnCR/teIHMtakJhW6KvRNkiYxh43wCZ9Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732570456; a=rsa-sha256; cv=none; b=hrott2u2PQHarukY6X5q+pyCydjB7ZTWHvgnBJk+52z3rwasIepzHfV7MoOSyZQPh6nqIp rWEatUz+/3pdCkKq/Z01jJqwhQ6PUy7dXNGtgyBAycbvyiJNVn4TbbAH3HZ9cHQCS371EU aPbf3e29qps72SdxHqviy0Omq7myJgXN8MFZ86Ikw0mxAC3pWzUMn1dQEVku/XPPRlviqM E/q8bAIZ7Zn5nNj3lp9xOfXdhOqRjEOxGfAwnFiRBrDjk4lM52AF2dZg+y96Gx+yQooK2S TpbsNZl/TT0Pdvxq+E77t+4hQ6yBsAcgFRUJ7M++bLgZ2n+FOwTmtOt5Zg4RnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XxzVc1ZSrzwLg; Mon, 25 Nov 2024 21:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4APLYGrZ066066; Mon, 25 Nov 2024 21:34:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4APLYGXM066063; Mon, 25 Nov 2024 21:34:16 GMT (envelope-from git) Date: Mon, 25 Nov 2024 21:34:16 GMT Message-Id: <202411252134.4APLYGXM066063@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: e59630a3ddc0 - stable/14 - dconschat: Increase WARNS to 2 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e59630a3ddc0683df664459c59d633b881bd4b1d Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e59630a3ddc0683df664459c59d633b881bd4b1d commit e59630a3ddc0683df664459c59d633b881bd4b1d Author: Ed Maste AuthorDate: 2024-11-03 20:04:08 +0000 Commit: Ed Maste CommitDate: 2024-11-25 21:33:46 +0000 dconschat: Increase WARNS to 2 Follow the existing pattern of fflush() in verbose mode. PR: 71665 Sponsored by: The FreeBSD Foundation (cherry picked from commit 75d11bfbc6d4289e4b3d91414e46a3af51f4402a) --- usr.sbin/dconschat/Makefile | 2 +- usr.sbin/dconschat/dconschat.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.sbin/dconschat/Makefile b/usr.sbin/dconschat/Makefile index f5f7795f284b..f0020c2f8475 100644 --- a/usr.sbin/dconschat/Makefile +++ b/usr.sbin/dconschat/Makefile @@ -6,6 +6,6 @@ CFLAGS+= -I${SRCTOP}/sys LIBADD= kvm -WARNS?= 1 +WARNS?= 2 .include diff --git a/usr.sbin/dconschat/dconschat.c b/usr.sbin/dconschat/dconschat.c index 72d1aa276bd3..d18477c51522 100644 --- a/usr.sbin/dconschat/dconschat.c +++ b/usr.sbin/dconschat/dconschat.c @@ -519,8 +519,10 @@ ok: rlen = len; #if 1 - if (verbose == 1) - printf("[%d]", rlen); fflush(stdout); + if (verbose == 1) { + printf("[%d]", rlen); + fflush(stdout); + } #endif again: From nobody Mon Nov 25 22:06:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xy0CV2Tf3z5fHCw; Mon, 25 Nov 2024 22:06:14 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xy0CV1vCLz4Dgw; Mon, 25 Nov 2024 22:06:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732572374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wVtxZMkM1Dd4tFKrzVw3nw3zL9jjYbXcquwbzbDgEvY=; b=pDEwnlafQDMkuBXKZAx30EW9GtY93seqKM5PBvuCdauMSlfTOmkZRpQtAOyUj6idmQ9taw U4hdtQMBP8QGwZmg+ahX8FVa8fBpb+lC4DCHcqrBl96Mi2I1pYmNSEeDsVr/1KSa5r59LM HYPh+L7x4YvxnNBDWqZgBiWhEwjVDWuF7gX7scKc20KBeWGbtDySl9sPmJbH4Oogaat0ia A6r0j8DlR3hmO34OQUXaD6YCBuH8wyuoIHawHF+2AHp9OxAqYvIoMZcZ6qg1zJAW5zrL2Q PbkGoowRZoNdY3oj5vLYkekZnPLmsK7R0zOwXD/gb/F5Y00Pp7/IbtxXiUVTWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732572374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wVtxZMkM1Dd4tFKrzVw3nw3zL9jjYbXcquwbzbDgEvY=; b=caAacR+8HbMcXFw7i+oVs4Ot07o/ZE1FaeM7X57rJKLet1qhkX/VIShvKBzgydc1Yw5vCa YVsyv4V2179kkUuxR3KzySjgDGFn1pjJwU3PetvjqFefAxWbe18Ekt+vMs3d4YtjMgj4BO 7A4bRY62cfwOd8L5vmMmKncjAytPtZQaoZ+LgwJuIm31gIMYKMCvpT/T72SsLXCCfV4tsv Y0spTZLJltS0FM/CZjEVSRoWcE+W9MoTmClgjm2tMn/R3HB7XWTA/wNCYW57LONrKnxjws /ZRVK50SOtvN/AYTXo9FVDOzFVLWKhtReWGniGI3LSOpifYqBv8Jsu2RS7V+eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732572374; a=rsa-sha256; cv=none; b=UkbXiADQKOFs5JKOLVOF1FBCds8aXoJEPipN2o+xlrJvLoFm1wBrV22jFbV3fx0aZXEn1o AxYkR7C9TELFabQAW1RRLwTqLdmD9ueBOnxuxhgHzLQzi6qvyWSZDiUTHamGzQ6OA0xRt3 ZWb9B66CQ04vF5GxcrNM3wK3BUkiRz47GDDQokFa6hkgJVfTHvt3ABUc4OBqld5xHIJR00 lx0KJ8FLeUOfiLUN7mtBEhxIDXZNlFj4jY0dWKL4zicCQFD1NmPjQCcMySyYwRfLluDwTa UAtEptCSHyZ7hnbIBXhrmiIk+HgVdy3NINCNDrJ23P1KZ/UCb3tQhWUm86PiCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xy0CV1VZZzy0Y; Mon, 25 Nov 2024 22:06:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4APM6E83023918; Mon, 25 Nov 2024 22:06:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4APM6EJq023915; Mon, 25 Nov 2024 22:06:14 GMT (envelope-from git) Date: Mon, 25 Nov 2024 22:06:14 GMT Message-Id: <202411252206.4APM6EJq023915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 435a5f94fbc0 - stable/14 - sbin/{ffsinfo,mount,newfs}: reference ffs(4) in man pages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 435a5f94fbc09959c0a4e48b1e81a50fcfd45673 Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=435a5f94fbc09959c0a4e48b1e81a50fcfd45673 commit 435a5f94fbc09959c0a4e48b1e81a50fcfd45673 Author: David Gilbert AuthorDate: 2024-11-25 21:57:20 +0000 Commit: Robert Clausecker CommitDate: 2024-11-25 22:05:11 +0000 sbin/{ffsinfo,mount,newfs}: reference ffs(4) in man pages With some copy-editing to account for the man page being in section 7 on stable/14. PR: 282867 MFC: stable/14 Approved by: mhorne (via IRC) (cherry picked from commit 3a212cc66ad1b5d6c1dc97eb07143e919a123491) --- sbin/ffsinfo/ffsinfo.8 | 3 ++- sbin/mount/mount.8 | 3 ++- sbin/newfs/newfs.8 | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sbin/ffsinfo/ffsinfo.8 b/sbin/ffsinfo/ffsinfo.8 index 4d76acd0ba0a..e4b33b4e2551 100644 --- a/sbin/ffsinfo/ffsinfo.8 +++ b/sbin/ffsinfo/ffsinfo.8 @@ -36,7 +36,7 @@ .\" .\" $TSHeader: src/sbin/ffsinfo/ffsinfo.8,v 1.3 2000/12/12 19:30:55 tomsoft Exp $ .\" -.Dd September 8, 2000 +.Dd November 19, 2024 .Dt FFSINFO 8 .Os .Sh NAME @@ -120,6 +120,7 @@ to .Pa /var/tmp/ffsinfo with all available information. .Sh SEE ALSO +.Xr ffs 7 , .Xr dumpfs 8 , .Xr fsck 8 , .Xr gpart 8 , diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8 index 680f28766af8..218559a70dcb 100644 --- a/sbin/mount/mount.8 +++ b/sbin/mount/mount.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 24, 2024 +.Dd November 19, 2024 .Dt MOUNT 8 .Os .Sh NAME @@ -572,6 +572,7 @@ support for a particular file system might be provided either on a static .Xr procfs 5 , .Xr tarfs 5 , .Xr tmpfs 5 , +.Xr ffs 7 , .Xr automount 8 , .Xr fstyp 8 , .Xr kldload 8 , diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index 4ac6e56879b4..9b70643ee646 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -27,7 +27,7 @@ .\" .\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 .\" -.Dd May 18, 2024 +.Dd November 19, 2024 .Dt NEWFS 8 .Os .Sh NAME @@ -355,6 +355,7 @@ on file systems that contain many small files. .Xr geom 4 , .Xr disktab 5 , .Xr fs 5 , +.Xr ffs 7 , .Xr camcontrol 8 , .Xr dump 8 , .Xr dumpfs 8 , From nobody Tue Nov 26 15:35:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyRVB16G9z5fcTP; Tue, 26 Nov 2024 15:35:30 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyRVB0Kkpz4j63; Tue, 26 Nov 2024 15:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732635330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z/4AAkGk1Hkp4wGtqSGWr8iTVC5Jp5p+W1/MOwNIvW0=; b=GzinPBoQ9J0ao6iW/Cq6+C3IRnWmTfg1X9DcudC0NtgGfU3HJYRtm80fNSAb7N8agf7psa sYec6a62HbWAOuj4Qi4XIDDpCEJaikaycEQPgOf69nU7nkhJrpzsTPtLmIjnqqSdrDsVDm Lw2G82UdUuuOPQzi2L7/tcgs1lhj6wgU8TGI5UUPNcGIpl1k+gbIQ+HXFvZlR4Hgr+JSvp BLZC+1Q21R2neGAepH3McJVZlXHAZaW9dKIwe8JqQKh80gKOLi6IBfM6WAzJY8SCxoZ5cs zEMj+UsPGU4zwDyFATiYmZVhzB4ZmmUbgaRZyPHDUk/kStFKE7CTxZ7y3Fov6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732635330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z/4AAkGk1Hkp4wGtqSGWr8iTVC5Jp5p+W1/MOwNIvW0=; b=ZTqr13NLY1n4vKJVXSsIpoWGyHI1RDKlhFopH60DyIH+9MLzChI9KItoOa0+kddAcAz+pv Majdmj/Lj1WK3Wcc2RyYglkkIptKrB9uLt7ePYNsJKtLCgeUd3XZl662/sIZoEDYlcpj9p vaIHdIeqdZhicoyg4kJcFYSXT/wR1xG8UFez5nDnhF7wH1tXCbp5Gj6Qw6FWIcyY2kzq41 ZJjCBXJWC7NMW3DCMX+valcJsvgV97a7ZRfLnwDbcNzfJlItt20BypTWrlMC+uJMysSydm 7iD2NGI3/+US538ORbbcM1xgU4dOG6Sp/SHyHy45rNflgK0m/V+bkCMFWu9hxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732635330; a=rsa-sha256; cv=none; b=axSSCyUHBqlKzaVWTzgm7kEhq4Dz9GsmaoZR0Fa2HTQk5OLZgqeDIr05GmRcYIikhqAj2i mcINxdLvVRrKzNYvayOpmM4egVW3myKenuLpniElnoZ5FtcTzq+FUBHUcU8Xxf4JuxIWip sCng1MP00EZdkcbqcK1duJcWSaQofpB8uftosNlX5Ps9usIQGfULXnTl8I/+nTHBi8u6mi SoFCkWsKYimal9WOMTiB8DbuhiXDW1N/MERVGOG9EDWISpPUPdwqdg0YpOKMg3224WI2TD 61wsdCD9oM/v/Rjl1H9NaWCOn0rsLdPAslziPcw4F54Ug2N4gSAaiu1XC7g3+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyRV972ghzX0r; Tue, 26 Nov 2024 15:35:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AQFZTYu075847; Tue, 26 Nov 2024 15:35:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AQFZTE4075844; Tue, 26 Nov 2024 15:35:29 GMT (envelope-from git) Date: Tue, 26 Nov 2024 15:35:29 GMT Message-Id: <202411261535.4AQFZTE4075844@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 770498cf8bdc - stable/13 - pvscsi: maximum target number is one less than number of targets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 770498cf8bdce4d0909093a4ebd4cab104fa0ff2 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=770498cf8bdce4d0909093a4ebd4cab104fa0ff2 commit 770498cf8bdce4d0909093a4ebd4cab104fa0ff2 Author: Yuri Pankov AuthorDate: 2023-05-05 09:48:57 +0000 Commit: Zhenlei Huang CommitDate: 2024-11-26 15:32:47 +0000 pvscsi: maximum target number is one less than number of targets Fix the number of targets we inquiry to be one less than the maximum number of targets adapter reports. This gets rid of the errors reported on VMware Workstation: (probe36:pvscsi0:0:65:0): INQUIRY. CDB: 12 00 00 00 24 00 (probe36:pvscsi0:0:65:0): CAM status: CCB request completed with an error While here, print the maximum number of targets. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D39867 (cherry picked from commit 6abf81b3d6747da0baa90860d5a6e929c97c9bb9) --- sys/dev/vmware/pvscsi/pvscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/vmware/pvscsi/pvscsi.c b/sys/dev/vmware/pvscsi/pvscsi.c index f7d49c62372e..b3be2280eb5e 100644 --- a/sys/dev/vmware/pvscsi/pvscsi.c +++ b/sys/dev/vmware/pvscsi/pvscsi.c @@ -1410,7 +1410,7 @@ finish_ccb: cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; cpi->hba_eng_cnt = 0; /* cpi->vuhba_flags = 0; */ - cpi->max_target = sc->max_targets; + cpi->max_target = sc->max_targets - 1; cpi->max_lun = 0; cpi->async_flags = 0; cpi->hpath_id = 0; @@ -1682,6 +1682,7 @@ pvscsi_attach(device_t dev) PVSCSI_MAX_REQ_QUEUE_DEPTH); device_printf(sc->dev, "Use Msg: %d\n", sc->use_msg); + device_printf(sc->dev, "Max targets: %d\n", sc->max_targets); device_printf(sc->dev, "REQ num pages: %d\n", sc->req_ring_num_pages); device_printf(sc->dev, "CMP num pages: %d\n", sc->cmp_ring_num_pages); device_printf(sc->dev, "MSG num pages: %d\n", sc->msg_ring_num_pages); From nobody Wed Nov 27 00:29:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XygKn2t02z5fFvF; Wed, 27 Nov 2024 00:29:01 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XygKn2bfGz4V2l; Wed, 27 Nov 2024 00:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mz5swnkwpuKqRMzSxiW2JMwxL+/HZ0Vzc3nwdVfsmzc=; b=F0YN4MFtic0XaI4e3URyPkbhqIVBsImtK50e4jbn5vl1HNrr7E/BkHmZVfFjKJtzwD7bLE QirMLTNLphjfqMUb/AeJQcmw2lHt7FiidB6FybCq+dGbKeqPMirX9pwGyGJQI8v41fkt+H 7PzrZyvTxjyUOqyzcd/bkrdgWOvTsTmO96xTMO7Mu9+G3siDlu9xnmq2cjEa+Iz9I+vN7D nBdx3pakMyl0ej/BXk5yFrpfMQnrRZ11ujyGK4P8GQLN+GmyAdP54cJvmx0qN0Rf8ZSOIu nW4ZrSD0P3Qweihj0WyijQAfrgP4aHWUv4Nz5GgCanGcvFMI6KHpPqQ8ot3I1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mz5swnkwpuKqRMzSxiW2JMwxL+/HZ0Vzc3nwdVfsmzc=; b=HZl3vngR+XeKWJg2hFqHrZWlkxGUoak55mgieyq/APKwpPBYXLVvgeMF2RBcLyVbc3q8+1 YpzL7aJclvhsDr5QonHWW5OFyKrrrJwj+j4htBlWg92oTnJgb3Kf4e8fT2TRbwP+FnuXB/ 9NWwZZz03Ijr6sa1LKwlXU3Njo8R8EIyfVIiOe9uCVRFY4rp9yaavZ2N4HMewAqpzm16Kv B2r8qbQA2/VE/EvVhHDTKe8d0UyK5QOonBHjNkdcGykYemJs59CMfI6XeZ6rRB37WAdNzx FxvpU/2HJ9scqLAxctxfygKacAIaZBsj95wXHXWM1jY5zl7OBZM9kL+xtRB7Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732667341; a=rsa-sha256; cv=none; b=Ag2Le7ybJ8RJ6C41zTmsRttLfhOIoVUmjMIyCJnd/yoGcZ+/tzL0x4l1/0R2ftV36hsm1p pCPCURBRID23u6o53N4bSlm1/t3bJj5FG5uLLpChNEgO6NEJreQJcIYf7tr6ZNXxjdp/WL 4+26xkl+pqzgK+xDsGfn32F+y7reRmpHDNXWResYOaI7g4PNaWH1MvIIL9XXEdvRz8sz2t p1vICdw0lVesjPCRsJvfDaxHaKADXjReVFqRwOcI31xsTSxq3htJw2GE8eAH9Zk1oJJ7W1 pPdBA85eAX7pvejWMq187SoyIg1XSLGYT1Ki/OYmAvw500bLzUk6LhmqnZdfmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XygKn24xSzmxJ; Wed, 27 Nov 2024 00:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR0T1qp063760; Wed, 27 Nov 2024 00:29:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR0T1GW063757; Wed, 27 Nov 2024 00:29:01 GMT (envelope-from git) Date: Wed, 27 Nov 2024 00:29:01 GMT Message-Id: <202411270029.4AR0T1GW063757@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 23a4b5497a37 - stable/14 - igc: Normalize indentation a bit List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 23a4b5497a379fd417b19453107a8490384d875d Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=23a4b5497a379fd417b19453107a8490384d875d commit 23a4b5497a379fd417b19453107a8490384d875d Author: Kevin Bowling AuthorDate: 2024-11-24 03:17:27 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 00:27:32 +0000 igc: Normalize indentation a bit Sponsored by: BBOX.io (cherry picked from commit d1bb1a501118851b02a182afdd9dd1413e9f4ce0) --- sys/dev/igc/if_igc.c | 294 +++++++++++++++++++++++++-------------------------- 1 file changed, 147 insertions(+), 147 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 9a4d0b2dd0ac..515bb35ac8fd 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -632,7 +632,7 @@ igc_if_attach_pre(if_ctx_t ctx) /* Copy the permanent MAC address out of the EEPROM */ if (igc_read_mac_addr(hw) < 0) { device_printf(dev, "EEPROM read error while reading MAC" - " address\n"); + " address\n"); error = EIO; goto err_late; } @@ -772,7 +772,7 @@ igc_if_mtu_set(if_ctx_t ctx, uint32_t mtu) struct igc_softc *sc = iflib_get_softc(ctx); if_softc_ctx_t scctx = iflib_get_softc_ctx(ctx); - IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); + IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); /* 9K Jumbo Frame size */ max_frame_size = 9234; @@ -1170,13 +1170,13 @@ igc_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) break; case 100: ifmr->ifm_active |= IFM_100_TX; - break; + break; case 1000: ifmr->ifm_active |= IFM_1000_T; break; case 2500: - ifmr->ifm_active |= IFM_2500_T; - break; + ifmr->ifm_active |= IFM_2500_T; + break; } if (sc->link_duplex == FULL_DUPLEX) @@ -1210,9 +1210,9 @@ igc_if_media_change(if_ctx_t ctx) case IFM_AUTO: sc->hw.phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; break; - case IFM_2500_T: - sc->hw.phy.autoneg_advertised = ADVERTISE_2500_FULL; - break; + case IFM_2500_T: + sc->hw.phy.autoneg_advertised = ADVERTISE_2500_FULL; + break; case IFM_1000_T: sc->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL; break; @@ -1296,7 +1296,7 @@ igc_if_multi_set(if_ctx_t ctx) { struct igc_softc *sc = iflib_get_softc(ctx); if_t ifp = iflib_get_ifp(ctx); - u8 *mta; /* Multicast array memory */ + u8 *mta; /* Multicast array memory */ u32 reg_rctl = 0; int mcnt = 0; @@ -1315,8 +1315,8 @@ igc_if_multi_set(if_ctx_t ctx) if (igc_debug_sbp) reg_rctl |= IGC_RCTL_SBP; } else if (mcnt >= MAX_NUM_MULTICAST_ADDRESSES || - if_getflags(ifp) & IFF_ALLMULTI) { - reg_rctl |= IGC_RCTL_MPE; + if_getflags(ifp) & IFF_ALLMULTI) { + reg_rctl |= IGC_RCTL_MPE; reg_rctl &= ~IGC_RCTL_UPE; } else reg_rctl &= ~(IGC_RCTL_UPE | IGC_RCTL_MPE); @@ -1662,12 +1662,12 @@ igc_setup_msix(if_ctx_t ctx) static void igc_init_dmac(struct igc_softc *sc, u32 pba) { - device_t dev = sc->dev; + device_t dev = sc->dev; struct igc_hw *hw = &sc->hw; - u32 dmac, reg = ~IGC_DMACR_DMAC_EN; - u16 hwm; - u16 max_frame_size; - int status; + u32 dmac, reg = ~IGC_DMACR_DMAC_EN; + u16 hwm; + u16 max_frame_size; + int status; max_frame_size = sc->shared->isc_max_frame_size; @@ -2137,7 +2137,7 @@ igc_initialize_transmit_unit(if_ctx_t ctx) tctl = IGC_READ_REG(&sc->hw, IGC_TCTL); tctl &= ~IGC_TCTL_CT; tctl |= (IGC_TCTL_PSP | IGC_TCTL_RTLC | IGC_TCTL_EN | - (IGC_COLLISION_THRESHOLD << IGC_CT_SHIFT)); + (IGC_COLLISION_THRESHOLD << IGC_CT_SHIFT)); /* This write will effectively turn on the transmit unit. */ IGC_WRITE_REG(&sc->hw, IGC_TCTL, tctl); @@ -2648,17 +2648,17 @@ igc_add_hw_stats(struct igc_softc *sc) /* Driver Statistics */ SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "dropped", - CTLFLAG_RD, &sc->dropped_pkts, - "Driver dropped packets"); + CTLFLAG_RD, &sc->dropped_pkts, + "Driver dropped packets"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "link_irq", - CTLFLAG_RD, &sc->link_irq, - "Link MSI-X IRQ Handled"); + CTLFLAG_RD, &sc->link_irq, + "Link MSI-X IRQ Handled"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "rx_overruns", - CTLFLAG_RD, &sc->rx_overruns, - "RX overruns"); + CTLFLAG_RD, &sc->rx_overruns, + "RX overruns"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "watchdog_timeouts", - CTLFLAG_RD, &sc->watchdog_events, - "Watchdog timeouts"); + CTLFLAG_RD, &sc->watchdog_events, + "Watchdog timeouts"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "device_control", CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, IGC_CTRL, igc_sysctl_reg_handler, "IU", @@ -2668,11 +2668,11 @@ igc_add_hw_stats(struct igc_softc *sc) sc, IGC_RCTL, igc_sysctl_reg_handler, "IU", "Receiver Control Register"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_high_water", - CTLFLAG_RD, &sc->hw.fc.high_water, 0, - "Flow Control High Watermark"); + CTLFLAG_RD, &sc->hw.fc.high_water, 0, + "Flow Control High Watermark"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_low_water", - CTLFLAG_RD, &sc->hw.fc.low_water, 0, - "Flow Control Low Watermark"); + CTLFLAG_RD, &sc->hw.fc.low_water, 0, + "Flow Control Low Watermark"); for (int i = 0; i < sc->tx_num_queues; i++, tx_que++) { struct tx_ring *txr = &tx_que->txr; @@ -2694,8 +2694,8 @@ igc_add_hw_stats(struct igc_softc *sc) IGC_TDT(txr->me), igc_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"); + CTLFLAG_RD, &txr->tx_irq, + "Queue MSI-X Transmit Interrupts"); } for (int j = 0; j < sc->rx_num_queues; j++, rx_que++) { @@ -2707,8 +2707,8 @@ igc_add_hw_stats(struct igc_softc *sc) SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", CTLTYPE_UINT | CTLFLAG_RD, rx_que, - false, igc_sysctl_interrupt_rate_handler, "IU", - "Interrupt Rate"); + false, igc_sysctl_interrupt_rate_handler, "IU", + "Interrupt Rate"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, IGC_RDH(rxr->me), igc_sysctl_reg_handler, "IU", @@ -2718,8 +2718,8 @@ igc_add_hw_stats(struct igc_softc *sc) IGC_RDT(rxr->me), igc_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"); + CTLFLAG_RD, &rxr->rx_irq, + "Queue MSI-X Receive Interrupts"); } /* MAC stats get their own sub node */ @@ -2729,156 +2729,156 @@ igc_add_hw_stats(struct igc_softc *sc) stat_list = SYSCTL_CHILDREN(stat_node); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "excess_coll", - CTLFLAG_RD, &stats->ecol, - "Excessive collisions"); + CTLFLAG_RD, &stats->ecol, + "Excessive collisions"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "single_coll", - CTLFLAG_RD, &stats->scc, - "Single collisions"); + CTLFLAG_RD, &stats->scc, + "Single collisions"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "multiple_coll", - CTLFLAG_RD, &stats->mcc, - "Multiple collisions"); + CTLFLAG_RD, &stats->mcc, + "Multiple collisions"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "late_coll", - CTLFLAG_RD, &stats->latecol, - "Late collisions"); + CTLFLAG_RD, &stats->latecol, + "Late collisions"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "collision_count", - CTLFLAG_RD, &stats->colc, - "Collision Count"); + CTLFLAG_RD, &stats->colc, + "Collision Count"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "symbol_errors", - CTLFLAG_RD, &sc->stats.symerrs, - "Symbol Errors"); + CTLFLAG_RD, &sc->stats.symerrs, + "Symbol Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "sequence_errors", - CTLFLAG_RD, &sc->stats.sec, - "Sequence Errors"); + CTLFLAG_RD, &sc->stats.sec, + "Sequence Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "defer_count", - CTLFLAG_RD, &sc->stats.dc, - "Defer Count"); + CTLFLAG_RD, &sc->stats.dc, + "Defer Count"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets", - CTLFLAG_RD, &sc->stats.mpc, - "Missed Packets"); + CTLFLAG_RD, &sc->stats.mpc, + "Missed Packets"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_length_errors", - CTLFLAG_RD, &sc->stats.rlec, - "Receive Length Errors"); + CTLFLAG_RD, &sc->stats.rlec, + "Receive Length Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", - CTLFLAG_RD, &sc->stats.rnbc, - "Receive No Buffers"); + CTLFLAG_RD, &sc->stats.rnbc, + "Receive No Buffers"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_undersize", - CTLFLAG_RD, &sc->stats.ruc, - "Receive Undersize"); + CTLFLAG_RD, &sc->stats.ruc, + "Receive Undersize"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_fragmented", - CTLFLAG_RD, &sc->stats.rfc, - "Fragmented Packets Received "); + CTLFLAG_RD, &sc->stats.rfc, + "Fragmented Packets Received "); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_oversize", - CTLFLAG_RD, &sc->stats.roc, - "Oversized Packets Received"); + CTLFLAG_RD, &sc->stats.roc, + "Oversized Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_jabber", - CTLFLAG_RD, &sc->stats.rjc, - "Recevied Jabber"); + CTLFLAG_RD, &sc->stats.rjc, + "Recevied Jabber"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_errs", - CTLFLAG_RD, &sc->stats.rxerrc, - "Receive Errors"); + CTLFLAG_RD, &sc->stats.rxerrc, + "Receive Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "crc_errs", - CTLFLAG_RD, &sc->stats.crcerrs, - "CRC errors"); + CTLFLAG_RD, &sc->stats.crcerrs, + "CRC errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "alignment_errs", - CTLFLAG_RD, &sc->stats.algnerrc, - "Alignment Errors"); + CTLFLAG_RD, &sc->stats.algnerrc, + "Alignment Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_recvd", - CTLFLAG_RD, &sc->stats.xonrxc, - "XON Received"); + CTLFLAG_RD, &sc->stats.xonrxc, + "XON Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_txd", - CTLFLAG_RD, &sc->stats.xontxc, - "XON Transmitted"); + CTLFLAG_RD, &sc->stats.xontxc, + "XON Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_recvd", - CTLFLAG_RD, &sc->stats.xoffrxc, - "XOFF Received"); + CTLFLAG_RD, &sc->stats.xoffrxc, + "XOFF Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", - CTLFLAG_RD, &sc->stats.xofftxc, - "XOFF Transmitted"); + CTLFLAG_RD, &sc->stats.xofftxc, + "XOFF Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "unsupported_fc_recvd", - CTLFLAG_RD, &sc->stats.fcruc, - "Unsupported Flow Control Received"); + CTLFLAG_RD, &sc->stats.fcruc, + "Unsupported Flow Control Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_recvd", - CTLFLAG_RD, &sc->stats.mgprc, - "Management Packets Received"); + CTLFLAG_RD, &sc->stats.mgprc, + "Management Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_drop", - CTLFLAG_RD, &sc->stats.mgpdc, - "Management Packets Dropped"); + CTLFLAG_RD, &sc->stats.mgpdc, + "Management Packets Dropped"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_txd", - CTLFLAG_RD, &sc->stats.mgptc, - "Management Packets Transmitted"); + CTLFLAG_RD, &sc->stats.mgptc, + "Management Packets Transmitted"); /* Packet Reception Stats */ SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", - CTLFLAG_RD, &sc->stats.tpr, - "Total Packets Received "); + CTLFLAG_RD, &sc->stats.tpr, + "Total Packets Received "); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", - CTLFLAG_RD, &sc->stats.gprc, - "Good Packets Received"); + CTLFLAG_RD, &sc->stats.gprc, + "Good Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_recvd", - CTLFLAG_RD, &sc->stats.bprc, - "Broadcast Packets Received"); + CTLFLAG_RD, &sc->stats.bprc, + "Broadcast Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", - CTLFLAG_RD, &sc->stats.mprc, - "Multicast Packets Received"); + CTLFLAG_RD, &sc->stats.mprc, + "Multicast Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_64", - CTLFLAG_RD, &sc->stats.prc64, - "64 byte frames received "); + CTLFLAG_RD, &sc->stats.prc64, + "64 byte frames received "); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127", - CTLFLAG_RD, &sc->stats.prc127, - "65-127 byte frames received"); + CTLFLAG_RD, &sc->stats.prc127, + "65-127 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255", - CTLFLAG_RD, &sc->stats.prc255, - "128-255 byte frames received"); + CTLFLAG_RD, &sc->stats.prc255, + "128-255 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511", - CTLFLAG_RD, &sc->stats.prc511, - "256-511 byte frames received"); + CTLFLAG_RD, &sc->stats.prc511, + "256-511 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023", - CTLFLAG_RD, &sc->stats.prc1023, - "512-1023 byte frames received"); + CTLFLAG_RD, &sc->stats.prc1023, + "512-1023 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522", - CTLFLAG_RD, &sc->stats.prc1522, - "1023-1522 byte frames received"); + CTLFLAG_RD, &sc->stats.prc1522, + "1023-1522 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", - CTLFLAG_RD, &sc->stats.gorc, - "Good Octets Received"); + CTLFLAG_RD, &sc->stats.gorc, + "Good Octets Received"); /* Packet Transmission Stats */ SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_txd", - CTLFLAG_RD, &sc->stats.gotc, - "Good Octets Transmitted"); + CTLFLAG_RD, &sc->stats.gotc, + "Good Octets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_txd", - CTLFLAG_RD, &sc->stats.tpt, - "Total Packets Transmitted"); + CTLFLAG_RD, &sc->stats.tpt, + "Total Packets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", - CTLFLAG_RD, &sc->stats.gptc, - "Good Packets Transmitted"); + CTLFLAG_RD, &sc->stats.gptc, + "Good Packets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_txd", - CTLFLAG_RD, &sc->stats.bptc, - "Broadcast Packets Transmitted"); + CTLFLAG_RD, &sc->stats.bptc, + "Broadcast Packets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_txd", - CTLFLAG_RD, &sc->stats.mptc, - "Multicast Packets Transmitted"); + CTLFLAG_RD, &sc->stats.mptc, + "Multicast Packets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_64", - CTLFLAG_RD, &sc->stats.ptc64, - "64 byte frames transmitted "); + CTLFLAG_RD, &sc->stats.ptc64, + "64 byte frames transmitted "); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_65_127", - CTLFLAG_RD, &sc->stats.ptc127, - "65-127 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc127, + "65-127 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_128_255", - CTLFLAG_RD, &sc->stats.ptc255, - "128-255 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc255, + "128-255 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_256_511", - CTLFLAG_RD, &sc->stats.ptc511, - "256-511 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc511, + "256-511 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_512_1023", - CTLFLAG_RD, &sc->stats.ptc1023, - "512-1023 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc1023, + "512-1023 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_1024_1522", - CTLFLAG_RD, &sc->stats.ptc1522, - "1024-1522 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc1522, + "1024-1522 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tso_txd", - CTLFLAG_RD, &sc->stats.tsctc, - "TSO Contexts Transmitted"); + CTLFLAG_RD, &sc->stats.tsctc, + "TSO Contexts Transmitted"); /* Interrupt Stats */ @@ -2887,12 +2887,12 @@ igc_add_hw_stats(struct igc_softc *sc) int_list = SYSCTL_CHILDREN(int_node); SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "asserts", - CTLFLAG_RD, &sc->stats.iac, - "Interrupt Assertion Count"); + CTLFLAG_RD, &sc->stats.iac, + "Interrupt Assertion Count"); SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_desc_min_thresh", - CTLFLAG_RD, &sc->stats.rxdmtc, - "Rx Desc Min Thresh Count"); + CTLFLAG_RD, &sc->stats.rxdmtc, + "Rx Desc Min Thresh Count"); } static void @@ -2913,21 +2913,21 @@ igc_sbuf_fw_version(struct igc_fw_version *fw_ver, struct sbuf *buf) if (fw_ver->eep_major || fw_ver->eep_minor || fw_ver->eep_build) { sbuf_printf(buf, "EEPROM V%d.%d-%d", fw_ver->eep_major, - fw_ver->eep_minor, fw_ver->eep_build); + fw_ver->eep_minor, fw_ver->eep_build); space = " "; } if (fw_ver->invm_major || fw_ver->invm_minor || fw_ver->invm_img_type) { sbuf_printf(buf, "%sNVM V%d.%d imgtype%d", - space, fw_ver->invm_major, fw_ver->invm_minor, - fw_ver->invm_img_type); + space, fw_ver->invm_major, fw_ver->invm_minor, + fw_ver->invm_img_type); space = " "; } if (fw_ver->or_valid) { sbuf_printf(buf, "%sOption ROM V%d-b%d-p%d", - space, fw_ver->or_major, fw_ver->or_build, - fw_ver->or_patch); + space, fw_ver->or_major, fw_ver->or_build, + fw_ver->or_patch); space = " "; } @@ -3085,7 +3085,7 @@ igc_set_flowcntl(SYSCTL_HANDLER_ARGS) { int error; static int input = 3; /* default is full */ - struct igc_softc *sc = (struct igc_softc *) arg1; + struct igc_softc *sc = (struct igc_softc *) arg1; error = sysctl_handle_int(oidp, &input, 0, req); @@ -3253,14 +3253,14 @@ igc_print_debug_info(struct igc_softc *sc) for (int i = 0; i < sc->tx_num_queues; i++, txr++) { device_printf(dev, "TX Queue %d ------\n", i); device_printf(dev, "hw tdh = %d, hw tdt = %d\n", - IGC_READ_REG(&sc->hw, IGC_TDH(i)), - IGC_READ_REG(&sc->hw, IGC_TDT(i))); + IGC_READ_REG(&sc->hw, IGC_TDH(i)), + IGC_READ_REG(&sc->hw, IGC_TDT(i))); } for (int j=0; j < sc->rx_num_queues; j++, rxr++) { device_printf(dev, "RX Queue %d ------\n", j); device_printf(dev, "hw rdh = %d, hw rdt = %d\n", - IGC_READ_REG(&sc->hw, IGC_RDH(j)), - IGC_READ_REG(&sc->hw, IGC_RDT(j))); + IGC_READ_REG(&sc->hw, IGC_RDH(j)), + IGC_READ_REG(&sc->hw, IGC_RDT(j))); } } From nobody Wed Nov 27 00:29:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XygKp5DqJz5fFvG; Wed, 27 Nov 2024 00:29:02 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XygKp3LTKz4V2m; Wed, 27 Nov 2024 00:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/53CY775GDLwM0y3Q2P95d4wChsnizkHBwUrA/F5GCc=; b=PTU2ehsnCPwju6IgsbVNdlc+RW57pp2ljnSFvE/V757MouvTI7JvRmX0LQ2IM3GBRDX/Gk pSV+G1x+TV5Eb6Re0WXtjRNIxCAGHFg87RL5vvNOW4xIJ5OZE0jMXuopAMeXDuAyxFiZ0+ 56yot6+J9NG690C0aR8KbfvrBWYf5QPcj/xcK1+ld5erJ14IdITb0prBxfXiUMKMRIwVVV 8CxddUQbvK4D5oo74NQuQiSo43CniILC52EVT9VoarmPAKpa8Eh4Qs4gjq+qSJ41F9oHbR KPx4owweaUCBUgdMPosdWm4pLWp0fzkCpBVc7LHZ62q/b1B0v8MsI9dlOchSsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/53CY775GDLwM0y3Q2P95d4wChsnizkHBwUrA/F5GCc=; b=HRxTsCszTuVm//sXzNKgKi4/m7lcNeJTJFoNVEZPb7UtjLScxXrnpmfYcvwFZAQt+Tng9q DrRdMHM18ucQhbfXSQFb/dl8wiGACUXQJXbPe1p85Z+QCypmTkTfTs+ZPJt5Jl99FlUAgn YTGusmCFE3YNnOlZT7uJrh3f937SeyZmif9vdb0tj8W5grH55xW9CgsV0kXvsMaR/4yNVt NZoGBR0lgEinBBTdT9dbonj1OaX9hpeJu1GMy4aUdchbGwkBzoAh1VONfBFi/THvI99KGh zMragEdlyTJLTzz7KWP3iX9iqtWGKVNVUOOWkI8dOeVGPMhnvvNkH12wBMUsdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732667342; a=rsa-sha256; cv=none; b=LhXAi+lrzNfj4sfsJiRi7/96PJ9mQit718RLWIS3gOCqTFXJ29e0HpHneypZqA4pIGYI9q Yb5b+kERiZ8ur335BzYdjbXFevmci+jRb3GQ8ahcmBXRMzu2Qqckc0Q1+fgnCvXqgsVQxc q6ONaDWMV3ZsHbwC5VeyorcyxdWTbHN4ng4oQKnvnPHWztD1sQNyk4o2h2cRE7GjQwb8Yh QMzvKyUEr0NdGa91OJmnEjPdRjJbS+lRSLYp5ZGT2Mh58qGrK5dOY19ZMq1sS28SQwZ465 mVCBepKQWSu2ITaPSwH3FeHsqttBOFDdUEDn6kQXg246QD12t/nEkoyK3a5d4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XygKp2xjTzmfp; Wed, 27 Nov 2024 00:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR0T2TU063805; Wed, 27 Nov 2024 00:29:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR0T20L063802; Wed, 27 Nov 2024 00:29:02 GMT (envelope-from git) Date: Wed, 27 Nov 2024 00:29:02 GMT Message-Id: <202411270029.4AR0T20L063802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 3d0f59024fc0 - stable/14 - e1000: Style pass on if_em List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3d0f59024fc0480a66c34723554ff127ead95f53 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=3d0f59024fc0480a66c34723554ff127ead95f53 commit 3d0f59024fc0480a66c34723554ff127ead95f53 Author: Kevin Bowling AuthorDate: 2024-11-24 05:45:52 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 00:27:45 +0000 e1000: Style pass on if_em Fix up some indentation and reflow long lines Sponsored by: BBOX.io (cherry picked from commit 6f14883066f10afc9e3e2af45c5b509586f9da9e) --- sys/dev/e1000/if_em.c | 1059 +++++++++++++++++++++++++++++-------------------- 1 file changed, 626 insertions(+), 433 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 98521e6e6ee9..c258b23b9d8d 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -53,73 +53,129 @@ static const char igb_driver_version[] = "2.5.28-fbsd"; static const pci_vendor_info_t em_vendor_info_array[] = { /* Intel(R) - lem-class legacy devices */ - PVID(0x8086, E1000_DEV_ID_82540EM, "Intel(R) Legacy PRO/1000 MT 82540EM"), - PVID(0x8086, E1000_DEV_ID_82540EM_LOM, "Intel(R) Legacy PRO/1000 MT 82540EM (LOM)"), - PVID(0x8086, E1000_DEV_ID_82540EP, "Intel(R) Legacy PRO/1000 MT 82540EP"), - PVID(0x8086, E1000_DEV_ID_82540EP_LOM, "Intel(R) Legacy PRO/1000 MT 82540EP (LOM)"), - PVID(0x8086, E1000_DEV_ID_82540EP_LP, "Intel(R) Legacy PRO/1000 MT 82540EP (Mobile)"), - - PVID(0x8086, E1000_DEV_ID_82541EI, "Intel(R) Legacy PRO/1000 MT 82541EI (Copper)"), - PVID(0x8086, E1000_DEV_ID_82541ER, "Intel(R) Legacy PRO/1000 82541ER"), - PVID(0x8086, E1000_DEV_ID_82541ER_LOM, "Intel(R) Legacy PRO/1000 MT 82541ER"), - PVID(0x8086, E1000_DEV_ID_82541EI_MOBILE, "Intel(R) Legacy PRO/1000 MT 82541EI (Mobile)"), - PVID(0x8086, E1000_DEV_ID_82541GI, "Intel(R) Legacy PRO/1000 MT 82541GI"), - PVID(0x8086, E1000_DEV_ID_82541GI_LF, "Intel(R) Legacy PRO/1000 GT 82541PI"), - PVID(0x8086, E1000_DEV_ID_82541GI_MOBILE, "Intel(R) Legacy PRO/1000 MT 82541GI (Mobile)"), - - PVID(0x8086, E1000_DEV_ID_82542, "Intel(R) Legacy PRO/1000 82542 (Fiber)"), - - PVID(0x8086, E1000_DEV_ID_82543GC_FIBER, "Intel(R) Legacy PRO/1000 F 82543GC (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82543GC_COPPER, "Intel(R) Legacy PRO/1000 T 82543GC (Copper)"), - - PVID(0x8086, E1000_DEV_ID_82544EI_COPPER, "Intel(R) Legacy PRO/1000 XT 82544EI (Copper)"), - PVID(0x8086, E1000_DEV_ID_82544EI_FIBER, "Intel(R) Legacy PRO/1000 XF 82544EI (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82544GC_COPPER, "Intel(R) Legacy PRO/1000 T 82544GC (Copper)"), - PVID(0x8086, E1000_DEV_ID_82544GC_LOM, "Intel(R) Legacy PRO/1000 XT 82544GC (LOM)"), - - PVID(0x8086, E1000_DEV_ID_82545EM_COPPER, "Intel(R) Legacy PRO/1000 MT 82545EM (Copper)"), - PVID(0x8086, E1000_DEV_ID_82545EM_FIBER, "Intel(R) Legacy PRO/1000 MF 82545EM (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82545GM_COPPER, "Intel(R) Legacy PRO/1000 MT 82545GM (Copper)"), - PVID(0x8086, E1000_DEV_ID_82545GM_FIBER, "Intel(R) Legacy PRO/1000 MF 82545GM (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82545GM_SERDES, "Intel(R) Legacy PRO/1000 MB 82545GM (SERDES)"), - - PVID(0x8086, E1000_DEV_ID_82546EB_COPPER, "Intel(R) Legacy PRO/1000 MT 82546EB (Copper)"), - PVID(0x8086, E1000_DEV_ID_82546EB_FIBER, "Intel(R) Legacy PRO/1000 MF 82546EB (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82546EB_QUAD_COPPER, "Intel(R) Legacy PRO/1000 MT 82546EB (Quad Copper"), - PVID(0x8086, E1000_DEV_ID_82546GB_COPPER, "Intel(R) Legacy PRO/1000 MT 82546GB (Copper)"), - PVID(0x8086, E1000_DEV_ID_82546GB_FIBER, "Intel(R) Legacy PRO/1000 MF 82546GB (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82546GB_SERDES, "Intel(R) Legacy PRO/1000 MB 82546GB (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82546GB_PCIE, "Intel(R) Legacy PRO/1000 P 82546GB (PCIe)"), - PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER, "Intel(R) Legacy PRO/1000 GT 82546GB (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3, "Intel(R) Legacy PRO/1000 GT 82546GB (Quad Copper)"), - - PVID(0x8086, E1000_DEV_ID_82547EI, "Intel(R) Legacy PRO/1000 CT 82547EI"), - PVID(0x8086, E1000_DEV_ID_82547EI_MOBILE, "Intel(R) Legacy PRO/1000 CT 82547EI (Mobile)"), - PVID(0x8086, E1000_DEV_ID_82547GI, "Intel(R) Legacy PRO/1000 CT 82547GI"), + PVID(0x8086, E1000_DEV_ID_82540EM, + "Intel(R) Legacy PRO/1000 MT 82540EM"), + PVID(0x8086, E1000_DEV_ID_82540EM_LOM, + "Intel(R) Legacy PRO/1000 MT 82540EM (LOM)"), + PVID(0x8086, E1000_DEV_ID_82540EP, + "Intel(R) Legacy PRO/1000 MT 82540EP"), + PVID(0x8086, E1000_DEV_ID_82540EP_LOM, + "Intel(R) Legacy PRO/1000 MT 82540EP (LOM)"), + PVID(0x8086, E1000_DEV_ID_82540EP_LP, + "Intel(R) Legacy PRO/1000 MT 82540EP (Mobile)"), + + PVID(0x8086, E1000_DEV_ID_82541EI, + "Intel(R) Legacy PRO/1000 MT 82541EI (Copper)"), + PVID(0x8086, E1000_DEV_ID_82541ER, + "Intel(R) Legacy PRO/1000 82541ER"), + PVID(0x8086, E1000_DEV_ID_82541ER_LOM, + "Intel(R) Legacy PRO/1000 MT 82541ER"), + PVID(0x8086, E1000_DEV_ID_82541EI_MOBILE, + "Intel(R) Legacy PRO/1000 MT 82541EI (Mobile)"), + PVID(0x8086, E1000_DEV_ID_82541GI, + "Intel(R) Legacy PRO/1000 MT 82541GI"), + PVID(0x8086, E1000_DEV_ID_82541GI_LF, + "Intel(R) Legacy PRO/1000 GT 82541PI"), + PVID(0x8086, E1000_DEV_ID_82541GI_MOBILE, + "Intel(R) Legacy PRO/1000 MT 82541GI (Mobile)"), + + PVID(0x8086, E1000_DEV_ID_82542, + "Intel(R) Legacy PRO/1000 82542 (Fiber)"), + + PVID(0x8086, E1000_DEV_ID_82543GC_FIBER, + "Intel(R) Legacy PRO/1000 F 82543GC (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82543GC_COPPER, + "Intel(R) Legacy PRO/1000 T 82543GC (Copper)"), + + PVID(0x8086, E1000_DEV_ID_82544EI_COPPER, + "Intel(R) Legacy PRO/1000 XT 82544EI (Copper)"), + PVID(0x8086, E1000_DEV_ID_82544EI_FIBER, + "Intel(R) Legacy PRO/1000 XF 82544EI (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82544GC_COPPER, + "Intel(R) Legacy PRO/1000 T 82544GC (Copper)"), + PVID(0x8086, E1000_DEV_ID_82544GC_LOM, + "Intel(R) Legacy PRO/1000 XT 82544GC (LOM)"), + + PVID(0x8086, E1000_DEV_ID_82545EM_COPPER, + "Intel(R) Legacy PRO/1000 MT 82545EM (Copper)"), + PVID(0x8086, E1000_DEV_ID_82545EM_FIBER, + "Intel(R) Legacy PRO/1000 MF 82545EM (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82545GM_COPPER, + "Intel(R) Legacy PRO/1000 MT 82545GM (Copper)"), + PVID(0x8086, E1000_DEV_ID_82545GM_FIBER, + "Intel(R) Legacy PRO/1000 MF 82545GM (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82545GM_SERDES, + "Intel(R) Legacy PRO/1000 MB 82545GM (SERDES)"), + + PVID(0x8086, E1000_DEV_ID_82546EB_COPPER, + "Intel(R) Legacy PRO/1000 MT 82546EB (Copper)"), + PVID(0x8086, E1000_DEV_ID_82546EB_FIBER, + "Intel(R) Legacy PRO/1000 MF 82546EB (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82546EB_QUAD_COPPER, + "Intel(R) Legacy PRO/1000 MT 82546EB (Quad Copper"), + PVID(0x8086, E1000_DEV_ID_82546GB_COPPER, + "Intel(R) Legacy PRO/1000 MT 82546GB (Copper)"), + PVID(0x8086, E1000_DEV_ID_82546GB_FIBER, + "Intel(R) Legacy PRO/1000 MF 82546GB (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82546GB_SERDES, + "Intel(R) Legacy PRO/1000 MB 82546GB (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82546GB_PCIE, + "Intel(R) Legacy PRO/1000 P 82546GB (PCIe)"), + PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER, + "Intel(R) Legacy PRO/1000 GT 82546GB (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3, + "Intel(R) Legacy PRO/1000 GT 82546GB (Quad Copper)"), + + PVID(0x8086, E1000_DEV_ID_82547EI, + "Intel(R) Legacy PRO/1000 CT 82547EI"), + PVID(0x8086, E1000_DEV_ID_82547EI_MOBILE, + "Intel(R) Legacy PRO/1000 CT 82547EI (Mobile)"), + PVID(0x8086, E1000_DEV_ID_82547GI, + "Intel(R) Legacy PRO/1000 CT 82547GI"), /* Intel(R) - em-class devices */ - PVID(0x8086, E1000_DEV_ID_82571EB_COPPER, "Intel(R) PRO/1000 PT 82571EB/82571GB (Copper)"), - PVID(0x8086, E1000_DEV_ID_82571EB_FIBER, "Intel(R) PRO/1000 PF 82571EB/82571GB (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82571EB_SERDES, "Intel(R) PRO/1000 PB 82571EB (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82571EB_SERDES_DUAL, "Intel(R) PRO/1000 82571EB (Dual Mezzanine)"), - PVID(0x8086, E1000_DEV_ID_82571EB_SERDES_QUAD, "Intel(R) PRO/1000 82571EB (Quad Mezzanine)"), - PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER, "Intel(R) PRO/1000 PT 82571EB/82571GB (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER_LP, "Intel(R) PRO/1000 PT 82571EB/82571GB (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_FIBER, "Intel(R) PRO/1000 PF 82571EB (Quad Fiber)"), - PVID(0x8086, E1000_DEV_ID_82571PT_QUAD_COPPER, "Intel(R) PRO/1000 PT 82571PT (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82572EI, "Intel(R) PRO/1000 PT 82572EI (Copper)"), - PVID(0x8086, E1000_DEV_ID_82572EI_COPPER, "Intel(R) PRO/1000 PT 82572EI (Copper)"), - PVID(0x8086, E1000_DEV_ID_82572EI_FIBER, "Intel(R) PRO/1000 PF 82572EI (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82572EI_SERDES, "Intel(R) PRO/1000 82572EI (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82573E, "Intel(R) PRO/1000 82573E (Copper)"), - PVID(0x8086, E1000_DEV_ID_82573E_IAMT, "Intel(R) PRO/1000 82573E AMT (Copper)"), + PVID(0x8086, E1000_DEV_ID_82571EB_COPPER, + "Intel(R) PRO/1000 PT 82571EB/82571GB (Copper)"), + PVID(0x8086, E1000_DEV_ID_82571EB_FIBER, + "Intel(R) PRO/1000 PF 82571EB/82571GB (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82571EB_SERDES, + "Intel(R) PRO/1000 PB 82571EB (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82571EB_SERDES_DUAL, + "Intel(R) PRO/1000 82571EB (Dual Mezzanine)"), + PVID(0x8086, E1000_DEV_ID_82571EB_SERDES_QUAD, + "Intel(R) PRO/1000 82571EB (Quad Mezzanine)"), + PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER, + "Intel(R) PRO/1000 PT 82571EB/82571GB (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER_LP, + "Intel(R) PRO/1000 PT 82571EB/82571GB (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_FIBER, + "Intel(R) PRO/1000 PF 82571EB (Quad Fiber)"), + PVID(0x8086, E1000_DEV_ID_82571PT_QUAD_COPPER, + "Intel(R) PRO/1000 PT 82571PT (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82572EI, + "Intel(R) PRO/1000 PT 82572EI (Copper)"), + PVID(0x8086, E1000_DEV_ID_82572EI_COPPER, + "Intel(R) PRO/1000 PT 82572EI (Copper)"), + PVID(0x8086, E1000_DEV_ID_82572EI_FIBER, + "Intel(R) PRO/1000 PF 82572EI (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82572EI_SERDES, + "Intel(R) PRO/1000 82572EI (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82573E, + "Intel(R) PRO/1000 82573E (Copper)"), + PVID(0x8086, E1000_DEV_ID_82573E_IAMT, + "Intel(R) PRO/1000 82573E AMT (Copper)"), PVID(0x8086, E1000_DEV_ID_82573L, "Intel(R) PRO/1000 82573L"), PVID(0x8086, E1000_DEV_ID_82583V, "Intel(R) 82583V"), - PVID(0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_SPT, "Intel(R) 80003ES2LAN (Copper)"), - PVID(0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_SPT, "Intel(R) 80003ES2LAN (SERDES)"), - PVID(0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_DPT, "Intel(R) 80003ES2LAN (Dual Copper)"), - PVID(0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_DPT, "Intel(R) 80003ES2LAN (Dual SERDES)"), - PVID(0x8086, E1000_DEV_ID_ICH8_IGP_M_AMT, "Intel(R) 82566MM ICH8 AMT (Mobile)"), + PVID(0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_SPT, + "Intel(R) 80003ES2LAN (Copper)"), + PVID(0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_SPT, + "Intel(R) 80003ES2LAN (SERDES)"), + PVID(0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_DPT, + "Intel(R) 80003ES2LAN (Dual Copper)"), + PVID(0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_DPT, + "Intel(R) 80003ES2LAN (Dual SERDES)"), + PVID(0x8086, E1000_DEV_ID_ICH8_IGP_M_AMT, + "Intel(R) 82566MM ICH8 AMT (Mobile)"), PVID(0x8086, E1000_DEV_ID_ICH8_IGP_AMT, "Intel(R) 82566DM ICH8 AMT"), PVID(0x8086, E1000_DEV_ID_ICH8_IGP_C, "Intel(R) 82566DC ICH8"), PVID(0x8086, E1000_DEV_ID_ICH8_IFE, "Intel(R) 82562V ICH8"), @@ -127,8 +183,10 @@ static const pci_vendor_info_t em_vendor_info_array[] = PVID(0x8086, E1000_DEV_ID_ICH8_IFE_G, "Intel(R) 82562G ICH8"), PVID(0x8086, E1000_DEV_ID_ICH8_IGP_M, "Intel(R) 82566MC ICH8"), PVID(0x8086, E1000_DEV_ID_ICH8_82567V_3, "Intel(R) 82567V-3 ICH8"), - PVID(0x8086, E1000_DEV_ID_ICH9_IGP_M_AMT, "Intel(R) 82567LM ICH9 AMT"), - PVID(0x8086, E1000_DEV_ID_ICH9_IGP_AMT, "Intel(R) 82566DM-2 ICH9 AMT"), + PVID(0x8086, E1000_DEV_ID_ICH9_IGP_M_AMT, + "Intel(R) 82567LM ICH9 AMT"), + PVID(0x8086, E1000_DEV_ID_ICH9_IGP_AMT, + "Intel(R) 82566DM-2 ICH9 AMT"), PVID(0x8086, E1000_DEV_ID_ICH9_IGP_C, "Intel(R) 82566DC-2 ICH9"), PVID(0x8086, E1000_DEV_ID_ICH9_IGP_M, "Intel(R) 82567LF ICH9"), PVID(0x8086, E1000_DEV_ID_ICH9_IGP_M_V, "Intel(R) 82567V ICH9"), @@ -152,7 +210,8 @@ static const pci_vendor_info_t em_vendor_info_array[] = PVID(0x8086, E1000_DEV_ID_PCH2_LV_V, "Intel(R) 82579V"), PVID(0x8086, E1000_DEV_ID_PCH_LPT_I217_LM, "Intel(R) I217-LM LPT"), PVID(0x8086, E1000_DEV_ID_PCH_LPT_I217_V, "Intel(R) I217-V LPT"), - PVID(0x8086, E1000_DEV_ID_PCH_LPTLP_I218_LM, "Intel(R) I218-LM LPTLP"), + PVID(0x8086, E1000_DEV_ID_PCH_LPTLP_I218_LM, + "Intel(R) I218-LM LPTLP"), PVID(0x8086, E1000_DEV_ID_PCH_LPTLP_I218_V, "Intel(R) I218-V LPTLP"), PVID(0x8086, E1000_DEV_ID_PCH_I218_LM2, "Intel(R) I218-LM (2)"), PVID(0x8086, E1000_DEV_ID_PCH_I218_V2, "Intel(R) I218-V (2)"), @@ -160,57 +219,102 @@ static const pci_vendor_info_t em_vendor_info_array[] = PVID(0x8086, E1000_DEV_ID_PCH_I218_V3, "Intel(R) I218-V (3)"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM, "Intel(R) I219-LM SPT"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V, "Intel(R) I219-V SPT"), - PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM2, "Intel(R) I219-LM SPT-H(2)"), - PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V2, "Intel(R) I219-V SPT-H(2)"), - PVID(0x8086, E1000_DEV_ID_PCH_LBG_I219_LM3, "Intel(R) I219-LM LBG(3)"), - PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM4, "Intel(R) I219-LM SPT(4)"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM2, + "Intel(R) I219-LM SPT-H(2)"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V2, + "Intel(R) I219-V SPT-H(2)"), + PVID(0x8086, E1000_DEV_ID_PCH_LBG_I219_LM3, + "Intel(R) I219-LM LBG(3)"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM4, + "Intel(R) I219-LM SPT(4)"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V4, "Intel(R) I219-V SPT(4)"), - PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM5, "Intel(R) I219-LM SPT(5)"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM5, + "Intel(R) I219-LM SPT(5)"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V5, "Intel(R) I219-V SPT(5)"), - PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_LM6, "Intel(R) I219-LM CNP(6)"), + PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_LM6, + "Intel(R) I219-LM CNP(6)"), PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_V6, "Intel(R) I219-V CNP(6)"), - PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_LM7, "Intel(R) I219-LM CNP(7)"), + PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_LM7, + "Intel(R) I219-LM CNP(7)"), PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_V7, "Intel(R) I219-V CNP(7)"), - PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM8, "Intel(R) I219-LM ICP(8)"), + PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM8, + "Intel(R) I219-LM ICP(8)"), PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_V8, "Intel(R) I219-V ICP(8)"), - PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM9, "Intel(R) I219-LM ICP(9)"), + PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM9, + "Intel(R) I219-LM ICP(9)"), PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_V9, "Intel(R) I219-V ICP(9)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM10, "Intel(R) I219-LM CMP(10)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V10, "Intel(R) I219-V CMP(10)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM11, "Intel(R) I219-LM CMP(11)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V11, "Intel(R) I219-V CMP(11)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM12, "Intel(R) I219-LM CMP(12)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V12, "Intel(R) I219-V CMP(12)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM13, "Intel(R) I219-LM TGP(13)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V13, "Intel(R) I219-V TGP(13)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM14, "Intel(R) I219-LM TGP(14)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V14, "Intel(R) I219-V GTP(14)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM15, "Intel(R) I219-LM TGP(15)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V15, "Intel(R) I219-V TGP(15)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM16, "Intel(R) I219-LM ADL(16)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V16, "Intel(R) I219-V ADL(16)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM17, "Intel(R) I219-LM ADL(17)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V17, "Intel(R) I219-V ADL(17)"), - PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_LM18, "Intel(R) I219-LM MTP(18)"), - PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_V18, "Intel(R) I219-V MTP(18)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM19, "Intel(R) I219-LM ADL(19)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V19, "Intel(R) I219-V ADL(19)"), - PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_LM20, "Intel(R) I219-LM LNL(20)"), - PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_V20, "Intel(R) I219-V LNL(20)"), - PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_LM21, "Intel(R) I219-LM LNL(21)"), - PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_V21, "Intel(R) I219-V LNL(21)"), - PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_LM22, "Intel(R) I219-LM RPL(22)"), - PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_V22, "Intel(R) I219-V RPL(22)"), - PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_LM23, "Intel(R) I219-LM RPL(23)"), - PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_V23, "Intel(R) I219-V RPL(23)"), - PVID(0x8086, E1000_DEV_ID_PCH_ARL_I219_LM24, "Intel(R) I219-LM ARL(24)"), - PVID(0x8086, E1000_DEV_ID_PCH_ARL_I219_V24, "Intel(R) I219-V ARL(24)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM25, "Intel(R) I219-LM PTP(25)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V25, "Intel(R) I219-V PTP(25)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM26, "Intel(R) I219-LM PTP(26)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V26, "Intel(R) I219-V PTP(26)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM27, "Intel(R) I219-LM PTP(27)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V27, "Intel(R) I219-V PTP(27)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM10, + "Intel(R) I219-LM CMP(10)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V10, + "Intel(R) I219-V CMP(10)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM11, + "Intel(R) I219-LM CMP(11)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V11, + "Intel(R) I219-V CMP(11)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM12, + "Intel(R) I219-LM CMP(12)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V12, + "Intel(R) I219-V CMP(12)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM13, + "Intel(R) I219-LM TGP(13)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V13, + "Intel(R) I219-V TGP(13)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM14, + "Intel(R) I219-LM TGP(14)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V14, + "Intel(R) I219-V GTP(14)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM15, + "Intel(R) I219-LM TGP(15)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V15, + "Intel(R) I219-V TGP(15)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM16, + "Intel(R) I219-LM ADL(16)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V16, + "Intel(R) I219-V ADL(16)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM17, + "Intel(R) I219-LM ADL(17)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V17, + "Intel(R) I219-V ADL(17)"), + PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_LM18, + "Intel(R) I219-LM MTP(18)"), + PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_V18, + "Intel(R) I219-V MTP(18)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM19, + "Intel(R) I219-LM ADL(19)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V19, + "Intel(R) I219-V ADL(19)"), + PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_LM20, + "Intel(R) I219-LM LNL(20)"), + PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_V20, + "Intel(R) I219-V LNL(20)"), + PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_LM21, + "Intel(R) I219-LM LNL(21)"), + PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_V21, + "Intel(R) I219-V LNL(21)"), + PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_LM22, + "Intel(R) I219-LM RPL(22)"), + PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_V22, + "Intel(R) I219-V RPL(22)"), + PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_LM23, + "Intel(R) I219-LM RPL(23)"), + PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_V23, + "Intel(R) I219-V RPL(23)"), + PVID(0x8086, E1000_DEV_ID_PCH_ARL_I219_LM24, + "Intel(R) I219-LM ARL(24)"), + PVID(0x8086, E1000_DEV_ID_PCH_ARL_I219_V24, + "Intel(R) I219-V ARL(24)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM25, + "Intel(R) I219-LM PTP(25)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V25, + "Intel(R) I219-V PTP(25)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM26, + "Intel(R) I219-LM PTP(26)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V26, + "Intel(R) I219-V PTP(26)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM27, + "Intel(R) I219-LM PTP(27)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V27, + "Intel(R) I219-V PTP(27)"), /* required last entry */ PVID_END }; @@ -218,45 +322,68 @@ static const pci_vendor_info_t em_vendor_info_array[] = static const pci_vendor_info_t igb_vendor_info_array[] = { /* Intel(R) - igb-class devices */ - PVID(0x8086, E1000_DEV_ID_82575EB_COPPER, "Intel(R) PRO/1000 82575EB (Copper)"), - PVID(0x8086, E1000_DEV_ID_82575EB_FIBER_SERDES, "Intel(R) PRO/1000 82575EB (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82575GB_QUAD_COPPER, "Intel(R) PRO/1000 VT 82575GB (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82575EB_COPPER, + "Intel(R) PRO/1000 82575EB (Copper)"), + PVID(0x8086, E1000_DEV_ID_82575EB_FIBER_SERDES, + "Intel(R) PRO/1000 82575EB (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82575GB_QUAD_COPPER, + "Intel(R) PRO/1000 VT 82575GB (Quad Copper)"), PVID(0x8086, E1000_DEV_ID_82576, "Intel(R) PRO/1000 82576"), PVID(0x8086, E1000_DEV_ID_82576_NS, "Intel(R) PRO/1000 82576NS"), - PVID(0x8086, E1000_DEV_ID_82576_NS_SERDES, "Intel(R) PRO/1000 82576NS (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82576_FIBER, "Intel(R) PRO/1000 EF 82576 (Dual Fiber)"), - PVID(0x8086, E1000_DEV_ID_82576_SERDES, "Intel(R) PRO/1000 82576 (Dual SERDES)"), - PVID(0x8086, E1000_DEV_ID_82576_SERDES_QUAD, "Intel(R) PRO/1000 ET 82576 (Quad SERDES)"), - PVID(0x8086, E1000_DEV_ID_82576_QUAD_COPPER, "Intel(R) PRO/1000 ET 82576 (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82576_QUAD_COPPER_ET2, "Intel(R) PRO/1000 ET(2) 82576 (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82576_VF, "Intel(R) PRO/1000 82576 Virtual Function"), - PVID(0x8086, E1000_DEV_ID_82580_COPPER, "Intel(R) I340 82580 (Copper)"), + PVID(0x8086, E1000_DEV_ID_82576_NS_SERDES, + "Intel(R) PRO/1000 82576NS (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82576_FIBER, + "Intel(R) PRO/1000 EF 82576 (Dual Fiber)"), + PVID(0x8086, E1000_DEV_ID_82576_SERDES, + "Intel(R) PRO/1000 82576 (Dual SERDES)"), + PVID(0x8086, E1000_DEV_ID_82576_SERDES_QUAD, + "Intel(R) PRO/1000 ET 82576 (Quad SERDES)"), + PVID(0x8086, E1000_DEV_ID_82576_QUAD_COPPER, + "Intel(R) PRO/1000 ET 82576 (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82576_QUAD_COPPER_ET2, + "Intel(R) PRO/1000 ET(2) 82576 (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82576_VF, + "Intel(R) PRO/1000 82576 Virtual Function"), + PVID(0x8086, E1000_DEV_ID_82580_COPPER, + "Intel(R) I340 82580 (Copper)"), PVID(0x8086, E1000_DEV_ID_82580_FIBER, "Intel(R) I340 82580 (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82580_SERDES, "Intel(R) I340 82580 (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82580_SERDES, + "Intel(R) I340 82580 (SERDES)"), PVID(0x8086, E1000_DEV_ID_82580_SGMII, "Intel(R) I340 82580 (SGMII)"), - PVID(0x8086, E1000_DEV_ID_82580_COPPER_DUAL, "Intel(R) I340-T2 82580 (Dual Copper)"), - PVID(0x8086, E1000_DEV_ID_82580_QUAD_FIBER, "Intel(R) I340-F4 82580 (Quad Fiber)"), - PVID(0x8086, E1000_DEV_ID_DH89XXCC_SERDES, "Intel(R) DH89XXCC (SERDES)"), - PVID(0x8086, E1000_DEV_ID_DH89XXCC_SGMII, "Intel(R) I347-AT4 DH89XXCC"), + PVID(0x8086, E1000_DEV_ID_82580_COPPER_DUAL, + "Intel(R) I340-T2 82580 (Dual Copper)"), + PVID(0x8086, E1000_DEV_ID_82580_QUAD_FIBER, + "Intel(R) I340-F4 82580 (Quad Fiber)"), + PVID(0x8086, E1000_DEV_ID_DH89XXCC_SERDES, + "Intel(R) DH89XXCC (SERDES)"), + PVID(0x8086, E1000_DEV_ID_DH89XXCC_SGMII, + "Intel(R) I347-AT4 DH89XXCC"), PVID(0x8086, E1000_DEV_ID_DH89XXCC_SFP, "Intel(R) DH89XXCC (SFP)"), - PVID(0x8086, E1000_DEV_ID_DH89XXCC_BACKPLANE, "Intel(R) DH89XXCC (Backplane)"), + PVID(0x8086, E1000_DEV_ID_DH89XXCC_BACKPLANE, + "Intel(R) DH89XXCC (Backplane)"), PVID(0x8086, E1000_DEV_ID_I350_COPPER, "Intel(R) I350 (Copper)"), PVID(0x8086, E1000_DEV_ID_I350_FIBER, "Intel(R) I350 (Fiber)"), PVID(0x8086, E1000_DEV_ID_I350_SERDES, "Intel(R) I350 (SERDES)"), PVID(0x8086, E1000_DEV_ID_I350_SGMII, "Intel(R) I350 (SGMII)"), PVID(0x8086, E1000_DEV_ID_I350_VF, "Intel(R) I350 Virtual Function"), PVID(0x8086, E1000_DEV_ID_I210_COPPER, "Intel(R) I210 (Copper)"), - PVID(0x8086, E1000_DEV_ID_I210_COPPER_IT, "Intel(R) I210 IT (Copper)"), + PVID(0x8086, E1000_DEV_ID_I210_COPPER_IT, + "Intel(R) I210 IT (Copper)"), PVID(0x8086, E1000_DEV_ID_I210_COPPER_OEM1, "Intel(R) I210 (OEM)"), - PVID(0x8086, E1000_DEV_ID_I210_COPPER_FLASHLESS, "Intel(R) I210 Flashless (Copper)"), - PVID(0x8086, E1000_DEV_ID_I210_SERDES_FLASHLESS, "Intel(R) I210 Flashless (SERDES)"), - PVID(0x8086, E1000_DEV_ID_I210_SGMII_FLASHLESS, "Intel(R) I210 Flashless (SGMII)"), + PVID(0x8086, E1000_DEV_ID_I210_COPPER_FLASHLESS, + "Intel(R) I210 Flashless (Copper)"), + PVID(0x8086, E1000_DEV_ID_I210_SERDES_FLASHLESS, + "Intel(R) I210 Flashless (SERDES)"), + PVID(0x8086, E1000_DEV_ID_I210_SGMII_FLASHLESS, + "Intel(R) I210 Flashless (SGMII)"), PVID(0x8086, E1000_DEV_ID_I210_FIBER, "Intel(R) I210 (Fiber)"), PVID(0x8086, E1000_DEV_ID_I210_SERDES, "Intel(R) I210 (SERDES)"), PVID(0x8086, E1000_DEV_ID_I210_SGMII, "Intel(R) I210 (SGMII)"), PVID(0x8086, E1000_DEV_ID_I211_COPPER, "Intel(R) I211 (Copper)"), - PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_1GBPS, "Intel(R) I354 (1.0 GbE Backplane)"), - PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS, "Intel(R) I354 (2.5 GbE Backplane)"), + PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_1GBPS, + "Intel(R) I354 (1.0 GbE Backplane)"), + PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS, + "Intel(R) I354 (2.5 GbE Backplane)"), PVID(0x8086, E1000_DEV_ID_I354_SGMII, "Intel(R) I354 (SGMII)"), /* required last entry */ PVID_END @@ -274,8 +401,10 @@ static int em_if_shutdown(if_ctx_t); static int em_if_suspend(if_ctx_t); static int em_if_resume(if_ctx_t); -static int em_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); -static int em_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); +static int em_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); +static int em_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); static void em_if_queues_free(if_ctx_t); static uint64_t em_if_get_counter(if_ctx_t, ift_counter); @@ -517,10 +646,10 @@ SYSCTL_INT(_hw_em, OID_AUTO, disable_crc_stripping, CTLFLAG_RDTUN, static int em_tx_int_delay_dflt = EM_TICKS_TO_USECS(EM_TIDV); static int em_rx_int_delay_dflt = EM_TICKS_TO_USECS(EM_RDTR); -SYSCTL_INT(_hw_em, OID_AUTO, tx_int_delay, CTLFLAG_RDTUN, &em_tx_int_delay_dflt, - 0, "Default transmit interrupt delay in usecs"); -SYSCTL_INT(_hw_em, OID_AUTO, rx_int_delay, CTLFLAG_RDTUN, &em_rx_int_delay_dflt, - 0, "Default receive interrupt delay in usecs"); +SYSCTL_INT(_hw_em, OID_AUTO, tx_int_delay, CTLFLAG_RDTUN, + &em_tx_int_delay_dflt, 0, "Default transmit interrupt delay in usecs"); +SYSCTL_INT(_hw_em, OID_AUTO, rx_int_delay, CTLFLAG_RDTUN, + &em_rx_int_delay_dflt, 0, "Default receive interrupt delay in usecs"); static int em_tx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_TADV); static int em_rx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_RADV); @@ -532,7 +661,8 @@ SYSCTL_INT(_hw_em, OID_AUTO, rx_abs_int_delay, CTLFLAG_RDTUN, "Default receive interrupt delay limit in usecs"); static int em_smart_pwr_down = false; -SYSCTL_INT(_hw_em, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, &em_smart_pwr_down, +SYSCTL_INT(_hw_em, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, + &em_smart_pwr_down, 0, "Set to true to leave smart power down enabled on newer adapters"); static bool em_unsupported_tso = false; @@ -589,7 +719,8 @@ static struct if_shared_ctx em_sctx_init = { .isc_vendor_info = em_vendor_info_array, .isc_driver_version = em_driver_version, .isc_driver = &em_if_driver, - .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, + .isc_flags = + IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, .isc_nrxd_min = {EM_MIN_RXD}, .isc_ntxd_min = {EM_MIN_TXD}, @@ -616,7 +747,8 @@ static struct if_shared_ctx igb_sctx_init = { .isc_vendor_info = igb_vendor_info_array, .isc_driver_version = igb_driver_version, .isc_driver = &igb_if_driver, - .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, + .isc_flags = + IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, .isc_nrxd_min = {EM_MIN_RXD}, .isc_ntxd_min = {EM_MIN_TXD}, @@ -726,15 +858,21 @@ static int em_get_regs(SYSCTL_HANDLER_ARGS) for (j = 0; j < nrxd; j++) { u32 staterr = le32toh(rxr->rx_base[j].wb.upper.status_error); u32 length = le32toh(rxr->rx_base[j].wb.upper.length); - sbuf_printf(sb, "\tReceive Descriptor Address %d: %08" PRIx64 " Error:%d Length:%d\n", j, rxr->rx_base[j].read.buffer_addr, staterr, length); + sbuf_printf(sb, "\tReceive Descriptor Address %d: %08" + PRIx64 " Error:%d Length:%d\n", + j, rxr->rx_base[j].read.buffer_addr, staterr, length); } for (j = 0; j < min(ntxd, 256); j++) { unsigned int *ptr = (unsigned int *)&txr->tx_base[j]; - sbuf_printf(sb, "\tTXD[%03d] [0]: %08x [1]: %08x [2]: %08x [3]: %08x eop: %d DD=%d\n", - j, ptr[0], ptr[1], ptr[2], ptr[3], buf->eop, - buf->eop != -1 ? txr->tx_base[buf->eop].upper.fields.status & E1000_TXD_STAT_DD : 0); + sbuf_printf(sb, + "\tTXD[%03d] [0]: %08x [1]: %08x [2]: %08x [3]: %08x" + " eop: %d DD=%d\n", + j, ptr[0], ptr[1], ptr[2], ptr[3], buf->eop, + buf->eop != -1 ? + txr->tx_base[buf->eop].upper.fields.status & + E1000_TXD_STAT_DD : 0); } } @@ -848,7 +986,7 @@ em_if_attach_pre(if_ctx_t ctx) sc->enable_aim = em_enable_aim; SYSCTL_ADD_INT(ctx_list, child, OID_AUTO, "enable_aim", CTLFLAG_RW, &sc->enable_aim, 0, - "Interrupt Moderation (1=normal, 2=lowlatency)"); + "Interrupt Moderation (1=normal, 2=lowlatency)"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, @@ -896,14 +1034,17 @@ em_if_attach_pre(if_ctx_t ctx) "TSO TCP flags mask for last segment"); scctx->isc_tx_nsegments = EM_MAX_SCATTER; - scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); + scctx->isc_nrxqsets_max = + scctx->isc_ntxqsets_max = em_set_num_queues(ctx); if (bootverbose) device_printf(dev, "attach_pre capping queues at %d\n", scctx->isc_ntxqsets_max); if (hw->mac.type >= igb_mac_min) { - scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); - scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); + scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * + sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); + scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * + sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(union e1000_adv_tx_desc); scctx->isc_rxd_size[0] = sizeof(union e1000_adv_rx_desc); scctx->isc_txrx = &igb_txrx; @@ -922,8 +1063,10 @@ em_if_attach_pre(if_ctx_t ctx) */ scctx->isc_msix_bar = pci_msix_table_bar(dev); } else if (hw->mac.type >= em_mac_min) { - scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); - scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); + scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * + sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); + scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * + sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); scctx->isc_rxd_size[0] = sizeof(union e1000_rx_desc_extended); scctx->isc_txrx = &em_txrx; @@ -934,11 +1077,12 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; - /* Disable TSO on all em(4) until ring stalls can be debugged */ + /* Disable TSO on all em(4) until ring stalls are debugged */ scctx->isc_capenable &= ~IFCAP_TSO; /* - * Disable TSO on SPT due to errata that downclocks DMA performance + * Disable TSO on SPT due to errata that downclocks DMA + * performance * i218-i219 Specification Update 1.5.4.5 */ if (hw->mac.type == e1000_pch_spt) @@ -955,8 +1099,10 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_disable_msix = 1; } } else { - scctx->isc_txqsizes[0] = roundup2((scctx->isc_ntxd[0] + 1) * sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); - scctx->isc_rxqsizes[0] = roundup2((scctx->isc_nrxd[0] + 1) * sizeof(struct e1000_rx_desc), EM_DBA_ALIGN); + scctx->isc_txqsizes[0] = roundup2((scctx->isc_ntxd[0] + 1) * + sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); + scctx->isc_rxqsizes[0] = roundup2((scctx->isc_nrxd[0] + 1) * + sizeof(struct e1000_rx_desc), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); scctx->isc_rxd_size[0] = sizeof(struct e1000_rx_desc); scctx->isc_txrx = &lem_txrx; @@ -969,7 +1115,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; - /* Disable TSO on all lem(4) until ring stalls can be debugged */ + /* Disable TSO on all lem(4) until ring stalls debugged */ scctx->isc_capenable &= ~IFCAP_TSO; /* 82541ER doesn't do HW tagging */ @@ -980,15 +1126,18 @@ em_if_attach_pre(if_ctx_t ctx) } /* This is the first e1000 chip and it does not do offloads */ if (hw->mac.type == e1000_82542) { - scctx->isc_capabilities &= ~(IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | - IFCAP_HWCSUM_IPV6 | IFCAP_VLAN_HWTAGGING | - IFCAP_VLAN_HWFILTER | IFCAP_TSO | IFCAP_VLAN_HWTSO); + scctx->isc_capabilities &= ~(IFCAP_HWCSUM | + IFCAP_VLAN_HWCSUM | IFCAP_HWCSUM_IPV6 | + IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWFILTER | + IFCAP_TSO | IFCAP_VLAN_HWTSO); scctx->isc_capenable = scctx->isc_capabilities; } /* These can't do TSO for various reasons */ - if (hw->mac.type < e1000_82544 || hw->mac.type == e1000_82547 || + if (hw->mac.type < e1000_82544 || + hw->mac.type == e1000_82547 || hw->mac.type == e1000_82547_rev_2) { - scctx->isc_capabilities &= ~(IFCAP_TSO | IFCAP_VLAN_HWTSO); + scctx->isc_capabilities &= + ~(IFCAP_TSO |IFCAP_VLAN_HWTSO); scctx->isc_capenable = scctx->isc_capabilities; } /* XXXKB: No IPv6 before this? */ @@ -996,10 +1145,14 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_capabilities &= ~IFCAP_HWCSUM_IPV6; scctx->isc_capenable = scctx->isc_capabilities; } - /* "PCI/PCI-X SDM 4.0" page 33 (b) - FDX requirement on these chips */ - if (hw->mac.type == e1000_82547 || hw->mac.type == e1000_82547_rev_2) - scctx->isc_capenable &= ~(IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | - IFCAP_HWCSUM_IPV6); + /* + * "PCI/PCI-X SDM 4.0" page 33 (b): + * FDX requirement on these chips + */ + if (hw->mac.type == e1000_82547 || + hw->mac.type == e1000_82547_rev_2) + scctx->isc_capenable &= ~(IFCAP_HWCSUM | + IFCAP_VLAN_HWCSUM | IFCAP_HWCSUM_IPV6); /* INTx only */ scctx->isc_msix_bar = 0; @@ -1046,11 +1199,9 @@ em_if_attach_pre(if_ctx_t ctx) ** FLASH read/write macros in the shared code. */ else if (hw->mac.type >= e1000_pch_spt) { - sc->osdep.flash_bus_space_tag = - sc->osdep.mem_bus_space_tag; + sc->osdep.flash_bus_space_tag = sc->osdep.mem_bus_space_tag; sc->osdep.flash_bus_space_handle = - sc->osdep.mem_bus_space_handle - + E1000_FLASH_BASE_ADDR; + sc->osdep.mem_bus_space_handle + E1000_FLASH_BASE_ADDR; } /* Do Shared Code initialization */ @@ -1076,15 +1227,17 @@ em_if_attach_pre(if_ctx_t ctx) } if (hw->mac.type >= e1000_82540 && hw->mac.type < igb_mac_min) { em_add_int_delay_sysctl(sc, "rx_abs_int_delay", - "receive interrupt delay limit in usecs", &sc->rx_abs_int_delay, + "receive interrupt delay limit in usecs", + &sc->rx_abs_int_delay, E1000_REGISTER(hw, E1000_RADV), em_rx_abs_int_delay_dflt); em_add_int_delay_sysctl(sc, "tx_abs_int_delay", - "transmit interrupt delay limit in usecs", &sc->tx_abs_int_delay, + "transmit interrupt delay limit in usecs", + &sc->tx_abs_int_delay, E1000_REGISTER(hw, E1000_TADV), em_tx_abs_int_delay_dflt); em_add_int_delay_sysctl(sc, "itr", "interrupt delay limit in usecs/4", &sc->tx_itr, E1000_REGISTER(hw, E1000_ITR), - EM_INTS_TO_ITR(em_max_interrupt_rate)); + EM_INTS_TO_ITR(em_max_interrupt_rate)); } hw->mac.autoneg = DO_AUTO_NEG; @@ -1119,7 +1272,8 @@ em_if_attach_pre(if_ctx_t ctx) sc->mta = malloc(sizeof(u8) * ETHER_ADDR_LEN * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); if (sc->mta == NULL) { - device_printf(dev, "Can not allocate multicast setup array\n"); + device_printf(dev, + "Can not allocate multicast setup array\n"); error = ENOMEM; goto err_late; } @@ -1129,8 +1283,8 @@ em_if_attach_pre(if_ctx_t ctx) /* Check SOL/IDER usage */ if (e1000_check_reset_block(hw)) - device_printf(dev, "PHY reset is blocked" - " due to SOL/IDER session.\n"); + device_printf(dev, + "PHY reset is blocked due to SOL/IDER session.\n"); /* Sysctl for setting Energy Efficient Ethernet */ if (hw->mac.type < igb_mac_min) @@ -1165,8 +1319,8 @@ em_if_attach_pre(if_ctx_t ctx) /* Copy the permanent MAC address out of the EEPROM */ if (e1000_read_mac_addr(hw) < 0) { - device_printf(dev, "EEPROM read error while reading MAC" - " address\n"); + device_printf(dev, + "EEPROM read error while reading MAC address\n"); error = EIO; goto err_late; } @@ -1241,7 +1395,10 @@ em_if_attach_post(if_ctx_t ctx) return (0); err_late: - /* upon attach_post() error, iflib calls _if_detach() to free resources. */ + /* + * Upon em_if_attach_post() error, iflib calls em_if_detach() to + * free resources + */ return (error); } @@ -1383,8 +1540,7 @@ em_if_init(if_ctx_t ctx) INIT_DEBUGOUT("em_if_init: begin"); /* Get the latest mac address, User can use a LAA */ - bcopy(if_getlladdr(ifp), sc->hw.mac.addr, - ETHER_ADDR_LEN); + bcopy(if_getlladdr(ifp), sc->hw.mac.addr, ETHER_ADDR_LEN); /* Put the address into the Receive Address Array */ e1000_rar_set(&sc->hw, sc->hw.mac.addr, 0); @@ -1405,7 +1561,8 @@ em_if_init(if_ctx_t ctx) em_reset(ctx); em_if_update_admin_status(ctx); - for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; i++, tx_que++) { + for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; + i++, tx_que++) { struct tx_ring *txr = &tx_que->txr; txr->tx_rs_cidx = txr->tx_rs_pidx; @@ -1452,8 +1609,10 @@ em_if_init(if_ctx_t ctx) E1000_WRITE_REG(&sc->hw, E1000_CTRL_EXT, tmp); /* Set the IVAR - interrupt vector routing. */ E1000_WRITE_REG(&sc->hw, E1000_IVAR, sc->ivars); - } else if (sc->intr_type == IFLIB_INTR_MSIX) /* Set up queue routing */ + } else if (sc->intr_type == IFLIB_INTR_MSIX) { + /* Set up queue routing */ igb_configure_queues(sc); + } /* this clears any pending interrupts */ E1000_READ_REG(&sc->hw, E1000_ICR); @@ -1516,7 +1675,7 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, goto em_set_next_itr; } - /* Get the largest values from the associated tx and rx ring */ + /* Get largest values from the associated tx and rx ring */ if (txr->tx_bytes && txr->tx_packets) { bytes = txr->tx_bytes; bytes_packets = txr->tx_bytes/txr->tx_packets; @@ -1524,7 +1683,8 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, } if (rxr->rx_bytes && rxr->rx_packets) { bytes = max(bytes, rxr->rx_bytes); - bytes_packets = max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); + bytes_packets = + max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); packets = max(packets, rxr->rx_packets); } @@ -1545,7 +1705,8 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, /* Handle TSO */ if (bytes_packets > 8000) nextlatency = itr_latency_bulk; - else if ((packets < 10) || (bytes_packets > 1200)) + else if ((packets < 10) || + (bytes_packets > 1200)) nextlatency = itr_latency_bulk; else if (packets > 35) nextlatency = itr_latency_lowest; @@ -1564,8 +1725,8 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, break; default: nextlatency = itr_latency_low; - device_printf(sc->dev, "Unexpected newitr transition %d\n", - nextlatency); + device_printf(sc->dev, + "Unexpected newitr transition %d\n", nextlatency); break; } @@ -1609,7 +1770,8 @@ em_set_next_itr: if (newitr != que->itr_setting) { que->itr_setting = newitr; - E1000_WRITE_REG(hw, E1000_EITR(que->msix), que->itr_setting); + E1000_WRITE_REG(hw, E1000_EITR(que->msix), + que->itr_setting); } } else { newitr = EM_INTS_TO_ITR(newitr); @@ -1618,9 +1780,11 @@ em_set_next_itr: que->itr_setting = newitr; if (hw->mac.type == e1000_82574 && que->msix) { E1000_WRITE_REG(hw, - E1000_EITR_82574(que->msix), que->itr_setting); + E1000_EITR_82574(que->msix), + que->itr_setting); } else { - E1000_WRITE_REG(hw, E1000_ITR, que->itr_setting); + E1000_WRITE_REG(hw, E1000_ITR, + que->itr_setting); } } } @@ -1779,8 +1943,8 @@ em_msix_link(void *arg) E1000_WRITE_REG(&sc->hw, E1000_IMS, E1000_IMS_LSC); E1000_WRITE_REG(&sc->hw, E1000_EIMS, sc->link_mask); } else if (sc->hw.mac.type == e1000_82574) { - E1000_WRITE_REG(&sc->hw, E1000_IMS, E1000_IMS_LSC | - E1000_IMS_OTHER); + E1000_WRITE_REG(&sc->hw, E1000_IMS, + E1000_IMS_LSC | E1000_IMS_OTHER); /* * Because we must read the ICR for this interrupt it may * clear other causes using autoclear, for this reason we @@ -1923,7 +2087,8 @@ em_if_set_promisc(if_ctx_t ctx, int flags) if (flags & IFF_ALLMULTI) mcnt = MAX_NUM_MULTICAST_ADDRESSES; else - mcnt = min(if_llmaddr_count(ifp), MAX_NUM_MULTICAST_ADDRESSES); + mcnt = min(if_llmaddr_count(ifp), + MAX_NUM_MULTICAST_ADDRESSES); if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) reg_rctl &= (~E1000_RCTL_MPE); @@ -1972,7 +2137,7 @@ em_if_multi_set(if_ctx_t ctx) { struct e1000_softc *sc = iflib_get_softc(ctx); if_t ifp = iflib_get_ifp(ctx); - u8 *mta; /* Multicast array memory */ + u8 *mta; /* Multicast array memory */ u32 reg_rctl = 0; int mcnt = 0; @@ -2031,7 +2196,6 @@ em_if_multi_set(if_ctx_t ctx) static void em_if_timer(if_ctx_t ctx, uint16_t qid) { - if (qid != 0) return; @@ -2065,8 +2229,8 @@ em_if_update_admin_status(if_ctx_t ctx) break; case e1000_media_type_fiber: e1000_check_for_link(hw); - link_check = (E1000_READ_REG(hw, E1000_STATUS) & - E1000_STATUS_LU); + link_check = + (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU); break; case e1000_media_type_internal_serdes: e1000_check_for_link(hw); @@ -2123,11 +2287,11 @@ em_if_update_admin_status(if_ctx_t ctx) sc->flags |= IGB_MEDIA_RESET; em_reset(ctx); } - /* Only do TSO on gigabit Ethernet for older chips due to errata */ + /* Only do TSO on gigabit for older chips due to errata */ if (hw->mac.type < igb_mac_min) automasked = em_automask_tso(ctx); - /* Automasking resets the interface, so don't mark it up yet */ + /* Automasking resets the interface so don't mark it up yet */ if (!automasked) iflib_link_state_change(ctx, LINK_STATE_UP, IF_Mbps(sc->link_speed)); @@ -2202,10 +2366,8 @@ em_identify_hardware(if_ctx_t ctx) sc->hw.vendor_id = pci_get_vendor(dev); sc->hw.device_id = pci_get_device(dev); sc->hw.revision_id = pci_read_config(dev, PCIR_REVID, 1); - sc->hw.subsystem_vendor_id = - pci_read_config(dev, PCIR_SUBVEND_0, 2); - sc->hw.subsystem_device_id = - pci_read_config(dev, PCIR_SUBDEV_0, 2); + sc->hw.subsystem_vendor_id = pci_read_config(dev, PCIR_SUBVEND_0, 2); + sc->hw.subsystem_device_id = pci_read_config(dev, PCIR_SUBDEV_0, 2); /* Do Shared Code Init and Setup */ if (e1000_set_mac_type(&sc->hw)) { @@ -2229,15 +2391,15 @@ em_allocate_pci_resources(if_ctx_t ctx) int rid, val; rid = PCIR_BAR(0); - sc->memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &rid, RF_ACTIVE); + sc->memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); if (sc->memory == NULL) { - device_printf(dev, "Unable to allocate bus resource: memory\n"); + device_printf(dev, + "Unable to allocate bus resource: memory\n"); return (ENXIO); } sc->osdep.mem_bus_space_tag = rman_get_bustag(sc->memory); - sc->osdep.mem_bus_space_handle = - rman_get_bushandle(sc->memory); + sc->osdep.mem_bus_space_handle = rman_get_bushandle(sc->memory); sc->hw.hw_addr = (u8 *)&sc->osdep.mem_bus_space_handle; /* Only older adapters use IO mapping */ @@ -2260,8 +2422,8 @@ em_allocate_pci_resources(if_ctx_t ctx) sc->ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); if (sc->ioport == NULL) { - device_printf(dev, "Unable to allocate bus resource: " - "ioport\n"); + device_printf(dev, + "Unable to allocate bus resource: ioport\n"); return (ENXIO); } sc->hw.io_base = 0; @@ -2294,9 +2456,12 @@ em_if_msix_intr_assign(if_ctx_t ctx, int msix) for (i = 0; i < sc->rx_num_queues; i++, rx_que++, vector++) { rid = vector + 1; snprintf(buf, sizeof(buf), "rxq%d", i); - error = iflib_irq_alloc_generic(ctx, &rx_que->que_irq, rid, IFLIB_INTR_RXTX, em_msix_que, rx_que, rx_que->me, buf); + error = iflib_irq_alloc_generic(ctx, &rx_que->que_irq, rid, + IFLIB_INTR_RXTX, em_msix_que, rx_que, rx_que->me, buf); if (error) { - device_printf(iflib_get_dev(ctx), "Failed to allocate que int %d err: %d", i, error); + device_printf(iflib_get_dev(ctx), + "Failed to allocate que int %d err: %d", + i, error); sc->rx_num_queues = i + 1; goto fail; } @@ -2349,10 +2514,12 @@ em_if_msix_intr_assign(if_ctx_t ctx, int msix) *** 891 LINES SKIPPED *** From nobody Wed Nov 27 00:29:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XygKq63R1z5fFxq; Wed, 27 Nov 2024 00:29:03 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XygKq44Q1z4Tym; Wed, 27 Nov 2024 00:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Kt6gPLzNSGMgUlrIitip4FnFgJz8qOnWAV4KQxKcaY=; b=RIpmpKY5fUMUbx6C9T4meSl38lnQG6RrfSvL8SMmSvByR9DUqIloQHUZkxC+jaVlfjTuJl TZxu8nyGoQXA0/fBqn6RYFRcaaZ6y9juYDBztn9Xjoz3+nKOl2ixQAOZzXlJ0dEzTTfqyo X4Y8BML40lhW8VijKjjF5YfbtER3eWExJyiDD6DQVFIt66ror8cYx4n6PZpK5erZ8mrf5g CxkROJtQBmY3+/vu+Mp7y2T9RxlwT9+iSNKuwnBGIvp2u6zYOV06N0U8mJfzE3K+hGNUU8 P3lSmzIdT11EzpMNNg2mW4hVUSfmW2wj6pTezQA3zpaB+ebxLGVxDpJBaYdqpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Kt6gPLzNSGMgUlrIitip4FnFgJz8qOnWAV4KQxKcaY=; b=DMvFYczJLUt1lNDh0lPgQtVKm/0/pJCQP4hr2JXjhtscmIla2TbIFaJzKKDZhX+g25vYz0 1QOErKcsq/1AbAhoyB9w7NjOaheregy0T9A415bpCcwJlH3JU6UiKiERB916RBDxq3Lsv1 nSH8v1+bU0OCaS25WuuswaxoJjT6N6jbz4ZhpDWcRe7xCME0JE3BKPhWx3/azV+xEC4KFX pgiRdI09w/GBptfRRZu1excyRffRTgCtvrMFIk+VNS/FiVs5iK1ZE7IwlWwTsnKCK3/V7w 9rjWdH0UA+ESr+rOWVwPmtYbsjUaPF9xxgYrodohoqJCROhBNBh0m63CWJR7uA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732667343; a=rsa-sha256; cv=none; b=X3Weefiq0MMkkZKqv1JRkbXwpFKuHkiuNTXZeFcRj63fx2CC6BdohDk23Bc3cSOsd/mF7r 7Y1VMVxC9kZ0ofe26xzKmYIBFDpCrBuAWY59OGkfGoGffvJoFN4/FPaqoBPKfcAzQSFLku 5FYTqXREP5ksrRcCRcWMbsAhrSSWziTg1p1uKIC2Peri2xadHYZ+TE38p2OxEsTqMXvk+2 mrLtZsIVm2RGHm+jbApJHEGMAKj3CfKQji0Yh+o+jBwstzw5dHXRA0BE8qQHBzyGiGnhTW 8fcOuduzDEikw9J/iRR0PnasOgrtIUImL43ut21JvXfuZUPNzKWd1RsU8OKghg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XygKq3dlfznDR; Wed, 27 Nov 2024 00:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR0T3VP063867; Wed, 27 Nov 2024 00:29:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR0T3To063864; Wed, 27 Nov 2024 00:29:03 GMT (envelope-from git) Date: Wed, 27 Nov 2024 00:29:03 GMT Message-Id: <202411270029.4AR0T3To063864@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: bfabd58a9b58 - stable/14 - igc: Reflow long lines List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bfabd58a9b58c88a3df6036b47d2812666b941a6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=bfabd58a9b58c88a3df6036b47d2812666b941a6 commit bfabd58a9b58c88a3df6036b47d2812666b941a6 Author: Kevin Bowling AuthorDate: 2024-11-24 05:58:13 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 00:27:57 +0000 igc: Reflow long lines Sponsored by: BBOX.io (cherry picked from commit 9efc7325f1acb85ac8772096cc2b54fd0c6a60ff) --- sys/dev/igc/if_igc.c | 153 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 98 insertions(+), 55 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 515bb35ac8fd..5356a6e87a5b 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -49,22 +49,38 @@ static const pci_vendor_info_t igc_vendor_info_array[] = { /* Intel(R) PRO/1000 Network Connection - igc */ - PVID(0x8086, IGC_DEV_ID_I225_LM, "Intel(R) Ethernet Controller I225-LM"), - PVID(0x8086, IGC_DEV_ID_I225_V, "Intel(R) Ethernet Controller I225-V"), - PVID(0x8086, IGC_DEV_ID_I225_K, "Intel(R) Ethernet Controller I225-K"), - PVID(0x8086, IGC_DEV_ID_I225_I, "Intel(R) Ethernet Controller I225-I"), - PVID(0x8086, IGC_DEV_ID_I220_V, "Intel(R) Ethernet Controller I220-V"), - PVID(0x8086, IGC_DEV_ID_I225_K2, "Intel(R) Ethernet Controller I225-K(2)"), - PVID(0x8086, IGC_DEV_ID_I225_LMVP, "Intel(R) Ethernet Controller I225-LMvP(2)"), - PVID(0x8086, IGC_DEV_ID_I226_K, "Intel(R) Ethernet Controller I226-K"), - PVID(0x8086, IGC_DEV_ID_I226_LMVP, "Intel(R) Ethernet Controller I226-LMvP"), - PVID(0x8086, IGC_DEV_ID_I225_IT, "Intel(R) Ethernet Controller I225-IT(2)"), - PVID(0x8086, IGC_DEV_ID_I226_LM, "Intel(R) Ethernet Controller I226-LM"), - PVID(0x8086, IGC_DEV_ID_I226_V, "Intel(R) Ethernet Controller I226-V"), - PVID(0x8086, IGC_DEV_ID_I226_IT, "Intel(R) Ethernet Controller I226-IT"), - PVID(0x8086, IGC_DEV_ID_I221_V, "Intel(R) Ethernet Controller I221-V"), - PVID(0x8086, IGC_DEV_ID_I226_BLANK_NVM, "Intel(R) Ethernet Controller I226(blankNVM)"), - PVID(0x8086, IGC_DEV_ID_I225_BLANK_NVM, "Intel(R) Ethernet Controller I225(blankNVM)"), + PVID(0x8086, IGC_DEV_ID_I225_LM, + "Intel(R) Ethernet Controller I225-LM"), + PVID(0x8086, IGC_DEV_ID_I225_V, + "Intel(R) Ethernet Controller I225-V"), + PVID(0x8086, IGC_DEV_ID_I225_K, + "Intel(R) Ethernet Controller I225-K"), + PVID(0x8086, IGC_DEV_ID_I225_I, + "Intel(R) Ethernet Controller I225-I"), + PVID(0x8086, IGC_DEV_ID_I220_V, + "Intel(R) Ethernet Controller I220-V"), + PVID(0x8086, IGC_DEV_ID_I225_K2, + "Intel(R) Ethernet Controller I225-K(2)"), + PVID(0x8086, IGC_DEV_ID_I225_LMVP, + "Intel(R) Ethernet Controller I225-LMvP(2)"), + PVID(0x8086, IGC_DEV_ID_I226_K, + "Intel(R) Ethernet Controller I226-K"), + PVID(0x8086, IGC_DEV_ID_I226_LMVP, + "Intel(R) Ethernet Controller I226-LMvP"), + PVID(0x8086, IGC_DEV_ID_I225_IT, + "Intel(R) Ethernet Controller I225-IT(2)"), + PVID(0x8086, IGC_DEV_ID_I226_LM, + "Intel(R) Ethernet Controller I226-LM"), + PVID(0x8086, IGC_DEV_ID_I226_V, + "Intel(R) Ethernet Controller I226-V"), + PVID(0x8086, IGC_DEV_ID_I226_IT, + "Intel(R) Ethernet Controller I226-IT"), + PVID(0x8086, IGC_DEV_ID_I221_V, + "Intel(R) Ethernet Controller I221-V"), + PVID(0x8086, IGC_DEV_ID_I226_BLANK_NVM, + "Intel(R) Ethernet Controller I226(blankNVM)"), + PVID(0x8086, IGC_DEV_ID_I225_BLANK_NVM, + "Intel(R) Ethernet Controller I225(blankNVM)"), /* required last entry */ PVID_END }; @@ -80,8 +96,10 @@ static int igc_if_shutdown(if_ctx_t); static int igc_if_suspend(if_ctx_t); static int igc_if_resume(if_ctx_t); -static int igc_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); -static int igc_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); +static int igc_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); +static int igc_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); static void igc_if_queues_free(if_ctx_t); static uint64_t igc_if_get_counter(if_ctx_t, ift_counter); @@ -229,7 +247,8 @@ SYSCTL_INT(_hw_igc, OID_AUTO, disable_crc_stripping, CTLFLAG_RDTUN, &igc_disable_crc_stripping, 0, "Disable CRC Stripping"); static int igc_smart_pwr_down = false; -SYSCTL_INT(_hw_igc, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, &igc_smart_pwr_down, +SYSCTL_INT(_hw_igc, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, + &igc_smart_pwr_down, 0, "Set to true to leave smart power down enabled on newer adapters"); /* Controls whether promiscuous also shows bad packets */ @@ -277,7 +296,8 @@ static struct if_shared_ctx igc_sctx_init = { .isc_vendor_info = igc_vendor_info_array, .isc_driver_version = "1", .isc_driver = &igc_if_driver, - .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, + .isc_flags = + IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, .isc_nrxd_min = {IGC_MIN_RXD}, .isc_ntxd_min = {IGC_MIN_TXD}, @@ -383,15 +403,20 @@ static int igc_get_regs(SYSCTL_HANDLER_ARGS) for (j = 0; j < nrxd; j++) { u32 staterr = le32toh(rxr->rx_base[j].wb.upper.status_error); u32 length = le32toh(rxr->rx_base[j].wb.upper.length); - sbuf_printf(sb, "\tReceive Descriptor Address %d: %08" PRIx64 " Error:%d Length:%d\n", j, rxr->rx_base[j].read.buffer_addr, staterr, length); + sbuf_printf(sb, "\tReceive Descriptor Address %d: %08" + PRIx64 " Error:%d Length:%d\n", + j, rxr->rx_base[j].read.buffer_addr, staterr, length); } for (j = 0; j < min(ntxd, 256); j++) { unsigned int *ptr = (unsigned int *)&txr->tx_base[j]; - sbuf_printf(sb, "\tTXD[%03d] [0]: %08x [1]: %08x [2]: %08x [3]: %08x eop: %d DD=%d\n", - j, ptr[0], ptr[1], ptr[2], ptr[3], buf->eop, - buf->eop != -1 ? txr->tx_base[buf->eop].upper.fields.status & IGC_TXD_STAT_DD : 0); + sbuf_printf(sb, "\tTXD[%03d] [0]: %08x [1]: %08x [2]: %08x" + "[3]: %08x eop: %d DD=%d\n", + j, ptr[0], ptr[1], ptr[2], ptr[3], buf->eop, + buf->eop != -1 ? + txr->tx_base[buf->eop].upper.fields.status & + IGC_TXD_STAT_DD : 0); } } @@ -523,13 +548,16 @@ igc_if_attach_pre(if_ctx_t ctx) igc_identify_hardware(ctx); scctx->isc_tx_nsegments = IGC_MAX_SCATTER; - scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = igc_set_num_queues(ctx); + scctx->isc_nrxqsets_max = + scctx->isc_ntxqsets_max = igc_set_num_queues(ctx); if (bootverbose) device_printf(dev, "attach_pre capping queues at %d\n", scctx->isc_ntxqsets_max); - scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union igc_adv_tx_desc), IGC_DBA_ALIGN); - scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union igc_adv_rx_desc), IGC_DBA_ALIGN); + scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * + sizeof(union igc_adv_tx_desc), IGC_DBA_ALIGN); + scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * + sizeof(union igc_adv_rx_desc), IGC_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(union igc_adv_tx_desc); scctx->isc_rxd_size[0] = sizeof(union igc_adv_rx_desc); scctx->isc_txrx = &igc_txrx; @@ -588,7 +616,8 @@ igc_if_attach_pre(if_ctx_t ctx) sc->mta = malloc(sizeof(u8) * ETHER_ADDR_LEN * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); if (sc->mta == NULL) { - device_printf(dev, "Can not allocate multicast setup array\n"); + device_printf(dev, + "Can not allocate multicast setup array\n"); error = ENOMEM; goto err_late; } @@ -817,7 +846,8 @@ igc_if_init(if_ctx_t ctx) igc_reset(ctx); igc_if_update_admin_status(ctx); - for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; i++, tx_que++) { + for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; + i++, tx_que++) { struct tx_ring *txr = &tx_que->txr; txr->tx_rs_cidx = txr->tx_rs_pidx; @@ -906,7 +936,7 @@ igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, goto igc_set_next_eitr; } - /* Get the largest values from the associated tx and rx ring */ + /* Get largest values from the associated tx and rx ring */ if (txr->tx_bytes && txr->tx_packets) { bytes = txr->tx_bytes; bytes_packets = txr->tx_bytes/txr->tx_packets; @@ -914,7 +944,8 @@ igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, } if (rxr->rx_bytes && rxr->rx_packets) { bytes = max(bytes, rxr->rx_bytes); - bytes_packets = max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); + bytes_packets = max(bytes_packets, + rxr->rx_bytes/rxr->rx_packets); packets = max(packets, rxr->rx_packets); } @@ -935,7 +966,8 @@ igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, /* Handle TSO */ if (bytes_packets > 8000) nextlatency = eitr_latency_bulk; - else if ((packets < 10) || (bytes_packets > 1200)) + else if ((packets < 10) || + (bytes_packets > 1200)) nextlatency = eitr_latency_bulk; else if (packets > 35) nextlatency = eitr_latency_lowest; @@ -954,7 +986,8 @@ igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, break; default: nextlatency = eitr_latency_low; - device_printf(sc->dev, "Unexpected neweitr transition %d\n", + device_printf(sc->dev, + "Unexpected neweitr transition %d\n", nextlatency); break; } @@ -1463,7 +1496,8 @@ igc_allocate_pci_resources(if_ctx_t ctx) sc->memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->memory == NULL) { - device_printf(dev, "Unable to allocate bus resource: memory\n"); + device_printf(dev, + "Unable to allocate bus resource: memory\n"); return (ENXIO); } sc->osdep.mem_bus_space_tag = rman_get_bustag(sc->memory); @@ -1494,9 +1528,12 @@ igc_if_msix_intr_assign(if_ctx_t ctx, int msix) for (i = 0; i < sc->rx_num_queues; i++, rx_que++, vector++) { rid = vector + 1; snprintf(buf, sizeof(buf), "rxq%d", i); - error = iflib_irq_alloc_generic(ctx, &rx_que->que_irq, rid, IFLIB_INTR_RXTX, igc_msix_que, rx_que, rx_que->me, buf); + error = iflib_irq_alloc_generic(ctx, &rx_que->que_irq, rid, + IFLIB_INTR_RXTX, igc_msix_que, rx_que, rx_que->me, buf); if (error) { - device_printf(iflib_get_dev(ctx), "Failed to allocate que int %d err: %d", i, error); + device_printf(iflib_get_dev(ctx), + "Failed to allocate que int %d err: %d", + i, error); sc->rx_num_queues = i + 1; goto fail; } @@ -1534,10 +1571,12 @@ igc_if_msix_intr_assign(if_ctx_t ctx, int msix) /* Link interrupt */ rid = rx_vectors + 1; - error = iflib_irq_alloc_generic(ctx, &sc->irq, rid, IFLIB_INTR_ADMIN, igc_msix_link, sc, 0, "aq"); + error = iflib_irq_alloc_generic(ctx, &sc->irq, rid, IFLIB_INTR_ADMIN, + igc_msix_link, sc, 0, "aq"); if (error) { - device_printf(iflib_get_dev(ctx), "Failed to register admin handler"); + device_printf(iflib_get_dev(ctx), + "Failed to register admin handler"); goto fail; } sc->linkvec = rx_vectors; @@ -1777,7 +1816,8 @@ igc_reset(if_ctx_t ctx) * response (Rx) to Ethernet PAUSE frames. * - High water mark should allow for at least two frames to be * received after sending an XOFF. - * - Low water mark works best when it is very near the high water mark. + * - Low water mark works best when it is very near the high water + * mark. * This allows the receiver to restart by sending XON when it has * drained a bit. Here we use an arbitrary value of 1500 which will * restart after one full frame is pulled from the buffer. There @@ -1957,7 +1997,8 @@ igc_setup_interface(if_ctx_t ctx) } static int -igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxqs, int ntxqsets) +igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, + int ntxqs, int ntxqsets) { struct igc_softc *sc = iflib_get_softc(ctx); if_softc_ctx_t scctx = sc->shared; @@ -1972,7 +2013,8 @@ igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxq if (!(sc->tx_queues = (struct igc_tx_queue *) malloc(sizeof(struct igc_tx_queue) * sc->tx_num_queues, M_DEVBUF, M_NOWAIT | M_ZERO))) { - device_printf(iflib_get_dev(ctx), "Unable to allocate queue memory\n"); + device_printf(iflib_get_dev(ctx), + "Unable to allocate queue memory\n"); return(ENOMEM); } @@ -1984,14 +2026,16 @@ igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxq que->me = txr->me = i; /* Allocate report status array */ - if (!(txr->tx_rsq = (qidx_t *) malloc(sizeof(qidx_t) * scctx->isc_ntxd[0], M_DEVBUF, M_NOWAIT | M_ZERO))) { - device_printf(iflib_get_dev(ctx), "failed to allocate rs_idxs memory\n"); + if (!(txr->tx_rsq = (qidx_t *) malloc(sizeof(qidx_t) * + scctx->isc_ntxd[0], M_DEVBUF, M_NOWAIT | M_ZERO))) { + device_printf(iflib_get_dev(ctx), + "failed to allocate rs_idxs memory\n"); error = ENOMEM; goto fail; } for (j = 0; j < scctx->isc_ntxd[0]; j++) txr->tx_rsq[j] = QIDX_INVALID; - /* get the virtual and physical address of the hardware queues */ + /* get virtual and physical address of the hardware queues */ txr->tx_base = (struct igc_tx_desc *)vaddrs[i*ntxqs]; txr->tx_paddr = paddrs[i*ntxqs]; } @@ -2006,7 +2050,8 @@ fail: } static int -igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxqs, int nrxqsets) +igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, + int nrxqs, int nrxqsets) { struct igc_softc *sc = iflib_get_softc(ctx); int error = IGC_SUCCESS; @@ -2020,7 +2065,8 @@ igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxq if (!(sc->rx_queues = (struct igc_rx_queue *) malloc(sizeof(struct igc_rx_queue) * sc->rx_num_queues, M_DEVBUF, M_NOWAIT | M_ZERO))) { - device_printf(iflib_get_dev(ctx), "Unable to allocate queue memory\n"); + device_printf(iflib_get_dev(ctx), + "Unable to allocate queue memory\n"); error = ENOMEM; goto fail; } @@ -2032,7 +2078,7 @@ igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxq rxr->que = que; que->me = rxr->me = i; - /* get the virtual and physical address of the hardware queues */ + /* get virtual and physical address of the hardware queues */ rxr->rx_base = (union igc_rx_desc_extended *)vaddrs[i*nrxqs]; rxr->rx_paddr = paddrs[i*nrxqs]; } @@ -2247,11 +2293,9 @@ igc_initialize_receive_unit(if_ctx_t ctx) #endif IGC_WRITE_REG(hw, IGC_RDLEN(i), - scctx->isc_nrxd[0] * sizeof(struct igc_rx_desc)); - IGC_WRITE_REG(hw, IGC_RDBAH(i), - (uint32_t)(bus_addr >> 32)); - IGC_WRITE_REG(hw, IGC_RDBAL(i), - (uint32_t)bus_addr); + scctx->isc_nrxd[0] * sizeof(struct igc_rx_desc)); + IGC_WRITE_REG(hw, IGC_RDBAH(i), (uint32_t)(bus_addr >> 32)); + IGC_WRITE_REG(hw, IGC_RDBAL(i), (uint32_t)bus_addr); IGC_WRITE_REG(hw, IGC_SRRCTL(i), srrctl); /* Setup the Head and Tail Descriptor Pointers */ IGC_WRITE_REG(hw, IGC_RDH(i), 0); @@ -2723,7 +2767,6 @@ igc_add_hw_stats(struct igc_softc *sc) } /* MAC stats get their own sub node */ - stat_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac_stats", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Statistics"); stat_list = SYSCTL_CHILDREN(stat_node); @@ -2881,7 +2924,6 @@ igc_add_hw_stats(struct igc_softc *sc) "TSO Contexts Transmitted"); /* Interrupt Stats */ - int_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "interrupts", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Interrupt Statistics"); int_list = SYSCTL_CHILDREN(int_node); @@ -2917,7 +2959,8 @@ igc_sbuf_fw_version(struct igc_fw_version *fw_ver, struct sbuf *buf) space = " "; } - if (fw_ver->invm_major || fw_ver->invm_minor || fw_ver->invm_img_type) { + if (fw_ver->invm_major || fw_ver->invm_minor || + fw_ver->invm_img_type) { sbuf_printf(buf, "%sNVM V%d.%d imgtype%d", space, fw_ver->invm_major, fw_ver->invm_minor, fw_ver->invm_img_type); From nobody Wed Nov 27 00:29:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XygKs0Vhmz5fFpp; Wed, 27 Nov 2024 00:29:05 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XygKr5l3Yz4VFZ; Wed, 27 Nov 2024 00:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eaoWQGD0bkhhUoE2tVTT0CTzxAbXPFqJwfpYHK3NRk8=; b=b0qE3ZEoNUWbzLel8WhE3FG18lv9LeDZzKAyeOnRmVqDT46mgg78pefHdJbeP8m5GlnOGN fJadVkxFUdQpdAmwVDuiz0Lud1bPn+3cg/KKwZi7Jhk2klmSrTbTeL9GxzF6bAbO5EA0jn JAKgdpPwGxtP0hw0BL45jwZPT9Ci1Zx9bu8COEA4VeKyxpGehoUvYWBYAmCA09IEsuVqNJ +kXg102086HMfb2lKnFBo2tacjSG6Qi0rp//owQQ0PQ64jmw3pglHJ8b1dOyndTPtomC87 ZWeVwhUMsW6aulppzAn2sc5GkDSdYrU+2Z0QZeuA9lMYW12TmjhSxQF91qH6mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eaoWQGD0bkhhUoE2tVTT0CTzxAbXPFqJwfpYHK3NRk8=; b=IIVNDDZefK7jgEHjtA9e4JxB9OAfinJQSZV146tlBXlF0voueCTcJLZYZcjVVxtMPjt27Q 4ElEY2jl1eKJyexgepDZymM0bHNUMGz44xqpKclSGAn+gcWlm3rED+IQ6X/cc3J0iB9PvV BZPZfwbkVJ/nfIoN7+K1vK46pH7BX7/ZTCbRjJ4H6JMURK/DnVFvTPpaNwmuCjEpr0QTSp h3H4bAsaMAm+KiEPtEYJDSzrSk8xOjHSBPiZ5qg464UR13MJp1CivJrp2M4Jhy/ILtv+uE dFdSl5whxejuxLxsJe6Q/n6jNyU9RByrEsqU0Wi9zg9F/2h1TH6vfPengjyZ4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732667344; a=rsa-sha256; cv=none; b=fIxo/oU7dq9DIVYPLe8ZC0m1hmkMEAGH3zpkuexhp5OymJdAPZPW8aszRr1yuO/OfZJ3wI qzMhmhEbcc0dV4Ef2nr9syC7p6M1lMzlzS27JUGZOZc04BeCWLqWR+Ct9yIKK0ochafU7X tZn1tU7K9zg49nflWfKDLT4bPmYR8BB95yIQTxBQbNS79dlYMnFF9HznmgejOPRCad3SCz j4tqo/Y3Uc1YIG5bmbaU6WvdZzkopqQlQMtnO8If4xi2J1eHLQMuWJN/hGj6wUVMSF9J7Y 9p9AoSkdF0N7bTfAf71K/gRMQecVwOpXFzommSEBRuYg2i8Mzu9BVIMlccfeHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XygKr4GrvzmjL; Wed, 27 Nov 2024 00:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR0T4nA063927; Wed, 27 Nov 2024 00:29:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR0T4Ye063924; Wed, 27 Nov 2024 00:29:04 GMT (envelope-from git) Date: Wed, 27 Nov 2024 00:29:04 GMT Message-Id: <202411270029.4AR0T4Ye063924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 55ddb8f7f45e - stable/14 - ixgbe: Style pass on FreeBSD part of driver List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 55ddb8f7f45e61fa0bf837a26e5dd7cd8ae5481d Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=55ddb8f7f45e61fa0bf837a26e5dd7cd8ae5481d commit 55ddb8f7f45e61fa0bf837a26e5dd7cd8ae5481d Author: Kevin Bowling AuthorDate: 2024-11-24 07:18:33 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 00:28:08 +0000 ixgbe: Style pass on FreeBSD part of driver Fix up some indentation and reflow long lines Sponsored by: BBOX.io (cherry picked from commit c58d34dd67a419866ee50f152044e49cecbae261) --- sys/dev/ixgbe/if_bypass.c | 110 ++++--- sys/dev/ixgbe/if_fdir.c | 24 +- sys/dev/ixgbe/if_ix.c | 814 ++++++++++++++++++++++++++-------------------- sys/dev/ixgbe/if_ixv.c | 254 ++++++++------- sys/dev/ixgbe/if_sriov.c | 59 ++-- sys/dev/ixgbe/ix_txrx.c | 106 +++--- sys/dev/ixgbe/ixgbe.h | 8 +- 7 files changed, 765 insertions(+), 610 deletions(-) diff --git a/sys/dev/ixgbe/if_bypass.c b/sys/dev/ixgbe/if_bypass.c index 166150d75cc6..138b4e17db0d 100644 --- a/sys/dev/ixgbe/if_bypass.c +++ b/sys/dev/ixgbe/if_bypass.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/***************************************************************************** Copyright (c) 2001-2017, Intel Corporation All rights reserved. @@ -29,7 +29,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -******************************************************************************/ +*****************************************************************************/ #include "ixgbe.h" @@ -114,11 +114,11 @@ ixgbe_get_bypass_time(u32 *year, u32 *sec) static int ixgbe_bp_version(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int version = 0; - u32 cmd; + int error = 0; + static int version = 0; + u32 cmd; ixgbe_bypass_mutex_enter(sc); cmd = BYPASS_PAGE_CTL2 | BYPASS_WE; @@ -154,15 +154,14 @@ err: static int ixgbe_bp_set_state(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int state = 0; + int error = 0; + static int state = 0; /* Get the current state */ ixgbe_bypass_mutex_enter(sc); - error = hw->mac.ops.bypass_rw(hw, - BYPASS_PAGE_CTL0, &state); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &state); ixgbe_bypass_mutex_clear(sc); if (error != 0) return (error); @@ -216,10 +215,10 @@ out: static int ixgbe_bp_timeout(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int timeout = 0; + int error = 0; + static int timeout = 0; /* Get the current value */ ixgbe_bypass_mutex_enter(sc); @@ -259,10 +258,10 @@ ixgbe_bp_timeout(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_main_on(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int main_on = 0; + int error = 0; + static int main_on = 0; ixgbe_bypass_mutex_enter(sc); error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &main_on); @@ -301,10 +300,10 @@ ixgbe_bp_main_on(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_main_off(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int main_off = 0; + int error = 0; + static int main_off = 0; ixgbe_bypass_mutex_enter(sc); error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &main_off); @@ -343,10 +342,10 @@ ixgbe_bp_main_off(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_aux_on(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int aux_on = 0; + int error = 0; + static int aux_on = 0; ixgbe_bypass_mutex_enter(sc); error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &aux_on); @@ -385,10 +384,10 @@ ixgbe_bp_aux_on(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_aux_off(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int aux_off = 0; + int error = 0; + static int aux_off = 0; ixgbe_bypass_mutex_enter(sc); error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &aux_off); @@ -432,11 +431,11 @@ ixgbe_bp_aux_off(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_wd_set(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error, tmp; - static int timeout = 0; - u32 mask, arg; + int error, tmp; + static int timeout = 0; + u32 mask, arg; /* Get the current hardware value */ ixgbe_bypass_mutex_enter(sc); @@ -503,11 +502,11 @@ ixgbe_bp_wd_set(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_wd_reset(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - u32 sec, year; - int cmd, count = 0, error = 0; - int reset_wd = 0; + u32 sec, year; + int cmd, count = 0, error = 0; + int reset_wd = 0; error = sysctl_handle_int(oidp, &reset_wd, 0, req); if ((error) || (req->newptr == NULL)) @@ -549,14 +548,14 @@ ixgbe_bp_wd_reset(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_log(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; - struct ixgbe_hw *hw = &sc->hw; - u32 cmd, base, head; - u32 log_off, count = 0; - static int status = 0; - u8 data; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_hw *hw = &sc->hw; + u32 cmd, base, head; + u32 log_off, count = 0; + static int status = 0; + u8 data; struct ixgbe_bypass_eeprom eeprom[BYPASS_MAX_LOGS]; - int i, error = 0; + int i, error = 0; error = sysctl_handle_int(oidp, &status, 0, req); if ((error) || (req->newptr == NULL)) @@ -639,12 +638,15 @@ ixgbe_bp_log(SYSCTL_HANDLER_ARGS) BYPASS_LOG_EVENT_SHIFT; u8 action = eeprom[count].actions & BYPASS_LOG_ACTION_M; u16 day_mon[2][13] = { - {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, - {0, 31, 59, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} + {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, + 334, 365}, + {0, 31, 59, 91, 121, 152, 182, 213, 244, 274, 305, + 335, 366} }; char *event_str[] = {"unknown", "main on", "aux on", "main off", "aux off", "WDT", "user" }; - char *action_str[] = {"ignore", "normal", "bypass", "isolate",}; + char *action_str[] = + {"ignore", "normal", "bypass", "isolate",}; /* verify vaild data 1 - 6 */ if (event < BYPASS_EVENT_MAIN_ON || event > BYPASS_EVENT_USR) @@ -711,11 +713,11 @@ unlock_err: void ixgbe_bypass_init(struct ixgbe_softc *sc) { - struct ixgbe_hw *hw = &sc->hw; - device_t dev = sc->dev; - struct sysctl_oid *bp_node; + struct ixgbe_hw *hw = &sc->hw; + device_t dev = sc->dev; + struct sysctl_oid *bp_node; struct sysctl_oid_list *bp_list; - u32 mask, value, sec, year; + u32 mask, value, sec, year; if (!(sc->feat_cap & IXGBE_FEATURE_BYPASS)) return; @@ -723,13 +725,13 @@ ixgbe_bypass_init(struct ixgbe_softc *sc) /* First set up time for the hardware */ ixgbe_get_bypass_time(&year, &sec); - mask = BYPASS_CTL1_TIME_M - | BYPASS_CTL1_VALID_M - | BYPASS_CTL1_OFFTRST_M; + mask = BYPASS_CTL1_TIME_M | + BYPASS_CTL1_VALID_M | + BYPASS_CTL1_OFFTRST_M; - value = (sec & BYPASS_CTL1_TIME_M) - | BYPASS_CTL1_VALID - | BYPASS_CTL1_OFFTRST; + value = (sec & BYPASS_CTL1_TIME_M) | + BYPASS_CTL1_VALID | + BYPASS_CTL1_OFFTRST; ixgbe_bypass_mutex_enter(sc); hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL1, mask, value); diff --git a/sys/dev/ixgbe/if_fdir.c b/sys/dev/ixgbe/if_fdir.c index 6c52cc452987..37f45cb3808f 100644 --- a/sys/dev/ixgbe/if_fdir.c +++ b/sys/dev/ixgbe/if_fdir.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/***************************************************************************** Copyright (c) 2001-2017, Intel Corporation All rights reserved. @@ -29,7 +29,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -******************************************************************************/ +*****************************************************************************/ #include "ixgbe.h" @@ -51,9 +51,9 @@ ixgbe_init_fdir(struct ixgbe_softc *sc) void ixgbe_reinit_fdir(void *context) { - if_ctx_t ctx = context; + if_ctx_t ctx = context; struct ixgbe_softc *sc = iflib_get_softc(ctx); - if_t ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); if (!(sc->feat_en & IXGBE_FEATURE_FDIR)) return; @@ -79,16 +79,16 @@ ixgbe_reinit_fdir(void *context) void ixgbe_atr(struct tx_ring *txr, struct mbuf *mp) { - struct ixgbe_softc *sc = txr->sc; - struct ix_queue *que; - struct ip *ip; - struct tcphdr *th; - struct udphdr *uh; - struct ether_vlan_header *eh; + struct ixgbe_softc *sc = txr->sc; + struct ix_queue *que; + struct ip *ip; + struct tcphdr *th; + struct udphdr *uh; + struct ether_vlan_header *eh; union ixgbe_atr_hash_dword input = {.dword = 0}; union ixgbe_atr_hash_dword common = {.dword = 0}; - int ehdrlen, ip_hlen; - u16 etype; + int ehdrlen, ip_hlen; + u16 etype; eh = mtod(mp, struct ether_vlan_header *); if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index ad690fdccef4..e94e120e27f9 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/***************************************************************************** Copyright (c) 2001-2017, Intel Corporation All rights reserved. @@ -29,7 +29,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -******************************************************************************/ +*****************************************************************************/ #include "opt_inet.h" #include "opt_inet6.h" @@ -58,53 +58,94 @@ static const char ixgbe_driver_version[] = "4.0.1-k"; ************************************************************************/ static const pci_vendor_info_t ixgbe_vendor_info_array[] = { - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, "Intel(R) 82598EB AF (Dual Fiber)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, "Intel(R) 82598EB AF (Fiber)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4, "Intel(R) 82598EB AT (CX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, "Intel(R) 82598EB AT"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2, "Intel(R) 82598EB AT2"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598, "Intel(R) 82598"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT, "Intel(R) 82598EB AF DA (Dual Fiber)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT, "Intel(R) 82598EB AT (Dual CX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR, "Intel(R) 82598EB AF (Dual Fiber LR)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM, "Intel(R) 82598EB AF (Dual Fiber SR)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM, "Intel(R) 82598EB LOM"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4, "Intel(R) X520 82599 (KX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ, "Intel(R) X520 82599 (KX4 Mezzanine)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, "Intel(R) X520 82599ES (SFI/SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, "Intel(R) X520 82599 (XAUI/BX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, "Intel(R) X520 82599 (Dual CX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, "Intel(R) X520-T 82599 LOM"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_LS, "Intel(R) X520 82599 LS"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, "Intel(R) X520 82599 (Combined Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, "Intel(R) X520 82599 (Backplane w/FCoE)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, "Intel(R) X520 82599 (Dual SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, "Intel(R) X520 82599 (Dual SFP+ w/FCoE)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, "Intel(R) X520-1 82599EN (SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP, "Intel(R) X520-4 82599 (Quad SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_QSFP_SF_QP, "Intel(R) X520-Q1 82599 (QSFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, "Intel(R) X540-AT2"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, "Intel(R) X540-T1"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T, "Intel(R) X550-T2"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T1, "Intel(R) X550-T1"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KR, "Intel(R) X552 (KR Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4, "Intel(R) X552 (KX4 Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T, "Intel(R) X552/X557-AT (10GBASE-T)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_1G_T, "Intel(R) X552 (1000BASE-T)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_SFP, "Intel(R) X552 (SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR, "Intel(R) X553 (KR Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR_L, "Intel(R) X553 L (KR Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP, "Intel(R) X553 (SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP_N, "Intel(R) X553 N (SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII, "Intel(R) X553 (1GbE SGMII)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII_L, "Intel(R) X553 L (1GbE SGMII)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_10G_T, "Intel(R) X553/X557-AT (10GBASE-T)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T, "Intel(R) X553 (1GbE)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T_L, "Intel(R) X553 L (1GbE)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_BYPASS, "Intel(R) X540-T2 (Bypass)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BYPASS, "Intel(R) X520 82599 (Bypass)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, + "Intel(R) 82598EB AF (Dual Fiber)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, + "Intel(R) 82598EB AF (Fiber)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4, + "Intel(R) 82598EB AT (CX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, + "Intel(R) 82598EB AT"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2, + "Intel(R) 82598EB AT2"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598, "Intel(R) 82598"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT, + "Intel(R) 82598EB AF DA (Dual Fiber)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT, + "Intel(R) 82598EB AT (Dual CX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR, + "Intel(R) 82598EB AF (Dual Fiber LR)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM, + "Intel(R) 82598EB AF (Dual Fiber SR)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM, + "Intel(R) 82598EB LOM"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4, + "Intel(R) X520 82599 (KX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ, + "Intel(R) X520 82599 (KX4 Mezzanine)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, + "Intel(R) X520 82599ES (SFI/SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, + "Intel(R) X520 82599 (XAUI/BX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, + "Intel(R) X520 82599 (Dual CX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, + "Intel(R) X520-T 82599 LOM"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_LS, + "Intel(R) X520 82599 LS"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, + "Intel(R) X520 82599 (Combined Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, + "Intel(R) X520 82599 (Backplane w/FCoE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, + "Intel(R) X520 82599 (Dual SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, + "Intel(R) X520 82599 (Dual SFP+ w/FCoE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, + "Intel(R) X520-1 82599EN (SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP, + "Intel(R) X520-4 82599 (Quad SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_QSFP_SF_QP, + "Intel(R) X520-Q1 82599 (QSFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, + "Intel(R) X540-AT2"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, "Intel(R) X540-T1"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T, "Intel(R) X550-T2"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T1, "Intel(R) X550-T1"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KR, + "Intel(R) X552 (KR Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4, + "Intel(R) X552 (KX4 Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T, + "Intel(R) X552/X557-AT (10GBASE-T)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_1G_T, + "Intel(R) X552 (1000BASE-T)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_SFP, + "Intel(R) X552 (SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR, + "Intel(R) X553 (KR Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR_L, + "Intel(R) X553 L (KR Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP, + "Intel(R) X553 (SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP_N, + "Intel(R) X553 N (SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII, + "Intel(R) X553 (1GbE SGMII)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII_L, + "Intel(R) X553 L (1GbE SGMII)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_10G_T, + "Intel(R) X553/X557-AT (10GBASE-T)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T, + "Intel(R) X553 (1GbE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T_L, + "Intel(R) X553 L (1GbE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_BYPASS, + "Intel(R) X540-T2 (Bypass)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BYPASS, + "Intel(R) X520 82599 (Bypass)"), /* required last entry */ - PVID_END + PVID_END }; static void *ixgbe_register(device_t); @@ -127,8 +168,10 @@ static int ixgbe_if_mtu_set(if_ctx_t, uint32_t); static void ixgbe_if_crcstrip_set(if_ctx_t, int, int); static void ixgbe_if_multi_set(if_ctx_t); static int ixgbe_if_promisc_set(if_ctx_t, int); -static int ixgbe_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); -static int ixgbe_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); +static int ixgbe_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); +static int ixgbe_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); static void ixgbe_if_queues_free(if_ctx_t); static void ixgbe_if_timer(if_ctx_t, uint16_t); static void ixgbe_if_update_admin_status(if_ctx_t); @@ -318,7 +361,8 @@ static int ixgbe_smart_speed = ixgbe_smart_speed_on; * but this allows it to be forced off for testing. */ static int ixgbe_enable_msix = 1; -SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, 0, +SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, + 0, "Enable MSI-X interrupts"); /* @@ -336,12 +380,14 @@ SYSCTL_INT(_hw_ix, OID_AUTO, unsupported_sfp, CTLFLAG_RDTUN, * so we'll default to turning it off. */ static int ixgbe_enable_fdir = 0; -SYSCTL_INT(_hw_ix, OID_AUTO, enable_fdir, CTLFLAG_RDTUN, &ixgbe_enable_fdir, 0, +SYSCTL_INT(_hw_ix, OID_AUTO, enable_fdir, CTLFLAG_RDTUN, &ixgbe_enable_fdir, + 0, "Enable Flow Director"); /* Receive-Side Scaling */ static int ixgbe_enable_rss = 1; -SYSCTL_INT(_hw_ix, OID_AUTO, enable_rss, CTLFLAG_RDTUN, &ixgbe_enable_rss, 0, +SYSCTL_INT(_hw_ix, OID_AUTO, enable_rss, CTLFLAG_RDTUN, &ixgbe_enable_rss, + 0, "Enable Receive-Side Scaling (RSS)"); /* @@ -351,7 +397,8 @@ SYSCTL_INT(_hw_ix, OID_AUTO, enable_rss, CTLFLAG_RDTUN, &ixgbe_enable_rss, 0, * traffic for that interrupt vector */ static int ixgbe_enable_aim = false; -SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &ixgbe_enable_aim, 0, +SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &ixgbe_enable_aim, + 0, "Enable adaptive interrupt moderation"); #if 0 @@ -407,9 +454,9 @@ ixgbe_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxqs, int ntxqsets) { struct ixgbe_softc *sc = iflib_get_softc(ctx); - if_softc_ctx_t scctx = sc->shared; + if_softc_ctx_t scctx = sc->shared; struct ix_tx_queue *que; - int i, j, error; + int i, j, error; MPASS(sc->num_tx_queues > 0); MPASS(sc->num_tx_queues == ntxqsets); @@ -417,8 +464,8 @@ ixgbe_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, /* Allocate queue structure memory */ sc->tx_queues = - (struct ix_tx_queue *)malloc(sizeof(struct ix_tx_queue) * ntxqsets, - M_IXGBE, M_NOWAIT | M_ZERO); + (struct ix_tx_queue *)malloc(sizeof(struct ix_tx_queue) * + ntxqsets, M_IXGBE, M_NOWAIT | M_ZERO); if (!sc->tx_queues) { device_printf(iflib_get_dev(ctx), "Unable to allocate TX ring memory\n"); @@ -429,20 +476,20 @@ ixgbe_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, struct tx_ring *txr = &que->txr; /* In case SR-IOV is enabled, align the index properly */ - txr->me = ixgbe_vf_que_index(sc->iov_mode, sc->pool, - i); + txr->me = ixgbe_vf_que_index(sc->iov_mode, sc->pool, i); txr->sc = que->sc = sc; /* Allocate report status array */ - txr->tx_rsq = (qidx_t *)malloc(sizeof(qidx_t) * scctx->isc_ntxd[0], M_IXGBE, M_NOWAIT | M_ZERO); + txr->tx_rsq = (qidx_t *)malloc(sizeof(qidx_t) * + scctx->isc_ntxd[0], M_IXGBE, M_NOWAIT | M_ZERO); if (txr->tx_rsq == NULL) { error = ENOMEM; goto fail; } for (j = 0; j < scctx->isc_ntxd[0]; j++) txr->tx_rsq[j] = QIDX_INVALID; - /* get the virtual and physical address of the hardware queues */ + /* get virtual and physical address of the hardware queues */ txr->tail = IXGBE_TDT(txr->me); txr->tx_base = (union ixgbe_adv_tx_desc *)vaddrs[i]; txr->tx_paddr = paddrs[i]; @@ -474,9 +521,9 @@ static int ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxqs, int nrxqsets) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); struct ix_rx_queue *que; - int i; + int i; MPASS(sc->num_rx_queues > 0); MPASS(sc->num_rx_queues == nrxqsets); @@ -485,7 +532,7 @@ ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, /* Allocate queue structure memory */ sc->rx_queues = (struct ix_rx_queue *)malloc(sizeof(struct ix_rx_queue)*nrxqsets, - M_IXGBE, M_NOWAIT | M_ZERO); + M_IXGBE, M_NOWAIT | M_ZERO); if (!sc->rx_queues) { device_printf(iflib_get_dev(ctx), "Unable to allocate TX ring memory\n"); @@ -496,8 +543,7 @@ ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, struct rx_ring *rxr = &que->rxr; /* In case SR-IOV is enabled, align the index properly */ - rxr->me = ixgbe_vf_que_index(sc->iov_mode, sc->pool, - i); + rxr->me = ixgbe_vf_que_index(sc->iov_mode, sc->pool, i); rxr->sc = que->sc = sc; @@ -521,10 +567,10 @@ ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, static void ixgbe_if_queues_free(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); struct ix_tx_queue *tx_que = sc->tx_queues; struct ix_rx_queue *rx_que = sc->rx_queues; - int i; + int i; if (tx_que != NULL) { for (i = 0; i < sc->num_tx_queues; i++, tx_que++) { @@ -552,10 +598,10 @@ static void ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) { struct ixgbe_hw *hw = &sc->hw; - u32 reta = 0, mrqc, rss_key[10]; - int queue_id, table_size, index_mult; - int i, j; - u32 rss_hash_config; + u32 reta = 0, mrqc, rss_key[10]; + int queue_id, table_size, index_mult; + int i, j; + u32 rss_hash_config; if (sc->feat_en & IXGBE_FEATURE_RSS) { /* Fetch the configured RSS key */ @@ -607,8 +653,8 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) if (i < 128) IXGBE_WRITE_REG(hw, IXGBE_RETA(i >> 2), reta); else - IXGBE_WRITE_REG(hw, IXGBE_ERETA((i >> 2) - 32), - reta); + IXGBE_WRITE_REG(hw, + IXGBE_ERETA((i >> 2) - 32), reta); reta = 0; } } @@ -626,12 +672,12 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) * and so we end up with a mix of 2-tuple and 4-tuple * traffic. */ - rss_hash_config = RSS_HASHTYPE_RSS_IPV4 - | RSS_HASHTYPE_RSS_TCP_IPV4 - | RSS_HASHTYPE_RSS_IPV6 - | RSS_HASHTYPE_RSS_TCP_IPV6 - | RSS_HASHTYPE_RSS_IPV6_EX - | RSS_HASHTYPE_RSS_TCP_IPV6_EX; + rss_hash_config = RSS_HASHTYPE_RSS_IPV4 | + RSS_HASHTYPE_RSS_TCP_IPV4 | + RSS_HASHTYPE_RSS_IPV6 | + RSS_HASHTYPE_RSS_TCP_IPV6 | + RSS_HASHTYPE_RSS_IPV6_EX | + RSS_HASHTYPE_RSS_TCP_IPV6_EX; } mrqc = IXGBE_MRQC_RSSEN; @@ -665,14 +711,14 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) static void ixgbe_initialize_receive_units(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); - if_softc_ctx_t scctx = sc->shared; - struct ixgbe_hw *hw = &sc->hw; - if_t ifp = iflib_get_ifp(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); + if_softc_ctx_t scctx = sc->shared; + struct ixgbe_hw *hw = &sc->hw; + if_t ifp = iflib_get_ifp(ctx); struct ix_rx_queue *que; - int i, j; - u32 bufsz, fctrl, srrctl, rxcsum; - u32 hlreg; + int i, j; + u32 bufsz, fctrl, srrctl, rxcsum; + u32 hlreg; /* * Make sure receives are disabled while @@ -703,7 +749,7 @@ ixgbe_initialize_receive_units(if_ctx_t ctx) /* Setup the Base and Length of the Rx Descriptor Ring */ for (i = 0, que = sc->rx_queues; i < sc->num_rx_queues; i++, que++) { struct rx_ring *rxr = &que->rxr; - u64 rdba = rxr->rx_paddr; + u64 rdba = rxr->rx_paddr; j = rxr->me; @@ -745,10 +791,10 @@ ixgbe_initialize_receive_units(if_ctx_t ctx) } if (sc->hw.mac.type != ixgbe_mac_82598EB) { - u32 psrtype = IXGBE_PSRTYPE_TCPHDR - | IXGBE_PSRTYPE_UDPHDR - | IXGBE_PSRTYPE_IPV4HDR - | IXGBE_PSRTYPE_IPV6HDR; + u32 psrtype = IXGBE_PSRTYPE_TCPHDR | + IXGBE_PSRTYPE_UDPHDR | + IXGBE_PSRTYPE_IPV4HDR | + IXGBE_PSRTYPE_IPV6HDR; IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype); } @@ -778,9 +824,9 @@ ixgbe_initialize_receive_units(if_ctx_t ctx) static void ixgbe_initialize_transmit_units(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); - struct ixgbe_hw *hw = &sc->hw; - if_softc_ctx_t scctx = sc->shared; + struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_hw *hw = &sc->hw; + if_softc_ctx_t scctx = sc->shared; struct ix_tx_queue *que; int i; @@ -821,7 +867,8 @@ ixgbe_initialize_transmit_units(if_ctx_t ctx) txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(j)); break; default: - txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(j)); + txctrl = + IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(j)); break; } txctrl &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; @@ -830,7 +877,8 @@ ixgbe_initialize_transmit_units(if_ctx_t ctx) IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(j), txctrl); break; default: - IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(j), txctrl); + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(j), + txctrl); break; } @@ -875,12 +923,12 @@ ixgbe_register(device_t dev) static int ixgbe_if_attach_pre(if_ctx_t ctx) { - struct ixgbe_softc *sc; - device_t dev; - if_softc_ctx_t scctx; + struct ixgbe_softc *sc; + device_t dev; + if_softc_ctx_t scctx; struct ixgbe_hw *hw; - int error = 0; - u32 ctrl_ext; + int error = 0; + u32 ctrl_ext; size_t i; INIT_DEBUGOUT("ixgbe_attach: begin"); @@ -922,8 +970,10 @@ ixgbe_if_attach_pre(if_ctx_t ctx) goto err_pci; } - if (hw->mac.ops.fw_recovery_mode && hw->mac.ops.fw_recovery_mode(hw)) { - device_printf(dev, "Firmware recovery mode detected. Limiting " + if (hw->mac.ops.fw_recovery_mode && + hw->mac.ops.fw_recovery_mode(hw)) { + device_printf(dev, + "Firmware recovery mode detected. Limiting " "functionality.\nRefer to the Intel(R) Ethernet Adapters " "and Devices User Guide for details on firmware recovery " "mode."); @@ -990,7 +1040,12 @@ ixgbe_if_attach_pre(if_ctx_t ctx) error = ixgbe_start_hw(hw); switch (error) { case IXGBE_ERR_EEPROM_VERSION: - device_printf(dev, "This device is a pre-production adapter/LOM. Please be aware there may be issues associated with your hardware.\nIf you are experiencing problems please contact your Intel or hardware representative who provided you with this hardware.\n"); + device_printf(dev, + "This device is a pre-production adapter/LOM. Please be" + " aware there may be issues associated with your" + " hardware.\nIf you are experiencing problems please" + " contact your Intel or hardware representative who" + " provided you with this hardware.\n"); break; case IXGBE_ERR_SFP_NOT_SUPPORTED: device_printf(dev, "Unsupported SFP+ Module\n"); @@ -1072,15 +1127,14 @@ static int ixgbe_if_attach_post(if_ctx_t ctx) { device_t dev; - struct ixgbe_softc *sc; + struct ixgbe_softc *sc; struct ixgbe_hw *hw; - int error = 0; + int error = 0; dev = iflib_get_dev(ctx); sc = iflib_get_softc(ctx); hw = &sc->hw; - if (sc->intr_type == IFLIB_INTR_LEGACY && (sc->feat_cap & IXGBE_FEATURE_LEGACY_IRQ) == 0) { device_printf(dev, "Device does not support legacy interrupts"); @@ -1089,10 +1143,11 @@ ixgbe_if_attach_post(if_ctx_t ctx) } /* Allocate multicast array memory. */ - sc->mta = malloc(sizeof(*sc->mta) * - MAX_NUM_MULTICAST_ADDRESSES, M_IXGBE, M_NOWAIT); + sc->mta = malloc(sizeof(*sc->mta) * MAX_NUM_MULTICAST_ADDRESSES, + M_IXGBE, M_NOWAIT); if (sc->mta == NULL) { - device_printf(dev, "Can not allocate multicast setup array\n"); + device_printf(dev, + "Can not allocate multicast setup array\n"); error = ENOMEM; goto err; } @@ -1172,7 +1227,7 @@ static void ixgbe_check_wol_support(struct ixgbe_softc *sc) { struct ixgbe_hw *hw = &sc->hw; - u16 dev_caps = 0; + u16 dev_caps = 0; /* Find out WoL support for port */ sc->wol_support = hw->wol_enabled = 0; @@ -1196,7 +1251,7 @@ ixgbe_check_wol_support(struct ixgbe_softc *sc) static int ixgbe_setup_interface(if_ctx_t ctx) { - if_t ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); struct ixgbe_softc *sc = iflib_get_softc(ctx); INIT_DEBUGOUT("ixgbe_setup_interface: begin"); @@ -1222,7 +1277,7 @@ static uint64_t ixgbe_if_get_counter(if_ctx_t ctx, ift_counter cnt) { struct ixgbe_softc *sc = iflib_get_softc(ctx); - if_t ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); switch (cnt) { case IFCOUNTER_IPACKETS: @@ -1256,10 +1311,9 @@ ixgbe_if_get_counter(if_ctx_t ctx, ift_counter cnt) static int ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); - struct ixgbe_hw *hw = &sc->hw; - int i; - + struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_hw *hw = &sc->hw; + int i; if (hw->phy.ops.read_i2c_byte == NULL) return (ENXIO); @@ -1269,7 +1323,8 @@ ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req) return (0); } /* ixgbe_if_i2c_req */ -/* ixgbe_if_needs_restart - Tell iflib when the driver needs to be reinitialized +/* ixgbe_if_needs_restart - Tell iflib when the driver needs to be + * reinitialized * @ctx: iflib context * @event: event code to check * @@ -1293,10 +1348,10 @@ ixgbe_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event) static void ixgbe_add_media_types(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); struct ixgbe_hw *hw = &sc->hw; - device_t dev = iflib_get_dev(ctx); - u64 layer; + device_t dev = iflib_get_dev(ctx); + u64 layer; layer = sc->phy_layer = ixgbe_get_supported_physical_layer(hw); @@ -1416,10 +1471,10 @@ ixgbe_is_sfp(struct ixgbe_hw *hw) static void ixgbe_config_link(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); struct ixgbe_hw *hw = &sc->hw; - u32 autoneg, err = 0; - bool sfp, negotiate; + u32 autoneg, err = 0; + bool sfp, negotiate; sfp = ixgbe_is_sfp(hw); @@ -1480,11 +1535,11 @@ ixgbe_config_link(if_ctx_t ctx) static void ixgbe_update_stats_counters(struct ixgbe_softc *sc) { - struct ixgbe_hw *hw = &sc->hw; + struct ixgbe_hw *hw = &sc->hw; struct ixgbe_hw_stats *stats = &sc->stats.pf; - u32 missed_rx = 0, bprc, lxon, lxoff, total; - u32 lxoffrxc; - u64 total_missed_rx = 0; + u32 missed_rx = 0, bprc, lxon, lxoff, total; + u32 lxoffrxc; + u64 total_missed_rx = 0; stats->crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS); stats->illerrc += IXGBE_READ_REG(hw, IXGBE_ILLERRC); @@ -1612,8 +1667,8 @@ ixgbe_update_stats_counters(struct ixgbe_softc *sc) * - jabber count. */ IXGBE_SET_IERRORS(sc, stats->crcerrs + stats->illerrc + - stats->mpc[0] + stats->rlec + stats->ruc + stats->rfc + stats->roc + - stats->rjc); + stats->mpc[0] + stats->rlec + stats->ruc + stats->rfc + + stats->roc + stats->rjc); } /* ixgbe_update_stats_counters */ /************************************************************************ @@ -1624,19 +1679,19 @@ ixgbe_update_stats_counters(struct ixgbe_softc *sc) static void ixgbe_add_hw_stats(struct ixgbe_softc *sc) { - device_t dev = iflib_get_dev(sc->ctx); - struct ix_rx_queue *rx_que; - struct ix_tx_queue *tx_que; + device_t dev = iflib_get_dev(sc->ctx); + struct ix_rx_queue *rx_que; + struct ix_tx_queue *tx_que; struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev); - struct sysctl_oid *tree = device_get_sysctl_tree(dev); + struct sysctl_oid *tree = device_get_sysctl_tree(dev); struct sysctl_oid_list *child = SYSCTL_CHILDREN(tree); - struct ixgbe_hw_stats *stats = &sc->stats.pf; - struct sysctl_oid *stat_node, *queue_node; + struct ixgbe_hw_stats *stats = &sc->stats.pf; + struct sysctl_oid *stat_node, *queue_node; struct sysctl_oid_list *stat_list, *queue_list; - int i; + int i; #define QUEUE_NAME_LEN 32 - char namebuf[QUEUE_NAME_LEN]; + char namebuf[QUEUE_NAME_LEN]; /* Driver Statistics */ SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "dropped", @@ -1646,7 +1701,8 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "link_irq", CTLFLAG_RD, &sc->link_irq, "Link MSI-X IRQ Handled"); - for (i = 0, tx_que = sc->tx_queues; i < sc->num_tx_queues; i++, tx_que++) { + for (i = 0, tx_que = sc->tx_queues; i < sc->num_tx_queues; + i++, tx_que++) { 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, @@ -1655,10 +1711,12 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", CTLTYPE_UINT | CTLFLAG_RD, txr, 0, - ixgbe_sysctl_tdh_handler, "IU", "Transmit Descriptor Head"); + ixgbe_sysctl_tdh_handler, "IU", + "Transmit Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", CTLTYPE_UINT | CTLFLAG_RD, txr, 0, - ixgbe_sysctl_tdt_handler, "IU", "Transmit Descriptor Tail"); + ixgbe_sysctl_tdt_handler, "IU", + "Transmit Descriptor Tail"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tso_tx", CTLFLAG_RD, &txr->tso_tx, "TSO"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tx_packets", @@ -1666,7 +1724,8 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) "Queue Packets Transmitted"); } - for (i = 0, rx_que = sc->rx_queues; i < sc->num_rx_queues; i++, rx_que++) { + for (i = 0, rx_que = sc->rx_queues; i < sc->num_rx_queues; *** 2199 LINES SKIPPED *** From nobody Wed Nov 27 00:29:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XygKt0dsPz5fFxs; Wed, 27 Nov 2024 00:29:06 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XygKs5H3fz4V6j; Wed, 27 Nov 2024 00:29:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AjgVEZ7g2UXHY84yGOwOKuu4+7PDEjYh32lDpqm2QJ4=; b=OW4kELUdkvcJ0Np2ENDlgE6t9PW4Tm7zEhkm0lASlyg5VnRkQCsor0LnWLla/wiA2Lt6Im es8p2rIptPkS25fYkzxH5q8q11FWI3zMtHq53CHs+Uy36CJl5rCWSANkahAZmCCYrrcCYv yoUw1HsTiytSXaekG/6QFrtXJ8/9HzZGy/IVQfgaNmAqos8QKM/g46qH/S6lG5Lyt0MNyv Slk58gItJNL6fJheImA4kFOL++GwJ5xfQxB2nN+BknR/jRgm1ZY33Xo5YKrlfDF+ZLkHVj Ui1SON6B2yBfOcv1hFOHA7SYCRdaN9bXyT8FWm4ihMBC11hF7PsHAPUHVTmahg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AjgVEZ7g2UXHY84yGOwOKuu4+7PDEjYh32lDpqm2QJ4=; b=iTqhZLJQZ22EwOzlv9xKn55ZLy3lcVwFP+clL26Ml3EOAaaLH+S17auJUFfw2d5n1W5D23 wmCLEdItPyZ4sE2aY7116PPC42RFG/m6te4MqnIk2cWIndVZGuvmg8A4F1y+Vz/BlaWDZB H7zkrNP9i4dE0oW1BKkCp+4l/xeDK0vIgABm4V4LB5ktQ4kG8Lpj4AdBYLTGjSE9M1PK5e ikgHftaP9eBcrDZJ04mgAuikLWa7BpSVgQMSr00ZFgtGeLvenoiZSvlzywoP8qsgkhMDUR SAP6bInjovy3nDkZuyaSVewpAy1RqzzvEOk5cYVsBSqZGIrWAs439E01r9/X/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732667345; a=rsa-sha256; cv=none; b=F5i1YJrQQWBoSq0aZoK+8I3LIsuPfKcg2uUV5SgueXUsvjj3wdaKw3FB3OQGMf4/4D+Pfz nmyrJxppuqZN3xmzV7As4umyOsty9bYlvfPLEQ8QPAptC86h+YMu5A17Qj0YU4TJZAVVWp MXqM6hxVYq8xv08lnT/3IZxPnwQjZKCWlsCbrSrT2et1bBkhS3m+jU+IlKiDMmT4CEU1po QIvjvMpfp0v+RZ8Y01aXOu2K9JVcwUubjHKMfR05DHQ2whZkFT6IZgW3LHLuBBoiDRqgoB 2udezBXXL7iR5njwqsOk811I8n4CwZBiLrvH0DN5W2LGjiwjinp6inMYIs2Fpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XygKs4vBkznDS; Wed, 27 Nov 2024 00:29:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR0T515063973; Wed, 27 Nov 2024 00:29:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR0T5UI063970; Wed, 27 Nov 2024 00:29:05 GMT (envelope-from git) Date: Wed, 27 Nov 2024 00:29:05 GMT Message-Id: <202411270029.4AR0T5UI063970@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: cb9c9b0c35a0 - stable/14 - igc: Style pass igc_txrx List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cb9c9b0c35a03915d235dfd4d1232db857a267ae Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=cb9c9b0c35a03915d235dfd4d1232db857a267ae commit cb9c9b0c35a03915d235dfd4d1232db857a267ae Author: Kevin Bowling AuthorDate: 2024-11-24 07:27:12 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 00:28:21 +0000 igc: Style pass igc_txrx Fix up indentation and reflow long lines. Sponsored by: BBOX.io (cherry picked from commit c7fb7b5d9fcd1fc67794228820aa54df388d47b4) --- sys/dev/igc/igc_txrx.c | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/sys/dev/igc/igc_txrx.c b/sys/dev/igc/igc_txrx.c index 59f4725388ee..92ba81c79c58 100644 --- a/sys/dev/igc/igc_txrx.c +++ b/sys/dev/igc/igc_txrx.c @@ -97,15 +97,19 @@ igc_dump_rs(struct igc_softc *sc) cur = txr->tx_rsq[rs_cidx]; status = txr->tx_base[cur].upper.fields.status; if (!(status & IGC_TXD_STAT_DD)) - printf("qid[%d]->tx_rsq[%d]: %d clear ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[%d]: %d clear ", + qid, rs_cidx, cur); } else { rs_cidx = (rs_cidx-1)&(ntxd-1); cur = txr->tx_rsq[rs_cidx]; - printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", + qid, rs_cidx, cur); } - printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, txr->tx_rs_pidx); + printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, + txr->tx_rs_pidx); for (i = 0; i < ntxd; i++) { - if (txr->tx_base[i].upper.fields.status & IGC_TXD_STAT_DD) + if (txr->tx_base[i].upper.fields.status & + IGC_TXD_STAT_DD) printf("%d set ", i); } printf("\n"); @@ -138,14 +142,15 @@ igc_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, break; default: panic("%s: CSUM_TSO but no supported IP version (0x%04x)", - __func__, ntohs(pi->ipi_etype)); + __func__, ntohs(pi->ipi_etype)); break; } TXD = (struct igc_adv_tx_context_desc *) &txr->tx_base[pi->ipi_pidx]; /* This is used in the transmit desc in encap */ - paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - pi->ipi_tcp_hlen; + paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - + pi->ipi_tcp_hlen; /* VLAN MACLEN IPLEN */ if (pi->ipi_mflags & M_VLANTAG) { @@ -180,8 +185,8 @@ igc_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, * **********************************************************************/ static int -igc_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, - uint32_t *olinfo_status) +igc_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, + uint32_t *cmd_type_len, uint32_t *olinfo_status) { struct igc_adv_tx_context_desc *TXD; uint32_t vlan_macip_lens, type_tucmd_mlhl; @@ -275,7 +280,7 @@ igc_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = olinfo_status = 0; /* Basic descriptor defines */ cmd_type_len = (IGC_ADVTXD_DTYP_DATA | - IGC_ADVTXD_DCMD_IFCS | IGC_ADVTXD_DCMD_DEXT); + IGC_ADVTXD_DCMD_IFCS | IGC_ADVTXD_DCMD_DEXT); if (pi->ipi_mflags & M_VLANTAG) cmd_type_len |= IGC_ADVTXD_DCMD_VLE; @@ -324,9 +329,9 @@ igc_isc_txd_encap(void *arg, if_pkt_info_t pi) static void igc_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx) { - struct igc_softc *sc = arg; - struct igc_tx_queue *que = &sc->tx_queues[txqid]; - struct tx_ring *txr = &que->txr; + struct igc_softc *sc = arg; + struct igc_tx_queue *que = &sc->tx_queues[txqid]; + struct tx_ring *txr = &que->txr; IGC_WRITE_REG(&sc->hw, IGC_TDT(txr->me), pidx); } @@ -370,12 +375,13 @@ igc_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) MPASS(delta > 0); processed += delta; - prev = cur; + prev = cur; rs_cidx = (rs_cidx + 1) & (ntxd-1); - if (rs_cidx == txr->tx_rs_pidx) + if (rs_cidx == txr->tx_rs_pidx) break; cur = txr->tx_rsq[rs_cidx]; - status = ((union igc_adv_tx_desc *)&txr->tx_base[cur])->wb.status; + status = + ((union igc_adv_tx_desc *)&txr->tx_base[cur])->wb.status; } while ((status & IGC_TXD_STAT_DD)); txr->tx_rs_cidx = rs_cidx; @@ -411,7 +417,8 @@ igc_isc_rxd_refill(void *arg, if_rxd_update_t iru) } static void -igc_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx) +igc_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, + qidx_t pidx) { struct igc_softc *sc = arg; struct igc_rx_queue *que = &sc->rx_queues[rxqid]; @@ -477,7 +484,8 @@ igc_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) MPASS ((staterr & IGC_RXD_STAT_DD) != 0); len = le16toh(rxd->wb.upper.length); - ptype = le32toh(rxd->wb.lower.lo_dword.data) & IGC_PKTTYPE_MASK; + ptype = + le32toh(rxd->wb.lower.lo_dword.data) & IGC_PKTTYPE_MASK; ri->iri_len += len; rxr->rx_bytes += ri->iri_len; @@ -558,7 +566,8 @@ igc_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype) (ptype & IGC_RXDADV_PKTTYPE_SCTP) != 0)) { ri->iri_csum_flags |= CSUM_SCTP_VALID; } else { - ri->iri_csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + ri->iri_csum_flags |= + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; ri->iri_csum_data = htons(0xffff); } } From nobody Wed Nov 27 00:29:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XygKv2JrPz5fFxx; Wed, 27 Nov 2024 00:29:07 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XygKt6P3tz4V9L; Wed, 27 Nov 2024 00:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FsBA+68lNCASgdsjiEuaiVQpBNMJA0TP6y7cDAMW0f4=; b=IN6RM8B62D0QBAUpjNW9NioE/amlQl7UHrpuAzBC2ItGy0kQszoofaM+n+mlnbCUQ7e9eM EmlLcLLQHwEimFvaOMJ2Nu4T45g4YFfwlicmqfmHCW6k+iAfrL43KmxV35bz0aeiPcSlhl sdlO9OhJcyVZ4pIFyV8klXgAl76FJ7RJFGmWsZGgty4QKbpHF7buhfuZUCyGakq+rwa6r4 OvVTKt+QpR3erlT4jRQt+TSyBTVJRkzn2AjjOx7Fow+5nRs8F40tESw6y5adMFdpbw4hRR PcIP/Asf6+8RElbKsDTaUfI9HxkbLeLu5yi4YWeb/3sp+K0C7fW0bOBRV0A35w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FsBA+68lNCASgdsjiEuaiVQpBNMJA0TP6y7cDAMW0f4=; b=LYpu7mvNlIwltWRuKzaPjiOnQk16q4xAWO38tN9A5PXx89wUwewFgUcrD+gieDE73J2Fqa br1DPTNVTUev2XP5ccGGohXSqWynJUdsp+9Jb7ootGYHvjPVKD/BxgyO9dnVrLNmTV4bU4 FaSS52v8mG1AsNqJ/yetemtvpoz4Ffakp3meTUV2Fxb0yTiG918nbwze6MCyWiGbrRnau5 un4gWzgVJMWTtrKIGqoprsp/HzfMOF1iO8TP2Q8cY5MwxaALZelH54U4vOA7H6FoBuo7Wr Ovst0LUjxNsU7TqXf2xpRZe80WfT9oiTzq1XROfI9a+ukfi1unqVpTVUbCEEWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732667346; a=rsa-sha256; cv=none; b=cWOQ5LCFMork92de3aU7nTzYb9FxszYNjmocBlL0BcOXo5WVkk159xwMjD63hOmg4f7fZT YC9/pL7y8qZdVIXyNx3MZ1hS/m2Y5onEcpGhh8CfcQS7FDHUZBSOgUZ8uNmnjMnBKGlZ5E wcNIw4BCYyWSS57XqcbtjmKE++2O0RMfJ7EXTw5PNV7bcZACh974wRspGccRQ2usv+2ECX R/OUuBkFl5pHA2wXUOvueTrTNUYzAtZA/474uHd+z+Kzq2ONTw+RN3m3LTM65s4D91PE+w WhjEpY6vjPMam0XihSldMtCWK7bIPhABWUZke8S6gYp7JEDmbHC//pr+uu616Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XygKt5vf3zmxK; Wed, 27 Nov 2024 00:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR0T6XL064040; Wed, 27 Nov 2024 00:29:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR0T65w064037; Wed, 27 Nov 2024 00:29:06 GMT (envelope-from git) Date: Wed, 27 Nov 2024 00:29:06 GMT Message-Id: <202411270029.4AR0T65w064037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: e9d4e7077489 - stable/14 - e1000: Style txrx List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e9d4e7077489c5b345187bd1678db29543e4611c Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=e9d4e7077489c5b345187bd1678db29543e4611c commit e9d4e7077489c5b345187bd1678db29543e4611c Author: Kevin Bowling AuthorDate: 2024-11-24 07:39:43 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 00:28:32 +0000 e1000: Style txrx Fix up indentation and reflow long lines. Sponsored by: BBOX.io (cherry picked from commit 7390daf87c53073da5e74b2d73ac7320c1a44475) --- sys/dev/e1000/em_txrx.c | 55 ++++++++++++++++++++++++++++++------------------ sys/dev/e1000/if_em.c | 3 ++- sys/dev/e1000/igb_txrx.c | 44 ++++++++++++++++++++++---------------- 3 files changed, 62 insertions(+), 40 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index 65ffcdfd67f6..edbe0f8ab546 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -108,16 +108,19 @@ em_dump_rs(struct e1000_softc *sc) cur = txr->tx_rsq[rs_cidx]; status = txr->tx_base[cur].upper.fields.status; if (!(status & E1000_TXD_STAT_DD)) - printf("qid[%d]->tx_rsq[%d]: %d clear ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[%d]: %d clear ", + qid, rs_cidx, cur); } else { rs_cidx = (rs_cidx-1)&(ntxd-1); cur = txr->tx_rsq[rs_cidx]; - printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", + qid, rs_cidx, cur); } printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, txr->tx_rs_pidx); for (i = 0; i < ntxd; i++) { - if (txr->tx_base[i].upper.fields.status & E1000_TXD_STAT_DD) + if (txr->tx_base[i].upper.fields.status & + E1000_TXD_STAT_DD) printf("%d set ", i); } printf("\n"); @@ -143,8 +146,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen + pi->ipi_tcp_hlen; *txd_lower = (E1000_TXD_CMD_DEXT | /* Extended descr type */ - E1000_TXD_DTYP_D | /* Data descr type */ - E1000_TXD_CMD_TSE); /* Do TSE on this packet */ + E1000_TXD_DTYP_D | /* Data descr type */ + E1000_TXD_CMD_TSE); /* Do TSE on this packet */ cur = pi->ipi_pidx; TXD = (struct e1000_context_desc *)&txr->tx_base[cur]; @@ -157,7 +160,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, switch(pi->ipi_etype) { case ETHERTYPE_IP: /* IP and/or TCP header checksum calculation and insertion. */ - *txd_upper = (E1000_TXD_POPTS_IXSM | E1000_TXD_POPTS_TXSM) << 8; + *txd_upper = + (E1000_TXD_POPTS_IXSM | E1000_TXD_POPTS_TXSM) << 8; TXD->lower_setup.ip_fields.ipcse = htole16(pi->ipi_ehdrlen + pi->ipi_ip_hlen - 1); @@ -183,7 +187,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, TXD->upper_setup.tcp_fields.tucss = pi->ipi_ehdrlen + pi->ipi_ip_hlen; TXD->upper_setup.tcp_fields.tucse = 0; TXD->upper_setup.tcp_fields.tucso = - pi->ipi_ehdrlen + pi->ipi_ip_hlen + offsetof(struct tcphdr, th_sum); + pi->ipi_ehdrlen + pi->ipi_ip_hlen + + offsetof(struct tcphdr, th_sum); /* * Payload size per packet w/o any headers. @@ -211,8 +216,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, if (++cur == scctx->isc_ntxd[0]) { cur = 0; } - DPRINTF(iflib_get_dev(sc->ctx), "%s: pidx: %d cur: %d\n", __FUNCTION__, - pi->ipi_pidx, cur); + DPRINTF(iflib_get_dev(sc->ctx), "%s: pidx: %d cur: %d\n", + __FUNCTION__, pi->ipi_pidx, cur); return (cur); } @@ -277,8 +282,8 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, * ipcse - End offset for header checksum calculation. * ipcso - Offset of place to put the checksum. * - * We set ipcsX values regardless of IP version to work around HW issues - * and ipcse must be 0 for IPv6 per "PCIe GbE SDM 2.5" page 61. + * We set ipcsX values regardless of IP version to work around HW + * issues and ipcse must be 0 for IPv6 per "PCIe GbE SDM 2.5" page 61. * IXSM controls whether it's inserted. */ TXD->lower_setup.ip_fields.ipcss = pi->ipi_ehdrlen; @@ -296,7 +301,8 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, * tucse - End offset for payload checksum calculation. * tucso - Offset of place to put the checksum. */ - if (csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_IP6_TCP | CSUM_IP6_UDP)) { + if (csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_IP6_TCP | + CSUM_IP6_UDP)) { uint8_t tucso; *txd_upper |= E1000_TXD_POPTS_TXSM << 8; @@ -326,7 +332,8 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, cur = 0; } DPRINTF(iflib_get_dev(sc->ctx), - "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x hdr_len=%d cmd=%x\n", + "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x" + " hdr_len=%d cmd=%x\n", csum_flags, *txd_upper, *txd_lower, hdr_len, cmd); return (cur); } @@ -372,7 +379,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) i = em_tso_setup(sc, pi, &txd_upper, &txd_lower); tso_desc = true; } else if (csum_flags & EM_CSUM_OFFLOAD) { - i = em_transmit_checksum_setup(sc, pi, &txd_upper, &txd_lower); + i = em_transmit_checksum_setup(sc, pi, &txd_upper, + &txd_lower); } if (pi->ipi_mflags & M_VLANTAG) { @@ -414,7 +422,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) /* Now make the sentinel */ ctxd = &txr->tx_base[i]; ctxd->buffer_addr = htole64(seg_addr + seg_len); - ctxd->lower.data = htole32(cmd | txd_lower | TSO_WORKAROUND); + ctxd->lower.data = + htole32(cmd | txd_lower | TSO_WORKAROUND); ctxd->upper.data = htole32(txd_upper); pidx_last = i; if (++i == scctx->isc_ntxd[0]) @@ -429,7 +438,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = i; if (++i == scctx->isc_ntxd[0]) i = 0; - DPRINTF(iflib_get_dev(sc->ctx), "pidx_last=%d i=%d ntxd[0]=%d\n", + DPRINTF(iflib_get_dev(sc->ctx), + "pidx_last=%d i=%d ntxd[0]=%d\n", pidx_last, i, scctx->isc_ntxd[0]); } } @@ -449,7 +459,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) } ctxd->lower.data |= htole32(E1000_TXD_CMD_EOP | txd_flags); DPRINTF(iflib_get_dev(sc->ctx), - "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", first, pidx_last, i); + "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", + first, pidx_last, i); pi->ipi_new_pidx = i; /* Sent data accounting for AIM */ @@ -508,8 +519,8 @@ em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) delta += ntxd; MPASS(delta > 0); DPRINTF(iflib_get_dev(sc->ctx), - "%s: cidx_processed=%u cur=%u clear=%d delta=%d\n", - __FUNCTION__, prev, cur, clear, delta); + "%s: cidx_processed=%u cur=%u clear=%d delta=%d\n", + __FUNCTION__, prev, cur, clear, delta); processed += delta; prev = cur; @@ -699,7 +710,8 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) if (scctx->isc_capenable & IFCAP_VLAN_HWTAGGING && status & E1000_RXD_STAT_VP) { - ri->iri_vtag = le16toh(rxd->special & E1000_RXD_SPC_VLAN_MASK); + ri->iri_vtag = + le16toh(rxd->special & E1000_RXD_SPC_VLAN_MASK); ri->iri_flags |= M_VLANTAG; } @@ -789,7 +801,8 @@ em_receive_checksum(uint16_t status, uint8_t errors, if_rxd_info_t ri) return; /* If there is a layer 3 or 4 error we are done */ - if (__predict_false(errors & (E1000_RXD_ERR_IPE | E1000_RXD_ERR_TCPE))) + if (__predict_false(errors & (E1000_RXD_ERR_IPE | + E1000_RXD_ERR_TCPE))) return; /* IP Checksum Good */ diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index c258b23b9d8d..22078d12bf51 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -3156,7 +3156,8 @@ em_reset(if_ctx_t ctx) * response (Rx) to Ethernet PAUSE frames. * - High water mark should allow for at least two frames to be * received after sending an XOFF. - * - Low water mark works best when it is very near the high water mark + * - Low water mark works best when it is very near the high water + mark. * This allows the receiver to restart by sending XON when it has * drained a bit. Here we use an arbitrary value of 1500 which will * restart after one full frame is pulled from the buffer. There diff --git a/sys/dev/e1000/igb_txrx.c b/sys/dev/e1000/igb_txrx.c index 8b663d7e6d3e..568d84807173 100644 --- a/sys/dev/e1000/igb_txrx.c +++ b/sys/dev/e1000/igb_txrx.c @@ -102,14 +102,15 @@ igb_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, break; default: panic("%s: CSUM_TSO but no supported IP version (0x%04x)", - __func__, ntohs(pi->ipi_etype)); + __func__, ntohs(pi->ipi_etype)); break; } - TXD = (struct e1000_adv_tx_context_desc *) &txr->tx_base[pi->ipi_pidx]; + TXD = (struct e1000_adv_tx_context_desc *)&txr->tx_base[pi->ipi_pidx]; /* This is used in the transmit desc in encap */ - paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - pi->ipi_tcp_hlen; + paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - + pi->ipi_tcp_hlen; /* VLAN MACLEN IPLEN */ if (pi->ipi_mflags & M_VLANTAG) { @@ -147,8 +148,8 @@ igb_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, * **********************************************************************/ static int -igb_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, - uint32_t *olinfo_status) +igb_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, + uint32_t *cmd_type_len, uint32_t *olinfo_status) { struct e1000_adv_tx_context_desc *TXD; struct e1000_softc *sc = txr->sc; @@ -164,7 +165,7 @@ igb_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, *olinfo_status |= pi->ipi_len << E1000_ADVTXD_PAYLEN_SHIFT; /* Now ready a context descriptor */ - TXD = (struct e1000_adv_tx_context_desc *) &txr->tx_base[pi->ipi_pidx]; + TXD = (struct e1000_adv_tx_context_desc *)&txr->tx_base[pi->ipi_pidx]; /* ** In advanced descriptors the vlan tag must @@ -246,8 +247,8 @@ igb_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = olinfo_status = 0; /* Basic descriptor defines */ - cmd_type_len = (E1000_ADVTXD_DTYP_DATA | - E1000_ADVTXD_DCMD_IFCS | E1000_ADVTXD_DCMD_DEXT); + cmd_type_len = (E1000_ADVTXD_DTYP_DATA | E1000_ADVTXD_DCMD_IFCS | + E1000_ADVTXD_DCMD_DEXT); if (pi->ipi_mflags & M_VLANTAG) cmd_type_len |= E1000_ADVTXD_DCMD_VLE; @@ -300,9 +301,9 @@ igb_isc_txd_encap(void *arg, if_pkt_info_t pi) static void igb_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx) { - struct e1000_softc *sc = arg; - struct em_tx_queue *que = &sc->tx_queues[txqid]; - struct tx_ring *txr = &que->txr; + struct e1000_softc *sc = arg; + struct em_tx_queue *que = &sc->tx_queues[txqid]; + struct tx_ring *txr = &que->txr; E1000_WRITE_REG(&sc->hw, E1000_TDT(txr->me), pidx); } @@ -351,7 +352,8 @@ igb_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) if (rs_cidx == txr->tx_rs_pidx) break; cur = txr->tx_rsq[rs_cidx]; - status = ((union e1000_adv_tx_desc *)&txr->tx_base[cur])->wb.status; + status = ((union e1000_adv_tx_desc *) + &txr->tx_base[cur])->wb.status; } while ((status & E1000_TXD_STAT_DD)); txr->tx_rs_cidx = rs_cidx; @@ -387,7 +389,8 @@ igb_isc_rxd_refill(void *arg, if_rxd_update_t iru) } static void -igb_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx) +igb_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, + qidx_t pidx) { struct e1000_softc *sc = arg; struct em_rx_queue *que = &sc->rx_queues[rxqid]; @@ -453,7 +456,8 @@ igb_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) MPASS ((staterr & E1000_RXD_STAT_DD) != 0); len = le16toh(rxd->wb.upper.length); - ptype = le32toh(rxd->wb.lower.lo_dword.data) & IGB_PKTTYPE_MASK; + ptype = + le32toh(rxd->wb.lower.lo_dword.data) & IGB_PKTTYPE_MASK; ri->iri_len += len; rxr->rx_bytes += ri->iri_len; @@ -462,7 +466,8 @@ igb_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) eop = ((staterr & E1000_RXD_STAT_EOP) == E1000_RXD_STAT_EOP); /* Make sure bad packets are discarded */ - if (eop && ((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) != 0)) { + if (eop && + ((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) != 0)) { sc->dropped_pkts++; ++rxr->rx_discarded; return (EBADMSG); @@ -524,7 +529,8 @@ igb_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype) return; /* If there is a layer 3 or 4 error we are done */ - if (__predict_false(errors & (E1000_RXD_ERR_IPE | E1000_RXD_ERR_TCPE))) + if (__predict_false(errors & + (E1000_RXD_ERR_IPE | E1000_RXD_ERR_TCPE))) return; /* IP Checksum Good */ @@ -535,11 +541,13 @@ igb_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype) if (__predict_true(status & (E1000_RXD_STAT_TCPCS | E1000_RXD_STAT_UDPCS))) { /* SCTP header present */ - if (__predict_false((ptype & E1000_RXDADV_PKTTYPE_ETQF) == 0 && + if (__predict_false( + (ptype & E1000_RXDADV_PKTTYPE_ETQF) == 0 && (ptype & E1000_RXDADV_PKTTYPE_SCTP) != 0)) { ri->iri_csum_flags |= CSUM_SCTP_VALID; } else { - ri->iri_csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + ri->iri_csum_flags |= + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; ri->iri_csum_data = htons(0xffff); } } From nobody Wed Nov 27 00:29:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XygKw2FX8z5fFsK; Wed, 27 Nov 2024 00:29:08 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XygKw1DqYz4V9T; Wed, 27 Nov 2024 00:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y9NRyOQEgyQh8BsbCj8u2F+N1drK/Moec2GjGVAygU0=; b=ITPTznRz44SMceErjlOFjzrkKnOk6NLkHKRamf+WVt6e4O67iotF2ZwF3e6krusKWfDO02 BcyIwIE466VRd/LkOZlZpNZWy4LPAKiKg5DU6JTLyJu0GkZuyZEeGysxPJnLemwE58NYEv CVqd4GPwRPVNg4fNsuXAQ6MLfhYpb9zqKoMBpu2sdcV3owEt7/Xa+hBRhwZq4OlP6Tratx LkS/DEQ3+6afdT4yGAzD1KZ5QTrHIxiSN0S4h9a0UCtyHHXrskRSnLeoNdg9+G728sVLSB 1kMizgtcgJwYhxHgFPEeZJ52NTxdVuFlGu4Qw+CVmN+UNEaY0qay6fJzFReyDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732667348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y9NRyOQEgyQh8BsbCj8u2F+N1drK/Moec2GjGVAygU0=; b=B6GXQ0TkAiKlcdZTJawqdzTkX2H9rBSuR/TUf6zbjcItOLFBze/CW71bTbIOTKjNC2Qxr1 IgZT5SCwwdfMfIlkpzNS3z43zHj3pyMXsNvXRxoSd2gSRRghENq418Iky0lwBcncBdHgjN r0DgwA9UUgjOwfS8AIFWUtLGLqg1KF0Enp8yRVmHBKU/pBRcimyLTXCC4JbDGB7Xw9CFuF S4uxaLm0PqURQu9qROQQ1mol6o+5E6+VA3bHFRB0pfFrJwPBYXMQNOw+8A8XB/2pGw1gJs aXxnymZyTXXze1SKiOlwqk+rcqgObfyEKVql/G5pueBdkUusDyXmSQq/vpN7Vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732667348; a=rsa-sha256; cv=none; b=cKrLATQDU9A3wWjslEgs20mV/GI1f5YEJGmSoctRmSidqyAaoMZzGJBUiDqYbSIaSRD/FC gx92D85wKyzg3nVX65B9OaUd3NfSeqG9XVJURbOPCEd6GE9gGioBnp4XDITHekCX7zSBDA D3wPhIane1l5zT6dKkWKGwGc4TiJE+uRg0qpFQtyskJmVtTNhEtTKkvb5dINm2RJhL+IhN bIZ6twhAlocMl16BgtrHv2gsSg/W9wk4kFgFxrX0F/NSN7XzIcFUgPUPkFmlZmxw0RKZYj R/soIgfQH8NB7Fp6ViBTCq724chdBHMcCDb4S7Rys9BWRV5tm/jSbC+PxO68bA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XygKv6c6XzmjM; Wed, 27 Nov 2024 00:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR0T7nx064089; Wed, 27 Nov 2024 00:29:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR0T7Kf064086; Wed, 27 Nov 2024 00:29:07 GMT (envelope-from git) Date: Wed, 27 Nov 2024 00:29:07 GMT Message-Id: <202411270029.4AR0T7Kf064086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 9b7f8ee3a1a6 - stable/14 - igc: disable hw.igc.sbp List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9b7f8ee3a1a6e216092d735f54878d41bf323c18 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=9b7f8ee3a1a6e216092d735f54878d41bf323c18 commit 9b7f8ee3a1a6e216092d735f54878d41bf323c18 Author: Kevin Bowling AuthorDate: 2024-11-24 21:08:54 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 00:28:44 +0000 igc: disable hw.igc.sbp Similar to 548d8a131d536d5f in e1000, disable this by default. Sponsored by: BBOX.io (cherry picked from commit e80419da6cef3fb6ea1902bd9a250ca21072a42c) --- sys/dev/igc/if_igc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 5356a6e87a5b..154c25a5a624 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -252,7 +252,7 @@ SYSCTL_INT(_hw_igc, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, 0, "Set to true to leave smart power down enabled on newer adapters"); /* Controls whether promiscuous also shows bad packets */ -static int igc_debug_sbp = true; +static int igc_debug_sbp = false; SYSCTL_INT(_hw_igc, OID_AUTO, sbp, CTLFLAG_RDTUN, &igc_debug_sbp, 0, "Show bad packets in promiscuous mode"); @@ -1351,7 +1351,7 @@ igc_if_multi_set(if_ctx_t ctx) if_getflags(ifp) & IFF_ALLMULTI) { reg_rctl |= IGC_RCTL_MPE; reg_rctl &= ~IGC_RCTL_UPE; - } else + } else reg_rctl &= ~(IGC_RCTL_UPE | IGC_RCTL_MPE); if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) From nobody Wed Nov 27 01:16:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyhNM6cjFz5fJPf; Wed, 27 Nov 2024 01:16:19 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyhNM63vsz4b0x; Wed, 27 Nov 2024 01:16:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732670179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gjunk7IWpRRVMjfwNOSvh+rr1Zvntt/Wf8oJyLwWYBo=; b=eEldMbqTCOkfXA+VMPnQRoszwplWBcXksv3j7DzdVtTV13zYpPFPt0I5BHgyAkHUGg9+XU r2ppUy8pDWPY6jH0HcKhAbMK3lYgZBcksqjogUlZxciSLqK/KTbcdknJ0g3bLw/oAJnfFv waVBZVcvnIytqBQ45ROWy5WfpJWH3CL9ySgKCLrEfoUZ6d/78UiYweHAnKG5ZB9EoJPU6c YK2NaWucL9bnjZ+Nt3/Hgf/XkTjtzTJyce6cPjR/r0YpnisikWCYy4EcOSD2hwdnWvEgdY 9C3/9+nueRv9YM7IjYTlTjj+7lh9t0KqFgT6f60m65P/98xL7lb1Sv5Ee+w7OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732670179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gjunk7IWpRRVMjfwNOSvh+rr1Zvntt/Wf8oJyLwWYBo=; b=w39ZpUE75YcmsxK4/6dpcTM+ycluTC2xqBkoby4DRPzQh64UvOYND/s/1ysMwOf2UI6m3h 5kKtqyYh2pjmH++ByJV52RjrI2NSaaXI02UPJC0eGvmatSEw1kukx8cYnUAghPEq0SXfvY jOzAi3/MDSOUJ/TyeFKa7s2Zj5syqkAbMX3dN6jCBs4PG54oAKymdgXrtlmdXsHfsZ9J86 Psb3WgRyBTfSMy2b8FDVFoi7xLLUeXG3I+PrOOIrVCkWLxeP9l/c+8G7pQ4J9056hmzjkr Q/YgWeqsnWr49Tm3JLdSM9R1JltWgYw1zgq9O7g+oZcA0KNkhVfbKfFRtZ64jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732670179; a=rsa-sha256; cv=none; b=dwhQ4VGdKzFp4oiEcImLNTHHu7dCFU/nHdUb5dRxwexH+TboOmBfWH1jWkDPN3TI0/mdnA XoJKagP+bxRCKuyxyh5duvLr8UdVj7xZRNH5M/DNzcoxH0/U8zsVIL9HDynFsO35zmfe0x cDHWIQiyYwIkJ30Sq0Whfbs0eP+oNq0jUtFk7jKI+9SESBuF+RFMdA2jF1T0m4wiL7XvlV FKNCUi15NhMS9oU89N2zwTjrNgs6zIlDeC3E+gN0C8O5D8XX2UZgVtm3e9Wf9JJKcgPRGQ FKbwbC4cSbUR97vGa2HknuxJjNC8rBCflUXThdJ0HbGW3yvUR5Un1QfEP9QEIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyhNM5XplzpSK; Wed, 27 Nov 2024 01:16:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR1GJTX055755; Wed, 27 Nov 2024 01:16:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR1GJs3055752; Wed, 27 Nov 2024 01:16:19 GMT (envelope-from git) Date: Wed, 27 Nov 2024 01:16:19 GMT Message-Id: <202411270116.4AR1GJs3055752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 708106fb8086 - stable/14 - rtld: implement _dl_iterate_phdr_locked List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 708106fb8086e85afa4a9aed3872a329c702797b Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=708106fb8086e85afa4a9aed3872a329c702797b commit 708106fb8086e85afa4a9aed3872a329c702797b Author: Kyle Evans AuthorDate: 2024-11-14 01:33:59 +0000 Commit: Kyle Evans CommitDate: 2024-11-27 01:15:56 +0000 rtld: implement _dl_iterate_phdr_locked Some sanitizers need to be able to use dl_iterate_phdr() after stopping the rest of the process, but it's very hard to do so reliably as a non-participant in the main logic of the program. Introduce _dl_iterate_phdr_locked to bypass the locking that's normally required for dl_iterate_phdr() and slap some scary warning on it. It will remain undocumented and probably shouldn't be used for anything else. Reviewed by: kib (cherry picked from commit 1426fd6cff0603f0ee275b99f2ba35dc36f3d0c2) --- lib/libc/gen/Symbol.map | 1 + lib/libc/gen/dlfcn.c | 24 ++++++++++++++++++++---- libexec/rtld-elf/Symbol.map | 1 + libexec/rtld-elf/rtld.c | 24 ++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 8e4a26df8f08..5178ce56da33 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -469,6 +469,7 @@ FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; + _dl_iterate_phdr_locked; _pthread_atfork; _pthread_attr_destroy; _pthread_attr_getdetachstate; diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index b30cb82e5e43..b814fdc845c4 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -203,9 +203,10 @@ dl_init_phdr_info(void) } #endif -#pragma weak dl_iterate_phdr +#pragma weak _dl_iterate_phdr_locked int -dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, +_dl_iterate_phdr_locked( + int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, void *data __unused) { #if defined IN_LIBDL @@ -227,14 +228,29 @@ dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, _once(&dl_phdr_info_once, dl_init_phdr_info); ti.ti_module = 1; ti.ti_offset = 0; - mutex_lock(&dl_phdr_info_lock); phdr_info.dlpi_tls_data = __tls_get_addr(&ti); ret = callback(&phdr_info, sizeof(phdr_info), data); - mutex_unlock(&dl_phdr_info_lock); return (ret); #endif } +#pragma weak dl_iterate_phdr +int +dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, + void *data __unused) +{ + int error; + +#if !defined(IN_LIBDL) && !defined(PIC) + mutex_lock(&dl_phdr_info_lock); +#endif + error = _dl_iterate_phdr_locked(callback, data); +#if !defined(IN_LIBDL) && !defined(PIC) + mutex_unlock(&dl_phdr_info_lock); +#endif + return (error); +} + #pragma weak fdlopen void * fdlopen(int fd __unused, int mode __unused) diff --git a/libexec/rtld-elf/Symbol.map b/libexec/rtld-elf/Symbol.map index 3cdbb30d04a0..9e9e702a1261 100644 --- a/libexec/rtld-elf/Symbol.map +++ b/libexec/rtld-elf/Symbol.map @@ -27,6 +27,7 @@ FBSD_1.8 { }; FBSDprivate_1.0 { + _dl_iterate_phdr_locked; _rtld_thread_init; _rtld_allocate_tls; _rtld_free_tls; diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 32d0b879c5bc..e1813217a854 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -253,6 +253,7 @@ int dladdr(const void *, Dl_info *) __exported; void dllockinit(void *, void *(*)(void *), void (*)(void *), void (*)(void *), void (*)(void *), void (*)(void *), void (*)(void *)) __exported; int dlinfo(void *, int , void *) __exported; +int _dl_iterate_phdr_locked(__dl_iterate_hdr_callback, void *) __exported; int dl_iterate_phdr(__dl_iterate_hdr_callback, void *) __exported; int _rtld_addr_phdr(const void *, struct dl_phdr_info *) __exported; int _rtld_get_stack_prot(void) __exported; @@ -4208,6 +4209,29 @@ rtld_fill_dl_phdr_info(const Obj_Entry *obj, struct dl_phdr_info *phdr_info) phdr_info->dlpi_subs = obj_loads - obj_count; } +/* + * It's completely UB to actually use this, so extreme caution is advised. It's + * probably not what you want. + */ +int +_dl_iterate_phdr_locked(__dl_iterate_hdr_callback callback, void *param) +{ + struct dl_phdr_info phdr_info; + Obj_Entry *obj; + int error; + + for (obj = globallist_curr(TAILQ_FIRST(&obj_list)); obj != NULL; + obj = globallist_next(obj)) { + rtld_fill_dl_phdr_info(obj, &phdr_info); + error = callback(&phdr_info, sizeof(phdr_info), param); + if (error != 0) + return (error); + } + + rtld_fill_dl_phdr_info(&obj_rtld, &phdr_info); + return (callback(&phdr_info, sizeof(phdr_info), param)); +} + int dl_iterate_phdr(__dl_iterate_hdr_callback callback, void *param) { From nobody Wed Nov 27 01:16:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyhNP1J82z5fJCf; Wed, 27 Nov 2024 01:16:21 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyhNN6f2Bz4Zxl; Wed, 27 Nov 2024 01:16:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732670180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qDCYK35IpVePP+0eqJirSFxnVyzhgcfaTNeJQB8RLTw=; b=vvQSwF89Xs8cLcAs9jB6XOzSKtfKi8Ycl9hxQ1kOIQJHbNqUy7+HvnzOAGk8N081eQZ5js BSeI5FeBmUdv4yeJDUuR4UrvS6x31y6LKfHHC72shLNYFvkaL4pF+qFVeQ6ErZnQfwIOaQ 781QcPF1tIcVTDCvVJCY87rcgKt7yoE17knNg2LVRZ4s/HlfE7pZjUJMaRFuVbKnbHDRAm y2VKsTnp6n9V9XM7GCq3Qiu1UTDvbIHvT+WyiqOvGk2DeYTdnmsMbWrkkgHEreHnFw205h Rpk8MzNYxxnIVqAsVqbIAChm5//P6xP751baPyDnxC+TI26XUMPn2NYaYastIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732670180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qDCYK35IpVePP+0eqJirSFxnVyzhgcfaTNeJQB8RLTw=; b=YBZgeo387rtcYygZTf978NmGbvUOOY6pbu5NWiUenoU+VrGAPJsmbaTs3VsO62mWoVIFk2 nIaJM1P1nY220xblj3Ssqrcv6mOlaJg+wnPuzTLHjmuo2btpk4PzoExpaoQseZSY3GL0kR 7+lyJaHVgxKPm1y/UIQPwU9s0gOErTXDN4Cw5SL+K6WEUEOyZIjgH7vjvH0k/L8K4vcJwr U6Xx3c6978ya+jS5LvaPHBcq9c/xeU+u4aJvLUDGZ/kA7Me4oT+walHe0zyDL9hwc7WzOS dG0W0xnQvOaxNQGutiAPR/rBLgmvNENNiUgQgpIfAekkEtJqKqquLSJv9u4aPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732670180; a=rsa-sha256; cv=none; b=tSog8SbFOt2vsqiMZbAyuH/fi5tkYDiS+Wv428IWEW/x7Z3Hs9w23F3km6sCdEWjB7pWc0 TpTWpD7hTcOUwvZ8SI17O9HRHQTwPSJtiQQfZScYfKf0wOwuwINYBM6a0TXYw7XEpQSc/L H3q9VGonUEvxYLwT2PpQRQPlunPuvt7qtagt/iqeVdpteNBN8zC4povx0RMF0ZuRoUdjIX Mqa2ebqcQmB1Knyk4E7eqjJWAoaFTMxtE92nZfRfH/P80bylo9fS1HYiaT+pD00QqHXKg6 3FDnfA7fTPskRdeSb81M30M/v8C/Aj0wCb7ThimdgaKsxHlH3q21AX8SQIVaCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyhNN6GDBzpDR; Wed, 27 Nov 2024 01:16:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR1GKpt055799; Wed, 27 Nov 2024 01:16:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR1GKFt055796; Wed, 27 Nov 2024 01:16:20 GMT (envelope-from git) Date: Wed, 27 Nov 2024 01:16:20 GMT Message-Id: <202411270116.4AR1GKFt055796@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: ed4b2d159459 - stable/14 - _dl_iterate_phdr_locked(): fix libc and libdl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ed4b2d159459350e1f4160f72961bd0f3a40ea10 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ed4b2d159459350e1f4160f72961bd0f3a40ea10 commit ed4b2d159459350e1f4160f72961bd0f3a40ea10 Author: Konstantin Belousov AuthorDate: 2024-11-14 03:54:24 +0000 Commit: Kyle Evans CommitDate: 2024-11-27 01:15:56 +0000 _dl_iterate_phdr_locked(): fix libc and libdl Add prototype. Export from libdl. Fixes: 1426fd6cff0603f0ee275b99f2ba35dc36f3d0c2 Reviewed by: kevans Sponsored by: The FreeBSD Foundation (cherry picked from commit 209fd89a2810419309944f10d11834321f0ebb25) --- lib/libc/gen/dlfcn.c | 2 ++ lib/libdl/Symbol.map | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index b814fdc845c4..bffee3952e0d 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -204,6 +204,8 @@ dl_init_phdr_info(void) #endif #pragma weak _dl_iterate_phdr_locked +int _dl_iterate_phdr_locked(int (*callback)(struct dl_phdr_info *, + size_t, void *), void *data); int _dl_iterate_phdr_locked( int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, diff --git a/lib/libdl/Symbol.map b/lib/libdl/Symbol.map index dd9a8252e4a3..f0e03c4940ce 100644 --- a/lib/libdl/Symbol.map +++ b/lib/libdl/Symbol.map @@ -22,3 +22,7 @@ FBSD_1.8 { rtld_get_var; rtld_set_var; }; + +FBSDprivate_1.0 { + _dl_iterate_phdr_locked; +}; From nobody Wed Nov 27 02:14:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyjgL0JY8z5fMmW; Wed, 27 Nov 2024 02:14:22 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyjgL02gtz4ffW; Wed, 27 Nov 2024 02:14:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aoJ70FC6FvtdENdG/Vh8k2IrnEXp2/xrULNypd6Ze+0=; b=kjCg5Rkf8JV88cF00NrGtXzOVpjiL+bUceJ2ZibPOLGeoQFGJwy/3TSw+cl0sfjqJIY4es 5pUoFJ/1djkVjs/Bh/dUNyjPn7lA2dBRUYU0Jdl6HjKmFZ7B9ikabtoJL/abA/N1pdypgn 7yw7042IslWbbDVAkBWQ4lzOwoZd8Yb+l4xfbgW2eRUotbn2Cba/gQbjQwK4mgbC0AMF2v qZIa+1Jgwx2kEFoyX/ODRtMSWbaG69KvIb13btu67xa8LigTgfy74z5WfvbewAWl6WfW0r /DKjLPUHx+ilZc2lLCLR2FKtMrxDwUIpFFi8oMNUfCEHT6/rW6k03NlUMfApIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aoJ70FC6FvtdENdG/Vh8k2IrnEXp2/xrULNypd6Ze+0=; b=jcIP5BpoMEL/7WXNHFft4st5KZdh3FaFs7lsQWQchGH28jd+ZoMSUSJ7aNfKGx0ypWlu1b gC1yTwXLjWmZdmhogEja7FVpWMngvSmp2StJLry9vnf1vKBSWIYh/EEFWx8ujJDO3an73/ /g4YBf59rvwXx0sONYl2GNdAEY0xgk2diJeDIFCOSN//qGysAXrc68DVrjh21P1uooJGeb 7HZfx15m2Up83G6Ke0fCm4CkJXG6jyrFL7qCpTZBgOACKg38YwC63Umits3MgE19R7+JAc 7v1rEST8Eu2LX8RtAOD0M+PvVvFag+gVK80eKOmejjaImZ0LoDjq6HATU7xZPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732673662; a=rsa-sha256; cv=none; b=iPmaQwfeJpNIppLeQ7fCv93iq1+rezK0OT7C1kejWgU9eGCPJPvye4EASgiG9hQsMkQy1a FrPnF6q+CIuhySx9oIHnWS8BbLRYJO0LDVFLSWV38LNYPvC1EpjM/MjRpoWHkNinpX6MTG HefP8XUUIHd1+4ukZ96DCKRWxxBcD2iEMs8Vgu29l4GH16k0WPg6GUpE6+M2gP0V8Fk67l ZsHUsRMKg8vfsvA1kWH4Y7/7TiQPlA+TwwbIUCREs+dR1d2/8/OG+r0EXQpRe3roH983eD 0e3VlFjnyJd90I9b17AsEUDiLEBSYa5e/3Hjcw5bC7IUlSKGYsSTaaB5mFuXng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyjgK6lRszqv0; Wed, 27 Nov 2024 02:14:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR2EL5g066613; Wed, 27 Nov 2024 02:14:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR2ELS3066610; Wed, 27 Nov 2024 02:14:21 GMT (envelope-from git) Date: Wed, 27 Nov 2024 02:14:21 GMT Message-Id: <202411270214.4AR2ELS3066610@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 381d9974e222 - stable/13 - igc: Normalize indentation a bit List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 381d9974e222bd3a58011ebe6fe4d90e66208b12 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=381d9974e222bd3a58011ebe6fe4d90e66208b12 commit 381d9974e222bd3a58011ebe6fe4d90e66208b12 Author: Kevin Bowling AuthorDate: 2024-11-24 03:17:27 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 00:30:40 +0000 igc: Normalize indentation a bit Sponsored by: BBOX.io (cherry picked from commit d1bb1a501118851b02a182afdd9dd1413e9f4ce0) --- sys/dev/igc/if_igc.c | 294 +++++++++++++++++++++++++-------------------------- 1 file changed, 147 insertions(+), 147 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 9ecb1d3fc44d..8d6258f9941e 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -633,7 +633,7 @@ igc_if_attach_pre(if_ctx_t ctx) /* Copy the permanent MAC address out of the EEPROM */ if (igc_read_mac_addr(hw) < 0) { device_printf(dev, "EEPROM read error while reading MAC" - " address\n"); + " address\n"); error = EIO; goto err_late; } @@ -773,7 +773,7 @@ igc_if_mtu_set(if_ctx_t ctx, uint32_t mtu) struct igc_softc *sc = iflib_get_softc(ctx); if_softc_ctx_t scctx = iflib_get_softc_ctx(ctx); - IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); + IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); /* 9K Jumbo Frame size */ max_frame_size = 9234; @@ -1171,13 +1171,13 @@ igc_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) break; case 100: ifmr->ifm_active |= IFM_100_TX; - break; + break; case 1000: ifmr->ifm_active |= IFM_1000_T; break; case 2500: - ifmr->ifm_active |= IFM_2500_T; - break; + ifmr->ifm_active |= IFM_2500_T; + break; } if (sc->link_duplex == FULL_DUPLEX) @@ -1211,9 +1211,9 @@ igc_if_media_change(if_ctx_t ctx) case IFM_AUTO: sc->hw.phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; break; - case IFM_2500_T: - sc->hw.phy.autoneg_advertised = ADVERTISE_2500_FULL; - break; + case IFM_2500_T: + sc->hw.phy.autoneg_advertised = ADVERTISE_2500_FULL; + break; case IFM_1000_T: sc->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL; break; @@ -1297,7 +1297,7 @@ igc_if_multi_set(if_ctx_t ctx) { struct igc_softc *sc = iflib_get_softc(ctx); struct ifnet *ifp = iflib_get_ifp(ctx); - u8 *mta; /* Multicast array memory */ + u8 *mta; /* Multicast array memory */ u32 reg_rctl = 0; int mcnt = 0; @@ -1316,8 +1316,8 @@ igc_if_multi_set(if_ctx_t ctx) if (igc_debug_sbp) reg_rctl |= IGC_RCTL_SBP; } else if (mcnt >= MAX_NUM_MULTICAST_ADDRESSES || - if_getflags(ifp) & IFF_ALLMULTI) { - reg_rctl |= IGC_RCTL_MPE; + if_getflags(ifp) & IFF_ALLMULTI) { + reg_rctl |= IGC_RCTL_MPE; reg_rctl &= ~IGC_RCTL_UPE; } else reg_rctl &= ~(IGC_RCTL_UPE | IGC_RCTL_MPE); @@ -1663,12 +1663,12 @@ igc_setup_msix(if_ctx_t ctx) static void igc_init_dmac(struct igc_softc *sc, u32 pba) { - device_t dev = sc->dev; + device_t dev = sc->dev; struct igc_hw *hw = &sc->hw; - u32 dmac, reg = ~IGC_DMACR_DMAC_EN; - u16 hwm; - u16 max_frame_size; - int status; + u32 dmac, reg = ~IGC_DMACR_DMAC_EN; + u16 hwm; + u16 max_frame_size; + int status; max_frame_size = sc->shared->isc_max_frame_size; @@ -2138,7 +2138,7 @@ igc_initialize_transmit_unit(if_ctx_t ctx) tctl = IGC_READ_REG(&sc->hw, IGC_TCTL); tctl &= ~IGC_TCTL_CT; tctl |= (IGC_TCTL_PSP | IGC_TCTL_RTLC | IGC_TCTL_EN | - (IGC_COLLISION_THRESHOLD << IGC_CT_SHIFT)); + (IGC_COLLISION_THRESHOLD << IGC_CT_SHIFT)); /* This write will effectively turn on the transmit unit. */ IGC_WRITE_REG(&sc->hw, IGC_TCTL, tctl); @@ -2649,17 +2649,17 @@ igc_add_hw_stats(struct igc_softc *sc) /* Driver Statistics */ SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "dropped", - CTLFLAG_RD, &sc->dropped_pkts, - "Driver dropped packets"); + CTLFLAG_RD, &sc->dropped_pkts, + "Driver dropped packets"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "link_irq", - CTLFLAG_RD, &sc->link_irq, - "Link MSI-X IRQ Handled"); + CTLFLAG_RD, &sc->link_irq, + "Link MSI-X IRQ Handled"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "rx_overruns", - CTLFLAG_RD, &sc->rx_overruns, - "RX overruns"); + CTLFLAG_RD, &sc->rx_overruns, + "RX overruns"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "watchdog_timeouts", - CTLFLAG_RD, &sc->watchdog_events, - "Watchdog timeouts"); + CTLFLAG_RD, &sc->watchdog_events, + "Watchdog timeouts"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "device_control", CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, IGC_CTRL, igc_sysctl_reg_handler, "IU", @@ -2669,11 +2669,11 @@ igc_add_hw_stats(struct igc_softc *sc) sc, IGC_RCTL, igc_sysctl_reg_handler, "IU", "Receiver Control Register"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_high_water", - CTLFLAG_RD, &sc->hw.fc.high_water, 0, - "Flow Control High Watermark"); + CTLFLAG_RD, &sc->hw.fc.high_water, 0, + "Flow Control High Watermark"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_low_water", - CTLFLAG_RD, &sc->hw.fc.low_water, 0, - "Flow Control Low Watermark"); + CTLFLAG_RD, &sc->hw.fc.low_water, 0, + "Flow Control Low Watermark"); for (int i = 0; i < sc->tx_num_queues; i++, tx_que++) { struct tx_ring *txr = &tx_que->txr; @@ -2695,8 +2695,8 @@ igc_add_hw_stats(struct igc_softc *sc) IGC_TDT(txr->me), igc_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"); + CTLFLAG_RD, &txr->tx_irq, + "Queue MSI-X Transmit Interrupts"); } for (int j = 0; j < sc->rx_num_queues; j++, rx_que++) { @@ -2708,8 +2708,8 @@ igc_add_hw_stats(struct igc_softc *sc) SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", CTLTYPE_UINT | CTLFLAG_RD, rx_que, - false, igc_sysctl_interrupt_rate_handler, "IU", - "Interrupt Rate"); + false, igc_sysctl_interrupt_rate_handler, "IU", + "Interrupt Rate"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, IGC_RDH(rxr->me), igc_sysctl_reg_handler, "IU", @@ -2719,8 +2719,8 @@ igc_add_hw_stats(struct igc_softc *sc) IGC_RDT(rxr->me), igc_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"); + CTLFLAG_RD, &rxr->rx_irq, + "Queue MSI-X Receive Interrupts"); } /* MAC stats get their own sub node */ @@ -2730,156 +2730,156 @@ igc_add_hw_stats(struct igc_softc *sc) stat_list = SYSCTL_CHILDREN(stat_node); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "excess_coll", - CTLFLAG_RD, &stats->ecol, - "Excessive collisions"); + CTLFLAG_RD, &stats->ecol, + "Excessive collisions"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "single_coll", - CTLFLAG_RD, &stats->scc, - "Single collisions"); + CTLFLAG_RD, &stats->scc, + "Single collisions"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "multiple_coll", - CTLFLAG_RD, &stats->mcc, - "Multiple collisions"); + CTLFLAG_RD, &stats->mcc, + "Multiple collisions"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "late_coll", - CTLFLAG_RD, &stats->latecol, - "Late collisions"); + CTLFLAG_RD, &stats->latecol, + "Late collisions"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "collision_count", - CTLFLAG_RD, &stats->colc, - "Collision Count"); + CTLFLAG_RD, &stats->colc, + "Collision Count"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "symbol_errors", - CTLFLAG_RD, &sc->stats.symerrs, - "Symbol Errors"); + CTLFLAG_RD, &sc->stats.symerrs, + "Symbol Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "sequence_errors", - CTLFLAG_RD, &sc->stats.sec, - "Sequence Errors"); + CTLFLAG_RD, &sc->stats.sec, + "Sequence Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "defer_count", - CTLFLAG_RD, &sc->stats.dc, - "Defer Count"); + CTLFLAG_RD, &sc->stats.dc, + "Defer Count"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets", - CTLFLAG_RD, &sc->stats.mpc, - "Missed Packets"); + CTLFLAG_RD, &sc->stats.mpc, + "Missed Packets"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_length_errors", - CTLFLAG_RD, &sc->stats.rlec, - "Receive Length Errors"); + CTLFLAG_RD, &sc->stats.rlec, + "Receive Length Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", - CTLFLAG_RD, &sc->stats.rnbc, - "Receive No Buffers"); + CTLFLAG_RD, &sc->stats.rnbc, + "Receive No Buffers"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_undersize", - CTLFLAG_RD, &sc->stats.ruc, - "Receive Undersize"); + CTLFLAG_RD, &sc->stats.ruc, + "Receive Undersize"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_fragmented", - CTLFLAG_RD, &sc->stats.rfc, - "Fragmented Packets Received "); + CTLFLAG_RD, &sc->stats.rfc, + "Fragmented Packets Received "); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_oversize", - CTLFLAG_RD, &sc->stats.roc, - "Oversized Packets Received"); + CTLFLAG_RD, &sc->stats.roc, + "Oversized Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_jabber", - CTLFLAG_RD, &sc->stats.rjc, - "Recevied Jabber"); + CTLFLAG_RD, &sc->stats.rjc, + "Recevied Jabber"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_errs", - CTLFLAG_RD, &sc->stats.rxerrc, - "Receive Errors"); + CTLFLAG_RD, &sc->stats.rxerrc, + "Receive Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "crc_errs", - CTLFLAG_RD, &sc->stats.crcerrs, - "CRC errors"); + CTLFLAG_RD, &sc->stats.crcerrs, + "CRC errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "alignment_errs", - CTLFLAG_RD, &sc->stats.algnerrc, - "Alignment Errors"); + CTLFLAG_RD, &sc->stats.algnerrc, + "Alignment Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_recvd", - CTLFLAG_RD, &sc->stats.xonrxc, - "XON Received"); + CTLFLAG_RD, &sc->stats.xonrxc, + "XON Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_txd", - CTLFLAG_RD, &sc->stats.xontxc, - "XON Transmitted"); + CTLFLAG_RD, &sc->stats.xontxc, + "XON Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_recvd", - CTLFLAG_RD, &sc->stats.xoffrxc, - "XOFF Received"); + CTLFLAG_RD, &sc->stats.xoffrxc, + "XOFF Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", - CTLFLAG_RD, &sc->stats.xofftxc, - "XOFF Transmitted"); + CTLFLAG_RD, &sc->stats.xofftxc, + "XOFF Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "unsupported_fc_recvd", - CTLFLAG_RD, &sc->stats.fcruc, - "Unsupported Flow Control Received"); + CTLFLAG_RD, &sc->stats.fcruc, + "Unsupported Flow Control Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_recvd", - CTLFLAG_RD, &sc->stats.mgprc, - "Management Packets Received"); + CTLFLAG_RD, &sc->stats.mgprc, + "Management Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_drop", - CTLFLAG_RD, &sc->stats.mgpdc, - "Management Packets Dropped"); + CTLFLAG_RD, &sc->stats.mgpdc, + "Management Packets Dropped"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_txd", - CTLFLAG_RD, &sc->stats.mgptc, - "Management Packets Transmitted"); + CTLFLAG_RD, &sc->stats.mgptc, + "Management Packets Transmitted"); /* Packet Reception Stats */ SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", - CTLFLAG_RD, &sc->stats.tpr, - "Total Packets Received "); + CTLFLAG_RD, &sc->stats.tpr, + "Total Packets Received "); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", - CTLFLAG_RD, &sc->stats.gprc, - "Good Packets Received"); + CTLFLAG_RD, &sc->stats.gprc, + "Good Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_recvd", - CTLFLAG_RD, &sc->stats.bprc, - "Broadcast Packets Received"); + CTLFLAG_RD, &sc->stats.bprc, + "Broadcast Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", - CTLFLAG_RD, &sc->stats.mprc, - "Multicast Packets Received"); + CTLFLAG_RD, &sc->stats.mprc, + "Multicast Packets Received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_64", - CTLFLAG_RD, &sc->stats.prc64, - "64 byte frames received "); + CTLFLAG_RD, &sc->stats.prc64, + "64 byte frames received "); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127", - CTLFLAG_RD, &sc->stats.prc127, - "65-127 byte frames received"); + CTLFLAG_RD, &sc->stats.prc127, + "65-127 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255", - CTLFLAG_RD, &sc->stats.prc255, - "128-255 byte frames received"); + CTLFLAG_RD, &sc->stats.prc255, + "128-255 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511", - CTLFLAG_RD, &sc->stats.prc511, - "256-511 byte frames received"); + CTLFLAG_RD, &sc->stats.prc511, + "256-511 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023", - CTLFLAG_RD, &sc->stats.prc1023, - "512-1023 byte frames received"); + CTLFLAG_RD, &sc->stats.prc1023, + "512-1023 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522", - CTLFLAG_RD, &sc->stats.prc1522, - "1023-1522 byte frames received"); + CTLFLAG_RD, &sc->stats.prc1522, + "1023-1522 byte frames received"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", - CTLFLAG_RD, &sc->stats.gorc, - "Good Octets Received"); + CTLFLAG_RD, &sc->stats.gorc, + "Good Octets Received"); /* Packet Transmission Stats */ SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_txd", - CTLFLAG_RD, &sc->stats.gotc, - "Good Octets Transmitted"); + CTLFLAG_RD, &sc->stats.gotc, + "Good Octets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_txd", - CTLFLAG_RD, &sc->stats.tpt, - "Total Packets Transmitted"); + CTLFLAG_RD, &sc->stats.tpt, + "Total Packets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", - CTLFLAG_RD, &sc->stats.gptc, - "Good Packets Transmitted"); + CTLFLAG_RD, &sc->stats.gptc, + "Good Packets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_txd", - CTLFLAG_RD, &sc->stats.bptc, - "Broadcast Packets Transmitted"); + CTLFLAG_RD, &sc->stats.bptc, + "Broadcast Packets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_txd", - CTLFLAG_RD, &sc->stats.mptc, - "Multicast Packets Transmitted"); + CTLFLAG_RD, &sc->stats.mptc, + "Multicast Packets Transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_64", - CTLFLAG_RD, &sc->stats.ptc64, - "64 byte frames transmitted "); + CTLFLAG_RD, &sc->stats.ptc64, + "64 byte frames transmitted "); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_65_127", - CTLFLAG_RD, &sc->stats.ptc127, - "65-127 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc127, + "65-127 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_128_255", - CTLFLAG_RD, &sc->stats.ptc255, - "128-255 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc255, + "128-255 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_256_511", - CTLFLAG_RD, &sc->stats.ptc511, - "256-511 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc511, + "256-511 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_512_1023", - CTLFLAG_RD, &sc->stats.ptc1023, - "512-1023 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc1023, + "512-1023 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_1024_1522", - CTLFLAG_RD, &sc->stats.ptc1522, - "1024-1522 byte frames transmitted"); + CTLFLAG_RD, &sc->stats.ptc1522, + "1024-1522 byte frames transmitted"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tso_txd", - CTLFLAG_RD, &sc->stats.tsctc, - "TSO Contexts Transmitted"); + CTLFLAG_RD, &sc->stats.tsctc, + "TSO Contexts Transmitted"); /* Interrupt Stats */ @@ -2888,12 +2888,12 @@ igc_add_hw_stats(struct igc_softc *sc) int_list = SYSCTL_CHILDREN(int_node); SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "asserts", - CTLFLAG_RD, &sc->stats.iac, - "Interrupt Assertion Count"); + CTLFLAG_RD, &sc->stats.iac, + "Interrupt Assertion Count"); SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_desc_min_thresh", - CTLFLAG_RD, &sc->stats.rxdmtc, - "Rx Desc Min Thresh Count"); + CTLFLAG_RD, &sc->stats.rxdmtc, + "Rx Desc Min Thresh Count"); } static void @@ -2914,21 +2914,21 @@ igc_sbuf_fw_version(struct igc_fw_version *fw_ver, struct sbuf *buf) if (fw_ver->eep_major || fw_ver->eep_minor || fw_ver->eep_build) { sbuf_printf(buf, "EEPROM V%d.%d-%d", fw_ver->eep_major, - fw_ver->eep_minor, fw_ver->eep_build); + fw_ver->eep_minor, fw_ver->eep_build); space = " "; } if (fw_ver->invm_major || fw_ver->invm_minor || fw_ver->invm_img_type) { sbuf_printf(buf, "%sNVM V%d.%d imgtype%d", - space, fw_ver->invm_major, fw_ver->invm_minor, - fw_ver->invm_img_type); + space, fw_ver->invm_major, fw_ver->invm_minor, + fw_ver->invm_img_type); space = " "; } if (fw_ver->or_valid) { sbuf_printf(buf, "%sOption ROM V%d-b%d-p%d", - space, fw_ver->or_major, fw_ver->or_build, - fw_ver->or_patch); + space, fw_ver->or_major, fw_ver->or_build, + fw_ver->or_patch); space = " "; } @@ -3086,7 +3086,7 @@ igc_set_flowcntl(SYSCTL_HANDLER_ARGS) { int error; static int input = 3; /* default is full */ - struct igc_softc *sc = (struct igc_softc *) arg1; + struct igc_softc *sc = (struct igc_softc *) arg1; error = sysctl_handle_int(oidp, &input, 0, req); @@ -3254,14 +3254,14 @@ igc_print_debug_info(struct igc_softc *sc) for (int i = 0; i < sc->tx_num_queues; i++, txr++) { device_printf(dev, "TX Queue %d ------\n", i); device_printf(dev, "hw tdh = %d, hw tdt = %d\n", - IGC_READ_REG(&sc->hw, IGC_TDH(i)), - IGC_READ_REG(&sc->hw, IGC_TDT(i))); + IGC_READ_REG(&sc->hw, IGC_TDH(i)), + IGC_READ_REG(&sc->hw, IGC_TDT(i))); } for (int j=0; j < sc->rx_num_queues; j++, rxr++) { device_printf(dev, "RX Queue %d ------\n", j); device_printf(dev, "hw rdh = %d, hw rdt = %d\n", - IGC_READ_REG(&sc->hw, IGC_RDH(j)), - IGC_READ_REG(&sc->hw, IGC_RDT(j))); + IGC_READ_REG(&sc->hw, IGC_RDH(j)), + IGC_READ_REG(&sc->hw, IGC_RDT(j))); } } From nobody Wed Nov 27 02:14:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyjgM3QxHz5fMmZ; Wed, 27 Nov 2024 02:14:23 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyjgM1JNmz4ftq; Wed, 27 Nov 2024 02:14:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dRgjvpff8vMBro3N02JxnEWv+NLFMgX09ufJy3wqcSo=; b=USyHqGeuRUA9yWzjNyYjyxyjqyDTj8hv+GSlebUZqKA8C2DAWrwVA+ZSWymxQhzlK5C0sl FEIYtlpXhyiI6p/m1r8wpX1GkuxvU9mqL4Af6MtF7EzxVPqtwqLhMrNAFPAInBTcGA1/Y0 2yZWYPStaPx4jDaU01IO16jqsKaMbOCMtGE6yuGmiVrjoAWaeSJthexdNhAOdlzi6QhH2O QDnQJrx2tE6NGVz1krQWPD6MmIUm+O4FeqpKi/pziKwg+LS4zTcWPHZMQl5f53rlw/YGVB FMRxzm+Es300rv7KGmt71z38YKn36MXYd6k2OJMKhIuAqRQafTEcMvPWCO99aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dRgjvpff8vMBro3N02JxnEWv+NLFMgX09ufJy3wqcSo=; b=MagI+8lLMC8lJDgeJ8wZj2DXTRpSZtQM/Fom3P8eXYXPfkX2QQyrXlbZJJl1Bo+K7YIsHR DvOqq/eRZ4Cz0TlfLB2bY0whWdHDdQ2FnOufbvZkJFthz+uSDsvmQfmzKk7o/zauFWieJS e1nZ+oxVFK+e4735Bpk0cYkqgMjhVWc+M3MI2Qk2troZ1RvSEmGkIGahzQINII3oX2jUWM VjjkAnXWeOiV2KDTdmjMeYSsAI/o01BLbyNrYOAtzhYLg1u0puur37ery5lLkT1jQIrKxs zIpN8OzwArVvKheYkzR2XAvCNEbu+gZhNZidEpQlcu+uJaqQcowe3Wf5J+tgHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732673663; a=rsa-sha256; cv=none; b=lRLYMzuBMk3oL3b2qeO5Iq36hNjl5sPmKHeRb0u9knrx3vou6vIK6ul5PWDuvT6FYlxT+t 0ARsFHi4RBI767/w5gFMkySp7T8HpWpQQ8oQQaT+6y59FBV6zIKee0Qh5sHTmW3DVCWRa6 8NBEgau8xN/omqtA5Ca4C47StDlP+NrqgzIMcUbYcvk2pHkLPHCZjDHkuctXQM85HQyIyV nFZ6Okryjt8E3nEOQmBqhEZ1DwBZRtACibiOFdgCmUf8c9tN77npWCO0opN8Lgk/s5II/F M1OWd83jiHRZfvuKg1lzV4R+YQ+BIlXqnTZvc10pKXU2JjyROzr1a+ofTiaLHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyjgM0mSbzq7X; Wed, 27 Nov 2024 02:14:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR2ENnY066659; Wed, 27 Nov 2024 02:14:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR2EMo4066656; Wed, 27 Nov 2024 02:14:22 GMT (envelope-from git) Date: Wed, 27 Nov 2024 02:14:22 GMT Message-Id: <202411270214.4AR2EMo4066656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 566e43249208 - stable/13 - e1000: Style pass on if_em List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 566e43249208785113a1050ad2a5cc3de8b01567 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=566e43249208785113a1050ad2a5cc3de8b01567 commit 566e43249208785113a1050ad2a5cc3de8b01567 Author: Kevin Bowling AuthorDate: 2024-11-24 05:45:52 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 00:35:41 +0000 e1000: Style pass on if_em Fix up some indentation and reflow long lines Sponsored by: BBOX.io (cherry picked from commit 6f14883066f10afc9e3e2af45c5b509586f9da9e) --- sys/dev/e1000/e1000_api.c | 4 +- sys/dev/e1000/e1000_hw.h | 4 +- sys/dev/e1000/if_em.c | 1059 +++++++++++++++++++++++++++------------------ 3 files changed, 630 insertions(+), 437 deletions(-) diff --git a/sys/dev/e1000/e1000_api.c b/sys/dev/e1000/e1000_api.c index b83ae0313c35..74db3f4d5272 100644 --- a/sys/dev/e1000/e1000_api.c +++ b/sys/dev/e1000/e1000_api.c @@ -338,12 +338,12 @@ s32 e1000_set_mac_type(struct e1000_hw *hw) case E1000_DEV_ID_PCH_ADL_I219_V16: case E1000_DEV_ID_PCH_ADL_I219_LM17: case E1000_DEV_ID_PCH_ADL_I219_V17: + case E1000_DEV_ID_PCH_ADL_I219_LM19: + case E1000_DEV_ID_PCH_ADL_I219_V19: mac->type = e1000_pch_adp; break; case E1000_DEV_ID_PCH_MTP_I219_LM18: case E1000_DEV_ID_PCH_MTP_I219_V18: - case E1000_DEV_ID_PCH_MTP_I219_LM19: - case E1000_DEV_ID_PCH_MTP_I219_V19: mac->type = e1000_pch_mtp; break; case E1000_DEV_ID_PCH_ARL_I219_LM24: diff --git a/sys/dev/e1000/e1000_hw.h b/sys/dev/e1000/e1000_hw.h index f17877f3e463..b4a9592cd89b 100644 --- a/sys/dev/e1000/e1000_hw.h +++ b/sys/dev/e1000/e1000_hw.h @@ -172,8 +172,8 @@ struct e1000_hw; #define E1000_DEV_ID_PCH_ADL_I219_V17 0x1A1D #define E1000_DEV_ID_PCH_MTP_I219_LM18 0x550A #define E1000_DEV_ID_PCH_MTP_I219_V18 0x550B -#define E1000_DEV_ID_PCH_MTP_I219_LM19 0x550C -#define E1000_DEV_ID_PCH_MTP_I219_V19 0x550D +#define E1000_DEV_ID_PCH_ADL_I219_LM19 0x550C +#define E1000_DEV_ID_PCH_ADL_I219_V19 0x550D #define E1000_DEV_ID_PCH_LNL_I219_LM20 0x550E #define E1000_DEV_ID_PCH_LNL_I219_V20 0x550F #define E1000_DEV_ID_PCH_LNL_I219_LM21 0x5510 diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 537faf046bca..b6710919a997 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -53,73 +53,129 @@ static const char igb_driver_version[] = "2.5.28-fbsd"; static const pci_vendor_info_t em_vendor_info_array[] = { /* Intel(R) - lem-class legacy devices */ - PVID(0x8086, E1000_DEV_ID_82540EM, "Intel(R) Legacy PRO/1000 MT 82540EM"), - PVID(0x8086, E1000_DEV_ID_82540EM_LOM, "Intel(R) Legacy PRO/1000 MT 82540EM (LOM)"), - PVID(0x8086, E1000_DEV_ID_82540EP, "Intel(R) Legacy PRO/1000 MT 82540EP"), - PVID(0x8086, E1000_DEV_ID_82540EP_LOM, "Intel(R) Legacy PRO/1000 MT 82540EP (LOM)"), - PVID(0x8086, E1000_DEV_ID_82540EP_LP, "Intel(R) Legacy PRO/1000 MT 82540EP (Mobile)"), - - PVID(0x8086, E1000_DEV_ID_82541EI, "Intel(R) Legacy PRO/1000 MT 82541EI (Copper)"), - PVID(0x8086, E1000_DEV_ID_82541ER, "Intel(R) Legacy PRO/1000 82541ER"), - PVID(0x8086, E1000_DEV_ID_82541ER_LOM, "Intel(R) Legacy PRO/1000 MT 82541ER"), - PVID(0x8086, E1000_DEV_ID_82541EI_MOBILE, "Intel(R) Legacy PRO/1000 MT 82541EI (Mobile)"), - PVID(0x8086, E1000_DEV_ID_82541GI, "Intel(R) Legacy PRO/1000 MT 82541GI"), - PVID(0x8086, E1000_DEV_ID_82541GI_LF, "Intel(R) Legacy PRO/1000 GT 82541PI"), - PVID(0x8086, E1000_DEV_ID_82541GI_MOBILE, "Intel(R) Legacy PRO/1000 MT 82541GI (Mobile)"), - - PVID(0x8086, E1000_DEV_ID_82542, "Intel(R) Legacy PRO/1000 82542 (Fiber)"), - - PVID(0x8086, E1000_DEV_ID_82543GC_FIBER, "Intel(R) Legacy PRO/1000 F 82543GC (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82543GC_COPPER, "Intel(R) Legacy PRO/1000 T 82543GC (Copper)"), - - PVID(0x8086, E1000_DEV_ID_82544EI_COPPER, "Intel(R) Legacy PRO/1000 XT 82544EI (Copper)"), - PVID(0x8086, E1000_DEV_ID_82544EI_FIBER, "Intel(R) Legacy PRO/1000 XF 82544EI (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82544GC_COPPER, "Intel(R) Legacy PRO/1000 T 82544GC (Copper)"), - PVID(0x8086, E1000_DEV_ID_82544GC_LOM, "Intel(R) Legacy PRO/1000 XT 82544GC (LOM)"), - - PVID(0x8086, E1000_DEV_ID_82545EM_COPPER, "Intel(R) Legacy PRO/1000 MT 82545EM (Copper)"), - PVID(0x8086, E1000_DEV_ID_82545EM_FIBER, "Intel(R) Legacy PRO/1000 MF 82545EM (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82545GM_COPPER, "Intel(R) Legacy PRO/1000 MT 82545GM (Copper)"), - PVID(0x8086, E1000_DEV_ID_82545GM_FIBER, "Intel(R) Legacy PRO/1000 MF 82545GM (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82545GM_SERDES, "Intel(R) Legacy PRO/1000 MB 82545GM (SERDES)"), - - PVID(0x8086, E1000_DEV_ID_82546EB_COPPER, "Intel(R) Legacy PRO/1000 MT 82546EB (Copper)"), - PVID(0x8086, E1000_DEV_ID_82546EB_FIBER, "Intel(R) Legacy PRO/1000 MF 82546EB (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82546EB_QUAD_COPPER, "Intel(R) Legacy PRO/1000 MT 82546EB (Quad Copper"), - PVID(0x8086, E1000_DEV_ID_82546GB_COPPER, "Intel(R) Legacy PRO/1000 MT 82546GB (Copper)"), - PVID(0x8086, E1000_DEV_ID_82546GB_FIBER, "Intel(R) Legacy PRO/1000 MF 82546GB (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82546GB_SERDES, "Intel(R) Legacy PRO/1000 MB 82546GB (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82546GB_PCIE, "Intel(R) Legacy PRO/1000 P 82546GB (PCIe)"), - PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER, "Intel(R) Legacy PRO/1000 GT 82546GB (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3, "Intel(R) Legacy PRO/1000 GT 82546GB (Quad Copper)"), - - PVID(0x8086, E1000_DEV_ID_82547EI, "Intel(R) Legacy PRO/1000 CT 82547EI"), - PVID(0x8086, E1000_DEV_ID_82547EI_MOBILE, "Intel(R) Legacy PRO/1000 CT 82547EI (Mobile)"), - PVID(0x8086, E1000_DEV_ID_82547GI, "Intel(R) Legacy PRO/1000 CT 82547GI"), + PVID(0x8086, E1000_DEV_ID_82540EM, + "Intel(R) Legacy PRO/1000 MT 82540EM"), + PVID(0x8086, E1000_DEV_ID_82540EM_LOM, + "Intel(R) Legacy PRO/1000 MT 82540EM (LOM)"), + PVID(0x8086, E1000_DEV_ID_82540EP, + "Intel(R) Legacy PRO/1000 MT 82540EP"), + PVID(0x8086, E1000_DEV_ID_82540EP_LOM, + "Intel(R) Legacy PRO/1000 MT 82540EP (LOM)"), + PVID(0x8086, E1000_DEV_ID_82540EP_LP, + "Intel(R) Legacy PRO/1000 MT 82540EP (Mobile)"), + + PVID(0x8086, E1000_DEV_ID_82541EI, + "Intel(R) Legacy PRO/1000 MT 82541EI (Copper)"), + PVID(0x8086, E1000_DEV_ID_82541ER, + "Intel(R) Legacy PRO/1000 82541ER"), + PVID(0x8086, E1000_DEV_ID_82541ER_LOM, + "Intel(R) Legacy PRO/1000 MT 82541ER"), + PVID(0x8086, E1000_DEV_ID_82541EI_MOBILE, + "Intel(R) Legacy PRO/1000 MT 82541EI (Mobile)"), + PVID(0x8086, E1000_DEV_ID_82541GI, + "Intel(R) Legacy PRO/1000 MT 82541GI"), + PVID(0x8086, E1000_DEV_ID_82541GI_LF, + "Intel(R) Legacy PRO/1000 GT 82541PI"), + PVID(0x8086, E1000_DEV_ID_82541GI_MOBILE, + "Intel(R) Legacy PRO/1000 MT 82541GI (Mobile)"), + + PVID(0x8086, E1000_DEV_ID_82542, + "Intel(R) Legacy PRO/1000 82542 (Fiber)"), + + PVID(0x8086, E1000_DEV_ID_82543GC_FIBER, + "Intel(R) Legacy PRO/1000 F 82543GC (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82543GC_COPPER, + "Intel(R) Legacy PRO/1000 T 82543GC (Copper)"), + + PVID(0x8086, E1000_DEV_ID_82544EI_COPPER, + "Intel(R) Legacy PRO/1000 XT 82544EI (Copper)"), + PVID(0x8086, E1000_DEV_ID_82544EI_FIBER, + "Intel(R) Legacy PRO/1000 XF 82544EI (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82544GC_COPPER, + "Intel(R) Legacy PRO/1000 T 82544GC (Copper)"), + PVID(0x8086, E1000_DEV_ID_82544GC_LOM, + "Intel(R) Legacy PRO/1000 XT 82544GC (LOM)"), + + PVID(0x8086, E1000_DEV_ID_82545EM_COPPER, + "Intel(R) Legacy PRO/1000 MT 82545EM (Copper)"), + PVID(0x8086, E1000_DEV_ID_82545EM_FIBER, + "Intel(R) Legacy PRO/1000 MF 82545EM (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82545GM_COPPER, + "Intel(R) Legacy PRO/1000 MT 82545GM (Copper)"), + PVID(0x8086, E1000_DEV_ID_82545GM_FIBER, + "Intel(R) Legacy PRO/1000 MF 82545GM (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82545GM_SERDES, + "Intel(R) Legacy PRO/1000 MB 82545GM (SERDES)"), + + PVID(0x8086, E1000_DEV_ID_82546EB_COPPER, + "Intel(R) Legacy PRO/1000 MT 82546EB (Copper)"), + PVID(0x8086, E1000_DEV_ID_82546EB_FIBER, + "Intel(R) Legacy PRO/1000 MF 82546EB (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82546EB_QUAD_COPPER, + "Intel(R) Legacy PRO/1000 MT 82546EB (Quad Copper"), + PVID(0x8086, E1000_DEV_ID_82546GB_COPPER, + "Intel(R) Legacy PRO/1000 MT 82546GB (Copper)"), + PVID(0x8086, E1000_DEV_ID_82546GB_FIBER, + "Intel(R) Legacy PRO/1000 MF 82546GB (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82546GB_SERDES, + "Intel(R) Legacy PRO/1000 MB 82546GB (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82546GB_PCIE, + "Intel(R) Legacy PRO/1000 P 82546GB (PCIe)"), + PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER, + "Intel(R) Legacy PRO/1000 GT 82546GB (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3, + "Intel(R) Legacy PRO/1000 GT 82546GB (Quad Copper)"), + + PVID(0x8086, E1000_DEV_ID_82547EI, + "Intel(R) Legacy PRO/1000 CT 82547EI"), + PVID(0x8086, E1000_DEV_ID_82547EI_MOBILE, + "Intel(R) Legacy PRO/1000 CT 82547EI (Mobile)"), + PVID(0x8086, E1000_DEV_ID_82547GI, + "Intel(R) Legacy PRO/1000 CT 82547GI"), /* Intel(R) - em-class devices */ - PVID(0x8086, E1000_DEV_ID_82571EB_COPPER, "Intel(R) PRO/1000 PT 82571EB/82571GB (Copper)"), - PVID(0x8086, E1000_DEV_ID_82571EB_FIBER, "Intel(R) PRO/1000 PF 82571EB/82571GB (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82571EB_SERDES, "Intel(R) PRO/1000 PB 82571EB (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82571EB_SERDES_DUAL, "Intel(R) PRO/1000 82571EB (Dual Mezzanine)"), - PVID(0x8086, E1000_DEV_ID_82571EB_SERDES_QUAD, "Intel(R) PRO/1000 82571EB (Quad Mezzanine)"), - PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER, "Intel(R) PRO/1000 PT 82571EB/82571GB (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER_LP, "Intel(R) PRO/1000 PT 82571EB/82571GB (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_FIBER, "Intel(R) PRO/1000 PF 82571EB (Quad Fiber)"), - PVID(0x8086, E1000_DEV_ID_82571PT_QUAD_COPPER, "Intel(R) PRO/1000 PT 82571PT (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82572EI, "Intel(R) PRO/1000 PT 82572EI (Copper)"), - PVID(0x8086, E1000_DEV_ID_82572EI_COPPER, "Intel(R) PRO/1000 PT 82572EI (Copper)"), - PVID(0x8086, E1000_DEV_ID_82572EI_FIBER, "Intel(R) PRO/1000 PF 82572EI (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82572EI_SERDES, "Intel(R) PRO/1000 82572EI (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82573E, "Intel(R) PRO/1000 82573E (Copper)"), - PVID(0x8086, E1000_DEV_ID_82573E_IAMT, "Intel(R) PRO/1000 82573E AMT (Copper)"), + PVID(0x8086, E1000_DEV_ID_82571EB_COPPER, + "Intel(R) PRO/1000 PT 82571EB/82571GB (Copper)"), + PVID(0x8086, E1000_DEV_ID_82571EB_FIBER, + "Intel(R) PRO/1000 PF 82571EB/82571GB (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82571EB_SERDES, + "Intel(R) PRO/1000 PB 82571EB (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82571EB_SERDES_DUAL, + "Intel(R) PRO/1000 82571EB (Dual Mezzanine)"), + PVID(0x8086, E1000_DEV_ID_82571EB_SERDES_QUAD, + "Intel(R) PRO/1000 82571EB (Quad Mezzanine)"), + PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER, + "Intel(R) PRO/1000 PT 82571EB/82571GB (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER_LP, + "Intel(R) PRO/1000 PT 82571EB/82571GB (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_FIBER, + "Intel(R) PRO/1000 PF 82571EB (Quad Fiber)"), + PVID(0x8086, E1000_DEV_ID_82571PT_QUAD_COPPER, + "Intel(R) PRO/1000 PT 82571PT (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82572EI, + "Intel(R) PRO/1000 PT 82572EI (Copper)"), + PVID(0x8086, E1000_DEV_ID_82572EI_COPPER, + "Intel(R) PRO/1000 PT 82572EI (Copper)"), + PVID(0x8086, E1000_DEV_ID_82572EI_FIBER, + "Intel(R) PRO/1000 PF 82572EI (Fiber)"), + PVID(0x8086, E1000_DEV_ID_82572EI_SERDES, + "Intel(R) PRO/1000 82572EI (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82573E, + "Intel(R) PRO/1000 82573E (Copper)"), + PVID(0x8086, E1000_DEV_ID_82573E_IAMT, + "Intel(R) PRO/1000 82573E AMT (Copper)"), PVID(0x8086, E1000_DEV_ID_82573L, "Intel(R) PRO/1000 82573L"), PVID(0x8086, E1000_DEV_ID_82583V, "Intel(R) 82583V"), - PVID(0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_SPT, "Intel(R) 80003ES2LAN (Copper)"), - PVID(0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_SPT, "Intel(R) 80003ES2LAN (SERDES)"), - PVID(0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_DPT, "Intel(R) 80003ES2LAN (Dual Copper)"), - PVID(0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_DPT, "Intel(R) 80003ES2LAN (Dual SERDES)"), - PVID(0x8086, E1000_DEV_ID_ICH8_IGP_M_AMT, "Intel(R) 82566MM ICH8 AMT (Mobile)"), + PVID(0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_SPT, + "Intel(R) 80003ES2LAN (Copper)"), + PVID(0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_SPT, + "Intel(R) 80003ES2LAN (SERDES)"), + PVID(0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_DPT, + "Intel(R) 80003ES2LAN (Dual Copper)"), + PVID(0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_DPT, + "Intel(R) 80003ES2LAN (Dual SERDES)"), + PVID(0x8086, E1000_DEV_ID_ICH8_IGP_M_AMT, + "Intel(R) 82566MM ICH8 AMT (Mobile)"), PVID(0x8086, E1000_DEV_ID_ICH8_IGP_AMT, "Intel(R) 82566DM ICH8 AMT"), PVID(0x8086, E1000_DEV_ID_ICH8_IGP_C, "Intel(R) 82566DC ICH8"), PVID(0x8086, E1000_DEV_ID_ICH8_IFE, "Intel(R) 82562V ICH8"), @@ -127,8 +183,10 @@ static const pci_vendor_info_t em_vendor_info_array[] = PVID(0x8086, E1000_DEV_ID_ICH8_IFE_G, "Intel(R) 82562G ICH8"), PVID(0x8086, E1000_DEV_ID_ICH8_IGP_M, "Intel(R) 82566MC ICH8"), PVID(0x8086, E1000_DEV_ID_ICH8_82567V_3, "Intel(R) 82567V-3 ICH8"), - PVID(0x8086, E1000_DEV_ID_ICH9_IGP_M_AMT, "Intel(R) 82567LM ICH9 AMT"), - PVID(0x8086, E1000_DEV_ID_ICH9_IGP_AMT, "Intel(R) 82566DM-2 ICH9 AMT"), + PVID(0x8086, E1000_DEV_ID_ICH9_IGP_M_AMT, + "Intel(R) 82567LM ICH9 AMT"), + PVID(0x8086, E1000_DEV_ID_ICH9_IGP_AMT, + "Intel(R) 82566DM-2 ICH9 AMT"), PVID(0x8086, E1000_DEV_ID_ICH9_IGP_C, "Intel(R) 82566DC-2 ICH9"), PVID(0x8086, E1000_DEV_ID_ICH9_IGP_M, "Intel(R) 82567LF ICH9"), PVID(0x8086, E1000_DEV_ID_ICH9_IGP_M_V, "Intel(R) 82567V ICH9"), @@ -152,7 +210,8 @@ static const pci_vendor_info_t em_vendor_info_array[] = PVID(0x8086, E1000_DEV_ID_PCH2_LV_V, "Intel(R) 82579V"), PVID(0x8086, E1000_DEV_ID_PCH_LPT_I217_LM, "Intel(R) I217-LM LPT"), PVID(0x8086, E1000_DEV_ID_PCH_LPT_I217_V, "Intel(R) I217-V LPT"), - PVID(0x8086, E1000_DEV_ID_PCH_LPTLP_I218_LM, "Intel(R) I218-LM LPTLP"), + PVID(0x8086, E1000_DEV_ID_PCH_LPTLP_I218_LM, + "Intel(R) I218-LM LPTLP"), PVID(0x8086, E1000_DEV_ID_PCH_LPTLP_I218_V, "Intel(R) I218-V LPTLP"), PVID(0x8086, E1000_DEV_ID_PCH_I218_LM2, "Intel(R) I218-LM (2)"), PVID(0x8086, E1000_DEV_ID_PCH_I218_V2, "Intel(R) I218-V (2)"), @@ -160,57 +219,102 @@ static const pci_vendor_info_t em_vendor_info_array[] = PVID(0x8086, E1000_DEV_ID_PCH_I218_V3, "Intel(R) I218-V (3)"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM, "Intel(R) I219-LM SPT"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V, "Intel(R) I219-V SPT"), - PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM2, "Intel(R) I219-LM SPT-H(2)"), - PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V2, "Intel(R) I219-V SPT-H(2)"), - PVID(0x8086, E1000_DEV_ID_PCH_LBG_I219_LM3, "Intel(R) I219-LM LBG(3)"), - PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM4, "Intel(R) I219-LM SPT(4)"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM2, + "Intel(R) I219-LM SPT-H(2)"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V2, + "Intel(R) I219-V SPT-H(2)"), + PVID(0x8086, E1000_DEV_ID_PCH_LBG_I219_LM3, + "Intel(R) I219-LM LBG(3)"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM4, + "Intel(R) I219-LM SPT(4)"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V4, "Intel(R) I219-V SPT(4)"), - PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM5, "Intel(R) I219-LM SPT(5)"), + PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_LM5, + "Intel(R) I219-LM SPT(5)"), PVID(0x8086, E1000_DEV_ID_PCH_SPT_I219_V5, "Intel(R) I219-V SPT(5)"), - PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_LM6, "Intel(R) I219-LM CNP(6)"), + PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_LM6, + "Intel(R) I219-LM CNP(6)"), PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_V6, "Intel(R) I219-V CNP(6)"), - PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_LM7, "Intel(R) I219-LM CNP(7)"), + PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_LM7, + "Intel(R) I219-LM CNP(7)"), PVID(0x8086, E1000_DEV_ID_PCH_CNP_I219_V7, "Intel(R) I219-V CNP(7)"), - PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM8, "Intel(R) I219-LM ICP(8)"), + PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM8, + "Intel(R) I219-LM ICP(8)"), PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_V8, "Intel(R) I219-V ICP(8)"), - PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM9, "Intel(R) I219-LM ICP(9)"), + PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_LM9, + "Intel(R) I219-LM ICP(9)"), PVID(0x8086, E1000_DEV_ID_PCH_ICP_I219_V9, "Intel(R) I219-V ICP(9)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM10, "Intel(R) I219-LM CMP(10)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V10, "Intel(R) I219-V CMP(10)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM11, "Intel(R) I219-LM CMP(11)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V11, "Intel(R) I219-V CMP(11)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM12, "Intel(R) I219-LM CMP(12)"), - PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V12, "Intel(R) I219-V CMP(12)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM13, "Intel(R) I219-LM TGP(13)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V13, "Intel(R) I219-V TGP(13)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM14, "Intel(R) I219-LM TGP(14)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V14, "Intel(R) I219-V GTP(14)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM15, "Intel(R) I219-LM TGP(15)"), - PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V15, "Intel(R) I219-V TGP(15)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM16, "Intel(R) I219-LM ADL(16)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V16, "Intel(R) I219-V ADL(16)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM17, "Intel(R) I219-LM ADL(17)"), - PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V17, "Intel(R) I219-V ADL(17)"), - PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_LM18, "Intel(R) I219-LM MTP(18)"), - PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_V18, "Intel(R) I219-V MTP(18)"), - PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_LM19, "Intel(R) I219-LM MTP(19)"), - PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_V19, "Intel(R) I219-V MTP(19)"), - PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_LM20, "Intel(R) I219-LM LNL(20)"), - PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_V20, "Intel(R) I219-V LNL(20)"), - PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_LM21, "Intel(R) I219-LM LNL(21)"), - PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_V21, "Intel(R) I219-V LNL(21)"), - PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_LM22, "Intel(R) I219-LM RPL(22)"), - PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_V22, "Intel(R) I219-V RPL(22)"), - PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_LM23, "Intel(R) I219-LM RPL(23)"), - PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_V23, "Intel(R) I219-V RPL(23)"), - PVID(0x8086, E1000_DEV_ID_PCH_ARL_I219_LM24, "Intel(R) I219-LM ARL(24)"), - PVID(0x8086, E1000_DEV_ID_PCH_ARL_I219_V24, "Intel(R) I219-V ARL(24)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM25, "Intel(R) I219-LM PTP(25)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V25, "Intel(R) I219-V PTP(25)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM26, "Intel(R) I219-LM PTP(26)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V26, "Intel(R) I219-V PTP(26)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM27, "Intel(R) I219-LM PTP(27)"), - PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V27, "Intel(R) I219-V PTP(27)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM10, + "Intel(R) I219-LM CMP(10)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V10, + "Intel(R) I219-V CMP(10)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM11, + "Intel(R) I219-LM CMP(11)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V11, + "Intel(R) I219-V CMP(11)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_LM12, + "Intel(R) I219-LM CMP(12)"), + PVID(0x8086, E1000_DEV_ID_PCH_CMP_I219_V12, + "Intel(R) I219-V CMP(12)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM13, + "Intel(R) I219-LM TGP(13)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V13, + "Intel(R) I219-V TGP(13)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM14, + "Intel(R) I219-LM TGP(14)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V14, + "Intel(R) I219-V GTP(14)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_LM15, + "Intel(R) I219-LM TGP(15)"), + PVID(0x8086, E1000_DEV_ID_PCH_TGP_I219_V15, + "Intel(R) I219-V TGP(15)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM16, + "Intel(R) I219-LM ADL(16)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V16, + "Intel(R) I219-V ADL(16)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM17, + "Intel(R) I219-LM ADL(17)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V17, + "Intel(R) I219-V ADL(17)"), + PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_LM18, + "Intel(R) I219-LM MTP(18)"), + PVID(0x8086, E1000_DEV_ID_PCH_MTP_I219_V18, + "Intel(R) I219-V MTP(18)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_LM19, + "Intel(R) I219-LM ADL(19)"), + PVID(0x8086, E1000_DEV_ID_PCH_ADL_I219_V19, + "Intel(R) I219-V ADL(19)"), + PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_LM20, + "Intel(R) I219-LM LNL(20)"), + PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_V20, + "Intel(R) I219-V LNL(20)"), + PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_LM21, + "Intel(R) I219-LM LNL(21)"), + PVID(0x8086, E1000_DEV_ID_PCH_LNL_I219_V21, + "Intel(R) I219-V LNL(21)"), + PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_LM22, + "Intel(R) I219-LM RPL(22)"), + PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_V22, + "Intel(R) I219-V RPL(22)"), + PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_LM23, + "Intel(R) I219-LM RPL(23)"), + PVID(0x8086, E1000_DEV_ID_PCH_RPL_I219_V23, + "Intel(R) I219-V RPL(23)"), + PVID(0x8086, E1000_DEV_ID_PCH_ARL_I219_LM24, + "Intel(R) I219-LM ARL(24)"), + PVID(0x8086, E1000_DEV_ID_PCH_ARL_I219_V24, + "Intel(R) I219-V ARL(24)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM25, + "Intel(R) I219-LM PTP(25)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V25, + "Intel(R) I219-V PTP(25)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM26, + "Intel(R) I219-LM PTP(26)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V26, + "Intel(R) I219-V PTP(26)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_LM27, + "Intel(R) I219-LM PTP(27)"), + PVID(0x8086, E1000_DEV_ID_PCH_PTP_I219_V27, + "Intel(R) I219-V PTP(27)"), /* required last entry */ PVID_END }; @@ -218,45 +322,68 @@ static const pci_vendor_info_t em_vendor_info_array[] = static const pci_vendor_info_t igb_vendor_info_array[] = { /* Intel(R) - igb-class devices */ - PVID(0x8086, E1000_DEV_ID_82575EB_COPPER, "Intel(R) PRO/1000 82575EB (Copper)"), - PVID(0x8086, E1000_DEV_ID_82575EB_FIBER_SERDES, "Intel(R) PRO/1000 82575EB (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82575GB_QUAD_COPPER, "Intel(R) PRO/1000 VT 82575GB (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82575EB_COPPER, + "Intel(R) PRO/1000 82575EB (Copper)"), + PVID(0x8086, E1000_DEV_ID_82575EB_FIBER_SERDES, + "Intel(R) PRO/1000 82575EB (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82575GB_QUAD_COPPER, + "Intel(R) PRO/1000 VT 82575GB (Quad Copper)"), PVID(0x8086, E1000_DEV_ID_82576, "Intel(R) PRO/1000 82576"), PVID(0x8086, E1000_DEV_ID_82576_NS, "Intel(R) PRO/1000 82576NS"), - PVID(0x8086, E1000_DEV_ID_82576_NS_SERDES, "Intel(R) PRO/1000 82576NS (SERDES)"), - PVID(0x8086, E1000_DEV_ID_82576_FIBER, "Intel(R) PRO/1000 EF 82576 (Dual Fiber)"), - PVID(0x8086, E1000_DEV_ID_82576_SERDES, "Intel(R) PRO/1000 82576 (Dual SERDES)"), - PVID(0x8086, E1000_DEV_ID_82576_SERDES_QUAD, "Intel(R) PRO/1000 ET 82576 (Quad SERDES)"), - PVID(0x8086, E1000_DEV_ID_82576_QUAD_COPPER, "Intel(R) PRO/1000 ET 82576 (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82576_QUAD_COPPER_ET2, "Intel(R) PRO/1000 ET(2) 82576 (Quad Copper)"), - PVID(0x8086, E1000_DEV_ID_82576_VF, "Intel(R) PRO/1000 82576 Virtual Function"), - PVID(0x8086, E1000_DEV_ID_82580_COPPER, "Intel(R) I340 82580 (Copper)"), + PVID(0x8086, E1000_DEV_ID_82576_NS_SERDES, + "Intel(R) PRO/1000 82576NS (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82576_FIBER, + "Intel(R) PRO/1000 EF 82576 (Dual Fiber)"), + PVID(0x8086, E1000_DEV_ID_82576_SERDES, + "Intel(R) PRO/1000 82576 (Dual SERDES)"), + PVID(0x8086, E1000_DEV_ID_82576_SERDES_QUAD, + "Intel(R) PRO/1000 ET 82576 (Quad SERDES)"), + PVID(0x8086, E1000_DEV_ID_82576_QUAD_COPPER, + "Intel(R) PRO/1000 ET 82576 (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82576_QUAD_COPPER_ET2, + "Intel(R) PRO/1000 ET(2) 82576 (Quad Copper)"), + PVID(0x8086, E1000_DEV_ID_82576_VF, + "Intel(R) PRO/1000 82576 Virtual Function"), + PVID(0x8086, E1000_DEV_ID_82580_COPPER, + "Intel(R) I340 82580 (Copper)"), PVID(0x8086, E1000_DEV_ID_82580_FIBER, "Intel(R) I340 82580 (Fiber)"), - PVID(0x8086, E1000_DEV_ID_82580_SERDES, "Intel(R) I340 82580 (SERDES)"), + PVID(0x8086, E1000_DEV_ID_82580_SERDES, + "Intel(R) I340 82580 (SERDES)"), PVID(0x8086, E1000_DEV_ID_82580_SGMII, "Intel(R) I340 82580 (SGMII)"), - PVID(0x8086, E1000_DEV_ID_82580_COPPER_DUAL, "Intel(R) I340-T2 82580 (Dual Copper)"), - PVID(0x8086, E1000_DEV_ID_82580_QUAD_FIBER, "Intel(R) I340-F4 82580 (Quad Fiber)"), - PVID(0x8086, E1000_DEV_ID_DH89XXCC_SERDES, "Intel(R) DH89XXCC (SERDES)"), - PVID(0x8086, E1000_DEV_ID_DH89XXCC_SGMII, "Intel(R) I347-AT4 DH89XXCC"), + PVID(0x8086, E1000_DEV_ID_82580_COPPER_DUAL, + "Intel(R) I340-T2 82580 (Dual Copper)"), + PVID(0x8086, E1000_DEV_ID_82580_QUAD_FIBER, + "Intel(R) I340-F4 82580 (Quad Fiber)"), + PVID(0x8086, E1000_DEV_ID_DH89XXCC_SERDES, + "Intel(R) DH89XXCC (SERDES)"), + PVID(0x8086, E1000_DEV_ID_DH89XXCC_SGMII, + "Intel(R) I347-AT4 DH89XXCC"), PVID(0x8086, E1000_DEV_ID_DH89XXCC_SFP, "Intel(R) DH89XXCC (SFP)"), - PVID(0x8086, E1000_DEV_ID_DH89XXCC_BACKPLANE, "Intel(R) DH89XXCC (Backplane)"), + PVID(0x8086, E1000_DEV_ID_DH89XXCC_BACKPLANE, + "Intel(R) DH89XXCC (Backplane)"), PVID(0x8086, E1000_DEV_ID_I350_COPPER, "Intel(R) I350 (Copper)"), PVID(0x8086, E1000_DEV_ID_I350_FIBER, "Intel(R) I350 (Fiber)"), PVID(0x8086, E1000_DEV_ID_I350_SERDES, "Intel(R) I350 (SERDES)"), PVID(0x8086, E1000_DEV_ID_I350_SGMII, "Intel(R) I350 (SGMII)"), PVID(0x8086, E1000_DEV_ID_I350_VF, "Intel(R) I350 Virtual Function"), PVID(0x8086, E1000_DEV_ID_I210_COPPER, "Intel(R) I210 (Copper)"), - PVID(0x8086, E1000_DEV_ID_I210_COPPER_IT, "Intel(R) I210 IT (Copper)"), + PVID(0x8086, E1000_DEV_ID_I210_COPPER_IT, + "Intel(R) I210 IT (Copper)"), PVID(0x8086, E1000_DEV_ID_I210_COPPER_OEM1, "Intel(R) I210 (OEM)"), - PVID(0x8086, E1000_DEV_ID_I210_COPPER_FLASHLESS, "Intel(R) I210 Flashless (Copper)"), - PVID(0x8086, E1000_DEV_ID_I210_SERDES_FLASHLESS, "Intel(R) I210 Flashless (SERDES)"), - PVID(0x8086, E1000_DEV_ID_I210_SGMII_FLASHLESS, "Intel(R) I210 Flashless (SGMII)"), + PVID(0x8086, E1000_DEV_ID_I210_COPPER_FLASHLESS, + "Intel(R) I210 Flashless (Copper)"), + PVID(0x8086, E1000_DEV_ID_I210_SERDES_FLASHLESS, + "Intel(R) I210 Flashless (SERDES)"), + PVID(0x8086, E1000_DEV_ID_I210_SGMII_FLASHLESS, + "Intel(R) I210 Flashless (SGMII)"), PVID(0x8086, E1000_DEV_ID_I210_FIBER, "Intel(R) I210 (Fiber)"), PVID(0x8086, E1000_DEV_ID_I210_SERDES, "Intel(R) I210 (SERDES)"), PVID(0x8086, E1000_DEV_ID_I210_SGMII, "Intel(R) I210 (SGMII)"), PVID(0x8086, E1000_DEV_ID_I211_COPPER, "Intel(R) I211 (Copper)"), - PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_1GBPS, "Intel(R) I354 (1.0 GbE Backplane)"), - PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS, "Intel(R) I354 (2.5 GbE Backplane)"), + PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_1GBPS, + "Intel(R) I354 (1.0 GbE Backplane)"), + PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS, + "Intel(R) I354 (2.5 GbE Backplane)"), PVID(0x8086, E1000_DEV_ID_I354_SGMII, "Intel(R) I354 (SGMII)"), /* required last entry */ PVID_END @@ -274,8 +401,10 @@ static int em_if_shutdown(if_ctx_t); static int em_if_suspend(if_ctx_t); static int em_if_resume(if_ctx_t); -static int em_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); -static int em_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); +static int em_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); +static int em_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); static void em_if_queues_free(if_ctx_t); static uint64_t em_if_get_counter(if_ctx_t, ift_counter); @@ -519,10 +648,10 @@ SYSCTL_INT(_hw_em, OID_AUTO, disable_crc_stripping, CTLFLAG_RDTUN, static int em_tx_int_delay_dflt = EM_TICKS_TO_USECS(EM_TIDV); static int em_rx_int_delay_dflt = EM_TICKS_TO_USECS(EM_RDTR); -SYSCTL_INT(_hw_em, OID_AUTO, tx_int_delay, CTLFLAG_RDTUN, &em_tx_int_delay_dflt, - 0, "Default transmit interrupt delay in usecs"); -SYSCTL_INT(_hw_em, OID_AUTO, rx_int_delay, CTLFLAG_RDTUN, &em_rx_int_delay_dflt, - 0, "Default receive interrupt delay in usecs"); +SYSCTL_INT(_hw_em, OID_AUTO, tx_int_delay, CTLFLAG_RDTUN, + &em_tx_int_delay_dflt, 0, "Default transmit interrupt delay in usecs"); +SYSCTL_INT(_hw_em, OID_AUTO, rx_int_delay, CTLFLAG_RDTUN, + &em_rx_int_delay_dflt, 0, "Default receive interrupt delay in usecs"); static int em_tx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_TADV); static int em_rx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_RADV); @@ -534,7 +663,8 @@ SYSCTL_INT(_hw_em, OID_AUTO, rx_abs_int_delay, CTLFLAG_RDTUN, "Default receive interrupt delay limit in usecs"); static int em_smart_pwr_down = false; -SYSCTL_INT(_hw_em, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, &em_smart_pwr_down, +SYSCTL_INT(_hw_em, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, + &em_smart_pwr_down, 0, "Set to true to leave smart power down enabled on newer adapters"); static bool em_unsupported_tso = false; @@ -591,7 +721,8 @@ static struct if_shared_ctx em_sctx_init = { .isc_vendor_info = em_vendor_info_array, .isc_driver_version = em_driver_version, .isc_driver = &em_if_driver, - .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, + .isc_flags = + IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, .isc_nrxd_min = {EM_MIN_RXD}, .isc_ntxd_min = {EM_MIN_TXD}, @@ -618,7 +749,8 @@ static struct if_shared_ctx igb_sctx_init = { .isc_vendor_info = igb_vendor_info_array, .isc_driver_version = igb_driver_version, .isc_driver = &igb_if_driver, - .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, + .isc_flags = + IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, .isc_nrxd_min = {EM_MIN_RXD}, .isc_ntxd_min = {EM_MIN_TXD}, @@ -728,15 +860,21 @@ static int em_get_regs(SYSCTL_HANDLER_ARGS) for (j = 0; j < nrxd; j++) { u32 staterr = le32toh(rxr->rx_base[j].wb.upper.status_error); u32 length = le32toh(rxr->rx_base[j].wb.upper.length); - sbuf_printf(sb, "\tReceive Descriptor Address %d: %08" PRIx64 " Error:%d Length:%d\n", j, rxr->rx_base[j].read.buffer_addr, staterr, length); + sbuf_printf(sb, "\tReceive Descriptor Address %d: %08" + PRIx64 " Error:%d Length:%d\n", + j, rxr->rx_base[j].read.buffer_addr, staterr, length); } for (j = 0; j < min(ntxd, 256); j++) { unsigned int *ptr = (unsigned int *)&txr->tx_base[j]; - sbuf_printf(sb, "\tTXD[%03d] [0]: %08x [1]: %08x [2]: %08x [3]: %08x eop: %d DD=%d\n", - j, ptr[0], ptr[1], ptr[2], ptr[3], buf->eop, - buf->eop != -1 ? txr->tx_base[buf->eop].upper.fields.status & E1000_TXD_STAT_DD : 0); + sbuf_printf(sb, + "\tTXD[%03d] [0]: %08x [1]: %08x [2]: %08x [3]: %08x" + " eop: %d DD=%d\n", + j, ptr[0], ptr[1], ptr[2], ptr[3], buf->eop, + buf->eop != -1 ? + txr->tx_base[buf->eop].upper.fields.status & + E1000_TXD_STAT_DD : 0); } } @@ -850,7 +988,7 @@ em_if_attach_pre(if_ctx_t ctx) sc->enable_aim = em_enable_aim; SYSCTL_ADD_INT(ctx_list, child, OID_AUTO, "enable_aim", CTLFLAG_RW, &sc->enable_aim, 0, - "Interrupt Moderation (1=normal, 2=lowlatency)"); + "Interrupt Moderation (1=normal, 2=lowlatency)"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, @@ -898,14 +1036,17 @@ em_if_attach_pre(if_ctx_t ctx) "TSO TCP flags mask for last segment"); scctx->isc_tx_nsegments = EM_MAX_SCATTER; - scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); + scctx->isc_nrxqsets_max = + scctx->isc_ntxqsets_max = em_set_num_queues(ctx); if (bootverbose) device_printf(dev, "attach_pre capping queues at %d\n", scctx->isc_ntxqsets_max); if (hw->mac.type >= igb_mac_min) { - scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); - scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); + scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * + sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); + scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * + sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(union e1000_adv_tx_desc); scctx->isc_rxd_size[0] = sizeof(union e1000_adv_rx_desc); scctx->isc_txrx = &igb_txrx; @@ -924,8 +1065,10 @@ em_if_attach_pre(if_ctx_t ctx) */ scctx->isc_msix_bar = pci_msix_table_bar(dev); } else if (hw->mac.type >= em_mac_min) { - scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); - scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); + scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * + sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); + scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * + sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); scctx->isc_rxd_size[0] = sizeof(union e1000_rx_desc_extended); scctx->isc_txrx = &em_txrx; @@ -936,11 +1079,12 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; - /* Disable TSO on all em(4) until ring stalls can be debugged */ + /* Disable TSO on all em(4) until ring stalls are debugged */ scctx->isc_capenable &= ~IFCAP_TSO; /* - * Disable TSO on SPT due to errata that downclocks DMA performance + * Disable TSO on SPT due to errata that downclocks DMA + * performance * i218-i219 Specification Update 1.5.4.5 */ if (hw->mac.type == e1000_pch_spt) @@ -957,8 +1101,10 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_disable_msix = 1; } } else { - scctx->isc_txqsizes[0] = roundup2((scctx->isc_ntxd[0] + 1) * sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); - scctx->isc_rxqsizes[0] = roundup2((scctx->isc_nrxd[0] + 1) * sizeof(struct e1000_rx_desc), EM_DBA_ALIGN); + scctx->isc_txqsizes[0] = roundup2((scctx->isc_ntxd[0] + 1) * + sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); + scctx->isc_rxqsizes[0] = roundup2((scctx->isc_nrxd[0] + 1) * + sizeof(struct e1000_rx_desc), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); scctx->isc_rxd_size[0] = sizeof(struct e1000_rx_desc); scctx->isc_txrx = &lem_txrx; @@ -971,7 +1117,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; - /* Disable TSO on all lem(4) until ring stalls can be debugged */ + /* Disable TSO on all lem(4) until ring stalls debugged */ scctx->isc_capenable &= ~IFCAP_TSO; /* 82541ER doesn't do HW tagging */ @@ -982,15 +1128,18 @@ em_if_attach_pre(if_ctx_t ctx) } /* This is the first e1000 chip and it does not do offloads */ if (hw->mac.type == e1000_82542) { - scctx->isc_capabilities &= ~(IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | - IFCAP_HWCSUM_IPV6 | IFCAP_VLAN_HWTAGGING | - IFCAP_VLAN_HWFILTER | IFCAP_TSO | IFCAP_VLAN_HWTSO); + scctx->isc_capabilities &= ~(IFCAP_HWCSUM | + IFCAP_VLAN_HWCSUM | IFCAP_HWCSUM_IPV6 | + IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWFILTER | + IFCAP_TSO | IFCAP_VLAN_HWTSO); scctx->isc_capenable = scctx->isc_capabilities; } /* These can't do TSO for various reasons */ - if (hw->mac.type < e1000_82544 || hw->mac.type == e1000_82547 || + if (hw->mac.type < e1000_82544 || + hw->mac.type == e1000_82547 || hw->mac.type == e1000_82547_rev_2) { - scctx->isc_capabilities &= ~(IFCAP_TSO | IFCAP_VLAN_HWTSO); + scctx->isc_capabilities &= + ~(IFCAP_TSO |IFCAP_VLAN_HWTSO); scctx->isc_capenable = scctx->isc_capabilities; } /* XXXKB: No IPv6 before this? */ @@ -998,10 +1147,14 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_capabilities &= ~IFCAP_HWCSUM_IPV6; scctx->isc_capenable = scctx->isc_capabilities; } - /* "PCI/PCI-X SDM 4.0" page 33 (b) - FDX requirement on these chips */ - if (hw->mac.type == e1000_82547 || hw->mac.type == e1000_82547_rev_2) - scctx->isc_capenable &= ~(IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | - IFCAP_HWCSUM_IPV6); + /* + * "PCI/PCI-X SDM 4.0" page 33 (b): + * FDX requirement on these chips + */ + if (hw->mac.type == e1000_82547 || + hw->mac.type == e1000_82547_rev_2) + scctx->isc_capenable &= ~(IFCAP_HWCSUM | + IFCAP_VLAN_HWCSUM | IFCAP_HWCSUM_IPV6); /* INTx only */ scctx->isc_msix_bar = 0; @@ -1048,11 +1201,9 @@ em_if_attach_pre(if_ctx_t ctx) ** FLASH read/write macros in the shared code. */ else if (hw->mac.type >= e1000_pch_spt) { - sc->osdep.flash_bus_space_tag = - sc->osdep.mem_bus_space_tag; + sc->osdep.flash_bus_space_tag = sc->osdep.mem_bus_space_tag; sc->osdep.flash_bus_space_handle = - sc->osdep.mem_bus_space_handle - + E1000_FLASH_BASE_ADDR; + sc->osdep.mem_bus_space_handle + E1000_FLASH_BASE_ADDR; } /* Do Shared Code initialization */ @@ -1078,15 +1229,17 @@ em_if_attach_pre(if_ctx_t ctx) } if (hw->mac.type >= e1000_82540 && hw->mac.type < igb_mac_min) { em_add_int_delay_sysctl(sc, "rx_abs_int_delay", - "receive interrupt delay limit in usecs", &sc->rx_abs_int_delay, + "receive interrupt delay limit in usecs", + &sc->rx_abs_int_delay, E1000_REGISTER(hw, E1000_RADV), em_rx_abs_int_delay_dflt); em_add_int_delay_sysctl(sc, "tx_abs_int_delay", - "transmit interrupt delay limit in usecs", &sc->tx_abs_int_delay, + "transmit interrupt delay limit in usecs", + &sc->tx_abs_int_delay, E1000_REGISTER(hw, E1000_TADV), em_tx_abs_int_delay_dflt); em_add_int_delay_sysctl(sc, "itr", "interrupt delay limit in usecs/4", &sc->tx_itr, E1000_REGISTER(hw, E1000_ITR), - EM_INTS_TO_ITR(em_max_interrupt_rate)); + EM_INTS_TO_ITR(em_max_interrupt_rate)); } hw->mac.autoneg = DO_AUTO_NEG; @@ -1121,7 +1274,8 @@ em_if_attach_pre(if_ctx_t ctx) sc->mta = malloc(sizeof(u8) * ETHER_ADDR_LEN * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); if (sc->mta == NULL) { - device_printf(dev, "Can not allocate multicast setup array\n"); + device_printf(dev, + "Can not allocate multicast setup array\n"); error = ENOMEM; goto err_late; } @@ -1131,8 +1285,8 @@ em_if_attach_pre(if_ctx_t ctx) /* Check SOL/IDER usage */ if (e1000_check_reset_block(hw)) - device_printf(dev, "PHY reset is blocked" - " due to SOL/IDER session.\n"); + device_printf(dev, + "PHY reset is blocked due to SOL/IDER session.\n"); /* Sysctl for setting Energy Efficient Ethernet */ if (hw->mac.type < igb_mac_min) @@ -1167,8 +1321,8 @@ em_if_attach_pre(if_ctx_t ctx) /* Copy the permanent MAC address out of the EEPROM */ if (e1000_read_mac_addr(hw) < 0) { - device_printf(dev, "EEPROM read error while reading MAC" - " address\n"); + device_printf(dev, + "EEPROM read error while reading MAC address\n"); error = EIO; goto err_late; } @@ -1243,7 +1397,10 @@ em_if_attach_post(if_ctx_t ctx) return (0); err_late: - /* upon attach_post() error, iflib calls _if_detach() to free resources. */ + /* + * Upon em_if_attach_post() error, iflib calls em_if_detach() to + * free resources + */ return (error); } @@ -1385,8 +1542,7 @@ em_if_init(if_ctx_t ctx) INIT_DEBUGOUT("em_if_init: begin"); /* Get the latest mac address, User can use a LAA */ - bcopy(if_getlladdr(ifp), sc->hw.mac.addr, - ETHER_ADDR_LEN); + bcopy(if_getlladdr(ifp), sc->hw.mac.addr, ETHER_ADDR_LEN); /* Put the address into the Receive Address Array */ e1000_rar_set(&sc->hw, sc->hw.mac.addr, 0); @@ -1407,7 +1563,8 @@ em_if_init(if_ctx_t ctx) em_reset(ctx); em_if_update_admin_status(ctx); - for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; i++, tx_que++) { + for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; + i++, tx_que++) { struct tx_ring *txr = &tx_que->txr; txr->tx_rs_cidx = txr->tx_rs_pidx; @@ -1454,8 +1611,10 @@ em_if_init(if_ctx_t ctx) E1000_WRITE_REG(&sc->hw, E1000_CTRL_EXT, tmp); /* Set the IVAR - interrupt vector routing. */ E1000_WRITE_REG(&sc->hw, E1000_IVAR, sc->ivars); - } else if (sc->intr_type == IFLIB_INTR_MSIX) /* Set up queue routing */ + } else if (sc->intr_type == IFLIB_INTR_MSIX) { + /* Set up queue routing */ igb_configure_queues(sc); + } /* this clears any pending interrupts */ E1000_READ_REG(&sc->hw, E1000_ICR); @@ -1518,7 +1677,7 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, goto em_set_next_itr; } - /* Get the largest values from the associated tx and rx ring */ + /* Get largest values from the associated tx and rx ring */ if (txr->tx_bytes && txr->tx_packets) { bytes = txr->tx_bytes; bytes_packets = txr->tx_bytes/txr->tx_packets; @@ -1526,7 +1685,8 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, } if (rxr->rx_bytes && rxr->rx_packets) { bytes = max(bytes, rxr->rx_bytes); - bytes_packets = max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); + bytes_packets = + max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); packets = max(packets, rxr->rx_packets); } @@ -1547,7 +1707,8 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, /* Handle TSO */ if (bytes_packets > 8000) nextlatency = itr_latency_bulk; - else if ((packets < 10) || (bytes_packets > 1200)) + else if ((packets < 10) || + (bytes_packets > 1200)) nextlatency = itr_latency_bulk; else if (packets > 35) nextlatency = itr_latency_lowest; @@ -1566,8 +1727,8 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, break; default: nextlatency = itr_latency_low; - device_printf(sc->dev, "Unexpected newitr transition %d\n", - nextlatency); + device_printf(sc->dev, + "Unexpected newitr transition %d\n", nextlatency); break; } @@ -1611,7 +1772,8 @@ em_set_next_itr: if (newitr != que->itr_setting) { que->itr_setting = newitr; - E1000_WRITE_REG(hw, E1000_EITR(que->msix), que->itr_setting); + E1000_WRITE_REG(hw, E1000_EITR(que->msix), + que->itr_setting); } } else { newitr = EM_INTS_TO_ITR(newitr); @@ -1620,9 +1782,11 @@ em_set_next_itr: que->itr_setting = newitr; if (hw->mac.type == e1000_82574 && que->msix) { E1000_WRITE_REG(hw, - E1000_EITR_82574(que->msix), que->itr_setting); + E1000_EITR_82574(que->msix), + que->itr_setting); } else { - E1000_WRITE_REG(hw, E1000_ITR, que->itr_setting); + E1000_WRITE_REG(hw, E1000_ITR, + que->itr_setting); } } } @@ -1781,8 +1945,8 @@ em_msix_link(void *arg) E1000_WRITE_REG(&sc->hw, E1000_IMS, E1000_IMS_LSC); E1000_WRITE_REG(&sc->hw, E1000_EIMS, sc->link_mask); } else if (sc->hw.mac.type == e1000_82574) { - E1000_WRITE_REG(&sc->hw, E1000_IMS, E1000_IMS_LSC | - E1000_IMS_OTHER); + E1000_WRITE_REG(&sc->hw, E1000_IMS, + E1000_IMS_LSC | E1000_IMS_OTHER); /* * Because we must read the ICR for this interrupt it may * clear other causes using autoclear, for this reason we @@ -1925,7 +2089,8 @@ em_if_set_promisc(if_ctx_t ctx, int flags) if (flags & IFF_ALLMULTI) mcnt = MAX_NUM_MULTICAST_ADDRESSES; else - mcnt = min(if_llmaddr_count(ifp), MAX_NUM_MULTICAST_ADDRESSES); + mcnt = min(if_llmaddr_count(ifp), + MAX_NUM_MULTICAST_ADDRESSES); if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) reg_rctl &= (~E1000_RCTL_MPE); @@ -1974,7 +2139,7 @@ em_if_multi_set(if_ctx_t ctx) { struct e1000_softc *sc = iflib_get_softc(ctx); struct ifnet *ifp = iflib_get_ifp(ctx); - u8 *mta; /* Multicast array memory */ + u8 *mta; /* Multicast array memory */ u32 reg_rctl = 0; int mcnt = 0; @@ -2033,7 +2198,6 @@ em_if_multi_set(if_ctx_t ctx) static void em_if_timer(if_ctx_t ctx, uint16_t qid) { - if (qid != 0) return; @@ -2067,8 +2231,8 @@ em_if_update_admin_status(if_ctx_t ctx) break; case e1000_media_type_fiber: e1000_check_for_link(hw); - link_check = (E1000_READ_REG(hw, E1000_STATUS) & - E1000_STATUS_LU); + link_check = + (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU); break; case e1000_media_type_internal_serdes: e1000_check_for_link(hw); @@ -2125,11 +2289,11 @@ em_if_update_admin_status(if_ctx_t ctx) sc->flags |= IGB_MEDIA_RESET; em_reset(ctx); } - /* Only do TSO on gigabit Ethernet for older chips due to errata */ + /* Only do TSO on gigabit for older chips due to errata */ if (hw->mac.type < igb_mac_min) automasked = em_automask_tso(ctx); - /* Automasking resets the interface, so don't mark it up yet */ + /* Automasking resets the interface so don't mark it up yet */ if (!automasked) iflib_link_state_change(ctx, LINK_STATE_UP, IF_Mbps(sc->link_speed)); @@ -2204,10 +2368,8 @@ em_identify_hardware(if_ctx_t ctx) sc->hw.vendor_id = pci_get_vendor(dev); sc->hw.device_id = pci_get_device(dev); sc->hw.revision_id = pci_read_config(dev, PCIR_REVID, 1); - sc->hw.subsystem_vendor_id = - pci_read_config(dev, PCIR_SUBVEND_0, 2); - sc->hw.subsystem_device_id = - pci_read_config(dev, PCIR_SUBDEV_0, 2); + sc->hw.subsystem_vendor_id = pci_read_config(dev, PCIR_SUBVEND_0, 2); + sc->hw.subsystem_device_id = pci_read_config(dev, PCIR_SUBDEV_0, 2); /* Do Shared Code Init and Setup */ if (e1000_set_mac_type(&sc->hw)) { @@ -2231,15 +2393,15 @@ em_allocate_pci_resources(if_ctx_t ctx) int rid, val; rid = PCIR_BAR(0); - sc->memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &rid, RF_ACTIVE); + sc->memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); if (sc->memory == NULL) { - device_printf(dev, "Unable to allocate bus resource: memory\n"); + device_printf(dev, + "Unable to allocate bus resource: memory\n"); *** 927 LINES SKIPPED *** From nobody Wed Nov 27 02:14:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyjgN4Fj7z5fMkR; Wed, 27 Nov 2024 02:14:24 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyjgN27pDz4fxJ; Wed, 27 Nov 2024 02:14:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MTjTD/RBlI9oUifhp0dyDKMGT6QopvhMtTgvSU3tBmw=; b=kHFlC6cpprsNIgZk/m25LES9WeB99+NNXEYVYt5OGyDjYe6H5gyzhTbakvA705sqcQ40xN +61Wy2uav2l1ZNrwH/L41cBGkjYg8IqDAH1p0IjEAnRyOhp3/IVEBximyg4X54kNfBZ5a/ jbf5tFAtFOmdr66ghBlGzl8ZBaNl31Ux8eUSkl8kDqXu/1YyCGvdXn8ZAMAdwP7p8M12Va QWOKeJT48nSOYiR7lEvlAJmBaqwgzougTxJCAaR66kEKbN61ptTqQ/lGFYk5BiqXGxBa1I eZk03WjzfMA4aCyi6HdTGwC1C6Y3ZIWVxUbaaGa1ZuhT+jgagipvYjuZgWrNiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MTjTD/RBlI9oUifhp0dyDKMGT6QopvhMtTgvSU3tBmw=; b=bEZLK9tddO3t5OvpQXaKn3/CLG/XwP3qHH5TgnBEpL7iyYPSlDOFEBLYAYreP6DCfUY9tQ ArdGakMtDidWfX0kRgDRE3kHgQsh+8KoW2c1koD5mR0UHB/qqQj0kUjTVMXdLfSbsiSipZ uP8taqXqVpIUbQ85Vl3uhkULL+JH9uEnQG8sO+7qybOgsqHpEfIHdPP96ekohCbn9yXuZp JYpx2yWZzrJTIYBANYxTyQhqJEmWynRHhROty5tIHvlS7fKFWu/zzMM2PSJzG4XToVqjZ7 IUkH40JwOMx8Ypy1M/iGWX1M1sW3YvkIjYTjjNnTs7CuhRfanXNUSg/75eV2GQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732673664; a=rsa-sha256; cv=none; b=flHMYutR/3859nEDYFdgbNvILOq4MlesSnWdfuMVuO8mBbY7SJeydrXHDgCcSU4kbDg0Ex Ofc9eriob7CV2yi6oEVLQ6R5DszR+RZqlpP1lZjocbSpxIn8c6i/Fyb++ZCcz2TwqMRS0N SKDFvFHFqt5u4Rl0ijFknd4/RHpAfZM7Ka4AWP/6KUPGT6c6jG87ZhtAiYlYeaLETlssnH ta59H5VEodUJN5kGby6DpAwsXiGPTDocQ9hW6mkf+LoXLGDQRPP3iPk6vGApn3NOzHdkAH FPb/0LvZhBcyteRtVCxD6oS/3kFDyOS98h7//RJhL6mN9zoC3QzUns/JhDemHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyjgN1GK5zq5W; Wed, 27 Nov 2024 02:14:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR2EO0p066704; Wed, 27 Nov 2024 02:14:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR2EO2F066701; Wed, 27 Nov 2024 02:14:24 GMT (envelope-from git) Date: Wed, 27 Nov 2024 02:14:24 GMT Message-Id: <202411270214.4AR2EO2F066701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: d86afe4e6cfe - stable/13 - igc: Reflow long lines List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d86afe4e6cfe3522040ac68778ee4d96f92630d9 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=d86afe4e6cfe3522040ac68778ee4d96f92630d9 commit d86afe4e6cfe3522040ac68778ee4d96f92630d9 Author: Kevin Bowling AuthorDate: 2024-11-24 05:58:13 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 00:36:17 +0000 igc: Reflow long lines Sponsored by: BBOX.io (cherry picked from commit 9efc7325f1acb85ac8772096cc2b54fd0c6a60ff) --- sys/dev/igc/if_igc.c | 153 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 98 insertions(+), 55 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 8d6258f9941e..7e8d5f1460ba 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -49,22 +49,38 @@ static const pci_vendor_info_t igc_vendor_info_array[] = { /* Intel(R) PRO/1000 Network Connection - igc */ - PVID(0x8086, IGC_DEV_ID_I225_LM, "Intel(R) Ethernet Controller I225-LM"), - PVID(0x8086, IGC_DEV_ID_I225_V, "Intel(R) Ethernet Controller I225-V"), - PVID(0x8086, IGC_DEV_ID_I225_K, "Intel(R) Ethernet Controller I225-K"), - PVID(0x8086, IGC_DEV_ID_I225_I, "Intel(R) Ethernet Controller I225-I"), - PVID(0x8086, IGC_DEV_ID_I220_V, "Intel(R) Ethernet Controller I220-V"), - PVID(0x8086, IGC_DEV_ID_I225_K2, "Intel(R) Ethernet Controller I225-K(2)"), - PVID(0x8086, IGC_DEV_ID_I225_LMVP, "Intel(R) Ethernet Controller I225-LMvP(2)"), - PVID(0x8086, IGC_DEV_ID_I226_K, "Intel(R) Ethernet Controller I226-K"), - PVID(0x8086, IGC_DEV_ID_I226_LMVP, "Intel(R) Ethernet Controller I226-LMvP"), - PVID(0x8086, IGC_DEV_ID_I225_IT, "Intel(R) Ethernet Controller I225-IT(2)"), - PVID(0x8086, IGC_DEV_ID_I226_LM, "Intel(R) Ethernet Controller I226-LM"), - PVID(0x8086, IGC_DEV_ID_I226_V, "Intel(R) Ethernet Controller I226-V"), - PVID(0x8086, IGC_DEV_ID_I226_IT, "Intel(R) Ethernet Controller I226-IT"), - PVID(0x8086, IGC_DEV_ID_I221_V, "Intel(R) Ethernet Controller I221-V"), - PVID(0x8086, IGC_DEV_ID_I226_BLANK_NVM, "Intel(R) Ethernet Controller I226(blankNVM)"), - PVID(0x8086, IGC_DEV_ID_I225_BLANK_NVM, "Intel(R) Ethernet Controller I225(blankNVM)"), + PVID(0x8086, IGC_DEV_ID_I225_LM, + "Intel(R) Ethernet Controller I225-LM"), + PVID(0x8086, IGC_DEV_ID_I225_V, + "Intel(R) Ethernet Controller I225-V"), + PVID(0x8086, IGC_DEV_ID_I225_K, + "Intel(R) Ethernet Controller I225-K"), + PVID(0x8086, IGC_DEV_ID_I225_I, + "Intel(R) Ethernet Controller I225-I"), + PVID(0x8086, IGC_DEV_ID_I220_V, + "Intel(R) Ethernet Controller I220-V"), + PVID(0x8086, IGC_DEV_ID_I225_K2, + "Intel(R) Ethernet Controller I225-K(2)"), + PVID(0x8086, IGC_DEV_ID_I225_LMVP, + "Intel(R) Ethernet Controller I225-LMvP(2)"), + PVID(0x8086, IGC_DEV_ID_I226_K, + "Intel(R) Ethernet Controller I226-K"), + PVID(0x8086, IGC_DEV_ID_I226_LMVP, + "Intel(R) Ethernet Controller I226-LMvP"), + PVID(0x8086, IGC_DEV_ID_I225_IT, + "Intel(R) Ethernet Controller I225-IT(2)"), + PVID(0x8086, IGC_DEV_ID_I226_LM, + "Intel(R) Ethernet Controller I226-LM"), + PVID(0x8086, IGC_DEV_ID_I226_V, + "Intel(R) Ethernet Controller I226-V"), + PVID(0x8086, IGC_DEV_ID_I226_IT, + "Intel(R) Ethernet Controller I226-IT"), + PVID(0x8086, IGC_DEV_ID_I221_V, + "Intel(R) Ethernet Controller I221-V"), + PVID(0x8086, IGC_DEV_ID_I226_BLANK_NVM, + "Intel(R) Ethernet Controller I226(blankNVM)"), + PVID(0x8086, IGC_DEV_ID_I225_BLANK_NVM, + "Intel(R) Ethernet Controller I225(blankNVM)"), /* required last entry */ PVID_END }; @@ -80,8 +96,10 @@ static int igc_if_shutdown(if_ctx_t); static int igc_if_suspend(if_ctx_t); static int igc_if_resume(if_ctx_t); -static int igc_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); -static int igc_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); +static int igc_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); +static int igc_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); static void igc_if_queues_free(if_ctx_t); static uint64_t igc_if_get_counter(if_ctx_t, ift_counter); @@ -230,7 +248,8 @@ SYSCTL_INT(_hw_igc, OID_AUTO, disable_crc_stripping, CTLFLAG_RDTUN, &igc_disable_crc_stripping, 0, "Disable CRC Stripping"); static int igc_smart_pwr_down = false; -SYSCTL_INT(_hw_igc, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, &igc_smart_pwr_down, +SYSCTL_INT(_hw_igc, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, + &igc_smart_pwr_down, 0, "Set to true to leave smart power down enabled on newer adapters"); /* Controls whether promiscuous also shows bad packets */ @@ -278,7 +297,8 @@ static struct if_shared_ctx igc_sctx_init = { .isc_vendor_info = igc_vendor_info_array, .isc_driver_version = "1", .isc_driver = &igc_if_driver, - .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, + .isc_flags = + IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, .isc_nrxd_min = {IGC_MIN_RXD}, .isc_ntxd_min = {IGC_MIN_TXD}, @@ -384,15 +404,20 @@ static int igc_get_regs(SYSCTL_HANDLER_ARGS) for (j = 0; j < nrxd; j++) { u32 staterr = le32toh(rxr->rx_base[j].wb.upper.status_error); u32 length = le32toh(rxr->rx_base[j].wb.upper.length); - sbuf_printf(sb, "\tReceive Descriptor Address %d: %08" PRIx64 " Error:%d Length:%d\n", j, rxr->rx_base[j].read.buffer_addr, staterr, length); + sbuf_printf(sb, "\tReceive Descriptor Address %d: %08" + PRIx64 " Error:%d Length:%d\n", + j, rxr->rx_base[j].read.buffer_addr, staterr, length); } for (j = 0; j < min(ntxd, 256); j++) { unsigned int *ptr = (unsigned int *)&txr->tx_base[j]; - sbuf_printf(sb, "\tTXD[%03d] [0]: %08x [1]: %08x [2]: %08x [3]: %08x eop: %d DD=%d\n", - j, ptr[0], ptr[1], ptr[2], ptr[3], buf->eop, - buf->eop != -1 ? txr->tx_base[buf->eop].upper.fields.status & IGC_TXD_STAT_DD : 0); + sbuf_printf(sb, "\tTXD[%03d] [0]: %08x [1]: %08x [2]: %08x" + "[3]: %08x eop: %d DD=%d\n", + j, ptr[0], ptr[1], ptr[2], ptr[3], buf->eop, + buf->eop != -1 ? + txr->tx_base[buf->eop].upper.fields.status & + IGC_TXD_STAT_DD : 0); } } @@ -524,13 +549,16 @@ igc_if_attach_pre(if_ctx_t ctx) igc_identify_hardware(ctx); scctx->isc_tx_nsegments = IGC_MAX_SCATTER; - scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = igc_set_num_queues(ctx); + scctx->isc_nrxqsets_max = + scctx->isc_ntxqsets_max = igc_set_num_queues(ctx); if (bootverbose) device_printf(dev, "attach_pre capping queues at %d\n", scctx->isc_ntxqsets_max); - scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union igc_adv_tx_desc), IGC_DBA_ALIGN); - scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union igc_adv_rx_desc), IGC_DBA_ALIGN); + scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * + sizeof(union igc_adv_tx_desc), IGC_DBA_ALIGN); + scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * + sizeof(union igc_adv_rx_desc), IGC_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(union igc_adv_tx_desc); scctx->isc_rxd_size[0] = sizeof(union igc_adv_rx_desc); scctx->isc_txrx = &igc_txrx; @@ -589,7 +617,8 @@ igc_if_attach_pre(if_ctx_t ctx) sc->mta = malloc(sizeof(u8) * ETHER_ADDR_LEN * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); if (sc->mta == NULL) { - device_printf(dev, "Can not allocate multicast setup array\n"); + device_printf(dev, + "Can not allocate multicast setup array\n"); error = ENOMEM; goto err_late; } @@ -818,7 +847,8 @@ igc_if_init(if_ctx_t ctx) igc_reset(ctx); igc_if_update_admin_status(ctx); - for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; i++, tx_que++) { + for (i = 0, tx_que = sc->tx_queues; i < sc->tx_num_queues; + i++, tx_que++) { struct tx_ring *txr = &tx_que->txr; txr->tx_rs_cidx = txr->tx_rs_pidx; @@ -907,7 +937,7 @@ igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, goto igc_set_next_eitr; } - /* Get the largest values from the associated tx and rx ring */ + /* Get largest values from the associated tx and rx ring */ if (txr->tx_bytes && txr->tx_packets) { bytes = txr->tx_bytes; bytes_packets = txr->tx_bytes/txr->tx_packets; @@ -915,7 +945,8 @@ igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, } if (rxr->rx_bytes && rxr->rx_packets) { bytes = max(bytes, rxr->rx_bytes); - bytes_packets = max(bytes_packets, rxr->rx_bytes/rxr->rx_packets); + bytes_packets = max(bytes_packets, + rxr->rx_bytes/rxr->rx_packets); packets = max(packets, rxr->rx_packets); } @@ -936,7 +967,8 @@ igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, /* Handle TSO */ if (bytes_packets > 8000) nextlatency = eitr_latency_bulk; - else if ((packets < 10) || (bytes_packets > 1200)) + else if ((packets < 10) || + (bytes_packets > 1200)) nextlatency = eitr_latency_bulk; else if (packets > 35) nextlatency = eitr_latency_lowest; @@ -955,7 +987,8 @@ igc_neweitr(struct igc_softc *sc, struct igc_rx_queue *que, break; default: nextlatency = eitr_latency_low; - device_printf(sc->dev, "Unexpected neweitr transition %d\n", + device_printf(sc->dev, + "Unexpected neweitr transition %d\n", nextlatency); break; } @@ -1464,7 +1497,8 @@ igc_allocate_pci_resources(if_ctx_t ctx) sc->memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->memory == NULL) { - device_printf(dev, "Unable to allocate bus resource: memory\n"); + device_printf(dev, + "Unable to allocate bus resource: memory\n"); return (ENXIO); } sc->osdep.mem_bus_space_tag = rman_get_bustag(sc->memory); @@ -1495,9 +1529,12 @@ igc_if_msix_intr_assign(if_ctx_t ctx, int msix) for (i = 0; i < sc->rx_num_queues; i++, rx_que++, vector++) { rid = vector + 1; snprintf(buf, sizeof(buf), "rxq%d", i); - error = iflib_irq_alloc_generic(ctx, &rx_que->que_irq, rid, IFLIB_INTR_RXTX, igc_msix_que, rx_que, rx_que->me, buf); + error = iflib_irq_alloc_generic(ctx, &rx_que->que_irq, rid, + IFLIB_INTR_RXTX, igc_msix_que, rx_que, rx_que->me, buf); if (error) { - device_printf(iflib_get_dev(ctx), "Failed to allocate que int %d err: %d", i, error); + device_printf(iflib_get_dev(ctx), + "Failed to allocate que int %d err: %d", + i, error); sc->rx_num_queues = i + 1; goto fail; } @@ -1535,10 +1572,12 @@ igc_if_msix_intr_assign(if_ctx_t ctx, int msix) /* Link interrupt */ rid = rx_vectors + 1; - error = iflib_irq_alloc_generic(ctx, &sc->irq, rid, IFLIB_INTR_ADMIN, igc_msix_link, sc, 0, "aq"); + error = iflib_irq_alloc_generic(ctx, &sc->irq, rid, IFLIB_INTR_ADMIN, + igc_msix_link, sc, 0, "aq"); if (error) { - device_printf(iflib_get_dev(ctx), "Failed to register admin handler"); + device_printf(iflib_get_dev(ctx), + "Failed to register admin handler"); goto fail; } sc->linkvec = rx_vectors; @@ -1778,7 +1817,8 @@ igc_reset(if_ctx_t ctx) * response (Rx) to Ethernet PAUSE frames. * - High water mark should allow for at least two frames to be * received after sending an XOFF. - * - Low water mark works best when it is very near the high water mark. + * - Low water mark works best when it is very near the high water + * mark. * This allows the receiver to restart by sending XON when it has * drained a bit. Here we use an arbitrary value of 1500 which will * restart after one full frame is pulled from the buffer. There @@ -1958,7 +1998,8 @@ igc_setup_interface(if_ctx_t ctx) } static int -igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxqs, int ntxqsets) +igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, + int ntxqs, int ntxqsets) { struct igc_softc *sc = iflib_get_softc(ctx); if_softc_ctx_t scctx = sc->shared; @@ -1973,7 +2014,8 @@ igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxq if (!(sc->tx_queues = (struct igc_tx_queue *) malloc(sizeof(struct igc_tx_queue) * sc->tx_num_queues, M_DEVBUF, M_NOWAIT | M_ZERO))) { - device_printf(iflib_get_dev(ctx), "Unable to allocate queue memory\n"); + device_printf(iflib_get_dev(ctx), + "Unable to allocate queue memory\n"); return(ENOMEM); } @@ -1985,14 +2027,16 @@ igc_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxq que->me = txr->me = i; /* Allocate report status array */ - if (!(txr->tx_rsq = (qidx_t *) malloc(sizeof(qidx_t) * scctx->isc_ntxd[0], M_DEVBUF, M_NOWAIT | M_ZERO))) { - device_printf(iflib_get_dev(ctx), "failed to allocate rs_idxs memory\n"); + if (!(txr->tx_rsq = (qidx_t *) malloc(sizeof(qidx_t) * + scctx->isc_ntxd[0], M_DEVBUF, M_NOWAIT | M_ZERO))) { + device_printf(iflib_get_dev(ctx), + "failed to allocate rs_idxs memory\n"); error = ENOMEM; goto fail; } for (j = 0; j < scctx->isc_ntxd[0]; j++) txr->tx_rsq[j] = QIDX_INVALID; - /* get the virtual and physical address of the hardware queues */ + /* get virtual and physical address of the hardware queues */ txr->tx_base = (struct igc_tx_desc *)vaddrs[i*ntxqs]; txr->tx_paddr = paddrs[i*ntxqs]; } @@ -2007,7 +2051,8 @@ fail: } static int -igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxqs, int nrxqsets) +igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, + int nrxqs, int nrxqsets) { struct igc_softc *sc = iflib_get_softc(ctx); int error = IGC_SUCCESS; @@ -2021,7 +2066,8 @@ igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxq if (!(sc->rx_queues = (struct igc_rx_queue *) malloc(sizeof(struct igc_rx_queue) * sc->rx_num_queues, M_DEVBUF, M_NOWAIT | M_ZERO))) { - device_printf(iflib_get_dev(ctx), "Unable to allocate queue memory\n"); + device_printf(iflib_get_dev(ctx), + "Unable to allocate queue memory\n"); error = ENOMEM; goto fail; } @@ -2033,7 +2079,7 @@ igc_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxq rxr->que = que; que->me = rxr->me = i; - /* get the virtual and physical address of the hardware queues */ + /* get virtual and physical address of the hardware queues */ rxr->rx_base = (union igc_rx_desc_extended *)vaddrs[i*nrxqs]; rxr->rx_paddr = paddrs[i*nrxqs]; } @@ -2248,11 +2294,9 @@ igc_initialize_receive_unit(if_ctx_t ctx) #endif IGC_WRITE_REG(hw, IGC_RDLEN(i), - scctx->isc_nrxd[0] * sizeof(struct igc_rx_desc)); - IGC_WRITE_REG(hw, IGC_RDBAH(i), - (uint32_t)(bus_addr >> 32)); - IGC_WRITE_REG(hw, IGC_RDBAL(i), - (uint32_t)bus_addr); + scctx->isc_nrxd[0] * sizeof(struct igc_rx_desc)); + IGC_WRITE_REG(hw, IGC_RDBAH(i), (uint32_t)(bus_addr >> 32)); + IGC_WRITE_REG(hw, IGC_RDBAL(i), (uint32_t)bus_addr); IGC_WRITE_REG(hw, IGC_SRRCTL(i), srrctl); /* Setup the Head and Tail Descriptor Pointers */ IGC_WRITE_REG(hw, IGC_RDH(i), 0); @@ -2724,7 +2768,6 @@ igc_add_hw_stats(struct igc_softc *sc) } /* MAC stats get their own sub node */ - stat_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac_stats", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Statistics"); stat_list = SYSCTL_CHILDREN(stat_node); @@ -2882,7 +2925,6 @@ igc_add_hw_stats(struct igc_softc *sc) "TSO Contexts Transmitted"); /* Interrupt Stats */ - int_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "interrupts", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Interrupt Statistics"); int_list = SYSCTL_CHILDREN(int_node); @@ -2918,7 +2960,8 @@ igc_sbuf_fw_version(struct igc_fw_version *fw_ver, struct sbuf *buf) space = " "; } - if (fw_ver->invm_major || fw_ver->invm_minor || fw_ver->invm_img_type) { + if (fw_ver->invm_major || fw_ver->invm_minor || + fw_ver->invm_img_type) { sbuf_printf(buf, "%sNVM V%d.%d imgtype%d", space, fw_ver->invm_major, fw_ver->invm_minor, fw_ver->invm_img_type); From nobody Wed Nov 27 02:14:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyjgP2y9bz5fN6M; Wed, 27 Nov 2024 02:14:25 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyjgP2Kkqz4gJ9; Wed, 27 Nov 2024 02:14:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jrsnm/z64LAAxAYQ/j41OoJjhcWttCCxNjMHVrJMWu8=; b=UkzIRfTlXQc3he2Zch07KJ33LAaKs55IhaOLUX9no2PXaZP3TLX+6rrpA5iY+t7ABr9DdG ayGs18Jg8ppjH8jsb/22dl47Dj5CfO11mkgQBwvm+jTI18yn6FZHq5H/RtANwbXVQrBwDn 22F49YX619nhy+FNRZZ8zdoFoFkQQrSMYmmAyrXC1xkZNCIiFskk5pfBU3NZ6fbVuc1UM+ 8BVUirK+COabVusAuMRK0PUlh5EKUYL7H6/vPWKwy8Uz4dob9wunFL8HyE1d0AEx6bmPfE Cl9VzuerXh0ruI28qUkppfiQ7aRbaDHz1mECFcJXbf5iVGTTdOpn/A10U1fo0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jrsnm/z64LAAxAYQ/j41OoJjhcWttCCxNjMHVrJMWu8=; b=qsKZ1kfcC5G8kkgDWNtgvfxOMcs1XTyZEXv2Jhl7fSzja+Dp+zne+m7hVuTLa6SE5042f7 cowiVqjMr/GiAHB3O14EBpIuTlp4r8BdjgbaTUphjdrsZw6oMwtkZnK9GE2GUa9okUHdcJ wRZsiRWfESXq0wNzLr36FOfvmu2mdow3gttpluPdvHUXwUyHr7fzcJM+FsgP/vLhuIxrN5 l0KiRWxKN4oByRzw+RVcl/dDt7bdPehyJFdLRR0u6jck8Urq2Z4Pz5UvASwRJAqCoBqmgH uMDb3VTQ6CZWZlkTjR+TXZYILq6mkAzP34qR0zNdz/AOSk0gh/IVMBjk1aAu6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732673665; a=rsa-sha256; cv=none; b=lSr2SxcFF/KqZ+8fIJ1ZS0nv59qdfyX7EvGNPz6ST+Igj1NKATDCO+V6foxnOQqKup8+ky prB8xeWkZkLWCvGgzrPRH/pIdpFBffXADaq/XPJ9jmUM0k6SGNiJwFJeCF4ElZQxFlMAg4 pAuAXtr3w07FtxLxUk8S45KNoQi7NJ+M0MWBPgvdY327UIO0kkBkCeuM9dC4fn1N9r9Y/u 9k23f7OhttSN6k0Vxw5I5P2R168SNTd4f8EY054A4d/5abV0/SjkJzZXkqgeh/VHtsOYee 8OQ0h3lKq6feVvvnnz5pCMm6pg9VP6wUA3g1IyDkCfuYB84/aOS/NbWVfy2BAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyjgP1xgKzqv1; Wed, 27 Nov 2024 02:14:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR2EPrH066755; Wed, 27 Nov 2024 02:14:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR2EPiK066752; Wed, 27 Nov 2024 02:14:25 GMT (envelope-from git) Date: Wed, 27 Nov 2024 02:14:25 GMT Message-Id: <202411270214.4AR2EPiK066752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: de65f94d760d - stable/13 - ixgbe: Style pass on FreeBSD part of driver List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: de65f94d760d57153b7b8a107bac7c5f5a26c03c Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=de65f94d760d57153b7b8a107bac7c5f5a26c03c commit de65f94d760d57153b7b8a107bac7c5f5a26c03c Author: Kevin Bowling AuthorDate: 2024-11-24 07:18:33 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 01:07:22 +0000 ixgbe: Style pass on FreeBSD part of driver Fix up some indentation and reflow long lines Sponsored by: BBOX.io (cherry picked from commit c58d34dd67a419866ee50f152044e49cecbae261) --- sys/dev/ixgbe/if_bypass.c | 110 ++++--- sys/dev/ixgbe/if_fdir.c | 24 +- sys/dev/ixgbe/if_ix.c | 825 +++++++++++++++++++++++++++------------------- sys/dev/ixgbe/if_ixv.c | 274 ++++++++------- sys/dev/ixgbe/if_sriov.c | 59 ++-- sys/dev/ixgbe/ix_txrx.c | 106 +++--- sys/dev/ixgbe/ixgbe.h | 8 +- 7 files changed, 790 insertions(+), 616 deletions(-) diff --git a/sys/dev/ixgbe/if_bypass.c b/sys/dev/ixgbe/if_bypass.c index 166150d75cc6..138b4e17db0d 100644 --- a/sys/dev/ixgbe/if_bypass.c +++ b/sys/dev/ixgbe/if_bypass.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/***************************************************************************** Copyright (c) 2001-2017, Intel Corporation All rights reserved. @@ -29,7 +29,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -******************************************************************************/ +*****************************************************************************/ #include "ixgbe.h" @@ -114,11 +114,11 @@ ixgbe_get_bypass_time(u32 *year, u32 *sec) static int ixgbe_bp_version(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int version = 0; - u32 cmd; + int error = 0; + static int version = 0; + u32 cmd; ixgbe_bypass_mutex_enter(sc); cmd = BYPASS_PAGE_CTL2 | BYPASS_WE; @@ -154,15 +154,14 @@ err: static int ixgbe_bp_set_state(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int state = 0; + int error = 0; + static int state = 0; /* Get the current state */ ixgbe_bypass_mutex_enter(sc); - error = hw->mac.ops.bypass_rw(hw, - BYPASS_PAGE_CTL0, &state); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &state); ixgbe_bypass_mutex_clear(sc); if (error != 0) return (error); @@ -216,10 +215,10 @@ out: static int ixgbe_bp_timeout(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int timeout = 0; + int error = 0; + static int timeout = 0; /* Get the current value */ ixgbe_bypass_mutex_enter(sc); @@ -259,10 +258,10 @@ ixgbe_bp_timeout(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_main_on(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int main_on = 0; + int error = 0; + static int main_on = 0; ixgbe_bypass_mutex_enter(sc); error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &main_on); @@ -301,10 +300,10 @@ ixgbe_bp_main_on(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_main_off(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int main_off = 0; + int error = 0; + static int main_off = 0; ixgbe_bypass_mutex_enter(sc); error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &main_off); @@ -343,10 +342,10 @@ ixgbe_bp_main_off(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_aux_on(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int aux_on = 0; + int error = 0; + static int aux_on = 0; ixgbe_bypass_mutex_enter(sc); error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &aux_on); @@ -385,10 +384,10 @@ ixgbe_bp_aux_on(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_aux_off(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error = 0; - static int aux_off = 0; + int error = 0; + static int aux_off = 0; ixgbe_bypass_mutex_enter(sc); error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &aux_off); @@ -432,11 +431,11 @@ ixgbe_bp_aux_off(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_wd_set(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - int error, tmp; - static int timeout = 0; - u32 mask, arg; + int error, tmp; + static int timeout = 0; + u32 mask, arg; /* Get the current hardware value */ ixgbe_bypass_mutex_enter(sc); @@ -503,11 +502,11 @@ ixgbe_bp_wd_set(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_wd_reset(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; struct ixgbe_hw *hw = &sc->hw; - u32 sec, year; - int cmd, count = 0, error = 0; - int reset_wd = 0; + u32 sec, year; + int cmd, count = 0, error = 0; + int reset_wd = 0; error = sysctl_handle_int(oidp, &reset_wd, 0, req); if ((error) || (req->newptr == NULL)) @@ -549,14 +548,14 @@ ixgbe_bp_wd_reset(SYSCTL_HANDLER_ARGS) static int ixgbe_bp_log(SYSCTL_HANDLER_ARGS) { - struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; - struct ixgbe_hw *hw = &sc->hw; - u32 cmd, base, head; - u32 log_off, count = 0; - static int status = 0; - u8 data; + struct ixgbe_softc *sc = (struct ixgbe_softc *) arg1; + struct ixgbe_hw *hw = &sc->hw; + u32 cmd, base, head; + u32 log_off, count = 0; + static int status = 0; + u8 data; struct ixgbe_bypass_eeprom eeprom[BYPASS_MAX_LOGS]; - int i, error = 0; + int i, error = 0; error = sysctl_handle_int(oidp, &status, 0, req); if ((error) || (req->newptr == NULL)) @@ -639,12 +638,15 @@ ixgbe_bp_log(SYSCTL_HANDLER_ARGS) BYPASS_LOG_EVENT_SHIFT; u8 action = eeprom[count].actions & BYPASS_LOG_ACTION_M; u16 day_mon[2][13] = { - {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, - {0, 31, 59, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} + {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, + 334, 365}, + {0, 31, 59, 91, 121, 152, 182, 213, 244, 274, 305, + 335, 366} }; char *event_str[] = {"unknown", "main on", "aux on", "main off", "aux off", "WDT", "user" }; - char *action_str[] = {"ignore", "normal", "bypass", "isolate",}; + char *action_str[] = + {"ignore", "normal", "bypass", "isolate",}; /* verify vaild data 1 - 6 */ if (event < BYPASS_EVENT_MAIN_ON || event > BYPASS_EVENT_USR) @@ -711,11 +713,11 @@ unlock_err: void ixgbe_bypass_init(struct ixgbe_softc *sc) { - struct ixgbe_hw *hw = &sc->hw; - device_t dev = sc->dev; - struct sysctl_oid *bp_node; + struct ixgbe_hw *hw = &sc->hw; + device_t dev = sc->dev; + struct sysctl_oid *bp_node; struct sysctl_oid_list *bp_list; - u32 mask, value, sec, year; + u32 mask, value, sec, year; if (!(sc->feat_cap & IXGBE_FEATURE_BYPASS)) return; @@ -723,13 +725,13 @@ ixgbe_bypass_init(struct ixgbe_softc *sc) /* First set up time for the hardware */ ixgbe_get_bypass_time(&year, &sec); - mask = BYPASS_CTL1_TIME_M - | BYPASS_CTL1_VALID_M - | BYPASS_CTL1_OFFTRST_M; + mask = BYPASS_CTL1_TIME_M | + BYPASS_CTL1_VALID_M | + BYPASS_CTL1_OFFTRST_M; - value = (sec & BYPASS_CTL1_TIME_M) - | BYPASS_CTL1_VALID - | BYPASS_CTL1_OFFTRST; + value = (sec & BYPASS_CTL1_TIME_M) | + BYPASS_CTL1_VALID | + BYPASS_CTL1_OFFTRST; ixgbe_bypass_mutex_enter(sc); hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL1, mask, value); diff --git a/sys/dev/ixgbe/if_fdir.c b/sys/dev/ixgbe/if_fdir.c index e5abd7795fcd..f25d29fa91bf 100644 --- a/sys/dev/ixgbe/if_fdir.c +++ b/sys/dev/ixgbe/if_fdir.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/***************************************************************************** Copyright (c) 2001-2017, Intel Corporation All rights reserved. @@ -29,7 +29,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -******************************************************************************/ +*****************************************************************************/ #include "ixgbe.h" @@ -51,9 +51,9 @@ ixgbe_init_fdir(struct ixgbe_softc *sc) void ixgbe_reinit_fdir(void *context) { - if_ctx_t ctx = context; + if_ctx_t ctx = context; struct ixgbe_softc *sc = iflib_get_softc(ctx); - struct ifnet *ifp = iflib_get_ifp(ctx); + struct ifnet *ifp = iflib_get_ifp(ctx); if (!(sc->feat_en & IXGBE_FEATURE_FDIR)) return; @@ -79,16 +79,16 @@ ixgbe_reinit_fdir(void *context) void ixgbe_atr(struct tx_ring *txr, struct mbuf *mp) { - struct ixgbe_softc *sc = txr->sc; - struct ix_queue *que; - struct ip *ip; - struct tcphdr *th; - struct udphdr *uh; - struct ether_vlan_header *eh; + struct ixgbe_softc *sc = txr->sc; + struct ix_queue *que; + struct ip *ip; + struct tcphdr *th; + struct udphdr *uh; + struct ether_vlan_header *eh; union ixgbe_atr_hash_dword input = {.dword = 0}; union ixgbe_atr_hash_dword common = {.dword = 0}; - int ehdrlen, ip_hlen; - u16 etype; + int ehdrlen, ip_hlen; + u16 etype; eh = mtod(mp, struct ether_vlan_header *); if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 993aa48d51ef..d79972e0788d 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/***************************************************************************** Copyright (c) 2001-2017, Intel Corporation All rights reserved. @@ -29,7 +29,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -******************************************************************************/ +*****************************************************************************/ #include "opt_inet.h" #include "opt_inet6.h" @@ -58,53 +58,94 @@ static const char ixgbe_driver_version[] = "4.0.1-k"; ************************************************************************/ static const pci_vendor_info_t ixgbe_vendor_info_array[] = { - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, "Intel(R) 82598EB AF (Dual Fiber)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, "Intel(R) 82598EB AF (Fiber)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4, "Intel(R) 82598EB AT (CX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, "Intel(R) 82598EB AT"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2, "Intel(R) 82598EB AT2"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598, "Intel(R) 82598"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT, "Intel(R) 82598EB AF DA (Dual Fiber)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT, "Intel(R) 82598EB AT (Dual CX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR, "Intel(R) 82598EB AF (Dual Fiber LR)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM, "Intel(R) 82598EB AF (Dual Fiber SR)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM, "Intel(R) 82598EB LOM"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4, "Intel(R) X520 82599 (KX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ, "Intel(R) X520 82599 (KX4 Mezzanine)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, "Intel(R) X520 82599ES (SFI/SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, "Intel(R) X520 82599 (XAUI/BX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, "Intel(R) X520 82599 (Dual CX4)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, "Intel(R) X520-T 82599 LOM"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_LS, "Intel(R) X520 82599 LS"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, "Intel(R) X520 82599 (Combined Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, "Intel(R) X520 82599 (Backplane w/FCoE)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, "Intel(R) X520 82599 (Dual SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, "Intel(R) X520 82599 (Dual SFP+ w/FCoE)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, "Intel(R) X520-1 82599EN (SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP, "Intel(R) X520-4 82599 (Quad SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_QSFP_SF_QP, "Intel(R) X520-Q1 82599 (QSFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, "Intel(R) X540-AT2"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, "Intel(R) X540-T1"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T, "Intel(R) X550-T2"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T1, "Intel(R) X550-T1"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KR, "Intel(R) X552 (KR Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4, "Intel(R) X552 (KX4 Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T, "Intel(R) X552/X557-AT (10GBASE-T)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_1G_T, "Intel(R) X552 (1000BASE-T)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_SFP, "Intel(R) X552 (SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR, "Intel(R) X553 (KR Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR_L, "Intel(R) X553 L (KR Backplane)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP, "Intel(R) X553 (SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP_N, "Intel(R) X553 N (SFP+)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII, "Intel(R) X553 (1GbE SGMII)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII_L, "Intel(R) X553 L (1GbE SGMII)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_10G_T, "Intel(R) X553/X557-AT (10GBASE-T)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T, "Intel(R) X553 (1GbE)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T_L, "Intel(R) X553 L (1GbE)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_BYPASS, "Intel(R) X540-T2 (Bypass)"), - PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BYPASS, "Intel(R) X520 82599 (Bypass)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, + "Intel(R) 82598EB AF (Dual Fiber)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, + "Intel(R) 82598EB AF (Fiber)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4, + "Intel(R) 82598EB AT (CX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, + "Intel(R) 82598EB AT"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2, + "Intel(R) 82598EB AT2"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598, "Intel(R) 82598"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT, + "Intel(R) 82598EB AF DA (Dual Fiber)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT, + "Intel(R) 82598EB AT (Dual CX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR, + "Intel(R) 82598EB AF (Dual Fiber LR)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM, + "Intel(R) 82598EB AF (Dual Fiber SR)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM, + "Intel(R) 82598EB LOM"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4, + "Intel(R) X520 82599 (KX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ, + "Intel(R) X520 82599 (KX4 Mezzanine)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, + "Intel(R) X520 82599ES (SFI/SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, + "Intel(R) X520 82599 (XAUI/BX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, + "Intel(R) X520 82599 (Dual CX4)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, + "Intel(R) X520-T 82599 LOM"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_LS, + "Intel(R) X520 82599 LS"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, + "Intel(R) X520 82599 (Combined Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, + "Intel(R) X520 82599 (Backplane w/FCoE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, + "Intel(R) X520 82599 (Dual SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, + "Intel(R) X520 82599 (Dual SFP+ w/FCoE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, + "Intel(R) X520-1 82599EN (SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP, + "Intel(R) X520-4 82599 (Quad SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_QSFP_SF_QP, + "Intel(R) X520-Q1 82599 (QSFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, + "Intel(R) X540-AT2"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, "Intel(R) X540-T1"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T, "Intel(R) X550-T2"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T1, "Intel(R) X550-T1"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KR, + "Intel(R) X552 (KR Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4, + "Intel(R) X552 (KX4 Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T, + "Intel(R) X552/X557-AT (10GBASE-T)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_1G_T, + "Intel(R) X552 (1000BASE-T)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_SFP, + "Intel(R) X552 (SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR, + "Intel(R) X553 (KR Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR_L, + "Intel(R) X553 L (KR Backplane)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP, + "Intel(R) X553 (SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP_N, + "Intel(R) X553 N (SFP+)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII, + "Intel(R) X553 (1GbE SGMII)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII_L, + "Intel(R) X553 L (1GbE SGMII)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_10G_T, + "Intel(R) X553/X557-AT (10GBASE-T)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T, + "Intel(R) X553 (1GbE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T_L, + "Intel(R) X553 L (1GbE)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_BYPASS, + "Intel(R) X540-T2 (Bypass)"), + PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BYPASS, + "Intel(R) X520 82599 (Bypass)"), /* required last entry */ - PVID_END + PVID_END }; static void *ixgbe_register(device_t); @@ -127,8 +168,10 @@ static int ixgbe_if_mtu_set(if_ctx_t, uint32_t); static void ixgbe_if_crcstrip_set(if_ctx_t, int, int); static void ixgbe_if_multi_set(if_ctx_t); static int ixgbe_if_promisc_set(if_ctx_t, int); -static int ixgbe_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); -static int ixgbe_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); +static int ixgbe_if_tx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); +static int ixgbe_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, + int); static void ixgbe_if_queues_free(if_ctx_t); static void ixgbe_if_timer(if_ctx_t, uint16_t); static void ixgbe_if_update_admin_status(if_ctx_t); @@ -319,7 +362,8 @@ static int ixgbe_smart_speed = ixgbe_smart_speed_on; * but this allows it to be forced off for testing. */ static int ixgbe_enable_msix = 1; -SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, 0, +SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, + 0, "Enable MSI-X interrupts"); /* @@ -337,12 +381,14 @@ SYSCTL_INT(_hw_ix, OID_AUTO, unsupported_sfp, CTLFLAG_RDTUN, * so we'll default to turning it off. */ static int ixgbe_enable_fdir = 0; -SYSCTL_INT(_hw_ix, OID_AUTO, enable_fdir, CTLFLAG_RDTUN, &ixgbe_enable_fdir, 0, +SYSCTL_INT(_hw_ix, OID_AUTO, enable_fdir, CTLFLAG_RDTUN, &ixgbe_enable_fdir, + 0, "Enable Flow Director"); /* Receive-Side Scaling */ static int ixgbe_enable_rss = 1; -SYSCTL_INT(_hw_ix, OID_AUTO, enable_rss, CTLFLAG_RDTUN, &ixgbe_enable_rss, 0, +SYSCTL_INT(_hw_ix, OID_AUTO, enable_rss, CTLFLAG_RDTUN, &ixgbe_enable_rss, + 0, "Enable Receive-Side Scaling (RSS)"); /* @@ -352,7 +398,8 @@ SYSCTL_INT(_hw_ix, OID_AUTO, enable_rss, CTLFLAG_RDTUN, &ixgbe_enable_rss, 0, * traffic for that interrupt vector */ static int ixgbe_enable_aim = false; -SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &ixgbe_enable_aim, 0, +SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &ixgbe_enable_aim, + 0, "Enable adaptive interrupt moderation"); #if 0 @@ -408,9 +455,9 @@ ixgbe_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxqs, int ntxqsets) { struct ixgbe_softc *sc = iflib_get_softc(ctx); - if_softc_ctx_t scctx = sc->shared; + if_softc_ctx_t scctx = sc->shared; struct ix_tx_queue *que; - int i, j, error; + int i, j, error; MPASS(sc->num_tx_queues > 0); MPASS(sc->num_tx_queues == ntxqsets); @@ -418,8 +465,8 @@ ixgbe_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, /* Allocate queue structure memory */ sc->tx_queues = - (struct ix_tx_queue *)malloc(sizeof(struct ix_tx_queue) * ntxqsets, - M_IXGBE, M_NOWAIT | M_ZERO); + (struct ix_tx_queue *)malloc(sizeof(struct ix_tx_queue) * + ntxqsets, M_IXGBE, M_NOWAIT | M_ZERO); if (!sc->tx_queues) { device_printf(iflib_get_dev(ctx), "Unable to allocate TX ring memory\n"); @@ -430,20 +477,20 @@ ixgbe_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, struct tx_ring *txr = &que->txr; /* In case SR-IOV is enabled, align the index properly */ - txr->me = ixgbe_vf_que_index(sc->iov_mode, sc->pool, - i); + txr->me = ixgbe_vf_que_index(sc->iov_mode, sc->pool, i); txr->sc = que->sc = sc; /* Allocate report status array */ - txr->tx_rsq = (qidx_t *)malloc(sizeof(qidx_t) * scctx->isc_ntxd[0], M_IXGBE, M_NOWAIT | M_ZERO); + txr->tx_rsq = (qidx_t *)malloc(sizeof(qidx_t) * + scctx->isc_ntxd[0], M_IXGBE, M_NOWAIT | M_ZERO); if (txr->tx_rsq == NULL) { error = ENOMEM; goto fail; } for (j = 0; j < scctx->isc_ntxd[0]; j++) txr->tx_rsq[j] = QIDX_INVALID; - /* get the virtual and physical address of the hardware queues */ + /* get virtual and physical address of the hardware queues */ txr->tail = IXGBE_TDT(txr->me); txr->tx_base = (union ixgbe_adv_tx_desc *)vaddrs[i]; txr->tx_paddr = paddrs[i]; @@ -475,9 +522,9 @@ static int ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxqs, int nrxqsets) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); struct ix_rx_queue *que; - int i; + int i; MPASS(sc->num_rx_queues > 0); MPASS(sc->num_rx_queues == nrxqsets); @@ -486,7 +533,7 @@ ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, /* Allocate queue structure memory */ sc->rx_queues = (struct ix_rx_queue *)malloc(sizeof(struct ix_rx_queue)*nrxqsets, - M_IXGBE, M_NOWAIT | M_ZERO); + M_IXGBE, M_NOWAIT | M_ZERO); if (!sc->rx_queues) { device_printf(iflib_get_dev(ctx), "Unable to allocate TX ring memory\n"); @@ -497,8 +544,7 @@ ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, struct rx_ring *rxr = &que->rxr; /* In case SR-IOV is enabled, align the index properly */ - rxr->me = ixgbe_vf_que_index(sc->iov_mode, sc->pool, - i); + rxr->me = ixgbe_vf_que_index(sc->iov_mode, sc->pool, i); rxr->sc = que->sc = sc; @@ -522,10 +568,10 @@ ixgbe_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, static void ixgbe_if_queues_free(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); struct ix_tx_queue *tx_que = sc->tx_queues; struct ix_rx_queue *rx_que = sc->rx_queues; - int i; + int i; if (tx_que != NULL) { for (i = 0; i < sc->num_tx_queues; i++, tx_que++) { @@ -553,10 +599,10 @@ static void ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) { struct ixgbe_hw *hw = &sc->hw; - u32 reta = 0, mrqc, rss_key[10]; - int queue_id, table_size, index_mult; - int i, j; - u32 rss_hash_config; + u32 reta = 0, mrqc, rss_key[10]; + int queue_id, table_size, index_mult; + int i, j; + u32 rss_hash_config; if (sc->feat_en & IXGBE_FEATURE_RSS) { /* Fetch the configured RSS key */ @@ -608,8 +654,8 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) if (i < 128) IXGBE_WRITE_REG(hw, IXGBE_RETA(i >> 2), reta); else - IXGBE_WRITE_REG(hw, IXGBE_ERETA((i >> 2) - 32), - reta); + IXGBE_WRITE_REG(hw, + IXGBE_ERETA((i >> 2) - 32), reta); reta = 0; } } @@ -627,12 +673,12 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) * and so we end up with a mix of 2-tuple and 4-tuple * traffic. */ - rss_hash_config = RSS_HASHTYPE_RSS_IPV4 - | RSS_HASHTYPE_RSS_TCP_IPV4 - | RSS_HASHTYPE_RSS_IPV6 - | RSS_HASHTYPE_RSS_TCP_IPV6 - | RSS_HASHTYPE_RSS_IPV6_EX - | RSS_HASHTYPE_RSS_TCP_IPV6_EX; + rss_hash_config = RSS_HASHTYPE_RSS_IPV4 | + RSS_HASHTYPE_RSS_TCP_IPV4 | + RSS_HASHTYPE_RSS_IPV6 | + RSS_HASHTYPE_RSS_TCP_IPV6 | + RSS_HASHTYPE_RSS_IPV6_EX | + RSS_HASHTYPE_RSS_TCP_IPV6_EX; } mrqc = IXGBE_MRQC_RSSEN; @@ -666,14 +712,14 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc) static void ixgbe_initialize_receive_units(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); - if_softc_ctx_t scctx = sc->shared; - struct ixgbe_hw *hw = &sc->hw; - struct ifnet *ifp = iflib_get_ifp(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); + if_softc_ctx_t scctx = sc->shared; + struct ixgbe_hw *hw = &sc->hw; + struct ifnet *ifp = iflib_get_ifp(ctx); struct ix_rx_queue *que; - int i, j; - u32 bufsz, fctrl, srrctl, rxcsum; - u32 hlreg; + int i, j; + u32 bufsz, fctrl, srrctl, rxcsum; + u32 hlreg; /* * Make sure receives are disabled while @@ -704,7 +750,7 @@ ixgbe_initialize_receive_units(if_ctx_t ctx) /* Setup the Base and Length of the Rx Descriptor Ring */ for (i = 0, que = sc->rx_queues; i < sc->num_rx_queues; i++, que++) { struct rx_ring *rxr = &que->rxr; - u64 rdba = rxr->rx_paddr; + u64 rdba = rxr->rx_paddr; j = rxr->me; @@ -746,10 +792,10 @@ ixgbe_initialize_receive_units(if_ctx_t ctx) } if (sc->hw.mac.type != ixgbe_mac_82598EB) { - u32 psrtype = IXGBE_PSRTYPE_TCPHDR - | IXGBE_PSRTYPE_UDPHDR - | IXGBE_PSRTYPE_IPV4HDR - | IXGBE_PSRTYPE_IPV6HDR; + u32 psrtype = IXGBE_PSRTYPE_TCPHDR | + IXGBE_PSRTYPE_UDPHDR | + IXGBE_PSRTYPE_IPV4HDR | + IXGBE_PSRTYPE_IPV6HDR; IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype); } @@ -779,9 +825,9 @@ ixgbe_initialize_receive_units(if_ctx_t ctx) static void ixgbe_initialize_transmit_units(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); - struct ixgbe_hw *hw = &sc->hw; - if_softc_ctx_t scctx = sc->shared; + struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_hw *hw = &sc->hw; + if_softc_ctx_t scctx = sc->shared; struct ix_tx_queue *que; int i; @@ -822,7 +868,8 @@ ixgbe_initialize_transmit_units(if_ctx_t ctx) txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(j)); break; default: - txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(j)); + txctrl = + IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(j)); break; } txctrl &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; @@ -831,7 +878,8 @@ ixgbe_initialize_transmit_units(if_ctx_t ctx) IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(j), txctrl); break; default: - IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(j), txctrl); + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(j), + txctrl); break; } @@ -876,12 +924,12 @@ ixgbe_register(device_t dev) static int ixgbe_if_attach_pre(if_ctx_t ctx) { - struct ixgbe_softc *sc; - device_t dev; - if_softc_ctx_t scctx; + struct ixgbe_softc *sc; + device_t dev; + if_softc_ctx_t scctx; struct ixgbe_hw *hw; - int error = 0; - u32 ctrl_ext; + int error = 0; + u32 ctrl_ext; size_t i; INIT_DEBUGOUT("ixgbe_attach: begin"); @@ -923,8 +971,10 @@ ixgbe_if_attach_pre(if_ctx_t ctx) goto err_pci; } - if (hw->mac.ops.fw_recovery_mode && hw->mac.ops.fw_recovery_mode(hw)) { - device_printf(dev, "Firmware recovery mode detected. Limiting " + if (hw->mac.ops.fw_recovery_mode && + hw->mac.ops.fw_recovery_mode(hw)) { + device_printf(dev, + "Firmware recovery mode detected. Limiting " "functionality.\nRefer to the Intel(R) Ethernet Adapters " "and Devices User Guide for details on firmware recovery " "mode."); @@ -991,7 +1041,12 @@ ixgbe_if_attach_pre(if_ctx_t ctx) error = ixgbe_start_hw(hw); switch (error) { case IXGBE_ERR_EEPROM_VERSION: - device_printf(dev, "This device is a pre-production adapter/LOM. Please be aware there may be issues associated with your hardware.\nIf you are experiencing problems please contact your Intel or hardware representative who provided you with this hardware.\n"); + device_printf(dev, + "This device is a pre-production adapter/LOM. Please be" + " aware there may be issues associated with your" + " hardware.\nIf you are experiencing problems please" + " contact your Intel or hardware representative who" + " provided you with this hardware.\n"); break; case IXGBE_ERR_SFP_NOT_SUPPORTED: device_printf(dev, "Unsupported SFP+ Module\n"); @@ -1073,15 +1128,14 @@ static int ixgbe_if_attach_post(if_ctx_t ctx) { device_t dev; - struct ixgbe_softc *sc; + struct ixgbe_softc *sc; struct ixgbe_hw *hw; - int error = 0; + int error = 0; dev = iflib_get_dev(ctx); sc = iflib_get_softc(ctx); hw = &sc->hw; - if (sc->intr_type == IFLIB_INTR_LEGACY && (sc->feat_cap & IXGBE_FEATURE_LEGACY_IRQ) == 0) { device_printf(dev, "Device does not support legacy interrupts"); @@ -1090,10 +1144,11 @@ ixgbe_if_attach_post(if_ctx_t ctx) } /* Allocate multicast array memory. */ - sc->mta = malloc(sizeof(*sc->mta) * - MAX_NUM_MULTICAST_ADDRESSES, M_IXGBE, M_NOWAIT); + sc->mta = malloc(sizeof(*sc->mta) * MAX_NUM_MULTICAST_ADDRESSES, + M_IXGBE, M_NOWAIT); if (sc->mta == NULL) { - device_printf(dev, "Can not allocate multicast setup array\n"); + device_printf(dev, + "Can not allocate multicast setup array\n"); error = ENOMEM; goto err; } @@ -1173,7 +1228,7 @@ static void ixgbe_check_wol_support(struct ixgbe_softc *sc) { struct ixgbe_hw *hw = &sc->hw; - u16 dev_caps = 0; + u16 dev_caps = 0; /* Find out WoL support for port */ sc->wol_support = hw->wol_enabled = 0; @@ -1197,7 +1252,7 @@ ixgbe_check_wol_support(struct ixgbe_softc *sc) static int ixgbe_setup_interface(if_ctx_t ctx) { - struct ifnet *ifp = iflib_get_ifp(ctx); + struct ifnet *ifp = iflib_get_ifp(ctx); struct ixgbe_softc *sc = iflib_get_softc(ctx); INIT_DEBUGOUT("ixgbe_setup_interface: begin"); @@ -1223,7 +1278,7 @@ static uint64_t ixgbe_if_get_counter(if_ctx_t ctx, ift_counter cnt) { struct ixgbe_softc *sc = iflib_get_softc(ctx); - if_t ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); switch (cnt) { case IFCOUNTER_IPACKETS: @@ -1257,10 +1312,9 @@ ixgbe_if_get_counter(if_ctx_t ctx, ift_counter cnt) static int ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); - struct ixgbe_hw *hw = &sc->hw; - int i; - + struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_hw *hw = &sc->hw; + int i; if (hw->phy.ops.read_i2c_byte == NULL) return (ENXIO); @@ -1270,7 +1324,8 @@ ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req) return (0); } /* ixgbe_if_i2c_req */ -/* ixgbe_if_needs_restart - Tell iflib when the driver needs to be reinitialized +/* ixgbe_if_needs_restart - Tell iflib when the driver needs to be + * reinitialized * @ctx: iflib context * @event: event code to check * @@ -1294,10 +1349,10 @@ ixgbe_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event) static void ixgbe_add_media_types(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); struct ixgbe_hw *hw = &sc->hw; - device_t dev = iflib_get_dev(ctx); - u64 layer; + device_t dev = iflib_get_dev(ctx); + u64 layer; layer = sc->phy_layer = ixgbe_get_supported_physical_layer(hw); @@ -1417,10 +1472,10 @@ ixgbe_is_sfp(struct ixgbe_hw *hw) static void ixgbe_config_link(if_ctx_t ctx) { - struct ixgbe_softc *sc = iflib_get_softc(ctx); + struct ixgbe_softc *sc = iflib_get_softc(ctx); struct ixgbe_hw *hw = &sc->hw; - u32 autoneg, err = 0; - bool sfp, negotiate; + u32 autoneg, err = 0; + bool sfp, negotiate; sfp = ixgbe_is_sfp(hw); @@ -1481,11 +1536,11 @@ ixgbe_config_link(if_ctx_t ctx) static void ixgbe_update_stats_counters(struct ixgbe_softc *sc) { - struct ixgbe_hw *hw = &sc->hw; + struct ixgbe_hw *hw = &sc->hw; struct ixgbe_hw_stats *stats = &sc->stats.pf; - u32 missed_rx = 0, bprc, lxon, lxoff, total; - u32 lxoffrxc; - u64 total_missed_rx = 0; + u32 missed_rx = 0, bprc, lxon, lxoff, total; + u32 lxoffrxc; + u64 total_missed_rx = 0; stats->crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS); stats->illerrc += IXGBE_READ_REG(hw, IXGBE_ILLERRC); @@ -1630,19 +1685,19 @@ ixgbe_update_stats_counters(struct ixgbe_softc *sc) static void ixgbe_add_hw_stats(struct ixgbe_softc *sc) { - device_t dev = iflib_get_dev(sc->ctx); - struct ix_rx_queue *rx_que; - struct ix_tx_queue *tx_que; + device_t dev = iflib_get_dev(sc->ctx); + struct ix_rx_queue *rx_que; + struct ix_tx_queue *tx_que; struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev); - struct sysctl_oid *tree = device_get_sysctl_tree(dev); + struct sysctl_oid *tree = device_get_sysctl_tree(dev); struct sysctl_oid_list *child = SYSCTL_CHILDREN(tree); - struct ixgbe_hw_stats *stats = &sc->stats.pf; - struct sysctl_oid *stat_node, *queue_node; + struct ixgbe_hw_stats *stats = &sc->stats.pf; + struct sysctl_oid *stat_node, *queue_node; struct sysctl_oid_list *stat_list, *queue_list; - int i; + int i; #define QUEUE_NAME_LEN 32 - char namebuf[QUEUE_NAME_LEN]; + char namebuf[QUEUE_NAME_LEN]; /* Driver Statistics */ SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "dropped", @@ -1652,7 +1707,8 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "link_irq", CTLFLAG_RD, &sc->link_irq, "Link MSI-X IRQ Handled"); - for (i = 0, tx_que = sc->tx_queues; i < sc->num_tx_queues; i++, tx_que++) { + for (i = 0, tx_que = sc->tx_queues; i < sc->num_tx_queues; + i++, tx_que++) { 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, @@ -1661,10 +1717,12 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", CTLTYPE_UINT | CTLFLAG_RD, txr, 0, - ixgbe_sysctl_tdh_handler, "IU", "Transmit Descriptor Head"); + ixgbe_sysctl_tdh_handler, "IU", + "Transmit Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", CTLTYPE_UINT | CTLFLAG_RD, txr, 0, - ixgbe_sysctl_tdt_handler, "IU", "Transmit Descriptor Tail"); + ixgbe_sysctl_tdt_handler, "IU", + "Transmit Descriptor Tail"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tso_tx", CTLFLAG_RD, &txr->tso_tx, "TSO"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tx_packets", @@ -1672,7 +1730,8 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) "Queue Packets Transmitted"); } - for (i = 0, rx_que = sc->rx_queues; i < sc->num_rx_queues; i++, rx_que++) { + for (i = 0, rx_que = sc->rx_queues; i < sc->num_rx_queues; + i++, rx_que++) { 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, @@ -1689,10 +1748,12 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) "irqs on this queue"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", CTLTYPE_UINT | CTLFLAG_RD, rxr, 0, - ixgbe_sysctl_rdh_handler, "IU", "Receive Descriptor Head"); + ixgbe_sysctl_rdh_handler, "IU", + "Receive Descriptor Head"); *** 2221 LINES SKIPPED *** From nobody Wed Nov 27 02:14:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyjgQ68mqz5fN1n; Wed, 27 Nov 2024 02:14:26 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyjgQ3s9lz4gG6; Wed, 27 Nov 2024 02:14:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HSj5W+jx9z8gLDc5q0+GE4OS2w2LguxPRtSuMCbLKhg=; b=Yx5sykirwdC7q1VerpNsuTzTlZY0P1rQMVOUHwEnv3C7rUJp31tFGwBT48W5wiCeP9+ojb otudT1MJJXHQbNEPhRyT6YgQA8Y1/aw5Apw3IcxC0FuZ2PtYWL9l11XBZBe7GtIPvl7kHI gkzcVkc+akZBzQ06e17dEBt1x/hERCBGaKa2j5vy8naCh2wFcTUAAz8DZLBvlE85rYnlnu 5a9xZeFGG/wPkHQuTYkWplXjHpAa1yOY5pYLTvnzRfkVVJS0YoWWh2z54xCUHDC7/jso/3 Y/rG932dQBar5/jsBvVsbrbGol69+83mg+y6+gaPz1aAZHjY8CZg6zTJDIy/wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HSj5W+jx9z8gLDc5q0+GE4OS2w2LguxPRtSuMCbLKhg=; b=kqTyXnH9yhe0KTWqe992PqMG5Q7+unL6eSlQWxN78PXXc+1iiXlSJSV4Mz5ZOe+uEKklZ/ BgE+Tm55VG5iNmrWrUKcwhPtiAzC3+IXaG2+qY84Jjo09Dn5lWHrttgtlYD4mDeuxxxj6k 0ne6TM5adxz/RBp+g1KxVbfPTGSg5NL5yryGofdg3Z0YkfsScqPOa0/bBIY4d3b0+o2YzJ 8mgkIgNVS4lSE0tJ7gnwknc/vRA3eKhNMi+0/PCCnZ+cgxBULiQZGd4iURgP3CRs3zOxxF tQx43Meyuqt4HXxF2YnEK4kseZZyRWmNGwC9PJ37xk0T6nwcNxALJzi0Nm8oVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732673666; a=rsa-sha256; cv=none; b=qyDSB3ppgsKc4x4DwqrI7ssdPEGhinfE7FQNd2ASb41UlOaq1R+Rdkvt5+DgHSYWYXZnwP A7LPHuzcdqC8IdW8UQjFVZHD5l+K259e8Z3526azDZJrgSLrUdQxHlrQ8RscvsDhbTRP2h bUW4IY5loOo8yVIUfZoSsSA9JQOdqb3cyjZ4S7OcGnAFJpMMmAi0ABib5tFzp0z+lfXK5c FvJ4dcvC6qz+rT3HWnNrfdTA5kkPTxv18S6e+OJ9Qs64TMKvN6TjWmMWwWT20w+Yf8qZLZ e0ZRtELUeGlYJ8T9hjbKdF3Tdtg7SH0ODBd24z9QTY0xxOvBD1c7UIi3dKib1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyjgQ2Xc5zqbt; Wed, 27 Nov 2024 02:14:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR2EQKf066828; Wed, 27 Nov 2024 02:14:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR2EQla066823; Wed, 27 Nov 2024 02:14:26 GMT (envelope-from git) Date: Wed, 27 Nov 2024 02:14:26 GMT Message-Id: <202411270214.4AR2EQla066823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 8de3ffc1c780 - stable/13 - ixgbe: Do not count L3/L4 checksum errors as input errors List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8de3ffc1c78009162dbcfe0c82f56526394bc884 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=8de3ffc1c78009162dbcfe0c82f56526394bc884 commit 8de3ffc1c78009162dbcfe0c82f56526394bc884 Author: Andrew Gallatin AuthorDate: 2023-02-02 15:02:44 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 01:13:56 +0000 ixgbe: Do not count L3/L4 checksum errors as input errors NIC input errors have traditionally indicated problems at the link level (crc errors, runts, etc). People tend to build monitoring infrastructure around such errors in order to monitor for bad network hardware. When L3/L4 checksum errors are included in the category of input errors, it breaks such monitoring, as these errors can originate anywhere on the internet, and do not necessarily indicate faulty local network hardware. Reviewed by: erj, glebius Differential Revision: https://reviews.freebsd.org/D38346 Sponsored by: Netflix (cherry picked from commit 8de48df35c3bf4800176b7aa54c75a01864d458b) --- sys/dev/ixgbe/if_ix.c | 9 ++------- sys/dev/ixgbe/ixgbe.h | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index d79972e0788d..3639adc0feba 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1660,21 +1660,16 @@ ixgbe_update_stats_counters(struct ixgbe_softc *sc) * Aggregate following types of errors as RX errors: * - CRC error count, * - illegal byte error count, - * - checksum error count, * - missed packets count, * - length error count, * - undersized packets count, * - fragmented packets count, * - oversized packets count, * - jabber count. - * - * Ignore XEC errors for 82599 to workaround errata about - * UDP frames with zero checksum. */ IXGBE_SET_IERRORS(sc, stats->crcerrs + stats->illerrc + - (hw->mac.type != ixgbe_mac_82599EB ? stats->xec : 0) + - stats->mpc[0] + stats->rlec + stats->ruc + stats->rfc + stats->roc + - stats->rjc); + stats->mpc[0] + stats->rlec + stats->ruc + stats->rfc + + stats->roc + stats->rjc); } /* ixgbe_update_stats_counters */ /************************************************************************ diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 3b8782bec6ed..5141e9d27003 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -510,7 +510,6 @@ struct ixgbe_softc { "\nSum of the following RX errors counters:\n" \ " * CRC errors,\n" \ " * illegal byte error count,\n" \ - " * checksum error count,\n" \ " * missed packet count,\n" \ " * length error count,\n" \ " * undersized packets count,\n" \ From nobody Wed Nov 27 02:14:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyjgS6BLWz5fMkV; Wed, 27 Nov 2024 02:14:28 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyjgS4y7fz4g12; Wed, 27 Nov 2024 02:14:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4bYuRsx4u55lOw5x2+tjAfGaithpRYQpOp205BIPW0w=; b=hROnGgijS1QIevYteQKeuoaaAcSxWhD5pq5J16JVVfl62Z4R/+izY1MKhQwiHm4FSi0eFu 4d3QfLeK62pxeWe/RVCnQBH6ocB4IKa+J0/Ufj6m6eSs/FYsCywxRAkteESPItlwqTJk/0 Z3hvugBSUTmS3HdzHevLG8tndwqtuJHb0Z3ycREPNxTwpUNOWRaMO4De/06kN5T60nubGH hFhb9ozJNuaAOYsIMwzKdChqme0iI7EcWI5j3CEefQNXZQcxVEzJjtHmPOVRUF5LYGFtPH xUEY1MguzyNTswlcEHCKawr8FmfGGhqy5LcyT63V1FFR6vEbBXn38ZV9AYRPtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4bYuRsx4u55lOw5x2+tjAfGaithpRYQpOp205BIPW0w=; b=CbOuHKNhvQvrtyAnApG62qOiKjZth+VBLl6vAcXFxNf0SClmEFUBxycUEcMr40VgQLjnyK bqsIeP6PlHgoIk5M1zlpE1gQdhfOZ2zceFlzkt3h/qkwZpBEDSZ6ffNmBPhGUjN7pxJBep Managp9gibcqNxJee6ey5B81FtWMpI5p7VyQtnw9Csl0yuwYVo5vRPVPdY3yQw6KfUHHY9 uWqBzhvY4xXGdSfjwLVrsT53qtHp32LdruZbhN3yQrfZPJ3hgoWfQ2HbVpsftmdjIfF8X7 2ainIPrgivpLBCnYz8mXo4e4HhdGWYFdnXGTjcR96bfqGWd6AgLOWzIe0rOQCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732673668; a=rsa-sha256; cv=none; b=gyV5ro3RIdH08v+aDeM89+TdLD/V0FASS0bxk+ijbqAf000pnnuR1Zd2goNSHuO+42Z/yr lrLjFHpmn8OdHwKTGdata5d/kDJZrUH+F20K1VCTKbOuLQBDafL6Z6my0M9JxiTAwX4axq X7jYDwe6+5s2wjMRKG6mimhFhwRx2Y6nE67Ic8PPbX8ZyJymH0+PgcMTDbT3Hg0fFZakHd oFzeb1SUk5jUbjIyfLaLKK9hYKr1OYzh9L1TQuYsajRdsBBxFPmUXj6ZjILihU3W03tx8u AhIgv4vsPGwluBpXV6OFeOrd3KtUxwOJAHJh5ghVtZjapRMq18+NHBx0nb7Cog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyjgS4WdTzqmX; Wed, 27 Nov 2024 02:14:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR2ESW0066935; Wed, 27 Nov 2024 02:14:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR2ESbU066932; Wed, 27 Nov 2024 02:14:28 GMT (envelope-from git) Date: Wed, 27 Nov 2024 02:14:28 GMT Message-Id: <202411270214.4AR2ESbU066932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: a6a48a9fb1d0 - stable/13 - ix: remove stale comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a6a48a9fb1d0584c30593b00b4d8887f16555868 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a6a48a9fb1d0584c30593b00b4d8887f16555868 commit a6a48a9fb1d0584c30593b00b4d8887f16555868 Author: Piotr Kubaj AuthorDate: 2023-07-11 16:45:04 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 01:16:56 +0000 ix: remove stale comment Reported by: Navdeep Parhar (cherry picked from commit 6ad2a9a64f34ea3b376c3064fcba30b3c8e654dd) --- sys/dev/ixgbe/if_ix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 0fa66ef2055c..2fb1c289ada4 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -3879,7 +3879,6 @@ ixgbe_if_update_admin_status(if_ctx_t ctx) ixgbe_fc_enable(&sc->hw); /* Update DMA coalescing config */ ixgbe_config_dmac(sc); - /* should actually be negotiated value */ iflib_link_state_change(ctx, LINK_STATE_UP, ixgbe_link_speed_to_baudrate(adapter->link_speed)); From nobody Wed Nov 27 02:14:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyjgR5kmmz5fN6S; Wed, 27 Nov 2024 02:14:27 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyjgR4JH9z4gGH; Wed, 27 Nov 2024 02:14:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FJilFquY6Ne1SWh6q20m6oj2BZ9sG8vVxb9KPHf+8Pw=; b=t7IkauYH2/FvrBlypbN8Qas27ai0L4Bn4f4C7Dymu3CNRE5PPnNToecPNMnzz1yMBX+Dcr iAbWMjqq+VMEH3BUMVlDiKi6in4pYMK/jzwubp5l1+QZurEp8KFOX7dhCayezmqq4qV4F9 OugXBfsoeeaZ79CYavLyDCcEXNfxJkwniWrO+E+FTznwOTmsXJQ68EqcNunUmtdjGpr4w+ SbQaMPf4vHovdi13xGV0Z07pmsj7YGoCWiHez3nUES+2P43yQXIPUosAq9PkiBD4L1ZtqI pt25tmZy5f2AJof26tveV78eEAKjzAi2hIiCgt/ad4Jr/uiQz7lPvX2F7udpWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FJilFquY6Ne1SWh6q20m6oj2BZ9sG8vVxb9KPHf+8Pw=; b=KZi2tm3fA4D8z2rofb4glGI8D3tGqOosx5VNyDAAtmt9Jqgt1velXd3uhYb1iqnv8hXfHQ nlJ1lqI6vjeU2waw8Z0i2dk17dvZ17zYlG2Mm8MgHaZfDz+CerPhxNcrY1G1FU6hcuFQ28 aFK+WEdOEQT19WfM2jP5ySwo0zRJBGJkKbNxeQfsyeMWcPY9ovZipNC+yEtFzae0ZSYVPK qRbMNBObHrXCDXAOGFhpx937rJ1pUvF/9oyI5c5v31A1BPXLusvckZAzrGKhLu0Ud75S3i MgcO+YpzqfQayaWdIUYV4whm1zqTMI5QBywZFdiDtnG5GpI/FgtprvTjlfaTmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732673667; a=rsa-sha256; cv=none; b=bbtqs6CjenkJRP+lfOUPJjBrr4dwLkLf6b1+VuKZdsBN9sLNfk86k5T2IlAbr3XstuRAQt ishLXC7DQhCMSfZxB4eHM1KXMjJy5oLERsE16jfBp9lkYRJTHcMC6NKoSpHRSqHRxwBNCf igU+/39zOlpf/Dr0SFoSNvqiiXWIDzx1Uh0UBWI4Vobsg23vQJBJZCpirXS9cAc0seCASW /3iwiIUjSrHpM8Z21aAtMfQ11K+IfIMEI5wxfX73DCvoOtINdhI3/2pAo7D5fEyiG5wXQA u4bkOTppkb9R2ETo1k+OKESplbTsX6D/q85k9IUCl7RHSFDRQWAkDaIsDh1s3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyjgR3YzrzqKw; Wed, 27 Nov 2024 02:14:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR2ERCJ066894; Wed, 27 Nov 2024 02:14:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR2ERUR066891; Wed, 27 Nov 2024 02:14:27 GMT (envelope-from git) Date: Wed, 27 Nov 2024 02:14:27 GMT Message-Id: <202411270214.4AR2ERUR066891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: a4eee3fa6043 - stable/13 - ix, ixv: Update link status with autonegotiated baudrate value List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a4eee3fa6043bb619e136f6d4df7feb7027ba1fc Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a4eee3fa6043bb619e136f6d4df7feb7027ba1fc commit a4eee3fa6043bb619e136f6d4df7feb7027ba1fc Author: Piotr Pietruszewski AuthorDate: 2023-07-11 16:14:26 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 01:14:56 +0000 ix, ixv: Update link status with autonegotiated baudrate value Use autonegotiated link speed value while updating link status to iflib. This patch is part of change made in NetBSD kernel by Masanobu Saitoh, NetBSD maintainer. Differential Revision: https://reviews.freebsd.org/D19176 Approved by: erj (cherry picked from commit a0302c9231502bae8f43edbd5fb8d73132eb8da7) --- sys/dev/ixgbe/if_ix.c | 3 ++- sys/dev/ixgbe/if_ixv.c | 2 +- sys/dev/ixgbe/ixgbe.h | 2 ++ sys/dev/ixgbe/ixgbe_osdep.c | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 3639adc0feba..0fa66ef2055c 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -3880,7 +3880,8 @@ ixgbe_if_update_admin_status(if_ctx_t ctx) /* Update DMA coalescing config */ ixgbe_config_dmac(sc); /* should actually be negotiated value */ - iflib_link_state_change(ctx, LINK_STATE_UP, IF_Gbps(10)); + iflib_link_state_change(ctx, LINK_STATE_UP, + ixgbe_link_speed_to_baudrate(adapter->link_speed)); if (sc->feat_en & IXGBE_FEATURE_SRIOV) ixgbe_ping_all_vfs(sc); diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c index 23381dcbe809..6e97e50c1914 100644 --- a/sys/dev/ixgbe/if_ixv.c +++ b/sys/dev/ixgbe/if_ixv.c @@ -941,7 +941,7 @@ ixv_if_update_admin_status(if_ctx_t ctx) "Full Duplex"); sc->link_active = true; iflib_link_state_change(ctx, LINK_STATE_UP, - IF_Gbps(10)); + ixgbe_link_speed_to_baudrate(adapter->link_speed)); } } else { /* Link down */ if (sc->link_active == true) { diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 5141e9d27003..341d4ebfcebc 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -533,6 +533,8 @@ ixv_check_ether_addr(u8 *addr) return (status); } +uint64_t ixgbe_link_speed_to_baudrate(ixgbe_link_speed speed); + /* Shared Prototypes */ int ixgbe_allocate_queues(struct ixgbe_softc *); diff --git a/sys/dev/ixgbe/ixgbe_osdep.c b/sys/dev/ixgbe/ixgbe_osdep.c index 57403b0b2f6c..2fa651df8936 100644 --- a/sys/dev/ixgbe/ixgbe_osdep.c +++ b/sys/dev/ixgbe/ixgbe_osdep.c @@ -75,3 +75,36 @@ ixgbe_write_reg_array(struct ixgbe_hw *hw, u32 reg, u32 offset, u32 val) ((struct ixgbe_softc *)hw->back)->osdep.mem_bus_space_handle, reg + (offset << 2), val); } + +uint64_t +ixgbe_link_speed_to_baudrate(ixgbe_link_speed speed) +{ + uint64_t baudrate; + + switch (speed) { + case IXGBE_LINK_SPEED_10GB_FULL: + baudrate = IF_Gbps(10); + break; + case IXGBE_LINK_SPEED_5GB_FULL: + baudrate = IF_Gbps(5); + break; + case IXGBE_LINK_SPEED_2_5GB_FULL: + baudrate = IF_Mbps(2500); + break; + case IXGBE_LINK_SPEED_1GB_FULL: + baudrate = IF_Gbps(1); + break; + case IXGBE_LINK_SPEED_100_FULL: + baudrate = IF_Mbps(100); + break; + case IXGBE_LINK_SPEED_10_FULL: + baudrate = IF_Mbps(10); + break; + case IXGBE_LINK_SPEED_UNKNOWN: + default: + baudrate = 0; + break; + } + + return baudrate; +} From nobody Wed Nov 27 02:14:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyjgV3MHhz5fN1s; Wed, 27 Nov 2024 02:14:30 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyjgT63Fzz4gBv; Wed, 27 Nov 2024 02:14:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgJEUi85MSpRzn+qyUebtu+yN2zWytoT8MxiAqa6iKY=; b=HDXasSvIVdFaqage+C6xqHyM7gw7ReaaVaDr20Mh4cOeRK5ptatNCVHZPvcGnbXFSwrVWI UIMhSOC02iG+FvC3iCcU5y2F+GBy6e4ouULDeOZk/y0jGWzrnRL4svnniy2T3kpeKgmnNl TtbIERSs9Cye7KsxvqemI/li94KnNrKh6v9qnK+0ZVuEEDrm040OynyEgw1z43vmrOHstj J1YbtAUscd5D7Jk5a9PPcJ6FTG1qORvTyGrjgCxW5s/wH6lpFQgiLkaLA428V3m3kENrS8 pXEPDsfcZAd16cc/CC3j6QMW1H/ma39jYVRKkU047rGWO6VZkKJbG5WzKGow2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgJEUi85MSpRzn+qyUebtu+yN2zWytoT8MxiAqa6iKY=; b=OP6XoAfY/L2+5LgmCpeB0wf6ZRKX9iNyxC1ax1k+AEHZ7+0UfEXnTWbM62b7AfjJDEWfx7 AyJMtdVdSzb7MvAsCy7Qy/NOp2nmHa+vU/2mOFjkCyVTKLdiLLCxKh8fiXdmDzsVF3tYaP A6HKIuRx55IN/e2353wdU22aRnqJ7SIIQPnWBLcMBaoKSF9vZSYIdD2QITPm6n3mx79ibM S5SddosAVX+DP7QqXA41KOvYn1tVr1UqfFnGMlcrUuPI5ppAV0hEFeSkQsg7iWGvsDW6I1 g30srGO02cKY4hHq1d2w8ugOPFkUPyDIsQBUaEvUNOH5TzNYSgZhSMwwGmOw1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732673669; a=rsa-sha256; cv=none; b=gzfotPCs/lR01lSv1pig27KVAgrigSbOj/Z9DLMTX1kBWk31umjlwoUYel1wONRcpu0ilT C11OMcG1/aoXJSFLokNhi+8LPxnk1qaegS23rasMP4W9YlW7bigeqRxj4G3cp+OkCZjgn4 WC4Of9CADkuWVwTNGS+laRtrKAqRiHE0N+OTQDuhTsQ0O8sihPvxNOO1CL9bcmb2Vsw+4m yCHZAqhK2t5q2vC9vD5aeRnNoOh86cMZM6/SH3PFEORPzyKCyobho1wetaXnGvDvz4tLgy N0RB1IQhSyp342Eh0Kp+ijcjtekicI+0GWswBfqyGo8o6TMvVkjvHSBFEr2J+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyjgT5ZCkzq5X; Wed, 27 Nov 2024 02:14:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR2EToC066977; Wed, 27 Nov 2024 02:14:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR2ETGK066974; Wed, 27 Nov 2024 02:14:29 GMT (envelope-from git) Date: Wed, 27 Nov 2024 02:14:29 GMT Message-Id: <202411270214.4AR2ETGK066974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 57b82de88bc4 - stable/13 - ix, ixv: fix kernel build List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 57b82de88bc4f758a198c397c5aec79769689436 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=57b82de88bc4f758a198c397c5aec79769689436 commit 57b82de88bc4f758a198c397c5aec79769689436 Author: Piotr Kubaj AuthorDate: 2023-07-11 17:41:26 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 01:17:10 +0000 ix, ixv: fix kernel build struct adapter was renamed to struct sc. Reported by: FreeBSD User (cherry picked from commit 5ddb1aa3056305c202e604dd456fe0dcf365edd7) --- sys/dev/ixgbe/if_ix.c | 2 +- sys/dev/ixgbe/if_ixv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 2fb1c289ada4..313f95c82713 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -3880,7 +3880,7 @@ ixgbe_if_update_admin_status(if_ctx_t ctx) /* Update DMA coalescing config */ ixgbe_config_dmac(sc); iflib_link_state_change(ctx, LINK_STATE_UP, - ixgbe_link_speed_to_baudrate(adapter->link_speed)); + ixgbe_link_speed_to_baudrate(sc->link_speed)); if (sc->feat_en & IXGBE_FEATURE_SRIOV) ixgbe_ping_all_vfs(sc); diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c index 6e97e50c1914..4812f5e7368c 100644 --- a/sys/dev/ixgbe/if_ixv.c +++ b/sys/dev/ixgbe/if_ixv.c @@ -941,7 +941,7 @@ ixv_if_update_admin_status(if_ctx_t ctx) "Full Duplex"); sc->link_active = true; iflib_link_state_change(ctx, LINK_STATE_UP, - ixgbe_link_speed_to_baudrate(adapter->link_speed)); + ixgbe_link_speed_to_baudrate(sc->link_speed)); } } else { /* Link down */ if (sc->link_active == true) { From nobody Wed Nov 27 02:14:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyjgW1skjz5fMpp; Wed, 27 Nov 2024 02:14:31 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyjgV73jNz4gMy; Wed, 27 Nov 2024 02:14:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mhXL/MfBb+1tdFtGHYvA3tE4DhcTlyH3rW7SEdLrnKA=; b=sOstmDaR94a+XL8bb+t3O3H9kX2QKKZEUF/pnbhebQ1eZiJzCTaecrnm6dlrVDWUHMYwbH 2zOqQWpF4ehskPABLK6pag99pOcJUp0Dy0YMO7s2SU5lrkdd1Q/52f9Yy/UVPJUf+TTIk6 OTcM909+JNZaZXpMUeagvjfeLrYPi4uJn1y49tskPFZLIIZaXKo5+QBTwlPnLq8NgSvOYm tKEaFgIj7D0iZIn1pHayuNlbbO2gMfR3IrpnyH1cs/mFcdyYOfGOtwmjfeJLUJeOFvPGUb +ylIlFrQBGlKFLiLdyItV8HNI6yem3PPiiHM9f1GW+L38I8IKfKGuoFG6m+xqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mhXL/MfBb+1tdFtGHYvA3tE4DhcTlyH3rW7SEdLrnKA=; b=kOCJJfMselVxvvpJjpju/SDmlotv3ZvsIbu/XPS7dQQ0ruwKiDm9fQ6ECcv+ZLzhmPcLln mhQnzuM/eT3A/1vureefKmVtzGdeF4HpJoKAH02Bc8OjZzX7WziAUgajS8/wiSQk3SbxBU KNToiJdYpGf1/VBUABXD45mZvnNlUVQRbgBjQTbKVFktzspg34yF4i3o5zCdLMcuw7LQ7G 5Aiyt/tFOxuQbIJLd6He82swYsUDlqIrVh52o5CDVIlMVaZLXP+txZUrN/uGOURm8ZZVWX qMSbdU41ZAoHd5b4sOsdZUbc8XIlBV+CNprYlYbNiVf8wk0eVziilsuWEjVlWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732673671; a=rsa-sha256; cv=none; b=nj6nvH176wQdYy3DzzG4pdq7HUgWB3J5uGGs0PLX3tKahvmCHyaQuovkgtSn3pYOjkiqYA MD1RMkVwggAzRCd222JczaL6vmmLit2t/pBurLsiFMn1FDGFNREHA4per2bRykYrxK33NN UM1x47PvGsKNJEbXzgkzwCDn9cW4fW9VU00/gdOSvvClr1nCzfsawPeO2OgcdtXlCdRAc5 DqFHAMph9Wpo7/sDzbD9gMgiWNmxJm8au0vznXtq/AM6m68xtVi8EVpgHKz0gurizzL4A9 7oYrpOeWsF11Qwwr86A11GnFng4UW5MO9kBbEsMYzUuHAz6EAE9QRRU/AeyqoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyjgV6C1bzqmY; Wed, 27 Nov 2024 02:14:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR2EUTa067016; Wed, 27 Nov 2024 02:14:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR2EUg3067013; Wed, 27 Nov 2024 02:14:30 GMT (envelope-from git) Date: Wed, 27 Nov 2024 02:14:30 GMT Message-Id: <202411270214.4AR2EUg3067013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 987d5642ebbd - stable/13 - igc: Style pass igc_txrx List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 987d5642ebbd9ba496d18dc572a44248da756cbf Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=987d5642ebbd9ba496d18dc572a44248da756cbf commit 987d5642ebbd9ba496d18dc572a44248da756cbf Author: Kevin Bowling AuthorDate: 2024-11-24 07:27:12 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 01:18:41 +0000 igc: Style pass igc_txrx Fix up indentation and reflow long lines. MFC after: 3 days Sponsored by: BBOX.io (cherry picked from commit c7fb7b5d9fcd1fc67794228820aa54df388d47b4) --- sys/dev/igc/igc_txrx.c | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/sys/dev/igc/igc_txrx.c b/sys/dev/igc/igc_txrx.c index 59f4725388ee..92ba81c79c58 100644 --- a/sys/dev/igc/igc_txrx.c +++ b/sys/dev/igc/igc_txrx.c @@ -97,15 +97,19 @@ igc_dump_rs(struct igc_softc *sc) cur = txr->tx_rsq[rs_cidx]; status = txr->tx_base[cur].upper.fields.status; if (!(status & IGC_TXD_STAT_DD)) - printf("qid[%d]->tx_rsq[%d]: %d clear ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[%d]: %d clear ", + qid, rs_cidx, cur); } else { rs_cidx = (rs_cidx-1)&(ntxd-1); cur = txr->tx_rsq[rs_cidx]; - printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", + qid, rs_cidx, cur); } - printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, txr->tx_rs_pidx); + printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, + txr->tx_rs_pidx); for (i = 0; i < ntxd; i++) { - if (txr->tx_base[i].upper.fields.status & IGC_TXD_STAT_DD) + if (txr->tx_base[i].upper.fields.status & + IGC_TXD_STAT_DD) printf("%d set ", i); } printf("\n"); @@ -138,14 +142,15 @@ igc_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, break; default: panic("%s: CSUM_TSO but no supported IP version (0x%04x)", - __func__, ntohs(pi->ipi_etype)); + __func__, ntohs(pi->ipi_etype)); break; } TXD = (struct igc_adv_tx_context_desc *) &txr->tx_base[pi->ipi_pidx]; /* This is used in the transmit desc in encap */ - paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - pi->ipi_tcp_hlen; + paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - + pi->ipi_tcp_hlen; /* VLAN MACLEN IPLEN */ if (pi->ipi_mflags & M_VLANTAG) { @@ -180,8 +185,8 @@ igc_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, * **********************************************************************/ static int -igc_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, - uint32_t *olinfo_status) +igc_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, + uint32_t *cmd_type_len, uint32_t *olinfo_status) { struct igc_adv_tx_context_desc *TXD; uint32_t vlan_macip_lens, type_tucmd_mlhl; @@ -275,7 +280,7 @@ igc_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = olinfo_status = 0; /* Basic descriptor defines */ cmd_type_len = (IGC_ADVTXD_DTYP_DATA | - IGC_ADVTXD_DCMD_IFCS | IGC_ADVTXD_DCMD_DEXT); + IGC_ADVTXD_DCMD_IFCS | IGC_ADVTXD_DCMD_DEXT); if (pi->ipi_mflags & M_VLANTAG) cmd_type_len |= IGC_ADVTXD_DCMD_VLE; @@ -324,9 +329,9 @@ igc_isc_txd_encap(void *arg, if_pkt_info_t pi) static void igc_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx) { - struct igc_softc *sc = arg; - struct igc_tx_queue *que = &sc->tx_queues[txqid]; - struct tx_ring *txr = &que->txr; + struct igc_softc *sc = arg; + struct igc_tx_queue *que = &sc->tx_queues[txqid]; + struct tx_ring *txr = &que->txr; IGC_WRITE_REG(&sc->hw, IGC_TDT(txr->me), pidx); } @@ -370,12 +375,13 @@ igc_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) MPASS(delta > 0); processed += delta; - prev = cur; + prev = cur; rs_cidx = (rs_cidx + 1) & (ntxd-1); - if (rs_cidx == txr->tx_rs_pidx) + if (rs_cidx == txr->tx_rs_pidx) break; cur = txr->tx_rsq[rs_cidx]; - status = ((union igc_adv_tx_desc *)&txr->tx_base[cur])->wb.status; + status = + ((union igc_adv_tx_desc *)&txr->tx_base[cur])->wb.status; } while ((status & IGC_TXD_STAT_DD)); txr->tx_rs_cidx = rs_cidx; @@ -411,7 +417,8 @@ igc_isc_rxd_refill(void *arg, if_rxd_update_t iru) } static void -igc_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx) +igc_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, + qidx_t pidx) { struct igc_softc *sc = arg; struct igc_rx_queue *que = &sc->rx_queues[rxqid]; @@ -477,7 +484,8 @@ igc_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) MPASS ((staterr & IGC_RXD_STAT_DD) != 0); len = le16toh(rxd->wb.upper.length); - ptype = le32toh(rxd->wb.lower.lo_dword.data) & IGC_PKTTYPE_MASK; + ptype = + le32toh(rxd->wb.lower.lo_dword.data) & IGC_PKTTYPE_MASK; ri->iri_len += len; rxr->rx_bytes += ri->iri_len; @@ -558,7 +566,8 @@ igc_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype) (ptype & IGC_RXDADV_PKTTYPE_SCTP) != 0)) { ri->iri_csum_flags |= CSUM_SCTP_VALID; } else { - ri->iri_csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + ri->iri_csum_flags |= + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; ri->iri_csum_data = htons(0xffff); } } From nobody Wed Nov 27 02:14:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyjgY5tjGz5fMmw; Wed, 27 Nov 2024 02:14:33 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyjgY0nbvz4gSY; Wed, 27 Nov 2024 02:14:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X373fHOuo0Qd/+eVF2uT9VQzgpYujjjvEH4+tCg9KZo=; b=SGvknA1CJmwYuXt/eSicHomcV7sBZMlIAiDqj+9O5wGj7pe/+9b65zw1mo+tGDYvsnnasG 2I2YKS5Z5molcmkqwV8VSf+Tuw3UE9jFo+liQPA4ebGlX5+7uIUR9OEOgwOGNnoG/EoxJ/ A8tuJT5PjHsKPA86e9Kav7NWhkOupRzPiRBiuZ53LlNvkB6AMfEzuDcCnuhPUX1KlflX5w 3gGDlJGHBP3T2B1wYFQYJpsUr6G7EgG/aEyEJOCnP/MhvA5ceOuwj2O/ZkHwBPQ5QKkcr8 Ap3VtAj50a5N6Ph8E0HbL9RrLgwzbyevhSmAtHfOsUPuRwPFGeFfiRQVUiJ2sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X373fHOuo0Qd/+eVF2uT9VQzgpYujjjvEH4+tCg9KZo=; b=p/5KMcTMEiocLki0UQyYoim+/i+XyEqb3ijvA5Y7PRCu4fRTETJNrLSuCoVx5rgvIATA3G YbGgussPXaasSG+parE+E5nXSXgK9CsYLWShlv/GezYhRYlqRw1QomOy8UXOKMWm+6wToI zh9jBu/XoHy8diX6+mtJMl/Aaf8IcUWzwJbzUK/pkWVT8JAbh1/deuAquw3X4D1tjND/D7 mOBI+vnlAQCd+GTSVn+Dak+vHo4hROLiJ5vbNEUr7yGBpv3Yzkxq3IJXoDNGKcdk544WRb CBJzKov2RSrBgNeL+FnmDqJxXLSghAgdw6RF5/kZmoo0WF24NQ4MyrptyFK8oQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732673673; a=rsa-sha256; cv=none; b=kANkiBAART2re061GVQpb8pcYg7IFc3EZw/3oYOJQUKifts4Td1y3VuIB7Zzgn/ESi6hKY cEHMrvDhae71EM/hfivzX634921ZjsGIHhiV8lVLl+5SXbP8KQoREU8S/lK+T4buCnIvrD 74HesXRkF2rhO346CjvdF87B1ixWj3/FPOpqu5Ls3huIYAMA1OpL9FRL0htlKsIQdeG+T6 vuMOa3tYY98qa4YLEWo6UTUD+C8Mw5qpljmobu+VHFEU/wqN15zwWJZPAyKGh139tM8NXp nJiIVBuAuaSZsV3Cr/PvY6wSt+M+5dqmmf3xdqcAYnolG4iBkgdAaq4mootPLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyjgY0M3XzqWM; Wed, 27 Nov 2024 02:14:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR2EWb9067094; Wed, 27 Nov 2024 02:14:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR2EWg1067091; Wed, 27 Nov 2024 02:14:32 GMT (envelope-from git) Date: Wed, 27 Nov 2024 02:14:32 GMT Message-Id: <202411270214.4AR2EWg1067091@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 8b11cec745ad - stable/13 - igc: disable hw.igc.sbp List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8b11cec745ad39f1818c42bc9d04d1fd7385c27e Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=8b11cec745ad39f1818c42bc9d04d1fd7385c27e commit 8b11cec745ad39f1818c42bc9d04d1fd7385c27e Author: Kevin Bowling AuthorDate: 2024-11-24 21:08:54 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 01:19:11 +0000 igc: disable hw.igc.sbp Similar to 548d8a131d536d5f in e1000, disable this by default. Sponsored by: BBOX.io (cherry picked from commit e80419da6cef3fb6ea1902bd9a250ca21072a42c) --- sys/dev/igc/if_igc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 7e8d5f1460ba..e22c5578ed8d 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -253,7 +253,7 @@ SYSCTL_INT(_hw_igc, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, 0, "Set to true to leave smart power down enabled on newer adapters"); /* Controls whether promiscuous also shows bad packets */ -static int igc_debug_sbp = true; +static int igc_debug_sbp = false; SYSCTL_INT(_hw_igc, OID_AUTO, sbp, CTLFLAG_RDTUN, &igc_debug_sbp, 0, "Show bad packets in promiscuous mode"); @@ -1352,7 +1352,7 @@ igc_if_multi_set(if_ctx_t ctx) if_getflags(ifp) & IFF_ALLMULTI) { reg_rctl |= IGC_RCTL_MPE; reg_rctl &= ~IGC_RCTL_UPE; - } else + } else reg_rctl &= ~(IGC_RCTL_UPE | IGC_RCTL_MPE); if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) From nobody Wed Nov 27 02:14:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyjgX35TNz5fMmv; Wed, 27 Nov 2024 02:14:32 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyjgX1HNyz4gXl; Wed, 27 Nov 2024 02:14:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tacDjT/8tT95A0OznmV77BK4h90FkgA6v2+obayQtg0=; b=dtQw1V6O64sRTBOBLiM0Fmp6zAY9WQGYal1cHW+AzX8k9+pOds4qqvLONxqaCqnG6O2bFz ixX/1FijNNEvlm56CDVyuFic45zYWoc12Jv1PVE+7q+CVgzZlzMPRssKm6lkNI1bvbZ/ot UTEzWBCGFnNNfse0YrEWnIOg80/2GYDJUCUVf6WxT0fkVF/C8/bDxjwQ7RjAzQhfaw231D wBG/8eNo1mONQZH+mqmfh8Cz1Xl4OmDiSmkZPRYB2w1qQpc4lMAgwuCEmj0QxJ6deV0mUG nR11UF9NKcKVUXxDBKBE7kSvxyurw7SYeUatEL3pq5IOqQyimbNOjAujpIT8og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tacDjT/8tT95A0OznmV77BK4h90FkgA6v2+obayQtg0=; b=hzXlCOLVU1P4Z9EJyQG100pgf9wkT1OsfQCk1m7WWqdIxVnNxwZt6ne3KJOLc/Nx7r4jcV sazO9LzW1WOS7HOKh1/iXUjq1FTHRUuX3CtuOv5jOr8TqxVLOeaZuze22GCyazPJL1WK81 MzOg5ar4vuGIWUQdhE56LLKbjOqXMTnGagqJpBvN6T9fXcxaGbjhTYcRJGWjN5OrCdcWyf 7Jr+rs9GTMxFPjYMsRjM5TsPGdklXGynOOxYLiE2Ga7xFg/z30zuOXxq1SibUFjCgMyt2e 8YwvOBCRuSIBfd1S4m56nelyU1XYQza6Tm8cqlGY48Ohcz6g1iQR7bclThgO5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732673672; a=rsa-sha256; cv=none; b=qvJksdQYUiKBdB67JyQEXPz/z4fZ0k7oe5ctTX6ClwytqwMuC6+0js3sRNSVMbaGowkaIm OvqkxryYVw41Mlrxig/38Ph64pbNunGCMfPr+Qsf8LKD0hpFMQECAaqvfdU5zvy3n63GAd AuFUzWhNXYCu++E9RCaarkCK6Cb1AyW6IUmYSxyIQQUS9D18AO0XabFL+VpKyT5MaBMiNj HV06WKEhF5kLg1oPVkssB2BOLZln5WKrDMRl0q8Bo5rdjKttIDdUqDI1FEd2zquT62BTVT anU8KXpHQiF+99wLJHQyc38bloOUf+rcavX91bt8dkZh6QMCvazgkOgE2w2WuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyjgW6r3QzqWL; Wed, 27 Nov 2024 02:14:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR2EVLB067052; Wed, 27 Nov 2024 02:14:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR2EV4p067049; Wed, 27 Nov 2024 02:14:31 GMT (envelope-from git) Date: Wed, 27 Nov 2024 02:14:31 GMT Message-Id: <202411270214.4AR2EV4p067049@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 2f2938d9422b - stable/13 - e1000: Style txrx List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2f2938d9422bc07f0a7c3e2525ce63a6c34b6aa3 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2f2938d9422bc07f0a7c3e2525ce63a6c34b6aa3 commit 2f2938d9422bc07f0a7c3e2525ce63a6c34b6aa3 Author: Kevin Bowling AuthorDate: 2024-11-24 07:39:43 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 01:18:58 +0000 e1000: Style txrx Fix up indentation and reflow long lines. Sponsored by: BBOX.io (cherry picked from commit 7390daf87c53073da5e74b2d73ac7320c1a44475) --- sys/dev/e1000/em_txrx.c | 55 ++++++++++++++++++++++++++++++------------------ sys/dev/e1000/if_em.c | 3 ++- sys/dev/e1000/igb_txrx.c | 44 ++++++++++++++++++++++---------------- 3 files changed, 62 insertions(+), 40 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index 65ffcdfd67f6..edbe0f8ab546 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -108,16 +108,19 @@ em_dump_rs(struct e1000_softc *sc) cur = txr->tx_rsq[rs_cidx]; status = txr->tx_base[cur].upper.fields.status; if (!(status & E1000_TXD_STAT_DD)) - printf("qid[%d]->tx_rsq[%d]: %d clear ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[%d]: %d clear ", + qid, rs_cidx, cur); } else { rs_cidx = (rs_cidx-1)&(ntxd-1); cur = txr->tx_rsq[rs_cidx]; - printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", + qid, rs_cidx, cur); } printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, txr->tx_rs_pidx); for (i = 0; i < ntxd; i++) { - if (txr->tx_base[i].upper.fields.status & E1000_TXD_STAT_DD) + if (txr->tx_base[i].upper.fields.status & + E1000_TXD_STAT_DD) printf("%d set ", i); } printf("\n"); @@ -143,8 +146,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen + pi->ipi_tcp_hlen; *txd_lower = (E1000_TXD_CMD_DEXT | /* Extended descr type */ - E1000_TXD_DTYP_D | /* Data descr type */ - E1000_TXD_CMD_TSE); /* Do TSE on this packet */ + E1000_TXD_DTYP_D | /* Data descr type */ + E1000_TXD_CMD_TSE); /* Do TSE on this packet */ cur = pi->ipi_pidx; TXD = (struct e1000_context_desc *)&txr->tx_base[cur]; @@ -157,7 +160,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, switch(pi->ipi_etype) { case ETHERTYPE_IP: /* IP and/or TCP header checksum calculation and insertion. */ - *txd_upper = (E1000_TXD_POPTS_IXSM | E1000_TXD_POPTS_TXSM) << 8; + *txd_upper = + (E1000_TXD_POPTS_IXSM | E1000_TXD_POPTS_TXSM) << 8; TXD->lower_setup.ip_fields.ipcse = htole16(pi->ipi_ehdrlen + pi->ipi_ip_hlen - 1); @@ -183,7 +187,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, TXD->upper_setup.tcp_fields.tucss = pi->ipi_ehdrlen + pi->ipi_ip_hlen; TXD->upper_setup.tcp_fields.tucse = 0; TXD->upper_setup.tcp_fields.tucso = - pi->ipi_ehdrlen + pi->ipi_ip_hlen + offsetof(struct tcphdr, th_sum); + pi->ipi_ehdrlen + pi->ipi_ip_hlen + + offsetof(struct tcphdr, th_sum); /* * Payload size per packet w/o any headers. @@ -211,8 +216,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, if (++cur == scctx->isc_ntxd[0]) { cur = 0; } - DPRINTF(iflib_get_dev(sc->ctx), "%s: pidx: %d cur: %d\n", __FUNCTION__, - pi->ipi_pidx, cur); + DPRINTF(iflib_get_dev(sc->ctx), "%s: pidx: %d cur: %d\n", + __FUNCTION__, pi->ipi_pidx, cur); return (cur); } @@ -277,8 +282,8 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, * ipcse - End offset for header checksum calculation. * ipcso - Offset of place to put the checksum. * - * We set ipcsX values regardless of IP version to work around HW issues - * and ipcse must be 0 for IPv6 per "PCIe GbE SDM 2.5" page 61. + * We set ipcsX values regardless of IP version to work around HW + * issues and ipcse must be 0 for IPv6 per "PCIe GbE SDM 2.5" page 61. * IXSM controls whether it's inserted. */ TXD->lower_setup.ip_fields.ipcss = pi->ipi_ehdrlen; @@ -296,7 +301,8 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, * tucse - End offset for payload checksum calculation. * tucso - Offset of place to put the checksum. */ - if (csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_IP6_TCP | CSUM_IP6_UDP)) { + if (csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_IP6_TCP | + CSUM_IP6_UDP)) { uint8_t tucso; *txd_upper |= E1000_TXD_POPTS_TXSM << 8; @@ -326,7 +332,8 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, cur = 0; } DPRINTF(iflib_get_dev(sc->ctx), - "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x hdr_len=%d cmd=%x\n", + "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x" + " hdr_len=%d cmd=%x\n", csum_flags, *txd_upper, *txd_lower, hdr_len, cmd); return (cur); } @@ -372,7 +379,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) i = em_tso_setup(sc, pi, &txd_upper, &txd_lower); tso_desc = true; } else if (csum_flags & EM_CSUM_OFFLOAD) { - i = em_transmit_checksum_setup(sc, pi, &txd_upper, &txd_lower); + i = em_transmit_checksum_setup(sc, pi, &txd_upper, + &txd_lower); } if (pi->ipi_mflags & M_VLANTAG) { @@ -414,7 +422,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) /* Now make the sentinel */ ctxd = &txr->tx_base[i]; ctxd->buffer_addr = htole64(seg_addr + seg_len); - ctxd->lower.data = htole32(cmd | txd_lower | TSO_WORKAROUND); + ctxd->lower.data = + htole32(cmd | txd_lower | TSO_WORKAROUND); ctxd->upper.data = htole32(txd_upper); pidx_last = i; if (++i == scctx->isc_ntxd[0]) @@ -429,7 +438,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = i; if (++i == scctx->isc_ntxd[0]) i = 0; - DPRINTF(iflib_get_dev(sc->ctx), "pidx_last=%d i=%d ntxd[0]=%d\n", + DPRINTF(iflib_get_dev(sc->ctx), + "pidx_last=%d i=%d ntxd[0]=%d\n", pidx_last, i, scctx->isc_ntxd[0]); } } @@ -449,7 +459,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) } ctxd->lower.data |= htole32(E1000_TXD_CMD_EOP | txd_flags); DPRINTF(iflib_get_dev(sc->ctx), - "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", first, pidx_last, i); + "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", + first, pidx_last, i); pi->ipi_new_pidx = i; /* Sent data accounting for AIM */ @@ -508,8 +519,8 @@ em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) delta += ntxd; MPASS(delta > 0); DPRINTF(iflib_get_dev(sc->ctx), - "%s: cidx_processed=%u cur=%u clear=%d delta=%d\n", - __FUNCTION__, prev, cur, clear, delta); + "%s: cidx_processed=%u cur=%u clear=%d delta=%d\n", + __FUNCTION__, prev, cur, clear, delta); processed += delta; prev = cur; @@ -699,7 +710,8 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) if (scctx->isc_capenable & IFCAP_VLAN_HWTAGGING && status & E1000_RXD_STAT_VP) { - ri->iri_vtag = le16toh(rxd->special & E1000_RXD_SPC_VLAN_MASK); + ri->iri_vtag = + le16toh(rxd->special & E1000_RXD_SPC_VLAN_MASK); ri->iri_flags |= M_VLANTAG; } @@ -789,7 +801,8 @@ em_receive_checksum(uint16_t status, uint8_t errors, if_rxd_info_t ri) return; /* If there is a layer 3 or 4 error we are done */ - if (__predict_false(errors & (E1000_RXD_ERR_IPE | E1000_RXD_ERR_TCPE))) + if (__predict_false(errors & (E1000_RXD_ERR_IPE | + E1000_RXD_ERR_TCPE))) return; /* IP Checksum Good */ diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index b6710919a997..d47d8d5e1fcc 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -3158,7 +3158,8 @@ em_reset(if_ctx_t ctx) * response (Rx) to Ethernet PAUSE frames. * - High water mark should allow for at least two frames to be * received after sending an XOFF. - * - Low water mark works best when it is very near the high water mark + * - Low water mark works best when it is very near the high water + mark. * This allows the receiver to restart by sending XON when it has * drained a bit. Here we use an arbitrary value of 1500 which will * restart after one full frame is pulled from the buffer. There diff --git a/sys/dev/e1000/igb_txrx.c b/sys/dev/e1000/igb_txrx.c index 8b663d7e6d3e..568d84807173 100644 --- a/sys/dev/e1000/igb_txrx.c +++ b/sys/dev/e1000/igb_txrx.c @@ -102,14 +102,15 @@ igb_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, break; default: panic("%s: CSUM_TSO but no supported IP version (0x%04x)", - __func__, ntohs(pi->ipi_etype)); + __func__, ntohs(pi->ipi_etype)); break; } - TXD = (struct e1000_adv_tx_context_desc *) &txr->tx_base[pi->ipi_pidx]; + TXD = (struct e1000_adv_tx_context_desc *)&txr->tx_base[pi->ipi_pidx]; /* This is used in the transmit desc in encap */ - paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - pi->ipi_tcp_hlen; + paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - + pi->ipi_tcp_hlen; /* VLAN MACLEN IPLEN */ if (pi->ipi_mflags & M_VLANTAG) { @@ -147,8 +148,8 @@ igb_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, * **********************************************************************/ static int -igb_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, - uint32_t *olinfo_status) +igb_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, + uint32_t *cmd_type_len, uint32_t *olinfo_status) { struct e1000_adv_tx_context_desc *TXD; struct e1000_softc *sc = txr->sc; @@ -164,7 +165,7 @@ igb_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, *olinfo_status |= pi->ipi_len << E1000_ADVTXD_PAYLEN_SHIFT; /* Now ready a context descriptor */ - TXD = (struct e1000_adv_tx_context_desc *) &txr->tx_base[pi->ipi_pidx]; + TXD = (struct e1000_adv_tx_context_desc *)&txr->tx_base[pi->ipi_pidx]; /* ** In advanced descriptors the vlan tag must @@ -246,8 +247,8 @@ igb_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = olinfo_status = 0; /* Basic descriptor defines */ - cmd_type_len = (E1000_ADVTXD_DTYP_DATA | - E1000_ADVTXD_DCMD_IFCS | E1000_ADVTXD_DCMD_DEXT); + cmd_type_len = (E1000_ADVTXD_DTYP_DATA | E1000_ADVTXD_DCMD_IFCS | + E1000_ADVTXD_DCMD_DEXT); if (pi->ipi_mflags & M_VLANTAG) cmd_type_len |= E1000_ADVTXD_DCMD_VLE; @@ -300,9 +301,9 @@ igb_isc_txd_encap(void *arg, if_pkt_info_t pi) static void igb_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx) { - struct e1000_softc *sc = arg; - struct em_tx_queue *que = &sc->tx_queues[txqid]; - struct tx_ring *txr = &que->txr; + struct e1000_softc *sc = arg; + struct em_tx_queue *que = &sc->tx_queues[txqid]; + struct tx_ring *txr = &que->txr; E1000_WRITE_REG(&sc->hw, E1000_TDT(txr->me), pidx); } @@ -351,7 +352,8 @@ igb_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) if (rs_cidx == txr->tx_rs_pidx) break; cur = txr->tx_rsq[rs_cidx]; - status = ((union e1000_adv_tx_desc *)&txr->tx_base[cur])->wb.status; + status = ((union e1000_adv_tx_desc *) + &txr->tx_base[cur])->wb.status; } while ((status & E1000_TXD_STAT_DD)); txr->tx_rs_cidx = rs_cidx; @@ -387,7 +389,8 @@ igb_isc_rxd_refill(void *arg, if_rxd_update_t iru) } static void -igb_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx) +igb_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, + qidx_t pidx) { struct e1000_softc *sc = arg; struct em_rx_queue *que = &sc->rx_queues[rxqid]; @@ -453,7 +456,8 @@ igb_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) MPASS ((staterr & E1000_RXD_STAT_DD) != 0); len = le16toh(rxd->wb.upper.length); - ptype = le32toh(rxd->wb.lower.lo_dword.data) & IGB_PKTTYPE_MASK; + ptype = + le32toh(rxd->wb.lower.lo_dword.data) & IGB_PKTTYPE_MASK; ri->iri_len += len; rxr->rx_bytes += ri->iri_len; @@ -462,7 +466,8 @@ igb_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) eop = ((staterr & E1000_RXD_STAT_EOP) == E1000_RXD_STAT_EOP); /* Make sure bad packets are discarded */ - if (eop && ((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) != 0)) { + if (eop && + ((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) != 0)) { sc->dropped_pkts++; ++rxr->rx_discarded; return (EBADMSG); @@ -524,7 +529,8 @@ igb_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype) return; /* If there is a layer 3 or 4 error we are done */ - if (__predict_false(errors & (E1000_RXD_ERR_IPE | E1000_RXD_ERR_TCPE))) + if (__predict_false(errors & + (E1000_RXD_ERR_IPE | E1000_RXD_ERR_TCPE))) return; /* IP Checksum Good */ @@ -535,11 +541,13 @@ igb_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype) if (__predict_true(status & (E1000_RXD_STAT_TCPCS | E1000_RXD_STAT_UDPCS))) { /* SCTP header present */ - if (__predict_false((ptype & E1000_RXDADV_PKTTYPE_ETQF) == 0 && + if (__predict_false( + (ptype & E1000_RXDADV_PKTTYPE_ETQF) == 0 && (ptype & E1000_RXDADV_PKTTYPE_SCTP) != 0)) { ri->iri_csum_flags |= CSUM_SCTP_VALID; } else { - ri->iri_csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + ri->iri_csum_flags |= + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; ri->iri_csum_data = htons(0xffff); } } From nobody Wed Nov 27 04:16:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XymMx2TG0z5fW4R; Wed, 27 Nov 2024 04:16:13 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XymMx1dCwz44tG; Wed, 27 Nov 2024 04:16:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732680973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GXp0s7HJ6817ZKoa1mZnVKCVSDz7EX5wK54yds+XwcY=; b=hoQIOQmZfrLnwvvT05RfWjpeC1QtTfpCIXlyhflUreWiiVGHEpp6Tw1VLMBu7pNQMavfj3 bfx9lyxkbgHkTUaNrxN9e/ggxslrDu0bEZyMbBkpRD8C7/r5tkuNeX2m1S+6NuINLH+c/P W8A6cziMRMcwIIYCSoj1AGlZU8ukjNQaoDZIa5PwnGx2PPgArFxpg76I3vQ73ykKG4sfPc dAwue5RXuX9mcIL+utrmibf35lYgVjTv8c3jsdf56S2nuNyDc//2nbbIuUkkhLFBE3W406 IXIFlUrCKF60KvlLfZP6HpkFXWaOLCUvQcGFCL2PYJYD/M4UnAgD45qycTWNAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732680973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GXp0s7HJ6817ZKoa1mZnVKCVSDz7EX5wK54yds+XwcY=; b=aDiqkMRNwhEvlmHQyQe1pnJdolj7jsRYs7dm2YOkmIfyDFojjCEa8a/AYMyurExQHK+Xhl PWNNQA4u6lHSdY4uAG7fGG7+J5NHylD2CPhR8MnAnYTsn64HiKum8qog8UU21Q0KDI2fwV qNNdm0rK7OfCjl7xLlVl4Gp++au5IeM+gVVXYrl9yXV5SREcY+xBalLl8NWVyCEoSCA9gG T3ZZxU+pW4aFvYkfqjBxMsEZINEjxWH1Gto2nkZxWKAAm6bhuOvCgW4+2UxapAxv91C6uz fVpd/cfZ/p2FHT7s38uRthrXNX+8EnmU6H6W7b7LvwrQtY7UIBbwfCyxvEgVTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732680973; a=rsa-sha256; cv=none; b=T3nCZAwDo1MYETT8khxqVZG8ZUzH70OoMQa+knV8uzMQQg7N+W5ZEWHmmZW1DOxwXREV6u ffDDamuLGs/Lg0dabFds4UPBzZML8ZqLXAeITKqSj1WYg7rGGiMMtwlsqUenHiV48J9KuF 4o50pimpArwFyYpOY8qpGfFLgSuSXrArZj8Uitwk7F+u8lhj+hriYvR8aTEn1VzYUVtAwq ZMLNRT2p1O91u5q0K/D0IN/kgdhGaf+LH6+7AqSn6zpHu/ode9TFTHM00Q1mbca9QxLUaE WzjcvDKc/hYfHu8ZAh8fmyLCYDWrLmnw9CwMFouDBdN4lzuylT3WETWbrgPXVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XymMx168Zzv31; Wed, 27 Nov 2024 04:16:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR4GDgJ097947; Wed, 27 Nov 2024 04:16:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR4GDkJ097944; Wed, 27 Nov 2024 04:16:13 GMT (envelope-from git) Date: Wed, 27 Nov 2024 04:16:13 GMT Message-Id: <202411270416.4AR4GDkJ097944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 645c45e297c0 - stable/14 - e1000: Try auto-negotiation for fixed 100 or 10 configuration List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 645c45e297c0fcbbb9d2d24cdeeb124234825019 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=645c45e297c0fcbbb9d2d24cdeeb124234825019 commit 645c45e297c0fcbbb9d2d24cdeeb124234825019 Author: Kevin Bowling AuthorDate: 2024-11-23 12:27:44 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 04:13:34 +0000 e1000: Try auto-negotiation for fixed 100 or 10 configuration This is a retread of https://reviews.freebsd.org/D34449 which I think will fix the issue for the remote side not supporting autoneg. We now attempt an autoneg, and if that fails fall back to the current code that forces the link speed/duplex. The original intent of this patch is to inform the remote switch of duplex settings when we (the client) are specifying a fixed 10 or 100 speed. Otherwise it may get the duplex setting wrong. The tricky case is when the remote (switch) side is fixing its speed AND duplex while disabling autoneg and we (client) need to do the same, which still seems to be common enough at some ISPs. Original commit message follows: Currently if an e1000 interface is set to a fixed media configuration, for gigabit, it will participate in auto-negotiation as required by IEEE 802.3-2018 Clause 37. However, if set to fixed media configuration for 100 or 10, it does NOT participate in auto-negotiation. By my reading of Clauses 28 and 37, while auto-negotiation is optional for 100 and 10, it is not prohibited and is, in fact, "highly recommended". This patch enables auto-negotiation for fixed 100 and 10 media configuration, in a similar manner to that already performed for 1000. I.e., the patch enables advertising of just the manually configured settings with the goal of allowing the remote end to match the manually configured settings if it has them available. To be clear, this patch does NOT allow an em(4) interface that has been manually configured with specific media settings to respond to auto-negotiation by then configuring different parameters to those that were manually configured. The intent of this patch is to fully comply with the requirements of Clause 37, but for 100 and 10. The need for this has arisen on an em(4) link where the other end is under a different administrative control and is set to full auto-negotiation. Due to the cable length GigE is not working well. It is desired to set the em(4) end to "media 100baseTX mediatype full-duplex" which does work when both ends are configured that way. Currently, because em(4) does not participate in autoneg for this setting, the remote defaults to half-duplex - i.e., there's a duplex mismatch and things don't work. With this patch, em(4) would inform the remote that it has only 100baseTX full, the remote would match that and it will work. Tested by: Natalino Picone Tested by: Franco Fichtner Tested by: J.R. Oldroyd (previous version) Sponsored by: Nozomi Networks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47336 (cherry picked from commit bceec3d80a3caf9249e24247fb937674bf5b46b5) --- sys/dev/e1000/e1000_phy.c | 5 +++-- sys/dev/e1000/if_em.c | 44 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/sys/dev/e1000/e1000_phy.c b/sys/dev/e1000/e1000_phy.c index 634f48171c3e..c34897e3b31a 100644 --- a/sys/dev/e1000/e1000_phy.c +++ b/sys/dev/e1000/e1000_phy.c @@ -1707,9 +1707,10 @@ s32 e1000_setup_copper_link_generic(struct e1000_hw *hw) * autonegotiation. */ ret_val = e1000_copper_link_autoneg(hw); - if (ret_val) + if (ret_val && !hw->mac.forced_speed_duplex) return ret_val; - } else { + } + if (!hw->mac.autoneg || (ret_val && hw->mac.forced_speed_duplex)) { /* PHY will be set to 10H, 10F, 100H or 100F * depending on user settings. */ diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 22078d12bf51..aed97d076a5e 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1999,7 +1999,18 @@ em_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) (sc->hw.phy.media_type == e1000_media_type_internal_serdes)) { if (sc->hw.mac.type == e1000_82545) fiber_type = IFM_1000_LX; - ifmr->ifm_active |= fiber_type | IFM_FDX; + switch (sc->link_speed) { + case 10: + ifmr->ifm_active |= IFM_10_FL; + break; + case 100: + ifmr->ifm_active |= IFM_100_FX; + break; + case 1000: + default: + ifmr->ifm_active |= fiber_type | IFM_FDX; + break; + } } else { switch (sc->link_speed) { case 10: @@ -2012,11 +2023,12 @@ em_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) ifmr->ifm_active |= IFM_1000_T; break; } - if (sc->link_duplex == FULL_DUPLEX) - ifmr->ifm_active |= IFM_FDX; - else - ifmr->ifm_active |= IFM_HDX; } + + if (sc->link_duplex == FULL_DUPLEX) + ifmr->ifm_active |= IFM_FDX; + else + ifmr->ifm_active |= IFM_HDX; } /********************************************************************* @@ -2050,6 +2062,26 @@ em_if_media_change(if_ctx_t ctx) sc->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL; break; case IFM_100_TX: + sc->hw.mac.autoneg = DO_AUTO_NEG; + if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) { + sc->hw.phy.autoneg_advertised = ADVERTISE_100_FULL; + sc->hw.mac.forced_speed_duplex = ADVERTISE_100_FULL; + } else { + sc->hw.phy.autoneg_advertised = ADVERTISE_100_HALF; + sc->hw.mac.forced_speed_duplex = ADVERTISE_100_HALF; + } + break; + case IFM_10_T: + sc->hw.mac.autoneg = DO_AUTO_NEG; + if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) { + sc->hw.phy.autoneg_advertised = ADVERTISE_10_FULL; + sc->hw.mac.forced_speed_duplex = ADVERTISE_10_FULL; + } else { + sc->hw.phy.autoneg_advertised = ADVERTISE_10_HALF; + sc->hw.mac.forced_speed_duplex = ADVERTISE_10_HALF; + } + break; + case IFM_100_FX: sc->hw.mac.autoneg = false; sc->hw.phy.autoneg_advertised = 0; if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) @@ -2057,7 +2089,7 @@ em_if_media_change(if_ctx_t ctx) else sc->hw.mac.forced_speed_duplex = ADVERTISE_100_HALF; break; - case IFM_10_T: + case IFM_10_FL: sc->hw.mac.autoneg = false; sc->hw.phy.autoneg_advertised = 0; if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) From nobody Wed Nov 27 04:16:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XymNZ5G1Cz5fWPv; Wed, 27 Nov 2024 04:16:46 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XymNZ4Q8dz455m; Wed, 27 Nov 2024 04:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732681006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=thQ5aFpmtCsz6Dy25pE88liHZrxhvvuuKXt+p9IEcoM=; b=HJ0eMs+TZT/II0oariVnWAIsvpROOrWxp6/7UpbbyQW+u61XljuyjUaPSpocm4wCWjoRpw Vp67eJubJ2Vjvo2gHZOrcR2Tl6faSL97cBEYd8KwNwiR5aPcb7Q4Q9prbF8IK6ZQ7I4wgv +c+/QYqWSmVNUxXl/WgONVAyC7DYDdj0rQJtm0qpQbt1pD//WR5HxLU+7yOOBS8sl+Xjpc zpr32SO9ItQtseivubbNiTkifwgDOGf9CM7YSrNZpwD8uE/aLOTO7LIHlR0zrIJdn957et 7CwvUx8v2/1nrPsDhyuxIUWGis2GanrUDuGrbucSKXFYRMEofFoD5oxorBxyyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732681006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=thQ5aFpmtCsz6Dy25pE88liHZrxhvvuuKXt+p9IEcoM=; b=tS/xRL0EZdJILX8Y/x7FhzkUIHSNNZRPUf8PtcO4xtBXrnDqIZTufmfekGdVUQNxnQxl5G uradm7yA/qw24oJvbGIRoaifNZw2PXZPDZvlO4KPGNIlaJqsRgS6kN30mYGdIc+XMxxT6r En2BbexpoPCCNhs049jLCP/uVvlkzitCgfKnsw1PhvSBGusdnFV9RcIOH4NJUqmlIQzfc1 daE4HYEoUGJInrEAlV+8oVIR/wRhdp/U+NsQ3pS55HfLx/AzlI7S9S95YI88IvIOtmbypN Qw6WbJ7m+tce04Ct2lIwHJz8hCzm5VU+ym3cW79wVHFppsA3hte6sGn7ctRbDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732681006; a=rsa-sha256; cv=none; b=ywGxCjcXmtQ/cjDLae00M/a+ymY8Q5hFh6PUQmAtAjsQIcm1FuXx/5qOEbrTIGynEJN836 4wazV7KQpKtaoRuiYYdxt7vxp4zLoBW9RaUAw3uHB/pZELBc9YT/Smh1Tum83+5Ld+RLlh 5dLsMqbqXyqyk24+lNYgwqlerukJ48qtaKIpvk6uhJXvAttc9cKa0U061AZ2rs4hOTyv6f ACPtQ8MeSzZLvie3qJADfHEAjf6Kx0DRUZqbd1kgG96Hi1FIrW9x7CpzUNjaNvaSSVRJru a6PblS+vpbSZGEnQvgmA4GJ+klVf82IdFEEyqKx3NH7eiqjKEKNDvA7SfzH+wA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XymNZ0Fs5ztSW; Wed, 27 Nov 2024 04:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AR4GjVr098266; Wed, 27 Nov 2024 04:16:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR4GjUC098263; Wed, 27 Nov 2024 04:16:45 GMT (envelope-from git) Date: Wed, 27 Nov 2024 04:16:45 GMT Message-Id: <202411270416.4AR4GjUC098263@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 87a1f9e8df1e - stable/13 - e1000: Try auto-negotiation for fixed 100 or 10 configuration List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 87a1f9e8df1ed75ff055fe68d93736f922c53de4 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=87a1f9e8df1ed75ff055fe68d93736f922c53de4 commit 87a1f9e8df1ed75ff055fe68d93736f922c53de4 Author: Kevin Bowling AuthorDate: 2024-11-23 12:27:44 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 04:16:33 +0000 e1000: Try auto-negotiation for fixed 100 or 10 configuration This is a retread of https://reviews.freebsd.org/D34449 which I think will fix the issue for the remote side not supporting autoneg. We now attempt an autoneg, and if that fails fall back to the current code that forces the link speed/duplex. The original intent of this patch is to inform the remote switch of duplex settings when we (the client) are specifying a fixed 10 or 100 speed. Otherwise it may get the duplex setting wrong. The tricky case is when the remote (switch) side is fixing its speed AND duplex while disabling autoneg and we (client) need to do the same, which still seems to be common enough at some ISPs. Original commit message follows: Currently if an e1000 interface is set to a fixed media configuration, for gigabit, it will participate in auto-negotiation as required by IEEE 802.3-2018 Clause 37. However, if set to fixed media configuration for 100 or 10, it does NOT participate in auto-negotiation. By my reading of Clauses 28 and 37, while auto-negotiation is optional for 100 and 10, it is not prohibited and is, in fact, "highly recommended". This patch enables auto-negotiation for fixed 100 and 10 media configuration, in a similar manner to that already performed for 1000. I.e., the patch enables advertising of just the manually configured settings with the goal of allowing the remote end to match the manually configured settings if it has them available. To be clear, this patch does NOT allow an em(4) interface that has been manually configured with specific media settings to respond to auto-negotiation by then configuring different parameters to those that were manually configured. The intent of this patch is to fully comply with the requirements of Clause 37, but for 100 and 10. The need for this has arisen on an em(4) link where the other end is under a different administrative control and is set to full auto-negotiation. Due to the cable length GigE is not working well. It is desired to set the em(4) end to "media 100baseTX mediatype full-duplex" which does work when both ends are configured that way. Currently, because em(4) does not participate in autoneg for this setting, the remote defaults to half-duplex - i.e., there's a duplex mismatch and things don't work. With this patch, em(4) would inform the remote that it has only 100baseTX full, the remote would match that and it will work. Tested by: Natalino Picone Tested by: Franco Fichtner Tested by: J.R. Oldroyd (previous version) Sponsored by: Nozomi Networks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47336 (cherry picked from commit bceec3d80a3caf9249e24247fb937674bf5b46b5) --- sys/dev/e1000/e1000_phy.c | 5 +++-- sys/dev/e1000/if_em.c | 44 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/sys/dev/e1000/e1000_phy.c b/sys/dev/e1000/e1000_phy.c index 4e2afc43a684..53be6a48b671 100644 --- a/sys/dev/e1000/e1000_phy.c +++ b/sys/dev/e1000/e1000_phy.c @@ -1707,9 +1707,10 @@ s32 e1000_setup_copper_link_generic(struct e1000_hw *hw) * autonegotiation. */ ret_val = e1000_copper_link_autoneg(hw); - if (ret_val) + if (ret_val && !hw->mac.forced_speed_duplex) return ret_val; - } else { + } + if (!hw->mac.autoneg || (ret_val && hw->mac.forced_speed_duplex)) { /* PHY will be set to 10H, 10F, 100H or 100F * depending on user settings. */ diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index d47d8d5e1fcc..1a5dbe2335ba 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -2001,7 +2001,18 @@ em_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) (sc->hw.phy.media_type == e1000_media_type_internal_serdes)) { if (sc->hw.mac.type == e1000_82545) fiber_type = IFM_1000_LX; - ifmr->ifm_active |= fiber_type | IFM_FDX; + switch (sc->link_speed) { + case 10: + ifmr->ifm_active |= IFM_10_FL; + break; + case 100: + ifmr->ifm_active |= IFM_100_FX; + break; + case 1000: + default: + ifmr->ifm_active |= fiber_type | IFM_FDX; + break; + } } else { switch (sc->link_speed) { case 10: @@ -2014,11 +2025,12 @@ em_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) ifmr->ifm_active |= IFM_1000_T; break; } - if (sc->link_duplex == FULL_DUPLEX) - ifmr->ifm_active |= IFM_FDX; - else - ifmr->ifm_active |= IFM_HDX; } + + if (sc->link_duplex == FULL_DUPLEX) + ifmr->ifm_active |= IFM_FDX; + else + ifmr->ifm_active |= IFM_HDX; } /********************************************************************* @@ -2052,6 +2064,26 @@ em_if_media_change(if_ctx_t ctx) sc->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL; break; case IFM_100_TX: + sc->hw.mac.autoneg = DO_AUTO_NEG; + if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) { + sc->hw.phy.autoneg_advertised = ADVERTISE_100_FULL; + sc->hw.mac.forced_speed_duplex = ADVERTISE_100_FULL; + } else { + sc->hw.phy.autoneg_advertised = ADVERTISE_100_HALF; + sc->hw.mac.forced_speed_duplex = ADVERTISE_100_HALF; + } + break; + case IFM_10_T: + sc->hw.mac.autoneg = DO_AUTO_NEG; + if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) { + sc->hw.phy.autoneg_advertised = ADVERTISE_10_FULL; + sc->hw.mac.forced_speed_duplex = ADVERTISE_10_FULL; + } else { + sc->hw.phy.autoneg_advertised = ADVERTISE_10_HALF; + sc->hw.mac.forced_speed_duplex = ADVERTISE_10_HALF; + } + break; + case IFM_100_FX: sc->hw.mac.autoneg = false; sc->hw.phy.autoneg_advertised = 0; if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) @@ -2059,7 +2091,7 @@ em_if_media_change(if_ctx_t ctx) else sc->hw.mac.forced_speed_duplex = ADVERTISE_100_HALF; break; - case IFM_10_T: + case IFM_10_FL: sc->hw.mac.autoneg = false; sc->hw.phy.autoneg_advertised = 0; if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) From nobody Wed Nov 27 11:32:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xyy3L579Hz5f3YQ; Wed, 27 Nov 2024 11:32:30 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xyy3L2PYRz49W3; Wed, 27 Nov 2024 11:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732707150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/sESmRcp8JVNHpXWu2FKFdwPcYb9qTWk9G60GpQ2U28=; b=KWKy/GYvNdKAOBYBcbboEF4QsTOLK5aro8qpt7p9y8k27dOpAeM3YYw3IT41+j3T4Ai53i r1aCIF7dnhLjQwaoCp3HjJN93MphxUuTpw8KAdT2Q0qGvwgJ6cbt7H/5iw0cyxFjGspI+M lG1P2CruT0VOXrfFS3Ux6QJ8/S0mzJn2WiLXy6sziRzY5Tl1EiXsKUhFgb12bOBXmn38xt I3RYeoQctXkqcAF95ft28fSXTF/rzG9BvCZ4HgLDisDzezE9P8V8hGqUNTEY9p0cfqTI8e 4NCpbwQINkjaKPhcqNTWIt/BTZ3n16z3McjMNrQ30A79svI1BTgcWaaT3jPyhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732707150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/sESmRcp8JVNHpXWu2FKFdwPcYb9qTWk9G60GpQ2U28=; b=waAEWoSltLTdQc8kSP68H4YMmNGuXtwCv1qGLeH2hOmMC+/fZIZFgomuU88Ivn97JU9nbg gAyrL3Pa1B2VQvRHwK9NZcGJt1x2a7GNx/cobn+UmDgUYCZ3zs7fWdGJlBHt4GTCcdwMdS /LtDkUCErWDDg0AgCRyVLvwi82hWeMsbSNgWHUxLt6+KEzWE216vVyFKHzpOux+ztp/rkW EEEvAXEopGTWLdopC8vuNf/sQOj0p4T6J3YAjkbJ/ue/wJgW5b+4BskbQykWHK2CY+0JEK wCdq62AtRP87l/OCHhwUunsn97HzmSO2L+Ap4z3DXuOvge605b7FR734xolGvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732707150; a=rsa-sha256; cv=none; b=VtHQgPcjLq1Nge9Max6496tn2pNlSnyDtQliKQAstDGRJe0igf/6aF+LIP73S+X60uooFC /LbW106CdEj5CLMf8vw8cxylPSiBFzvhjaMquQCSpqQwi+sEsMLQtR5+dmiKxPTabgN99L 9WQR2f7N+NNkOfYMGRpQbTi7IQZhyKiN6rk3cxelxVpxrWhzHK+P7h1PkGt8SNEmoTDJrO aXqSfD0UGiWe/Reeztg5jzNhoxdaKvJprCKsOXR5novJvNYxl0/FQWUAAE8420Z/psM53+ ar7RpJReMT+0sypMwBVUjrQ0rCCk/L+WC+pQ+36RLl/to/9QjYk3R7autMTwxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xyy3L21h7z174y; Wed, 27 Nov 2024 11:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ARBWUE0014449; Wed, 27 Nov 2024 11:32:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ARBWUlF014446; Wed, 27 Nov 2024 11:32:30 GMT (envelope-from git) Date: Wed, 27 Nov 2024 11:32:30 GMT Message-Id: <202411271132.4ARBWUlF014446@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 73cc71607d37 - stable/14 - rtld: drop RTLD_INIT_PAGESIZES_EARLY List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 73cc71607d37b6038d52f945cd438cd749f316f1 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=73cc71607d37b6038d52f945cd438cd749f316f1 commit 73cc71607d37b6038d52f945cd438cd749f316f1 Author: Konstantin Belousov AuthorDate: 2024-11-19 06:11:11 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-27 11:31:55 +0000 rtld: drop RTLD_INIT_PAGESIZES_EARLY (cherry picked from commit 5bc24fd7a21ffd98fe978b4eb09a383c09edbe37) --- libexec/rtld-elf/rtld.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index e1813217a854..c0d0be1d6cda 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2404,11 +2404,6 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) const Elf_Dyn *dyn_soname; const Elf_Dyn *dyn_runpath; -#ifdef RTLD_INIT_PAGESIZES_EARLY - /* The page size is required by the dynamic memory allocator. */ - init_pagesizes(aux_info); -#endif - /* * Conjure up an Obj_Entry structure for the dynamic linker. * @@ -2443,10 +2438,8 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) /* Now that non-local variables can be accesses, copy out obj_rtld. */ memcpy(&obj_rtld, &objtmp, sizeof(obj_rtld)); -#ifndef RTLD_INIT_PAGESIZES_EARLY /* The page size is required by the dynamic memory allocator. */ init_pagesizes(aux_info); -#endif if (aux_info[AT_OSRELDATE] != NULL) osreldate = aux_info[AT_OSRELDATE]->a_un.a_val; From nobody Wed Nov 27 13:24:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xz0Xb2B6rz5fBcS; Wed, 27 Nov 2024 13:24:31 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xz0Xb1h77z4Mp1; Wed, 27 Nov 2024 13:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732713871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vDd+7JQ20Q4YImsP5CXO1Gi+/Wc+RTdcGQDkd/XkB/0=; b=dCFbofxklWyY9DTFgBUK0ooYHSQGXBmdxdA54TG3a4JMEn0iSu8l81xhCNxbTvy+qwITFC oiY5RHJqNTORRqfIjjGQmjVBmMACFsenyQOK1z3FaxSDU6gBdoe+99a20pRps9NtI1nv4G FNRndYqQgPWyZJcQXRiV4quxRoa7ObCFfoxPZrp6YkLSBNVPm7CnuX4INEiVxTY+qB5IO8 2mJujlnKBJfjTfgN5W1t/7foXWN5x+Rks4gEeI4ngbABbw7btLVcws5Gay+DqFrg6G3puO oGfqP+RYZ1uSDF9MUM1pTYxXPOAFJpjmSrctmMJrJsBK9FIjz9+fAVNB+AMUmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732713871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vDd+7JQ20Q4YImsP5CXO1Gi+/Wc+RTdcGQDkd/XkB/0=; b=lt7ELFgtzrepBJuERNGogSybCrjxFxjAK+C7UUJVgxLn+AQdAtMaY9ggmK4+g44fj24uY9 Xs0szDKxbIe8tytO2naTv0dwXuKyO1DvZCCUOUxN9puvjhgvULNR7DJIzI3yV6+4kHhs7l UMrHE/ejvwQnb0YDW1lDFz3KiBqsT1idI6Vm4LbBrFqOmym26Jnq91VPEkF8p6HBnPvM/0 I0sduzj8l7rCQl1S7annbBxstYVU5KomUc9o/HL4Wmn7SoA1ZgeF9bQeAD+vO44lQMONYh BqS1TOkwbTFmxY9WaNTN8SyG7xMDftc3NcKh44kuMwrwvxtB1+xIT6HKq3GEYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732713871; a=rsa-sha256; cv=none; b=vLM7EOGfZwayxp1bacgwnFaHBw22MRiGXcEMwlkawJqu4d+kSicIAp/6PH6dCwIj1YYKcl S6/ITL0ZfrGY521wZyBht6z2rPVLhWpEccZ+/y/RFRq08bAv4njTfd4u/pa+BDkM7s8Y9Y 1bOJ6vxdqseXmVLx0ulc0C3y65KPNmRnXllOJ4YKilmsMm/BMREePlIpzXJhFKLmo8gONO RaGApngZm0ovSi9ZO9HVFm+9AL4FLQHhN1m+Nz4E8fabZBHTUxdz3AZRRh9Jxk94bcbzCA ++aZWc5qQOKHftmLadMBYi139q42RItd3rDz2nPC/pIjYy1fHA0HdvfS0uIdfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xz0Xb1HH9z1B2N; Wed, 27 Nov 2024 13:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ARDOVKF019960; Wed, 27 Nov 2024 13:24:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ARDOVt3019957; Wed, 27 Nov 2024 13:24:31 GMT (envelope-from git) Date: Wed, 27 Nov 2024 13:24:31 GMT Message-Id: <202411271324.4ARDOVt3019957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 93c80b79ad65 - stable/14 - pf: fix potential state key leak List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 93c80b79ad6564a17553fc1df41d57dc9da4cdec Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=93c80b79ad6564a17553fc1df41d57dc9da4cdec commit 93c80b79ad6564a17553fc1df41d57dc9da4cdec Author: Kristof Provost AuthorDate: 2024-11-09 09:53:37 +0000 Commit: Kristof Provost CommitDate: 2024-11-27 13:19:53 +0000 pf: fix potential state key leak If we fail to attach the new state keys in pf_state_key_attach() we are expected to free both keys. Do so. Note that in some scenarios both key are the same, so check for that before freeing. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47495 (cherry picked from commit 371bd29d4b22257a7e92e1e711cca3d94cfbd00d) --- sys/netpfil/pf/pf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 4fd884852d90..80f3fdae1861 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1345,7 +1345,9 @@ keyattach: s->timeout = PFTM_UNLINKED; PF_HASHROW_UNLOCK(ih); KEYS_UNLOCK(); - uma_zfree(V_pf_state_key_z, sk); + uma_zfree(V_pf_state_key_z, skw); + if (skw != sks) + uma_zfree(V_pf_state_key_z, sks); if (idx == PF_SK_STACK) pf_detach_state(s); return (EEXIST); /* collision! */ From nobody Wed Nov 27 13:24:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xz0Xc2BxXz5fBcT; Wed, 27 Nov 2024 13:24:32 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xz0Xc0JsNz4Mp2; Wed, 27 Nov 2024 13:24:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732713872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=opPKkBSmcPuYS1NPksOOHHaihwfWbmYtNuXqOXDbOwY=; b=oT9/5TVB/0s3alzmLx1WRBBplLFDYROiu/8eg+uc4kxWPW11CkL0H9Iymq/XvmfhdMmRUe 1ghYkbt/XXieD3NrwJav8rhPH8ZBeV32MzWD9A8rNHhjMh+FxO+i3TRUvj2yvDHm7R1tTR c9mB3/QWgzp3OcHWZECLZf5HPXDlWUK0NO6sCDzRVHhi34eC/Uc7e3fZno+RWjm/COSYKw FsZW51Tk5XYx7Ys0ATD706ltY4zWHkj8tCuW10P22HXONDhJU8y+nBRGuiOXhWBBuMyqvR 1cMPiPzWZ2EE2/ApRAJ5+qMJYbcvrtOMS+TIge1lDoQemqbqtEuWwLaWdGvAiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732713872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=opPKkBSmcPuYS1NPksOOHHaihwfWbmYtNuXqOXDbOwY=; b=rBH6K/+09r/xXmxN/MsgLKTNLAtwrRKqvpQi03GNzbnY6OvO2rSXsAsVgSiA4dCyZw7wCb G1iQKoVhnb8e62KzfRmFKGIPfo5FQVJeBBnLFWsL9N7fJwGbvQW+Ugxk1g05/Z6Gf3dVLO 8Pl/9d7KMlN8qVmkQwd2tO/wauR5BELiro7PXUEGU7kAEm7hfa0tt6Hin9B85Rf3SoN5Ku W+61Atsk6Px02TgzxKMBzCUifLlcRa/qphlU3Po3BfosmTmxSilNmrPJ14TCXK4ykppWIP 2i8GR/xkDRNNHBEot9GmF9yTJdaFhkUqxN9yVGDnT+3q1CJBxfq0xmQalLQATg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732713872; a=rsa-sha256; cv=none; b=rOtdGd3gfhaE1qTr43cFE5ETa+dFtA8adtw/Ku872AvW+3KrRnlOO8mHB+i2pRELnjFU+p qrMUf8SXL5BakQCTmdr02A9r+HNJ7fxxFlynduUfzXpT04wx07iPRpRGGDvitefQPbX+58 Uy32lX0JIrxXRq8Ob4oWTISzw++4G2gr5/K+M3lycLEcXZ2RJS0pKEUviQJ90VyLOWZboJ vEjdjtS4jq64rKKT57ASAVHHciZXEuRHqbVmq9DpjoBlN3a3Z/s3qcd3obTAaoOz4rwPlV JR6X3H/PBTOgqA42lCsweFpVepA8w/OxuoRwQflBpAsLEc45jE1F4yLIPfZc0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xz0Xb72mSz1BCh; Wed, 27 Nov 2024 13:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ARDOVGc020067; Wed, 27 Nov 2024 13:24:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ARDOVA5020064; Wed, 27 Nov 2024 13:24:31 GMT (envelope-from git) Date: Wed, 27 Nov 2024 13:24:31 GMT Message-Id: <202411271324.4ARDOVA5020064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: b4b2e420195a - stable/13 - pf: fix potential state key leak List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b4b2e420195affca5251ad40e268aeaff9fc5623 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b4b2e420195affca5251ad40e268aeaff9fc5623 commit b4b2e420195affca5251ad40e268aeaff9fc5623 Author: Kristof Provost AuthorDate: 2024-11-09 09:53:37 +0000 Commit: Kristof Provost CommitDate: 2024-11-27 07:28:01 +0000 pf: fix potential state key leak If we fail to attach the new state keys in pf_state_key_attach() we are expected to free both keys. Do so. Note that in some scenarios both key are the same, so check for that before freeing. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47495 (cherry picked from commit 371bd29d4b22257a7e92e1e711cca3d94cfbd00d) --- sys/netpfil/pf/pf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 810966f88a89..8dc7a153c3ce 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1302,7 +1302,9 @@ keyattach: s->timeout = PFTM_UNLINKED; PF_HASHROW_UNLOCK(ih); KEYS_UNLOCK(); - uma_zfree(V_pf_state_key_z, sk); + uma_zfree(V_pf_state_key_z, skw); + if (skw != sks) + uma_zfree(V_pf_state_key_z, sks); if (idx == PF_SK_STACK) pf_detach_state(s); return (EEXIST); /* collision! */ From nobody Thu Nov 28 13:30:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzccf0Gxwz5fj4P; Thu, 28 Nov 2024 13:30:10 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzccd6lSCz4mHg; Thu, 28 Nov 2024 13:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u0EB6PMK0mXZxqo2IeA1Wk+1O3cuYCZI5F0gwM7wnTw=; b=sHbYb85xPM+szwxSFzdaaoLAL+CDFEDajpFjPvhpQnRye18R9iroebTJ1JpkGFg9pGVM5d ELqSejwpL9DTKoH3vJEfG1Df8bPuvBoAc/oCtOt06Ehwy/oYf89khKqhF/35wC7nhA2vkI BNLj4eS6TGjpP+oTreMVs4h3kWa54AraLRTsmgp14BAWph7JBWCGUYrEdKIcORpGcujMNj HL/AFFf7pNKZodMC6JIlZM0Rov5ZaCXbrzkCPye04v0JxzOYleXRpY74H6fg6zot9Ld3Wg 0COzZCCMosCEaG4D/ln7W0DYOr1a/sq677pfoUewIS8qy8KSimRsQbLR4sZYDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u0EB6PMK0mXZxqo2IeA1Wk+1O3cuYCZI5F0gwM7wnTw=; b=A+PFXYKisdcHB2e5oIMAqNHrNUhm+M+qsOfDx/5jj6d9dj80lMmnN5aHFQd1YvcUtZcRUX kY3PD4Y5O7KohFj9mh9ZEqPEljFVAkZ2ZVETl+3TnZLr2GsBsTpIqShuyGqvLZ5+3OVja2 76u6Jo8iHEAFmVHEDtoz9kBLXnd1ZOr/r/ZAid+Sz3O+7aBvTCS3LdaygsAu3uksQcfF+n skNHN2SEKABmirHLNDwLrFCGFzTBP3aYNQDaY7nmXkBBPH6dDT7BSonR++Vpx/cYFj1P9J rhCsFbpln7zGALgrR+0dDRu02W0xHAZw/5tGhCMA/wJFX2Rp3Gt8U/QZ0iaVxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732800609; a=rsa-sha256; cv=none; b=TiqBpUPpkhVyMbuUBKeL9xDm2dX+5xyBExy7G6jvQbhno57fiWQFOEjD8JwmIgiDfYZpG9 dQGdIo5VhSIgAKnOQ6evepJ+kUBhZXUeGeyIS3hodaZF2ddPF34hAeIfWFE6oD+Ds8unqx kE4GLYHwbMaoK6JQwEauFk1dZkPsnPRSNsXYQVNwx1IlRF7Ylzj8GJi+rmiLGEcsd/udhk CXVMIkSX6EMxxZjPYo+eJPYkv8qssf566ZeLu2mhxJ+WS/nMceQAz7dnpX0KS7koBrgOpH O/D3LKHErGdlxy9PNHzDcXjjN/otDnkh5xnoqcKH/09+P4FELf5PW8HXo8eSTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xzccd6Lw7zgbK; Thu, 28 Nov 2024 13:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASDU9Sr009667; Thu, 28 Nov 2024 13:30:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASDU9jQ009661; Thu, 28 Nov 2024 13:30:09 GMT (envelope-from git) Date: Thu, 28 Nov 2024 13:30:09 GMT Message-Id: <202411281330.4ASDU9jQ009661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 617e683319be - stable/14 - efirt: mark dynamic region executing the RT code with the TDP_EFIRT flag List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 617e683319bec099e02301c6f1120fd5d065d3ba Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=617e683319bec099e02301c6f1120fd5d065d3ba commit 617e683319bec099e02301c6f1120fd5d065d3ba Author: Konstantin Belousov AuthorDate: 2024-11-21 19:40:18 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-28 12:53:16 +0000 efirt: mark dynamic region executing the RT code with the TDP_EFIRT flag For MFC purposes, the TDP_EFIRT flag is moved to td_pflags2. (cherry picked from commit a03957a706a05bb0c2f627183b19d84f6d96dbb7) --- sys/dev/efidev/efirt.c | 8 +++++++- sys/sys/proc.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index 2d45b4d6ac66..92ffeae12734 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -309,6 +309,9 @@ efi_enter(void) fpu_kern_leave(td, NULL); mtx_unlock(&efi_lock); PMAP_UNLOCK(curpmap); + } else { + MPASS((td->td_pflags2 & TDP2_EFIRT) == 0); + td->td_pflags2 |= TDP2_EFIRT; } return (error); } @@ -319,10 +322,13 @@ efi_leave(void) struct thread *td; pmap_t curpmap; + td = curthread; + MPASS((td->td_pflags2 & TDP2_EFIRT) == 0); + td->td_pflags2 &= ~TDP2_EFIRT; + efi_arch_leave(); curpmap = &curproc->p_vmspace->vm_pmap; - td = curthread; fpu_kern_leave(td, NULL); mtx_unlock(&efi_lock); PMAP_UNLOCK(curpmap); diff --git a/sys/sys/proc.h b/sys/sys/proc.h index f794cbe17442..3815571cd46f 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -567,6 +567,7 @@ enum { #define TDP2_SBPAGES 0x00000001 /* Owns sbusy on some pages */ #define TDP2_COMPAT32RB 0x00000002 /* compat32 ABI for robust lists */ #define TDP2_ACCT 0x00000004 /* Doing accounting */ +#define TDP2_EFIRT 0x20000000 /* In firmware (EFI RT) call */ /* * Reasons that the current thread can not be run yet. From nobody Thu Nov 28 13:30:10 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzccg21SHz5fjTc; Thu, 28 Nov 2024 13:30:11 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzccg06lNz4lsP; Thu, 28 Nov 2024 13:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GA8T/HjDT/9cxoSAtA7eO5vk+cNJJASZn2il8gGLmwg=; b=soVL0P+KqvA67kkVD9EWeuibCcKx+J497GyW8/IHtPRVOAg3USIGJSOIPtPUjHTCFj4uSp Ae2XkGNt7C6HfFEkxLvHMETzaiwI8ftGEytjgdYOEAPzXAaRyUphHBbJrrOqtpTDyHt3iF ZUsU9cf3W1XJBHfyN4zbKLMaOKpys7jGSH7WMZRu1j0+TymWHlxLs8WXuEhTjBVVvki/H4 B9CfhkVPPERQlCrtyu3fVQU74KSP2qfXJzmgyFTWIxYGzLr7kcwF7t/wfw5waITUgrS8iX +yaPnHAzh3U4iDjpuMPQdvzeuFJ5r+tRwIKz8zEcGiJ2GEFlHK1TbKirjkBAnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GA8T/HjDT/9cxoSAtA7eO5vk+cNJJASZn2il8gGLmwg=; b=vV6icHaDoOI0EXveG3+Xz+pX5c7MbFyYzQRcjs6XMgoq5xj8kpoXn/5VDFIP5e9bRa/r4D Y5O6vWb0BjiD2fMy2yMWkPPoaUVWnfnJrinGQFRx6p/tBZohOIexbrT2eOmnB9ecDC44W7 Apf7UnNnsX+AXDgBlUlDYa5AtEp+y8r7eOkg6GPv4P3jk2Y+mT1brWQfSD2N13xeze0+3z 0M02KXYAKiGGM5u3yevolDN2K+dfivKev9uq4HzVLWYVzgM/b2Kl1aKOesnNBdrZfNBT6J Qi82jPa1/7iSgRKC3PrEwMgmixr2APap4FHnN/PEuw8+8aMVe9JGzPGLY+Z40g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732800611; a=rsa-sha256; cv=none; b=TwFNzCpfKBGQoBqnmLPCcGoJCzNV2UWw8eOeQd0h1Ira5bGG+DoBQ1dSsLx1DdWdrBEDGl Hkq1CpGWDJhDalPr5zrolSaNC4brC26SLA/mmMBeFfudnwdgZ7XBxqyyiJNpawAramcFUD x+IsMM6giDWULC6XLojRMWI+3WbuSCPO8WjTlI8TBFs42m/UiKlTitNZPBY1yAquNPFLED JLfUsqa4IfW0LzM7PFGL5zJG8iDnKm1Qwc4F+VYKt7lP0aUZXTntrI7dHdvbdIzggxvgdF NikU+8EjTJsmhRJAXSjUX619JHHSmi2bJSfPg24fmG9beVaEvEyotNcq3PIxcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xzccf6rhWzh9L; Thu, 28 Nov 2024 13:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASDUAKF010312; Thu, 28 Nov 2024 13:30:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASDUALV010302; Thu, 28 Nov 2024 13:30:10 GMT (envelope-from git) Date: Thu, 28 Nov 2024 13:30:10 GMT Message-Id: <202411281330.4ASDUALV010302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5f5b47e37416 - stable/14 - amd64 efi rt: handle #BP List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5f5b47e37416df46b52e0d43b94d9c2f37d15397 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5f5b47e37416df46b52e0d43b94d9c2f37d15397 commit 5f5b47e37416df46b52e0d43b94d9c2f37d15397 Author: Konstantin Belousov AuthorDate: 2024-11-21 04:57:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-28 12:53:17 +0000 amd64 efi rt: handle #BP PR: 282860 (cherry picked from commit e6ec41fa86d88f80bd663e55455a6844619a9b24) --- sys/amd64/amd64/trap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index f5ea035b3e3c..d7e365f6874e 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -600,6 +600,18 @@ trap(struct trapframe *frame) * FALLTHROUGH (TRCTRAP kernel mode, kernel address) */ case T_BPTFLT: + /* + * Most likely, EFI RT hitting INT3. This + * check prevents kdb from handling + * breakpoints set on the BIOS text, if such + * option is ever needed. + */ + if ((td->td_pflags2 & TDP2_EFIRT) != 0 && + curpcb->pcb_onfault != NULL) { + frame->tf_rip = (long)curpcb->pcb_onfault; + return; + } + /* * If KDB is enabled, let it handle the debugger trap. * Otherwise, debugger traps "can't happen". From nobody Thu Nov 28 13:30:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzcch1zndz5fjZN; Thu, 28 Nov 2024 13:30:12 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzcch0jTyz4mL5; Thu, 28 Nov 2024 13:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QH2VrCO7VDOFBPmhMNLGlF/DITeLLf0+6xTVG70Lv30=; b=DBS5I0H7uN7syLhwvokoS3gimAc83saWiLUMuxFZBf8O387Hv6Bzx8CujLu6t2TCjET1BF uSvVLYRDS6XlWWUvhkJnfqIZU8cVQJFDSl+nVcp20ybykv3F4JZoEpdYF+c/KFTBXj1YNm XZZJMP9SUiuoPpnz4eZQNiM8NY6YTGxQzrn7Pgh7NaQrUiCUU9ruQr/bTi2rVrKuQD5e8D 3xFdj2xvNrwi4NMzfUE36dNu5fhtLdZFmvsOgWiK+jkATJfCnaKqNBnKQ41nzxD9BD2ajn bSALCPp4r1x7JuZF7d5jfSLY18RFoRu43vI0bH7s+CFivKBHOG0QS3sbmmZODQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QH2VrCO7VDOFBPmhMNLGlF/DITeLLf0+6xTVG70Lv30=; b=t91ceYmDY286iVGwR/cSAL5MTkoFyTVZWb67BBm9OGe0+qzyKUz2IdObOwbLK4Azi5gw77 VpZG47+/0xFVykmzHsK033T+C7gNCxipuNie3wnvXWvzKEJvxx5ldMDpltkU0bR7QxjEDc 2sCdm1eyknI20Xxwv0W6WafX1l9aVj/zXPK68LzjiUrS11l8SCZ7FPC8wjrIMwBufJUeKY wd65tk7qDFPC4I4gtan1r8z++v2Uh97q0TI161FSk9YXjnVVFN0IE/Ib47M1pVl+9i3ref 9SeAZvtdpINOTNZaNzIcnP/oN0zvfcrRQ8KmoP4gZuGfW7pBi+2W11QpbyxhWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732800612; a=rsa-sha256; cv=none; b=SF3pYN5UTRftdPiRXfI2zy2+jDNphhXVJ24zykAJhn+EI756KPz9tRxq/o9fWPfrHIRUXG 6ow7F14RBoUls+wjjC74zgM2w4b12VdiZZwyTe18TXjmhJAr77y9n8WPxcZVFR18kYSmCs D1iYSzBfYOhVv0MLvzHhIK8qymC1vf5j1pxuF8S2y8Y5H/j+mt7XU9AKVYPJiwX+P7mM7N fzu11+8Iv4IJ5WReJunroODLv7rroGLvcihWkHG6F7hgevSsaBk+cRz3sg0hLtJNmapwWH EWjFI8PuLXS4wmF6gz21ZNRRn/3aZ6Ksa7PZ5oY6rSSbuLLX5OLcj6O1EDVTfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xzcch0HR8zgmn; Thu, 28 Nov 2024 13:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASDUBrD010972; Thu, 28 Nov 2024 13:30:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASDUBKl010963; Thu, 28 Nov 2024 13:30:11 GMT (envelope-from git) Date: Thu, 28 Nov 2024 13:30:11 GMT Message-Id: <202411281330.4ASDUBKl010963@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1c65ea28841a - stable/14 - efirt: Fix the TDP_EFIRT assertion List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1c65ea28841ae709f199680296004d6b81bfa375 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1c65ea28841ae709f199680296004d6b81bfa375 commit 1c65ea28841ae709f199680296004d6b81bfa375 Author: Mark Johnston AuthorDate: 2024-11-22 14:19:37 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-28 12:53:17 +0000 efirt: Fix the TDP_EFIRT assertion (cherry picked from commit 07593d13fa2ad6fe4d962b7473c6020aef2a0414) --- sys/dev/efidev/efirt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index 92ffeae12734..a74ce9fa9a06 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -323,7 +323,7 @@ efi_leave(void) pmap_t curpmap; td = curthread; - MPASS((td->td_pflags2 & TDP2_EFIRT) == 0); + MPASS((td->td_pflags2 & TDP2_EFIRT) != 0); td->td_pflags2 &= ~TDP2_EFIRT; efi_arch_leave(); From nobody Thu Nov 28 13:30:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzccj6R9jz5fjX6; Thu, 28 Nov 2024 13:30:13 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzccj1l7kz4mCT; Thu, 28 Nov 2024 13:30:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RG2/sFpsaMTnD1tPyft7FqE9F28AZgmD9h/QT5L1uqM=; b=X0Z9ChQo1Llyk1SpmN4taeCOs94SUsA8z7ch+L/0OETraWjouy2OzHE9vpFwmGVMPTeZFh Je93x7q744lGZqP6uAO80iOVbILd6GPSmbNFbkIu3JdxvMpDyGpSj9lJ/4w6W2vwbwYo5f fjXcrWVhdglQTqq5C8Tg1ZSifOpZZnFgQeQB6/ag+rwgUz4F5PFg/7QC2TwuWd/dp7HMBi FpB1yAtGDCahUdb3JZSKEAVpU+LINkrhhyB/KA9SL9VLj/u560AWymkHZf2ZctXqzXtH6k 3OadVsuT3AD2/P6pzO8cz1INbMpq5pZSFLFmLTIEocWayGcJfBAwFyt5GpvIug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RG2/sFpsaMTnD1tPyft7FqE9F28AZgmD9h/QT5L1uqM=; b=d65whk6uts2BAmrCUEC1wByIXB2igAy+JtifSY8a67GW9iUmE9f0LHOwM0+sJHQ8j03umu 55npwQGw8KwjqmC+ly3jLqfUgsUw6DPzQRIMdyDtcpHxefxr++9HhpmvuXgwImbw7labnQ 8m1Di/CVwTWYNO12v6Q8NZzcEevrwvJEJpC3rJeWbba8YB5riVwo2wfXZCDjJkQTbtuRf7 rnuzJlGfkSRZXbiSF7WlhcAxiWl0lDMmtaNVtDfbqAFIp3/aUZeLcVk+R+zyK8cy5ac9gF 5AWYvuv+rrTYzvv039Iky4udxObqfXLZdAeBCwS4CLlQG3QlNkNVM6ZG+cNMcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732800613; a=rsa-sha256; cv=none; b=wSmoDR1dbGR/wbPFrbLw935w8gHJAOhlenPfhRR0d9svoon3cDx1Mzl2RjDMSIq9bGCTtV wtl2GA5+STLYroOrDf7/RN/mBhcR1JdK9cAaSu9DmsqVrWS6fGuZypYlwZ6Wpigm9PTtZx 0PT2ke3Vw2NmCT+TS12+tHCBtLdcPl7eB/cvXlIL7/qEcHLE/kPQ+dmUMj+exiMHAkYVG2 wbFtMGq1W4+u2GNtzm/KdAuE+NOKafQcY4n1oAZ+n2TJ9ksBDtIlpTYSgT/8Yv3r43EPix A6Lv90U+jzeklt8NiItmaRChjxcJ55JRf2nb3MRdVk1mFhvHRLNCj6j+yJjzWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xzccj0d27zgmp; Thu, 28 Nov 2024 13:30:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASDUD94011647; Thu, 28 Nov 2024 13:30:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASDUDE9011638; Thu, 28 Nov 2024 13:30:13 GMT (envelope-from git) Date: Thu, 28 Nov 2024 13:30:13 GMT Message-Id: <202411281330.4ASDUDE9011638@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 7efa3a6028ce - stable/14 - fhreadlink.2: fix old typo in the manpage List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7efa3a6028ce0cde4981ef432c7013c3f779aedd Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7efa3a6028ce0cde4981ef432c7013c3f779aedd commit 7efa3a6028ce0cde4981ef432c7013c3f779aedd Author: Wolfram Schneider AuthorDate: 2024-11-25 18:35:27 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-28 12:53:17 +0000 fhreadlink.2: fix old typo in the manpage PR: 282967 (cherry picked from commit fb4cdd51608f3008f035d01f6a499811cda41735) --- lib/libc/sys/fhreadlink.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/sys/fhreadlink.2 b/lib/libc/sys/fhreadlink.2 index 2d8db95685da..ce186b7654c7 100644 --- a/lib/libc/sys/fhreadlink.2 +++ b/lib/libc/sys/fhreadlink.2 @@ -60,7 +60,7 @@ code in the global variable .Va errno . .Sh ERRORS The -.Fn readlink +.Fn fhreadlink system call will fail if: .Bl -tag -width Er From nobody Thu Nov 28 13:30:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzcck2tLWz5fjTk; Thu, 28 Nov 2024 13:30:14 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzcck23STz4mWh; Thu, 28 Nov 2024 13:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5n71S7uOzmbAiGgQOQFXAJtnB5Af2X5UfzvBs5uLoj0=; b=RRzEnEa2hd7sUVZkGlVgEkTo5somvgZ7wZ1mPiXhaYxWB3oz+WzUA0fW/JrwA6PQZSWyKr JpPHlrP60fGfKb0ssZqD+/XIqhZ+sD5NMY1IJVyh+E1Q/GXjcRyeosaTNPDiUkzyNgM8zx 1mmFtQHY2xZzqFdYDTawrHmNUbvt22apoJHLDfeUU7ewEF0M8tKe0jN/BxZLjBqoi7yFzW vXZ7499UHffU2D5DKRqjS4tKLVs0gpU09laAA7XmZ0tYnkDiLgNycb+/t9EEAQSfSOa8Nn ayDptfPF2cNWOuIrXkGkXAu6B7887lDbVWCm1ZNVah+PQhFf8cVxtz+C64gVXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5n71S7uOzmbAiGgQOQFXAJtnB5Af2X5UfzvBs5uLoj0=; b=PZ3kcL5GyprskDdngU0GgZU9miPimpbaiTjZ2NXWajzH2nXa0/oALTslFXEvTKroqeeG5X 8uNkj1CBD0NJR5HKgN6CcR0Mfhxyajy5eKgvx9xvMXWJhJmEgD0pLq9Ctp7mFvzzhKFP1Z YOXDWS05GfQEB7YuNFG5XvEOm1drd74dwqdJZscMRuwN7NyIwcmcqQ7FS4Pb1lW8Ll8+fn yYPwOdyDDst0ykQYtx6ncR1RusApr0rXaUtzU/tcOoK6OIrpITLONYLuIioJk5s8Z8jGi7 ZrOLZXd19Do1duDD5b5hT80230A4fKUf3VudiBCMDLk9RcsBAzMGxL5Je0qeYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732800614; a=rsa-sha256; cv=none; b=MJlRwock36o4BJQjcecebredllHamvnxTnBpN6nEDRlh5NU8zfAMntHJwt3/DxACiKs116 orbxgoppiNZyn0R0P8O+ssTJuCA631mEmoewt32XVjsYX13M/F/RKPg5cSBdpq4LEukDdS r6wg7VLx73pEetW163509lTOs0AEQk4YxhAZviWjpTdbfjh1FC6uSehH4qvToDvOkG8Xam 6c9A/UNpacxnGc+yrfBk2y9NdQvHYtPubd6IQYfZWuZyzJ6piIglO0WHQlex0KTcYhlAxD WWNKzl2/eLbmJKhuJjjjFPDx3BJWcdN/EfKhH0jtjyzObgvtAlB/zgNS3n2dOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xzcck1Qw5zh85; Thu, 28 Nov 2024 13:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASDUE9M012315; Thu, 28 Nov 2024 13:30:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASDUEPB012310; Thu, 28 Nov 2024 13:30:14 GMT (envelope-from git) Date: Thu, 28 Nov 2024 13:30:14 GMT Message-Id: <202411281330.4ASDUEPB012310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ab6a6a092834 - stable/14 - kern___realpathat(): style List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ab6a6a092834e7b3a74e1b05d3006ca2d91a7188 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ab6a6a092834e7b3a74e1b05d3006ca2d91a7188 commit ab6a6a092834e7b3a74e1b05d3006ca2d91a7188 Author: Konstantin Belousov AuthorDate: 2024-11-25 12:41:17 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-28 12:53:17 +0000 kern___realpathat(): style (cherry picked from commit 31784ee1e37dc0337637493721c4c9b98547089b) --- sys/kern/vfs_cache.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 9ec0970628b4..d48c1c0be80a 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3178,6 +3178,8 @@ kern___realpathat(struct thread *td, int fd, const char *path, char *buf, if (nd.ni_vp->v_type == VREG && nd.ni_dvp->v_type != VDIR && (nd.ni_vp->v_vflag & VV_ROOT) != 0) { + struct vnode *covered_vp; + /* * This happens if vp is a file mount. The call to * vn_fullpath_hardlink can panic if path resolution can't be @@ -3187,7 +3189,6 @@ kern___realpathat(struct thread *td, int fd, const char *path, char *buf, * this should have a unique global path since we disallow * mounting on linked files. */ - struct vnode *covered_vp; error = vn_lock(nd.ni_vp, LK_SHARED); if (error != 0) goto out; @@ -3197,8 +3198,9 @@ kern___realpathat(struct thread *td, int fd, const char *path, char *buf, error = vn_fullpath(covered_vp, &retbuf, &freebuf); vrele(covered_vp); } else { - error = vn_fullpath_hardlink(nd.ni_vp, nd.ni_dvp, nd.ni_cnd.cn_nameptr, - nd.ni_cnd.cn_namelen, &retbuf, &freebuf, &size); + error = vn_fullpath_hardlink(nd.ni_vp, nd.ni_dvp, + nd.ni_cnd.cn_nameptr, nd.ni_cnd.cn_namelen, &retbuf, + &freebuf, &size); } if (error == 0) { error = copyout(retbuf, buf, size); From nobody Thu Nov 28 14:38:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzf7y4hxTz5dnWb; Thu, 28 Nov 2024 14:38:54 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzf7y41hzz44BM; Thu, 28 Nov 2024 14:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o9Wr4WT6oMumw7WD5XabpdU4Bgcx18fSm/vRV7bcocs=; b=cvle9Fq4kquWR0DFTv7QzBPJRZBD2uDJa2nILxlmEnj9DmtXs8VziDolPPrcsoT6c81+Uf hkNYswm1OUgDj5Ml5h+E6BuSuq58LFfPTMskoGaBFaH5bmjZYRI07FpHErFA873ot21b/J 5pFoBIvBH0WdTBVaqTAztqDtY10dR1OY927N2wlsk7eu9i78yH6+rjt7hCLFxH8K2kXGFr 9E9THM0vJCUt/UIS7i5EW6qzdz3ASvi3cC8FLpRlNCt+7SM6CqwxMhlrtPhDTXRc5ns6cz yU4HtOX9/uy92+l9thuTCxZvFxrkT0F+PBgpnqQh9kxl4MJzlNeZDK86xRgNSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o9Wr4WT6oMumw7WD5XabpdU4Bgcx18fSm/vRV7bcocs=; b=m1BYtQ/ZDx/NetRYmZE2a92ioJjkCnHkqnPTTbRaP2yWU/n3Wi6ZqeS+W58nYatWXse9Yq CC6MzZtD3lWomrAl0TUPt6iUi4PqMEPq5atUz5A2bEDIX86GDZsDotBBvaJLh8nSii+DhI a6t2NEqXwNv00P0iRpbx+5vMVHmwKTrn2x2cMwfwHRp1HZ8KMvHkUtQqVFj7UKIZ3Bi4GO H5gM3ogClGhTcdMJOxRK/HhOj2gFGEr5XKY/hEUHQoeJ7e3BPaiQWo6pLmU1g+YW8SeT4A WNOiYF7QJDtku3M5A8MNUQtbBCaIwcxBqupqIZfz6pj68+nesyXo3fAOHhRx8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732804734; a=rsa-sha256; cv=none; b=YjBhVAgim025XZPEc4sCAdNTSyKNup55kASw2CS+1L1lN09QsIO4fl9IvI19LJNrVj7ao0 3irndAWv8alkwAq7lauWNBv60Vh6ir+br/y2L37+wPP3GQGH+c4y2F5kwVQB1LEvG47UKU LCBY5BZxcpncd2h/Vy2UHCa5dQx08CBLUlZJWfXKJD3J76IjMYeEme3g5oBE7WMXOZraNr fvLUkM3CLcEQEcdJS6bZu/PByw/E6Lj2Fr3Scwxz19dPa5/vmV8hLrGwTYCLyijPLXD7IT ywX9zo9O7Q6KfeDf8Ija0deO3kg1NO4vfIv86BL9Y0esROX96asm+YjMaBLklg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xzf7y3V34zjW8; Thu, 28 Nov 2024 14:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASEcs7Z035473; Thu, 28 Nov 2024 14:38:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASEcsZ8035470; Thu, 28 Nov 2024 14:38:54 GMT (envelope-from git) Date: Thu, 28 Nov 2024 14:38:54 GMT Message-Id: <202411281438.4ASEcsZ8035470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 03fdd4f38d89 - stable/14 - atf: Guard libexec/atf with WITH_TESTS_SUPPORT List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 03fdd4f38d89be0823d84436149b100c161ddade Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=03fdd4f38d89be0823d84436149b100c161ddade commit 03fdd4f38d89be0823d84436149b100c161ddade Author: Franco Fichtner AuthorDate: 2024-11-18 18:36:46 +0000 Commit: Mark Johnston CommitDate: 2024-11-28 14:38:16 +0000 atf: Guard libexec/atf with WITH_TESTS_SUPPORT Other atf components are guarded by WITH_TESTS_SUPPORT already. WITH_TESTS is for actual tests. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47660 (cherry picked from commit 43e045c1733d50fad79f3a53e05140b8dc0d7fa6) --- libexec/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libexec/Makefile b/libexec/Makefile index 204c7ef31bdb..d4b0c8088896 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -118,10 +118,13 @@ SUBDIR+= tftpd .endif .if ${MK_TESTS} != "no" -_atf= atf _tests= tests .endif +.if ${MK_TESTS_SUPPORT} != "no" +_atf= atf +.endif + .if ${MK_NUAGEINIT} != "no" _nuageinit= nuageinit .endif From nobody Thu Nov 28 14:38:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzf7z63VDz5dnZL; Thu, 28 Nov 2024 14:38:55 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzf7z4ZTDz44JZ; Thu, 28 Nov 2024 14:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TRC4pEvHH1D9I0eXrFK8YyWNLUZsS+kWulgMF6rTDFI=; b=rZELlFkbRobiIo0X1i2fjX8Qo13wDaaQffKs+kSpfypPTPCwdiBBhzKHpW9gaJknm44wPb +77TFjn+jXF/acSLZx2DOCPwt6f718ihQ6GCkWRYr5D1uonikf8wUUf1oU8VGOkwZ2ukD6 xG0KP9vkSCMO5lTgVs3WXeGBwwX1ycNsJG04fPW09bfXdu+kJvHs7+otwkCrrTFHoSGukF ddTWgm56F1wBxcNQ5nvibmFU0+hY0NmwO2h5oAxcUnKWzuRkIAP+uKujiTBQTYGKelzHW5 MHXUCqlBLWSfr0zFjK/51QFgSmJG9cEcPjK5eLrgLhRlYqHBs+d3cdsQSRByLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TRC4pEvHH1D9I0eXrFK8YyWNLUZsS+kWulgMF6rTDFI=; b=kJyRfCgTtaLD2z6gzLZX8DHfSnHOzJh/nSHD3WqYUy1540dn+kSM93zmc9wbC90Lcya7C7 qtjnKkoQPZ33vvhNfauV4wpShvc2JlhfkKsLRtOYA2kK+knOj2It1F7rQaIGyNoopJpAUv nXMTM34Aytc6RHkYoF0jf20qZy/tiFCmJyEh93/FqWOAc1Rth/7PcOMeWknAd1qMEa0cYs e+jPos2jZ83KZlHC9JCkfRkiGJSyBX27YE4EvxQsKYUaxstGlqbH24InRlf6vA+nZiL5TM HXAJJirYLYsOyAPsTRXChehyJFDMvqwiCrUSflmand3X4/l5weV1m2DvIXJapg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732804735; a=rsa-sha256; cv=none; b=GR3Yey6FGy+BeNukG0LE8+ojMBR0dYePFtwjjEUEzS9i6d/b7v7tl7JdftVkWUt+oLoN4o eeCMV/POX0/gCeN52v9A8UmQcXFeW92i0/6O6LTkoVZo2vDdfmy5Zw/lxRSSPshNPdoF1d 6FEQ9wFNsiHnz/bU4gX6ymZf2+c9mDy29Sz562pSqZ+ORKgYRjORRb9NtuGVC9T2H/3BoZ M04sQvylwEfgGjcBDFJJYUjfNsMWQGPp3K5VO/8I+aO3un3WOLdf8LrEoZkiC1hAOX7An6 yj+k/jiRvyeoAqJEo6PxkJaiSm24DLKkZoL27H4FvUpADl49Iep8GV+bkOAftQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xzf7z4BHTzjW9; Thu, 28 Nov 2024 14:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASEctRc035538; Thu, 28 Nov 2024 14:38:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASEct1T035535; Thu, 28 Nov 2024 14:38:55 GMT (envelope-from git) Date: Thu, 28 Nov 2024 14:38:55 GMT Message-Id: <202411281438.4ASEct1T035535@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c9f9f1a282ab - stable/14 - makefs.8: Clarify that makefs-generated zpools always have the same GUID List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c9f9f1a282ab81276feb81d0509e44535ebda504 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c9f9f1a282ab81276feb81d0509e44535ebda504 commit c9f9f1a282ab81276feb81d0509e44535ebda504 Author: Mark Johnston AuthorDate: 2024-11-19 21:07:56 +0000 Commit: Mark Johnston CommitDate: 2024-11-28 14:38:17 +0000 makefs.8: Clarify that makefs-generated zpools always have the same GUID PR: 282832 MFC after: 1 week (cherry picked from commit a20249443be111e8a3cb3b7bbe4a0d0e460a6058) --- usr.sbin/makefs/makefs.8 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index c87df98d24d5..803ae0714abd 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -511,6 +511,21 @@ The root dataset is always created implicitly and contains the entire input directory tree unless additional datasets are specified using the options described below. .Pp +To keep images reproducible, the pool GUID and other random identifiers will +always be the same across runs of +.Nm . +This means that when a pool is first imported, its GUID should be reset +using +.Xr zpool-reguid 8 +to avoid conflicting with other pools also generated by +.Nm ; +otherwise, it will not be possible to import other pools. +This can be configured from +.Pa /etc/rc.conf +using the +.Va zpool_reguid +variable. +.Pp The arguments consist of a keyword, an equal sign .Pq Ql = , and a value. @@ -588,11 +603,13 @@ The following properties may be set for a dataset: .El .Sh SEE ALSO .Xr mtree 5 , +.Xr rc.conf 5 , .Xr zfsconcepts 7 , .Xr zfsprops 7 , .Xr zpoolprops 7 , .Xr mtree 8 , -.Xr newfs 8 +.Xr newfs 8 , +.Xr zpool-reguid 8 .Sh HISTORY The .Nm From nobody Thu Nov 28 14:38:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzf811yS8z5dp25; Thu, 28 Nov 2024 14:38:57 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzf80693Jz44DJ; Thu, 28 Nov 2024 14:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VAevwziXhEHtpzapm0x8zZ/JWKNflXnROoWYuOzJm+c=; b=nZYjodOXliHoBD3F7rLWHculVKpKxYRaH5wDtuS9pdQ+krrWYyZUjzwUcJ5GPtnq28KZVP ZLmT1AboYjZOvU/eGXt2ibSs3YnKBQ/7CghLH5+o4iY3U1XRuS6wR1jVNMoMEUcPbPdQ1E mBy/TOG1V6XQeAzY/JuD7a4L+C86n+qXb+CJTnSrIVp25Duauozl69bWzTWPpFu48nNJQv 9KLQOCF6n2ZOT2gHCxoH4ovg0UtRGeZsAzeTok9Nwf7u5ndQKgl3q4lx3bGYvj9dtZ/F07 JJCIEL5dXS7BNRgGfA8NJeSRXUp+7J0ETs87acIEdAzeN9++B81UAiF+osn7fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VAevwziXhEHtpzapm0x8zZ/JWKNflXnROoWYuOzJm+c=; b=g280F0xOHTCjnzzHUZMh064uttaqCG2NA4NfsArEwT3gpewIwQqlyy+/T6yhriFPTG0LS5 J4inLTyuW1peeNl2kk89poVtnY3Jh9UlTzQHktg7WMpH5mJZzTBCnEHXEHc9stwZ7vJ8eD I3lZcvBnNRA+xBTPQY7HeK7in7VF+DIR8bMMs6uz2a/0rvo30bbIg6KauqgXhuNe1x4ve6 EyDogFLDrOhu20yQ2pRMGf+RlUKHl7t0XMV+0tBqA7h4CjN+uReB70TBUV+s58+GI1hOpV ZPsm6X72onS3bsLVmPaA1T1TKLFhYQdyRyvtT4qsgytuGucS1MWigoc7HzR0Lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732804736; a=rsa-sha256; cv=none; b=g5mbFrmVvDTN/zXHNwIll7ZbXBgtopnv5erTdrDQZ0M8SYld4hNh+qTJo9Fy/lcdbkQW0d GEI3ummjHUMAt3dn5zFff2BGn21XQAbgAD4yfQxZcIUjRSv5Ja0mugcQYNIj01ozCJYAOi dIw1dRxQrFPFeWMAZN86Ucn4js8QL9PO8ACuT35RbUjAYA6FirKXCG12IvvZDV6t3Cp/of 9w0z8aEoidNFScRG0mqc/iSlWScAJPSEk7HLmlomOFlUFhJ8wDrmyA8PZYvxqUHURMOOZr 6nIOrPDhHX8t2k52dDm3e6/sUvkdHN7rYe3xTesaMizlXAkMhgqf7BONUrUYNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xzf805BF6zjWB; Thu, 28 Nov 2024 14:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASEcuIP035577; Thu, 28 Nov 2024 14:38:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASEcunv035574; Thu, 28 Nov 2024 14:38:56 GMT (envelope-from git) Date: Thu, 28 Nov 2024 14:38:56 GMT Message-Id: <202411281438.4ASEcunv035574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e59a3bb02863 - stable/14 - vfs: Fix vop_stdis_text() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e59a3bb02863a5a24523bf826682a1de8b27d74e Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e59a3bb02863a5a24523bf826682a1de8b27d74e commit e59a3bb02863a5a24523bf826682a1de8b27d74e Author: Mark Johnston AuthorDate: 2024-11-19 21:03:14 +0000 Commit: Mark Johnston CommitDate: 2024-11-28 14:38:17 +0000 vfs: Fix vop_stdis_text() atomic(9) primitives are documented as operating on unsigned types. Here, we need a cast to avoid a tautological comparison. Add a regression test for access(2), which was affected by the bug. Reported by: NetApp Reviewed by: kib Fixes: e511bd1406fa ("vfs: fully lockless v_writecount adjustment") MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D47672 (cherry picked from commit 4ff291ebe80a226295351936d99fc6e3e7fce48a) --- contrib/netbsd-tests/lib/libc/sys/t_access.c | 35 ++++++++++++++++++++++++++++ sys/kern/vfs_default.c | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libc/sys/t_access.c b/contrib/netbsd-tests/lib/libc/sys/t_access.c index b37643c57d7d..f973aba3fb4a 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_access.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_access.c @@ -38,11 +38,13 @@ __RCSID("$NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); #include #include +#include #include #include #include #include +#include #include #include @@ -176,6 +178,38 @@ ATF_TC_BODY(access_notexist, tc) } } +ATF_TC(access_text); +ATF_TC_HEAD(access_text, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test access(2) for ETXTBSY"); +} + +ATF_TC_BODY(access_text, tc) +{ + char path[PATH_MAX]; + size_t sz; + int fd, name[4]; + + name[0] = CTL_KERN; + name[1] = KERN_PROC; + name[2] = KERN_PROC_PATHNAME; + name[3] = -1; + + sz = sizeof(path); + ATF_REQUIRE(sysctl(name, 4, path, &sz, NULL, 0) == 0); + + fd = open(path, O_RDONLY); + ATF_REQUIRE(fd >= 0); + + ATF_REQUIRE(access(path, W_OK) != 0); + ATF_REQUIRE(errno == ETXTBSY); + + ATF_REQUIRE(faccessat(AT_FDCWD, path, W_OK, 0) != 0); + ATF_REQUIRE(errno == ETXTBSY); + + ATF_REQUIRE(close(fd) == 0); +} + ATF_TC(access_toolong); ATF_TC_HEAD(access_toolong, tc) { @@ -214,6 +248,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, access_inval); ATF_TP_ADD_TC(tp, access_notdir); ATF_TP_ADD_TC(tp, access_notexist); + ATF_TP_ADD_TC(tp, access_text); ATF_TP_ADD_TC(tp, access_toolong); return atf_no_error(); diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index c2bded76f6dc..69a7a2cb472c 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -1161,7 +1161,7 @@ static int vop_stdis_text(struct vop_is_text_args *ap) { - return (atomic_load_int(&ap->a_vp->v_writecount) < 0); + return ((int)atomic_load_int(&ap->a_vp->v_writecount) < 0); } int From nobody Thu Nov 28 14:38:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzf8211ldz5dntR; Thu, 28 Nov 2024 14:38:58 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzf816Qx5z44Bl; Thu, 28 Nov 2024 14:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FK4XIobTbVBC6cwvingTTSMbEkV0ayyJY4N3hh7Yb/U=; b=RJXXrAOlT76b8n4xCpEvsWFw+/bW9zHT48VuYAly/HTCZI+0XwcFsQEown8CYuquwcfUk0 4gb0y5n6QojjKxkbrgV8SR2IF5D5XifGh3WBixvuWsBxZanG2EjN2IMDqkatwf72x06KEc gCKi/CC0413NmcDF3a6jCjDtSMpGLT9iZf/eexbB+3iD+L+TbxWpAL6uAEdjeuFuZS4bZN EwgExZSAklsKad5ajtN9lRobGPP3wG7GkXQNkUPUWlxPoMRP64Xu5pid5y+807KltoOvcN HupqP+GwnPICMU+ScU0uW0DUn+ZNRmQ1VTr26L5F649FbjjWh9CxUNOZTHli1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FK4XIobTbVBC6cwvingTTSMbEkV0ayyJY4N3hh7Yb/U=; b=fmBsCzzFqOGWrvzUeiO0U+3l4OJapeo8iuJkFDy/SyUUWunpbKlNMUrOo/FsosdZ1moWPG fw4IPSGSBMmYXL4PinOFWs7tw1atshoC2kFolL5y7SJ9HwmpXoWIp9nne0dRT3sQMvGBPS CnmEB40028JCzXRJQVM4lXnftuGmDtCwuV63pqRlUFnk3YNTG8Frh1lGmJVdda56UE1Ygn Mm8783ewc2KpRh63sN/htopvLroJAdI2XhcFnsSXV87d4pQrUE9fJSqZ6T+RIcyvdmJNm4 LhbAKvur4ewYI+Qv7NmWRn3eSnhG54tPLl5AAHwI7eNHeTrX0pvyA2QFvvOcIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732804737; a=rsa-sha256; cv=none; b=SR2YCd6BCIzIbdr3jWPSGcAAAW+mjd2d35sgb/RGsqVKv5goRw3knymmEVmC0Ap3xrMIrc 6ja8BZ5J50ibpxv+ndzfv0VbN8ox9zrj+2cY8l4wDPfWkQ80NSJ/cDYKLDiBx1uyBV6ISx IAPZ99D2AvBpFvGIcCtB2xHbDCvqvXIf7dobeahLTUEwGMEuZoSBa8pTjhS61zTSGToMJf NAw66MWHAB2AfzW1UJn6iEKU5z2bZhgRcNiLs7bAOI3fzqE1ee0lZURs93PE3chYDeXGwF 7oAyx3TrVsRjMJJim0aVBl7rvPbIC4lBYM1Hw4ZifcnoU2dnJC3byhyHU7Yzvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xzf815yYVzjgH; Thu, 28 Nov 2024 14:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASEcvuj035622; Thu, 28 Nov 2024 14:38:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASEcvUt035619; Thu, 28 Nov 2024 14:38:57 GMT (envelope-from git) Date: Thu, 28 Nov 2024 14:38:57 GMT Message-Id: <202411281438.4ASEcvUt035619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: ee0c917eeb0d - stable/14 - hwpmc: Fix whitespace in logging macros List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ee0c917eeb0dfd2cc74b487cac6374a5892bc4d2 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ee0c917eeb0dfd2cc74b487cac6374a5892bc4d2 commit ee0c917eeb0dfd2cc74b487cac6374a5892bc4d2 Author: Mark Johnston AuthorDate: 2024-11-19 23:48:53 +0000 Commit: Mark Johnston CommitDate: 2024-11-28 14:38:17 +0000 hwpmc: Fix whitespace in logging macros MFC after: 1 week Sponsored by: Klara, Inc. (cherry picked from commit 3c29734502c330fc8f8e345213791722aeaf55c1) --- sys/dev/hwpmc/hwpmc_logging.c | 136 ++++++++++++++++++++++-------------------- 1 file changed, 70 insertions(+), 66 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_logging.c b/sys/dev/hwpmc/hwpmc_logging.c index 742051720418..8b6c2a1feb5b 100644 --- a/sys/dev/hwpmc/hwpmc_logging.c +++ b/sys/dev/hwpmc/hwpmc_logging.c @@ -94,88 +94,92 @@ SYSCTL_INT(_kern_hwpmc, OID_AUTO, nbuffers_pcpu, CTLFLAG_RDTUN, static struct mtx pmc_kthread_mtx; /* sleep lock */ -#define PMCLOG_INIT_BUFFER_DESCRIPTOR(D, buf, domain) do { \ - (D)->plb_fence = ((char *) (buf)) + 1024*pmclog_buffer_size; \ - (D)->plb_base = (D)->plb_ptr = ((char *) (buf)); \ - (D)->plb_domain = domain; \ - } while (0) +#define PMCLOG_INIT_BUFFER_DESCRIPTOR(D, buf, domain) do { \ + (D)->plb_fence = ((char *)(buf)) + 1024 * pmclog_buffer_size; \ + (D)->plb_base = (D)->plb_ptr = ((char *)(buf)); \ + (D)->plb_domain = domain; \ +} while (0) -#define PMCLOG_RESET_BUFFER_DESCRIPTOR(D) do { \ - (D)->plb_ptr = (D)->plb_base; \ - } while (0) +#define PMCLOG_RESET_BUFFER_DESCRIPTOR(D) do { \ + (D)->plb_ptr = (D)->plb_base; \ +} while (0) /* * Log file record constructors. */ -#define _PMCLOG_TO_HEADER(T,L) \ +#define _PMCLOG_TO_HEADER(T, L) \ ((PMCLOG_HEADER_MAGIC << 24) | (T << 16) | ((L) & 0xFFFF)) /* reserve LEN bytes of space and initialize the entry header */ -#define _PMCLOG_RESERVE_SAFE(PO,TYPE,LEN,ACTION, TSC) do { \ - uint32_t *_le; \ - int _len = roundup((LEN), sizeof(uint32_t)); \ - struct pmclog_header *ph; \ - if ((_le = pmclog_reserve((PO), _len)) == NULL) { \ - ACTION; \ - } \ - ph = (struct pmclog_header *)_le; \ - ph->pl_header =_PMCLOG_TO_HEADER(TYPE,_len); \ - ph->pl_tsc = (TSC); \ - _le += sizeof(*ph)/4 /* skip over timestamp */ +#define _PMCLOG_RESERVE_SAFE(PO, TYPE, LEN, ACTION, TSC) do { \ + uint32_t *_le; \ + int _len = roundup((LEN), sizeof(uint32_t)); \ + struct pmclog_header *ph; \ + \ + if ((_le = pmclog_reserve((PO), _len)) == NULL) { \ + ACTION; \ + } \ + ph = (struct pmclog_header *)_le; \ + ph->pl_header =_PMCLOG_TO_HEADER(TYPE,_len); \ + ph->pl_tsc = (TSC); \ + _le += sizeof(*ph) / 4 /* skip over timestamp */ /* reserve LEN bytes of space and initialize the entry header */ -#define _PMCLOG_RESERVE(PO,TYPE,LEN,ACTION) do { \ - uint32_t *_le; \ - int _len = roundup((LEN), sizeof(uint32_t)); \ - uint64_t tsc; \ - struct pmclog_header *ph; \ - tsc = pmc_rdtsc(); \ - spinlock_enter(); \ - if ((_le = pmclog_reserve((PO), _len)) == NULL) { \ - spinlock_exit(); \ - ACTION; \ - } \ - ph = (struct pmclog_header *)_le; \ - ph->pl_header =_PMCLOG_TO_HEADER(TYPE,_len); \ - ph->pl_tsc = tsc; \ - _le += sizeof(*ph)/4 /* skip over timestamp */ - - - -#define PMCLOG_RESERVE_SAFE(P,T,L,TSC) _PMCLOG_RESERVE_SAFE(P,T,L,return,TSC) -#define PMCLOG_RESERVE(P,T,L) _PMCLOG_RESERVE(P,T,L,return) -#define PMCLOG_RESERVE_WITH_ERROR(P,T,L) _PMCLOG_RESERVE(P,T,L, \ - error=ENOMEM;goto error) +#define _PMCLOG_RESERVE(PO, TYPE, LEN, ACTION) do { \ + uint32_t *_le; \ + int _len = roundup((LEN), sizeof(uint32_t)); \ + uint64_t tsc; \ + struct pmclog_header *ph; \ + \ + tsc = pmc_rdtsc(); \ + spinlock_enter(); \ + if ((_le = pmclog_reserve((PO), _len)) == NULL) { \ + spinlock_exit(); \ + ACTION; \ + } \ + ph = (struct pmclog_header *)_le; \ + ph->pl_header =_PMCLOG_TO_HEADER(TYPE,_len); \ + ph->pl_tsc = tsc; \ + +#define PMCLOG_RESERVE_SAFE(P, T, L, TSC) \ + _PMCLOG_RESERVE_SAFE(P, T, L, return, TSC) +#define PMCLOG_RESERVE(P,T,L) \ + _PMCLOG_RESERVE(P, T, L, return) +#define PMCLOG_RESERVE_WITH_ERROR(P, T, L) \ + _PMCLOG_RESERVE(P, T, L, error = ENOMEM; goto error) #define PMCLOG_EMIT32(V) do { *_le++ = (V); } while (0) #define PMCLOG_EMIT64(V) do { \ - *_le++ = (uint32_t) ((V) & 0xFFFFFFFF); \ - *_le++ = (uint32_t) (((V) >> 32) & 0xFFFFFFFF); \ - } while (0) + *_le++ = (uint32_t) ((V) & 0xFFFFFFFF); \ + *_le++ = (uint32_t) (((V) >> 32) & 0xFFFFFFFF); \ +} while (0) /* Emit a string. Caution: does NOT update _le, so needs to be last */ -#define PMCLOG_EMITSTRING(S,L) do { bcopy((S), _le, (L)); } while (0) -#define PMCLOG_EMITNULLSTRING(L) do { bzero(_le, (L)); } while (0) - -#define PMCLOG_DESPATCH_SAFE(PO) \ - pmclog_release((PO)); \ - } while (0) - -#define PMCLOG_DESPATCH_SCHED_LOCK(PO) \ - pmclog_release_flags((PO), 0); \ - } while (0) - -#define PMCLOG_DESPATCH(PO) \ - pmclog_release((PO)); \ - spinlock_exit(); \ - } while (0) - -#define PMCLOG_DESPATCH_SYNC(PO) \ - pmclog_schedule_io((PO), 1); \ - spinlock_exit(); \ - } while (0) - +#define PMCLOG_EMITSTRING(S,L) do { \ + bcopy((S), _le, (L)); \ +} while (0) +#define PMCLOG_EMITNULLSTRING(L) do { \ + bzero(_le, (L)); \ +} while (0) + +#define PMCLOG_DESPATCH_SAFE(PO) \ + pmclog_release((PO)); \ +} while (0) + +#define PMCLOG_DESPATCH_SCHED_LOCK(PO) \ + pmclog_release_flags((PO), 0); \ +} while (0) + +#define PMCLOG_DESPATCH(PO) \ + pmclog_release((PO)); \ + spinlock_exit(); \ +} while (0) + +#define PMCLOG_DESPATCH_SYNC(PO) \ + pmclog_schedule_io((PO), 1); \ + spinlock_exit(); \ +} while (0) #define TSDELTA 4 /* From nobody Thu Nov 28 14:38:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzf832WH8z5dnDH; Thu, 28 Nov 2024 14:38:59 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzf830XvLz44Dc; Thu, 28 Nov 2024 14:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bB014JFOlVd3R89eDh+hYaHkcKgMR9+AexlTiZPxX6c=; b=ycK8taVGU10mXyzSib2VOU61gacqbUeFkD1TKUGl97q3PEdO7KxAWQcOiXkfwTOOHDMyuA WWddHO9DwvUMme5lRWWEKDFmdHrFOg01Xmn3iuha/RvCzt1ojWM8rpHjw4c0aTAepeMnii bY240z5OhC+1N8ImZqTDSSTYWJDR9GJfp9cNu9QaqAGo0zeHDFl66GCBXxC+5bPRp3b0BS R6FGLAPpM8/HUpjUF4dqO7sw9V7USPF6MGcx5G7RnGJbkk+9Hxi/ydv4Z6Y5gyoWyEs4u/ Vw6RzuIxsNuBoodqCg26w/FpP0e+WwJ6c7rZYXPOz7cqetfOecDevUmquQ3obA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bB014JFOlVd3R89eDh+hYaHkcKgMR9+AexlTiZPxX6c=; b=uSWQ8gDR2CxtYcboPAoXWDlXTJskWoODDWd8KLeL8islpqTYskaFf69ubSgVJmdb0gaBcQ 4eCHh8j1y8jndgt/3eSOTrVCO3whwqwzxBIGhtRTiO0aWi7YGJvQAaeLKXbg8nbuGuKUPl d0mzc+er2aqSSqrNnHd557U7gp13t2i7SwteRwSalafSloAc+S1VLNql4MgWK5UegP2r0k ttB69WR5h29gRPj/f/a/buSitq/6LifQBV2yrW+tQJjiaSjBThZbLLUlFy9hMTiwqWDguh KndMZvPU7vvSJ7a0ubiLLdYI2R70O8dVilA8zr98PWz11AqFzEqP8miP0GwKIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732804739; a=rsa-sha256; cv=none; b=WfMIjy9BqzQY7HEdcqeBEB0An+99cM6um4hzQ+P6B1kyyDAx0Dc2z4xBBLYDFoHk1SkX5R /41bIeT69uqzFVMTNUHFsZCMSwcj80cINI2j5i+HPO9SW0cQB1BblXqUtimjon/GVk8YGh AUyFRTaW5ho3Hvcc01Px76HWr8HLsJol3DzmcGldwMswNphe/m6m1aSnWAa7+IRylJSl6E KT2o8WEPc2yxxRBJq3Zcv/cMn6KjMsO7wSbDgAum+C5yt2qZFNV8bwT9jVfp1yiUwdkSf9 cc3sH4bXrKNSc8dJyAWujK2mi56EtvfpxKFJwmsQBpc3I/hlqkMLarYPdtpF8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xzf8270lgzjgJ; Thu, 28 Nov 2024 14:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASEcwqh035679; Thu, 28 Nov 2024 14:38:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASEcweI035676; Thu, 28 Nov 2024 14:38:58 GMT (envelope-from git) Date: Thu, 28 Nov 2024 14:38:58 GMT Message-Id: <202411281438.4ASEcweI035676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 34182e597b2a - stable/14 - swap_pager: Ensure that swapoff puts swapped-in pages in page queues List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 34182e597b2aee9c82744d70aca5b410f85e3219 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=34182e597b2aee9c82744d70aca5b410f85e3219 commit 34182e597b2aee9c82744d70aca5b410f85e3219 Author: Mark Johnston AuthorDate: 2024-11-13 14:02:20 +0000 Commit: Mark Johnston CommitDate: 2024-11-28 14:38:17 +0000 swap_pager: Ensure that swapoff puts swapped-in pages in page queues Readahead/behind pages are handled by the swap pager, but the get_pages caller is responsible for putting fetched pages into queues (or wiring them beforehand). Note that the VM object lock prevents the newly queued page from being immediately reclaimed in the window before it is marked dirty by swap_pager_swapoff_object(). Reported by: pho Tested by: pho Reviewed by: dougm, alc, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47526 (cherry picked from commit d11d407aee4835fd50811a5980125bb46748fa0b) --- sys/vm/swap_pager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index ce578cc4fd8b..53cd8294e299 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1895,6 +1895,7 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) __func__, rv); VM_OBJECT_WLOCK(object); vm_object_pip_wakeupn(object, 1); + vm_page_deactivate_noreuse(m); vm_page_xunbusy(m); /* From nobody Thu Nov 28 14:39:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzf842h0Gz5dnxB; Thu, 28 Nov 2024 14:39:00 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzf841cWvz44Rk; Thu, 28 Nov 2024 14:39:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U/QhgY3W1oB4pV2uu1FBL3xNlXjkomEXgWraHtvyEgA=; b=WkTgggMhcR082vUaSSbcxLdt/Dhi5IXk8Skut6V8os/Nkgm3TgR5F3f9MHLLXc/t55LtB4 A++rW1Sbel2KpWJpsY0xXWXTgECOqAEG0u5TsjePJ9SC5+2aspyrxVaTaTuFFhxxoy02vg EqQPt/nDD4kNMA/zLNh0HhCJ6Zus4fC7XMmbEpI9YdOLn8caggRVh0SjE22bPNkvQdPu8w m3GmOtsLDIVZvFTipmhvMdDp45tY7eVCl4O7rLJa6PtD6xBrwls2lQPzDch9GBvlwRQVtE +hnmtMbYfg2R55d1fo0A0WNUdWHw4vVbUE4CXR4dl3XZa+6zVtE6u5xP1vgopA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U/QhgY3W1oB4pV2uu1FBL3xNlXjkomEXgWraHtvyEgA=; b=L3/LJEPKo6WmdmrcSFjcMZfq4IyOmtIkRxirMQonmz9gx+sWW/YoI+uRuRB0SGqnb8Yk2Y RBkFHxxn4jkpg+Eml8Abo94AAAvDUnTUeFGXezG8CTRwgj5XPfJzWRXwVDWGU2TXeb1juX xX/Os2hu7MbcJ8gcPUZ+v8o3VcxIrPOnvA/UFxKOhAkPvcFabGYCO8IxbyalTz+2r/S1Lf 0gLZRlzWKHiEoU7jAzvO9T0/1uc4wLvqE7qrv8Sl+DKRAOAaClTyFKkvO1q3fAVosqDUTs /n94Yg1v3jIEKmedQY4Rcjxtv4oR82aEgEnFLkgEwnsGICYmVUS+O6wS3U4T1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732804740; a=rsa-sha256; cv=none; b=rlUTb5h+1O2KFoj515aQBHzVvIkNG+kTm5tOXNiCZvSW94fTUU5wTeKFH4wSJFhN2aHrsB D4U7Q7WfUxSgXZeWQlu+BycV+6s7HJvnY9M86kXAay/XURptUDITyIY5KirLWM2D92HMWp nOjIlCvAVSFNRfWFfaVqJ+vXgRllh9gDYGi3VqRmX5Ky1GQNV/jzyo5gYXkp5IiFlxNasX pu4pWii6aStZxjtmhPzMTH3UPUhsfsHQ/Dbi7N9fxRQwkFCwHeTht2u5rfyGy1mgStIs2b NqY9bHdX3MmIHWZ4X2dP1y+zNFFcmAGAQHMvdbGvHOpSJEol9jb7GNCxeEBgmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xzf841DrmzjwL; Thu, 28 Nov 2024 14:39:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASEd06R035734; Thu, 28 Nov 2024 14:39:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASEd0jR035731; Thu, 28 Nov 2024 14:39:00 GMT (envelope-from git) Date: Thu, 28 Nov 2024 14:39:00 GMT Message-Id: <202411281439.4ASEd0jR035731@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 906d603eeb50 - stable/14 - inpcb: Make some cosmetic improvements to in_pcbbind() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 906d603eeb5004a792116e3064df25c8b90b4be2 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=906d603eeb5004a792116e3064df25c8b90b4be2 commit 906d603eeb5004a792116e3064df25c8b90b4be2 Author: Mark Johnston AuthorDate: 2024-11-14 16:05:27 +0000 Commit: Mark Johnston CommitDate: 2024-11-28 14:38:17 +0000 inpcb: Make some cosmetic improvements to in_pcbbind() - Use the local var "laddr" instead of sin->sin_addr in one block. - Use in_nullhost() instead of explicit comparisons with INADDR_ANY. - Combine multiple socket options checks into one. - Fix indentation. - Remove some unhelpful comments. This is in preparation for some simplification and bug-fixing. No functional change intended. Reviewed by: glebius MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D47451 (cherry picked from commit 45a77bf23fa2f36bf2169f7ba2a33b31f4c35adb) --- sys/netinet/in_pcb.c | 44 ++++++++++++++++++++------------------------ sys/netinet6/in6_pcb.c | 19 ++++++++----------- 2 files changed, 28 insertions(+), 35 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index f6904690deab..36454b9a18bf 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -918,8 +918,10 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, return (EINVAL); lport = sin->sin_port; } + laddr = sin->sin_addr; + /* NB: lport is left as 0 if the port isn't being changed. */ - if (IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) { + if (IN_MULTICAST(ntohl(laddr.s_addr))) { /* * Treat SO_REUSEADDR as SO_REUSEPORT for multicast; * allow complete duplication of binding if @@ -936,7 +938,7 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT_LB)) != 0) reuseport_lb = SO_REUSEADDR|SO_REUSEPORT_LB; - } else if (sin->sin_addr.s_addr != INADDR_ANY) { + } else if (!in_nullhost(laddr)) { sin->sin_port = 0; /* yech... */ bzero(&sin->sin_zero, sizeof(sin->sin_zero)); /* @@ -945,50 +947,44 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, * to any endpoint address, local or not. */ if ((inp->inp_flags & INP_BINDANY) == 0 && - ifa_ifwithaddr_check((struct sockaddr *)sin) == 0) + ifa_ifwithaddr_check( + (const struct sockaddr *)sin) == 0) return (EADDRNOTAVAIL); } - laddr = sin->sin_addr; if (lport) { struct inpcb *t; - /* GROSS */ if (ntohs(lport) <= V_ipport_reservedhigh && ntohs(lport) >= V_ipport_reservedlow && priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT)) return (EACCES); - if (!IN_MULTICAST(ntohl(sin->sin_addr.s_addr)) && + + if (!IN_MULTICAST(ntohl(laddr.s_addr)) && priv_check_cred(inp->inp_cred, PRIV_NETINET_REUSEPORT) != 0) { - t = in_pcblookup_local(pcbinfo, sin->sin_addr, - lport, INPLOOKUP_WILDCARD, cred); - /* - * XXX - * This entire block sorely needs a rewrite. - */ + t = in_pcblookup_local(pcbinfo, laddr, lport, + INPLOOKUP_WILDCARD, cred); if (t != NULL && (so->so_type != SOCK_STREAM || - ntohl(t->inp_faddr.s_addr) == INADDR_ANY) && - (ntohl(sin->sin_addr.s_addr) != INADDR_ANY || - ntohl(t->inp_laddr.s_addr) != INADDR_ANY || + in_nullhost(t->inp_faddr)) && + (!in_nullhost(laddr) || + !in_nullhost(t->inp_laddr) || (t->inp_socket->so_options & SO_REUSEPORT) || (t->inp_socket->so_options & SO_REUSEPORT_LB) == 0) && (inp->inp_cred->cr_uid != t->inp_cred->cr_uid)) return (EADDRINUSE); } - t = in_pcblookup_local(pcbinfo, sin->sin_addr, - lport, lookupflags, cred); - if (t != NULL && (reuseport & t->inp_socket->so_options) == 0 && - (reuseport_lb & t->inp_socket->so_options) == 0) { + t = in_pcblookup_local(pcbinfo, laddr, lport, + lookupflags, cred); + if (t != NULL && ((reuseport | reuseport_lb) & + t->inp_socket->so_options) == 0) { #ifdef INET6 - if (ntohl(sin->sin_addr.s_addr) != - INADDR_ANY || - ntohl(t->inp_laddr.s_addr) != - INADDR_ANY || + if (!in_nullhost(laddr) || + !in_nullhost(t->inp_laddr) || (inp->inp_vflag & INP_IPV6PROTO) == 0 || (t->inp_vflag & INP_IPV6PROTO) == 0) #endif - return (EADDRINUSE); + return (EADDRINUSE); } } } diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 4c2c25bf691e..5741d88d8e76 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -249,11 +249,11 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred) if (lport) { struct inpcb *t; - /* GROSS */ if (ntohs(lport) <= V_ipport_reservedhigh && ntohs(lport) >= V_ipport_reservedlow && priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT)) return (EACCES); + if (!IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr) && priv_check_cred(inp->inp_cred, PRIV_NETINET_REUSEPORT) != 0) { t = in6_pcblookup_local(pcbinfo, @@ -281,8 +281,7 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred) INPLOOKUP_WILDCARD, cred); if (t != NULL && (so->so_type != SOCK_STREAM || - ntohl(t->inp_faddr.s_addr) == - INADDR_ANY) && + in_nullhost(t->inp_faddr)) && (inp->inp_cred->cr_uid != t->inp_cred->cr_uid)) return (EADDRINUSE); @@ -291,10 +290,9 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred) } t = in6_pcblookup_local(pcbinfo, &sin6->sin6_addr, lport, lookupflags, cred); - if (t && (reuseport & t->inp_socket->so_options) == 0 && - (reuseport_lb & t->inp_socket->so_options) == 0) { + if (t != NULL && ((reuseport | reuseport_lb) & + t->inp_socket->so_options) == 0) return (EADDRINUSE); - } #ifdef INET if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0 && IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { @@ -303,11 +301,10 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred) in6_sin6_2_sin(&sin, sin6); t = in_pcblookup_local(pcbinfo, sin.sin_addr, lport, lookupflags, cred); - if (t && - (reuseport & t->inp_socket->so_options) == 0 && - (reuseport_lb & t->inp_socket->so_options) == 0 && - (ntohl(t->inp_laddr.s_addr) != INADDR_ANY || - (t->inp_vflag & INP_IPV6PROTO) != 0)) { + if (t != NULL && ((reuseport | reuseport_lb) & + t->inp_socket->so_options) == 0 && + (!in_nullhost(t->inp_laddr) || + (t->inp_vflag & INP_IPV6PROTO) != 0)) { return (EADDRINUSE); } } From nobody Thu Nov 28 14:39:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzf855DBFz5dnDM; Thu, 28 Nov 2024 14:39:01 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzf852MlSz44H2; Thu, 28 Nov 2024 14:39:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YeHBOnA58MVqhyyd4Jxq12iTJR2LvToXwT5SbgQuG6c=; b=d/1HGg6U4IIZOVERpgWpYEtID25hYoStXK9zLfSuynrQXRihvm/TMREUQ4JCgaNY1eQwom PDBJYcyAFqj9IFUhZHrIPL35MEbeLJc88X/bpQWdddCfjeMX8gsPi3+w11IGklfvJiJM6S BDAooUy7RcKq2RqnaSdumP+xKoDjQ1SrgZ9FFo132Bh1XalIqHcPPAV+xcsKFUImhO8aCS 0AEFnK9sdinRdYCmuUtWwUqhESfUN9FCofxxdvh3kjgd5odyM+h3fV5QhU7BfEghYvB7TR WKgXaNMmPL21A1aA+ISmtYbXCLIKiKmgRKtgikCJmaVAjbpPjQxdjwOKQNuJcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732804741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YeHBOnA58MVqhyyd4Jxq12iTJR2LvToXwT5SbgQuG6c=; b=MrOGCPryX0TB5EHU+/hQpvXfo78EqEXuolBiw5Ie3wOQS7Pj2aMXX+ofkICtQi9NWoFd5x SRVMRBC+8OSkaLPayHqKHBwMxMtoURjF04O/2IRNqtnNeWqm1XGWujgQckhOrHLMkTKPKi g5ryf08NQDvvTlP+bhe7OiwMM/1mOce1aWJ/aJpiYMrZQF4u5NY7l2yKRDN3zht8gbErRC EAK9MMhZqrLrTSRNPMrtnlotMMvgGQXuBOfRJJat7uydeasDi0WrkBHYcW/nuUvEcKPigQ KeROiH82XTM98Ab1M91QHIeSljwMOipEh5mf9/a/WC9B4MImMjIyIqIA/EpLXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732804741; a=rsa-sha256; cv=none; b=xd7guojFBfefEjqnkFpVL4a8tlqYmj/yJKupq2QTC3k7hXj2YnpZ5q5qdn6I2NxtK+AiZm 5rq0rUJe8YpoPYMNbUTQyLZekRCohGB290wXFjPvclVncV0nDzpwTF69TbUL1WqEG/0zcR DhbzJaNdX2HVn8GBrpBVhCTH+bWjy4TJhHQCmvLsUiOZRv+Ko+IrpNPVKGjEfs4CbNTfy/ 5/WyQlWsKCCWFO0c4kP2gbTMxwYBlSkJtG5Xda6VZCArbk5LItlng7y2ypWz5hlcu5MH0T XhNHeEr16zqQmwxQi9EPi9LAUPIMjcpu5glAXGN+ryD10yio53LiDx2Rd1HlNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xzf851x3wzjWC; Thu, 28 Nov 2024 14:39:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASEd1bX035788; Thu, 28 Nov 2024 14:39:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASEd180035785; Thu, 28 Nov 2024 14:39:01 GMT (envelope-from git) Date: Thu, 28 Nov 2024 14:39:01 GMT Message-Id: <202411281439.4ASEd180035785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9917a1357c07 - stable/14 - fibs_test: Run in a jail List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9917a1357c079665eeec6251ba802dc162777da2 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9917a1357c079665eeec6251ba802dc162777da2 commit 9917a1357c079665eeec6251ba802dc162777da2 Author: Mark Johnston AuthorDate: 2024-11-21 18:54:59 +0000 Commit: Mark Johnston CommitDate: 2024-11-28 14:38:17 +0000 fibs_test: Run in a jail These tests assume exclusive use of one or more FIBs and so can't be run in parallel. Running them in a VNET jail sidesteps this problem. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield (cherry picked from commit a079f2b52aae74b5469f18dcbef1aff680b80282) --- tests/sys/netinet/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index 8fa12378990c..6019da4f6baa 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -31,6 +31,8 @@ TEST_METADATA.arp+= is_exclusive="true" TEST_METADATA.divert+= required_programs="python" \ execenv="jail" \ execenv_jail_params="vnet allow.raw_sockets" +TEST_METADATA.fibs_test+= execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" TEST_METADATA.forward+= required_programs="python" \ execenv="jail" \ execenv_jail_params="vnet allow.raw_sockets" From nobody Thu Nov 28 14:47:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XzfKS5zVJz5dpYy; Thu, 28 Nov 2024 14:47:08 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XzfKS5NFgz49WQ; Thu, 28 Nov 2024 14:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732805228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Iz1N6NkUX5uT5uxZt3xAfaKYTPSHA49FMZyjW8Jz8H0=; b=CjyNL4tLJGNx9xzyqNIebNKo9pRyaccibBiyJIwAvbuKodPbhGliSV3NCz67aofu26aZBO heAMXRLySWbYwWtMVSHxjnO/PtLptLHJro7vgvV+oHh4YtWzLlJ0jLVKiXloIA3n0DYjw7 M8QMIt/DSiupQbUSoFkH32iyec/NHoAdN6ictm/1L2GB8pBMuSf4n1dDTLU8Ggy8dNBTgC vzYsi/DsU/rRU5bjFvNRyMEPuPvSuNAPGBTeLvN5uZnUqtuJfplx2J+iT4T0SukKy+AGCG mQE4mRhrjyt7QEqCPEGbYvzAFvZKRkoqYSXyQzShYnAZwwtEatCZBIlfpDZOAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732805228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Iz1N6NkUX5uT5uxZt3xAfaKYTPSHA49FMZyjW8Jz8H0=; b=VbpnMWRuKRjsjaX8tAB2rtTUzz3ufSkuvQho+Q4j+QBRjrnG2+RHqWN/nv5t52GEm7Ep57 4BPQnNYQMzNAI8IH5lohVxMbKIOriaieiRaN7Jt5IlXRJqsIF/SHTGOIfGcGnvE5hcI/fm 7dszeGj9SD8jncUD3QLG/T3HEKPPuxYsBdIBYEqcZAruQrT28478Byma4DiBHZUIIgMoxc D0phgpEQ2hHTY7Dh1itgmkebMsj9YX6S50o8dyDOIQoRyJBm/edNj3wdWbA1iHOn/gu89Z xbe1jztiOntZzpMZ1tdSCV5OZIqQSe+RZXr0EhWLQFEkWdGOEe84GVBAz7kGmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732805228; a=rsa-sha256; cv=none; b=TY9dZ2NNoB9eIVE7k4U/MX0oRPaOKNvwMgu4JKxdfqNAEBICFjQVCyBlnYTqR5Md/5dusC HjlAL273gBYJdTFXHaJ5K3Xmhvv6jkkRRiYl9ta9G+iW8QHs1MASkvziCa21awJeFZhPn8 9rYt9NDHUUElQiluuvNwVY6b4eyiy3skiqE5YA4Jkg6pcWsouNEe8d/sb+THKCo+6mw0q0 gGotKfMvEJKXqF7GkIwnZFEJ8i0prx/fqV0D4HdX3DW4Lx4saYMF6hFTPidNc3dE7QhYmV k6p5YZ5IoFMUVEHSOa9UNwjzhP1dxbSrAuywkyIKc4DRUPIH9AbznCbLJOQCdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XzfKS4c7nzjxB; Thu, 28 Nov 2024 14:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASEl8A1054026; Thu, 28 Nov 2024 14:47:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASEl8Pe054023; Thu, 28 Nov 2024 14:47:08 GMT (envelope-from git) Date: Thu, 28 Nov 2024 14:47:08 GMT Message-Id: <202411281447.4ASEl8Pe054023@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a2f54460e39a - stable/14 - netlink/route: Fix the argument list for rtnl_handle_iflink() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a2f54460e39a915a72df095a3de52a844335024b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a2f54460e39a915a72df095a3de52a844335024b commit a2f54460e39a915a72df095a3de52a844335024b Author: Mark Johnston AuthorDate: 2024-11-22 13:52:57 +0000 Commit: Mark Johnston CommitDate: 2024-11-28 14:41:52 +0000 netlink/route: Fix the argument list for rtnl_handle_iflink() This function is registered as a ifnet_link_event and so should have the corresponding argument list. PR: 282870 Reported by: nakayamakenjiro@gmail.com MFC after: 1 week (cherry picked from commit 0289db3259532d51ebe58bc0b2647a0d9e6cae66) --- sys/netlink/route/iface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index 0587b478431e..fe6d6bf18c90 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -1427,7 +1427,7 @@ rtnl_handle_ifdetach(void *arg, if_t ifp) } static void -rtnl_handle_iflink(void *arg, if_t ifp) +rtnl_handle_iflink(void *arg, if_t ifp, int link_state __unused) { NL_LOG(LOG_DEBUG2, "ifnet %s", if_name(ifp)); rtnl_handle_ifevent(ifp, NL_RTM_NEWLINK, 0); From nobody Fri Nov 29 00:00:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XztbS1WtFz5fTSG; Fri, 29 Nov 2024 00:00:04 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XztbS12SRz49jR; Fri, 29 Nov 2024 00:00:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732838404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J8tSlD1+g/4SVWMBYPmrxWSHhAY1ng8n8iE/wWP0ij0=; b=E5TjKMV1y0Tbba3ib13gO/W4+CGAh6322CnX+1LBoklZ8CuE/eXiUVZTeVJA+o7tw72ewZ /tN5FroOjk+60xeVYOlyHuRq9kL5wOZkxn/3EFUi7MfjeXgjCqSkoeXa+iOK4nAIH/H4bg sH896C0P7Ir7HF/9xuI03VMqL+StnHFxK3LoBlIxmxZLZLD0ssRop2HxFk6F8iOnfpt/JH 8wXxjEKxIUQOthx7g2Rukcq4wpgpyflyB1Mtq+Fpf+IpHtv8H6KOB5HogCAHaMSFuebP4h qZBfgmM4buNMlVrej5PB7CY85crrhd82B2EXZyxdUbkczFAeAHygfyCyM1iOgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732838404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J8tSlD1+g/4SVWMBYPmrxWSHhAY1ng8n8iE/wWP0ij0=; b=VOd+5tSv3zF0r8mLse04kOAJRw+4EoLmtZqU6gMqzKjb8ojr6hhOfcew9Urwx6LKuXp1Ko zNPZNhibpJO2UBxGaLmpaICYsh7ytAyx6KmRd+1JzYAIrIl0i34tLIR3juQmAPaYXU+Pzw UkMSeiKF6SwfIusfRivdY5mh+uqeaFs+99Kiow5bhbuSLu3GvRoTX7dIAGf5mj/yHBNk08 hih7+FzWwZuLAIA6W+ByKSn38AAxzJk2nBis+AwAa98N3IEmjIYavxMpjiF+LUDG3LueRR ZP5gZmTDvUpm6iIbvB2jnR+ogFAaMhUW5JX5o9HgjR1gROsKGlhcDKe2tdOdUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732838404; a=rsa-sha256; cv=none; b=NGd0wIgKgQO49zIez9qgiaELAA/RXiBOgqTalmZcFU8BfCcs/p9yvtJxGYHQyfzY1aTt6U X28UqHXIWEVghHov/CDPNBWL7ihwbom6bfeuRMnQVJ17pt20ax2dZafI7fK4ot95jQ4Ijx RI8VL48zgqkBejR1swAPToepB9aiuMfXCBPVkEI9bFPqdEVotfkZ9fLTfEeuXL9b/Nguw5 7gUh8hy3E+bHz15z+k/Va+YUwz6JL4v1wUpqM5UFkbKUFkEA+Afx6zL3Y9sqVKjtxn5qcR I83dhf0SU0tQgZGMxkck9NwVhQRMw8ryefySmj7VYUp2plLVbvbqM9v6kDxZXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XztbS0JgZz110n; Fri, 29 Nov 2024 00:00:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AT003oA077756; Fri, 29 Nov 2024 00:00:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AT003eK077752; Fri, 29 Nov 2024 00:00:03 GMT (envelope-from git) Date: Fri, 29 Nov 2024 00:00:03 GMT Message-Id: <202411290000.4AT003eK077752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: c8918d6c7412 - releng/14.2 - Update in preparation for 14.2-RELEASE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: c8918d6c7412fce87922e9bd7e4f5c7d7ca96eb7 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=c8918d6c7412fce87922e9bd7e4f5c7d7ca96eb7 commit c8918d6c7412fce87922e9bd7e4f5c7d7ca96eb7 Author: Colin Percival AuthorDate: 2024-11-29 00:00:00 +0000 Commit: Colin Percival CommitDate: 2024-11-29 00:00:00 +0000 Update in preparation for 14.2-RELEASE - Bump BRANCH to RELEASE - Add the anticipated RELEASE announcement date - Set a static __FreeBSD_version Approved by: re (implicit) Sponsored by: Amazon --- UPDATING | 3 +++ lib/csu/common/crtbrand.S | 2 +- sys/conf/newvers.sh | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/UPDATING b/UPDATING index e8ce65692e6b..3a644b8feaf2 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,9 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20241203: + 14.2-RELEASE. + 20240419: Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have been upgraded to 18.1.6. It is important that you run `make delete-old` diff --git a/lib/csu/common/crtbrand.S b/lib/csu/common/crtbrand.S index b59e2fd8056b..7d14d0c1df65 100644 --- a/lib/csu/common/crtbrand.S +++ b/lib/csu/common/crtbrand.S @@ -43,7 +43,7 @@ .4byte NT_FREEBSD_ABI_TAG 1: .asciz NOTE_FREEBSD_VENDOR 2: .p2align 2 -3: .4byte __FreeBSD_version +3: .4byte 1402000 4: .section .note.GNU-stack,"",%progbits diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index af5875c5c0b3..8afaa8ccd571 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.2" -BRANCH="RC1" +BRANCH="RELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri Nov 29 00:00:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XztbY51Dtz5fTXG; Fri, 29 Nov 2024 00:00:09 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XztbY2vQKz49pJ; Fri, 29 Nov 2024 00:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732838409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AOvd7tonaH9YC8AMI6Zo9IMkNiK36LCxPQGODuLjdok=; b=b1pNiiXYyipx5IWeJkJfMhoYLvjuTscjFEyc4ZF4Do4O8aglMcGYZX6ivTqk3BOZrr1nsb A4xINXBKEOVZuEmPADXhPmqEzA4NJRE1KcrogglR59mFidQXGA9a1Txqdr3mqtFL3UDpKM Iv6580tBR6pyXGffYpcRygi8tKAWegIIn/3Y5t+1CUOuOYDLa2OCqvUdqmsX/61g83ryod ouGkmHA6ZMasAZpELEjmDVF3PJP20rEfxbQnUwNlKouMWQ/bj65cpUSU5d+uJoJ12CeHgS uh/shLhIZsIHExEYYdueoHacLyDYyZbMztle/QkJJklwTMNj/QtC/k8CctXVyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732838409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AOvd7tonaH9YC8AMI6Zo9IMkNiK36LCxPQGODuLjdok=; b=AA3hawznNs4L0eRR1+xUiIhj3/h9Vq0BWxoCWd3Rk+IQLIpDWVu6DY11IQ7+LJptp9HDwU I5hXCOOWWj45rDaK6izSaic5Ph73Fdr74btKZYpY7FqxdfgZvhvaIomOg2gBF0nilF2hRv CsV4DNP9Ye7h7sN/A8j4JfkPLbrmroraueI/Vxi/Ndbu82LNCvEZqOcNykmZ9LQZ1yoP2J ZhwnV4S5w7yQUBXk3fO+d0Tja6r79KsC4RQZeRN6OqV4FX1qrD+3d2oozMRFMBafTqaNZj sMjkrWeala5QpKgVvfPJ+sU8fAC9vERc9BMT88KGuE+eXBFRqPquUW0dXS4tvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732838409; a=rsa-sha256; cv=none; b=MSb8/rfTJPAAXbyNlMt+Ddizt0lffm29DJxRJJsW1LcpGkDnaY3PZMIbQoHFdWCEgmHW4v 4bXmlTwhtDvwNmvYGzao9K5ykBZUqFXLUTy7m2pDJNrZ+ryCsrq35hO6sMxuMfesC8irXt 7POF9Qk6xskwicpacQ12O6rnWqxPcdb2iq2D90W9b8zCqI0fB6OSLEa/WPJ46pRjCK1Wl6 EmU6GV7Y+4yNpMxpJs4a1SBvAPc6oXkA7zfKwANsMkSVLDZt0hggBMUuAq6WkzPLKAid9R F+Z8yfj022kmeRbWUjq3qzCpwOlhdrneLXxiYxkNdgTiAh5EcLSTfBfnWxWeeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XztbY2VCKz10p1; Fri, 29 Nov 2024 00:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AT009mX079076; Fri, 29 Nov 2024 00:00:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AT009Wc079069; Fri, 29 Nov 2024 00:00:09 GMT (envelope-from git) Date: Fri, 29 Nov 2024 00:00:09 GMT Message-Id: <202411290000.4AT009Wc079069@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 89042d64c83c - Create tag release/14.2.0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/tags/release/14.2.0 X-Git-Reftype: annotated tag X-Git-Commit: 89042d64c83ca92d90bd3d161eebc353d5edb3c6 Auto-Submitted: auto-generated The annotated tag release/14.2.0 has been created by cperciva: URL: https://cgit.FreeBSD.org/src/tag/?h=release/14.2.0 tag release/14.2.0 Tagger: Colin Percival TaggerDate: 2024-11-29 00:00:00 +0000 Tag 14.2-RELEASE from c8918d6c7412fce87922e9bd7e4f5c7d7ca96eb7 -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEglY7hNBiDtwN+4ZBOJfy4i5lrT8FAmdHzmkACgkQOJfy4i5l rT+epBAAiuRo3WZZQ6QMYJT3M83eSCbXEl8k0kDHyii3moKfoFJkCfWOZzK3nqxw 6OZiv9lLJwAlTR6iIOxEpykcpNUtMZCA8abPiJb5Du3rBGlYtuMDSdTcPpSyPUfo 2ePqnzp0tMMg9NQ/Py1Ik6C/v1wufMhnFcZxGsBmU7YQJ+l1fKpeS1MELoOtKvCl rJG3AbOWT4RIUQQNvL23uiTefyR7qcTsWjAKbwNI8jnRHO0a/aVudlnyKd5c/0KF cuur/3QxrRIyLeHKk1MzR21wyaOOk9iU/Vql6irSkN8ROtlAd79xKWxVu7hna7yA 7Q7N8tDPPnp7+tr/Tt4d/5htbaT8KEBnOlO8x5oLFIF71Uxgo6P5sGFE7P0YUiSb rSAV+V1ImDYefsbhU2KSxf/BUDUD4iEZjrWwlroncaz3niWlNscPROowcHXpEk6j tmOB9vd1M0PIqNeBoVThFv8A/eJseMVkcEEfhPSWJhjFJp6ka+l1dvHe6w3G8LHi GjGUL8hjjMYR0pjwQy/7oTgapmGU/H8gxk5+o/9p5PrYFJNaIxs8fCBAk6ov+d/3 bqbcEDOm3k7/S0+JDAJntuo0TNKMYvF2iaf+QcCsexIzFmafNoMG/YdbRc96v2wS T4LTjBH3XBqP4Dde3nDvUtBY58h0fMYvE9U9eNaZGAzl77AVCS8= =/AcI -----END PGP SIGNATURE----- commit c8918d6c7412fce87922e9bd7e4f5c7d7ca96eb7 Author: Colin Percival AuthorDate: 2024-11-29 00:00:00 +0000 Commit: Colin Percival CommitDate: 2024-11-29 00:00:00 +0000 Update in preparation for 14.2-RELEASE - Bump BRANCH to RELEASE - Add the anticipated RELEASE announcement date - Set a static __FreeBSD_version Approved by: re (implicit) Sponsored by: Amazon From nobody Fri Nov 29 05:15:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y01bL3hk0z5fq8F; Fri, 29 Nov 2024 05:15:26 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y01bL38z9z4jjB; Fri, 29 Nov 2024 05:15:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732857326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvtpzuXmGGEmUe4HmfokNXba4JQaNhEC6qLSRVWj1Io=; b=eVEM7V9l2VEAIehvZJbkcpQw+njcu/FzX9+7o6RBKa/ReKRGsIQGqQQ+7PwQl/V+Ru4jwE RPFxvNabasjfsf2Xr2ksegEOWc5QnafW8cio1xZ2vHD8ygqaQsav5khtmilmeNARPNYMr+ v2PwUOy0nnjgVGS9tob5cF4U8jJ5mqm1a6LKUymW/kt/807bHyFECom0Ao4LjGTzr8VvRZ 9+il+2SRrw2NxY1ixMcI/C4CbhFW3X0AjCmpj5ys2m8y70GbwfvzjdHMSzegdVTw/tgCtq Lr2/0kuzVN813XFr5JlGRoKuBSGNvPvlCbJYhvCqBy3SkilRaxmQdFXhlt0tCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732857326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvtpzuXmGGEmUe4HmfokNXba4JQaNhEC6qLSRVWj1Io=; b=ruVqXEDID85963s3TsY1dQ6UrM1jK6TDJEWnH59ieevqp/wFVjNEbFNHH3LyWcdDtS4Jgm dbijuHPg2MrYfabrjLtJnsyksQVhCQjCH4ck6IH4m0SWrltkOW4UphObOEVW1E6dOW3kp2 mjqomHNgNtfN4aVYzFGX162dLvWlG4IJpLxVtPoFdmsWnLzKTag+dzcv3ZJHsdePFGe35f b09uqSAPCjjAegMGSkCOytkP2QY8rWD33NrlR4+K87vUJS+W7bs2mRgwP8lKaxVBrSEyg6 8WRFy32jS4BEq0N+AobkLM136LCAwg1yrwYW3NFSfZLrW9qYwcr7B1Rll95lbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732857326; a=rsa-sha256; cv=none; b=o1pQuMXO5kHmeLqiTJunfWHw2wTLJGNBbRuZoMQ5VMHxersg1vYzj9PQ9RRkriKXfJ608e iifg8t5at0/UYO7+/m5E2l39p8b4SuYsG9pdfa2g1JU24FwqQ3fxlfAAZk9AKUplxqQOse Fnv9uvd+ijNUFpV80966LIdV41EKNSeKLgSLE/9RiN84i7vkf87049Fot4SSv7QtxVJxA/ t2qeXe0vmJ5OMAP8p06ciyzvjT1qs20TJBEt1nVY4XmxQ/ql9zbA/M2V6J22Q/2LdUrloj uPMY3LHxGPtTrvnmN+zXzcdWjx6s1xmBMfJRJybmOrNhxK+tkWQexrt/P30PkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y01bL2n1Kz18hf; Fri, 29 Nov 2024 05:15:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AT5FQC8070851; Fri, 29 Nov 2024 05:15:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AT5FQqX070848; Fri, 29 Nov 2024 05:15:26 GMT (envelope-from git) Date: Fri, 29 Nov 2024 05:15:26 GMT Message-Id: <202411290515.4AT5FQqX070848@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 0dd21407bd39 - stable/14 - newsyslog.conf(5): Accept human unit suffix in the size filed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0dd21407bd39c5ff6770ce23ac834bbf35727f94 Auto-Submitted: auto-generated The branch stable/14 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=0dd21407bd39c5ff6770ce23ac834bbf35727f94 commit 0dd21407bd39c5ff6770ce23ac834bbf35727f94 Author: K Rin AuthorDate: 2024-11-01 05:12:06 +0000 Commit: Li-Wen Hsu CommitDate: 2024-11-29 05:12:12 +0000 newsyslog.conf(5): Accept human unit suffix in the size filed MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1505 (cherry picked from commit 1f78bbb5c415efefa782c1be7f9a2e4a5008903b) newsyslog.conf(5): Remove duplicate word Reported by: jlduran Fixes: 1f78bbb5c415 newsyslog.conf(5): Accept human unit suffix in the size filed (cherry picked from commit af2015b01f7e741125aeb4a04109cc42f988cf0f) --- usr.sbin/newsyslog/Makefile | 2 +- usr.sbin/newsyslog/newsyslog.c | 19 ++++++++++++++++--- usr.sbin/newsyslog/newsyslog.conf.5 | 9 ++++++--- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/usr.sbin/newsyslog/Makefile b/usr.sbin/newsyslog/Makefile index b2e945b6215a..57881770a901 100644 --- a/usr.sbin/newsyslog/Makefile +++ b/usr.sbin/newsyslog/Makefile @@ -7,7 +7,7 @@ CONFS= newsyslog.conf PROG= newsyslog MAN= newsyslog.8 newsyslog.conf.5 SRCS= newsyslog.c ptimes.c -LIBADD= sbuf +LIBADD= sbuf util HAS_TESTS= SUBDIR.${MK_TESTS}+= tests diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index c867237d212c..6b21c8e8f855 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -76,6 +76,7 @@ #include #include #include +#include #include #include #include @@ -1223,9 +1224,21 @@ parse_file(FILE *cf, struct cflist *work_p, struct cflist *glob_p, badline("malformed line (missing fields):\n%s", errline); *parse = '\0'; - if (isdigitch(*q)) - working->trsize = atoi(q); - else if (strcmp(q, "*") == 0) + if (isdigitch(*q)) { + char last_digit = q[strlen(q) - 1]; + if (isdigitch(last_digit)) + working->trsize = atoi(q); + else { + uint64_t trsize = 0; + if (expand_number(q, &trsize) == 0) + working->trsize = trsize / 1024; + else { + working->trsize = -1; + warnx("Invalid value of '%s' for 'size' in line:\n%s", + q, errline); + } + } + } else if (strcmp(q, "*") == 0) working->trsize = -1; else { warnx("Invalid value of '%s' for 'size' in line:\n%s", diff --git a/usr.sbin/newsyslog/newsyslog.conf.5 b/usr.sbin/newsyslog/newsyslog.conf.5 index b9fdb47fd712..92ccf54732e0 100644 --- a/usr.sbin/newsyslog/newsyslog.conf.5 +++ b/usr.sbin/newsyslog/newsyslog.conf.5 @@ -20,7 +20,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd February 26, 2021 +.Dd November 11, 2024 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -105,8 +105,10 @@ Specify the maximum number of archive files which may exist. This does not consider the current log file. .It Ar size When the size of the log file reaches -.Ar size -in kilobytes, the log file will be trimmed as described above. +.Ar size , +in kilobytes by default, or with suffixes like k, M, G, ... as supported by +.Xr expand_number 3 , +the log file will be trimmed as described above. If this field contains an asterisk .Pq Ql * , the log file will not be trimmed based on size. @@ -415,6 +417,7 @@ entry: .Xr gzip 1 , .Xr xz 1 , .Xr zstd 1 , +.Xr expand_number 3 , .Xr syslog 3 , .Xr chown 8 , .Xr newsyslog 8 , From nobody Fri Nov 29 05:21:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y01kP4Dpqz5fqL6; Fri, 29 Nov 2024 05:21:33 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y01kP3G8zz4jlS; Fri, 29 Nov 2024 05:21:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732857693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zv2aYxksfDJXEWfbqtaE4EI5EpVOfaa98KGQNuD/wz4=; b=S1Z4CMw2cf7clfxDkPEkRijDwF25VNvjRh70qKYBmXeXBDzCWedHqFqYYrJStLEK7doVL/ yg3eec6Q7pPc2BkmycYdFOUY2aeWMYst3AIQaDC6JqQC7Cm1orHDvvM8fmKSlFmdFF3ZHS 7sNo116fucKD5aD8oC7e0YipvHv6KTY623MFOrIJW4BvPP/CiEp5NE0d2rTpjf+a5cup3S 6mJ+HTEOp51oaOYn5dhZQSyKM2tRS8/o3obtQHARODeNazX4gQFndQ876+7ofuJ7IP5wIk 3XnBG4ItAVqb7mGG95+VKXH/1fHi8EwSkhZ2Qowo5ZvkryvaTTx/JL1feEuYzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732857693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zv2aYxksfDJXEWfbqtaE4EI5EpVOfaa98KGQNuD/wz4=; b=tUs0uIAPY7riMfL3/PVj2yknEefYfnuz9vpQ4dW/6CtXoh/v6i+weUkRR1Vor22RamNAfu p/fnlZBpup/vDJlxP/kVezmlgE44uVrtaYfxhJKuxULKVgQlaoxQ4Cg1sr35K1UpZ1xEtd 4afDLXfYS5yJ/kmh+vSePq0unBSAsTNTSXkf6u4JmShtuviwqcL2X5kBivqbh9WPcFzSRp hIDEb08tWUJaW4SJxiw2IT6tGbUL9M1HtfuV5dpkuEccJjJ9a3qipCZbqtvJiW1TDeCE/K +P2cbK7YPUbHuvG0IDwDXhRshokEwJFzo2ylAwMhJZaKfqSXIKRV2E6kJHNCvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732857693; a=rsa-sha256; cv=none; b=s5Xkxm3DjW7XwdePzXlannXHljJwmRUdx+kMz9tDkPz6izcCK/gImvlnbKYHxT0d4Lelz0 jl5jwCO2sTVixLRwByDc/DNbub82NRgxC7lsL/FvpNoztT841OOM5I+oB6mND1MfVcM9cL vBMdAGJBWSTU8eAhV5hia2cHllVDxT5NyjV0wNoYbMhoP3K2UJBiyv25bmu3q9vzEELsr9 RR9W67mZTMmYmsdSDDBZv/gqdNGv8aHxKGmaT7RjB2dFe632FtG+v1wB+k/1CDXc7M3CWW 8JZQsQ5/RzTlYnM21KKcMSRQwwC+5FEBK13O74H+/cSHu0ItPA7YLGd1k3+5rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y01kP0QpDz192R; Fri, 29 Nov 2024 05:21:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AT5LWXp083497; Fri, 29 Nov 2024 05:21:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AT5LWfM083494; Fri, 29 Nov 2024 05:21:32 GMT (envelope-from git) Date: Fri, 29 Nov 2024 05:21:32 GMT Message-Id: <202411290521.4AT5LWfM083494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 1bfd6cb606da - stable/13 - newsyslog.conf(5): Accept human unit suffix in the size filed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1bfd6cb606da39604ea70e1e5fe8d28534010f99 Auto-Submitted: auto-generated The branch stable/13 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=1bfd6cb606da39604ea70e1e5fe8d28534010f99 commit 1bfd6cb606da39604ea70e1e5fe8d28534010f99 Author: K Rin AuthorDate: 2024-11-01 05:12:06 +0000 Commit: Li-Wen Hsu CommitDate: 2024-11-29 05:20:41 +0000 newsyslog.conf(5): Accept human unit suffix in the size filed MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1505 (cherry picked from commit 1f78bbb5c415efefa782c1be7f9a2e4a5008903b) newsyslog.conf(5): Remove duplicate word Reported by: jlduran Fixes: 1f78bbb5c415 newsyslog.conf(5): Accept human unit suffix in the size filed (cherry picked from commit af2015b01f7e741125aeb4a04109cc42f988cf0f) --- usr.sbin/newsyslog/Makefile | 2 +- usr.sbin/newsyslog/newsyslog.c | 19 ++++++++++++++++--- usr.sbin/newsyslog/newsyslog.conf.5 | 9 ++++++--- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/usr.sbin/newsyslog/Makefile b/usr.sbin/newsyslog/Makefile index b2e945b6215a..57881770a901 100644 --- a/usr.sbin/newsyslog/Makefile +++ b/usr.sbin/newsyslog/Makefile @@ -7,7 +7,7 @@ CONFS= newsyslog.conf PROG= newsyslog MAN= newsyslog.8 newsyslog.conf.5 SRCS= newsyslog.c ptimes.c -LIBADD= sbuf +LIBADD= sbuf util HAS_TESTS= SUBDIR.${MK_TESTS}+= tests diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 115192058c82..a043e891aba0 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -76,6 +76,7 @@ #include #include #include +#include #include #include #include @@ -1223,9 +1224,21 @@ parse_file(FILE *cf, struct cflist *work_p, struct cflist *glob_p, badline("malformed line (missing fields):\n%s", errline); *parse = '\0'; - if (isdigitch(*q)) - working->trsize = atoi(q); - else if (strcmp(q, "*") == 0) + if (isdigitch(*q)) { + char last_digit = q[strlen(q) - 1]; + if (isdigitch(last_digit)) + working->trsize = atoi(q); + else { + uint64_t trsize = 0; + if (expand_number(q, &trsize) == 0) + working->trsize = trsize / 1024; + else { + working->trsize = -1; + warnx("Invalid value of '%s' for 'size' in line:\n%s", + q, errline); + } + } + } else if (strcmp(q, "*") == 0) working->trsize = -1; else { warnx("Invalid value of '%s' for 'size' in line:\n%s", diff --git a/usr.sbin/newsyslog/newsyslog.conf.5 b/usr.sbin/newsyslog/newsyslog.conf.5 index 0a516fc56785..fd23837a3990 100644 --- a/usr.sbin/newsyslog/newsyslog.conf.5 +++ b/usr.sbin/newsyslog/newsyslog.conf.5 @@ -20,7 +20,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd February 26, 2021 +.Dd November 11, 2024 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -105,8 +105,10 @@ Specify the maximum number of archive files which may exist. This does not consider the current log file. .It Ar size When the size of the log file reaches -.Ar size -in kilobytes, the log file will be trimmed as described above. +.Ar size , +in kilobytes by default, or with suffixes like k, M, G, ... as supported by +.Xr expand_number 3 , +the log file will be trimmed as described above. If this field contains an asterisk .Pq Ql * , the log file will not be trimmed based on size. @@ -414,6 +416,7 @@ entry: .Xr bzip2 1 , .Xr gzip 1 , .Xr xz 1 , +.Xr expand_number 3 , .Xr syslog 3 , .Xr chown 8 , .Xr newsyslog 8 , From nobody Fri Nov 29 12:28:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0CBs2lfmz5f67w; Fri, 29 Nov 2024 12:28:21 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0CBs2Ddrz47lj; Fri, 29 Nov 2024 12:28:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732883301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uCed4wCp4uBbi24nP+F+WTcV45Amd9yq81Gb/Pbtc+4=; b=vrnShhP3lv2N0iXlzSR3IaKh8LsCgKr1sGMzZP1qIqyvvumQthrk1HgbWN27Q0oadmRSbw bprZU6OHEhxKxXJ61l0TbOacWvSHgbNQoIBuTviv98XX4dLNiSWsqYJkpEmeu9krMwFpQE disfWBEd+8Kkrc6hMYQTFnH/VsiiLnfark9gdWdJ3Hs6UPbWBdjCCNY6mEwJrCL/m7t7mU I/sY8FDaW7Ty5NEeadsN5575sDgR47AMy78he+Lluew1kKD9DVM6MjTQ0EUIQkXKjt33K/ 9s1gYPT+0KHJdutXEiDJr7sDQFFqm0oEjSixici51wxEOiQSoAULUTrb6hzA3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732883301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uCed4wCp4uBbi24nP+F+WTcV45Amd9yq81Gb/Pbtc+4=; b=ipVHlkLBm6/2S5T982ds0jjHLxZMiSHiNoz7npa9V1KYY8Voo0dWPAQmnuqi8l+dE637eo O6bpcbGSn7OubpbLNMq1ZJ4OXp2L9EbQoWUcIb7MkbSmJAOqXyL/0TqoN4vvb3a1XMFg0W A4vXK935R7LSoxg3eVsaAIztLbeAg+unsqlekdj3VgKMflzfehGDiyHQqfACEQ3nzVVENN peOlsTGEk8ncLqkhIZZs4DECF8BkiUTYsMkJYzcH7U5FfZNeRdfA9OLwrbG+vooEXgbCir 8HfcpPyrKz5dAFQmeYnyTYZWwf4Q5qe0lhl5YHIWaW06xVGsEGPyV1V0gaU7vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732883301; a=rsa-sha256; cv=none; b=gbQGBhZJ42i2MlHdW8FyePomhpunqyY7BrMkN3WzxJ0Y0N/Iw8ajU8FEaO0jT4JkKX5TnU EKXd4qeJXlcuIDAqXhX9Un7E8e2nqzzi2V5JlzpPVnd2N0TG35vLM3gpH5c3Czn02HaWBf cPgHh8LnuPZD24gH2/NgvtJU/TlRFzyoNo5ZXEGMvskH6R60jE1JDqmkHa5iD1/4bNlWgJ pAXeszKMoeonE0jVVhTfx+L7WYhzA7QVH7rkLxBCLxi4PauF1FLwiCCmD2WFuMxTKmHjN8 XFY7DQAOBRtRtZR7UfRZIr4H9vJjgf8sX0h7wgRuP64JjaBnLZTfbe8gV3QVtA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0CBs0xZ1zNYb; Fri, 29 Nov 2024 12:28:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ATCSLoS070247; Fri, 29 Nov 2024 12:28:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ATCSLJE070244; Fri, 29 Nov 2024 12:28:21 GMT (envelope-from git) Date: Fri, 29 Nov 2024 12:28:21 GMT Message-Id: <202411291228.4ATCSLJE070244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 2d1cfa142c00 - stable/14 - snd_dummy: Fix callout(9) races List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2d1cfa142c005949f22e3eefea88dc83a8d4c44b Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2d1cfa142c005949f22e3eefea88dc83a8d4c44b commit 2d1cfa142c005949f22e3eefea88dc83a8d4c44b Author: Christos Margiolis AuthorDate: 2024-11-26 14:48:02 +0000 Commit: Christos Margiolis CommitDate: 2024-11-29 12:28:06 +0000 snd_dummy: Fix callout(9) races Use callout_init_mtx(9) to associate the callback with the driver's lock. Also make sure the callout is stopped properly during detach. While here, introduce a dummy_active() function to know when it's appropriate to stop or not reschedule the callout. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D47459 (cherry picked from commit 5bd08172b4150503c9cf60ffe3c97716c5bf6fa1) --- sys/dev/sound/dummy.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c index c1cd4dff15f9..1584c489b5af 100644 --- a/sys/dev/sound/dummy.c +++ b/sys/dev/sound/dummy.c @@ -67,6 +67,24 @@ struct dummy_softc { struct mtx *lock; }; +static bool +dummy_active(struct dummy_softc *sc) +{ + struct dummy_chan *ch; + int i; + + snd_mtxassert(sc->lock); + + for (i = 0; i < sc->chnum; i++) { + ch = &sc->chans[i]; + if (ch->run) + return (true); + } + + /* No channel is running at the moment. */ + return (false); +} + static void dummy_chan_io(void *arg) { @@ -74,7 +92,9 @@ dummy_chan_io(void *arg) struct dummy_chan *ch; int i = 0; - snd_mtxlock(sc->lock); + /* Do not reschedule if no channel is running. */ + if (!dummy_active(sc)) + return; for (i = 0; i < sc->chnum; i++) { ch = &sc->chans[i]; @@ -89,8 +109,6 @@ dummy_chan_io(void *arg) snd_mtxlock(sc->lock); } callout_schedule(&sc->callout, 1); - - snd_mtxunlock(sc->lock); } static int @@ -179,15 +197,15 @@ dummy_chan_trigger(kobj_t obj, void *data, int go) switch (go) { case PCMTRIG_START: - if (!callout_active(&sc->callout)) - callout_reset(&sc->callout, 1, dummy_chan_io, sc); ch->ptr = 0; ch->run = 1; + callout_reset(&sc->callout, 1, dummy_chan_io, sc); break; case PCMTRIG_STOP: case PCMTRIG_ABORT: ch->run = 0; - if (callout_active(&sc->callout)) + /* If all channels are stopped, stop the callout as well. */ + if (!dummy_active(sc)) callout_stop(&sc->callout); default: break; @@ -292,6 +310,7 @@ dummy_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; sc->lock = snd_mtxcreate(device_get_nameunit(dev), "snd_dummy softc"); + callout_init_mtx(&sc->callout, sc->lock, 0); sc->cap_fmts[0] = SND_FORMAT(AFMT_S32_LE, 2, 0); sc->cap_fmts[1] = SND_FORMAT(AFMT_S24_LE, 2, 0); @@ -316,7 +335,6 @@ dummy_attach(device_t dev) device_get_nameunit(device_get_parent(dev))); pcm_setstatus(dev, status); mixer_init(dev, &dummy_mixer_class, sc); - callout_init(&sc->callout, 1); return (0); } @@ -327,8 +345,8 @@ dummy_detach(device_t dev) struct dummy_softc *sc = device_get_softc(dev); int err; - callout_drain(&sc->callout); err = pcm_unregister(dev); + callout_drain(&sc->callout); snd_mtxfree(sc->lock); return (err); From nobody Fri Nov 29 12:28:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0CBt3CxSz5f662; Fri, 29 Nov 2024 12:28:22 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0CBt2JBhz47pG; Fri, 29 Nov 2024 12:28:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732883302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bj84zgBm1+AYca66KfqrZxII9BEVP1+bgxTTnCO3mFk=; b=hRgt8Ymc/plf5s9i8uN7Oew59c06T9VwQMZlUl3Kx8x0t0mvEDM1Quyx6Mq7C18PTOA+6w endY2k/i57rnu+4/duc8KDpEn5hAs2t03AnENgCjPKSEL0tO8IBxTfOSnWXyHrexlR6q+b HfG0+44BLlvEPgFw+5IEBBWSin6OzAE1EDP79k/dlGcl5zzup1Hh6EfCvl9ftrIZS+W7Fm coE6ctkoovkyllQrOzz0Nvs7AC9KsIMO0d+duYOxfJtmIw+LyVQ3zyYb939fMlyU/zqiTj B37iVcF4xKEUElBojdBQYjwls0UA9WdYXTG0fIQ4vPz79+H84wwkx2DS6MKdKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732883302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bj84zgBm1+AYca66KfqrZxII9BEVP1+bgxTTnCO3mFk=; b=l00iR7sdWGlkzxjQlbilg0p4/R6Got0Ggnn+CiSWm0ZqenVMISjamumBtJUL2R0U0Ub9QK wO37UJJsx09ErBewJCDaJ24ZZxI7GDT66a7KkYV5VFXx5GtBIXij624FzkLp889+R6r5/3 G1sAcevTs8K1gAvrQw81eXAAhdSAfD0OJ8n24dRXPyUllH9xwUtNs+hBh6sby+B085RhwU hoW0dlzTf7nzKWhPWR9dXyONXrjF2yPQwcCRSBeuwf3JuwPBIrCh/ICrYYcX6Eb2E6cLfv eN+Cg6O9/q16+/yoy7oCZu23isVz5mB8yXz+Y+c9/fQNyhGNUUoS5oTzEzFO3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732883302; a=rsa-sha256; cv=none; b=suoxhd4Cqc83nzMTbwECkw1VnE8oEfZGWMRD9HxF6kKXodYHruvlqmP01DYcOmCMJFcQA6 6SMTMA1jKcXwaKLZY7wJDkGOuSKlBRAJuJinabjVHo9MjlvB+r4tDepfKIyPN1YAsy+F2W SlmDGfBn+zCLHwItiI4dbUWj2WN8SDIi8ARbPwTplaTwLvbfbyZkcgxlnMdJmkFYNUkaay pstHFNpFgLgPtXvTqvjCh2l8spIY8csEOWfKD0/eRAW3woRPhRKeUcIdUdFxan3eFR8LTe rIXPOkpfezgKmnDpc+FiGpvVGfgDdQ7m30Y8V4q1A7rSH+pXWTBGzXg8P9xkjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0CBt1wSDzNfd; Fri, 29 Nov 2024 12:28:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ATCSMsT070296; Fri, 29 Nov 2024 12:28:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ATCSMcH070293; Fri, 29 Nov 2024 12:28:22 GMT (envelope-from git) Date: Fri, 29 Nov 2024 12:28:22 GMT Message-Id: <202411291228.4ATCSMcH070293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 950f0c86d320 - stable/14 - sound: Fix chn_trigger() and vchan_trigger() races List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 950f0c86d3200b8ec609b17f04c62cab9bc76dd8 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=950f0c86d3200b8ec609b17f04c62cab9bc76dd8 commit 950f0c86d3200b8ec609b17f04c62cab9bc76dd8 Author: Christos Margiolis AuthorDate: 2024-11-26 14:48:18 +0000 Commit: Christos Margiolis CommitDate: 2024-11-29 12:28:06 +0000 sound: Fix chn_trigger() and vchan_trigger() races Consider the following scenario: 1. CHN currently has its trigger set to PCMTRIG_STOP. 2. Thread A locks CHN, calls CHANNEL_TRIGGER(PCMTRIG_START), sets the trigger to PCMTRIG_START and unlocks. 3. Thread B picks up the lock, calls CHANNEL_TRIGGER(PCMTRIG_ABORT) and returns a non-zero value, so it returns from chn_trigger() as well. 4. Thread A picks up the lock and adds CHN to the list, which is _wrong_, because the last call to CHANNEL_TRIGGER() was with PCMTRIG_ABORT, meaning the channel is stopped, yet we are adding it to the list and marking it as started. Another problematic scenario: 1. Thread A locks CHN, sets the trigger to PCMTRIG_ABORT, and unlocks CHN. It then locks PCM and _removes_ CHN from the list. 2. In the meantime, since thread A unlocked CHN, thread B has locked it, set the trigger to PCMTRIG_START, unlocked it, and is now blocking on PCM held by thread A. 3. At the same time, thread C locks CHN, sets the trigger back to PCMTRIG_ABORT, unlocks CHN, and is also blocking on PCM. However, once thread A unlocks PCM, because thread C is higher-priority than thread B, it picks up the PCM lock instead of thread B, and because CHN is already removed from the list, and thread B hasn't added it back yet, we take a page fault in CHN_REMOVE() by trying to remove a non-existent element. To fix the former scenario, set the channel trigger before the call to CHANNEL_TRIGGER() (could also come after, doesn't really matter) and check if anything changed one we lock CHN back. To fix the latter scenario, use the SAFE variants of CHN_INSERT_HEAD() and CHN_REMOVE(). A similar scenario can occur in vchan_trigger(), so do the trigger setting after we've locked the parent channel. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D47461 (cherry picked from commit 5ac39263d825d7b2f8a89614a63fee90ffc77c07) --- sys/dev/sound/pcm/channel.c | 56 +++++++++++++++++++++++---------------------- sys/dev/sound/pcm/vchan.c | 11 ++++----- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index eb70e910f51d..59cdb8cd07f5 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -2318,44 +2318,46 @@ chn_trigger(struct pcm_channel *c, int go) if (go == c->trigger) return (0); + if (snd_verbose > 3) { + device_printf(c->dev, "%s() %s: calling go=0x%08x , " + "prev=0x%08x\n", __func__, c->name, go, c->trigger); + } + + c->trigger = go; ret = CHANNEL_TRIGGER(c->methods, c->devinfo, go); if (ret != 0) return (ret); + CHN_UNLOCK(c); + PCM_LOCK(d); + CHN_LOCK(c); + + /* + * Do nothing if another thread set a different trigger while we had + * dropped the mutex. + */ + if (go != c->trigger) { + PCM_UNLOCK(d); + return (0); + } + + /* + * Use the SAFE variants to prevent inserting/removing an already + * existing/missing element. + */ switch (go) { case PCMTRIG_START: - if (snd_verbose > 3) - device_printf(c->dev, - "%s() %s: calling go=0x%08x , " - "prev=0x%08x\n", __func__, c->name, go, - c->trigger); - if (c->trigger != PCMTRIG_START) { - c->trigger = go; - CHN_UNLOCK(c); - PCM_LOCK(d); - CHN_INSERT_HEAD(d, c, channels.pcm.busy); - PCM_UNLOCK(d); - CHN_LOCK(c); - chn_syncstate(c); - } + CHN_INSERT_HEAD_SAFE(d, c, channels.pcm.busy); + PCM_UNLOCK(d); + chn_syncstate(c); break; case PCMTRIG_STOP: case PCMTRIG_ABORT: - if (snd_verbose > 3) - device_printf(c->dev, - "%s() %s: calling go=0x%08x , " - "prev=0x%08x\n", __func__, c->name, go, - c->trigger); - if (c->trigger == PCMTRIG_START) { - c->trigger = go; - CHN_UNLOCK(c); - PCM_LOCK(d); - CHN_REMOVE(d, c, channels.pcm.busy); - PCM_UNLOCK(d); - CHN_LOCK(c); - } + CHN_REMOVE_SAFE(d, c, channels.pcm.busy); + PCM_UNLOCK(d); break; default: + PCM_UNLOCK(d); break; } diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index ed13a3c55961..4165d0712b94 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -146,20 +146,19 @@ vchan_trigger(kobj_t obj, void *data, int go) int ret, otrigger; info = data; - - if (!PCMTRIG_COMMON(go) || go == info->trigger) - return (0); - c = info->channel; p = c->parentchannel; - otrigger = info->trigger; - info->trigger = go; CHN_LOCKASSERT(c); + if (!PCMTRIG_COMMON(go) || go == info->trigger) + return (0); CHN_UNLOCK(c); CHN_LOCK(p); + otrigger = info->trigger; + info->trigger = go; + switch (go) { case PCMTRIG_START: if (otrigger != PCMTRIG_START) From nobody Fri Nov 29 12:28:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0CBv63tjz5f646; Fri, 29 Nov 2024 12:28:23 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0CBv3Hz2z47db; Fri, 29 Nov 2024 12:28:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732883303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhu0oqPG7wTgDIs9nvWrc4UQ29S6xT4pWfDP4uR3d64=; b=XwtNw3ylJndlOEM974KPJXp/YA1Olw3tgLUt/JamsXaz+sVd2EhEwLESGy1dalsjDGQGG4 H6r9KddZtKyi0FvFTfSlVuTl6SyNRQ5uqnYEzwPZnI1lP0HDzxFFZalGV6q5//25XtZIlD 6cgqWUJWEIZq2zmakRjZucfDhiWdFyhdOVXbPofV/i/K/+rDd0DcDQetSpzHeQuPEHFNev HKK1La22ZoXcGnEnvOVzcjrrBcDJ41xNCz7ZARiPDfNm/TrUTWGcgxErhAcZWQPPjzL6Vm Tqk9vCRihXKsrEl8wihie86DREcHZM1sgG6LlWRoeNLx6Gz4GPej42GQEu5yug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732883303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhu0oqPG7wTgDIs9nvWrc4UQ29S6xT4pWfDP4uR3d64=; b=nMrwBWFnKut0VwMqBAsU4OZhO3A0/ybHrstqV1j0tFEw/dZFKmj6mzWF1JLbSJIS+cNSc1 inxM9LXwUm8mh4dXW5u0H6/oVMG36JxwyRKfXJglnJgEtg0JVd83vgQY86vR6DwGrk9z1F JBPGZ3r44nDxZeGXwpjnTZX7BtUW+ZgTUBB0UFaqIecGS8d0U7QIh+JJ8PPUiiy4XERaaM C+YfC7v9P626MbyBUt4XsSfYnPOSrlCA/hL8KsgydleBXJTGv0QJi73kd5OPb41EYY0qf1 PvKRUEjh99+IWtWkCxxst4BQ61e7+r0E1hJ2uUADTwUPJ+JJQJR3zVOIKMfemw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732883303; a=rsa-sha256; cv=none; b=O/mMuo95FoXAfE/gNS7XI229lRdp8sw/JsfQGBFGWvGMgZg09J/hxH2eC/PX8Sh07Y2ckj vGi3y67buPVn2QDO0hmufxa1CXM/pipVuYkH9PyjeNUyVEZLzpN2QAWzWCO36s7tVdGvZw aB/RIF51A0a452NjW1sJng1DjT29A1qSdcTrBcc0HeYw3nJ1s9cHYyibVAYe6rXy6QW31N 8rP5vV+8EGdQN5oyOD3UbLVniSxiaO8e0F1IFUV1Tx2za9qOcD/DIUsILuQ5jMdAgbnhUC wbhIx8Vxc/jdy1gsuciqovyENNkANkwhNMCCrfZCbaWq0riymchig4lFi93ikA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0CBv2dbWzNff; Fri, 29 Nov 2024 12:28:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ATCSN5e070335; Fri, 29 Nov 2024 12:28:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ATCSN8M070332; Fri, 29 Nov 2024 12:28:23 GMT (envelope-from git) Date: Fri, 29 Nov 2024 12:28:23 GMT Message-Id: <202411291228.4ATCSN8M070332@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 1682d80337ed - stable/14 - sound: Fix hot-unload panics List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1682d80337ed9fd6037e43d2f59937cbcc322335 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1682d80337ed9fd6037e43d2f59937cbcc322335 commit 1682d80337ed9fd6037e43d2f59937cbcc322335 Author: Christos Margiolis AuthorDate: 2024-11-26 14:48:24 +0000 Commit: Christos Margiolis CommitDate: 2024-11-29 12:28:06 +0000 sound: Fix hot-unload panics This patch fixes multiple different panic scenarios occuring during hot-unload: 1. The channel is unlocked in chn_read()/chn_write() for uiomove(9) and in the meantime we enter pcm_killchans() and free it. By the time we have returned from userland and try to lock it back, the channel will have been freed. 2. The parent channel has been freed in pcm_killchans(), but at the same time, some yet-unstopped vchan's chn_read()/chn_write() calls chn_start(), which eventually calls vchan_trigger(), which references the freed parent. 3. PCM_WAIT() panics because it references a freed PCM lock. For scenarios 1 and 2, refactor pcm_killchans() to first make sure all channels have been stopped, and then proceed to free them one by one, as opposed to freeing the first free channel until all channels have been freed. This change makes the code more robust, but might introduce some performance overhead when many channels are allocated, since we continuously loop through the channel list until all of them are stopped, and then we loop one last time to free them. For scenario 3, restructure the code so that we can use destroy_dev(9) instead of destroy_dev_sched(9) in dsp_destroy_dev(). Because destroy_dev(9) blocks until all references to the device have went away, we ensure that the PCM cv and lock will be freed safely. While here, move the delete_unrhdr(9) calls to pcm_killchans() and re-order some lines. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D47462 (cherry picked from commit 2839ad58dd8a4cf5294180fc599800c437a8d4d8) --- sys/dev/sound/pcm/dsp.c | 2 +- sys/dev/sound/pcm/sound.c | 97 ++++++++++++++++++++--------------------------- 2 files changed, 43 insertions(+), 56 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 6a59bcfc1ade..0f19f064a227 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -137,7 +137,7 @@ dsp_destroy_dev(device_t dev) struct snddev_info *d; d = device_get_softc(dev); - destroy_dev_sched(d->dsp_dev); + destroy_dev(d->dsp_dev); } static void diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index e03bcab6d8fc..ebd2e2d697f8 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -211,40 +211,53 @@ static void pcm_killchans(struct snddev_info *d) { struct pcm_channel *ch; - bool found; + bool again; PCM_BUSYASSERT(d); - do { - found = false; + KASSERT(!PCM_REGISTERED(d), ("%s(): still registered\n", __func__)); + + for (;;) { + again = false; + /* Make sure all channels are stopped. */ CHN_FOREACH(ch, d, channels.pcm) { CHN_LOCK(ch); - /* - * Make sure no channel has went to sleep in the - * meantime. - */ - chn_shutdown(ch); - /* - * We have to give a thread sleeping in chn_sleep() a - * chance to observe that the channel is dead. - */ - if ((ch->flags & CHN_F_SLEEPING) == 0) { - found = true; + if ((ch->flags & CHN_F_SLEEPING) == 0 && + CHN_STOPPED(ch) && ch->inprog == 0) { CHN_UNLOCK(ch); - break; + continue; } + chn_shutdown(ch); + if (ch->direction == PCMDIR_PLAY) + chn_flush(ch); + else + chn_abort(ch); CHN_UNLOCK(ch); + again = true; } - /* - * All channels are still sleeping. Sleep for a bit and try - * again to see if any of them is awake now. + * Some channels are still active. Sleep for a bit and try + * again. */ - if (!found) { - pause_sbt("pcmkillchans", SBT_1MS * 5, 0, 0); - continue; - } + if (again) + pause_sbt("pcmkillchans", mstosbt(5), 0, 0); + else + break; + } + + /* All channels are finally dead. */ + while (!CHN_EMPTY(d, channels.pcm)) { + ch = CHN_FIRST(d, channels.pcm); chn_kill(ch); - } while (!CHN_EMPTY(d, channels.pcm)); + } + + if (d->p_unr != NULL) + delete_unrhdr(d->p_unr); + if (d->vp_unr != NULL) + delete_unrhdr(d->vp_unr); + if (d->r_unr != NULL) + delete_unrhdr(d->r_unr); + if (d->vr_unr != NULL) + delete_unrhdr(d->vr_unr); } static int @@ -511,7 +524,6 @@ int pcm_unregister(device_t dev) { struct snddev_info *d; - struct pcm_channel *ch; d = device_get_softc(dev); @@ -524,28 +536,15 @@ pcm_unregister(device_t dev) PCM_WAIT(d); d->flags |= SD_F_DETACHING; + d->flags |= SD_F_DYING; + d->flags &= ~SD_F_REGISTERED; PCM_ACQUIRE(d); PCM_UNLOCK(d); - CHN_FOREACH(ch, d, channels.pcm) { - CHN_LOCK(ch); - /* - * Do not wait for the timeout in chn_read()/chn_write(). Wake - * up the sleeping thread and kill the channel. - */ - chn_shutdown(ch); - chn_abort(ch); - CHN_UNLOCK(ch); - } + pcm_killchans(d); - /* remove /dev/sndstat entry first */ - sndstat_unregister(dev); - - PCM_LOCK(d); - d->flags |= SD_F_DYING; - d->flags &= ~SD_F_REGISTERED; - PCM_UNLOCK(d); + PCM_RELEASE_QUICK(d); if (d->play_sysctl_tree != NULL) { sysctl_ctx_free(&d->play_sysctl_ctx); @@ -556,24 +555,12 @@ pcm_unregister(device_t dev) d->rec_sysctl_tree = NULL; } + sndstat_unregister(dev); + mixer_uninit(dev); dsp_destroy_dev(dev); - (void)mixer_uninit(dev); - - pcm_killchans(d); - PCM_LOCK(d); - PCM_RELEASE(d); cv_destroy(&d->cv); - PCM_UNLOCK(d); snd_mtxfree(d->lock); - if (d->p_unr != NULL) - delete_unrhdr(d->p_unr); - if (d->vp_unr != NULL) - delete_unrhdr(d->vp_unr); - if (d->r_unr != NULL) - delete_unrhdr(d->r_unr); - if (d->vr_unr != NULL) - delete_unrhdr(d->vr_unr); if (snd_unit == device_get_unit(dev)) { snd_unit = pcm_best_unit(-1); From nobody Fri Nov 29 12:28:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0CBw74Rgz5f5yL; Fri, 29 Nov 2024 12:28:24 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0CBw4vKpz47h0; Fri, 29 Nov 2024 12:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732883304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JZ31DOZ7nPEqXnYFLBZPIFOawOzAqnrvG7cXa5ztBys=; b=RRUYtWS2Caa8KNm3dC7YaMACqfyAaFm7vhy77d/DX32ooIdxnX1GinEbMRdwJubuR+SykT eAVsKjuKBkx/EoFes4/UVSaQUGMZkDmGCT54Tb1OqO9twjlM9wDEpWriyKz2zgEEKJp+If HF6jNjtwF0yb66bCO2CYDwLmzN9pgH9zziuQ8kMVT6dFFWlO1/A5wes8XkseCyedd799yT qOu8yyy05s0MKIsvZH7rsc4niqHZ0RJr8gpLTzhbEce+X6gown+UMUFThzZWgm7yy26rbl +MAk8Ul1GFtT959X6FIJNxzfFzx69jG9kZiRfbItf91lSmfCMbb/g1QgqTTYqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732883304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JZ31DOZ7nPEqXnYFLBZPIFOawOzAqnrvG7cXa5ztBys=; b=pG8j/NKfw3w8Nus9EsEKpUZqOHTAIBV7S7RzWWZSAQmYC1He/1m0zOjk6eR8t53xRBFXAJ kLxsMVxOJmcKsI5M0O3O7YR/dmcxgghCldy+T16a1/nFBYk1TaWZueb3KJOJUsLIh0b6r9 Sf/X7F4wj26qPGstMArxcF/KoUZgTiA4OuDmnsR6w01i6abe+CTTtQB24RXxaXvlrmhAwy 0f1UWusO75HrGrT+CWUg3769bnXLos3FXzR+EyK5jBtymDksrPWcE3lmaUal8QM4Y15iim a7iHkR1y7rCLmL0fIuFc43j+vbgiu4p4ZPkj5qFQHIMrmtPbdcT0Z19WhqUlgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732883304; a=rsa-sha256; cv=none; b=ZHAedkHT/SP1fy/kV6ZmA266uO/YjXZdDnzDsO3HShXbcotPIeRRfEIXmWOyfLx9B1anUr 6w7FuEbprIk1khvUWmYpYvTnAuL72yL/21EMJLr3a5TDEL6DQmiId+oCuwyuQ603e1+h5n 2YWcT8khnw3nhXDk0oO4vF1p+yZc5xpOQoWiAAeHkv45TrEetu7wvFcy+J2v/2ctps+7ZM vu4vky+amd7FQqDYDJNkInk7spA0mtcJjrY3TbFnv2zxqxcuQDn2TvxKDGSFX5PW2VzeMu 6oOiz8xfi9UWwocSWoGbhbtcCUePftmcVxAqn7OHRLCH4FBMtJWNlQzIHOVTbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0CBw3xg3zNmJ; Fri, 29 Nov 2024 12:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ATCSO46070380; Fri, 29 Nov 2024 12:28:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ATCSOJm070377; Fri, 29 Nov 2024 12:28:24 GMT (envelope-from git) Date: Fri, 29 Nov 2024 12:28:24 GMT Message-Id: <202411291228.4ATCSOJm070377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 3397443e50d2 - stable/14 - sound: Remove PCM_DETACHING(), SD_F_DETACHING and SD_F_DYING List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3397443e50d2a34c953cb3d13fe2c2fb50e4ea7c Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3397443e50d2a34c953cb3d13fe2c2fb50e4ea7c commit 3397443e50d2a34c953cb3d13fe2c2fb50e4ea7c Author: Christos Margiolis AuthorDate: 2024-11-26 14:48:30 +0000 Commit: Christos Margiolis CommitDate: 2024-11-29 12:28:06 +0000 sound: Remove PCM_DETACHING(), SD_F_DETACHING and SD_F_DYING Since SD_F_REGISTERED is cleared at the same time SD_F_DETACHING and SD_F_DYING are set, and since PCM_DETACHING() is always used in conjuction with PCM_REGISTERED()/DSP_REGISTERED(), it is enough to just check SD_F_REGISTERED. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D47463 (cherry picked from commit 6d4c59e26189a8c19fd0832e89f9b089330cbfcb) --- sys/dev/sound/pcm/dsp.c | 12 ++++++------ sys/dev/sound/pcm/mixer.c | 10 +++++----- sys/dev/sound/pcm/sound.c | 2 -- sys/dev/sound/pcm/sound.h | 48 ++++++++++++++++++++--------------------------- 4 files changed, 31 insertions(+), 41 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 0f19f064a227..ccf240681a25 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -177,7 +177,7 @@ dsp_close(void *data) d = priv->sc; /* At this point pcm_unregister() will destroy all channels anyway. */ - if (!DSP_REGISTERED(d) || PCM_DETACHING(d)) + if (!DSP_REGISTERED(d)) goto skip; PCM_GIANT_ENTER(d); @@ -264,7 +264,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) return (ENODEV); d = i_dev->si_drv1; - if (!DSP_REGISTERED(d) || PCM_DETACHING(d)) + if (!DSP_REGISTERED(d)) return (EBADF); priv = malloc(sizeof(*priv), M_DEVBUF, M_WAITOK | M_ZERO); @@ -445,7 +445,7 @@ dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf) ("%s(): io train wreck!", __func__)); d = priv->sc; - if (!DSP_REGISTERED(d) || PCM_DETACHING(d)) + if (!DSP_REGISTERED(d)) return (EBADF); PCM_GIANT_ENTER(d); @@ -664,7 +664,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, return (err); d = priv->sc; - if (!DSP_REGISTERED(d) || PCM_DETACHING(d)) + if (!DSP_REGISTERED(d)) return (EBADF); PCM_GIANT_ENTER(d); @@ -1783,7 +1783,7 @@ dsp_poll(struct cdev *i_dev, int events, struct thread *td) if ((err = devfs_get_cdevpriv((void **)&priv)) != 0) return (err); d = priv->sc; - if (!DSP_REGISTERED(d) || PCM_DETACHING(d)) { + if (!DSP_REGISTERED(d)) { /* XXX many clients don't understand POLLNVAL */ return (events & (POLLHUP | POLLPRI | POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM)); @@ -1865,7 +1865,7 @@ dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offset, if ((err = devfs_get_cdevpriv((void **)&priv)) != 0) return (err); d = priv->sc; - if (!DSP_REGISTERED(d) || PCM_DETACHING(d)) + if (!DSP_REGISTERED(d)) return (EINVAL); PCM_GIANT_ENTER(d); diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 6d74fa975f03..b5b5814e667b 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -146,7 +146,7 @@ mixer_set_softpcmvol(struct snd_mixer *m, struct snddev_info *d, struct pcm_channel *c; int dropmtx, acquiremtx; - if (!PCM_REGISTERED(d) || PCM_DETACHING(d)) + if (!PCM_REGISTERED(d)) return (EINVAL); if (mtx_owned(m->lock)) @@ -199,7 +199,7 @@ mixer_set_eq(struct snd_mixer *m, struct snddev_info *d, else return (EINVAL); - if (!PCM_REGISTERED(d) || PCM_DETACHING(d)) + if (!PCM_REGISTERED(d)) return (EINVAL); if (mtx_owned(m->lock)) @@ -1053,7 +1053,7 @@ mixer_open(struct cdev *i_dev, int flags, int mode, struct thread *td) m = i_dev->si_drv1; d = device_get_softc(m->dev); - if (!PCM_REGISTERED(d) || PCM_DETACHING(d)) + if (!PCM_REGISTERED(d)) return (EBADF); /* XXX Need Giant magic entry ??? */ @@ -1209,7 +1209,7 @@ mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, return (EBADF); d = device_get_softc(((struct snd_mixer *)i_dev->si_drv1)->dev); - if (!PCM_REGISTERED(d) || PCM_DETACHING(d)) + if (!PCM_REGISTERED(d)) return (EBADF); PCM_GIANT_ENTER(d); @@ -1447,7 +1447,7 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); - if (!PCM_REGISTERED(d) || PCM_DETACHING(d)) { + if (!PCM_REGISTERED(d)) { if ((mi->dev == -1 && i == snd_unit) || mi->dev == i) { mixer_oss_mixerinfo_unavail(mi, i); return (0); diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index ebd2e2d697f8..44ba4805462d 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -535,8 +535,6 @@ pcm_unregister(device_t dev) PCM_LOCK(d); PCM_WAIT(d); - d->flags |= SD_F_DETACHING; - d->flags |= SD_F_DYING; d->flags &= ~SD_F_REGISTERED; PCM_ACQUIRE(d); diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index c5013e76034a..467adad2ddff 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -104,17 +104,15 @@ struct snd_mixer; #define SD_F_SIMPLEX 0x00000001 #define SD_F_AUTOVCHAN 0x00000002 #define SD_F_SOFTPCMVOL 0x00000004 -#define SD_F_DYING 0x00000008 -#define SD_F_DETACHING 0x00000010 -#define SD_F_BUSY 0x00000020 -#define SD_F_MPSAFE 0x00000040 -#define SD_F_REGISTERED 0x00000080 -#define SD_F_BITPERFECT 0x00000100 -#define SD_F_VPC 0x00000200 /* volume-per-channel */ -#define SD_F_EQ 0x00000400 /* EQ */ -#define SD_F_EQ_ENABLED 0x00000800 /* EQ enabled */ -#define SD_F_EQ_BYPASSED 0x00001000 /* EQ bypassed */ -#define SD_F_EQ_PC 0x00002000 /* EQ per-channel */ +#define SD_F_BUSY 0x00000008 +#define SD_F_MPSAFE 0x00000010 +#define SD_F_REGISTERED 0x00000020 +#define SD_F_BITPERFECT 0x00000040 +#define SD_F_VPC 0x00000080 /* volume-per-channel */ +#define SD_F_EQ 0x00000100 /* EQ */ +#define SD_F_EQ_ENABLED 0x00000200 /* EQ enabled */ +#define SD_F_EQ_BYPASSED 0x00000400 /* EQ bypassed */ +#define SD_F_EQ_PC 0x00000800 /* EQ per-channel */ #define SD_F_EQ_DEFAULT (SD_F_EQ | SD_F_EQ_ENABLED) #define SD_F_EQ_MASK (SD_F_EQ | SD_F_EQ_ENABLED | \ @@ -127,26 +125,20 @@ struct snd_mixer; "\001SIMPLEX" \ "\002AUTOVCHAN" \ "\003SOFTPCMVOL" \ - "\004DYING" \ - "\005DETACHING" \ - "\006BUSY" \ - "\007MPSAFE" \ - "\010REGISTERED" \ - "\011BITPERFECT" \ - "\012VPC" \ - "\013EQ" \ - "\014EQ_ENABLED" \ - "\015EQ_BYPASSED" \ - "\016EQ_PC" \ + "\004BUSY" \ + "\005MPSAFE" \ + "\006REGISTERED" \ + "\007BITPERFECT" \ + "\010VPC" \ + "\011EQ" \ + "\012EQ_ENABLED" \ + "\013EQ_BYPASSED" \ + "\014EQ_PC" \ "\035PRIO_RD" \ "\036PRIO_WR" -#define PCM_ALIVE(x) ((x) != NULL && (x)->lock != NULL && \ - !((x)->flags & SD_F_DYING)) -#define PCM_REGISTERED(x) (PCM_ALIVE(x) && \ - ((x)->flags & SD_F_REGISTERED)) - -#define PCM_DETACHING(x) ((x)->flags & SD_F_DETACHING) +#define PCM_ALIVE(x) ((x) != NULL && (x)->lock != NULL) +#define PCM_REGISTERED(x) (PCM_ALIVE(x) && ((x)->flags & SD_F_REGISTERED)) #define PCM_CHANCOUNT(d) \ (d->playcount + d->pvchancount + d->reccount + d->rvchancount) From nobody Fri Nov 29 12:28:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0CBy2V7Fz5f669; Fri, 29 Nov 2024 12:28:26 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0CBx6Zbkz47mZ; Fri, 29 Nov 2024 12:28:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732883305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LTvgX27CqGnVqstOiXqcM3Ip6DO2VURqvZDYHH56mFE=; b=rvFqVfRw/OWXkaEx1mSCZCXG5Ux0DjFUh+m/TiH5RMbwlyu66oz9jFifVFd5gU1sp4QRc9 5R+bQ/Xb/Ydb5uuDo6p4uejaDDs31S6jdaGp9t4kyINnC10xcIOhe3J0xFSpIGGptRXVyY NTvVMOzwzbcWTghFuXehX2bV8zJ262484+pcg9PdPT1iLWqlUSEr29Uo8SL/MKVsp5QZ2s UWDklzkSDeQtcfoTsOWZiImU1H1J29ffnOigzxJbh4+eTW1Z4Haw5BXy+DiDIK6l3xsqbm cXpArrNEVg1dXl48yHhApsF/pqshNdMye2+9P2xZ4zFXsjVDw3udR9xH1e+19g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732883305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LTvgX27CqGnVqstOiXqcM3Ip6DO2VURqvZDYHH56mFE=; b=h5nioD4B3dIXxpi4iC82Y6uOtkZO0sbDkf7UcPm4cWmiwFWWeBX4dDgii8DrQjHic9aMwc WLM9/dC+tL98595lZDTvAfcXSbiPIw3OlVYhWNbASzLmUhFRPdLjK1Mxuio1zGFxYPnTo2 PkloPTerq5kxCtJB+Ew4bBd6PLv00BB/uZ3Ed1IHNo9pnaOV5AZalt/7UVC0lrQuQjemhc YAGMZNqXhbn3FpOazKPhQ+l4j/y1Oi6CP81mVkaJIeCQPnajsZyU5uBPC4RdillRjw6ucX /pYsRAMSjNeroKJneB3kvjdEVYALUFTY0pAz4++qvJgtCPeD9j7ii7T7ohwsYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732883305; a=rsa-sha256; cv=none; b=NZW7KWG4+GuvCyorpR+fdwroFy/b5ThEvFrhJ8EP+0H67Z55qhDhSiQVuCXfJ7aI86e7XM P4xqUPRugZFMu7pIc4FdiFlUPiUV2iMQZYWPBY5bEA6xjlum3VgUrr9n5JeYusC1XKW+zj di/3ul1lBn3SBAhh4h/AKF9KAgJ/ui8VL/PISuvl1ihKGPqad79qYOlArCwP5I8bZS0NrG 7J4YDryrcvXVk7VFC0L35oEH5Gy0edjMKeeXSi3Xte8R07Azz5KORNgeJu+GkaD9n58zBm OLaI5YdeTb1JubD49LMn+1eANeDZgpTl+/P6kACKkq3dvZwoOeb0Tsv3aFKILg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0CBx4xk1zMxH; Fri, 29 Nov 2024 12:28:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ATCSPlT070416; Fri, 29 Nov 2024 12:28:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ATCSPEM070413; Fri, 29 Nov 2024 12:28:25 GMT (envelope-from git) Date: Fri, 29 Nov 2024 12:28:25 GMT Message-Id: <202411291228.4ATCSPEM070413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 0ef520dca67a - stable/14 - sound: Remove CHN_F_SLEEPING List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0ef520dca67a0812d655cc4ee1b3db58dfb67e5f Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0ef520dca67a0812d655cc4ee1b3db58dfb67e5f commit 0ef520dca67a0812d655cc4ee1b3db58dfb67e5f Author: Christos Margiolis AuthorDate: 2024-11-26 14:48:36 +0000 Commit: Christos Margiolis CommitDate: 2024-11-29 12:28:07 +0000 sound: Remove CHN_F_SLEEPING The KASSERT in chn_sleep() can be triggered if more than one thread wants to sleep on a given channel at the same time. While this is not really a common scenario, tools such as stress2, which use fork() and the child process(es) inherit the parent's FDs as a result, we can end up triggering such scenarios. Fix this by removing CHN_F_SLEEPING altogether, which is not very useful in the first place: - CHN_BROADCAST() checks cv_waiters already, so there is no need to check CHN_F_SLEEPING as well. - We can check whether cv_waiters is 0 in pcm_killchans(), instead of whether CHN_F_SLEEPING is not set. Reported by: dougm, pho (stress2) Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D47559 (cherry picked from commit 5317480967bfc8bf678e4da3fce81bcb3f5b7836) --- sys/dev/sound/pcm/channel.c | 13 +------------ sys/dev/sound/pcm/channel.h | 4 ++-- sys/dev/sound/pcm/sound.c | 4 ++-- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 59cdb8cd07f5..f619ddd4bc35 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -309,14 +309,7 @@ chn_wakeup(struct pcm_channel *c) if (CHN_EMPTY(c, children.busy)) { if (SEL_WAITING(sndbuf_getsel(bs)) && chn_polltrigger(c)) selwakeuppri(sndbuf_getsel(bs), PRIBIO); - if (c->flags & CHN_F_SLEEPING) { - /* - * Ok, I can just panic it right here since it is - * quite obvious that we never allow multiple waiters - * from userland. I'm too generous... - */ - CHN_BROADCAST(&c->intr_cv); - } + CHN_BROADCAST(&c->intr_cv); } else { CHN_FOREACH(ch, c, children.busy) { CHN_LOCK(ch); @@ -332,15 +325,11 @@ chn_sleep(struct pcm_channel *c, int timeout) int ret; CHN_LOCKASSERT(c); - KASSERT((c->flags & CHN_F_SLEEPING) == 0, - ("%s(): entered with CHN_F_SLEEPING", __func__)); if (c->flags & CHN_F_DEAD) return (EINVAL); - c->flags |= CHN_F_SLEEPING; ret = cv_timedwait_sig(&c->intr_cv, c->lock, timeout); - c->flags &= ~CHN_F_SLEEPING; return ((c->flags & CHN_F_DEAD) ? EINVAL : ret); } diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index 79a8d35b22f7..d226adfba06b 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -354,7 +354,7 @@ enum { #define CHN_F_RUNNING 0x00000004 /* dma is running */ #define CHN_F_TRIGGERED 0x00000008 #define CHN_F_NOTRIGGER 0x00000010 -#define CHN_F_SLEEPING 0x00000020 +/* unused 0x00000020 */ #define CHN_F_NBIO 0x00000040 /* do non-blocking i/o */ #define CHN_F_MMAP 0x00000080 /* has been mmap()ed */ @@ -381,8 +381,8 @@ enum { "\002ABORTING" \ "\003RUNNING" \ "\004TRIGGERED" \ + /* \006 */ \ "\005NOTRIGGER" \ - "\006SLEEPING" \ "\007NBIO" \ "\010MMAP" \ "\011BUSY" \ diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 44ba4805462d..761c505fd402 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -221,8 +221,8 @@ pcm_killchans(struct snddev_info *d) /* Make sure all channels are stopped. */ CHN_FOREACH(ch, d, channels.pcm) { CHN_LOCK(ch); - if ((ch->flags & CHN_F_SLEEPING) == 0 && - CHN_STOPPED(ch) && ch->inprog == 0) { + if (ch->intr_cv.cv_waiters == 0 && CHN_STOPPED(ch) && + ch->inprog == 0) { CHN_UNLOCK(ch); continue; } From nobody Fri Nov 29 12:28:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0CBz1K9vz5f6B4; Fri, 29 Nov 2024 12:28:27 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0CBy6Q8gz47s4; Fri, 29 Nov 2024 12:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732883306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u/27s1auEyQOkAPQafav/GwtFw1QTa3qnBRhYDEwCeQ=; b=OaT53zGhubkCNAWjTmbi9N0JDqAIgT5MW7owAYgrp0etNv5cd21TNBQG2zJfjSdy0NIxI/ V0I1HXM4OMxFGs8kXLSpSKuf21eI/zxAZ1+/Eb1MB+p09ieKs0+/Munv0SeKG8846fN93C eOOfntCy41U5DcRAJgRz6KjNdxfH4KvrzH2mBsOUB65jklNOfVBqN3/PlA9g3d/PVrbybb DKZbbfj/1cClaIbK105spePocRHQitpbNUSkkcw8cftJ77y2zWE5ZFi7NbNolghiqQdopC ieGqVPPn2H4VXyTJLmsdI+5qrBCAMbX4jxtGRxfCr+M4JS3VKQt+z5XYzfO36g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732883306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u/27s1auEyQOkAPQafav/GwtFw1QTa3qnBRhYDEwCeQ=; b=et44hZWwRvnjlbqUowUrZrQ4zStss52ADOsM7x9DI4WNpQAJI83+MXFNE32aw6GFICkXOx r+WA6n6pwLXmf22Qn94ZelJh85dJd/Jfo8IEk9hHewxhnJTvAb9DQpc2f9HPs6/6cFi+7Y SexxF5fNeWgn8zXIi/x7c2wyQcXEMMEmWyhMTINUPqov8E6qOIoPy6TP3ipp1WHlrF0Hqf kmKBV8Ul0nFuqWdie3QBej2WKpGoshTEYVH5x/YUxxgHAdyM9unP5H1o9NrJ76aQG8x8sM a361905By7bj39f+BADz+++3LdC5C10ybihzbuMalneULoedMexbOE/pfe6Smg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732883306; a=rsa-sha256; cv=none; b=kRaVWV4X2j/FWBO7ARwtqDjLpQHELRpoHTfjM3sUNt+w3xKb7xZnX7qKeMxUIZcMpgk09C jB3bIKPVVv/C2T0OevPAT4cwzxQuN057oSofGEeBLFMQlS39Ppfec0Vc2a0tkuObijul1a Y3vStHBctbdzI+kLYnRnJPnZqkKTpJp4IEEVTLMlrxIkn3LgMcU9Kik1X7+wRWUKZck2yY kbU7cXU6dPndUy8XYpO716aWoAxspsBA3aeWVLkZ0XH75HKfx5RyfV8EzXy1TrkgRWuSMG b+sC4ePyQEyfH+/ECKMZhZcPjEjpRLH67UsJrqqOraIg4d7Jyn/8mqmR/0d53Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0CBy5nSdzNmK; Fri, 29 Nov 2024 12:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ATCSQ0p070459; Fri, 29 Nov 2024 12:28:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ATCSQQJ070456; Fri, 29 Nov 2024 12:28:26 GMT (envelope-from git) Date: Fri, 29 Nov 2024 12:28:26 GMT Message-Id: <202411291228.4ATCSQQJ070456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 0f6a6b2e4273 - stable/14 - sound: Remove unused CHN_F_SILENCE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0f6a6b2e4273b69eabcdb45092094853a52390b8 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0f6a6b2e4273b69eabcdb45092094853a52390b8 commit 0f6a6b2e4273b69eabcdb45092094853a52390b8 Author: Christos Margiolis AuthorDate: 2024-11-26 14:48:42 +0000 Commit: Christos Margiolis CommitDate: 2024-11-29 12:28:07 +0000 sound: Remove unused CHN_F_SILENCE No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D47664 (cherry picked from commit 6d77827b963ec1a72de3f46d51fe14ed30ef437e) --- sys/dev/sound/pcm/channel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index d226adfba06b..cef8aa4e86e5 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -362,7 +362,7 @@ enum { #define CHN_F_BUSY 0x00000100 /* has been opened */ #define CHN_F_DIRTY 0x00000200 /* need re-config */ #define CHN_F_DEAD 0x00000400 /* too many errors, dead, mdk */ -#define CHN_F_SILENCE 0x00000800 /* silence, nil, null, yada */ +/* unused 0x00000800 */ #define CHN_F_HAS_SIZE 0x00001000 /* user set block size */ #define CHN_F_HAS_VCHAN 0x00002000 /* vchan master */ @@ -388,7 +388,7 @@ enum { "\011BUSY" \ "\012DIRTY" \ "\013DEAD" \ - "\014SILENCE" \ + /* \014 */ \ "\015HAS_SIZE" \ "\016HAS_VCHAN" \ "\017VCHAN_PASSTHROUGH" \ From nobody Sat Nov 30 00:41:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0WSq0KcLz5fxhr; Sat, 30 Nov 2024 00:41:31 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0WSp6tbqz4Lcy; Sat, 30 Nov 2024 00:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732927291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5eePSRMyweDSImhhGzsAh0/VTFxjQy7Yofe4mGpaky4=; b=Mjh7dmzyrQulDNVhDem0SC/jlwc07hN+dCk4RNKIhVa6hPmCHpPvuinKbZ12y3bSPco+Vp i4JxF37XihlqbO+9Afk98DyHs7dl/FgIfQI+JYA2CCJCaNL+bW2Jvfv+ZWBx1UYJ+VVJN/ 65RTnuYGMPMx+jhgEAkn9lMrIXq649Kv0Wn57QGe5bQXF2N6QB9aZhiK7ketH07G/BOoQG apekYRajrlFZDjKnwNsuk+AQcNF1RL0l//5llJJQWKx9jkhghDqoSXKr3n3bDgTSSDLdrV MqvXkurepl20cW/gexi9jeuCF4+KrW0JsY9xG9a/cVbSwg9xF7TQ05ZjsaBXXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732927291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5eePSRMyweDSImhhGzsAh0/VTFxjQy7Yofe4mGpaky4=; b=G9hdV0a1wBCoalGeqiuIvADDTrkeFL+dJailjEFHjQzhAkzW/P4PO4HN6m14DDmjejZXhP KrW0tqUlCvNr9VwVGv29k4DQ0M6r5kb1dvW3+fF8BGtFfBVr9xGy+VeSDfb4VYH3W7ps2H Fa6FeNfI3iORum9jQK7BZJnPD1sB9IkxOyqNck6gPUTalJwRxPc49isk2j1me0IEglpUft gRu7GX9TGVDnBcKeYnfSMPnBRTwLkgY+FL22CWiDHiIh5FcAJs7RANujyC5GizIZZhqQAE ILznouiENweCW3eMSFv81lEw7sNeChgmlAGewkw4uLUw3hTZ7emT5f9nX4rXPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732927291; a=rsa-sha256; cv=none; b=T59h/l53adMQUuF+LbMyb1XxUur3YV7pQmzLgsgkUtSsU3mS1fLE/C380VRVkI57VthDfv 1qqkDobGG5wvobLKFYlk2o1bOPzHH8uoI3ZRpBkaIKCZqrSWdze4SoLYB3JcygI9mSE3Ai 2ghFbz79AFd7VVEPC15cIHxwP3DHVhk1M2t0OElKN09ozsKz3PjqgCpe+t76xnrR4Yur71 1c8SpcHwgKcLkZwB8+F6UXh3pnhmu47NkRz8wo3i77zUm/6LP2BHWiJXsI8iUHRFlPyagb UqPETr5YczpTvLOkLWwsKtkSIHW0h14LcyZjGsYZxbsey3L1auMYAXYafjNavw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0WSp6TpMzm5v; Sat, 30 Nov 2024 00:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AU0fUQn038892; Sat, 30 Nov 2024 00:41:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AU0fUjs038889; Sat, 30 Nov 2024 00:41:30 GMT (envelope-from git) Date: Sat, 30 Nov 2024 00:41:30 GMT Message-Id: <202411300041.4AU0fUjs038889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b0b932804bf6 - stable/14 - mlx5: Fix handling of port_module_event List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b0b932804bf6022646067e66ce45df7f2f51f3ab Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b0b932804bf6022646067e66ce45df7f2f51f3ab commit b0b932804bf6022646067e66ce45df7f2f51f3ab Author: Ariel Ehrenberg AuthorDate: 2024-10-31 09:18:26 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-30 00:34:54 +0000 mlx5: Fix handling of port_module_event (cherry picked from commit 253a1fa16b98ac5f73f0820cfdd4f5ad7378757a) --- sys/dev/mlx5/driver.h | 3 ++- sys/dev/mlx5/mlx5_core/mlx5_eq.c | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index 6ebe4171a503..e1c71b8baa1a 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -721,7 +721,8 @@ struct mlx5_core_dev { u32 vsc_addr; u32 issi; struct mlx5_special_contexts special_contexts; - unsigned int module_status[MLX5_MAX_PORTS]; + unsigned int module_status; + unsigned int module_num; struct mlx5_flow_root_namespace *root_ns; struct mlx5_flow_root_namespace *fdb_root_ns; struct mlx5_flow_root_namespace *esw_egress_root_ns; diff --git a/sys/dev/mlx5/mlx5_core/mlx5_eq.c b/sys/dev/mlx5/mlx5_core/mlx5_eq.c index 2d5b53b6482a..e7f282ea576b 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_eq.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_eq.c @@ -679,9 +679,9 @@ static const char *mlx5_port_module_event_error_type_to_string(u8 error_type) unsigned int mlx5_query_module_status(struct mlx5_core_dev *dev, int module_num) { - if (module_num < 0 || module_num >= MLX5_MAX_PORTS) - return 0; /* undefined */ - return dev->module_status[module_num]; + if (module_num != dev->module_num) + return 0; /* module num doesn't equal to what FW reported */ + return dev->module_status; } static void mlx5_port_module_event(struct mlx5_core_dev *dev, @@ -729,8 +729,8 @@ static void mlx5_port_module_event(struct mlx5_core_dev *dev, "Module %u, unknown status %d\n", module_num, module_status); } /* store module status */ - if (module_num < MLX5_MAX_PORTS) - dev->module_status[module_num] = module_status; + dev->module_status = module_status; + dev->module_num = module_num; } static void mlx5_port_general_notification_event(struct mlx5_core_dev *dev, From nobody Sat Nov 30 06:54:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0gkm1Zfwz5fClW; Sat, 30 Nov 2024 06:54:08 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0gkm0vYvz4s1V; Sat, 30 Nov 2024 06:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732949648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TQ1AGMRHUOfsTnGlxzlnRQRTd6N++yMA+SCq5sCivpI=; b=IpXswLqNn/d5oHmh0GB1oRIkHzQfP3qySx7KTC+KagpTLkcOdSKfp8U8wu+8if/0gvTkIM f5B6PSRN3uDS8YIhM7Xu0GDSF/GVYNXOjCYEmcmxTpAh0InNlnRCxMens9S2QT3kZa3hGr ttJBfA/byef5N+DXHsflmFid0DeIClbe6ANQf4+h3aWgUfQlMK2iNz2QAeCdR5wpgx3ktH UaM/WFqayQ05ae0iAgPlBqM63sjAHgFDWmuNQQfRPk+iZ4Zl3ZqajJ4PF+aqZBcxl2LWFC uoMsaotEqOlHgHKYJdMcKLI9fMF86Wl6NajoqNmSc7KNBplYC7wn8zMDcmLleQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732949648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TQ1AGMRHUOfsTnGlxzlnRQRTd6N++yMA+SCq5sCivpI=; b=T42E9FFftR9wd1OTH3wcbOwdJKRblosP/Ymb7S982h2QgEFSUbxTaTmH99/WGIU7qoI5gk ivQSo4AiU2zk9nlqNdi6gGuOR9SF1U65IbAwtVOR6wt62+qoX4IE0eZ9r58fT1RJh3S/Bq Cb1q0fbLO7I4nO21pMSvytc09ORH1p5VMrn0S8M8Kw4HFsawHoyg9K4dD6T2Z7FfCKJykp 1w4ae+nFYK//bdOmTY/k8Fp5tYmDjG3UqafM3hTT373NSPV4fTO2wPt/nPP2Mex2EZD7ti fk3c3xbvFReBJVRgsTGfIPEHjLjePsxtmskt1G501fBB3yiiSxb1rTJbkwKyKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732949648; a=rsa-sha256; cv=none; b=XewGtzMjWYI1v3XzLmDvkLyAS6xrbgBCw75Uj2us+oE9uWvrl4Lv38YbRzS6Zyq+dVEG8y onA9360f9YTgEh2iStgB1GeIMDP14LtWjBcZQaELXfJ1pbiil4R3XaNGV8NGcbqC6o+fcL Jp6C6+U0lNVOeJPN5vnRMbk/FDVF1ayH/h9SKrnICdTXq1UqNfvYvseoCqOrDNAC8rJSVi kQZSnKn38Yw+TOtMsmKRQK+9G9mQSdq7lEHsKz+8Kf7D+e36KCn2T/aVb4eBNxhyWFIEs7 nYf34AqMpjDLAeVihLza3DNPxEYtG4ZT+HHkwANkdCWYNuESwCAcBPLBpZ9AcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0gkm0Jj9zxtJ; Sat, 30 Nov 2024 06:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AU6s7GA034341; Sat, 30 Nov 2024 06:54:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AU6s7dO034338; Sat, 30 Nov 2024 06:54:07 GMT (envelope-from git) Date: Sat, 30 Nov 2024 06:54:07 GMT Message-Id: <202411300654.4AU6s7dO034338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 57a7f61b13c3 - stable/14 - kerneldump: fix incorrect SETSIZE to BIT_COPY_STORE_REL when livedump List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 57a7f61b13c3c9c171fa791466dce4df704629c0 Auto-Submitted: auto-generated The branch stable/14 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=57a7f61b13c3c9c171fa791466dce4df704629c0 commit 57a7f61b13c3c9c171fa791466dce4df704629c0 Author: Ka Ho Ng AuthorDate: 2024-11-23 16:35:07 +0000 Commit: Ka Ho Ng CommitDate: 2024-11-30 06:53:49 +0000 kerneldump: fix incorrect SETSIZE to BIT_COPY_STORE_REL when livedump Also replace malloc/free with BITSET_ALLOC/BITSET_FREE macros. Sponsored by: Juniper Networks, Inc. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47708 (cherry picked from commit 9ad8116b54616a5e8cbcdd2e1432893dce0c608c) --- sys/kern/kern_dump.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_dump.c b/sys/kern/kern_dump.c index 3afaee9acb7e..a3ca716b2861 100644 --- a/sys/kern/kern_dump.c +++ b/sys/kern/kern_dump.c @@ -466,7 +466,6 @@ minidumpsys(struct dumperinfo *di, bool livedump) struct minidumpstate state; struct msgbuf mb_copy; char *msg_ptr; - size_t sz; int error; if (livedump) { @@ -511,9 +510,10 @@ minidumpsys(struct dumperinfo *di, bool livedump) msgbuf_duplicate(msgbufp, &mb_copy, msg_ptr); state.msgbufp = &mb_copy; - sz = BITSET_SIZE(vm_page_dump_pages); - state.dump_bitset = malloc(sz, M_TEMP, M_WAITOK); - BIT_COPY_STORE_REL(sz, vm_page_dump, state.dump_bitset); + state.dump_bitset = BITSET_ALLOC(vm_page_dump_pages, M_TEMP, + M_WAITOK); + BIT_COPY_STORE_REL(vm_page_dump_pages, vm_page_dump, + state.dump_bitset); } else { KASSERT(dumping, ("minidump invoked outside of doadump()")); @@ -525,7 +525,7 @@ minidumpsys(struct dumperinfo *di, bool livedump) error = cpu_minidumpsys(di, &state); if (livedump) { free(msg_ptr, M_TEMP); - free(state.dump_bitset, M_TEMP); + BITSET_FREE(state.dump_bitset, M_TEMP); } return (error); From nobody Sat Nov 30 16:51:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzW55r5z5fHxY; Sat, 30 Nov 2024 16:51:03 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzW0nBpz4nJs; Sat, 30 Nov 2024 16:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FHt4KXHen6DTTG3hPir6yAlq3fVjuPjTRGPvc10vEQM=; b=Ce4BIuh+KXnB6CTyK+wQ9RQnagKpMNBuBmRDmMRz+6je5p6UjagRiDYIkeC1qhzsDDD0xu /2Q45EnIG3DUkLsNPn2tCti6cH7Ltd5X8CvFFDUrApNIhDoHAWupUC9ZkfBkA7kJANRvhV w5tw6ETT/k+FHTRYGqUH5QPNDL81C7oWATkdHQnncEMhtrsFHdZn4IOHv1v0U5axm86ZqS BRHfroTnjXaKzDjz5iet3hljO7jBsgwMx1od6Ty+fhQMbN4qNIqJr9kAY4uoe8hhOoqQeF cnvfN2SAnevfz0xzkAB1NVEkVjE5AsAcarxSEdbL8XKR36eDMfoEmOPaCotm6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FHt4KXHen6DTTG3hPir6yAlq3fVjuPjTRGPvc10vEQM=; b=AQmeAt/OpGLd7lCzBXn6A3ue+w7Dzl/UZxu9qUrXpaDGNy3MB3RfO/TmbFfiTFSVf0pgL8 dwuxA+gmGxz3hRnCboZMRUnZyU0xGqiYzuxL19PCUHMh1AGlBLuVRwfoOc/dfe6C9/pWgA TPdO16HVMHL1I4wePa/kGcvdLBv9pZ2XPqUzGLm0rTThClckmOTj9PKYHaCasWk6LYxUq6 A9Hu/BLsB/YAoWiU5LX7BvBxGV3BvDVvoj89RcCB45SDh6YBqflFgfsZo/Km6bd3vQA4VQ v6HH5hGLKPQDGo0piGG6McHCHmAghIAR8QUrC3d7d/oRSWw1m0WFv7hzXxrxuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985463; a=rsa-sha256; cv=none; b=snvQ2FBMs716qDvUKIx/3umRdlLlnWNbFQ8xp52h6vCemne1hGX8wM9fNMfi0EszfePEer YhOV/u1Jrvrv/ukl+AizUN0iuGj18uPXZ0MfrjWHq+m6r2YzkA3atkGX5EEn3Hk3J20LN7 zumavmYCBGCcS30I7WZP2QlL36kzvKSJ8s6fnSpQAtrHTDEmoJ+VmzUMFfFM8KaQcLmbGr KosoHkqjImgQyQbUgiCeHnT8VzwMSLYwi0Qd0OqpbKTqkQQdbHEzAG2mM28RKCPyWIirCN BoT0dpie/74iZpj9PJXS1c+8it1ThGKKwmeKvVj8YX6mbtMi58w4pNiMJKSXqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzW0NWDzGKq; Sat, 30 Nov 2024 16:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGp2gu043041; Sat, 30 Nov 2024 16:51:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGp2Yv043038; Sat, 30 Nov 2024 16:51:02 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:02 GMT Message-Id: <202411301651.4AUGp2Yv043038@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 35d8944bfcd9 - stable/14 - i386: Use bool for booleans in getmemsize List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 35d8944bfcd9a3812f80393c2e77f3e9bf98a27d Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=35d8944bfcd9a3812f80393c2e77f3e9bf98a27d commit 35d8944bfcd9a3812f80393c2e77f3e9bf98a27d Author: John Baldwin AuthorDate: 2024-02-05 23:39:31 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:56 +0000 i386: Use bool for booleans in getmemsize Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43716 (cherry picked from commit bf20896da4545067eec2e6d8203a57fcdcee52cf) --- sys/i386/i386/machdep.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index adc571f00a3f..21a49b06ce60 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1132,10 +1132,11 @@ physmap_done: if (physmap[i + 1] < end) end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { - int tmp, page_bad, full; int *ptr; + int tmp; + bool full, page_bad; - full = FALSE; + full = false; /* * block out kernel memory as not available. */ @@ -1150,7 +1151,7 @@ physmap_done: && pa < dcons_addr + dcons_size) goto do_dump_avail; - page_bad = FALSE; + page_bad = false; if (memtest == 0) goto skip_memtest; @@ -1165,25 +1166,25 @@ physmap_done: */ *(volatile int *)ptr = 0xaaaaaaaa; if (*(volatile int *)ptr != 0xaaaaaaaa) - page_bad = TRUE; + page_bad = true; /* * Test for alternating 0's and 1's */ *(volatile int *)ptr = 0x55555555; if (*(volatile int *)ptr != 0x55555555) - page_bad = TRUE; + page_bad = true; /* * Test for all 1's */ *(volatile int *)ptr = 0xffffffff; if (*(volatile int *)ptr != 0xffffffff) - page_bad = TRUE; + page_bad = true; /* * Test for all 0's */ *(volatile int *)ptr = 0x0; if (*(volatile int *)ptr != 0x0) - page_bad = TRUE; + page_bad = true; /* * Restore original value. */ @@ -1193,7 +1194,7 @@ skip_memtest: /* * Adjust array of valid/good pages. */ - if (page_bad == TRUE) + if (page_bad == true) continue; /* * If this good page is a continuation of the @@ -1214,7 +1215,7 @@ skip_memtest: printf( "Too many holes in the physical address space, giving up\n"); pa_indx--; - full = TRUE; + full = true; goto do_dump_avail; } phys_avail[pa_indx++] = pa; /* start */ From nobody Sat Nov 30 16:51:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzV5DcSz5fJ0K; Sat, 30 Nov 2024 16:51:02 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzV0XLNz4nPY; Sat, 30 Nov 2024 16:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZVG1ETdBdqieQZanafKMkylgsMKw3Ssjx2TVq8at87E=; b=he+fPwslda+aES4vbNLvW/VRFv9T4pcnq1+tS42DJ5GLRmzpy6FOy0/u5H23LD+XaWb5JU aadbIJzJP8DLaeVz0dIMjA9ZrhhDeOSWJnhoLmk0pg92+JIr4EtOuC8ZYAfyyLkrnVy5j3 7MwF09zi5Fg45BaMN4vmoGY2YUfDAtRUbhUxrBHtZTIHgZkpxtCOMLtObaMx8pehGpEnjC UeUkGjLhjxG1uMXpNtrIrgqUSeUErEccrJxhlZNfx/lyMGinjDMh2/IQw8XxYP2ootwFxL +rWPYDorjMimGXEPAX0mE/hjrSYD8Yn9K6iQv0PrC21x81ZPZB2FjWHiw48VEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZVG1ETdBdqieQZanafKMkylgsMKw3Ssjx2TVq8at87E=; b=Y6Ksmu49d62Vy6UXqfwKkBbbg+biT7zTS4oJEZQTAQsbFq4JaBF1wCvtuLKjQCKwZidoig ugAVDPjqQ08mP+LOQ43TDlBzPZHJsDRfsSuiY1UTSDQiV5pON8AZLA3vhoBVq1tYrlJJo5 HM3tx9TtS7M8PJAxO2Ufcl3DsVG3q5x6+dS/5ytE6nEcJffk+CButsh6QhnFqi7dMguNvP 90/Z4w9puikiObbei7K8XLAOjT5rGujMnPi1glCTLfkoHyZPNBjoOINdHwhBXmQGcF3AoB z4EZL7zuKpYaXaZLDLjkDhsKP/tTQRrFGU7rvSU8Sb56IcjLwsUj/ouZuiZTnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985462; a=rsa-sha256; cv=none; b=cL+ByvNWoPQTcEngsSZf5RUkjs6T4WrWz4ClINseMJQPcLOuA8TKmuVW4gS7l1AnNXjmAU zMke6Ciqqo3tXeX/rpnRwdLezLbonoSzmuK5LGgQ2vqa73jjInr3JfHkAQWOU2xw5FcMa8 hnl6o9CKO57ehwBuwXI9DD8Jn5e3mtNXPWehMsvj4igg8w2tRR9tvdONICa38AhKpnYHp9 UG8d2AjKJW1zSi/d/78gfydcEk7qjGc/s3nculBfft9NHHwv3TSYBsBHEUxxkaz+i7O4Om 7MktrlMfnBuZ7nEK5m97YTmWtZVAxwfipuAwzhBDeNYXDpZabYTp/zS3EQOd5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzT6VNlzGT9; Sat, 30 Nov 2024 16:51:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGp1QI042993; Sat, 30 Nov 2024 16:51:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGp1oc042990; Sat, 30 Nov 2024 16:51:01 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:01 GMT Message-Id: <202411301651.4AUGp1oc042990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 5ced86e1e211 - stable/14 - amd64: Use bool for booleans in getmemsize List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5ced86e1e211e09cb4da40081bc5698a52ff08f7 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5ced86e1e211e09cb4da40081bc5698a52ff08f7 commit 5ced86e1e211e09cb4da40081bc5698a52ff08f7 Author: John Baldwin AuthorDate: 2024-02-02 22:58:46 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:56 +0000 amd64: Use bool for booleans in getmemsize Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43693 (cherry picked from commit 70539d5da600a65d34c8d965ef2a9d475cbc9c4e) --- sys/amd64/amd64/machdep.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 83a57ad3316f..ea0f164b2e56 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -984,10 +984,11 @@ getmemsize(caddr_t kmdp, u_int64_t first) if (physmap[i + 1] < end) end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { - int tmp, page_bad, full; int *ptr = (int *)CADDR1; + int tmp; + bool full, page_bad; - full = FALSE; + full = false; /* * block out kernel memory as not available. */ @@ -1002,7 +1003,7 @@ getmemsize(caddr_t kmdp, u_int64_t first) && pa < dcons_addr + dcons_size) goto do_dump_avail; - page_bad = FALSE; + page_bad = false; if (memtest == 0) goto skip_memtest; @@ -1026,25 +1027,25 @@ getmemsize(caddr_t kmdp, u_int64_t first) */ *(volatile int *)ptr = 0xaaaaaaaa; if (*(volatile int *)ptr != 0xaaaaaaaa) - page_bad = TRUE; + page_bad = true; /* * Test for alternating 0's and 1's */ *(volatile int *)ptr = 0x55555555; if (*(volatile int *)ptr != 0x55555555) - page_bad = TRUE; + page_bad = true; /* * Test for all 1's */ *(volatile int *)ptr = 0xffffffff; if (*(volatile int *)ptr != 0xffffffff) - page_bad = TRUE; + page_bad = true; /* * Test for all 0's */ *(volatile int *)ptr = 0x0; if (*(volatile int *)ptr != 0x0) - page_bad = TRUE; + page_bad = true; /* * Restore original value. */ @@ -1054,7 +1055,7 @@ skip_memtest: /* * Adjust array of valid/good pages. */ - if (page_bad == TRUE) + if (page_bad == true) continue; /* * If this good page is a continuation of the @@ -1075,7 +1076,7 @@ skip_memtest: printf( "Too many holes in the physical address space, giving up\n"); pa_indx--; - full = TRUE; + full = true; goto do_dump_avail; } phys_avail[pa_indx++] = pa; /* start */ From nobody Sat Nov 30 16:51:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzZ4gQ5z5fHmL; Sat, 30 Nov 2024 16:51:06 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzZ3T01z4nKG; Sat, 30 Nov 2024 16:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C5JwHQIwWi/i1mGQiQJJLiwpX0V4kEJ1sqHbMiDRTHk=; b=pzmTSd/o0WP4fFBM4TXxVUqcORRC9DvSazWxDrrUPQawg65w3YySpVLPSrFtRP3fLMqUie BdAnDx2CTgETYh9ht1U5fgcmntrCgKuHgeCT88jGgW+e+9QMdWa0C89WSHKxzZIisR9n8E 9QTt+a9wF8KXnGa9FhDAOYUQyvfPOsgEZl8slEFYVFeezNGNoMXFSs/CI+mNZGXqESmwgz bXnc28BRPztacIFJzX2ACK9wyCTub8V7tWKN6zXXfV5CWeMFUw1PBlGK9siquxpSb1P4fw 39w5SNLw71kq155jbzjI9jY9c7IoBPFeLftXi86qBI3o4rkIQFCW3bCuDrJGGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C5JwHQIwWi/i1mGQiQJJLiwpX0V4kEJ1sqHbMiDRTHk=; b=KWU/P6UHteQpc/wpPmoNL86Qnn3lCbeqWtPGI0/xzaorhRN4ezH/P2BISu/5zJd0BAaIrq 1s6v/L6sxDB8PyFbvC5Jt9VZb/rb2+1LdVMCAXmTybdr87svMBuGtO5LnoWQpW1dEXfw5h LJEle7B+W+6yRl/c5/m8tn4pWxSR/m1D75H+C++tBiwbPe6xwyJgQvvXilDjUjsch4IVvm 0uXIWSpr2/s3BJgVZLJGXNwTwsgYMYo5S9kq+P7OG3nMXd1DhclrGUW/hncL6Xuob+JDLi gtm45ijD5XuYg/EQE7e6b6K3aXgfD3Ym/dEqWlgj4c+6b6gqn0U0cOHEZJ0i3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985466; a=rsa-sha256; cv=none; b=Whjfn0OegsovIKS/8rHkuP9UvvXwntq5cAg+i70NWIRWqRHXjABWmGeFglo9LSArbqiNM1 gEHAbnYUMwpzPrJ/0WUhbVEVOvGzKpxIwsgaui5ZtZsystUk8F5J7M5hDoZnrdwkEfy+Rj CBGkWZ+kN2aIfCiPiiGhON1OBgrPQh/gZlNga75PppWTT108pe00EiFt42f93fhIhwAbKE hwrOaQ/h3DPyeYMyb99k3TjrczOHlX5vGsf7SxZx9szwWfg50OxTLTJa7KYgo2B+9gEFe6 5UjqkNvWh+MM93UMuMhjlc616JNuwjoFuO5OpKs9MDjH6ZV5tEerAGHo/mHBQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzZ2p8HzGVr; Sat, 30 Nov 2024 16:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGp6TI043209; Sat, 30 Nov 2024 16:51:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGp6QI043206; Sat, 30 Nov 2024 16:51:06 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:06 GMT Message-Id: <202411301651.4AUGp6QI043206@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 13e770f1f0eb - stable/14 - uio: Use switch statements when handling UIO_READ vs UIO_WRITE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 13e770f1f0eb35f5abd0a2df2a0644b5ee6e220c Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=13e770f1f0eb35f5abd0a2df2a0644b5ee6e220c commit 13e770f1f0eb35f5abd0a2df2a0644b5ee6e220c Author: John Baldwin AuthorDate: 2024-05-10 20:43:36 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 uio: Use switch statements when handling UIO_READ vs UIO_WRITE This is mostly to reduce the diff with CheriBSD which adds additional constants to enum uio_rw, but also matches the normal style used for uio_segflg. Reviewed by: kib, emaste Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D45142 (cherry picked from commit 473c90ac04cec0abbb414978c53e9c259c9129e8) --- sys/amd64/amd64/mem.c | 13 +++++++++++-- sys/amd64/amd64/uio_machdep.c | 16 ++++++++++++---- sys/arm/arm/uio_machdep.c | 16 ++++++++++++---- sys/arm64/arm64/mem.c | 13 +++++++++++-- sys/arm64/arm64/uio_machdep.c | 16 ++++++++++++---- sys/compat/lindebugfs/lindebugfs.c | 33 +++++++++++++++++++++------------ sys/dev/iicbus/iic.c | 16 +++++++++++----- sys/fs/procfs/procfs_osrel.c | 7 +++++-- sys/i386/i386/uio_machdep.c | 16 ++++++++++++---- sys/kern/kern_physio.c | 14 ++++++++++---- sys/kern/subr_uio.c | 16 ++++++++++++---- sys/kern/vfs_vnops.c | 7 +++++-- sys/powerpc/powerpc/uio_machdep.c | 16 ++++++++++++---- sys/riscv/riscv/mem.c | 13 +++++++++++-- sys/riscv/riscv/uio_machdep.c | 16 ++++++++++++---- sys/ufs/ffs/ffs_suspend.c | 7 +++++-- 16 files changed, 174 insertions(+), 61 deletions(-) diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index 378cf2f011f6..63fbd1081318 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -80,6 +80,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags) struct iovec *iov; void *p; ssize_t orig_resid; + vm_prot_t prot; u_long v, vd; u_int c; int error; @@ -111,8 +112,16 @@ memrw(struct cdev *dev, struct uio *uio, int flags) break; } - if (!kernacc((void *)v, c, uio->uio_rw == UIO_READ ? - VM_PROT_READ : VM_PROT_WRITE)) { + switch (uio->uio_rw) { + case UIO_READ: + prot = VM_PROT_READ; + break; + case UIO_WRITE: + prot = VM_PROT_WRITE; + break; + } + + if (!kernacc((void *)v, c, prot)) { error = EFAULT; break; } diff --git a/sys/amd64/amd64/uio_machdep.c b/sys/amd64/amd64/uio_machdep.c index 67e14d8e0d12..de0d8c775988 100644 --- a/sys/amd64/amd64/uio_machdep.c +++ b/sys/amd64/amd64/uio_machdep.c @@ -100,18 +100,26 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) switch (uio->uio_segflg) { case UIO_USERSPACE: maybe_yield(); - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: error = copyout(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: error = copyin(iov->iov_base, cp, cnt); + break; + } if (error) goto out; break; case UIO_SYSSPACE: - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: bcopy(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: bcopy(iov->iov_base, cp, cnt); + break; + } break; case UIO_NOCOPY: break; diff --git a/sys/arm/arm/uio_machdep.c b/sys/arm/arm/uio_machdep.c index 18661ebd1652..f86d19fc2da5 100644 --- a/sys/arm/arm/uio_machdep.c +++ b/sys/arm/arm/uio_machdep.c @@ -97,20 +97,28 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) switch (uio->uio_segflg) { case UIO_USERSPACE: maybe_yield(); - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: error = copyout(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: error = copyin(iov->iov_base, cp, cnt); + break; + } if (error) { sf_buf_free(sf); goto out; } break; case UIO_SYSSPACE: - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: bcopy(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: bcopy(iov->iov_base, cp, cnt); + break; + } break; case UIO_NOCOPY: break; diff --git a/sys/arm64/arm64/mem.c b/sys/arm64/arm64/mem.c index 44555dcacc22..b4bca481fe37 100644 --- a/sys/arm64/arm64/mem.c +++ b/sys/arm64/arm64/mem.c @@ -50,6 +50,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags) struct vm_page m; vm_page_t marr; vm_offset_t off, v; + vm_prot_t prot; u_int cnt; int error; @@ -79,8 +80,16 @@ memrw(struct cdev *dev, struct uio *uio, int flags) break; } - if (!kernacc((void *)v, cnt, uio->uio_rw == UIO_READ ? - VM_PROT_READ : VM_PROT_WRITE)) { + switch (uio->uio_rw) { + case UIO_READ: + prot = VM_PROT_READ; + break; + case UIO_WRITE: + prot = VM_PROT_WRITE; + break; + } + + if (!kernacc((void *)v, cnt, prot)) { error = EFAULT; break; } diff --git a/sys/arm64/arm64/uio_machdep.c b/sys/arm64/arm64/uio_machdep.c index 4fdcaf74890c..e67d60d75aab 100644 --- a/sys/arm64/arm64/uio_machdep.c +++ b/sys/arm64/arm64/uio_machdep.c @@ -98,18 +98,26 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) switch (uio->uio_segflg) { case UIO_USERSPACE: maybe_yield(); - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: error = copyout(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: error = copyin(iov->iov_base, cp, cnt); + break; + } if (error) goto out; break; case UIO_SYSSPACE: - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: bcopy(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: bcopy(iov->iov_base, cp, cnt); + break; + } break; case UIO_NOCOPY: break; diff --git a/sys/compat/lindebugfs/lindebugfs.c b/sys/compat/lindebugfs/lindebugfs.c index eab89d9d13a5..6ff9cea6c4e8 100644 --- a/sys/compat/lindebugfs/lindebugfs.c +++ b/sys/compat/lindebugfs/lindebugfs.c @@ -137,19 +137,28 @@ debugfs_fill(PFS_FILL_ARGS) } rc = -ENODEV; - if (uio->uio_rw == UIO_READ && d->dm_fops->read) { - rc = -ENOMEM; - buf = (char *) malloc(sb->s_size, M_DFSINT, M_ZERO | M_NOWAIT); - if (buf != NULL) { - rc = d->dm_fops->read(&lf, buf, sb->s_size, &off); - if (rc > 0) - sbuf_bcpy(sb, buf, strlen(buf)); - - free(buf, M_DFSINT); + switch (uio->uio_rw) { + case UIO_READ: + if (d->dm_fops->read != NULL) { + rc = -ENOMEM; + buf = malloc(sb->s_size, M_DFSINT, M_ZERO | M_NOWAIT); + if (buf != NULL) { + rc = d->dm_fops->read(&lf, buf, sb->s_size, + &off); + if (rc > 0) + sbuf_bcpy(sb, buf, strlen(buf)); + + free(buf, M_DFSINT); + } } - } else if (uio->uio_rw == UIO_WRITE && d->dm_fops->write) { - sbuf_finish(sb); - rc = d->dm_fops->write(&lf, sbuf_data(sb), sbuf_len(sb), &off); + break; + case UIO_WRITE: + if (d->dm_fops->write != NULL) { + sbuf_finish(sb); + rc = d->dm_fops->write(&lf, sbuf_data(sb), sbuf_len(sb), + &off); + } + break; } if (d->dm_fops->release) diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c index baaa7a096a14..8349de241128 100644 --- a/sys/dev/iicbus/iic.c +++ b/sys/dev/iicbus/iic.c @@ -213,7 +213,8 @@ iicuio_move(struct iic_cdevpriv *priv, struct uio *uio, int last) num_bytes = MIN(uio->uio_resid, sizeof(buffer)); transferred_bytes = 0; - if (uio->uio_rw == UIO_WRITE) { + switch (uio->uio_rw) { + case UIO_WRITE: error = uiomove(buffer, num_bytes, uio); while ((error == 0) && (transferred_bytes < num_bytes)) { @@ -222,13 +223,14 @@ iicuio_move(struct iic_cdevpriv *priv, struct uio *uio, int last) num_bytes - transferred_bytes, &written_bytes, 0); transferred_bytes += written_bytes; } - - } else if (uio->uio_rw == UIO_READ) { + break; + case UIO_READ: error = iicbus_read(parent, buffer, num_bytes, &transferred_bytes, ((uio->uio_resid <= sizeof(buffer)) ? last : 0), 0); if (error == 0) error = uiomove(buffer, transferred_bytes, uio); + break; } } @@ -264,10 +266,14 @@ iicuio(struct cdev *dev, struct uio *uio, int ioflag) return (error); } - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: addr = priv->addr | LSB; - else + break; + case UIO_WRITE: addr = priv->addr & ~LSB; + break; + } error = iicbus_start(parent, addr, 0); if (error != 0) diff --git a/sys/fs/procfs/procfs_osrel.c b/sys/fs/procfs/procfs_osrel.c index 3854d7cd370f..e0928fab26cc 100644 --- a/sys/fs/procfs/procfs_osrel.c +++ b/sys/fs/procfs/procfs_osrel.c @@ -46,9 +46,11 @@ procfs_doosrel(PFS_FILL_ARGS) if (uio == NULL) return (EOPNOTSUPP); - if (uio->uio_rw == UIO_READ) { + switch (uio->uio_rw) { + case UIO_READ: sbuf_printf(sb, "%d\n", p->p_osrel); - } else { + break; + case UIO_WRITE: sbuf_trim(sb); sbuf_finish(sb); pp = sbuf_data(sb); @@ -63,6 +65,7 @@ procfs_doosrel(PFS_FILL_ARGS) osrel = ov; } p->p_osrel = osrel; + break; } return (0); } diff --git a/sys/i386/i386/uio_machdep.c b/sys/i386/i386/uio_machdep.c index 92e067b35bed..4a41ea1520e5 100644 --- a/sys/i386/i386/uio_machdep.c +++ b/sys/i386/i386/uio_machdep.c @@ -97,10 +97,14 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) switch (uio->uio_segflg) { case UIO_USERSPACE: maybe_yield(); - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: error = copyout(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: error = copyin(iov->iov_base, cp, cnt); + break; + } if (error) { sf_buf_free(sf); sched_unpin(); @@ -108,10 +112,14 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) } break; case UIO_SYSSPACE: - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: bcopy(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: bcopy(iov->iov_base, cp, cnt); + break; + } break; case UIO_NOCOPY: break; diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index e89a0cb28abc..9b35779538b6 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -117,14 +117,17 @@ physio(struct cdev *dev, struct uio *uio, int ioflag) #ifdef RACCT if (racct_enable) { PROC_LOCK(curproc); - if (uio->uio_rw == UIO_READ) { + switch (uio->uio_rw) { + case UIO_READ: racct_add_force(curproc, RACCT_READBPS, uio->uio_iov[i].iov_len); racct_add_force(curproc, RACCT_READIOPS, 1); - } else { + break; + case UIO_WRITE: racct_add_force(curproc, RACCT_WRITEBPS, uio->uio_iov[i].iov_len); racct_add_force(curproc, RACCT_WRITEIOPS, 1); + break; } PROC_UNLOCK(curproc); } @@ -132,12 +135,15 @@ physio(struct cdev *dev, struct uio *uio, int ioflag) while (uio->uio_iov[i].iov_len) { g_reset_bio(bp); - if (uio->uio_rw == UIO_READ) { + switch (uio->uio_rw) { + case UIO_READ: bp->bio_cmd = BIO_READ; curthread->td_ru.ru_inblock++; - } else { + break; + case UIO_WRITE: bp->bio_cmd = BIO_WRITE; curthread->td_ru.ru_oublock++; + break; } bp->bio_offset = uio->uio_offset; base = uio->uio_iov[i].iov_base; diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c index d836c0ed295e..77cc3a200ee0 100644 --- a/sys/kern/subr_uio.c +++ b/sys/kern/subr_uio.c @@ -252,19 +252,27 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault) switch (uio->uio_segflg) { case UIO_USERSPACE: maybe_yield(); - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: error = copyout(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: error = copyin(iov->iov_base, cp, cnt); + break; + } if (error) goto out; break; case UIO_SYSSPACE: - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: bcopy(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: bcopy(iov->iov_base, cp, cnt); + break; + } break; case UIO_NOCOPY: break; diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 1171b72a3a96..53a2ddf94862 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1261,12 +1261,15 @@ vn_io_fault_doio(struct vn_io_fault_args *args, struct uio *uio, uio, args->cred, args->flags, td); break; case VN_IO_FAULT_VOP: - if (uio->uio_rw == UIO_READ) { + switch (uio->uio_rw) { + case UIO_READ: error = VOP_READ(args->args.vop_args.vp, uio, args->flags, args->cred); - } else if (uio->uio_rw == UIO_WRITE) { + break; + case UIO_WRITE: error = VOP_WRITE(args->args.vop_args.vp, uio, args->flags, args->cred); + break; } break; default: diff --git a/sys/powerpc/powerpc/uio_machdep.c b/sys/powerpc/powerpc/uio_machdep.c index 5de2dd8b416b..e2ea2810efa9 100644 --- a/sys/powerpc/powerpc/uio_machdep.c +++ b/sys/powerpc/powerpc/uio_machdep.c @@ -103,20 +103,28 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) switch (uio->uio_segflg) { case UIO_USERSPACE: maybe_yield(); - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: error = copyout(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: error = copyin(iov->iov_base, cp, cnt); + break; + } if (error) { sf_buf_free(sf); goto out; } break; case UIO_SYSSPACE: - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: bcopy(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: bcopy(iov->iov_base, cp, cnt); + break; + } break; case UIO_NOCOPY: break; diff --git a/sys/riscv/riscv/mem.c b/sys/riscv/riscv/mem.c index d8e2706f708e..c33ee6fc31f1 100644 --- a/sys/riscv/riscv/mem.c +++ b/sys/riscv/riscv/mem.c @@ -51,6 +51,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags) struct iovec *iov; struct vm_page m; vm_page_t marr; + vm_prot_t prot; u_int cnt; int error; @@ -80,8 +81,16 @@ memrw(struct cdev *dev, struct uio *uio, int flags) break; } - if (!kernacc((void *)v, cnt, uio->uio_rw == UIO_READ ? - VM_PROT_READ : VM_PROT_WRITE)) { + switch (uio->uio_rw) { + case UIO_READ: + prot = VM_PROT_READ; + break; + case UIO_WRITE: + prot = VM_PROT_WRITE; + break; + } + + if (!kernacc((void *)v, cnt, prot)) { error = EFAULT; break; } diff --git a/sys/riscv/riscv/uio_machdep.c b/sys/riscv/riscv/uio_machdep.c index e2f82974b2e9..c0ca8070ed56 100644 --- a/sys/riscv/riscv/uio_machdep.c +++ b/sys/riscv/riscv/uio_machdep.c @@ -98,18 +98,26 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) switch (uio->uio_segflg) { case UIO_USERSPACE: maybe_yield(); - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: error = copyout(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: error = copyin(iov->iov_base, cp, cnt); + break; + } if (error) goto out; break; case UIO_SYSSPACE: - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: bcopy(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: bcopy(iov->iov_base, cp, cnt); + break; + } break; case UIO_NOCOPY: break; diff --git a/sys/ufs/ffs/ffs_suspend.c b/sys/ufs/ffs/ffs_suspend.c index e23e12cc8be4..3afbab82cba5 100644 --- a/sys/ufs/ffs/ffs_suspend.c +++ b/sys/ufs/ffs/ffs_suspend.c @@ -138,7 +138,8 @@ ffs_susp_rdwr(struct cdev *dev, struct uio *uio, int ioflag) NOCRED, &bp); if (error != 0) goto out; - if (uio->uio_rw == UIO_WRITE) { + switch (uio->uio_rw) { + case UIO_WRITE: error = copyin(base, bp->b_data, len); if (error != 0) { bp->b_flags |= B_INVAL | B_NOCACHE; @@ -148,11 +149,13 @@ ffs_susp_rdwr(struct cdev *dev, struct uio *uio, int ioflag) error = bwrite(bp); if (error != 0) goto out; - } else { + break; + case UIO_READ: error = copyout(bp->b_data, base, len); brelse(bp); if (error != 0) goto out; + break; } uio->uio_iov[i].iov_base = (char *)uio->uio_iov[i].iov_base + len; From nobody Sat Nov 30 16:51:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzZ2KHvz5fHmK; Sat, 30 Nov 2024 16:51:06 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzY33N8z4nSC; Sat, 30 Nov 2024 16:51:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6KPvM7Zuwlofk7kmkYW9XStVoRDDJZVX7n5Y2dYX9RU=; b=l0xdzvvqFns9tRXmMACHDFbJ/UbP0TwvZmjayK7NZeCzSoebGO60mxnnEwQblhx7OZrZcw HQJEcCdpXc2YVOBCgiDmPFTcl/+s1Ebhtcgw1ivdlIHlf/N2kLY2md9T9ygc3KtDTNtEfX zeOufBr51S6zIHdCysEBoDdfy3O1NNc2fvMJJ59m2YrT9FG3RduZUA+o26osdAylrGghTr Fi1rCRQB+W4Pwp5jFw6XOMVXNiZS3xyFxa/n4KkX1HjjyIPFS36DeBbqPv0AHzhwDhzL3d QD+DFZvXlhNEzysBKzheYq05hRBCrxh/8zUxB66anQl9GXuyQ/icCmYDFvKl9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6KPvM7Zuwlofk7kmkYW9XStVoRDDJZVX7n5Y2dYX9RU=; b=vgqRiInfbj3Y/82qqK0Bo00kFVeedxNNIuo/mtyD8a+7KVEV3OdkzrKFwBOAChj2wT3GB/ aHSU22Syz4SWxEuoVW3VOIw4zPzC2t9UkkM630y+lal6eR87tJs25aJWTOSFiKLy+Mm34u +q592kGbZO9p9DTu9MiXcPX9tBLzY7EUGTOP1wloObu8T83yUjhHuQxEcGHduyq2FSt3uz NiXpFBQqc+zfcx+YbzvIJMHP4cFkVvD/5uq7aZr9++MEr3UJ8rF5ulw7HWbFSy89d+1AIc WbX3MVdAtddgWmFf2lm6u63nJy6LF9EKoZVx5YXbVBuQlB7hQ9Rw/4YddaeE1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985465; a=rsa-sha256; cv=none; b=WWM4A227MlcOmnjZirmK48qDybXD26/pUfkxLQtiUuA45Q2rAqe+00kzNP2ZcPcrbNnxeV Gz5PrObUsf0pKkY3pveZOVTB2pypTL83vDuNXRo/smnW0o0Tqb943+xWLkvVa2hCBejeYF Za+Cjv1v1xjtxBC37daEFIHobM4AIeTx7TxGFlCmSE0KVysvUCBfYVT+3W/DMEf5HFLhKW nZHRB03d0JdoiIITQm2qFFE9P2HNFb9R+dDfpgxJObrvPtrUjkfOYckGyT58twPtuvD7R/ CLc86HVuG6SViu0T5SvOwReYXyVejRSM16rSmffdr6M1lvKr7Lxe4u7EVSVvug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzY2LrzzFxX; Sat, 30 Nov 2024 16:51:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGp5RS043147; Sat, 30 Nov 2024 16:51:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGp5aR043144; Sat, 30 Nov 2024 16:51:05 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:05 GMT Message-Id: <202411301651.4AUGp5aR043144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1fd57c5735ef - stable/14 - md: Merge two switch statements in mdstart_vnode List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1fd57c5735ef2789bcc97b81dd1d73a400578fc7 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1fd57c5735ef2789bcc97b81dd1d73a400578fc7 commit 1fd57c5735ef2789bcc97b81dd1d73a400578fc7 Author: John Baldwin AuthorDate: 2024-05-10 20:43:23 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 md: Merge two switch statements in mdstart_vnode While here, use bp->bio_cmd instead of auio.uio_rw to drive read vs write behavior. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45155 (cherry picked from commit f75764fea34afe59f2db338b3e973eba626243ee) --- sys/dev/md/md.c | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 3285cfef830d..f6634c709225 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -889,23 +889,6 @@ mdstart_vnode(struct md_s *sc, struct bio *bp) int ma_offs, npages; bool mapped; - switch (bp->bio_cmd) { - case BIO_READ: - auio.uio_rw = UIO_READ; - break; - case BIO_WRITE: - auio.uio_rw = UIO_WRITE; - break; - case BIO_FLUSH: - break; - case BIO_DELETE: - if (sc->candelete) - break; - /* FALLTHROUGH */ - default: - return (EOPNOTSUPP); - } - td = curthread; vp = sc->vnode; piov = NULL; @@ -922,7 +905,14 @@ mdstart_vnode(struct md_s *sc, struct bio *bp) * still valid. */ - if (bp->bio_cmd == BIO_FLUSH) { + switch (bp->bio_cmd) { + case BIO_READ: + auio.uio_rw = UIO_READ; + break; + case BIO_WRITE: + auio.uio_rw = UIO_WRITE; + break; + case BIO_FLUSH: do { (void)vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); @@ -931,11 +921,17 @@ mdstart_vnode(struct md_s *sc, struct bio *bp) vn_finished_write(mp); } while (error == ERELOOKUP); return (error); - } else if (bp->bio_cmd == BIO_DELETE) { - error = vn_deallocate(vp, &off, &len, 0, - sc->flags & MD_ASYNC ? 0 : IO_SYNC, sc->cred, NOCRED); - bp->bio_resid = len; - return (error); + case BIO_DELETE: + if (sc->candelete) { + error = vn_deallocate(vp, &off, &len, 0, + sc->flags & MD_ASYNC ? 0 : IO_SYNC, sc->cred, + NOCRED); + bp->bio_resid = len; + return (error); + } + /* FALLTHROUGH */ + default: + return (EOPNOTSUPP); } auio.uio_offset = (vm_ooffset_t)bp->bio_offset; @@ -983,7 +979,7 @@ unmapped_step: auio.uio_iovcnt = 1; } iostart = auio.uio_offset; - if (auio.uio_rw == UIO_READ) { + if (bp->bio_cmd == BIO_READ) { vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_READ(vp, &auio, 0, sc->cred); VOP_UNLOCK(vp); From nobody Sat Nov 30 16:51:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzX4yffz5fJ2p; Sat, 30 Nov 2024 16:51:04 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzX1jW9z4n8J; Sat, 30 Nov 2024 16:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pXp3785D9chzPuib4mP4ifvRKg2GAtIFiN0YM4MjisM=; b=oqzQ8Q9ij3pOsRJO6YVmotVduIs7zEdLvxAUKK0ZpaBZDtsYw2iK5ZRIfl9w3h9cp8lnCr YkgXfV2q6KCiKbps/RbRueCr4geU0gZbwjDYNyQCMGSVEsPQTSBOifH9DAyva+fbBVkh/c lF+adykOFXqQxPWs72h1tUgUdDIUPkW2N9Uj8c57yvkFAaI+jzaCpg5XHqebfog/pspyzJ GU+m7PrGm7zsAt3Quw703g/zDzbSJw43HCQrM5dwd/mf5ifTh1umQQa0ajVQtGKZPuX++y NipvIc894h1iBFgTAgwlCTZyn+mr3ueHBCwfE2I4BPZVXz3kl0V0b40hzTUsmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pXp3785D9chzPuib4mP4ifvRKg2GAtIFiN0YM4MjisM=; b=qOl7YMdorneBYDiZ8Gm9WPhRL+odRdxHn4olHSxYIvAxpFcLCQRX0NVO4WJqOgtP5h1Bwu l8MqYENxXwngN5DCnorhF0EQSfBKcrfY0FjWoq9eCCEVjivrReR0vZU//2u0E+ioFRtAx5 uqF6duHiKmQosRWh3YvSBrTTv7/vHDNLZMCVY6jiG7QvTZ40fgjAdMUSmMMCr5eXt4Q3lw Vn4wQIOoqzhY7Dvb3Sw1KsZjVSJIAMVcUtmt5qZfDLGJFFlDMLUN8zDVsEFyxxphTwf18M 3KAUS/YPPWNSp1S7DyQWOg5TuAbymoiGfFSvYcd661VNOjTmLSaPmT9Hbj2Lew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985464; a=rsa-sha256; cv=none; b=FHQ2k5EbS/4KbNYuxZbiPFwCwYS1N1TiDC7HuI8qeFjs+g8kFptHC0wycqtGY6ogYhopTu VIWu+/QvdezxX7GQkPJ0cUrWdc5wfcv4qG17+U/VpVrhb/7CiYel/xhkSs/SMWNc9obTuk c0Di7dhbEzu9o3WupjICVjsEX64m/Cfr+h1eZlohmKNLXxMwNhaUSV4xurgVHSammoaPvQ fUm82wYaGkKHNT6d2e1V6THn0xBW1Xizx7JoG5HztCEzzUy+76391/7tqMckYTllxirxLn QH0b4uZLpNcFi+yNxJazoDJFaRY4dmMbmJLPcoge68wnv8N0imsxRl5Pr4xJHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzX1KJ9zG0H; Sat, 30 Nov 2024 16:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGp4Ir043099; Sat, 30 Nov 2024 16:51:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGp4r0043096; Sat, 30 Nov 2024 16:51:04 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:04 GMT Message-Id: <202411301651.4AUGp4r0043096@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8bebcb26763a - stable/14 - speaker: Use standard C bool List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8bebcb26763a8d80c255b2c9367d510e98da17b4 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8bebcb26763a8d80c255b2c9367d510e98da17b4 commit 8bebcb26763a8d80c255b2c9367d510e98da17b4 Author: John Baldwin AuthorDate: 2024-02-05 23:40:34 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 speaker: Use standard C bool Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43717 (cherry picked from commit c83d83206a39c7c47139acac46885bea54ee4876) --- sys/dev/speaker/spkr.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index b1bbfe95510c..2a48f8f3daa8 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -122,12 +122,6 @@ rest(int centisecs) * except possibly at physical block boundaries. */ -#ifndef __bool_true_false_are_defined -typedef int bool; -#endif -#define TRUE 1 -#define FALSE 0 - #define dtoi(c) ((c) - '0') static int octave; /* currently selected octave */ @@ -183,8 +177,8 @@ playinit(void) whole = (100 * SECS_PER_MIN * WHOLE_NOTE) / DFLT_TEMPO; fill = NORMAL; value = DFLT_VALUE; - octtrack = FALSE; - octprefix = TRUE; /* act as though there was an initial O(n) */ + octtrack = false; + octprefix = true; /* act as though there was an initial O(n) */ } /* @@ -281,7 +275,7 @@ playstring(char *cp, size_t slen) pitch -= OCTAVE_NOTES; } } - octprefix = FALSE; + octprefix = false; lastpitch = pitch; /* ...which may in turn be followed by an override time value */ @@ -310,29 +304,29 @@ playstring(char *cp, size_t slen) break; case 'O': if (cp[1] == 'N' || cp[1] == 'n') { - octprefix = octtrack = FALSE; + octprefix = octtrack = false; ++cp; slen--; } else if (cp[1] == 'L' || cp[1] == 'l') { - octtrack = TRUE; + octtrack = true; ++cp; slen--; } else { GETNUM(cp, octave); if (octave >= nitems(pitchtab) / OCTAVE_NOTES) octave = DFLT_OCTAVE; - octprefix = TRUE; + octprefix = true; } break; case '>': if (octave < nitems(pitchtab) / OCTAVE_NOTES - 1) octave++; - octprefix = TRUE; + octprefix = true; break; case '<': if (octave > 0) octave--; - octprefix = TRUE; + octprefix = true; break; case 'N': GETNUM(cp, pitch); @@ -397,7 +391,7 @@ playstring(char *cp, size_t slen) * endtone(), and rest() functions defined above. */ -static int spkr_active = FALSE; /* exclusion flag */ +static bool spkr_active = false; /* exclusion flag */ static char *spkr_inbuf; /* incoming buf */ static int @@ -415,7 +409,7 @@ spkropen(struct cdev *dev, int flags, int fmt, struct thread *td) #endif /* DEBUG */ playinit(); spkr_inbuf = malloc(DEV_BSIZE, M_SPKR, M_WAITOK); - spkr_active = TRUE; + spkr_active = true; return(0); } } @@ -456,7 +450,7 @@ spkrclose(struct cdev *dev, int flags, int fmt, struct thread *td) wakeup(&endtone); wakeup(&endrest); free(spkr_inbuf, M_SPKR); - spkr_active = FALSE; + spkr_active = false; return(0); } From nobody Sat Nov 30 16:51:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzd0wz4z5fJ4l; Sat, 30 Nov 2024 16:51:09 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzc4pcwz4nH0; Sat, 30 Nov 2024 16:51:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i/wjepCmKvBDmz08vOhfa043y7Z62cHSWB+ed07LTZQ=; b=Uf2GWPlSRzdBT0lSlBalpypXS3kUHBAVtS2E8esWLBkDPbxxaZg/okMM+NJtfcFSSUtcLY XnmA46qQVuZdJHmMZiI9wLlMNaBhSl9pxtkHANoHbyui3eVbo9ueAWRAePoEjsmBPnx4qS npeCNh2pjxan65MVvRoSKisSDOfELVdwnM3rjUwST1sFXlMjsg/xiLOXAIvhlghtE3IkbP 0DWojKJlBxtOnCnopDNMY/3S+dojkWikgRF/zBuYXm4JXehgzNEPsy1VTnPvQ5ZeGpaTV8 cL3QwkUZb4eWWHIQiyqrEnWpx0jejbDViOGewNG3zexT+q0sINrwGr851a3HQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i/wjepCmKvBDmz08vOhfa043y7Z62cHSWB+ed07LTZQ=; b=CtCHKaNRZ5d+ShS+WfLG7Lr8fAMNfpww99S09M44P6kMiS0CJ5X560piDMG+6gqrCzRL0N 7KaMxTzFJm5S6ZPkbqwvaPy8wPPHuLqanu78qWrlVtq8tKnplLGEoSsyAieLHiTbzdOu4v ruBmh86Hqja9CdsCDDZ7/WkSdqCeh08eM1vrQtlj7rjHXTojsc8BJYyE1wchuj/cKzr043 Ii4uPsGJ6HoRLRjlA2895CWnXUYZ8/sUPj43FDswh8968ZSHfqTXl+UOxeRApHh+eG/iex yFyyt7+4A3//iqPp7COrsULjoty9u0VnVSkADcOUynm1UNkyTxKExHB2IJdK7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985468; a=rsa-sha256; cv=none; b=uIG7/q/kh+3INURWzIbOvpDpvSTVCINdBBwLx2aJhQl62EUC9IwgclLZukMK0bwZtxItXw HDBk+5ll7NEtd3rLYdPvqauxabKKEKhWu1Gtztq6lQjCs2sDTD2FZbEWnDNTojJVzN0qMi xfkV/PB/VHRSs+UpN2/q5qtM2/d3rWGWHFmhHQCTJDYNtxT95Gu1wdhiHv1yV7df5VDuQC Q/GB7crEdnXER/NmllVf5sDwLVvx00FJ8teQwYXkBV2OHqVEEgVM8HvaK+ssC796OV97lw j72IKBQgD61G9fEEZ01kLWfCffn79lLs2N+5iOMYsmvguFfGdgMBokYKocVZRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzc4R54zGTD; Sat, 30 Nov 2024 16:51:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGp8dJ043345; Sat, 30 Nov 2024 16:51:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGp8LK043342; Sat, 30 Nov 2024 16:51:08 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:08 GMT Message-Id: <202411301651.4AUGp8LK043342@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 5b0997fb617e - stable/14 - cryptocheck: Don't test Chacha20-Poly1305 with an IV size of 8 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5b0997fb617e3af27fb03c6bc5915d9d87fc74e5 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5b0997fb617e3af27fb03c6bc5915d9d87fc74e5 commit 5b0997fb617e3af27fb03c6bc5915d9d87fc74e5 Author: John Baldwin AuthorDate: 2024-05-21 16:42:12 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 cryptocheck: Don't test Chacha20-Poly1305 with an IV size of 8 OpenSSL 3.0+ doesn't support an IV size of 8 either for the Chacha20 stream cipher or the AEAD combination with Poly1305. This did work previously with OpenSSL 1.1. Reviewed by: markj Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D45280 (cherry picked from commit 4ebf794a08de04ebf1c520f07bff3f8fdf48819a) --- tools/tools/crypto/cryptocheck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c index 2db283e4f65b..ef3e225e94f6 100644 --- a/tools/tools/crypto/cryptocheck.c +++ b/tools/tools/crypto/cryptocheck.c @@ -136,7 +136,7 @@ * aes-ccm128 128-bit AES-CCM * aes-ccm192 192-bit AES-CCM * aes-ccm256 256-bit AES-CCM - * chacha20-poly1305 Chacha20 with Poly1305 per RFC 8439 + * chacha20-poly1305 Chacha20 (96 bit nonce) with Poly1305 per RFC 8439 */ #include @@ -253,7 +253,7 @@ static const struct alg { .evp_cipher = EVP_aes_256_ccm }, { .name = "chacha20-poly1305", .cipher = CRYPTO_CHACHA20_POLY1305, .type = T_AEAD, .tag_len = POLY1305_HASH_LEN, - .iv_sizes = { CHACHA20_POLY1305_IV_LEN, 8 }, + .iv_sizes = { CHACHA20_POLY1305_IV_LEN }, .evp_cipher = EVP_chacha20_poly1305 }, }; From nobody Sat Nov 30 16:51:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzf3ZfWz5fHxc; Sat, 30 Nov 2024 16:51:10 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzd5LjSz4nSg; Sat, 30 Nov 2024 16:51:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nzl93lLQrdXKSZjStxy9uBP4hxGjDEkqwbc/GSFccmc=; b=B4+bnoEN6JeTiRWBbfaYP3U1U9OxIC6hZj7xXCnT1Tqe83ruthKDED1i4G3El/PpF67OP5 YbwzricKS4fPUIzJaPwZ3dYPZ8le1jwaEUPasg7vVCd01J03ZrW9pvnX/OodaX6dy66xbn P8UePlZCD5aNvIl1gzxmiguKWcZjfY/8N8bvBgwQcqkr2vYQzzQDM25Xc9X3FWQtP3psiZ ZKYn6lAUMKWJ0GHn1fQ3JAjiUUuFA+tiMhI+Og5Q9x6QDRw6pjIrlvlvR1BehLh5IyV8UX +d155XIjnSC6Y5cYDIonx8pv2b67hUZPFr8NSmtES5Ge9koP8Y3A3QS+AXeA8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nzl93lLQrdXKSZjStxy9uBP4hxGjDEkqwbc/GSFccmc=; b=yRK3hdy1fkznlzZq8ob7xpQTuUdNCq5SIeAYjElUX+8vjsJ3NMPZuvI6dPBzlvuixjq57I 6P2dB5Z1btaeK0RF2Zp0FiztgoZROt/idMnzcWfWQWOj9zXEVhk1k7QMznfuvKggnuc4pX VH/62bESfOZ4iC0KsI+YyughJVqhI5U+GGzvYyY6HWAinpuXnFWZghJpvu1A2O7wQn8Aa3 hiXeEL7vqSsRXp5v0i/zgN8hjDkR4FQAdX9GoRow3ZKvFfv8yu3GnjJn9CqS5aXN3s2MYa yMycCslINN8cYTK+MciOr8nbfmMYelUZejGaiziS8lPNkyLQ3seriLWKwRxYzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985469; a=rsa-sha256; cv=none; b=xoCK0nK0jY7hvmUygGWPZ8k1aaormEartuI/U/yVMDDdwZ0lZllsPFuZcWacuD+hLALBzO /fFInQ+85BT7uA66b/f790HuXBbBD3qVHDwF5KdFCNbeMWj5TlxjsMGI4lqqBNaANf6qJC 2ImC/zOiLIgEid4t3nJI/o6t7BUmdzzuxbbvUOIzAvGlw8XGXqV0xt3/2/bJtuZh/Y3oRY n3HhlCD0FOhZTH8QrH3K5K++erBHwGzP65sH/NxcTyhD6EIKZ/9DhOmbLVFvwOIFMZK+u7 vqbeZLi9Q52OuR2FxeqZZouCICcOqN154FS5vu9f7OrRleiuST1ecicRtYCLQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzd4yHwzFxY; Sat, 30 Nov 2024 16:51:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGp9xS043397; Sat, 30 Nov 2024 16:51:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGp9Nd043394; Sat, 30 Nov 2024 16:51:09 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:09 GMT Message-Id: <202411301651.4AUGp9Nd043394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8b664b8f0ec8 - stable/14 - cryptocheck: Don't treat OpenSSL errors as fatal List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8b664b8f0ec89beff848115444ef09fde677862f Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8b664b8f0ec89beff848115444ef09fde677862f commit 8b664b8f0ec89beff848115444ef09fde677862f Author: John Baldwin AuthorDate: 2024-06-06 21:47:04 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 cryptocheck: Don't treat OpenSSL errors as fatal Abort the current test but keep running additional tests if OpenSSL reports an error during a test. This matches the behavior for other tests such as an error from OCF. Reviewed by: markj Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D45279 (cherry picked from commit b0e7358bf8b9791aaaf38807c841953946b88785) --- tools/tools/crypto/cryptocheck.c | 322 ++++++++++++++++++++++++++------------- 1 file changed, 220 insertions(+), 102 deletions(-) diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c index ef3e225e94f6..6506671455ac 100644 --- a/tools/tools/crypto/cryptocheck.c +++ b/tools/tools/crypto/cryptocheck.c @@ -537,7 +537,7 @@ ocf_hash(const struct alg *alg, const char *buffer, size_t size, char *digest, return (true); } -static void +static bool openssl_hash(const struct alg *alg, const EVP_MD *md, const void *buffer, size_t size, void *digest_out, unsigned *digest_sz_out) { @@ -564,11 +564,12 @@ openssl_hash(const struct alg *alg, const EVP_MD *md, const void *buffer, goto err_out; EVP_MD_CTX_destroy(mdctx); - return; + return (true); err_out: - errx(1, "OpenSSL %s HASH failed%s: %s", alg->name, errs, + warnx("OpenSSL %s HASH failed%s: %s", alg->name, errs, ERR_error_string(ERR_get_error(), NULL)); + return (false); } static void @@ -590,7 +591,8 @@ run_hash_test(const struct alg *alg, size_t size) /* OpenSSL HASH. */ digest_len = sizeof(control_digest); - openssl_hash(alg, md, buffer, size, control_digest, &digest_len); + if (!openssl_hash(alg, md, buffer, size, control_digest, &digest_len)) + goto out; /* cryptodev HASH. */ if (!ocf_hash(alg, buffer, size, test_digest, &crid)) @@ -671,9 +673,11 @@ run_hmac_test(const struct alg *alg, size_t size) /* OpenSSL HMAC. */ digest_len = sizeof(control_digest); if (HMAC(md, key, key_len, (u_char *)buffer, size, - (u_char *)control_digest, &digest_len) == NULL) - errx(1, "OpenSSL %s (%zu) HMAC failed: %s", alg->name, + (u_char *)control_digest, &digest_len) == NULL) { + warnx("OpenSSL %s (%zu) HMAC failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto out; + } /* cryptodev HMAC. */ if (!ocf_hmac(alg, buffer, size, key, key_len, test_digest, &crid)) @@ -700,7 +704,7 @@ out: free(key); } -static void +static bool openssl_cipher(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, const char *iv, const char *input, char *output, size_t size, int enc) { @@ -708,27 +712,42 @@ openssl_cipher(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, int outl, total; ctx = EVP_CIPHER_CTX_new(); - if (ctx == NULL) - errx(1, "OpenSSL %s (%zu) ctx new failed: %s", alg->name, + if (ctx == NULL) { + warnx("OpenSSL %s (%zu) ctx new failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + return (false); + } if (EVP_CipherInit_ex(ctx, cipher, NULL, (const u_char *)key, - (const u_char *)iv, enc) != 1) - errx(1, "OpenSSL %s (%zu) ctx init failed: %s", alg->name, + (const u_char *)iv, enc) != 1) { + warnx("OpenSSL %s (%zu) ctx init failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } EVP_CIPHER_CTX_set_padding(ctx, 0); if (EVP_CipherUpdate(ctx, (u_char *)output, &outl, - (const u_char *)input, size) != 1) - errx(1, "OpenSSL %s (%zu) cipher update failed: %s", alg->name, + (const u_char *)input, size) != 1) { + warnx("OpenSSL %s (%zu) cipher update failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } total = outl; - if (EVP_CipherFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) - errx(1, "OpenSSL %s (%zu) cipher final failed: %s", alg->name, + if (EVP_CipherFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) { + warnx("OpenSSL %s (%zu) cipher final failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } total += outl; - if ((size_t)total != size) - errx(1, "OpenSSL %s (%zu) cipher size mismatch: %d", alg->name, + if ((size_t)total != size) { + warnx("OpenSSL %s (%zu) cipher size mismatch: %d", alg->name, size, total); + goto error; + } + EVP_CIPHER_CTX_free(ctx); + return (true); + +error: EVP_CIPHER_CTX_free(ctx); + return (false); } static bool @@ -808,22 +827,27 @@ run_cipher_test(const struct alg *alg, size_t size) ciphertext = malloc(size); /* OpenSSL cipher. */ - openssl_cipher(alg, cipher, key, iv, cleartext, ciphertext, size, 1); - if (size > 0 && memcmp(cleartext, ciphertext, size) == 0) + if (!openssl_cipher(alg, cipher, key, iv, cleartext, ciphertext, size, + 1)) + goto out_noocf; + if (size > 0 && memcmp(cleartext, ciphertext, size) == 0) { warnx("OpenSSL %s (%zu): cipher text unchanged", alg->name, size); - openssl_cipher(alg, cipher, key, iv, ciphertext, buffer, size, 0); + goto out_noocf; + } + if (!openssl_cipher(alg, cipher, key, iv, ciphertext, buffer, size, 0)) + goto out_noocf; if (memcmp(cleartext, buffer, size) != 0) { printf("OpenSSL %s (%zu): cipher mismatch:", alg->name, size); printf("original:\n"); hexdump(cleartext, size, NULL, 0); printf("decrypted:\n"); hexdump(buffer, size, NULL, 0); - exit(1); + goto out_noocf; } if (!ocf_init_cipher_session(alg, key, key_len, &ses)) - goto out; + goto out_noocf; /* OCF encrypt. */ if (!ocf_cipher(&ses, alg, iv, cleartext, buffer, size, COP_ENCRYPT)) @@ -855,6 +879,7 @@ run_cipher_test(const struct alg *alg, size_t size) out: ocf_destroy_session(&ses); +out_noocf: free(ciphertext); free(buffer); free(cleartext); @@ -970,21 +995,26 @@ run_eta_test(const struct alg *alg, size_t aad_len, size_t size) /* OpenSSL encrypt + HMAC. */ if (aad_len != 0) memcpy(ciphertext, cleartext, aad_len); - openssl_cipher(alg, cipher, cipher_key, iv, cleartext + aad_len, - ciphertext + aad_len, size, 1); + if (!openssl_cipher(alg, cipher, cipher_key, iv, cleartext + aad_len, + ciphertext + aad_len, size, 1)) + goto out_noocf; if (size > 0 && memcmp(cleartext + aad_len, ciphertext + aad_len, - size) == 0) + size) == 0) { warnx("OpenSSL %s (%zu, %zu): cipher text unchanged", alg->name, aad_len, size); + goto out_noocf; + } digest_len = sizeof(control_digest); if (HMAC(md, auth_key, auth_key_len, (u_char *)ciphertext, - aad_len + size, (u_char *)control_digest, &digest_len) == NULL) - errx(1, "OpenSSL %s (%zu, %zu) HMAC failed: %s", alg->name, + aad_len + size, (u_char *)control_digest, &digest_len) == NULL) { + warnx("OpenSSL %s (%zu, %zu) HMAC failed: %s", alg->name, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto out_noocf; + } if (!ocf_init_eta_session(alg, cipher_key, cipher_key_len, auth_key, auth_key_len, &ses)) - goto out; + goto out_noocf; /* OCF encrypt + HMAC. */ error = ocf_eta(&ses, iv, iv_len, aad_len != 0 ? cleartext : NULL, @@ -1060,6 +1090,7 @@ run_eta_test(const struct alg *alg, size_t aad_len, size_t size) out: ocf_destroy_session(&ses); +out_noocf: free(ciphertext); free(buffer); free(cleartext); @@ -1068,7 +1099,7 @@ out: free(cipher_key); } -static void +static bool openssl_gmac(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, const char *iv, const char *input, size_t size, char *tag) { @@ -1076,26 +1107,41 @@ openssl_gmac(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, int outl; ctx = EVP_CIPHER_CTX_new(); - if (ctx == NULL) - errx(1, "OpenSSL %s (%zu) ctx new failed: %s", alg->name, + if (ctx == NULL) { + warnx("OpenSSL %s (%zu) ctx new failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + return (false); + } if (EVP_EncryptInit_ex(ctx, cipher, NULL, (const u_char *)key, - (const u_char *)iv) != 1) - errx(1, "OpenSSL %s (%zu) ctx init failed: %s", alg->name, + (const u_char *)iv) != 1) { + warnx("OpenSSL %s (%zu) ctx init failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } EVP_CIPHER_CTX_set_padding(ctx, 0); if (EVP_EncryptUpdate(ctx, NULL, &outl, (const u_char *)input, - size) != 1) - errx(1, "OpenSSL %s (%zu) update failed: %s", + size) != 1) { + warnx("OpenSSL %s (%zu) update failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_EncryptFinal_ex(ctx, NULL, &outl) != 1) - errx(1, "OpenSSL %s (%zu) final failed: %s", alg->name, + goto error; + } + if (EVP_EncryptFinal_ex(ctx, NULL, &outl) != 1) { + warnx("OpenSSL %s (%zu) final failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, alg->tag_len, - tag) != 1) - errx(1, "OpenSSL %s (%zu) get tag failed: %s", alg->name, + tag) != 1) { + warnx("OpenSSL %s (%zu) get tag failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } EVP_CIPHER_CTX_free(ctx); + return (true); + +error: + EVP_CIPHER_CTX_free(ctx); + return (false); } static bool @@ -1154,7 +1200,8 @@ run_gmac_test(const struct alg *alg, size_t size) buffer = alloc_buffer(size); /* OpenSSL GMAC. */ - openssl_gmac(alg, cipher, key, iv, buffer, size, control_tag); + if (!openssl_gmac(alg, cipher, key, iv, buffer, size, control_tag)) + goto out; /* OCF GMAC. */ if (!ocf_mac(alg, buffer, size, key, key_len, iv, test_tag, &crid)) @@ -1178,7 +1225,7 @@ out: free(key); } -static void +static bool openssl_digest(const struct alg *alg, const char *key, u_int key_len, const char *input, size_t size, char *tag, u_int tag_len) { @@ -1187,25 +1234,42 @@ openssl_digest(const struct alg *alg, const char *key, u_int key_len, size_t len; pkey = EVP_PKEY_new_raw_private_key(alg->pkey, NULL, key, key_len); - if (pkey == NULL) - errx(1, "OpenSSL %s (%zu) pkey new failed: %s", alg->name, + if (pkey == NULL) { + warnx("OpenSSL %s (%zu) pkey new failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + return (false); + } mdctx = EVP_MD_CTX_new(); - if (mdctx == NULL) - errx(1, "OpenSSL %s (%zu) ctx new failed: %s", alg->name, + if (mdctx == NULL) { + warnx("OpenSSL %s (%zu) ctx new failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_DigestSignInit(mdctx, NULL, NULL, NULL, pkey) != 1) - errx(1, "OpenSSL %s (%zu) digest sign init failed: %s", + EVP_PKEY_free(pkey); + return (false); + } + if (EVP_DigestSignInit(mdctx, NULL, NULL, NULL, pkey) != 1) { + warnx("OpenSSL %s (%zu) digest sign init failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_DigestSignUpdate(mdctx, input, size) != 1) - errx(1, "OpenSSL %s (%zu) digest update failed: %s", alg->name, + goto error; + } + if (EVP_DigestSignUpdate(mdctx, input, size) != 1) { + warnx("OpenSSL %s (%zu) digest update failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } len = tag_len; - if (EVP_DigestSignFinal(mdctx, tag, &len) != 1) - errx(1, "OpenSSL %s (%zu) digest final failed: %s", alg->name, + if (EVP_DigestSignFinal(mdctx, tag, &len) != 1) { + warnx("OpenSSL %s (%zu) digest final failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } EVP_MD_CTX_free(mdctx); EVP_PKEY_free(pkey); + return (true); + +error: + EVP_MD_CTX_free(mdctx); + EVP_PKEY_free(pkey); + return (false); } static void @@ -1225,8 +1289,9 @@ run_digest_test(const struct alg *alg, size_t size) buffer = alloc_buffer(size); /* OpenSSL Poly1305. */ - openssl_digest(alg, key, key_len, buffer, size, control_tag, - sizeof(control_tag)); + if (!openssl_digest(alg, key, key_len, buffer, size, control_tag, + sizeof(control_tag))) + goto out; /* OCF Poly1305. */ if (!ocf_mac(alg, buffer, size, key, key_len, NULL, test_tag, &crid)) @@ -1249,7 +1314,7 @@ out: free(key); } -static void +static bool openssl_aead_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, const char *iv, size_t iv_len, const char *aad, size_t aad_len, const char *input, char *output, size_t size, char *tag) @@ -1258,44 +1323,68 @@ openssl_aead_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, int outl, total; ctx = EVP_CIPHER_CTX_new(); - if (ctx == NULL) - errx(1, "OpenSSL %s (%zu) ctx new failed: %s", alg->name, + if (ctx == NULL) { + warnx("OpenSSL %s (%zu) ctx new failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) - errx(1, "OpenSSL %s (%zu) ctx init failed: %s", alg->name, + return (false); + } + if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) { + warnx("OpenSSL %s (%zu) ctx init failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, NULL) != 1) - errx(1, "OpenSSL %s (%zu) setting iv length failed: %s", alg->name, + goto error; + } + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, NULL) != + 1) { + warnx("OpenSSL %s (%zu) setting iv length failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } if (EVP_EncryptInit_ex(ctx, NULL, NULL, (const u_char *)key, - (const u_char *)iv) != 1) - errx(1, "OpenSSL %s (%zu) ctx init failed: %s", alg->name, + (const u_char *)iv) != 1) { + warnx("OpenSSL %s (%zu) ctx init failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } EVP_CIPHER_CTX_set_padding(ctx, 0); if (aad != NULL) { if (EVP_EncryptUpdate(ctx, NULL, &outl, (const u_char *)aad, - aad_len) != 1) - errx(1, "OpenSSL %s (%zu) aad update failed: %s", + aad_len) != 1) { + warnx("OpenSSL %s (%zu) aad update failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } } if (EVP_EncryptUpdate(ctx, (u_char *)output, &outl, - (const u_char *)input, size) != 1) - errx(1, "OpenSSL %s (%zu) encrypt update failed: %s", alg->name, + (const u_char *)input, size) != 1) { + warnx("OpenSSL %s (%zu) encrypt update failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } total = outl; - if (EVP_EncryptFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) - errx(1, "OpenSSL %s (%zu) encrypt final failed: %s", alg->name, + if (EVP_EncryptFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) { + warnx("OpenSSL %s (%zu) encrypt final failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } total += outl; - if ((size_t)total != size) - errx(1, "OpenSSL %s (%zu) encrypt size mismatch: %d", alg->name, + if ((size_t)total != size) { + warnx("OpenSSL %s (%zu) encrypt size mismatch: %d", alg->name, size, total); + goto error; + } if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, alg->tag_len, - tag) != 1) - errx(1, "OpenSSL %s (%zu) get tag failed: %s", alg->name, + tag) != 1) { + warnx("OpenSSL %s (%zu) get tag failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } + EVP_CIPHER_CTX_free(ctx); + return (true); + +error: EVP_CIPHER_CTX_free(ctx); + return (false); } #ifdef notused @@ -1343,7 +1432,7 @@ openssl_aead_decrypt(const struct alg *alg, const EVP_CIPHER *cipher, } #endif -static void +static bool openssl_ccm_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, const char *iv, size_t iv_len, const char *aad, size_t aad_len, const char *input, char *output, size_t size, char *tag) @@ -1352,63 +1441,88 @@ openssl_ccm_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, int outl, total; ctx = EVP_CIPHER_CTX_new(); - if (ctx == NULL) - errx(1, "OpenSSL %s/%zu (%zu, %zu) ctx new failed: %s", + if (ctx == NULL) { + warnx("OpenSSL %s/%zu (%zu, %zu) ctx new failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) - errx(1, "OpenSSL %s/%zu (%zu, %zu) ctx init failed: %s", + return (false); + } + if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) ctx init failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, NULL) != 1) - errx(1, - "OpenSSL %s/%zu (%zu, %zu) setting iv length failed: %s", + goto error; + } + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, NULL) != + 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) setting iv length failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, AES_CBC_MAC_HASH_LEN, NULL) != 1) - errx(1, - "OpenSSL %s/%zu (%zu, %zu) setting tag length failed: %s", + goto error; + } + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, AES_CBC_MAC_HASH_LEN, + NULL) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) setting tag length failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } if (EVP_EncryptInit_ex(ctx, NULL, NULL, (const u_char *)key, - (const u_char *)iv) != 1) - errx(1, "OpenSSL %s/%zu (%zu, %zu) ctx init failed: %s", + (const u_char *)iv) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) ctx init failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_EncryptUpdate(ctx, NULL, &outl, NULL, size) != 1) - errx(1, - "OpenSSL %s/%zu (%zu, %zu) unable to set data length: %s", + goto error; + } + if (EVP_EncryptUpdate(ctx, NULL, &outl, NULL, size) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) unable to set data length: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } if (aad != NULL) { if (EVP_EncryptUpdate(ctx, NULL, &outl, (const u_char *)aad, - aad_len) != 1) - errx(1, - "OpenSSL %s/%zu (%zu, %zu) aad update failed: %s", + aad_len) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) aad update failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } } if (EVP_EncryptUpdate(ctx, (u_char *)output, &outl, - (const u_char *)input, size) != 1) - errx(1, "OpenSSL %s/%zu (%zu, %zu) encrypt update failed: %s", + (const u_char *)input, size) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) encrypt update failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } total = outl; - if (EVP_EncryptFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) - errx(1, "OpenSSL %s/%zu (%zu, %zu) encrypt final failed: %s", + if (EVP_EncryptFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) encrypt final failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } total += outl; - if ((size_t)total != size) - errx(1, "OpenSSL %s/%zu (%zu, %zu) encrypt size mismatch: %d", + if ((size_t)total != size) { + warnx("OpenSSL %s/%zu (%zu, %zu) encrypt size mismatch: %d", alg->name, iv_len, aad_len, size, total); + goto error; + } if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, AES_CBC_MAC_HASH_LEN, - tag) != 1) - errx(1, "OpenSSL %s/%zu (%zu, %zu) get tag failed: %s", + tag) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) get tag failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } + EVP_CIPHER_CTX_free(ctx); + return (true); + +error: EVP_CIPHER_CTX_free(ctx); + return (false); } static bool @@ -1490,6 +1604,7 @@ run_aead_test(const struct alg *alg, size_t aad_len, size_t size, u_int key_len; int error; char control_tag[AEAD_MAX_TAG_LEN], test_tag[AEAD_MAX_TAG_LEN]; + bool ok; cipher = alg->evp_cipher(); if (size % EVP_CIPHER_block_size(cipher) != 0) { @@ -1526,14 +1641,16 @@ run_aead_test(const struct alg *alg, size_t aad_len, size_t size, /* OpenSSL encrypt */ if (EVP_CIPHER_mode(cipher) == EVP_CIPH_CCM_MODE) - openssl_ccm_encrypt(alg, cipher, key, iv, iv_len, aad, + ok = openssl_ccm_encrypt(alg, cipher, key, iv, iv_len, aad, aad_len, cleartext, ciphertext, size, control_tag); else - openssl_aead_encrypt(alg, cipher, key, iv, iv_len, aad, + ok = openssl_aead_encrypt(alg, cipher, key, iv, iv_len, aad, aad_len, cleartext, ciphertext, size, control_tag); + if (!ok) + goto out_noocf; if (!ocf_init_aead_session(alg, key, key_len, iv_len, &ses)) - goto out; + goto out_noocf; /* OCF encrypt */ error = ocf_aead(&ses, iv, iv_len, aad, aad_len, cleartext, buffer, @@ -1602,6 +1719,7 @@ run_aead_test(const struct alg *alg, size_t aad_len, size_t size, out: ocf_destroy_session(&ses); +out_noocf: free(aad); free(ciphertext); free(buffer); From nobody Sat Nov 30 16:51:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzb6rJ9z5fJ4k; Sat, 30 Nov 2024 16:51:07 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzb3nZxz4nSb; Sat, 30 Nov 2024 16:51:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFIl3nP1T1W/WDlXXokrUiHAlh+RubMA+fba8jhMtS8=; b=lpUl2gUxRr7cMpPFeow5/H/9xHDFLrfOHCF0LQW57NTXFnwwmqYzE3Vs7i4Xk8zQ8W840b Lx4SdtvEPm4uXVjicAXqKxkFMJGDdrbaLBEgA23exKweR5ftepDfVgU6B3wuJlp537/0JT gE0phUTnb25yWwtVsrEtOwhPCv5194kX1QXlJpbm5wWZFy4XVvarPxlgFoTSRy4i7SLg8c Z5RlmOPprqBO4ztlInNo70u36qvwQ9uYhFbODZIQSf/iNCPXBMEqbAt7HkZ12yuNuua2GA P5ZApEiIWtkyI6DQaYmIxyi2IFHE9WvQ1l0DX7Z9iw3cE5+94ZZXA22sVBazWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFIl3nP1T1W/WDlXXokrUiHAlh+RubMA+fba8jhMtS8=; b=V3taq7fWy/qooPjlXYdqklIlO1UTIzIG5Npqdc+4lkflYFH/nq3EpGkRNkeGKl11pg4Oh4 F8+LYfEmWkBHk+9v4SFYDq/ErjKSVz4KPaCqBwjtrN8lN6w7XbjoDheKIuxVkjQgLVnuSS zN6t2p+yGC6WwxLXNbbIYF3pNUEDTUdRA5yjbESzpIiojjfCPlQ6b0MvWs5VnS+R+RyyYd BXittsF09o9xxE3r2ppTiNf2D6ZQ3TPrCODQPgwZnqbzKzjN2CBX21GqkXKOee5YdzIZoB iiFpxKIUS8TsjggHD7/0qUw1D38vC5HFTyFCLDQH8ulHt2yCDbV2hsNaX2Lqdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985467; a=rsa-sha256; cv=none; b=xPkRcEstMJFO95aZ/pAAbH2WZHBJfWwdV8OUXqUPeaITVrHFztwuDt95crxsMIiD2fk31O 6eOawA5YKb06F2KNmHIfUcu2TXJ8kHFFLfe8cYFFoKO3E91uNWtIRjgGcm4kfeYPy4ShgP 0Fh8sO2IQOvgWmIUrOghMfmKp+8KuLRBlZAfdMkEGGuupyENck2tldJE8NbcBQGnPeKscp ok5JF7vb3MRDV9hvfwUh3ww+hvWYo4ontK1/r9Kdo/+vuBC4x4WrHL4amn3Mhby4dKtX0C 3D0FQeB2wccn0MhjrRcK2JqtYnc7U0iC/uOXvec51aoi72QsQLHPe8/5rvNhSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzb3PXYzGNj; Sat, 30 Nov 2024 16:51:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGp7wF043274; Sat, 30 Nov 2024 16:51:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGp7vV043271; Sat, 30 Nov 2024 16:51:07 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:07 GMT Message-Id: <202411301651.4AUGp7vV043271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d95675349a67 - stable/14 - linuxkpi: Provide a non-NULL value for THIS_MODULE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d95675349a67b884db47b7861191bc3246a0d772 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d95675349a67b884db47b7861191bc3246a0d772 commit d95675349a67b884db47b7861191bc3246a0d772 Author: Austin Shafer AuthorDate: 2024-03-06 17:48:07 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 linuxkpi: Provide a non-NULL value for THIS_MODULE THIS_MODULE is used to differentiate modules on Linux. We currently completely stub out any Linux struct module usage, but THIS_MODULE is still used to populate the "owner" fields of various drivers. Even though we don't actually dereference these "owner" fields they are still used by drivers to check if devices/dmabufs/etc come from different modules. For example, during DRM GEM import some drivers check if the dmabuf's owner matches the dev's owner. If they match because they are both NULL drivers may incorrectly think two resources come from the same module. This adds a general purpose __this_linker_file which will point to the linker file of the module that uses it. We can then use that pointer to have a valid value for THIS_MODULE. Reviewed by: bz, jhb Differential Revision: https://reviews.freebsd.org/D44306 (cherry picked from commit 28a59100b54ff245a45fbd328266266f1c14eb8c) --- sys/compat/linuxkpi/common/include/linux/module.h | 21 +++++++++++++++++++++ sys/kern/kern_linker.c | 14 ++++++++++++++ sys/sys/linker.h | 6 ++++++ 3 files changed, 41 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/module.h b/sys/compat/linuxkpi/common/include/linux/module.h index 3018ba2fb8a4..df34843657db 100644 --- a/sys/compat/linuxkpi/common/include/linux/module.h +++ b/sys/compat/linuxkpi/common/include/linux/module.h @@ -33,6 +33,8 @@ #include #include #include +#include +#include #include #include @@ -52,7 +54,26 @@ #define MODULE_SUPPORTED_DEVICE(name) #define MODULE_IMPORT_NS(_name) +/* + * THIS_MODULE is used to differentiate modules on Linux. We currently + * completely stub out any Linux struct module usage, but THIS_MODULE is still + * used to populate the "owner" fields of various drivers. Even though we + * don't actually dereference these "owner" fields they are still used by + * drivers to check if devices/dmabufs/etc come from different modules. For + * example, during DRM GEM import some drivers check if the dmabuf's owner + * matches the dev's owner. If they match because they are both NULL drivers + * may incorrectly think two resources come from the same module. + * + * To handle this we specify an undefined symbol __this_linker_file, which + * will get special treatment from the linker when resolving. This will + * populate the usages of __this_linker_file with the linker_file_t of the + * module. + */ +#ifdef KLD_MODULE +#define THIS_MODULE ((struct module *)&__this_linker_file) +#else #define THIS_MODULE ((struct module *)0) +#endif #define __MODULE_STRING(x) __stringify(x) diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index 53a743f29459..a04dd4cec563 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -849,6 +849,20 @@ linker_file_lookup_symbol_internal(linker_file_t file, const char *name, KLD_DPF(SYM, ("linker_file_lookup_symbol: file=%p, name=%s, deps=%d\n", file, name, deps)); + /* + * Treat the __this_linker_file as a special symbol. This is a + * global that linuxkpi uses to populate the THIS_MODULE + * value. In this case we can simply return the linker_file_t. + * + * Modules compiled statically into the kernel are assigned NULL. + */ + if (strcmp(name, "__this_linker_file") == 0) { + address = (file == linker_kernel_file) ? NULL : (caddr_t)file; + KLD_DPF(SYM, ("linker_file_lookup_symbol: resolving special " + "symbol __this_linker_file to %p\n", address)); + return (address); + } + if (LINKER_LOOKUP_SYMBOL(file, name, &sym) == 0) { LINKER_SYMBOL_VALUES(file, sym, &symval); if (symval.value == 0) diff --git a/sys/sys/linker.h b/sys/sys/linker.h index e9073dab236c..664df2147bec 100644 --- a/sys/sys/linker.h +++ b/sys/sys/linker.h @@ -132,6 +132,12 @@ typedef int linker_predicate_t(linker_file_t, void *); */ extern linker_file_t linker_kernel_file; +/* + * Special symbol which will be replaced by a reference to the linker_file_t + * of the module it is used in. + */ +extern linker_file_t __this_linker_file; + /* * Obtain a reference to a module, loading it if required. */ From nobody Sat Nov 30 16:51:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzh4764z5fHrV; Sat, 30 Nov 2024 16:51:12 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzg6sXHz4nH7; Sat, 30 Nov 2024 16:51:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ebYxR223X7pnNZ3YMbF/KhJeOXveEwpe6fXc9AQ/E2o=; b=M4e7NDIy4cSLWgfaZQpfOEvj2ekdA9DybFWi51i8dXXlyQZbUNQAPfFS2YxmGl9YVhOCLZ kYjVkEh7PsjNTO31Jnt19QiI4fwz8rdmxYW031Lp4++uvpLayN8M4ZlI33we6i9PEOB7U9 XJKUUPUwtLLolUf8hYap5xofOyeuaXgLLAOzhU+7Otw3yBJ8H4X+XFFNlqxOFB28GnKkR5 OFHL3Xi8UDU3hluZW9PLDNMgh3z6qZ9NiJfdU5TR85evjkSsgz7TfhRXsZrdGYvxbwjhHb qDSqu/gKd057QquSNu3jYbLeU6BCLqxa9SOfAtBbh4r67ZCYL2wYAL1drzrT+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ebYxR223X7pnNZ3YMbF/KhJeOXveEwpe6fXc9AQ/E2o=; b=hiab9MKS5PIuIPTYwx4j04pRqqzJ+1Pcd7Afwr7jGnfK8joarW322VGWRX3qrFbNkCrM5L lKSAPxma0R2c5BYbVQwOC5VQ3WQzKkFUZqT+5KcTInz5DpdybUKcbMVCOhFnExxxdX8oMp 8PCjn2mjRLWSo6Cqm53TzaIoAk8ZhleDKsOEixkjvjzZmluHdxWZblEqPvX2VXK6neL8U2 FeiVmEzZm+DuBpQ8gGHvsdDCtynqUoLwJOgprgPEXil8w2flbo8fYvtqD9HcCfFxvQtVKH TjlVGfrC1j3Z5pfZw9p+svedW/KFBE4TQrB808NyRuDkYM9kZ4vavnvwDkmqHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985472; a=rsa-sha256; cv=none; b=K7hKBL5mB0qewfQ8wV0C0zrc+HdCU7QIZ36PBEyiTo5k4SS8H9O+4zUxOyDtnjsgw2rNi/ kVzx5AmntNAdfZXIf3BkRdrmA2A5HRiDrAirxi0z0NtAgpB/7C9OX7BZ/ksm4uUMwNoop+ qWknjK7uRIIi5C3hFeeDqnKOFeqHLlTcL61qpiYR9sUhX/z+EcHmpezSZUZY1L9RDrNVhG 1QHbCez6pXmtDD2vzkhJo/WC9T7YdEWMkbX1dW8xH2tn3MIrEosgKWSVfFeBwXIGy1J4B5 vsFWeJTfvKywilKKGGkfFxLPg8Yf/pK8t67slqubMaVBmFDy29/SfvCESxrCtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzg6TlSzGNk; Sat, 30 Nov 2024 16:51:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpBYH043480; Sat, 30 Nov 2024 16:51:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpBv9043477; Sat, 30 Nov 2024 16:51:11 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:11 GMT Message-Id: <202411301651.4AUGpBv9043477@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b4bbdf56a700 - stable/14 - splash(4): Subject/verb agreement List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b4bbdf56a70094e7834784ec7ffa4ae0929f680c Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b4bbdf56a70094e7834784ec7ffa4ae0929f680c commit b4bbdf56a70094e7834784ec7ffa4ae0929f680c Author: John Baldwin AuthorDate: 2024-07-15 13:59:57 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 splash(4): Subject/verb agreement (cherry picked from commit e5a18aa2373b9446fd93622acf6a8a7ba10e2589) --- share/man/man4/splash.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4 index d7123bf6efd9..8de18434c52f 100644 --- a/share/man/man4/splash.4 +++ b/share/man/man4/splash.4 @@ -305,7 +305,7 @@ and modules were written by .An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . .Sh CAVEATS -The screen saver work with +The screen saver works with .Xr syscons 4 only. .Sh BUGS From nobody Sat Nov 30 16:51:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzk316Sz5fHrp; Sat, 30 Nov 2024 16:51:14 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzk29xQz4nT7; Sat, 30 Nov 2024 16:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ts/Ao/oNy9uLt1TICMt/e0xrK+haPXvFq8KYFDBG9L4=; b=EsDEne0MfGtHy037nBpP6cdi0VcB9a9VWcux0TTIh46I9I7ZFxPbG6S2bpuMLZeC7EbSEr XT/NHcrrL0Jc7wxRW8gFoFxGYAU+NUpJij1bZxpBl3F2QdoQB7xTUvMuRRb2zsNh3oCaYR +COsvxdaQiDAjdk/0MENT10GBzSiw5znh5xvo0R7+62b6dkeGgy34spee4OjMEAfSN41Xp BeGUWf175M9myPtcYURRtVb8DB1EwynIe8DXR9wJhNSLqLH4iUlR8zCCPoZ0xHZndMmueA Nu1fxjsd0uMmQpnZka/uLDxrYTk/X5o9kobH3W9583ZOUVN8qH1rWVMgUilafg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ts/Ao/oNy9uLt1TICMt/e0xrK+haPXvFq8KYFDBG9L4=; b=gijGdDBu34I3R3S+QRXLpD8tCTm7zgpDWQ/GgVzomciQWS7BbCk+JhfvCCIvN/Fdg3Ms4Z qsSOSPBJ8QGxnWTpH7iyxVCCSV1cQmJPNI3p1SWBY+tuLAFxjiE2JO0ylH9iCDFPqJUBC4 TxpaQW+QVJ0aGaUhL7KShE3F8l4gUx2UuBx2q88fw+26AQXtgHq5xUXxhbIG3nmo20X/Ga Mr/FYL5ZIynmls4LKvmcIs9xas/JTqEUOrwhMQMtS9FLYF4X2kCahou0WlUUtMoattEERc B28634Ka+QKF03lOTi6ejkr85Te90ShOx12VOxak7oCj+fC+NAzqcvwF1+5/TQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985474; a=rsa-sha256; cv=none; b=TnpyJ6YyO+avQPh0OuM5sOkpgLT4Mq/dK7COhL/BSxCNhP0lNJBQhef5YLU5YQpo4z3SLb 0dHWjijeVQI2FjFhV17RK5CNxSpF7axLkaKLLvxT9a1BJS+3a3m1KQ1u0BJ/kzvbApWbzS zi9D4Qv6LMO96q0ixT3rnucWkdk4WZUd6O1XqSfSZyv7Vv6Ey7bqtleW3Fbqt2RQu85KrI Z0sXhtn6KSDJ5ZKef9Gf7H3JBE9xa6B97xU4U9H+YkaAdWbMtJ3QRWO5c4YGALC1Jy1Q1Y xkmYuLtl15SokbaFqYo/89RPPeyTzWilKWqfCw4LIfQrIgO1IglNqbldUwQQ8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzk1VV5zFxc; Sat, 30 Nov 2024 16:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpE9g043596; Sat, 30 Nov 2024 16:51:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpEYd043593; Sat, 30 Nov 2024 16:51:14 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:14 GMT Message-Id: <202411301651.4AUGpEYd043593@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 27c7ae36be0f - stable/14 - libcasper: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 27c7ae36be0f2e9e06701e9cd1b8383a1b125edc Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=27c7ae36be0f2e9e06701e9cd1b8383a1b125edc commit 27c7ae36be0f2e9e06701e9cd1b8383a1b125edc Author: John Baldwin AuthorDate: 2024-07-19 17:01:40 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 libcasper: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46005 (cherry picked from commit 5275d1ddb42dc70fb87925e59445059068c08271) --- lib/libcasper/services/cap_dns/cap_dns.c | 4 ++-- lib/libcasper/services/cap_net/cap_net.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libcasper/services/cap_dns/cap_dns.c b/lib/libcasper/services/cap_dns/cap_dns.c index 84b49e1d2081..8681f0baef40 100644 --- a/lib/libcasper/services/cap_dns/cap_dns.c +++ b/lib/libcasper/services/cap_dns/cap_dns.c @@ -84,7 +84,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_length = (int)nvlist_get_number(nvl, "length"); nitems = (unsigned int)nvlist_get_number(nvl, "naliases"); - hp->h_aliases = calloc(sizeof(hp->h_aliases[0]), nitems + 1); + hp->h_aliases = calloc(nitems + 1, sizeof(hp->h_aliases[0])); if (hp->h_aliases == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { @@ -98,7 +98,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_aliases[ii] = NULL; nitems = (unsigned int)nvlist_get_number(nvl, "naddrs"); - hp->h_addr_list = calloc(sizeof(hp->h_addr_list[0]), nitems + 1); + hp->h_addr_list = calloc(nitems + 1, sizeof(hp->h_addr_list[0])); if (hp->h_addr_list == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { diff --git a/lib/libcasper/services/cap_net/cap_net.c b/lib/libcasper/services/cap_net/cap_net.c index a8f039f81843..40d18319ae28 100644 --- a/lib/libcasper/services/cap_net/cap_net.c +++ b/lib/libcasper/services/cap_net/cap_net.c @@ -105,7 +105,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_length = (int)nvlist_get_number(nvl, "length"); nitems = (unsigned int)nvlist_get_number(nvl, "naliases"); - hp->h_aliases = calloc(sizeof(hp->h_aliases[0]), nitems + 1); + hp->h_aliases = calloc(nitems + 1, sizeof(hp->h_aliases[0])); if (hp->h_aliases == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { @@ -119,7 +119,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_aliases[ii] = NULL; nitems = (unsigned int)nvlist_get_number(nvl, "naddrs"); - hp->h_addr_list = calloc(sizeof(hp->h_addr_list[0]), nitems + 1); + hp->h_addr_list = calloc(nitems + 1, sizeof(hp->h_addr_list[0])); if (hp->h_addr_list == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { From nobody Sat Nov 30 16:51:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzm4p1qz5fJ9f; Sat, 30 Nov 2024 16:51:16 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzm3HCSz4nTX; Sat, 30 Nov 2024 16:51:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NjlRx9pdxZ3cYi90G9RBgTvfIjhGz1tlpWy7WP8bXNE=; b=lQBqYCb3oMN4XJmh1W9UWAV74U8+UdEoOk7D4+a4kghoFm5GWf0Ae61Gsr8lcMMSgyalQP N1+Lp+9OIsHuBShIDnXEzZ3ycNM/m3ebQlZoHpmgmWAeqiU/4pNZXKKxgIUwePf/bjMgKP RT0ZPZUIDKWYO6yKnzEFNOcLbYsmDBeAt39ECkL9l/UfbrjGNh2aR2TKBJ96Dj883B4cO0 OJyJyOSIF0V+2pZ8HUkc3OPwGa2xYlvQfWGXoGGOz6ejYU8a9Yew6vXn2XwxeiHXEe3/py 7BPA45ovEUC5s/zE9odc6+h0j9yXuV3tiGjWs4AniqJj5++/gMDTph/gHU4ifw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NjlRx9pdxZ3cYi90G9RBgTvfIjhGz1tlpWy7WP8bXNE=; b=XIa+EXjK6elkYTzSTJQrslBPyoaCIlm26d3q/bJ2tbEREnZw1wNDa2TOED/upZMs74wOhp 2sxekI5slMK8VUBjx0pZyDFzkejRPAPF5lnM3PGgsr0QYQk14Invk90dTCs28eNuZAVqV4 4ygeL4gLWitLUI8VB5B0rhlVThWVq4EStfbcqjP8FDrVVe67babqjGBVaot+m4KhePcAT6 K2xBOAzCgsHTecH+P+gE8jQc6WwDHYSXYWvtInlmxjF35trgso4vQMjoEk9JRXR808gvZ0 CuUxYNl9B/FWJbqCkfSO94asqlvkTfH2bqhyByV6Ik/hyGFBwC1hr8MDIvc+Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985476; a=rsa-sha256; cv=none; b=xQP7IvjfrB/opLb+O/ih9ikaxYsW2T0TzcZv0XgcSaj+ZNMy0YR5PapoYnVUheZAsgM4/U kHgSNpjwl6HvTrgVETHsobw2JjuG/V23fLvsO0uapfkvztv9KiM6XpG4wjnGbkyL90x0UD 2+kbszK7U24PUi6U20GSdocsh39lE4piIkfT6zXTVRLjHvGuWy9QEglrr+fRrAMm/g/0nI nHppDIIZ+IWr6IdiAzWSAtm9cke3Los8YKqJoHdATVQ8jyuofc7s/ESKB61b59GPrjwYNI Jbgib9tXjpV+hLX9jpcOApNbY+0sO0He0NyCA+VthMnkkMcsO4LuVi+6uhOwcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzm2v2mzFxf; Sat, 30 Nov 2024 16:51:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpGkl043731; Sat, 30 Nov 2024 16:51:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpGHv043728; Sat, 30 Nov 2024 16:51:16 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:16 GMT Message-Id: <202411301651.4AUGpGHv043728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 360c47b956d8 - stable/14 - elftoolchain: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 360c47b956d8129305a69a2f8ff949bb39189af5 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=360c47b956d8129305a69a2f8ff949bb39189af5 commit 360c47b956d8129305a69a2f8ff949bb39189af5 Author: John Baldwin AuthorDate: 2024-07-19 17:02:45 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 elftoolchain: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46007 (cherry picked from commit b73445a32f8a3648372c0042ef633fe61b38d135) --- contrib/elftoolchain/libdwarf/libdwarf_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/elftoolchain/libdwarf/libdwarf_init.c b/contrib/elftoolchain/libdwarf/libdwarf_init.c index b85c87c59af0..95ed6147ba89 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf_init.c +++ b/contrib/elftoolchain/libdwarf/libdwarf_init.c @@ -302,7 +302,7 @@ _dwarf_alloc(Dwarf_Debug *ret_dbg, int mode, Dwarf_Error *error) { Dwarf_Debug dbg; - if ((dbg = calloc(sizeof(struct _Dwarf_Debug), 1)) == NULL) { + if ((dbg = calloc(1, sizeof(struct _Dwarf_Debug))) == NULL) { DWARF_SET_ERROR(dbg, error, DW_DLE_MEMORY); return (DW_DLE_MEMORY); } From nobody Sat Nov 30 16:51:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzl5jKMz5fJ7K; Sat, 30 Nov 2024 16:51:15 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzl2MN4z4nFn; Sat, 30 Nov 2024 16:51:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DVDdOVo1Ksh4XsqFlJCQmtIf883hSFqu6pQ3JTc3lvU=; b=aZRjiTqz8PHaAsebok1FpltRMGYI/KqiQuva4SNQusLeDNL+nfVgNwRlXA44+qc0KKiWdD Q2R6bec9bU5g6ogegP+bQP68frGVk7vaoa6f7EC7SOcIpxM9Yyu1C2fc+foxP40SF5QJaE Km+h0RjGsjwGoICc6hlMZDRzAnl24QtDhCBCd0fispqPsFe30kjCRdEq4kAAuw8r1cuVyC xhnvnYpqVzTfW8tPS7HO8ZhIjmKbMeGEZqG/oN87C5ZKbKciJp8cCQO6NT6yV4haXl6b2P Ybg4YMFk0ZMGcBbtZi9A+TIwKrASpqDZHWIYlyQumiq/LPRkpWhooIjssVi5Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DVDdOVo1Ksh4XsqFlJCQmtIf883hSFqu6pQ3JTc3lvU=; b=CBU0C13T7Mitq1HhuRwpAas7jGpGMCK2KLBNz6KO0AK70Q1NUYsRijk3f6PXjKifzrXn9M AfzfuCrpyy/ssbjwo1eLzP7+0yaofyR1NEkX8LMbq+8g+5yMmXWb9yGP8nfXfrdxyM6c2y K6LVRQQzIvGWQMWd1J3POSNKJPm0kZ1D5XFD5PYXvlgMZSvP8lKZV0d8NJjnc2RafrRoOo PP4adCo9+TBZHsFMvDaecaHjDWmg49SHjOJSSVMeONkow2ZOMVKXyLQEw+twVSLFHb0HWz ioP0T22Kp2h5rixWr/pNViP8nssb91fodSHM0K0YdEV6XaKpBdfPliC1bkGCfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985475; a=rsa-sha256; cv=none; b=Wo/dDuG2NBEiN1QL04FFXpHcSWxYyYS64h2tafZMW97W4lFmSARzGW1fhy8Tt7anePEB5B oQ/7MUQIMXyzPGVxhi3slEI/DzROkqkyxNnTs5ZWPYyfQ6bIs88a2agZJk1bHnPmL+Ru6T LsfMGuOS08qBe5+XcuHGMoTLSrQ9IV7dhDmIhQnhyo9iH9HaGPw2Bl9b+/BgE34XX+Ign/ BabyEbd5n8xSbL6bK75nwxWYi1o5mTSpF5xKyxq5VDyyIXcFmpgAvPXATnARv/bsO6JW70 NZx02hZmnZx0mDu7q5Ulzt3UQuENZJWwPLo4ACfpEBR6MuSQQPH7Hx4nINqAPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzl1wMDzFxd; Sat, 30 Nov 2024 16:51:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpFmt043669; Sat, 30 Nov 2024 16:51:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpFLE043666; Sat, 30 Nov 2024 16:51:15 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:15 GMT Message-Id: <202411301651.4AUGpFLE043666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a8c5babb3575 - stable/14 - libgeom: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a8c5babb357526afc74c96aa0087a2c846ffcaa3 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a8c5babb357526afc74c96aa0087a2c846ffcaa3 commit a8c5babb357526afc74c96aa0087a2c846ffcaa3 Author: John Baldwin AuthorDate: 2024-07-19 17:02:05 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 libgeom: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46006 (cherry picked from commit bf3b889a5be141f3abadcfc5a1d1cbdc50273d72) --- lib/libgeom/geom_xml2tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libgeom/geom_xml2tree.c b/lib/libgeom/geom_xml2tree.c index 49cbb0385770..2d2c43e29e77 100644 --- a/lib/libgeom/geom_xml2tree.c +++ b/lib/libgeom/geom_xml2tree.c @@ -407,7 +407,7 @@ geom_xml2tree(struct gmesh *gmp, char *p) free(mt); return (error); } - gmp->lg_ident = calloc(sizeof *gmp->lg_ident, mt->nident + 1); + gmp->lg_ident = calloc(mt->nident + 1, sizeof(*gmp->lg_ident)); free(mt); if (gmp->lg_ident == NULL) return (ENOMEM); From nobody Sat Nov 30 16:51:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzp13w7z5fJ0l; Sat, 30 Nov 2024 16:51:18 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzn5Ftxz4nNq; Sat, 30 Nov 2024 16:51:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m4AUPYrZTwa2a6qILAFEiqTA7MFDb8WBzqZk21B9hvE=; b=qXAqBqsLktYC10ou7x70z9ts/MtAzBrnns5QnsDKNGr8TLGhoKSQH+8pGlxxGyTO5zV2l9 3mTlP43gjBBoj4gk/M7zHCx3cY/QnbKVkwhFidy/MVnF6UmMXEcjeGuYEq9LPsXvyPPuAw fEBrbZdw63EX28BW8CyM5C4FVdQqEC13R+pLVW+QtjbllVajRu1FSL++QZzw73zjs26NSm bxXNP4SRSaehP6/iuPAD+s5P9g1HaJgzPTktFFhQgc6a5XlohGWO/IvtF6pXIiRhoJOoka pcgyRtVUAbSG8XTQtvON61OyaAwTX+zUksYaVMtLvVa9KorvmKhmxRns1mRV3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m4AUPYrZTwa2a6qILAFEiqTA7MFDb8WBzqZk21B9hvE=; b=Slqv8v85Qs7+wWn+iu6picJ5JCqAkaWCMtn9OHoPW9LRMJEcIIs7ReHf6a9oJNNsPWHgBx GR0ucYpBMQoS4LE9Cy3eut6v7cAQHqJO7j9zzV4ctq8B95nQpK5f3T07AAgMRINEybVOU3 oRADyiNT9/lZ14uwSQZXwTU52gmUa+w+7q/PIQyMyRSsDf/bZsehvdsBmEpsVivEOSBCIx CVJfutBXGnV84+9XcPnlX3EblL7eEzMqywU2Zj32SgEhg9FEEcxd0JO/cb9PmS5JuKWBHf ml2hEmzdpa16nY4CLK/q4smIbvrovlB8pVn6KrGCC1Ni79TCRMY1U4pZP9LzSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985477; a=rsa-sha256; cv=none; b=HtznSLEXqO73LDYLGsGVprkfqU1WJn+fFMJ+RmKvSa6AMrZVJ1IuA0mi9HMKE8YTA05Gu0 0wmtVoGXn7a67YPcdL5UhzZmAjgOZFkEhopCOaelE2ii67K83TX5f7dL/cI+95zNOkOcuj geKgGhNzW3z3CcfgCa0X2l7cqyAhTwJRVY/v9dqqhbtGWot/rEs2rwllUoA4iCkp1upmvs swnwYYvhLTwCjOUX7GScAaCctplhxzjsVUQf9hhmcVTG9SoWJXpyf3+NE3+fr1OBiC3txV P9bA4MIk0sDnKnVxznmknNKfKh1ein9m89CyqzGMDR+08gb2rka0Dt03fVAfPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzn3dlCzGNl; Sat, 30 Nov 2024 16:51:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpHBX043794; Sat, 30 Nov 2024 16:51:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpH69043791; Sat, 30 Nov 2024 16:51:17 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:17 GMT Message-Id: <202411301651.4AUGpH69043791@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d480a358cf00 - stable/14 - lib80211: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d480a358cf00a98fc76c0779f164ec791ac3a417 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d480a358cf00a98fc76c0779f164ec791ac3a417 commit d480a358cf00a98fc76c0779f164ec791ac3a417 Author: John Baldwin AuthorDate: 2024-07-19 17:03:19 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 lib80211: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46008 (cherry picked from commit 8aadd10a65b11f18950118a10569233e1420ab45) --- lib/lib80211/lib80211_regdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lib80211/lib80211_regdomain.c b/lib/lib80211/lib80211_regdomain.c index 189d4661c78b..db353a69f4d9 100644 --- a/lib/lib80211/lib80211_regdomain.c +++ b/lib/lib80211/lib80211_regdomain.c @@ -441,7 +441,7 @@ lib80211_regdomain_readconfig(struct regdata *rdp, const void *p, size_t len) XML_ParserFree(mt->parser); /* setup the identifer table */ - rdp->ident = calloc(sizeof(struct ident), mt->nident + 1); + rdp->ident = calloc(mt->nident + 1, sizeof(struct ident)); if (rdp->ident == NULL) return ENOMEM; free(mt); From nobody Sat Nov 30 16:51:18 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzq1B58z5fHy9; Sat, 30 Nov 2024 16:51:19 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzp6BX1z4nWk; Sat, 30 Nov 2024 16:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HFCApEesDyYUo24U709JN61no4jtvtQpc2/eVehIAuA=; b=U+yIKeihEa3xzHrwamh4p1EC59if8S9nnfY5QiqDAPblW3HdbWj/appBGEshbcAV2Jh602 Y2/2UKvRWiAVZ8DYZYuLBj90UlX91pdaGcSh1fWnoWR+njvmH9oz9oJhpyfQjsCoKFcwJU JvX1nI2SWh+cr7FdSHl6TQOO8TwEbE6xKRM9LTMNVKqhKD3kYnzGSp12K1eWYjBnJ4RoXt 6Ybr5fJSP0V475JZMrGFto9ouuTh4o+hc3vwU0ySipqiiJxMyAQY0/MXLzE/9rG/F2V0z7 s1kHpUpzer/aubvDWE9SUugQgnN+fxouynrwB6E/RaEPFBxlYVVPEzNQXYPrNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HFCApEesDyYUo24U709JN61no4jtvtQpc2/eVehIAuA=; b=UCRKZ0Q0Lc0kKiqt6VjWJQ5lzJHyCRjvbqRd4RwgtVwkBw3iUNFbp8yi7wmiEx8ZPNTNdh 2tPH6g+ClaBphPJA11C8QbhboclW+srWhqQYwPSjX45pkXYNu1t3yvYw8cJUZ4kxWM8UFc 0yLhIHmEe0MKEdy3f6tjnVQU1JTC3hpmK0Osojj2wrijg5gn2nJ1bZ4FMPW7YQ3oPUrcVA shGarA4Lj2IsGINiGmCTt4+QqaH4OIYtdfnNQkdjk9DrPfnKfngMUTZAYUWPQiHSjPPZVT qdfq6h2al97A3osSG/DBMrqtjQw2H+oykNtzEjedCKsd5CcMvnFjHmxf/URe+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985478; a=rsa-sha256; cv=none; b=S6DID88xgZXuhzErz40+7kekfcumwLHBPz+UAbT/iWI6+umjggcgW7/kDkVMhnOf52nF6X QJiO/rDxESehrLoZlb/isGWObh3DRb9Bcs89LMBPZV8ranaRu5gtIya4qxK8DLhBggqxy8 yF7yozRAXDIboLPomjh6uq17vtmQMn89F5BnXhB0R7j8GLf/AoGX0zGICurKssqtqnPd8a TshH3yyMd5oLjOI3PNsIAdtY8MVg92H0zXF8/CaJb3yR4DQ6wAZohCDHMQd5Xb574LL3Jz 95mtw4vE2PBXbA35N3x60Z7XbgV1GlWQDFVzq4wqyJWdIXnLyiqAKtHWiEUXmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzp4wrCzGKx; Sat, 30 Nov 2024 16:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpIWt043854; Sat, 30 Nov 2024 16:51:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpIKS043851; Sat, 30 Nov 2024 16:51:18 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:18 GMT Message-Id: <202411301651.4AUGpIKS043851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 0c293d0425a7 - stable/14 - md5: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0c293d0425a7d87e367c77ced644b2f1150afd7d Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0c293d0425a7d87e367c77ced644b2f1150afd7d commit 0c293d0425a7d87e367c77ced644b2f1150afd7d Author: John Baldwin AuthorDate: 2024-07-19 17:04:27 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 md5: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D46009 (cherry picked from commit e8e2ab3c55228d66388a0b33de8c5ac4b3d6dbe9) --- sbin/md5/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index 1bf897d119c0..b8afa736e229 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -593,7 +593,7 @@ main(int argc, char *argv[]) while (argc--) gnu_check(*argv++); argc = 0; - argv = calloc(sizeof(char *), numrecs + 1); + argv = calloc(numrecs + 1, sizeof(char *)); for (rec = head; rec != NULL; rec = rec->next) { argv[argc] = rec->filename; argc++; From nobody Sat Nov 30 16:51:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzr4Hm3z5fHs1; Sat, 30 Nov 2024 16:51:20 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzq65krz4nLn; Sat, 30 Nov 2024 16:51:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SyBgsUBaTsrnfK3rVVVApYunj+HDdiYxNDCxuC32Cs0=; b=H8tD9SUBF5ndtD1tXDBeS7PvdRE1ZrjmB0k5PaVdZrSIPtbdISbpkud69tsFFTGM37P+Ss eC4hCtlcjA0xzElITR4V4BIk26i2yq2NsN+kmsrA/RwcWcmsqLasOaDH64sF+7zRuVuL9N mRk3nGjh5I/+fVu/utmqVH/U6pKv8FUSnKGftz680SYMq5mNhcevAVJ8FRc9IrFWuAO743 JtV3vPkapcIWiRqUweiX7lx31HEqScg/Z68EBrxNOdSKne+UQgDNoSGqW0AFnbd8JdKxvj tgZ5j4i7K4J95/zWKfFrN/g67y/SgyqzuKtL5VioJMPuDOenRXoxWh6nm/wOjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SyBgsUBaTsrnfK3rVVVApYunj+HDdiYxNDCxuC32Cs0=; b=NfS3OxEyIb+UnralV/7lAvrw7D0KXLzbqv7UZx3BkW8u/5+ydWUW9cPv5E2nINYWNLsXZq 9NCbTXUbhXeKWC10bddjSq2oBfvtLJzah2VyliH/Jwhupe1AlpnqG3NjGeC8uuR4Y7ZoaT DoB2CRK49wfbFad1Tcokw8oNyYn6xj4cKLJWpKs9xVSt5DaBiS2OMH1I6aX3mUAAL+DlY1 WAjUuwKdIaCuB38tYzXzWgeji6umgXLylkwQHuM2CawrsO2ElPPP1uE7xjjfkhdrNnmKVE tcJu5miQZqfMSvPUZ+RmnvDykP2q22HHou6Mh6aIkdEbfDGi3nYHvFjqHfTDzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985479; a=rsa-sha256; cv=none; b=YLu9wJLO6r5tDKVhJbNiEEqeIp38gfvZGfhUG+SkiEm/WXxWPtuSdlOg5PuEUMQIcSXFHW W/WIiEJug45IkkjmG6RC6k+TOPjtlZUQ4+q+7NoJflOOUwoei1GLI4dnc//fWWNBHs8kwX VqL2f9/uBn9i4xjRgO/0RjIp9jELZ1aFQkdlbn5ZUMA4gtZSSlKlj1On6G8w8moN0SJtje KaPt6p921mzHKw/zD+7RIb9Gv4GOtPF3iIDFFfYvkF9v6l6okyfjzKy4uD5qfCX38r7qre 7Qt1IME1H7E//YqWJYaDYyMGiLEE4glMkUpNX9kiJNrH7dwiLgj+paUeXeTUQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzq5fs2zFxg; Sat, 30 Nov 2024 16:51:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpJ4e044378; Sat, 30 Nov 2024 16:51:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpJsN044368; Sat, 30 Nov 2024 16:51:19 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:19 GMT Message-Id: <202411301651.4AUGpJsN044368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 65a591b5a081 - stable/14 - recoverdisk: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 65a591b5a0819501f28d54e40c09f48500e9c31a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=65a591b5a0819501f28d54e40c09f48500e9c31a commit 65a591b5a0819501f28d54e40c09f48500e9c31a Author: John Baldwin AuthorDate: 2024-07-19 17:04:50 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:58 +0000 recoverdisk: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46010 (cherry picked from commit 6991cb36f52a35043132f349a60748eeb382ff32) --- sbin/recoverdisk/recoverdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/recoverdisk/recoverdisk.c b/sbin/recoverdisk/recoverdisk.c index 43b62fc142f3..91f42c904c52 100644 --- a/sbin/recoverdisk/recoverdisk.c +++ b/sbin/recoverdisk/recoverdisk.c @@ -82,7 +82,7 @@ report_good_read2(time_t now, size_t bytes, struct period_head *ph, time_t dt) pp = TAILQ_FIRST(ph); if (pp == NULL || pp->t1 < now) { - pp = calloc(sizeof *pp, 1L); + pp = calloc(1, sizeof(*pp)); assert(pp != NULL); pp->t0 = (now / dt) * dt; pp->t1 = (now / dt + 1) * dt; From nobody Sat Nov 30 16:51:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzs16Xwz5fJ0s; Sat, 30 Nov 2024 16:51:21 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzr6gNjz4nhX; Sat, 30 Nov 2024 16:51:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wZyfv0XWU34fv4aZTSPkHmt7wz/euXpbVJMnaUV1alY=; b=jvacdD4bRe2OwNRWx82gFkwFq8alKnAcuyW5cEjotv2O53F/QcFlhP7khqfZhOKKrESgpN yqx24aIJ96sg8QojMgLK46kFz3u8KWbU0KTswwUXWae8C9Yz03HZ1HRk5cRm751tX6qmfO 7zlC1lcn/x8gNEwa/q4Kx0NZuml8Pit4juxuTX5PzDDpYQ2eAmF9AD2BVuEruWpSReoy27 KuY2n5TY3vjG3tO8kYc5iDW8R/zFGFnMuo1eWrfXibR3dQFOdVSWLRrcahmGGrz73HRkid txXEeihPBWJzjAmrdIMNGETdOyIS2me5t8BPGhd55nx9YywT2/eUvh8CvpYTCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wZyfv0XWU34fv4aZTSPkHmt7wz/euXpbVJMnaUV1alY=; b=ggw+7KShz4CO++1alOzQUdsSb5DA7hDToiFlTEh63p7AEv3Ttc6/u5xnC8XSoNXpnsLkev CMfuOpp7YK7jDsWudf+JLym7phb/2c7cjfcmGq97qPTgnD9UIToDXtQfIYSGN6eglepiDY LNab5vpxUV3ojZKGPxPO2WRc8I+5k7CyonLdweQAhJzyZ/dEUi+CfMH3sLOdZFL73306vb Gtp2ZQeBiXD/wfBfyzy8Qgzqg6mmE2ocLBa4Ybx1+kN3vnmZQFNYLLJqrCH06r4gebXBLi BMFUo4xXIODM4/fzzVvr19RfMXgyH7XjJVl2TBhVTEEf78hf3kzCBcZXr9Ck/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985480; a=rsa-sha256; cv=none; b=wMw+73pOjL7v+mZv3WstNkw1wqp3/iTYlu2SHaJAt5q/t/tCcqEF6R2G0NamjuYn54IvBG M2XWwCow37MXJgm377L93yeOUfa8RjGKHZoqCTHlO7Hdh4HaCUuN+HuUfzS6c5E3gpYPBt 7429veXYLin3HcmO9NBhFaB62bV+OHcMu3xsryT69KqCxYsewFof79cMqvR+bIXXLZW1g7 2jqHBLQkQWg0u91f9q9DTLdUwzD4dmR9YgWMUPhwBNa1gUEbvpVH8ip8p64Jilc7HKIoaQ 5JqPDjXVKnQ8fZQLFB+Bk1/9EJ02PyEUM8G6mcsP6tEHvXEaoI5XPv6/WzguyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzr6DsyzGQL; Sat, 30 Nov 2024 16:51:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpKKb045794; Sat, 30 Nov 2024 16:51:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpKNW045779; Sat, 30 Nov 2024 16:51:20 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:20 GMT Message-Id: <202411301651.4AUGpKNW045779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 263483280cbc - stable/14 - ministat: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 263483280cbc900442dac4e0fdbb78a56d536186 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=263483280cbc900442dac4e0fdbb78a56d536186 commit 263483280cbc900442dac4e0fdbb78a56d536186 Author: John Baldwin AuthorDate: 2024-07-19 17:05:12 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:58 +0000 ministat: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46011 (cherry picked from commit a971c60456223b22c0b3c557d712b36660dbcff9) --- usr.bin/ministat/ministat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/ministat/ministat.c b/usr.bin/ministat/ministat.c index 32472a8acee7..23d4fc0271ec 100644 --- a/usr.bin/ministat/ministat.c +++ b/usr.bin/ministat/ministat.c @@ -153,7 +153,7 @@ NewSet(void) ds = calloc(1, sizeof *ds); assert(ds != NULL); ds->lpoints = 100000; - ds->points = calloc(sizeof *ds->points, ds->lpoints); + ds->points = calloc(ds->lpoints, sizeof(*ds->points)); assert(ds->points != NULL); ds->syy = NAN; return(ds); @@ -167,7 +167,7 @@ AddPoint(struct dataset *ds, double a) if (ds->n >= ds->lpoints) { dp = ds->points; ds->lpoints *= 4; - ds->points = calloc(sizeof *ds->points, ds->lpoints); + ds->points = calloc(ds->lpoints, sizeof(*ds->points)); assert(ds->points != NULL); memcpy(ds->points, dp, sizeof *dp * ds->n); free(dp); @@ -356,7 +356,7 @@ PlotSet(struct dataset *ds, int val) bar = 0; if (pl->bar == NULL) { - pl->bar = calloc(sizeof(char *), pl->num_datasets); + pl->bar = calloc(pl->num_datasets, sizeof(char *)); assert(pl->bar != NULL); } From nobody Sat Nov 30 16:51:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzt4R4tz5fHyJ; Sat, 30 Nov 2024 16:51:22 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzt0XQbz4nr5; Sat, 30 Nov 2024 16:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+EuUCfuXBlDbjoYghEfIPEnyky1VS0jLTm4Lr7ze0d8=; b=g6WjdGmfbkwShh7Hdm8BCpCKW5loqPqlGkRT/af9qwcXXDO7quglDRsQrUwGzM07GbyNl6 n1G0RbKHmlcNaLxO19r0pN2IHI6R5KBhscBWz8C8THPxH5OkfwtXFn4i2/rhVak88m7WLj bbWFWb21hPi7reyAUNfDDSAXPujSE3Ds6saIStG+kTJb9uFC0kICdNdL8ehC5zag2/4+Xl j1kcWL8p18UbBWtYseuoHqCC8AIUEEg2kiJGsv+q8qKBTCKmoErOiRfOSJBZ8jECEEtQQf NHxEKmixdvdSaaYmi6Rn78UBtQC0F48nsoK6neRPwhmXanS5IIR9z2vbOHL3XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+EuUCfuXBlDbjoYghEfIPEnyky1VS0jLTm4Lr7ze0d8=; b=dxHc0FFd5BzGxqSdkBpC0yVb7fZytdztR1TfY2fLmgFZgI88oUyvhgbJt3a1O0MEXpHj6b 0W0RhwUQ/8W/U9qCyWewyC8V4hbVoZAbots7mrD5HNSF63ot8bXDjwvEiBIFCkuoPI8pNx 2JqTNT2Lf54+pyLZowmFAOrbfh+nce4CAaWPOl+8aF2Rtx1doKzzrhJKScfxRhf3v/yczI f2PiD6zlvsIQ+akqr0lqlBUQopPCBidWxMTfL4xp8iw0BaX+xfn0U1dUmpoF2ZAw5OKn9O tyWJvjMzM3/lVtSAiTuJNqMhsjNnC6bhloYfAItWUMlEs1+KPcwQWLb5M+6sig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985482; a=rsa-sha256; cv=none; b=A2eSWHjUaRjADhmqlGtLpCmbdw+MHYkydyVVkJGt8Cvab70d8a8pLt9EsueNpJYNrbj1HZ LYe85X8+tuKEf7CyyAxeO18yNAE7oz4cCWNjQYJDqLUY1VArKBm40p+zE/Xu7r6dVBD8kZ qrAiCp8JfleqzLfj9nQbdyDrl6onF7+4pL2J5RSBPD2IoZe5uNKE9aRaHgpmQL05SVt/NQ DSFASZRqyO8peC1k1rMOdGK8vTZWaVqoPVgE8vRvOl81AW+j7PA7i2yTYu0Ux8GXvuo59i MkH8Zy0E4WtEzxNHm/s6PlPZuZd33/a27WunZdmBTm0bGEORjnxZoVkEez4eAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzt08hCzGQM; Sat, 30 Nov 2024 16:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpLcl046385; Sat, 30 Nov 2024 16:51:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpL0k046382; Sat, 30 Nov 2024 16:51:21 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:21 GMT Message-Id: <202411301651.4AUGpL0k046382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c28d88cda423 - stable/14 - bsdinstall: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c28d88cda42386709d316625c102b4d00a8bb9c6 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c28d88cda42386709d316625c102b4d00a8bb9c6 commit c28d88cda42386709d316625c102b4d00a8bb9c6 Author: John Baldwin AuthorDate: 2024-07-19 17:07:00 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:58 +0000 bsdinstall: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46012 (cherry picked from commit 7cd0a4c85dbe5e8cd000f6b293ef2d579d22edfb) --- usr.sbin/bsdinstall/distfetch/distfetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c b/usr.sbin/bsdinstall/distfetch/distfetch.c index 01f5f1aa214b..e18fa0225048 100644 --- a/usr.sbin/bsdinstall/distfetch/distfetch.c +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c @@ -131,8 +131,8 @@ fetch_files(int nfiles, char **urls) struct bsddialog_conf mgconf; /* Make the transfer list for mixedgauge */ - minilabel = calloc(sizeof(char *), nfiles); - miniperc = calloc(sizeof(int), nfiles); + minilabel = calloc(nfiles, sizeof(char *)); + miniperc = calloc(nfiles, sizeof(int)); if (minilabel == NULL || miniperc == NULL) errx(EXIT_FAILURE, "Error: distfetch minibars out of memory!"); From nobody Sat Nov 30 16:51:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzv3cL5z5fJ14; Sat, 30 Nov 2024 16:51:23 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzv1ZvYz4nZr; Sat, 30 Nov 2024 16:51:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5UYwTFe21ESqGlq4gMP7TOOkRYyQJBwtvyjcMqgMb0s=; b=MGZ+vg8/ud4x2CnQSYZVJabPnMi7Wwhcc9jYHhIafQNx1v1g9zWvT/t23M0FRAEUeajRkT VhnxHdC8qwnXjBTH/ryeErquRtoOOh2tXdN4by1e/6PMUP1/3UHbskFvheePAr70bzERJy sqJhaniBDx6Ra6Y0tAYjTUhSLBs+mQ0OX2eCt7QAf6wPnTVWrl0ePzCQwnDMbjldk8JAIy 1DXkXH8ifggcdg58fbR1F4Xu2N4edKFVc2BaQOl2mXYJK6qo/C/rxtO3V2KpvVHR1QVgl9 Bnm7gIh173US/Dz2elWqaeILzERtUsSj/VPa/v8FbDqW/0REAu8sWCRvauBoVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5UYwTFe21ESqGlq4gMP7TOOkRYyQJBwtvyjcMqgMb0s=; b=Iya9C5J0kgFyKbCW/YBVPgVe7H4c6ehnnWM4ATib8CZLeHfrFOHDPwKm20daXFNhWupeJx 3HqwHh6ohJ78IEB+lvIIRYqBxX8+ziB/3cnuslnDJXtkc0SRF8BX8OfXGW9U+hXSoga8mu eYRvGf3VeCbnj3D3ITRJIyeLeBH4ej2imr/BsW34AvFqCVvN+kiYhAIoRUSFnE1UScItn5 oJfYd+tVuC3xVSbZ3caqOa3wR/WkrMg82UTChfJXu5OtPIqwhEFwOmDEPlNE3wZMQINveb 2QrjVAC3Rb64Ho335vOxvBC7sK4DwszyPYOHLYahI2plW0s6gWCjCldy6CUt+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985483; a=rsa-sha256; cv=none; b=wW5eM656eDtzroWn7RH/ugao1KhwRLPtwvIdCwcpF6zED2HlZPoucXN1uvXP971mc2Cjgg LdIWa83WG2ao0YTIYB0u0Lh6GYHdeOyW9wIMnsk1mOKPhx/0ec3dYmRq3qeVNiCK7HVLKa F4epOrHTM2JNC2gpVZ3RbCcV5YrSqqiYcJPV90ZMcyI3USVphZAEb/XDjD5yXE9fONf3ff ABToFvVz+iw2oUdSiR9zclUT7YPouMXkB7TFWoltw9PHc9GZgyJww68qgaDEPZdc+4WZ0G TqhrmeoGSt1gI8ySIwA6dERUZdfezh22ngQXVuCABVcgY568EYGcuigo1EGI4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzv1BzzzGhQ; Sat, 30 Nov 2024 16:51:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpNAH046445; Sat, 30 Nov 2024 16:51:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpNj8046442; Sat, 30 Nov 2024 16:51:23 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:23 GMT Message-Id: <202411301651.4AUGpNj8046442@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 57be21fae07e - stable/14 - ctld: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 57be21fae07e5994aaab98910ed4a370a4a8aa2f Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=57be21fae07e5994aaab98910ed4a370a4a8aa2f commit 57be21fae07e5994aaab98910ed4a370a4a8aa2f Author: John Baldwin AuthorDate: 2024-07-19 17:07:22 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:58 +0000 ctld: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46013 (cherry picked from commit 2ba12978f67432a3f88b17704391d28e1fc0e788) --- usr.sbin/ctld/isns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ctld/isns.c b/usr.sbin/ctld/isns.c index 3c85c1a3cade..12aacbdef2b2 100644 --- a/usr.sbin/ctld/isns.c +++ b/usr.sbin/ctld/isns.c @@ -49,14 +49,14 @@ isns_req_alloc(void) { struct isns_req *req; - req = calloc(sizeof(struct isns_req), 1); + req = calloc(1, sizeof(struct isns_req)); if (req == NULL) { log_err(1, "calloc"); return (NULL); } req->ir_buflen = sizeof(struct isns_hdr); req->ir_usedlen = 0; - req->ir_buf = calloc(req->ir_buflen, 1); + req->ir_buf = calloc(1, req->ir_buflen); if (req->ir_buf == NULL) { free(req); log_err(1, "calloc"); From nobody Sat Nov 30 16:51:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzw4Jv4z5fJ15; Sat, 30 Nov 2024 16:51:24 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzw2dvbz4npB; Sat, 30 Nov 2024 16:51:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=trZtUOu60rzAerwl0Za5VbX3JTw+NIqmfrfAP+St1ps=; b=vgWCb4HifHTM750l3+sk+tGX2y7XeSfZIdidn1raQIdbAnxJRMvrNrVDgto/xzYK7BV/48 y6uE+whudUNdivslZNKYlC2f5ImGYbqeWcYOYugY8CCg5iYjXUezA6fGUa0hfBu+wXzS1U UUINFbpyPatrtlz0eugjSG2ZWkrpXYtzUXl+85sgNGRUqiM+FBbCVHp/DtdsUtT1B5l0pK l33K076kRTTtBxyrJHHxDn7IKCW+O3llYi80Sy54SvF+nD0zdwt4J+aWKEv8TNjt6Ukg8D PgPKLzV7Ik4Kl2HSuidkYBgpJSb46MmupNHILbrx+Ll4MJ155vugJWZ7wl9sAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=trZtUOu60rzAerwl0Za5VbX3JTw+NIqmfrfAP+St1ps=; b=GziOvQehAKvw69h4v6F9WuoqB23+Kqgtwjd1NMD1x2u1P23QGsz7o8VZtZ5xUdcVYAy1SN 4w7XISC0udip+tdx7eo3U+pN2vd60uLmFtwc54mGNniUDTaUkyjMSeGlgQyuagEVytgabm ppS3nUV4sEcZhI9OPemz9YKKqFXa1UK8SN+In/F9TeRBroI6pNq8bTvUfnHTFtPnBHAqT8 Z8JPesdGmXmOFCmcj+ldJBqaM+H1WDQGP+dV6WW6w0O47Iu3VuLQshhSjATyhbwvIqMQpD Pf40UxQdpMfuCBEAP+Ei2ehvUnmHbWmFVCl3nGZA3Au1gw2CBEp3BprFDckOAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985484; a=rsa-sha256; cv=none; b=omhADA94lvReNRaLiEd+1ceXhA51GrJIN6OLNN8QRPjugKcgCdplcEYDKBZ+1wW4pUT5Mu KtAiAyJxy9zFwQ+1S7p/BfqJo8tXPNZzTSHz75B1HrhfVTBh5BTyTco9JfsRWL7AevZ2gE TWPQLdRn+b0Q2AXbrteEkexISetNeq4nQ/zE1sIIe0Jh5AJgiqVJDCMrhi06zx/abwrV70 48dWKFj0ZND1jJRkvyR80g2kyeG6Cb5NqytNXGKqO0XCFu7scl9r45QYrq9Jn5pNDPmAUZ 4LkZ4KWpQF7MJlW331FIdufVOo8CggyLTTtTm6lZAkjc4ezs2i3NHJcloptfEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzw2FMmzGTJ; Sat, 30 Nov 2024 16:51:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpObH046499; Sat, 30 Nov 2024 16:51:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpOZe046496; Sat, 30 Nov 2024 16:51:24 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:24 GMT Message-Id: <202411301651.4AUGpOZe046496@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ec2aaa9c7053 - stable/14 - fwcontrol: Allocate full fw_asyreq structures passed to the kernel List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ec2aaa9c705392c8f419b51aeb6daa12bdaa3435 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ec2aaa9c705392c8f419b51aeb6daa12bdaa3435 commit ec2aaa9c705392c8f419b51aeb6daa12bdaa3435 Author: John Baldwin AuthorDate: 2024-07-19 17:08:14 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:58 +0000 fwcontrol: Allocate full fw_asyreq structures passed to the kernel The FW_ASYREQ ioctl accepts a struct fw_asyreq object as its argument, meaning that the kernel always copies in the full structure in sys_ioctl before passing the request down to the driver. However, fwcontrol was allocating smaller objects that contained only the request header and a variable-sized payload. This means that the kernel copy in sys_ioctl was reading off the end of this buffer. On current architectures this happened to be ok, but it is UB. Instead, allocate a full structure. Reported by: GCC 14 -Walloc-size Reviewed by: rlibby, brooks Differential Revision: https://reviews.freebsd.org/D46014 (cherry picked from commit 9494dfe1b3faf5c48abaa9be4ec87e4669963942) --- usr.sbin/fwcontrol/fwcontrol.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/fwcontrol/fwcontrol.c b/usr.sbin/fwcontrol/fwcontrol.c index 94478259606d..ce908341a42a 100644 --- a/usr.sbin/fwcontrol/fwcontrol.c +++ b/usr.sbin/fwcontrol/fwcontrol.c @@ -207,7 +207,7 @@ read_write_quad(int fd, struct fw_eui64 eui, u_int32_t addr_lo, int readmode, u_ struct fw_asyreq *asyreq; u_int32_t *qld, res; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 16; @@ -262,7 +262,7 @@ send_phy_config(int fd, int root_node, int gap_count) { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 12; @@ -289,7 +289,7 @@ link_on(int fd, int node) { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 12; @@ -308,7 +308,7 @@ reset_start(int fd, int node) { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 16; From nobody Sat Nov 30 16:51:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x011Gdpz5fHsF; Sat, 30 Nov 2024 16:51:29 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x004dwGz4njx; Sat, 30 Nov 2024 16:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kfOGCV4y/dvOzVkbPyrE/eCDZl6W8DbkiKCbwpkTVVo=; b=cEBpf3vBgLeDTWBH7LvmWhIYKF3Kx+Tb8qOELnvrrvSjc8TafUvgC004co8Ka4V7gX0fB2 +nUV9q5ozqmHlO/cVne/T6WPv4ezGHXPIOKKTcTSIcT2o+l9AEVoAhWZQkdI1lGOKhfFEG 2iNLDsB0Qvpe0fpmt/GTqM3UA9UARpP6qMKlMpHjlTYUjPGV+y9eYuopnrwl5DnIymKH0A /wJSJO8EFSj3EboORB0u/82uq5YWIfO/Q8lzau+05F+2aXJC5SDwfl4LSBbyDkPYkDVlF3 tF7KSJfp45AwtX/KIK1MhFcZMsf732lqBjUTfOyt1Y/xkQc3NEIaeGivteXd/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kfOGCV4y/dvOzVkbPyrE/eCDZl6W8DbkiKCbwpkTVVo=; b=a2Bqwtwyv21P3zdx5tpD30Yu8QIwDN/I5tX6FlQyO0JEwkqkR7xpmnMhz0VT5Ei7CDGdOg 9OhctpsYrlNAGkiYEhxOBhJAdfPa0yJhcQ2hgAX4KhZUTS6N3bS+YOlzXW/Xifxs3x6cy2 7J9XcWrrArYGCxYX8xOtAHjz972R+ChKxZkf+xbAWEahVzrkIcUSv9num20tVeRU1XKEab rzy1UGLZ4i8z/2tGMNFqVS7QRGicMOxxAn+d6KI+U05nZs9cCoFbBToMMEmRJVyJJ/xkx4 wWu4nuPpaNfApCGMbhY0FGAk5lRF6n4EIMD5Wqn2Zbo58nlmIU0iSw0gnGsWmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985488; a=rsa-sha256; cv=none; b=rFI4W9Xekx4hdMXijhX5BCZJKyVkAMMgni29xPlgBHcRAfN/cvjs6NJx3k46fXjLz8tiZ8 LPA2lSNQFXVagxoWLH1esgFMmmgfhZ+O0289vNZGMU3xOQNq3j46UUwqBXl0TeM9drKKDW DI/158A+F6bNS26rzbVEbz+r6FcVoq6QW2DP9mGnCCaGSRhLIH6s977TdI0uVqh6dCzinF XmXnkqiCEtuICBEcVRwndUcnhywSkO/kI1Vfm1VuUAgwVvLQOIOmCow/YBc8H9uOIzUWas DUg670UpM0WoDfkrEHOjt70OX84BNSQ2NdT33FlXynuykPoTuVLlABIZbxCmNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x004GCgzGL0; Sat, 30 Nov 2024 16:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpSP1046810; Sat, 30 Nov 2024 16:51:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpSNl046807; Sat, 30 Nov 2024 16:51:28 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:28 GMT Message-Id: <202411301651.4AUGpSNl046807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c0dfdac8c8fa - stable/13 - amd64: Use bool for booleans in getmemsize List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c0dfdac8c8fa41b4c9cb4c75d2a420140837399e Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c0dfdac8c8fa41b4c9cb4c75d2a420140837399e commit c0dfdac8c8fa41b4c9cb4c75d2a420140837399e Author: John Baldwin AuthorDate: 2024-02-02 22:58:46 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:11:53 +0000 amd64: Use bool for booleans in getmemsize Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43693 (cherry picked from commit 70539d5da600a65d34c8d965ef2a9d475cbc9c4e) --- sys/amd64/amd64/machdep.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 928203a690ac..da25c09b9519 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -988,10 +988,11 @@ getmemsize(caddr_t kmdp, u_int64_t first) if (physmap[i + 1] < end) end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { - int tmp, page_bad, full; int *ptr = (int *)CADDR1; + int tmp; + bool full, page_bad; - full = FALSE; + full = false; /* * block out kernel memory as not available. */ @@ -1006,7 +1007,7 @@ getmemsize(caddr_t kmdp, u_int64_t first) && pa < dcons_addr + dcons_size) goto do_dump_avail; - page_bad = FALSE; + page_bad = false; if (memtest == 0) goto skip_memtest; @@ -1030,25 +1031,25 @@ getmemsize(caddr_t kmdp, u_int64_t first) */ *(volatile int *)ptr = 0xaaaaaaaa; if (*(volatile int *)ptr != 0xaaaaaaaa) - page_bad = TRUE; + page_bad = true; /* * Test for alternating 0's and 1's */ *(volatile int *)ptr = 0x55555555; if (*(volatile int *)ptr != 0x55555555) - page_bad = TRUE; + page_bad = true; /* * Test for all 1's */ *(volatile int *)ptr = 0xffffffff; if (*(volatile int *)ptr != 0xffffffff) - page_bad = TRUE; + page_bad = true; /* * Test for all 0's */ *(volatile int *)ptr = 0x0; if (*(volatile int *)ptr != 0x0) - page_bad = TRUE; + page_bad = true; /* * Restore original value. */ @@ -1058,7 +1059,7 @@ skip_memtest: /* * Adjust array of valid/good pages. */ - if (page_bad == TRUE) + if (page_bad == true) continue; /* * If this good page is a continuation of the @@ -1079,7 +1080,7 @@ skip_memtest: printf( "Too many holes in the physical address space, giving up\n"); pa_indx--; - full = TRUE; + full = true; goto do_dump_avail; } phys_avail[pa_indx++] = pa; /* start */ From nobody Sat Nov 30 16:51:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x021tZcz5fJ1F; Sat, 30 Nov 2024 16:51:30 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x015NRwz4nmZ; Sat, 30 Nov 2024 16:51:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=apFOMleb49ufpC0ltR9AP08k1VhuVNV2bbnnUN3boG0=; b=KLN7gz/5uEVi8318TGejcvK/eQnx4+pZaS70qBeDZ6hW63XZhUhPfJ2Q1QvRuFyAedWyex IEm5+hbvMOkwmi5UjsFlDeQX4D1KGpRABtjnmAoXlEab1js3knTNOr01MZTyvMO0vJ9+rx Fzl2P4IgXfcV7XgT5Va8U+TPxNCaBQOKolxw3rOtvTZBo1GUiI6KzFtqzFP5jpXPJKMg8v JavWqc+5FkYab/GQck0pP3A7Q1lZgc5XvuIqsoc3LOx756rZowtqBkxVfOwoPrCSM8LFZU R0DaJonLA+XH19x1I0o1nPMIKi7oVfVGFXwtlqaK2oQDveM3KlCrIBBDN13tHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=apFOMleb49ufpC0ltR9AP08k1VhuVNV2bbnnUN3boG0=; b=M7jP894/0iNM9fSjWES85ufZVH5YzATCUICs+T6rliME8qo9Q1b7V4W9N8wxod4Z3/7fTH 9LI9/qZ7dg2xIVcrKqIfpnpNPyGhdGDyIoBUKAflex/JhCBNIBorHCMs0Pgw4js8ufVtSw YBGflLSnlFL8uozT9KFtCWiswMqWck1tsn0J4LcvGSGcKKj8xGZBeiZ5a89jWB4yX2aZ3H PNorP4FgdJYd1AKnvqZVqox+H2tW4MOK2BZ2KfbYw/Fxectih0ywUWM+1oE75/tF6lcHxO mAyCUyQyXeX4rXKdWcptd6bUGKfTJexfedM0KxcPLHdnfxr2htbUtQct5YkseQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985489; a=rsa-sha256; cv=none; b=JoARVbPyIFpKrzcEyqnnqjz8rRwHnqqpB+uhsFtUVV7hFX7EGv4D+rZDtQ68xj4M/ldfZj JjzHaEXnOjKLuBLNLyLRSbcf0Mh/QLJ//8wIjpbzhUGLfz58VSTMVxuEGZVl82ORo5Tmx2 TRTmxoJ/Lk2WXjqKuo0DzcgSdcUxsaeloiRnZ6kqtqx6Ic7esUOD1R4UVnEDBFEV8oZ6rx a0BqFqOrkc7E4wptIPwaAZF2JbnbU+TFrjXDQJD9k7XwOgF4AFDtbSaCk+UymRTBz3c5Gx BNSSwJWgJe1/KPyWCEdoM6qW8ct9LSS7kGJPapFZS5USJGIZ/5rfUFMRysKtFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x015040zGhS; Sat, 30 Nov 2024 16:51:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpTkP046858; Sat, 30 Nov 2024 16:51:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpTF8046855; Sat, 30 Nov 2024 16:51:29 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:29 GMT Message-Id: <202411301651.4AUGpTF8046855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 19eed0321ccf - stable/13 - i386: Use bool for booleans in getmemsize List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 19eed0321ccf17cdbc9cd1c5b75466ef27a2db34 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=19eed0321ccf17cdbc9cd1c5b75466ef27a2db34 commit 19eed0321ccf17cdbc9cd1c5b75466ef27a2db34 Author: John Baldwin AuthorDate: 2024-02-05 23:39:31 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:12:04 +0000 i386: Use bool for booleans in getmemsize Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43716 (cherry picked from commit bf20896da4545067eec2e6d8203a57fcdcee52cf) --- sys/i386/i386/machdep.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 4b9afd7d85ca..99039f2271fb 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1139,10 +1139,11 @@ physmap_done: if (physmap[i + 1] < end) end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { - int tmp, page_bad, full; int *ptr; + int tmp; + bool full, page_bad; - full = FALSE; + full = false; /* * block out kernel memory as not available. */ @@ -1157,7 +1158,7 @@ physmap_done: && pa < dcons_addr + dcons_size) goto do_dump_avail; - page_bad = FALSE; + page_bad = false; if (memtest == 0) goto skip_memtest; @@ -1172,25 +1173,25 @@ physmap_done: */ *(volatile int *)ptr = 0xaaaaaaaa; if (*(volatile int *)ptr != 0xaaaaaaaa) - page_bad = TRUE; + page_bad = true; /* * Test for alternating 0's and 1's */ *(volatile int *)ptr = 0x55555555; if (*(volatile int *)ptr != 0x55555555) - page_bad = TRUE; + page_bad = true; /* * Test for all 1's */ *(volatile int *)ptr = 0xffffffff; if (*(volatile int *)ptr != 0xffffffff) - page_bad = TRUE; + page_bad = true; /* * Test for all 0's */ *(volatile int *)ptr = 0x0; if (*(volatile int *)ptr != 0x0) - page_bad = TRUE; + page_bad = true; /* * Restore original value. */ @@ -1200,7 +1201,7 @@ skip_memtest: /* * Adjust array of valid/good pages. */ - if (page_bad == TRUE) + if (page_bad == true) continue; /* * If this good page is a continuation of the @@ -1221,7 +1222,7 @@ skip_memtest: printf( "Too many holes in the physical address space, giving up\n"); pa_indx--; - full = TRUE; + full = true; goto do_dump_avail; } phys_avail[pa_indx++] = pa; /* start */ From nobody Sat Nov 30 16:51:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x030M39z5fJ1H; Sat, 30 Nov 2024 16:51:31 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x026TPrz4nmk; Sat, 30 Nov 2024 16:51:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p4cWrDDVRx0ZcB5wF+Zx8dc79ddyUCvpa0NJznZdOKg=; b=OAIJhKERnT4N8D/H9gkAcezzFv2UZof7uCoEXops0KvD/ZrCEv1Mx5yv7UJQEFIsd1l1/d XLp1XpEwofDtbSmIodwaCZe0SgsSkk8fxKtRTebBpLRTusWA97t+elKiyCI9no84fHyzju 7OcRAWbGec+PzAexkvz798fAVJC5+R7Vi9Sc2WknMynGapcnDuVJ+e52Ul6ntOwDEkLLkS ReqK291iOec4zUAi4RxF3IZxSmVi3qKUE3JIxcplTpRo4eXfPeyX8ri4ZDp3b8lOsmtqWC BafyQCqMa8qR4whAChazpbD9pPcsuNVSB/xKgiYpybrSzetVm1HRamf11PX82w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p4cWrDDVRx0ZcB5wF+Zx8dc79ddyUCvpa0NJznZdOKg=; b=n00Dz6k3UWNdwM1mXOg7/9a6yMv5U4Eq8Lym1I8G0aUdypxLIJVoPpQmmWubE+ANtpwROc grPwK+uroClg0F2tMLH1CS6uFvGwTX6bp+Vmtc8gzhwJ9Diuk40KUWQ+Wbrn9Izj+S2dTl TRnzUfjRHg1a4v0dsyimUS2acQptww89tqPBlDeYv7WkyNwjo14Xtd8IjhO3z5JgMUDTzW gaJhwZNXxLAev21olihoFMyWEwMIx3lWdQX2O8vfdi0E8aTRWVKJnPGCmp3FB5MNe0zHd9 2H6ugH8QWyAU8NqJ7sLb+3KHnTmrhzEN3VUZwIQe+hq32ckDPO5NUfDPpqtk7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985490; a=rsa-sha256; cv=none; b=A9r/A7mKynC4d7hawWkJEE7ceqrTlGdj4EoN8uje7RWRHR8Q1Rq8i5GAOqi1U4XySJoo4n MHCh0YSQEcWw5TF+QndoiYpMNbxZ1PmY+qPnlUgaOUssEfMKmBnWnvjpn5zz4u51c8Pa8b CNXf+wFWJ+sg5cwOPXoR2B5jxR5FnPrYtgc2LIDAD2/Qtl5uLewT6TC9JGRMLoPS3UEcmS fClbnzrwLwcVe9WD+E/H67m0rv+8XhB/yWxQ8fDYHg0dDFGCtjY4VO1UfCZVrIBbJlVko0 CwIYE6h0Hh6r6V+IQx9qQck/DavWCr7cTa4C308Y2sZAnJ+NUAnPGGHwUvTiKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x0260xFzGTK; Sat, 30 Nov 2024 16:51:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpUmC046900; Sat, 30 Nov 2024 16:51:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpUND046897; Sat, 30 Nov 2024 16:51:30 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:30 GMT Message-Id: <202411301651.4AUGpUND046897@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 47a375d2bae6 - stable/13 - speaker: Use standard C bool List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 47a375d2bae684e524abf0799b587a34f679c268 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=47a375d2bae684e524abf0799b587a34f679c268 commit 47a375d2bae684e524abf0799b587a34f679c268 Author: John Baldwin AuthorDate: 2024-02-05 23:40:34 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:15:00 +0000 speaker: Use standard C bool Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43717 (cherry picked from commit c83d83206a39c7c47139acac46885bea54ee4876) --- sys/dev/speaker/spkr.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index 316d09cfdfc6..6afebda053d6 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -122,12 +122,6 @@ rest(int centisecs) * except possibly at physical block boundaries. */ -#ifndef __bool_true_false_are_defined -typedef int bool; -#endif -#define TRUE 1 -#define FALSE 0 - #define dtoi(c) ((c) - '0') static int octave; /* currently selected octave */ @@ -183,8 +177,8 @@ playinit(void) whole = (100 * SECS_PER_MIN * WHOLE_NOTE) / DFLT_TEMPO; fill = NORMAL; value = DFLT_VALUE; - octtrack = FALSE; - octprefix = TRUE; /* act as though there was an initial O(n) */ + octtrack = false; + octprefix = true; /* act as though there was an initial O(n) */ } /* @@ -281,7 +275,7 @@ playstring(char *cp, size_t slen) pitch -= OCTAVE_NOTES; } } - octprefix = FALSE; + octprefix = false; lastpitch = pitch; /* ...which may in turn be followed by an override time value */ @@ -310,29 +304,29 @@ playstring(char *cp, size_t slen) break; case 'O': if (cp[1] == 'N' || cp[1] == 'n') { - octprefix = octtrack = FALSE; + octprefix = octtrack = false; ++cp; slen--; } else if (cp[1] == 'L' || cp[1] == 'l') { - octtrack = TRUE; + octtrack = true; ++cp; slen--; } else { GETNUM(cp, octave); if (octave >= nitems(pitchtab) / OCTAVE_NOTES) octave = DFLT_OCTAVE; - octprefix = TRUE; + octprefix = true; } break; case '>': if (octave < nitems(pitchtab) / OCTAVE_NOTES - 1) octave++; - octprefix = TRUE; + octprefix = true; break; case '<': if (octave > 0) octave--; - octprefix = TRUE; + octprefix = true; break; case 'N': GETNUM(cp, pitch); @@ -397,7 +391,7 @@ playstring(char *cp, size_t slen) * endtone(), and rest() functions defined above. */ -static int spkr_active = FALSE; /* exclusion flag */ +static bool spkr_active = false; /* exclusion flag */ static char *spkr_inbuf; /* incoming buf */ static int @@ -419,7 +413,7 @@ spkropen(dev, flags, fmt, td) #endif /* DEBUG */ playinit(); spkr_inbuf = malloc(DEV_BSIZE, M_SPKR, M_WAITOK); - spkr_active = TRUE; + spkr_active = true; return(0); } } @@ -467,7 +461,7 @@ spkrclose(dev, flags, fmt, td) wakeup(&endtone); wakeup(&endrest); free(spkr_inbuf, M_SPKR); - spkr_active = FALSE; + spkr_active = false; return(0); } From nobody Sat Nov 30 16:51:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x046jZwz5fJD9; Sat, 30 Nov 2024 16:51:32 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x040L6Lz4nyL; Sat, 30 Nov 2024 16:51:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AeH4YnOEfhXLWIANVFWNwNJ/5EQK19xYPx/JMjNdg/g=; b=t1ZhHYl0QKiKAumzBK2EPpycWx/v0CvulBUppFLlTezHlK1xBVCr+RPQiAXsFWbG2Zs7xM eYLxJrkquxVrllexMZa0VGcwNTN2o5Dpt/C+5jrDqSkTHc/kS2jvi6An0otkRwc4epymYS 4oVfnyGgP6EYi/vHsvklN2340jmt6ALj8oZGjyPuFKrrxT6ZCYHqRUvSDiHrtrfpcoyrB7 jz2xmiA+edMsnzTy7ti08YjO+mqUnHnlkSfQvihgCYJVd2BoU0c+ogbp3K7vz4h4Mde1HC 92lJnaIPaucfuhp3L6/u+F5JjL2S6ioaP2C4JuYA7MJERetk8OwO7BnSqoLvIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AeH4YnOEfhXLWIANVFWNwNJ/5EQK19xYPx/JMjNdg/g=; b=D4mYDIjpkheRY133OP1PRjs6IxBS08qodtOdSk0Behnc1q+x5ZanL4XjHJ6PNofBNlW9/T dPA+A31TfBm1qJR6QqfIiOLKBRtkvRtU3lue7yfb9mx66OnR2J60SGIS6G3OxsBUiMC+Is FKQK6W56LIiVoVmS/fwjy44tSDvoYjfIU4mtrJbLGQK8ujmdFhrXidYMRcI3MMjVHWOj1v egBkxaQgajP4T8lk4yzlqiVnNBdMxgTxoKOmRkCUtwIbW3xb0VshfAZGUNKlutSjlhNU+P 4z85eOGk42Z+iROmzwICQfaMVw7sMqepsAQT5ULt1iRJ6K9rLtO7/yNfwrbDdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985492; a=rsa-sha256; cv=none; b=fQZySq6CsHnUK038UWriWaFzDAO8nE5CNgiUNpzgMBR6GNZ+vYHyPuL8BeH8EH+0d+C+Qe DNOrnu1sXSLBd9RXK6DqzOfDZNZpfm2KSstKHTqiX07zjvSQ4gEiFAGAvnmbVhbw2c+NeL 3l560sQ+00UhtjNgMRGIymML+cmq6GoHXvvi0PXbaHfJtesBItVcZzJgryqRint/uOIyg4 Bu7EzO4sw9a8eu1HbFXAm+J1vpgtsMR7eb/EuJkR7VqHdVYy9pAGg0Lq6dDhwFJg9umorx Ic6dQjFLENv5YwiiKqKrisuJIBD4U7tN9HOHTsi/6d6cnbS+oQvHhCVgnKVATA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x0372tGzGNp; Sat, 30 Nov 2024 16:51:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpVIJ046948; Sat, 30 Nov 2024 16:51:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpVwt046945; Sat, 30 Nov 2024 16:51:31 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:31 GMT Message-Id: <202411301651.4AUGpVwt046945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 33ab06dda86a - stable/13 - linuxkpi: Provide a non-NULL value for THIS_MODULE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 33ab06dda86a0f2a4a494c6c9908412d3373721f Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=33ab06dda86a0f2a4a494c6c9908412d3373721f commit 33ab06dda86a0f2a4a494c6c9908412d3373721f Author: Austin Shafer AuthorDate: 2024-03-06 17:48:07 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:20:56 +0000 linuxkpi: Provide a non-NULL value for THIS_MODULE THIS_MODULE is used to differentiate modules on Linux. We currently completely stub out any Linux struct module usage, but THIS_MODULE is still used to populate the "owner" fields of various drivers. Even though we don't actually dereference these "owner" fields they are still used by drivers to check if devices/dmabufs/etc come from different modules. For example, during DRM GEM import some drivers check if the dmabuf's owner matches the dev's owner. If they match because they are both NULL drivers may incorrectly think two resources come from the same module. This adds a general purpose __this_linker_file which will point to the linker file of the module that uses it. We can then use that pointer to have a valid value for THIS_MODULE. Reviewed by: bz, jhb Differential Revision: https://reviews.freebsd.org/D44306 (cherry picked from commit 28a59100b54ff245a45fbd328266266f1c14eb8c) --- sys/compat/linuxkpi/common/include/linux/module.h | 21 +++++++++++++++++++++ sys/kern/kern_linker.c | 14 ++++++++++++++ sys/sys/linker.h | 6 ++++++ 3 files changed, 41 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/module.h b/sys/compat/linuxkpi/common/include/linux/module.h index 3018ba2fb8a4..df34843657db 100644 --- a/sys/compat/linuxkpi/common/include/linux/module.h +++ b/sys/compat/linuxkpi/common/include/linux/module.h @@ -33,6 +33,8 @@ #include #include #include +#include +#include #include #include @@ -52,7 +54,26 @@ #define MODULE_SUPPORTED_DEVICE(name) #define MODULE_IMPORT_NS(_name) +/* + * THIS_MODULE is used to differentiate modules on Linux. We currently + * completely stub out any Linux struct module usage, but THIS_MODULE is still + * used to populate the "owner" fields of various drivers. Even though we + * don't actually dereference these "owner" fields they are still used by + * drivers to check if devices/dmabufs/etc come from different modules. For + * example, during DRM GEM import some drivers check if the dmabuf's owner + * matches the dev's owner. If they match because they are both NULL drivers + * may incorrectly think two resources come from the same module. + * + * To handle this we specify an undefined symbol __this_linker_file, which + * will get special treatment from the linker when resolving. This will + * populate the usages of __this_linker_file with the linker_file_t of the + * module. + */ +#ifdef KLD_MODULE +#define THIS_MODULE ((struct module *)&__this_linker_file) +#else #define THIS_MODULE ((struct module *)0) +#endif #define __MODULE_STRING(x) __stringify(x) diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index caee3aaedcd7..4f573018e18f 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -833,6 +833,20 @@ linker_file_lookup_symbol_internal(linker_file_t file, const char *name, KLD_DPF(SYM, ("linker_file_lookup_symbol: file=%p, name=%s, deps=%d\n", file, name, deps)); + /* + * Treat the __this_linker_file as a special symbol. This is a + * global that linuxkpi uses to populate the THIS_MODULE + * value. In this case we can simply return the linker_file_t. + * + * Modules compiled statically into the kernel are assigned NULL. + */ + if (strcmp(name, "__this_linker_file") == 0) { + address = (file == linker_kernel_file) ? NULL : (caddr_t)file; + KLD_DPF(SYM, ("linker_file_lookup_symbol: resolving special " + "symbol __this_linker_file to %p\n", address)); + return (address); + } + if (LINKER_LOOKUP_SYMBOL(file, name, &sym) == 0) { LINKER_SYMBOL_VALUES(file, sym, &symval); if (symval.value == 0) diff --git a/sys/sys/linker.h b/sys/sys/linker.h index b94cd9f27405..4a3a8f27ae59 100644 --- a/sys/sys/linker.h +++ b/sys/sys/linker.h @@ -125,6 +125,12 @@ typedef int linker_predicate_t(linker_file_t, void *); */ extern linker_file_t linker_kernel_file; +/* + * Special symbol which will be replaced by a reference to the linker_file_t + * of the module it is used in. + */ +extern linker_file_t __this_linker_file; + /* * Obtain a reference to a module, loading it if required. */ From nobody Sat Nov 30 16:51:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x0650jvz5fJ1T; Sat, 30 Nov 2024 16:51:34 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x062PBnz4nwT; Sat, 30 Nov 2024 16:51:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MTyFC6bzx2802o+WG/UJ+BtTsrylsb9wVP8cySa+qFI=; b=auCiFOXSXDFKOMqrvXEdhbRQXC7MgwFE4ogr94VoYO6XKHxc7OcpWxsyaud4LixQP0jgqC xlobm9i3rtLGQaRRARV3P663rDVb2glmNxvZJj/r41W6GHmkV/MaxDE244rEH9189qYe5e oTsWcaIl2iznJqGo4xV+6J9Rmxejkk4HovA9gqvJH3IrY+109BWKzhstb+qG7p7mg/7Qka 2UyQVTx5Fb2jUtDepBtInSk/t4Oygwo7zu1H0pyjJgcJHLFSoZQLc+eR0RHr+Hdso7IFqP 3kLpAfIp7DOAeh95lCFsXy8VnGMsW5ovoBlRHUR+OgTG0GbSY7Gt7cV+8r4BsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MTyFC6bzx2802o+WG/UJ+BtTsrylsb9wVP8cySa+qFI=; b=L39ctFVc40AxQ4gRzF1GfkcbkH1N8AfbU1vqlo1DHbukHQziNV2L4dzJ3q4guE0Ybwvg92 zwLaUnvAZVDbcTdeUgvotgLga+/9c93hIAmNHDhol5vqpsnVOnNuAuXu9xmVm/3Vy/yC6S 0WVls3EWTbPvCmq+OjBFxC+3wfqbOFV6YLC9S/eAHGcXr1fOq5OdVA3wHV5EzJpWCWDdhU gbf21yGarUJLQ7GVArNqnvoEwBjEaVPl4HdLTjjK6c33171K5kLI8X7NWmVISG4Roe2Q57 PVf/uoPKWmeurBGBUDTsN4GFTmuoFZ1Vu1BniLexSL4NmD5kIipsWHWYgcJwqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985494; a=rsa-sha256; cv=none; b=LW6D8NsVQ64bWt3oSqhHVTqhqB7GqF3Yz+qgTVwuvZoywqBgTxc9YagQT/XfuQYWAkSy0B WaZri6I6PBX1alwJZeZmgPWyTTTNL3LuZgTIxPNhwJ66fMWmo3bTL/YImy3asMeUZJGXtD AyN5hVXnm1uYteFYgcd076QHt54VepagRBJyrIfROvNmWm6ISmC9XF6hteTGTlQen/bEnS uTtbezqH6pKaInzs3XNIUj7DGbMR1HkYahHXOWHBUtSE1GysOK36/uDvcpMxCBFmzBrk76 X2xWESF/e5nDLEq0KO/L7Kh7vlCyN5x9L4Lnn8/bVaBx1XPjUsBTSW4UCoFLFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x062154zFxk; Sat, 30 Nov 2024 16:51:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpY86048339; Sat, 30 Nov 2024 16:51:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpY0V048322; Sat, 30 Nov 2024 16:51:34 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:34 GMT Message-Id: <202411301651.4AUGpY0V048322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a7494467d176 - stable/13 - cxgbe: Remove most uses of sysctl_wire_old_buffer List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a7494467d1763b295c8fadde174ca954b4ac2bc9 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a7494467d1763b295c8fadde174ca954b4ac2bc9 commit a7494467d1763b295c8fadde174ca954b4ac2bc9 Author: John Baldwin AuthorDate: 2024-07-03 15:04:52 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:23:05 +0000 cxgbe: Remove most uses of sysctl_wire_old_buffer Most of these sysctls don't call sbuf_* while holding any locks. Of the ones that do hold locks, all but one can be fixed to drop the lock before calling sbuf_*. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D45186 (cherry picked from commit 61089df8147eb7109696476c891514296d543bad) --- sys/dev/cxgbe/t4_main.c | 167 ++++++++---------------------------------------- 1 file changed, 27 insertions(+), 140 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 17969d45ff0c..89cb7c528679 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -8216,10 +8216,6 @@ sysctl_bitfield_8b(SYSCTL_HANDLER_ARGS) int rc; struct sbuf *sb; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); @@ -8237,10 +8233,6 @@ sysctl_bitfield_16b(SYSCTL_HANDLER_ARGS) int rc; struct sbuf *sb; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); @@ -8498,10 +8490,6 @@ sysctl_pause_settings(SYSCTL_HANDLER_ARGS) struct sbuf *sb; static char *bits = "\20\1RX\2TX\3AUTO"; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); @@ -8563,10 +8551,6 @@ sysctl_link_fec(SYSCTL_HANDLER_ARGS) struct sbuf *sb; static char *bits = "\20\1RS-FEC\2FC-FEC\3NO-FEC\4RSVD1\5RSVD2"; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); @@ -8594,10 +8578,6 @@ sysctl_requested_fec(SYSCTL_HANDLER_ARGS) static char *bits = "\20\1RS-FEC\2FC-FEC\3NO-FEC\4RSVD2" "\5RSVD3\6auto\7module"; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); @@ -8673,10 +8653,6 @@ sysctl_module_fec(SYSCTL_HANDLER_ARGS) struct sbuf *sb; static char *bits = "\20\1RS-FEC\2FC-FEC\3NO-FEC\4RSVD2\5RSVD3"; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); @@ -8703,14 +8679,15 @@ sysctl_module_fec(SYSCTL_HANDLER_ARGS) fec = lc->fec_hint; if (pi->mod_type == FW_PORT_MOD_TYPE_NONE || !fec_supported(lc->pcaps)) { + PORT_UNLOCK(pi); sbuf_printf(sb, "n/a"); } else { if (fec == 0) fec = FEC_NONE; + PORT_UNLOCK(pi); sbuf_printf(sb, "%b", fec & M_FW_PORT_CAP32_FEC, bits); } rc = sbuf_finish(sb); - PORT_UNLOCK(pi); done: sbuf_delete(sb); end_synchronized_op(sc, 0); @@ -8930,10 +8907,6 @@ sysctl_loadavg(SYSCTL_HANDLER_ARGS) if (rc) return (rc); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -8963,14 +8936,11 @@ sysctl_cctrl(SYSCTL_HANDLER_ARGS) "0.9375" }; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9046,10 +9016,6 @@ sysctl_cim_ibq_obq(SYSCTL_HANDLER_ARGS) } n = rc * sizeof(uint32_t); /* rc has # of words actually read */ - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - goto done; - sb = sbuf_new_for_sysctl(NULL, NULL, PAGE_SIZE, req); if (sb == NULL) { rc = ENOMEM; @@ -9168,9 +9134,6 @@ sysctl_cim_la(SYSCTL_HANDLER_ARGS) struct sbuf *sb; int rc; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -9238,10 +9201,6 @@ sysctl_cim_ma_la(SYSCTL_HANDLER_ARGS) uint32_t *buf, *p; int rc; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -9249,6 +9208,7 @@ sysctl_cim_ma_la(SYSCTL_HANDLER_ARGS) buf = malloc(2 * CIM_MALA_SIZE * 5 * sizeof(uint32_t), M_CXGBE, M_ZERO | M_WAITOK); + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9289,10 +9249,6 @@ sysctl_cim_pif_la(SYSCTL_HANDLER_ARGS) uint32_t *buf, *p; int rc; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -9300,6 +9256,7 @@ sysctl_cim_pif_la(SYSCTL_HANDLER_ARGS) buf = malloc(2 * CIM_PIFLA_SIZE * 6 * sizeof(uint32_t), M_CXGBE, M_ZERO | M_WAITOK); + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9369,10 +9326,6 @@ sysctl_cim_qcfg(SYSCTL_HANDLER_ARGS) if (rc) return (rc); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, PAGE_SIZE, req); if (sb == NULL) return (ENOMEM); @@ -9405,14 +9358,11 @@ sysctl_cpl_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_cpl_stats stats; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 256, req); if (sb == NULL) return (ENOMEM); + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9451,14 +9401,11 @@ sysctl_ddp_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_usm_stats stats; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 256, req); if (sb == NULL) return (ENOMEM); + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9484,14 +9431,11 @@ sysctl_tid_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_tid_stats stats; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 256, req); if (sb == NULL) return (ENOMEM); + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9628,9 +9572,6 @@ sysctl_devlog(SYSCTL_HANDLER_ARGS) int rc; struct sbuf *sb; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -9673,10 +9614,7 @@ sysctl_fcoe_stats(SYSCTL_HANDLER_ARGS) struct tp_fcoe_stats stats[MAX_NCHAN]; int i, nchan = sc->chip_params->nchan; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9729,16 +9667,13 @@ sysctl_hw_sched(SYSCTL_HANDLER_ARGS) unsigned int map, kbps, ipg, mode; unsigned int pace_tab[NTX_SCHED]; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 512, req); if (sb == NULL) return (ENOMEM); mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) { + mtx_unlock(&sc->reg_lock); rc = ENXIO; goto done; } @@ -9746,6 +9681,7 @@ sysctl_hw_sched(SYSCTL_HANDLER_ARGS) map = t4_read_reg(sc, A_TP_TX_MOD_QUEUE_REQ_MAP); mode = G_TIMERMODE(t4_read_reg(sc, A_TP_MOD_CONFIG)); t4_read_pace_tbl(sc, pace_tab); + mtx_unlock(&sc->reg_lock); sbuf_printf(sb, "Scheduler Mode Channel Rate (Kbps) " "Class IPG (0.1 ns) Flow IPG (us)"); @@ -9771,7 +9707,6 @@ sysctl_hw_sched(SYSCTL_HANDLER_ARGS) } rc = sbuf_finish(sb); done: - mtx_unlock(&sc->reg_lock); sbuf_delete(sb); return (rc); } @@ -9794,16 +9729,13 @@ sysctl_lb_stats(SYSCTL_HANDLER_ARGS) "BG2FramesTrunc:", "BG3FramesTrunc:" }; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); memset(s, 0, sizeof(s)); + rc = 0; for (i = 0; i < sc->chip_params->nchan; i += 2) { mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) @@ -9826,7 +9758,8 @@ sysctl_lb_stats(SYSCTL_HANDLER_ARGS) *p0++, *p1++); } - rc = sbuf_finish(sb); + if (rc == 0) + rc = sbuf_finish(sb); sbuf_delete(sb); return (rc); @@ -9840,9 +9773,6 @@ sysctl_linkdnrc(SYSCTL_HANDLER_ARGS) struct link_config *lc = &pi->link_cfg; struct sbuf *sb; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); sb = sbuf_new_for_sysctl(NULL, NULL, 64, req); if (sb == NULL) return (ENOMEM); @@ -10180,10 +10110,6 @@ sysctl_mps_tcam(SYSCTL_HANDLER_ARGS) MPASS(chip_id(sc) <= CHELSIO_T5); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -10191,6 +10117,7 @@ sysctl_mps_tcam(SYSCTL_HANDLER_ARGS) sbuf_printf(sb, "Idx Ethernet address Mask Vld Ports PF" " VF Replication P0 P1 P2 P3 ML"); + rc = 0; for (i = 0; i < sc->chip_params->mps_tcam_size; i++) { uint64_t tcamx, tcamy, mask; uint32_t cls_lo, cls_hi; @@ -10284,10 +10211,6 @@ sysctl_mps_tcam_t6(SYSCTL_HANDLER_ARGS) MPASS(chip_id(sc) > CHELSIO_T5); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -10297,6 +10220,7 @@ sysctl_mps_tcam_t6(SYSCTL_HANDLER_ARGS) " Replication" " P0 P1 P2 P3 ML\n"); + rc = 0; for (i = 0; i < sc->chip_params->mps_tcam_size; i++) { uint8_t dip_hit, vlan_vld, lookup_type, port_num; uint16_t ivlan; @@ -10466,10 +10390,7 @@ sysctl_path_mtus(SYSCTL_HANDLER_ARGS) int rc; uint16_t mtus[NMTUS]; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -10511,10 +10432,7 @@ sysctl_pm_stats(SYSCTL_HANDLER_ARGS) "Rx FIFO wait", NULL, "Rx latency" }; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -10575,10 +10493,7 @@ sysctl_rdma_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_rdma_stats stats; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -10609,10 +10524,7 @@ sysctl_tcp_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_tcp_stats v4, v6; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -10652,10 +10564,7 @@ sysctl_tids(SYSCTL_HANDLER_ARGS) uint32_t x, y; struct tid_info *t = &sc->tids; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; sb = sbuf_new_for_sysctl(NULL, NULL, 256, req); if (sb == NULL) return (ENOMEM); @@ -10747,10 +10656,7 @@ sysctl_tp_err_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_err_stats stats; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -10828,10 +10734,7 @@ sysctl_tnl_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_tnl_stats stats; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -11095,10 +10998,7 @@ sysctl_tp_la(SYSCTL_HANDLER_ARGS) u_int i, inc; void (*show_func)(struct sbuf *, uint64_t *, int); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -11146,10 +11046,7 @@ sysctl_tx_rate(SYSCTL_HANDLER_ARGS) int rc; u64 nrate[MAX_NCHAN], orate[MAX_NCHAN]; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -11192,10 +11089,7 @@ sysctl_ulprx_la(SYSCTL_HANDLER_ARGS) uint32_t *buf, *p; int rc, i; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -11236,10 +11130,7 @@ sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS) MPASS(chip_id(sc) >= CHELSIO_T5); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -11289,10 +11180,6 @@ sysctl_cpus(SYSCTL_HANDLER_ARGS) if (rc != 0) return (rc); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); From nobody Sat Nov 30 16:51:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x05527kz5fJQx; Sat, 30 Nov 2024 16:51:33 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x051LmJz4nw8; Sat, 30 Nov 2024 16:51:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xeuw49gDxjJQdYkDlsgxJMkA3olhWGZCFYMjVjsnkyU=; b=ySUybAFWnAe5Mf2m5Nnyja+k/nTlfplT0vI8FHelhHdeNLiZ1NFGAC606wfcSYA/dB2Wvc SqoD2bQBnzY3kTe1dTOEE4odNRCe+9avmQDswcd/7J6TJC+CPSfBn/AD7dkxMSxbqYaKCi Qp3CCfI5lKwEnKwXSe0DwbrcinkkGsSoFT8Y1bVNtevgQxDqqgeed0eNPz3I7j5X0HxqYh bHhPLac/Swc9HuxwjSEnGmuitB7hgxA/zJZNMjJGhxfd3RO6q305tqWltiYCsS9F+eY5Yl JhJ3CYLH2JJQt9pi2EeLgXG4SkhXZAtgcWg1zqrqnoMNxDfno8AogiZBGzblOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xeuw49gDxjJQdYkDlsgxJMkA3olhWGZCFYMjVjsnkyU=; b=dvxY/c9nxYoz9kqh9xAEurRfatGI21IJEnxCrSdP/VoL6F5dweERgUsOT8NeTgrY4/y7uw HxoG9rjunOHEwOx68vid2Cg3L83Uid5JU/XWhTgnwj8GnfOFVZ8fSWSgwvz4srLNTZvgKw S8KxkneC0haQpCFAcsaWT4PZy5V1NZriZfvfnFCmpO0X5tjuikGfHqKgrtLjaRw52JHHPZ jM7QqloqotzAb071GRATiMk+jYiCHxEEcSaj4T01TGUs0UM8O8yc8TftJhvZu5UBJ7crVH RdbV6UDnzfupp9LaDN63ma+MyS5kSN3DjGC1rK/Tt9QQyhfi986/YiNM0e5HhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985493; a=rsa-sha256; cv=none; b=qawPen8KAkyYBkcq4L6lNjzTyoKfN4xfQj/kvCEwDK1jtvg457B+QvOSKH6MT/dLxEnGEN 1FTyYcV/mMO6WgfhADIu4N2Wz2nx6Bt0yj4dkArULG6hjuTe9yR3N9kcsFOMLXrpc5us/S W/cVn1Pmb3+ThOcaHWS5fGaEtY7zwJvIgpqhnXnyc/UwT1uguhgRkH1dvsNOQFVDtpuZhX sPc5hQohtpJ6qpUnEkP/UiOMVLk+3OyPVNKSDxPCXR3afvhc5BxCahpPogItQG3D5xkCv5 oeDXt3BhFuzQPu5PudxisX9RY7WesQ0cHB9U3VmIYYvRp/15f4Oe4ks7o/trUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x050zChzGTM; Sat, 30 Nov 2024 16:51:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpXUf047003; Sat, 30 Nov 2024 16:51:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpXBP047000; Sat, 30 Nov 2024 16:51:33 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:33 GMT Message-Id: <202411301651.4AUGpXBP047000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f74d1fffcb03 - stable/13 - cryptocheck: Don't treat OpenSSL errors as fatal List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f74d1fffcb030edab4568c710378f8093cc45a74 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f74d1fffcb030edab4568c710378f8093cc45a74 commit f74d1fffcb030edab4568c710378f8093cc45a74 Author: John Baldwin AuthorDate: 2024-06-06 21:47:04 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:22:44 +0000 cryptocheck: Don't treat OpenSSL errors as fatal Abort the current test but keep running additional tests if OpenSSL reports an error during a test. This matches the behavior for other tests such as an error from OCF. Reviewed by: markj Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D45279 (cherry picked from commit b0e7358bf8b9791aaaf38807c841953946b88785) --- tools/tools/crypto/cryptocheck.c | 322 ++++++++++++++++++++++++++------------- 1 file changed, 220 insertions(+), 102 deletions(-) diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c index c99a54a82bc1..81535fef792b 100644 --- a/tools/tools/crypto/cryptocheck.c +++ b/tools/tools/crypto/cryptocheck.c @@ -535,7 +535,7 @@ ocf_hash(const struct alg *alg, const char *buffer, size_t size, char *digest, return (true); } -static void +static bool openssl_hash(const struct alg *alg, const EVP_MD *md, const void *buffer, size_t size, void *digest_out, unsigned *digest_sz_out) { @@ -562,11 +562,12 @@ openssl_hash(const struct alg *alg, const EVP_MD *md, const void *buffer, goto err_out; EVP_MD_CTX_destroy(mdctx); - return; + return (true); err_out: - errx(1, "OpenSSL %s HASH failed%s: %s", alg->name, errs, + warnx("OpenSSL %s HASH failed%s: %s", alg->name, errs, ERR_error_string(ERR_get_error(), NULL)); + return (false); } static void @@ -588,7 +589,8 @@ run_hash_test(const struct alg *alg, size_t size) /* OpenSSL HASH. */ digest_len = sizeof(control_digest); - openssl_hash(alg, md, buffer, size, control_digest, &digest_len); + if (!openssl_hash(alg, md, buffer, size, control_digest, &digest_len)) + goto out; /* cryptodev HASH. */ if (!ocf_hash(alg, buffer, size, test_digest, &crid)) @@ -669,9 +671,11 @@ run_hmac_test(const struct alg *alg, size_t size) /* OpenSSL HMAC. */ digest_len = sizeof(control_digest); if (HMAC(md, key, key_len, (u_char *)buffer, size, - (u_char *)control_digest, &digest_len) == NULL) - errx(1, "OpenSSL %s (%zu) HMAC failed: %s", alg->name, + (u_char *)control_digest, &digest_len) == NULL) { + warnx("OpenSSL %s (%zu) HMAC failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto out; + } /* cryptodev HMAC. */ if (!ocf_hmac(alg, buffer, size, key, key_len, test_digest, &crid)) @@ -698,7 +702,7 @@ out: free(key); } -static void +static bool openssl_cipher(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, const char *iv, const char *input, char *output, size_t size, int enc) { @@ -706,27 +710,42 @@ openssl_cipher(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, int outl, total; ctx = EVP_CIPHER_CTX_new(); - if (ctx == NULL) - errx(1, "OpenSSL %s (%zu) ctx new failed: %s", alg->name, + if (ctx == NULL) { + warnx("OpenSSL %s (%zu) ctx new failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + return (false); + } if (EVP_CipherInit_ex(ctx, cipher, NULL, (const u_char *)key, - (const u_char *)iv, enc) != 1) - errx(1, "OpenSSL %s (%zu) ctx init failed: %s", alg->name, + (const u_char *)iv, enc) != 1) { + warnx("OpenSSL %s (%zu) ctx init failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } EVP_CIPHER_CTX_set_padding(ctx, 0); if (EVP_CipherUpdate(ctx, (u_char *)output, &outl, - (const u_char *)input, size) != 1) - errx(1, "OpenSSL %s (%zu) cipher update failed: %s", alg->name, + (const u_char *)input, size) != 1) { + warnx("OpenSSL %s (%zu) cipher update failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } total = outl; - if (EVP_CipherFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) - errx(1, "OpenSSL %s (%zu) cipher final failed: %s", alg->name, + if (EVP_CipherFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) { + warnx("OpenSSL %s (%zu) cipher final failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } total += outl; - if ((size_t)total != size) - errx(1, "OpenSSL %s (%zu) cipher size mismatch: %d", alg->name, + if ((size_t)total != size) { + warnx("OpenSSL %s (%zu) cipher size mismatch: %d", alg->name, size, total); + goto error; + } + EVP_CIPHER_CTX_free(ctx); + return (true); + +error: EVP_CIPHER_CTX_free(ctx); + return (false); } static bool @@ -806,22 +825,27 @@ run_cipher_test(const struct alg *alg, size_t size) ciphertext = malloc(size); /* OpenSSL cipher. */ - openssl_cipher(alg, cipher, key, iv, cleartext, ciphertext, size, 1); - if (size > 0 && memcmp(cleartext, ciphertext, size) == 0) + if (!openssl_cipher(alg, cipher, key, iv, cleartext, ciphertext, size, + 1)) + goto out_noocf; + if (size > 0 && memcmp(cleartext, ciphertext, size) == 0) { warnx("OpenSSL %s (%zu): cipher text unchanged", alg->name, size); - openssl_cipher(alg, cipher, key, iv, ciphertext, buffer, size, 0); + goto out_noocf; + } + if (!openssl_cipher(alg, cipher, key, iv, ciphertext, buffer, size, 0)) + goto out_noocf; if (memcmp(cleartext, buffer, size) != 0) { printf("OpenSSL %s (%zu): cipher mismatch:", alg->name, size); printf("original:\n"); hexdump(cleartext, size, NULL, 0); printf("decrypted:\n"); hexdump(buffer, size, NULL, 0); - exit(1); + goto out_noocf; } if (!ocf_init_cipher_session(alg, key, key_len, &ses)) - goto out; + goto out_noocf; /* OCF encrypt. */ if (!ocf_cipher(&ses, alg, iv, cleartext, buffer, size, COP_ENCRYPT)) @@ -853,6 +877,7 @@ run_cipher_test(const struct alg *alg, size_t size) out: ocf_destroy_session(&ses); +out_noocf: free(ciphertext); free(buffer); free(cleartext); @@ -968,21 +993,26 @@ run_eta_test(const struct alg *alg, size_t aad_len, size_t size) /* OpenSSL encrypt + HMAC. */ if (aad_len != 0) memcpy(ciphertext, cleartext, aad_len); - openssl_cipher(alg, cipher, cipher_key, iv, cleartext + aad_len, - ciphertext + aad_len, size, 1); + if (!openssl_cipher(alg, cipher, cipher_key, iv, cleartext + aad_len, + ciphertext + aad_len, size, 1)) + goto out_noocf; if (size > 0 && memcmp(cleartext + aad_len, ciphertext + aad_len, - size) == 0) + size) == 0) { warnx("OpenSSL %s (%zu, %zu): cipher text unchanged", alg->name, aad_len, size); + goto out_noocf; + } digest_len = sizeof(control_digest); if (HMAC(md, auth_key, auth_key_len, (u_char *)ciphertext, - aad_len + size, (u_char *)control_digest, &digest_len) == NULL) - errx(1, "OpenSSL %s (%zu, %zu) HMAC failed: %s", alg->name, + aad_len + size, (u_char *)control_digest, &digest_len) == NULL) { + warnx("OpenSSL %s (%zu, %zu) HMAC failed: %s", alg->name, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto out_noocf; + } if (!ocf_init_eta_session(alg, cipher_key, cipher_key_len, auth_key, auth_key_len, &ses)) - goto out; + goto out_noocf; /* OCF encrypt + HMAC. */ error = ocf_eta(&ses, iv, iv_len, aad_len != 0 ? cleartext : NULL, @@ -1058,6 +1088,7 @@ run_eta_test(const struct alg *alg, size_t aad_len, size_t size) out: ocf_destroy_session(&ses); +out_noocf: free(ciphertext); free(buffer); free(cleartext); @@ -1066,7 +1097,7 @@ out: free(cipher_key); } -static void +static bool openssl_gmac(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, const char *iv, const char *input, size_t size, char *tag) { @@ -1074,26 +1105,41 @@ openssl_gmac(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, int outl; ctx = EVP_CIPHER_CTX_new(); - if (ctx == NULL) - errx(1, "OpenSSL %s (%zu) ctx new failed: %s", alg->name, + if (ctx == NULL) { + warnx("OpenSSL %s (%zu) ctx new failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + return (false); + } if (EVP_EncryptInit_ex(ctx, cipher, NULL, (const u_char *)key, - (const u_char *)iv) != 1) - errx(1, "OpenSSL %s (%zu) ctx init failed: %s", alg->name, + (const u_char *)iv) != 1) { + warnx("OpenSSL %s (%zu) ctx init failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } EVP_CIPHER_CTX_set_padding(ctx, 0); if (EVP_EncryptUpdate(ctx, NULL, &outl, (const u_char *)input, - size) != 1) - errx(1, "OpenSSL %s (%zu) update failed: %s", + size) != 1) { + warnx("OpenSSL %s (%zu) update failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_EncryptFinal_ex(ctx, NULL, &outl) != 1) - errx(1, "OpenSSL %s (%zu) final failed: %s", alg->name, + goto error; + } + if (EVP_EncryptFinal_ex(ctx, NULL, &outl) != 1) { + warnx("OpenSSL %s (%zu) final failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, alg->tag_len, - tag) != 1) - errx(1, "OpenSSL %s (%zu) get tag failed: %s", alg->name, + tag) != 1) { + warnx("OpenSSL %s (%zu) get tag failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } EVP_CIPHER_CTX_free(ctx); + return (true); + +error: + EVP_CIPHER_CTX_free(ctx); + return (false); } static bool @@ -1152,7 +1198,8 @@ run_gmac_test(const struct alg *alg, size_t size) buffer = alloc_buffer(size); /* OpenSSL GMAC. */ - openssl_gmac(alg, cipher, key, iv, buffer, size, control_tag); + if (!openssl_gmac(alg, cipher, key, iv, buffer, size, control_tag)) + goto out; /* OCF GMAC. */ if (!ocf_mac(alg, buffer, size, key, key_len, iv, test_tag, &crid)) @@ -1176,7 +1223,7 @@ out: free(key); } -static void +static bool openssl_digest(const struct alg *alg, const char *key, u_int key_len, const char *input, size_t size, char *tag, u_int tag_len) { @@ -1185,25 +1232,42 @@ openssl_digest(const struct alg *alg, const char *key, u_int key_len, size_t len; pkey = EVP_PKEY_new_raw_private_key(alg->pkey, NULL, key, key_len); - if (pkey == NULL) - errx(1, "OpenSSL %s (%zu) pkey new failed: %s", alg->name, + if (pkey == NULL) { + warnx("OpenSSL %s (%zu) pkey new failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + return (false); + } mdctx = EVP_MD_CTX_new(); - if (mdctx == NULL) - errx(1, "OpenSSL %s (%zu) ctx new failed: %s", alg->name, + if (mdctx == NULL) { + warnx("OpenSSL %s (%zu) ctx new failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_DigestSignInit(mdctx, NULL, NULL, NULL, pkey) != 1) - errx(1, "OpenSSL %s (%zu) digest sign init failed: %s", + EVP_PKEY_free(pkey); + return (false); + } + if (EVP_DigestSignInit(mdctx, NULL, NULL, NULL, pkey) != 1) { + warnx("OpenSSL %s (%zu) digest sign init failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_DigestSignUpdate(mdctx, input, size) != 1) - errx(1, "OpenSSL %s (%zu) digest update failed: %s", alg->name, + goto error; + } + if (EVP_DigestSignUpdate(mdctx, input, size) != 1) { + warnx("OpenSSL %s (%zu) digest update failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } len = tag_len; - if (EVP_DigestSignFinal(mdctx, tag, &len) != 1) - errx(1, "OpenSSL %s (%zu) digest final failed: %s", alg->name, + if (EVP_DigestSignFinal(mdctx, tag, &len) != 1) { + warnx("OpenSSL %s (%zu) digest final failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } EVP_MD_CTX_free(mdctx); EVP_PKEY_free(pkey); + return (true); + +error: + EVP_MD_CTX_free(mdctx); + EVP_PKEY_free(pkey); + return (false); } static void @@ -1223,8 +1287,9 @@ run_digest_test(const struct alg *alg, size_t size) buffer = alloc_buffer(size); /* OpenSSL Poly1305. */ - openssl_digest(alg, key, key_len, buffer, size, control_tag, - sizeof(control_tag)); + if (!openssl_digest(alg, key, key_len, buffer, size, control_tag, + sizeof(control_tag))) + goto out; /* OCF Poly1305. */ if (!ocf_mac(alg, buffer, size, key, key_len, NULL, test_tag, &crid)) @@ -1247,7 +1312,7 @@ out: free(key); } -static void +static bool openssl_aead_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, const char *iv, size_t iv_len, const char *aad, size_t aad_len, const char *input, char *output, size_t size, char *tag) @@ -1256,44 +1321,68 @@ openssl_aead_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, int outl, total; ctx = EVP_CIPHER_CTX_new(); - if (ctx == NULL) - errx(1, "OpenSSL %s (%zu) ctx new failed: %s", alg->name, + if (ctx == NULL) { + warnx("OpenSSL %s (%zu) ctx new failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) - errx(1, "OpenSSL %s (%zu) ctx init failed: %s", alg->name, + return (false); + } + if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) { + warnx("OpenSSL %s (%zu) ctx init failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, NULL) != 1) - errx(1, "OpenSSL %s (%zu) setting iv length failed: %s", alg->name, + goto error; + } + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, NULL) != + 1) { + warnx("OpenSSL %s (%zu) setting iv length failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } if (EVP_EncryptInit_ex(ctx, NULL, NULL, (const u_char *)key, - (const u_char *)iv) != 1) - errx(1, "OpenSSL %s (%zu) ctx init failed: %s", alg->name, + (const u_char *)iv) != 1) { + warnx("OpenSSL %s (%zu) ctx init failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } EVP_CIPHER_CTX_set_padding(ctx, 0); if (aad != NULL) { if (EVP_EncryptUpdate(ctx, NULL, &outl, (const u_char *)aad, - aad_len) != 1) - errx(1, "OpenSSL %s (%zu) aad update failed: %s", + aad_len) != 1) { + warnx("OpenSSL %s (%zu) aad update failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } } if (EVP_EncryptUpdate(ctx, (u_char *)output, &outl, - (const u_char *)input, size) != 1) - errx(1, "OpenSSL %s (%zu) encrypt update failed: %s", alg->name, + (const u_char *)input, size) != 1) { + warnx("OpenSSL %s (%zu) encrypt update failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } total = outl; - if (EVP_EncryptFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) - errx(1, "OpenSSL %s (%zu) encrypt final failed: %s", alg->name, + if (EVP_EncryptFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) { + warnx("OpenSSL %s (%zu) encrypt final failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } total += outl; - if ((size_t)total != size) - errx(1, "OpenSSL %s (%zu) encrypt size mismatch: %d", alg->name, + if ((size_t)total != size) { + warnx("OpenSSL %s (%zu) encrypt size mismatch: %d", alg->name, size, total); + goto error; + } if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, alg->tag_len, - tag) != 1) - errx(1, "OpenSSL %s (%zu) get tag failed: %s", alg->name, + tag) != 1) { + warnx("OpenSSL %s (%zu) get tag failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } + EVP_CIPHER_CTX_free(ctx); + return (true); + +error: EVP_CIPHER_CTX_free(ctx); + return (false); } #ifdef notused @@ -1341,7 +1430,7 @@ openssl_aead_decrypt(const struct alg *alg, const EVP_CIPHER *cipher, } #endif -static void +static bool openssl_ccm_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, const char *iv, size_t iv_len, const char *aad, size_t aad_len, const char *input, char *output, size_t size, char *tag) @@ -1350,63 +1439,88 @@ openssl_ccm_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, int outl, total; ctx = EVP_CIPHER_CTX_new(); - if (ctx == NULL) - errx(1, "OpenSSL %s/%zu (%zu, %zu) ctx new failed: %s", + if (ctx == NULL) { + warnx("OpenSSL %s/%zu (%zu, %zu) ctx new failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) - errx(1, "OpenSSL %s/%zu (%zu, %zu) ctx init failed: %s", + return (false); + } + if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) ctx init failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, NULL) != 1) - errx(1, - "OpenSSL %s/%zu (%zu, %zu) setting iv length failed: %s", + goto error; + } + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, NULL) != + 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) setting iv length failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, AES_CBC_MAC_HASH_LEN, NULL) != 1) - errx(1, - "OpenSSL %s/%zu (%zu, %zu) setting tag length failed: %s", + goto error; + } + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, AES_CBC_MAC_HASH_LEN, + NULL) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) setting tag length failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } if (EVP_EncryptInit_ex(ctx, NULL, NULL, (const u_char *)key, - (const u_char *)iv) != 1) - errx(1, "OpenSSL %s/%zu (%zu, %zu) ctx init failed: %s", + (const u_char *)iv) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) ctx init failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_EncryptUpdate(ctx, NULL, &outl, NULL, size) != 1) - errx(1, - "OpenSSL %s/%zu (%zu, %zu) unable to set data length: %s", + goto error; + } + if (EVP_EncryptUpdate(ctx, NULL, &outl, NULL, size) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) unable to set data length: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } if (aad != NULL) { if (EVP_EncryptUpdate(ctx, NULL, &outl, (const u_char *)aad, - aad_len) != 1) - errx(1, - "OpenSSL %s/%zu (%zu, %zu) aad update failed: %s", + aad_len) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) aad update failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } } if (EVP_EncryptUpdate(ctx, (u_char *)output, &outl, - (const u_char *)input, size) != 1) - errx(1, "OpenSSL %s/%zu (%zu, %zu) encrypt update failed: %s", + (const u_char *)input, size) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) encrypt update failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } total = outl; - if (EVP_EncryptFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) - errx(1, "OpenSSL %s/%zu (%zu, %zu) encrypt final failed: %s", + if (EVP_EncryptFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) encrypt final failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } total += outl; - if ((size_t)total != size) - errx(1, "OpenSSL %s/%zu (%zu, %zu) encrypt size mismatch: %d", + if ((size_t)total != size) { + warnx("OpenSSL %s/%zu (%zu, %zu) encrypt size mismatch: %d", alg->name, iv_len, aad_len, size, total); + goto error; + } if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, AES_CBC_MAC_HASH_LEN, - tag) != 1) - errx(1, "OpenSSL %s/%zu (%zu, %zu) get tag failed: %s", + tag) != 1) { + warnx("OpenSSL %s/%zu (%zu, %zu) get tag failed: %s", alg->name, iv_len, aad_len, size, ERR_error_string(ERR_get_error(), NULL)); + goto error; + } + EVP_CIPHER_CTX_free(ctx); + return (true); + +error: EVP_CIPHER_CTX_free(ctx); + return (false); } static bool @@ -1488,6 +1602,7 @@ run_aead_test(const struct alg *alg, size_t aad_len, size_t size, u_int key_len; int error; char control_tag[AEAD_MAX_TAG_LEN], test_tag[AEAD_MAX_TAG_LEN]; + bool ok; cipher = alg->evp_cipher(); if (size % EVP_CIPHER_block_size(cipher) != 0) { @@ -1524,14 +1639,16 @@ run_aead_test(const struct alg *alg, size_t aad_len, size_t size, /* OpenSSL encrypt */ if (EVP_CIPHER_mode(cipher) == EVP_CIPH_CCM_MODE) - openssl_ccm_encrypt(alg, cipher, key, iv, iv_len, aad, + ok = openssl_ccm_encrypt(alg, cipher, key, iv, iv_len, aad, aad_len, cleartext, ciphertext, size, control_tag); else - openssl_aead_encrypt(alg, cipher, key, iv, iv_len, aad, + ok = openssl_aead_encrypt(alg, cipher, key, iv, iv_len, aad, aad_len, cleartext, ciphertext, size, control_tag); + if (!ok) + goto out_noocf; if (!ocf_init_aead_session(alg, key, key_len, iv_len, &ses)) - goto out; + goto out_noocf; /* OCF encrypt */ error = ocf_aead(&ses, iv, iv_len, aad, aad_len, cleartext, buffer, @@ -1600,6 +1717,7 @@ run_aead_test(const struct alg *alg, size_t aad_len, size_t size, out: ocf_destroy_session(&ses); +out_noocf: free(aad); free(ciphertext); free(buffer); From nobody Sat Nov 30 16:51:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x075rbzz5fJBJ; Sat, 30 Nov 2024 16:51:35 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x0736w0z4nws; Sat, 30 Nov 2024 16:51:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j9k7lq6KhvPt5G7D1iGjXEFjnOWmdKzhPb9Zs3ne0CA=; b=Ljnofu6y2zafdadXYV+eB+LajQdlms0ZOWmRYpD1b85w1P2HSMdZX8Xk+Yf2Rw4X7mYeaF duGdCBHVceK6YIEQA068fXW20K9155qjM440q9Z9W90+QXUY8/BSWoG+Jx9f1gf8LOXBX6 es90me7KluEGNytEcsTW/QOtKhIte0FZYMN0TjoXVqFQjSvTy3f2Wf/Cjw1+Xny3QV2WFG OMeDgyM4chODkJHSjrWYjDpY1JAYKSjbq4dio58YxU71nXETt+h4cXkGF2oWQ9Lj0Yfl9y 5LQg9FjlAVIJ8bo+2YbE3oWcWXu28CoQJcKmmxAwUQlkcBVxIneNPklHn/q5GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j9k7lq6KhvPt5G7D1iGjXEFjnOWmdKzhPb9Zs3ne0CA=; b=ZRU5lKjkX1hpe6ZzezZreAw2HHHrMGk2siAb0K8LBgphGgO0EVrV4pGXe8yiNjjj8te/Yq 4eRUfwNSJcdTkfUwStn+SEXpDDbDfmzWgpsxwc9Syplyry1pBpJJLBmFh2iWBRrosyGa3H BjRwpD76q1glgp7fGmjRPk8bbotgYwgIddA6Yy4+koDx3W8AqtSUZJpmhYBuTq1oNue9SJ Q/Uh1k/sChDVEr8VXlll8sXgMsvSEnwa/ezTyTQJdlv01NBibfkgphVK4tyLWJk1hrzZyq wg/ONSoPEOhNYJxSf9PxWykSsGx5tGD6EmgtAFsN4GRqaDfDi7FD941lJT35IQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985495; a=rsa-sha256; cv=none; b=e94es0iiME4Lfexr+O8j+jjSuIEHzYZAC1T7aVq0v3IYxdaZFiN46GzK68IfVA9Cw/rokt YH9VnA7mqfszP/sniFCMfNpe0AxbA1rYURvsTgkh5TGEb4twnrMwF0pLJAeIAPx7cFSqiQ uKW14Nb5nDPEG6lJbWYpZb0QHcCjo26f15mbwk9swxc7Pg1jSAZssbMOdUoqh0ENEqivdm lR0P9Jvs1PyHVVpijd/RD0oWEOmCiTjbj7cXsLx8IjkxVvAleHAKyhmoj0DVFAt12ipP8J IUNApyjkSlvrVl6xUzr5EfOgoRFYOW0DT0hasWQtMllP1DZmEeFYg/i5PNnafg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x072jyHzGkw; Sat, 30 Nov 2024 16:51:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpZag049729; Sat, 30 Nov 2024 16:51:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpZwj049717; Sat, 30 Nov 2024 16:51:35 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:35 GMT Message-Id: <202411301651.4AUGpZwj049717@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 3cbb192a9ee8 - stable/13 - stdatomic: Only use clang atomics if __clang__ is defined List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3cbb192a9ee8118b50fb926592c7caf1888f6b20 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3cbb192a9ee8118b50fb926592c7caf1888f6b20 commit 3cbb192a9ee8118b50fb926592c7caf1888f6b20 Author: John Baldwin AuthorDate: 2024-07-19 17:01:07 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:25:18 +0000 stdatomic: Only use clang atomics if __clang__ is defined GCC 14 defines __has_extension(c_atomic) but does not support __c11_atomic_*, so require __clang__ for the CLANG_ATOMICS case. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D46001 (cherry picked from commit 680f40f38343de118d5b973129683804e496faaf) --- sys/sys/stdatomic.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/stdatomic.h b/sys/sys/stdatomic.h index e05606b1ead8..099097ea84a4 100644 --- a/sys/sys/stdatomic.h +++ b/sys/sys/stdatomic.h @@ -33,7 +33,8 @@ #include #include -#if __has_extension(c_atomic) || __has_extension(cxx_atomic) +#if (__has_extension(c_atomic) || __has_extension(cxx_atomic)) && \ + defined(__clang__) #define __CLANG_ATOMICS #elif __GNUC_PREREQ__(4, 7) #define __GNUC_ATOMICS From nobody Sat Nov 30 16:51:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x0852vgz5fJRD; Sat, 30 Nov 2024 16:51:36 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x0841rNz4p4L; Sat, 30 Nov 2024 16:51:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eva0uqN4xZfgH7G89A8pmczXuqfCEVIFMLGpr2McjoQ=; b=Zv+hol8iktxs2G9r4TW63Y7as8Pv4eb695BJGvLSZ+kUAt7rPpugEGKusvVGXLr9aDofeO SGtgz3JupuTvhfws99N02Jx5eeCpRO+xtpEclZqufZ+vz8ydrwMgc9sYQ165oULZZ1/Prt oeEs6UvwTbvsJS/BCK3Lef5io8Glk2foPiwOl7N1JZPqY4Ifejdmwefk9xIkuYQMsj3n1s cIG747E8YT6jvZMhlXGKJIIjL0dIFyddVBR0sL/Pphv2JnT/nenqTUdkLw8RXpDcyqCfkX KEnOgtczSzQ4z9aLg3WY1MAE2hIZ+TD8O9FqIkA6BBE2fAZQNt++sPNRdlFtSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eva0uqN4xZfgH7G89A8pmczXuqfCEVIFMLGpr2McjoQ=; b=HAmYurdKnwTC2pVihj2uqfu5x1ssTq/lRA0E3aOimlb6tCFL8YnN6A2cNwj3Doh7SDvvZW +TRFNi252P93r/aIolJ2IisEBaKzGUXR/dusAm1CB32gLfUSAXw6i8SELlwByylYJgcabN eWlnEmi/8u22+mvngdqljod3qMgCp/iMl20u+g+PENlCTclMoRAH3QNeCFH2shEAjeav4F JoBzpJmXqu+mr2d8YK+gJnHq0J1ipyf6FIdACs0muVpV1EsupwuFiOV4NUrlkwqWjnDq1N RZpkE2JrfN+oCI2V5yJDre7D0WKwCD+nyVqM+FDy1vrkXKha3sXsdK8cJ1aw7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985496; a=rsa-sha256; cv=none; b=mjdulcUqHks+falayj14RdSwfERQH8Ai6V9m1nYtl0QkM5prKdFCr3GmVdDFgtrVhRBFtm IP3Wr3zzrTYJSEr7L+olmfD+9IAl7BLTkB3ho9k5lbummW1EKjCkv0OKanBtze6o2PQ43f o89RJneVnMjHFzMVrmpJwBAdnfjzmTBR3Vp5hMvIuoCniEUPqf0yGT6O4CkchD6BFf6Ifw xm3JyKIHOsh1fZ73dUPZjZsG0uj4yoDbhwo1YMVzH3TE6dlnYiHj1o6S2yGd0sTQT4XLxm GNBpDRFhTUg8oQFNo6KbRcQgpIvZ2EgGgnqYWZOgZrTW67O82qcxB0lUeE+ZDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x083fD4zGQV; Sat, 30 Nov 2024 16:51:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpaMt050377; Sat, 30 Nov 2024 16:51:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpaqP050374; Sat, 30 Nov 2024 16:51:36 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:36 GMT Message-Id: <202411301651.4AUGpaqP050374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a56dc7e6c774 - stable/13 - libcasper: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a56dc7e6c774e3bfe8afa7f8d9d445ec6450f9df Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a56dc7e6c774e3bfe8afa7f8d9d445ec6450f9df commit a56dc7e6c774e3bfe8afa7f8d9d445ec6450f9df Author: John Baldwin AuthorDate: 2024-07-19 17:01:40 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:25:37 +0000 libcasper: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46005 (cherry picked from commit 5275d1ddb42dc70fb87925e59445059068c08271) --- lib/libcasper/services/cap_dns/cap_dns.c | 4 ++-- lib/libcasper/services/cap_net/cap_net.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libcasper/services/cap_dns/cap_dns.c b/lib/libcasper/services/cap_dns/cap_dns.c index 1e552d2dc252..a5223a0ea4a5 100644 --- a/lib/libcasper/services/cap_dns/cap_dns.c +++ b/lib/libcasper/services/cap_dns/cap_dns.c @@ -84,7 +84,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_length = (int)nvlist_get_number(nvl, "length"); nitems = (unsigned int)nvlist_get_number(nvl, "naliases"); - hp->h_aliases = calloc(sizeof(hp->h_aliases[0]), nitems + 1); + hp->h_aliases = calloc(nitems + 1, sizeof(hp->h_aliases[0])); if (hp->h_aliases == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { @@ -98,7 +98,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_aliases[ii] = NULL; nitems = (unsigned int)nvlist_get_number(nvl, "naddrs"); - hp->h_addr_list = calloc(sizeof(hp->h_addr_list[0]), nitems + 1); + hp->h_addr_list = calloc(nitems + 1, sizeof(hp->h_addr_list[0])); if (hp->h_addr_list == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { diff --git a/lib/libcasper/services/cap_net/cap_net.c b/lib/libcasper/services/cap_net/cap_net.c index c29bc36bf64c..62eddd0a80a8 100644 --- a/lib/libcasper/services/cap_net/cap_net.c +++ b/lib/libcasper/services/cap_net/cap_net.c @@ -105,7 +105,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_length = (int)nvlist_get_number(nvl, "length"); nitems = (unsigned int)nvlist_get_number(nvl, "naliases"); - hp->h_aliases = calloc(sizeof(hp->h_aliases[0]), nitems + 1); + hp->h_aliases = calloc(nitems + 1, sizeof(hp->h_aliases[0])); if (hp->h_aliases == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { @@ -119,7 +119,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_aliases[ii] = NULL; nitems = (unsigned int)nvlist_get_number(nvl, "naddrs"); - hp->h_addr_list = calloc(sizeof(hp->h_addr_list[0]), nitems + 1); + hp->h_addr_list = calloc(nitems + 1, sizeof(hp->h_addr_list[0])); if (hp->h_addr_list == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { From nobody Sat Nov 30 16:51:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x0B07y2z5fJRL; Sat, 30 Nov 2024 16:51:38 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x095Bzbz4pJJ; Sat, 30 Nov 2024 16:51:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwdmXTKarELfExstDJVQTLeu7uhoG+riTlAVqGXg5eA=; b=fhLvxxgRVbw+PjU/K8XfgimeP2WJpnCjJF6E7HpaEIw/fMKWa106atUT1LuccK8GvvDU8U xx+pGE9ioQ68z9KLyKGk+lyVOa9t4kmupcy0W1oohmKFgr3n7ZzgQ8YJdwk8yVi1bvLQp3 nhwUwQaveoCvF2s42ZBfGn17vnyXfC78zqbFU35TGZ9sBtXabhcpJgNvjbtqi4hD21zH1i ZD/fFmCReiXcGBsUjlpMGlwOGIriXorIooHF+3FE3peJvZaryORFo3MHWptZx/qjbGwNXQ raMNBNLe7uMXCESoJBMUa0rvYwzy3gTPhv8+J42diOegS3O5KSgl0vPUno8L8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwdmXTKarELfExstDJVQTLeu7uhoG+riTlAVqGXg5eA=; b=tWjcX/U9dixAGCIYkywDyl0XVPBHIt7tr0A7dwki3VrMcAkpevomFk52ar8/wwBdbev91y b1LimUqRHj7JUY4hcSUlXy30i6CFnJ3Afzix7GH8tl+DlwX6goY3Q3ugEl0mFoXb/mz7fj 6x633uEVSacMbPVfPqf8YemdGa8ssHTAwwJLpk44/eaHw6369vGKfP8ei+6YIUect2i9kO oA4Xd+ofvrD9pICyZ/rZVwOWjXAXPVTuc/yOvtQAfM2dkpyAS097oGdGvpDhCBaMXqIWO1 aDF2S5qUleaGAfcWcD1MSpKI+alc0oKDdTkEFRuhqOCY/wmzlGf4haFbTE3p7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985497; a=rsa-sha256; cv=none; b=TViNvvd4agYmdbXvGvUMEdyN9kwBs3hmWHyEMT4xqTLf6Y/M9qZwiwIdSjWq+h8wmBFkLr YQmKXA7JW6PjwWObI0tOf526F2EGKz+YB2nECyylQ/sqtFv0qWZM3J77S0ZWNH8v2bCCeW vVPN9/sq78pSISEPbjEhJOv5CRA5y5KY0akFNiYH45z8xqGiSsifIX2KLyPfEgKZrTvqQG I2B/eahmV4N7ZmuDaJkBCv5no73OhFU9YvCMKwE6B6Z53k/7RaRMLF3wCcet8r8hiZ5xqx FTQ8ihGAdsIi+QnoNnAch6h3J2GJd6Zy5RXAo/SQYV83Pp3jSqy2MbpfD9tFhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x094kSFzGTQ; Sat, 30 Nov 2024 16:51:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpbwA050437; Sat, 30 Nov 2024 16:51:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpb8B050434; Sat, 30 Nov 2024 16:51:37 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:37 GMT Message-Id: <202411301651.4AUGpb8B050434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d38bcd8919d6 - stable/13 - libgeom: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d38bcd8919d6312862e891fa2a58c8865ce55afe Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d38bcd8919d6312862e891fa2a58c8865ce55afe commit d38bcd8919d6312862e891fa2a58c8865ce55afe Author: John Baldwin AuthorDate: 2024-07-19 17:02:05 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:25:49 +0000 libgeom: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46006 (cherry picked from commit bf3b889a5be141f3abadcfc5a1d1cbdc50273d72) --- lib/libgeom/geom_xml2tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libgeom/geom_xml2tree.c b/lib/libgeom/geom_xml2tree.c index 49cbb0385770..2d2c43e29e77 100644 --- a/lib/libgeom/geom_xml2tree.c +++ b/lib/libgeom/geom_xml2tree.c @@ -407,7 +407,7 @@ geom_xml2tree(struct gmesh *gmp, char *p) free(mt); return (error); } - gmp->lg_ident = calloc(sizeof *gmp->lg_ident, mt->nident + 1); + gmp->lg_ident = calloc(mt->nident + 1, sizeof(*gmp->lg_ident)); free(mt); if (gmp->lg_ident == NULL) return (ENOMEM); From nobody Sat Nov 30 16:51:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x0C1Hh9z5fJBR; Sat, 30 Nov 2024 16:51:39 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x0B6BC8z4pCd; Sat, 30 Nov 2024 16:51:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9L5Eue0edMOIs8NwSOTXYXUDEqLKH1Bonq7FCalOZaY=; b=kCaltqn72K2ZUOAyCK8U6Uhoj6o/ezlY2T7Ilt8sLkA2db2OaXlvtbDiFKDBtNBMn2LgSe AVjSao2eJm/op/AR7qCCCxhEmja7BNVY9TUynmfCxLvmNaXBk2onKrRbez7+1B3icK4BWa vvCkOSL5EooUEnW4BuFhmRrewI1Zsjpv1+qJUEO996pSRlC1XPPlkdjllH7XII+iWItccN Pt+b+arQJDFtGXroQaIWnflH6Ph/dGKgndJlmEEK+vkFNtwQZYnx4PQiS9hhUumhgjW9U9 ZRPim11TS/SMb+5EPy6VWg58L4xhm7AhZuJjiLeSUnUbD58hGJ/atCOk/soO/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9L5Eue0edMOIs8NwSOTXYXUDEqLKH1Bonq7FCalOZaY=; b=eDQX3bTaufjIVBVQIPlmcsUz1jpBUeMZpk1jYuWLpuzxIhihcAMZXKlESzo2SULnw+ZudZ 4Xv6vld9R/ZAazK0tUddR1YhzfBibGrYBqAtJrtJIoWpsovHjo0DmCohBJQthG3D5A0yMG zvZ+X2ecVBUmXON/MUM1k8+92GWoJdPU5KvJdsvntClneOxIEQquD26FtfRFl+KvZ6S7P2 fxU11Upxx3XEC+ILVQGdYrMj7EBfo2toYukq8dbnPmK5GG0JC86KjnoBeHVZ1mPogXN1tZ epH7oX5Le9ppzK6OLjdMx4I2U3cc/0hR44H3wNbCkzEWBTbPKUqMMxJaEl70VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985498; a=rsa-sha256; cv=none; b=LgmCgAPIrv2Qe6FJI7ePg4YZ1RsmmYGahAhl4X7XZVeIcMRB62AKsAP3RNHMCBgGaUB4l1 rG+S+DdSAqxh1BEUFEZcw83knkvvWsZcyePb46nrV5guqOAIvKWePEKFBnVUCumj180REQ c1toHC+UIBdH3TzA+SooN/6hEW7DdmZJMAnKLPRgzjOr4KKK3Jvi08Ung2XhgJJZmvjpwR ySFqnuYnUc4IYkhrM+604Esl002375fA532sglD7ksK3vyU18eqI972yuP9WMhumeGCt/N e2+cCaOaWHqPjW9N0LUTZ9CvtNyzVJk4mnisIkjn08IUwEWkcOfSwAY0hWFZ6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x0B5p7QzGhV; Sat, 30 Nov 2024 16:51:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpcHr050506; Sat, 30 Nov 2024 16:51:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpc3f050503; Sat, 30 Nov 2024 16:51:38 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:38 GMT Message-Id: <202411301651.4AUGpc3f050503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: db9ce08054dc - stable/13 - elftoolchain: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: db9ce08054dc0a4d1614140f7fb87f31130ca7bf Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=db9ce08054dc0a4d1614140f7fb87f31130ca7bf commit db9ce08054dc0a4d1614140f7fb87f31130ca7bf Author: John Baldwin AuthorDate: 2024-07-19 17:02:45 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:25:58 +0000 elftoolchain: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46007 (cherry picked from commit b73445a32f8a3648372c0042ef633fe61b38d135) --- contrib/elftoolchain/libdwarf/libdwarf_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/elftoolchain/libdwarf/libdwarf_init.c b/contrib/elftoolchain/libdwarf/libdwarf_init.c index b85c87c59af0..95ed6147ba89 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf_init.c +++ b/contrib/elftoolchain/libdwarf/libdwarf_init.c @@ -302,7 +302,7 @@ _dwarf_alloc(Dwarf_Debug *ret_dbg, int mode, Dwarf_Error *error) { Dwarf_Debug dbg; - if ((dbg = calloc(sizeof(struct _Dwarf_Debug), 1)) == NULL) { + if ((dbg = calloc(1, sizeof(struct _Dwarf_Debug))) == NULL) { DWARF_SET_ERROR(dbg, error, DW_DLE_MEMORY); return (DW_DLE_MEMORY); } From nobody Sat Nov 30 16:51:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x0D2sbfz5fJDT; Sat, 30 Nov 2024 16:51:40 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x0C6w6gz4pLh; Sat, 30 Nov 2024 16:51:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UkjPPM2F0GAf3atVrN7k1qd0BGQbJ6JkM52UOMuC2XE=; b=VJK9h4uW7+VqeHcSe0426BFzYbJBMdo1LqD1Xb3rz4VO7MpeN5rOjHByJp6FEPBSBCtbbs rSASWcleqEjyywyNPFhrWUkJgXarcPAyYUyXdEnhUvmOi65V1e3dsDeWoQYSJ4PyCBedqG C2i7Gq8BhVugaxYS+xPydzAELe+auPNHHO4UMZVGMNvS4G6/nWrjvdiS2aQyiwgYx8t1uf vmcq95qQoeUJI6OnyAkO5zIwdBLzmCNggZjTAWzjf7XRgfWlmhaaG4oifAKh4C5IL97jFP bFbellMGKd/dq2itLANmeH/9jtCvv9Tgx50motVC8W2IzGIQFQ4sxzjMbQ/AFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UkjPPM2F0GAf3atVrN7k1qd0BGQbJ6JkM52UOMuC2XE=; b=xaOqWzyV1XobRUZnn9TyP+5wLCKo7VEE+KI7xV3ctKqrupgJ6gNyy6azbrUyppeGt6g8El q7bfJB3rARH59Vle+suQ+w3Yu++XNcyBNIV8NJ3skBoe/sAnE8aH1nuELRkvzAVLk1PUI4 p5WvuzXIpqlfqAgrBfIWT8SuUJ4oywY+PfAKFpwUO/a+Way6JudWFZttKQXFgzXw999U95 tu0+w88VTgIqulyehHVGhFKwtbsPenDdjimMZFDN2jHdtlkR7WUInjt9hoU0O/+LNbykNh B5+QSIpgi350XE30teqRUOZtO/vlxNMY4nDlMvDGSAKx4C0TfyBOCV8YlDPPnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985500; a=rsa-sha256; cv=none; b=NFs7graV/ns4HOUAp+SyX98b4/N2n4PI8WJ2xFzgXzdl1LKMNq/h8KcRi6USI3u3AmMUZ1 iQmlelpsE9xntUOVqNHSqtiJWPhtGc190h/UZqX9wt6BVGYI7sFdN3Z+b/YePodrs2gXL3 a05ctcuJ2mHwpPs6L4RztaYwDVJLf+4uPXCXjw7FouUM8nLXhu2QK87FP3KkjTuutaOzON GF1ZRjKDMxZt2NtVeHeBTMcttamlh1cvGHBPyZNCxAEebFPP0mpHIE0KtgP7ZKHp6J8yNN DQr/MPwyymdTJA2kR+CmYKE9KlbgT0ZBX6byUCNjCSG+t/DJ8MKqPd5re9G51Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x0C6WwPzGky; Sat, 30 Nov 2024 16:51:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpd5p050566; Sat, 30 Nov 2024 16:51:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpd68050563; Sat, 30 Nov 2024 16:51:39 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:39 GMT Message-Id: <202411301651.4AUGpd68050563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 73b0985e68e5 - stable/13 - lib80211: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 73b0985e68e554719cb40ba026418c80ae8740e0 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=73b0985e68e554719cb40ba026418c80ae8740e0 commit 73b0985e68e554719cb40ba026418c80ae8740e0 Author: John Baldwin AuthorDate: 2024-07-19 17:03:19 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:26:09 +0000 lib80211: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46008 (cherry picked from commit 8aadd10a65b11f18950118a10569233e1420ab45) --- lib/lib80211/lib80211_regdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lib80211/lib80211_regdomain.c b/lib/lib80211/lib80211_regdomain.c index 189d4661c78b..db353a69f4d9 100644 --- a/lib/lib80211/lib80211_regdomain.c +++ b/lib/lib80211/lib80211_regdomain.c @@ -441,7 +441,7 @@ lib80211_regdomain_readconfig(struct regdata *rdp, const void *p, size_t len) XML_ParserFree(mt->parser); /* setup the identifer table */ - rdp->ident = calloc(sizeof(struct ident), mt->nident + 1); + rdp->ident = calloc(mt->nident + 1, sizeof(struct ident)); if (rdp->ident == NULL) return ENOMEM; free(mt); From nobody Sat Nov 30 16:51:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x0F4Frrz5fJRS; Sat, 30 Nov 2024 16:51:41 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x0F13wQz4p5R; Sat, 30 Nov 2024 16:51:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=svNxW35t3QtZHSvU9mjO1gkW2hOaAoPpCAQICRrOGYQ=; b=mM1xUA+TCJ2Z/n8zv1OgioxuTRKqic9soBYJ5fZ7CUAJyDG8+jrvJNApoyC9xuAa3dOoVP iVc7YUPWDShTCpLKe4lxUI2WG+627KgyA5UANpcnEh4gnNKWjtoQUxPc1yYz6TIIb0locH TYVyvpneOPfDaPDab29ymY+lW+Cul13NIwD0B9o9nR85wq3Gb3NLDg5/vvee9ft7HlXJ4h Uohb9WpFdOiznj8lR5gFS96Y9aehOU93jncj4O47uWl5G6oQRZaFxTpXNOwGdlMUIzgPa0 FjyKqltThMIoPMIbKmfb7yxpxBQpy7bfbX/OO8NRJG7KhwzENCA+MIVqzCGJpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=svNxW35t3QtZHSvU9mjO1gkW2hOaAoPpCAQICRrOGYQ=; b=E2R2lTitaU2qMtuOzcBU+RmCoHcvhDpGHa3+ZVSxLPRUzxzwoSjtH7mcyntKN7EH/dmZzk o4n2z5/A0D2Os5hBy369uI9z533Njr9+pAEKXB4vbtMWkcMvn4PO6kf63i+MYi8HZwhRVC r0VZHxIpE/HVpgLLnNAtjdD9aDr2NToqooh8ZEMu9Ch62nBKOXVFXW4FYz+Y1od3R/+Itl WNrfCu+i38xtUP2hlJyZnipbIBX3k1I6h/Pk/0uEOlWcFMrutci95hb3QPlMwAxslVepVp 6jwcwj43PEhq67KsXSx6js1j9MIXOak38DoYU7H5wTLsm8pCUVMM12DKs69yLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985501; a=rsa-sha256; cv=none; b=RTb6rCc/EREtzjggnj5rYIlz49It8bLCEeJ2o49J8I8TKz3pGSN/cMoPFcPAN4yNha4GaC N/VusBCnpvhx6939qzy6somb9S/VGjEtT8ETLDayuquwM1OOtVXQ4HjQVcEDUHXILsW1+n Nwd9UUiqF8tMQwiutqOhvEOK+meBz8grM1g1af/37JjLvlFGL4Gr8O+beAljvCZLKr5eal xaOui9MyfTOdf2OOBz0VahhcAl988I9MVav504vOua8l/ytOYyYZmQ4fpVNl7lU+8XczPt eELYljgtenxncHoRKEkVrZwSjI38JN+6jlj74thokhwm+Jwa0PSLBhWUgcgIBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x0F0gGTzGl1; Sat, 30 Nov 2024 16:51:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpe2u051330; Sat, 30 Nov 2024 16:51:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpeJx051314; Sat, 30 Nov 2024 16:51:40 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:40 GMT Message-Id: <202411301651.4AUGpeJx051314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7380c8ea849f - stable/13 - md5: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7380c8ea849f717833043e90a547aeaf50908416 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7380c8ea849f717833043e90a547aeaf50908416 commit 7380c8ea849f717833043e90a547aeaf50908416 Author: John Baldwin AuthorDate: 2024-07-19 17:04:27 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:27:26 +0000 md5: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D46009 (cherry picked from commit e8e2ab3c55228d66388a0b33de8c5ac4b3d6dbe9) --- sbin/md5/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index d895e59a3d59..1d99b4339e0f 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -352,7 +352,7 @@ main(int argc, char *argv[]) * Replace argv by an array of filenames from the digest file */ argc = 0; - argv = (char**)calloc(sizeof(char *), numrecs + 1); + argv = calloc(numrecs + 1, sizeof(char *)); for (rec = head; rec != NULL; rec = rec->next) { argv[argc] = rec->filename; argc++; From nobody Sat Nov 30 16:51:42 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x0G53KFz5fJDV; Sat, 30 Nov 2024 16:51:42 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x0G2CBNz4pH9; Sat, 30 Nov 2024 16:51:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wiDVETJDAkc+VhHwwUpa8gzLVty09uz4A2p9vwVymWE=; b=MgErkBFX3Umod7+96sBhLHit+1LyEQsBn/1ehkzg6pfoTKhgjbRXSd9BnJ3ZZctrsiKU4w MTRLnki8b87x53vHoWWlyWm71vaF+SWEv7QPy0n+ZEYOuGlkLQW8VQi6h9feCfKqam1xfp GVVfhQ8+GQO2ZhLalNEBL8GEqKdfTLjcvI7CIHGN9DhLi+yCmoUNelp0JM7cp/RiIyBWDP ne9iY5sw1XbY7ppuySroZuY5wrHWn2aq5PlIyhFhcMkj+wfbMBjuYaS6zu3AMMq+ekQ86q M0UCweD1BzsZGemUcwGxJdwiHWm5AoNRqBTU/5UU/oiQ91Sv7roRKMpwPL6bFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wiDVETJDAkc+VhHwwUpa8gzLVty09uz4A2p9vwVymWE=; b=fQdcEjS+5BvYMkLGb2wDZjrEWkZgwwOe6UN7uEUYKnhpafX3DOKo2ocCLVsQES4hjq5uFt fwMuWx8uhX+sPlpXLO4cmH9znBlssztJzetXu1lwTMFCxSf5Lqhc2mbA6Qjz+iJDE4p1Qd +6wvAVmn87vRTGJAwcDVvJ/oZ04cSNyLEA6mt67rIh0quqZIbFP07n/QPDh05kmvoFi6Vz v0Wp4ldwDZ3bKcSUlrqzCO3nbCd+5bjtc6XqPHaaG/A2o4nkqibJF2cePXwtkqI+2L8FNI VIG0zVDeH4hcgyoZLNlLQ+NlLyzxeC4kFPKyEoIGtBz3m5Rx4axBjPcyDL2ocQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985502; a=rsa-sha256; cv=none; b=jI/SMHZoi5We+7jp59o3pdz2ClCC+0F0ixgGc/rjHqRkMbKCEVUGDaw3Q8Jj7/8KHptgwK BliI9ss0Tp2jGKJ6gu2pCDHhflQJxcZSqXqPCSGRBqp1eyCv9fqdsF38kTF+O0sBzUwIha 9CtsfLEFAw5zXJ+5f6dYAkgrA3WUlD/vp2C7M8w+Y08Md+aTHa1RnmVqq8gVDlZst5t7Q/ 1L+JgxpYoU4jDMvBq2G6Eo9UFgIrr+ojrOkvMaI3zaUELxTq/9FV/7gbYCBXqMjnWY2O10 4RVmPC8UnW86WJv69vezvxTAmbYe6ZsEJRs1OmyVNtzhHVfc191ZAg5GBPZrYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x0G1nFZzG0S; Sat, 30 Nov 2024 16:51:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpgjL051704; Sat, 30 Nov 2024 16:51:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpgqX051701; Sat, 30 Nov 2024 16:51:42 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:42 GMT Message-Id: <202411301651.4AUGpgqX051701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 87c5b0f8d80e - stable/13 - recoverdisk: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 87c5b0f8d80e86f473ce10447b797f59afa1d998 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=87c5b0f8d80e86f473ce10447b797f59afa1d998 commit 87c5b0f8d80e86f473ce10447b797f59afa1d998 Author: John Baldwin AuthorDate: 2024-07-19 17:04:50 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:27:44 +0000 recoverdisk: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46010 (cherry picked from commit 6991cb36f52a35043132f349a60748eeb382ff32) --- sbin/recoverdisk/recoverdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/recoverdisk/recoverdisk.c b/sbin/recoverdisk/recoverdisk.c index 2ff5f427113c..5fd27a09cb6e 100644 --- a/sbin/recoverdisk/recoverdisk.c +++ b/sbin/recoverdisk/recoverdisk.c @@ -82,7 +82,7 @@ report_good_read2(time_t now, size_t bytes, struct period_head *ph, time_t dt) pp = TAILQ_FIRST(ph); if (pp == NULL || pp->t1 < now) { - pp = calloc(sizeof *pp, 1L); + pp = calloc(1, sizeof(*pp)); assert(pp != NULL); pp->t0 = (now / dt) * dt; pp->t1 = (now / dt + 1) * dt; From nobody Sat Nov 30 16:51:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x0J0qNnz5fJ8F; Sat, 30 Nov 2024 16:51:44 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x0H3HBpz4pDg; Sat, 30 Nov 2024 16:51:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8RArFrTC0MN/40EhGviWOakVOVqF5dOUURqRWlf1vs=; b=Aa+ftoYvRlnIs28luBHIeWQEN3At9VkdTqJamkQoYwJjQZmMaBQqEpDUOTPrRfU1cG18qK uNolom3qvhFZeAZ+4AcnVha0uKJNEXeu0bvD5VsJP8yq/7oox3i8sjcJvkwGy5NOn5f/ET gMOeGt/jgCrabFzPXWeqN58m9xt2MJyyqH6Bdob5h+Ft2CXuBN5y+RbaAxotWYDPnNHQOk oB211yLxAsVR+bYGBJRV6wVXwa4FyD9TOhQLQu+rMp4nY6XZSbdIgVYw8avSJzU1l4eub1 ZvNEfh/dtZspsDvHNaY6+jbgzcFwRd/87PLRlIQLBlDdrgkqF4+XAo4Jj8tK+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8RArFrTC0MN/40EhGviWOakVOVqF5dOUURqRWlf1vs=; b=NE9FC+BDuMxQC3sydKcTNdsTMQGMiiLuHjzVQ9rCv8j5CRyFWsQf/omzMmskf845sxFddv 2JuorUeu4H7ugOwsXalIbJ54E3uMYYEG4nYpR3YPLITjA63L841JyIU3TbzHZZJArfteKc 7V8TKDaTnZ93X2KoJayMnqc1I6GQmZJcrwE0PAGselzCkh4vZLGLseTXzIE3PRM/IwNPWb Rmvn1Jf5boVwzKUN1xm8Nh/N9ntHRtfDYhFYX6Q7VeM7sAl3OVvlre4YvcTN9fXWB7bIwV qPdOQv0tJ8BorBcy6KgFf0fKA8ronzGQik1MpAEC383YkGVqYizdZC3T5631Fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985503; a=rsa-sha256; cv=none; b=cvt05jI7eOjPZggqDJGcOPVXRkp2gD9+FwfYyL7Fjso/WdLxaDaal+R60SH6Ad5nS7wC2C rrXNU9RERbwtuEL8EtIgZHP9DX9dWeHJfaeOuYBqjvRPCI7IXeHfzoa0JaqkWXpLWJFb81 fsfpNd1hp/TVJESZfpedMOOjPAL/OIzOBDTx5vJytpkF8TRYc11zPJEEqgo9tuXLOQcYaq UGU7iqc9HZ0p8cNoy7NckocTxcmjPnDAQ7w+IpmBoJ3PaFKAZeEigsBGidHuZVZyX7SAd/ XDn78N2YtqllxIlcvRNVn2DZ9B60VGHsBv2SC4QHnrcqxJeS4BK4kAVU3EzPMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x0H2p00zGNt; Sat, 30 Nov 2024 16:51:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGphL1051764; Sat, 30 Nov 2024 16:51:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGphLg051761; Sat, 30 Nov 2024 16:51:43 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:43 GMT Message-Id: <202411301651.4AUGphLg051761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f9c59a50a327 - stable/13 - ministat: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f9c59a50a327dbc74c37c3166dcd1beaafbed94b Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f9c59a50a327dbc74c37c3166dcd1beaafbed94b commit f9c59a50a327dbc74c37c3166dcd1beaafbed94b Author: John Baldwin AuthorDate: 2024-07-19 17:05:12 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:27:59 +0000 ministat: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46011 (cherry picked from commit a971c60456223b22c0b3c557d712b36660dbcff9) --- usr.bin/ministat/ministat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/ministat/ministat.c b/usr.bin/ministat/ministat.c index 850c7408c272..b781ef37c50a 100644 --- a/usr.bin/ministat/ministat.c +++ b/usr.bin/ministat/ministat.c @@ -153,7 +153,7 @@ NewSet(void) ds = calloc(1, sizeof *ds); assert(ds != NULL); ds->lpoints = 100000; - ds->points = calloc(sizeof *ds->points, ds->lpoints); + ds->points = calloc(ds->lpoints, sizeof(*ds->points)); assert(ds->points != NULL); ds->syy = NAN; return(ds); @@ -167,7 +167,7 @@ AddPoint(struct dataset *ds, double a) if (ds->n >= ds->lpoints) { dp = ds->points; ds->lpoints *= 4; - ds->points = calloc(sizeof *ds->points, ds->lpoints); + ds->points = calloc(ds->lpoints, sizeof(*ds->points)); assert(ds->points != NULL); memcpy(ds->points, dp, sizeof *dp * ds->n); free(dp); @@ -356,7 +356,7 @@ PlotSet(struct dataset *ds, int val) bar = 0; if (pl->bar == NULL) { - pl->bar = calloc(sizeof(char *), pl->num_datasets); + pl->bar = calloc(pl->num_datasets, sizeof(char *)); assert(pl->bar != NULL); } From nobody Sat Nov 30 16:51:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x0K6mPsz5fJBt; Sat, 30 Nov 2024 16:51:45 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x0K54WGz4pQ4; Sat, 30 Nov 2024 16:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GfccOn69c89WXytP4it5vWp3+Dpq0sk3mfpECU6XZrw=; b=XXWpgoF6kuMdrvVLfHBqxkPSThez644/VQPkz2nQSGEpUFhvdvqaBcVNnUnvZqIaSf++rG tvduy/Cg8nXDu/KtVoGZVgsauMSG6kB+mWgvn5ZPqonfHKQ8/Ci5+FXEWpVua+TpCt0mGK RgVqAEzYtBezMIsSzGtMco4j0pcmko7OabfwOo4zHZ57jI7VB5Ljq/52QUifWUSNlXuxVn SBflDC/pxWgdrxIPp2mUdEMEoDwaDP31OcnRwzpDryA3NFVBeh4ZyWkhKl+Cf7BOLLr7CL G1HSsiGeYjroWxY87tbLpbGHjJdvW7STAj7JNxaFg/K0pHttkOah560VxlrtpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GfccOn69c89WXytP4it5vWp3+Dpq0sk3mfpECU6XZrw=; b=ka7tS6C3s86pFuEFzSmlIzZjSeya24/9IbDcW4OvXihm82wFfrIEbAU7BoCuuMck0yA83w Qb60FDiLo/LpdNIg+XDR7zpHsovLEkPlFcPdXdQw+kDxamq/h4tAWBGUvHsHRZFfTrVFBI oAiN/4GQ2hL01zYjH4jbvqRIBrE32DuShl49ROC4xzuMtdyLAqn5mocSO6BtHhRvY1Ikqv ysDSflkTC5ANnXVAejlqIdYyN2x3WTmTfnQhVAwxjRK8/e6RJsoTwG8JQFI8zQknrCbQWK nQM3eaTA1KAwI1CMF9glRFr59+90A6XdRyBDtX90ou47DOvBoOQIO3hR9LdhoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985505; a=rsa-sha256; cv=none; b=IDze63cQrQOFcSanaKA/qUT0PUCj4pqKI1Kqa9NQ6IKqXv4663pe0XPBPi/crTZbcVPh/P 7qPVFH1pG2cVWBauM4Me7U3x6+Ra1I/NLnqvrvQoHTYGo6nAzzPSM+J3aTAlA7o5QSVunc Uu4jSoOwbpqQs4g8qC1F3QQpabuZVB8E2/Nrkgh5KYHDbj1yZcjb/VHLbfXM7ZnezTICQj CmIV/h5cN5CJsolS6cRjkoG5dHnMLt2JOHoXpwTyTr6JqOcdMc7Cp3SQRptCqOIN8NBZ/a HYE2Z+ezOCsJ3j4FgRdfmqgygGYLIZf72t5ASo9Ytls/ZxAx7PbaJEK7DL0YtA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x0K4fcPzGW0; Sat, 30 Nov 2024 16:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpjAW051894; Sat, 30 Nov 2024 16:51:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpjRI051891; Sat, 30 Nov 2024 16:51:45 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:45 GMT Message-Id: <202411301651.4AUGpjRI051891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 94bac852544e - stable/13 - fwcontrol: Allocate full fw_asyreq structures passed to the kernel List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 94bac852544e52ba3b67ca5f6004ff644c920669 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=94bac852544e52ba3b67ca5f6004ff644c920669 commit 94bac852544e52ba3b67ca5f6004ff644c920669 Author: John Baldwin AuthorDate: 2024-07-19 17:08:14 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:29:28 +0000 fwcontrol: Allocate full fw_asyreq structures passed to the kernel The FW_ASYREQ ioctl accepts a struct fw_asyreq object as its argument, meaning that the kernel always copies in the full structure in sys_ioctl before passing the request down to the driver. However, fwcontrol was allocating smaller objects that contained only the request header and a variable-sized payload. This means that the kernel copy in sys_ioctl was reading off the end of this buffer. On current architectures this happened to be ok, but it is UB. Instead, allocate a full structure. Reported by: GCC 14 -Walloc-size Reviewed by: rlibby, brooks Differential Revision: https://reviews.freebsd.org/D46014 (cherry picked from commit 9494dfe1b3faf5c48abaa9be4ec87e4669963942) --- usr.sbin/fwcontrol/fwcontrol.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/fwcontrol/fwcontrol.c b/usr.sbin/fwcontrol/fwcontrol.c index 94478259606d..ce908341a42a 100644 --- a/usr.sbin/fwcontrol/fwcontrol.c +++ b/usr.sbin/fwcontrol/fwcontrol.c @@ -207,7 +207,7 @@ read_write_quad(int fd, struct fw_eui64 eui, u_int32_t addr_lo, int readmode, u_ struct fw_asyreq *asyreq; u_int32_t *qld, res; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 16; @@ -262,7 +262,7 @@ send_phy_config(int fd, int root_node, int gap_count) { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 12; @@ -289,7 +289,7 @@ link_on(int fd, int node) { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 12; @@ -308,7 +308,7 @@ reset_start(int fd, int node) { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 16; From nobody Sat Nov 30 16:51:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0x0J5Ydvz5fJ1x; Sat, 30 Nov 2024 16:51:44 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x0J4CrJz4pMw; Sat, 30 Nov 2024 16:51:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5emGVlp0ip1WOEguEkPBwC1NwfN521JFNEzOmTlqaoc=; b=RXWfpQ7G/Nf5LSlQzGLlKL5BSagIEB335l/Hmj2j2Rcq3go4gxUd0JyyHqzHa1vtPc6qlJ 1yFoIbPLEHpV9itEGLVou9nE7WmYrdBGxdaJ+9hrFgQkr2ldmVK5TfmJQNESSJkW+jtGue x/W4/E5m+xqe5enCJnm5jmMVjA/jyYIBRTmLPjJv9INXPFaKR17v60iUoUGEqSfewQFYv3 QSaDONuoVAPfOm+711caVhjLshh+dl4yP9ecQAJ0y559ubYS3Y8TELB1cg+ifN72lKfxAj YTHMrZhfquu/CaO6+JS14PwB+iBYNB3aRO/8zLylVxZ24w9HPwhlTsJUnMd5Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5emGVlp0ip1WOEguEkPBwC1NwfN521JFNEzOmTlqaoc=; b=ytmVid2Ic6Pi9Sg3pVa3gDODL7vmVKCJqsBfEUk8FmSA0ytWK0MyuA5EtyE5uOire7Rysf 0lkkojZTLHqJs8z9MDdOFjNmsTct6Oo9YqAjzjXpirqY0TTWqiDQokTm0LIddxYzsACZRO w77NgQyirDnEtviTa2IKjeC1Wn5x0nnUJdYQ8QN7CdgmuWoMYOwtJAcRgIxKGTOwQiN7h6 CNOnlMyPsuv+dOoh8Gzdqc3eNsYxxZPO37VElaM4v/+Mfkv/3bGeisR3gKIpSWH9emN10p LAbzWS7Vnc1ZbFZ+vyVoSQLHcDTaSsZ04OgxVq10PgCBBb4OIBJKJvHu1mL2Yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985504; a=rsa-sha256; cv=none; b=Y69bumJQWFx9KVbFoYtxLA+F8kcsS0usn6b0+V6zeF3cLejD5x+XbI/NWOvKk0HoNO49vl dAJ6ynNiEjolIzrQ/UCIyBsOs9kQ2ToIvnKTmZVcYnJIvrBqhDcXymyo4/oXnNka5OMaiZ xLr/HWDJUFU0k2lEEbcqcTkWSV5Rv082C8u8Qj7cP5LctpS9lrv4twk8j1wp9huU07lM5A hWFR4g/O6ujP6zEnYcAhfhyzinu/VTIUyVErHRYl6i2FgBxACfILFZU5KMCpkq0dR4AbQt dIlNhMOShjUYhW/acQeSTdqf4QMqo4o6yJ/AKbJagQYcXZS5HdJAns8gCB4GXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0x0J3rVtzGVy; Sat, 30 Nov 2024 16:51:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpi1B051832; Sat, 30 Nov 2024 16:51:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpiGV051829; Sat, 30 Nov 2024 16:51:44 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:44 GMT Message-Id: <202411301651.4AUGpiGV051829@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 0c75f14512af - stable/13 - ctld: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0c75f14512afe6abaf9c5fea5a9c4bc29923d42c Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0c75f14512afe6abaf9c5fea5a9c4bc29923d42c commit 0c75f14512afe6abaf9c5fea5a9c4bc29923d42c Author: John Baldwin AuthorDate: 2024-07-19 17:07:22 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:28:59 +0000 ctld: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46013 (cherry picked from commit 2ba12978f67432a3f88b17704391d28e1fc0e788) --- usr.sbin/ctld/isns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ctld/isns.c b/usr.sbin/ctld/isns.c index 3c85c1a3cade..12aacbdef2b2 100644 --- a/usr.sbin/ctld/isns.c +++ b/usr.sbin/ctld/isns.c @@ -49,14 +49,14 @@ isns_req_alloc(void) { struct isns_req *req; - req = calloc(sizeof(struct isns_req), 1); + req = calloc(1, sizeof(struct isns_req)); if (req == NULL) { log_err(1, "calloc"); return (NULL); } req->ir_buflen = sizeof(struct isns_hdr); req->ir_usedlen = 0; - req->ir_buf = calloc(req->ir_buflen, 1); + req->ir_buf = calloc(1, req->ir_buflen); if (req->ir_buf == NULL) { free(req); log_err(1, "calloc"); From nobody Sat Nov 30 17:11:49 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0xRT3HM8z5fKp8; Sat, 30 Nov 2024 17:11:49 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0xRT1NxPz4284; Sat, 30 Nov 2024 17:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732986709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dm2Jg6DtXcPtjfuc1u0hXrctPnu07bhZcKavE7FiAHs=; b=D3PIaEjiEKF6w5OLLpdEqFxrohK9QWUiBoxw5+BbRxL3Ro/aDef3jHpff6lbr83RnvPcYU C4NyHPjNUfrW9KQ9YdZA+KHJVIecTt5D2bsWU8fXESgJf56N1VAA39tiotyUFFNq66tH5S iRQZFNwoo/x9tMCT0/RvlnA+ap9NIdiFwv6ATTuSbPJvi/mw68EP72GdaDIlouC7XaCnZB HrcYK0JMukHq5V+gQMXlHowPrNR8TH0yYMiy/fis2r6+q66yjjAO9qXXDd8EbbIeEQQb+h IGnor1F/MZD3slNuJ5CZIsJOMOy1CQXS/dYSWYceoFMAyPpH3KsDjaIHcUcjWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732986709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dm2Jg6DtXcPtjfuc1u0hXrctPnu07bhZcKavE7FiAHs=; b=CeHpP8g9NAP9tFxGCRGLKqzrmCkp3oqQAZQgHO092vOUpA7PvCLRwOtRt+RzBLBOs5jJ9e Q06Mnixc8xuFW+/dmyXr9DFhUnhq98ZakVdaxmLigvyE6hAdYWTVl8KnNyzN8RuWSHHC/X 3rl5iuclOLXxpCxeNY4/9R+CE6DbXmW1kTwbBhoeLwt4BF7UgvrWqfls0k/cq4gGmy7p9P sNY1fS915xsInv5pdRIgxbnMK5Bzgdh5IIKrODJqzDB/8D8IW9/SgcDuchrmp/qjqqLiTy 2T+aEKE8igfKGghrjOce8G5c4T9PScjWBHVb7OOGdL1J461O+sphfXhBeHE0Ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732986709; a=rsa-sha256; cv=none; b=JOvjK+X+79KrLHm5k28b/LZULH2p6jUpAWL0JFLHQyqa3xAa+r+RTKpjj96coYbvt9EXNg YNUCo8/BTmPs1TG6JMBdYWSsSdie/KbzZT4E/HhUmBdESxLOLaxohirge53Jrtcxkh6ULg pJAAAjqZqjcXyeheiFWt53VZPMjvtzdhgW5xVkn6f6gpzdIRUd8e+9yduB0OeNKibKgYC7 DHzQy2i8EIZ8CKGmOEVL16ND+06IPauruGTGixrH4wMLpuz3LBh5mfQ20JexC2rg4pPiE+ DvTSdnVB7yxZmSnLjXy83tqbN6X4TaHCKEcpD1OQ5+lJs/AZieIzsrFlk3/Uzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0xRT10J8zHNY; Sat, 30 Nov 2024 17:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUHBnux089569; Sat, 30 Nov 2024 17:11:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUHBnJN089566; Sat, 30 Nov 2024 17:11:49 GMT (envelope-from git) Date: Sat, 30 Nov 2024 17:11:49 GMT Message-Id: <202411301711.4AUHBnJN089566@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c77c675a733d - stable/13 - build.7: remove documentation of "make update" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c77c675a733dc229303845a601f72c805d92a4e4 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c77c675a733dc229303845a601f72c805d92a4e4 commit c77c675a733dc229303845a601f72c805d92a4e4 Author: Ceri Davies AuthorDate: 2021-07-01 15:04:33 +0000 Commit: John Baldwin CommitDate: 2024-11-30 16:55:40 +0000 build.7: remove documentation of "make update" update target was removed in e290182bcf3895ca659dff111bca6a077c4708b1 (cherry picked from commit 1f7d11e636abf68d92b052fefe63b687d84c966a) --- share/man/man7/build.7 | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index c6b2f6fd6804..0c352c9f3547 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -22,7 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 13, 2024 +.\" $FreeBSD$ +.\" +.Dd November 30, 2024 .Dt BUILD 7 .Os .Sh NAME @@ -308,9 +310,6 @@ Like with .Va WITHOUT_KERNELS defined so only the worlds for each architecture are built. -.It Cm update -Get updated sources as configured in -.Xr make.conf 5 . .It Cm targets Print a list of supported .Va TARGET @@ -770,26 +769,12 @@ If set, the build process does not run as part of the .Cm buildkernel target. -.It Va NO_DOCUPDATE -If set, the update process does not update the source of the -.Fx -documentation as part of the -.Dq make update -target. .It Va NO_LIBS If set, the libraries phase will be skipped. .It Va NO_OBJWALK If set, no object directories will be created. This should only be used if object directories were created in a previous build and no new directories are connected. -.It Va NO_PORTSUPDATE -If set, the update process does not update the Ports tree as part of the -.Dq make update -target. -.It Va NO_WWWUPDATE -If set, the update process does not update the www tree as part of the -.Dq make update -target. .It Va WORLDFAST If set, the build target .Cm buildworld From nobody Sat Nov 30 17:11:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0xRV5NSxz5fL8H; Sat, 30 Nov 2024 17:11:50 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0xRV2MKZz41vj; Sat, 30 Nov 2024 17:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732986710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l1oOt8qwbZNVoAm6f5RIrFMNAE1Dvyb3l8Plzl28psM=; b=cp8A6nrTlUd6yvhMcMGjKKGmCkd+zFPsMDyKZWzsdyzVO1qzQeu7B10hMrMRckek8orsIA Yx6/pHuol/Qv1o3SqKuKqA6MmfbPx4tLilUauSgo+ZrBZ5f12KAF7ivGjIZBI8L8am8aAW jScBclD1X4nUq0T5LJhY/QqcGDmHD+K924vgM23PoFnBiGz3NPZyyrydHkEPyv+TyQ8+QA i6PSoihAxKgobZ0OHywyFIGKyhzk1tphsPKJbcCx/o/3jronYqYlWRAeeBBRCL50VtlfLc ftGflf9NGuInRvmz68tsVkQlF2n6FQoQ08j7GjR5ZUv/4ti+jM0wWz5/setS0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732986710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l1oOt8qwbZNVoAm6f5RIrFMNAE1Dvyb3l8Plzl28psM=; b=R3I/TMv/y61fe9Be1HnzmMjh2YqOvfO7iJaJn+LRIXnxBwPd/Dtap4zivJNPCKTlcsax4x 0dCLllJfB9IAlHN6Uzxca8jy86o/vawlcRjqnJaALqo7jzwOB+90pw7iA5Hw7rc9m6FhL4 TthL1N9GAykKRX1aBzVNyIW0t2VTcOmvemur0vkcNaKRGOEBIdGcRfJToua3qlfVu4nnKG QWKqURjX03BGFPakXHjpzXyRmRgUCGh9Bc09TstRfeKMYXDlHI2+YXaSHn+KcQ3rS8MvIr vZIO1w5imEqiatWReRVtlBw5xPfCtw5shI5OpBQI98oDWw5ux6CxOZKZ6YZONA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732986710; a=rsa-sha256; cv=none; b=A47gTS2thlM9+Bo6K5AmZMdGR4QR7BKnEslTzIMXcw1vGfBq1q5WKSc/tv4YP3uBkykUrP aClwz9ThcmrGi4BxWJ4Y4grOim2RuxyZColnLabW7n/mGIG7F17evzo04mwCbVsfaa0J6M 11wqIiXCnfbPiqIyv7uSLUsG+fcS6onGPIA/pAOXaZhrCmvR5WPv+Jz/fSyIm91FKFixo/ O10yG75Q6RABKHRXARMJIydAEHw8ge1kWLOgu1Mcrw0Ax7ZMKBIij3JENN4fgBEOWmnU/7 6ajFjWi6SPImSq8Y21PwCX6znSVeVctc85aMtmGAYbJgrvRsix4FMURQ5wK2TQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0xRV1zs8zHHJ; Sat, 30 Nov 2024 17:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUHBoIb089614; Sat, 30 Nov 2024 17:11:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUHBoLh089611; Sat, 30 Nov 2024 17:11:50 GMT (envelope-from git) Date: Sat, 30 Nov 2024 17:11:50 GMT Message-Id: <202411301711.4AUHBoLh089611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 60b9e2fac13a - stable/13 - build.7: Document several toolchain make variables. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 60b9e2fac13ad381518acd253dd33a680dc7a0c8 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=60b9e2fac13ad381518acd253dd33a680dc7a0c8 commit 60b9e2fac13ad381518acd253dd33a680dc7a0c8 Author: John Baldwin AuthorDate: 2023-08-01 21:01:58 +0000 Commit: John Baldwin CommitDate: 2024-11-30 16:56:29 +0000 build.7: Document several toolchain make variables. Document CROSS_TOOLCHAIN, UNIVERSE_TOOLCHAIN, and USE_GCC_TOOLCHAINS. Differential Revision: https://reviews.freebsd.org/D40778 (cherry picked from commit 21ef3591b6119f6972896e6c00cbf9ffb759646e) --- share/man/man7/build.7 | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 0c352c9f3547..57280f967a38 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -509,7 +509,23 @@ Additionally, builds in are influenced by the following .Xr make 1 variables: -.Bl -tag -width ".Va SUBDIR_OVERRIDE" +.Bl -tag -width ".Va LOCAL_MODULES_DIR" +.It Va CROSS_TOOLCHAIN +Requests use of an external toolchain to build either the world or kernel. +This value of this variable can either be the full path to a file, +or the base name of a file in +.Pa ${LOCALBASE}/share/toolchains . +The file should be a make file which sets variables to request an external +toolchain such as +.Va XCC . +.Pp +External toolchains are available in ports for both LLVM and GCC/binutils. +For external toolchains available in ports, +.Va CROSS_TOOLCHAIN +should be set to the name of the package. +LLVM toolchain packages use the name llvm. +GCC toolchains provide separate packages for each architecture and use the +name ${MACHINE_ARCH}-gcc. .It Va KERNCONF Overrides which kernel to build and install for the various kernel make targets. @@ -705,7 +721,7 @@ using the .Fl D option of .Xr make 1 : -.Bl -tag -width ".Va -DNO_KERNELCONFIG" +.Bl -tag -width ".Va LOADER_DEFAULT_INTERP" .It Va LOADER_DEFAULT_INTERP Defines what interpreter the default loader program will have. Valid values include @@ -775,6 +791,10 @@ If set, the libraries phase will be skipped. If set, no object directories will be created. This should only be used if object directories were created in a previous build and no new directories are connected. +.It Va UNIVERSE_TOOLCHAIN +Requests use of the toolchain built as part of the +.Cm universe +target as an external toolchain. .It Va WORLDFAST If set, the build target .Cm buildworld @@ -804,7 +824,7 @@ Builds using the and related targets are influenced by the following .Xr make 1 variables: -.Bl -tag -width ".Va MAKE_JUST_KERNELS" +.Bl -tag -width ".Va USE_GCC_TOOLCHAINS" .It Va JFLAG Pass the value of this variable to each .Xr make 1 @@ -826,6 +846,10 @@ target for each supported architecture instead of the default action of building a world and one or more kernels. This variable implies .Va WITHOUT_KERNELS . +.It Va USE_GCC_TOOLCHAINS +Use external GCC toolchains to build the requested targets. +If the required toolchain package for a supported architecture is not installed, +the build for that architecture is skipped. .It Va TARGETS Only build the listed targets instead of each supported architecture. .It Va EXTRA_TARGETS From nobody Sat Nov 30 18:44:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0zVl2LPrz5fTWR; Sat, 30 Nov 2024 18:44:47 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0zVl1V4zz4Cbk; Sat, 30 Nov 2024 18:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732992287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bqJlBGZDKbR4Ajc9Fw3JUaMMkE2IoacClau5rvScKB0=; b=wj1ywcee1+kCz0J7j0v1ikm/AH3zQrNviceRSjdIIK0cjom/ZIVSZmDHC7mbndCd2z259R 1SdWjl+7jATYwN52PUc2kdN8s+lV5jC2ETZl1l8NpTfbrZrOSibVbBcU6qQPIoZg80RBfx oHWK8mWGBZcS+NmtjlXimVIqDX37nNDEbOt3w9xbpXqitnEji0f4LrYB4DAi5Uk54NjylV sIQfyHNUxBd2IrU4SCGK7N6bJm8t0QjaXMgUSnGSYVugv7H1bYJcvK9WSOfjSbjmC8BAZu kX/Tx39xcvdZgXf0dlob6tGlJIFwaMBCXSeXH/LQvjBWKSlaZdfwjMN7Ir1mbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732992287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bqJlBGZDKbR4Ajc9Fw3JUaMMkE2IoacClau5rvScKB0=; b=SpwsFqxJUineObY6Nj/3oFpF6rSAY8l8rvAdI/m45avFmTR+kYMl2AYBF1Gz9TsIAU3JXw c1claIwLeOthQHoLBLQX5W2PD+R221QoPebZXrocNMX99ocId8osmXX1ssEANmiR+OZZTL 5XLmqFKtIEWmDPxb8t43RNylzng2ld2qmtUIJyP1vZSQMYQJ+DQQTZkozon/0NdVdsgz7M y3fzYi2tMXqutUulPeCVX0nUnO9p5FHW5zM98SMEu2n40c2LtnoW6Mhqs9uf3cL86v46uQ sCe9k0YOJ+VPCjPCDEMwOMBICYeozA7wysd0hSKoiqGs2P2CV2cTwWoaNj8BnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732992287; a=rsa-sha256; cv=none; b=ccUvwdQ4fjGvVft4Z7m8viMhAQHZ2P19kfR9uiIQJ5J8mbpGH62CPc2fhFysBZ5kvPa5tR e+hlGaKqC9l/COZ0kaXZDNemIVpKdhAf7jA7WJJmpU82BBaCEhu6N4FYQL0NwarhG3zfLx DKTLRC2CRocgP2z6XhgjAlVjzRhiwi4K37dd1aanwT29TovU5d08Eu3IvjiP4HJY60mDj8 h77xx9/bTmkzYbFOLibAiU9RKxQljf/XymWaRsqqsP7R8kq693UpPaRksWIEwx2wVWIrKc TDy8VqDXoI1tdSXRxM6itaHy+xKdRJsO/Zy7AL4asymVZd5pAC5ABOOZn6tF3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0zVl15S4zKFG; Sat, 30 Nov 2024 18:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUIilXQ058256; Sat, 30 Nov 2024 18:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUIilrn058253; Sat, 30 Nov 2024 18:44:47 GMT (envelope-from git) Date: Sat, 30 Nov 2024 18:44:47 GMT Message-Id: <202411301844.4AUIilrn058253@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 904a91a90445 - stable/14 - Merge commit cb7a03b41fff from llvm git (by Nikolas Klauser): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 904a91a90445e4c710046f59b375a169b7b54fad Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=904a91a90445e4c710046f59b375a169b7b54fad commit 904a91a90445e4c710046f59b375a169b7b54fad Author: John Baldwin AuthorDate: 2024-08-05 19:19:30 +0000 Commit: John Baldwin CommitDate: 2024-11-30 18:03:18 +0000 Merge commit cb7a03b41fff from llvm git (by Nikolas Klauser): [libc++] Fix failures with GCC 14 (#92663) Fixes #91831 Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D46003 (cherry picked from commit 9bc300465e48e19d794d88d0c158a2adb92c7197) --- contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h | 2 +- contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h | 5 +++++ contrib/llvm-project/libcxx/include/bitset | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h b/contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h index 198f0f5e6809..46ad388ec2ea 100644 --- a/contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h +++ b/contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h @@ -108,7 +108,7 @@ __constexpr_memcmp_equal(const _Tp* __lhs, const _Up* __rhs, __element_count __n } return true; } else { - return __builtin_memcmp(__lhs, __rhs, __count * sizeof(_Tp)) == 0; + return ::__builtin_memcmp(__lhs, __rhs, __count * sizeof(_Tp)) == 0; } } diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h index 54390a1939f7..1048f67055a2 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h @@ -23,8 +23,13 @@ struct remove_pointer { using type _LIBCPP_NODEBUG = __remove_pointer(_Tp); }; +# ifdef _LIBCPP_COMPILER_GCC +template +using __remove_pointer_t = typename remove_pointer<_Tp>::type; +# else template using __remove_pointer_t = __remove_pointer(_Tp); +# endif #else // clang-format off template struct _LIBCPP_TEMPLATE_VIS remove_pointer {typedef _LIBCPP_NODEBUG _Tp type;}; diff --git a/contrib/llvm-project/libcxx/include/bitset b/contrib/llvm-project/libcxx/include/bitset index 308c58995dc3..5ea48d491303 100644 --- a/contrib/llvm-project/libcxx/include/bitset +++ b/contrib/llvm-project/libcxx/include/bitset @@ -376,8 +376,11 @@ template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long __bitset<_N_words, _Size>::to_ullong(true_type, true_type) const { unsigned long long __r = __first_[0]; + _LIBCPP_DIAGNOSTIC_PUSH + _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wshift-count-overflow") for (size_t __i = 1; __i < sizeof(unsigned long long) / sizeof(__storage_type); ++__i) __r |= static_cast(__first_[__i]) << (sizeof(__storage_type) * CHAR_BIT); + _LIBCPP_DIAGNOSTIC_POP return __r; } From nobody Sat Nov 30 19:09:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y102m2v7Lz5fVrS; Sat, 30 Nov 2024 19:09:04 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y102m2Ckrz4FNN; Sat, 30 Nov 2024 19:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aut29pw6ZFbutyd8cut18s8bGcXxMdUYu6CcWTcdXRQ=; b=YRoFS5QPC+sxksrebyt7fR/b8s2hcuRTMnk+nCv+zXTr57s1WMr88ZVcuVXz0VlOBcBql7 oASKDBEf+E5Y9BFZtMbj2xF6Ef68Xsc0pd/y0z46ULOBdRHIIPVUG1aHJOO2ezDQM+hua2 wVEu7TDAjBZ9eVQk+rNOC343VW6wYHnQyf8xR0DhHOB3s9Ct+e6MFgK2ZuBlK4rpU2hoNc /DcDLcNq/MJds6P1sKpC1rQlNQAqiPX8hAAQwO/K9W1xtoTlPVMCIqaQiU0u20cI/ULteu H7Qptc1I2UDvCjyHfR/PcJYYPaaKXnyCbu0f7N5JvO+T9UdwMyd9bgUxBaCkYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aut29pw6ZFbutyd8cut18s8bGcXxMdUYu6CcWTcdXRQ=; b=MWjBN3+61Q0hJ2KaxiKZ4UrWiOzg9OG8pyIXycgmBdJNe9bqc2Aje9Y6TmZyIZLGBk/ztM GhKAsnJONgRtxzlOUiGLezRNdIH/8Ry+ukOD9r9IeKAIZl/FQYUpAOppFQjpvTUAytCmJm mSiFEEJQV+sSc+bHu8lY63bYKRURScIJpZjG1y9G2lv5wNHXROtFlPy+aMi/2EVzg8oFwJ 65+QSW0PJNSO1iwavUevcYUfVnQGW7SEKlrpUm5KCE2bmrmKzr7gMlu2W+lS4OX6GxjV4y M4ypzLKe8DCoZSUM+qtX7wVo8x3DwV7jXOZ7eLwf1wZfTLELBipHRCjkxV5HeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732993744; a=rsa-sha256; cv=none; b=dlrkmjhxbxnwNWkntwaDsinc1K+bMPVQcq12r0iBgmW4D2HcUFEEZE/TCgNVfRpwURzRcc kUI77RoY+ErPoehCwJ/I5I6by6jB40hVCCrqnq3L+E2CKB9r/6hrCLfU0OI7kbcj/N2VRm kUFoyWDXe56mioP3ZRAvfEGaHR9v7X0sYrR+8StRBLNE53cLVLl6MRPsm4qCqBNu7qZfCp X274xKrRWNgrrjBUdrF5ExhsVdC/sI11pLoynO2oma8ER/QmnWH9IxGHJMjZpJ808txBfN Hi+JzxXTkQ8pcV3D/avSTMwho2K3GAC2SzE3sz47F9DYl7FZgMdNdL8/gSEqTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y102m1hjYzL6C; Sat, 30 Nov 2024 19:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUJ94ZQ097071; Sat, 30 Nov 2024 19:09:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUJ947S097068; Sat, 30 Nov 2024 19:09:04 GMT (envelope-from git) Date: Sat, 30 Nov 2024 19:09:04 GMT Message-Id: <202411301909.4AUJ947S097068@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 155541825168 - stable/13 - libcasper: Neuter false positive -Wuse-after-free warnings from GCC 13 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 15554182516806b79859b867151f4d4fe58ae6e2 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=15554182516806b79859b867151f4d4fe58ae6e2 commit 15554182516806b79859b867151f4d4fe58ae6e2 Author: John Baldwin AuthorDate: 2023-11-15 02:34:01 +0000 Commit: John Baldwin CommitDate: 2024-11-30 17:40:08 +0000 libcasper: Neuter false positive -Wuse-after-free warnings from GCC 13 GCC 13 incorrectly thinks a call to free after a failed realloc is a use after free. lib/libcasper/services/cap_grp/cap_grp.c: In function 'group_resize': lib/libcasper/services/cap_grp/cap_grp.c:65:17: error: pointer 'buf' may be used after 'realloc' [-Werror=use-after-free] 65 | free(buf); | ^~~~~~~~~ lib/libcasper/services/cap_grp/cap_grp.c:63:19: note: call to 'realloc' here 63 | gbuffer = realloc(buf, gbufsize); | ^~~~~~~~~~~~~~~~~~~~~~ Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42576 (cherry picked from commit b7f7cc25c01aeacaafb86ebcffdeb258b7933b08) --- lib/libcasper/services/cap_grp/Makefile | 3 +++ lib/libcasper/services/cap_pwd/Makefile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/libcasper/services/cap_grp/Makefile b/lib/libcasper/services/cap_grp/Makefile index ee3bdd491895..107be5d7cb46 100644 --- a/lib/libcasper/services/cap_grp/Makefile +++ b/lib/libcasper/services/cap_grp/Makefile @@ -40,3 +40,6 @@ MLINKS+=cap_grp.3 cap_grp_limit_fields.3 MLINKS+=cap_grp.3 cap_grp_limit_groups.3 .include + +# GCC 13 complains incorrectly about free after failed realloc: GCC bug #110501 +CFLAGS.cap_grp.c+= ${NO_WUSE_AFTER_FREE} diff --git a/lib/libcasper/services/cap_pwd/Makefile b/lib/libcasper/services/cap_pwd/Makefile index 9aaaeb071ca0..bd488bcb42fe 100644 --- a/lib/libcasper/services/cap_pwd/Makefile +++ b/lib/libcasper/services/cap_pwd/Makefile @@ -40,3 +40,6 @@ MLINKS+=cap_pwd.3 cap_pwd_limit_fields.3 MLINKS+=cap_pwd.3 cap_pwd_limit_users.3 .include + +# GCC 13 complains incorrectly about free after failed realloc: GCC bug #110501 +CFLAGS.cap_pwd.c+= ${NO_WUSE_AFTER_FREE} From nobody Sat Nov 30 19:09:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y102n51t6z5fVqK; Sat, 30 Nov 2024 19:09:05 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y102n34CDz4FQF; Sat, 30 Nov 2024 19:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VznP2dU+YQYpadYgmY/l4oSUiOgw2+JXurEkw8cvwXM=; b=h0DOl80CUrDTjafeSnPJhp+cYmWKhmbD3HKvVq/Vy/XF31jIB5D2QgyjBtthw7WfQfEkmw SbEL3K/307TUvZ0SGpizEWeb/36h98ga0WXlotdio/+Wafvh6lNSd3BYrtTf0rr+lNMPsv +0yzEL333zIeFYZaUnu0t1WowQllCaiqHxDlArY00lMAoSrGMplpMYKyUl+c5kCxG0BhXY jAHB1iTJ3wKwiMZw//K5/tPZoLM9KqVYZQn5ZMixRxlvYn4aJYTZRrQHxXTiBQgD2qWhdX W0vfGP3F5t4tuN4SSylsqQ4YKAtcy/Jbt71A/FhYn+r8oZT0pYtdy+ecVUr2iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VznP2dU+YQYpadYgmY/l4oSUiOgw2+JXurEkw8cvwXM=; b=S6vTOE6Km+dNcKhdzwXoaZ4GM5CkGJwF8kDmhd65hESMGT8ZvbKWWF+H44L2Jp68x8qniR zChZZ6DFFVvGXNkdjG7zr068c5V/2PYz4H5FeuXuEDCDrEmhtwQpGNSKpdLbICCtxfIIti XmMRvE5VrVJjVDkfhmSVpN6eV2uda5sGfWk8ropV07+pAIHsdmVtiCcTt67vwLct8fwO/V Qs2O7FjqS3qZ/cOFX9oub/wwzNMMcbFv3+NzKDgMmAYCZgKPtvSFccvPxNkwApYWMpwfz4 FrazUJ4zJk1XcoALXeRH0647IqxVLiExlVAnDlXL8nec+m+cbx07ZmPDSz4mfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732993745; a=rsa-sha256; cv=none; b=g6zX7YPNcpbs84CZ5deisUZsQTWqXx9FAjCzUfD1Tkvwqh0BnF5pNnFfTBYa5JI3O6u/ud U7h4wPtGjAcI7+GRpwZfIZaZusDOXbdKnHo4Wbo6V79oi46SVspabqxC8nPmEUX7AyZoeL anoRcxbLGPXDnUI8mSmH/edmF9AVAnB2MV/JVIbzklNLGOS7CCH7HgzeeSbbkBfCH3t2nT 090Q7Yp4q/YJPpnQTbiSuzHORIWzVI2etQn89aCDvu2zTE/p6Zil9TckMSYc9kRKoJRjqI /vI/vo0q2gI9Ut51f09bFbigGvVKNQgnCBw+blqu+HoTeY9xRrQNE5efpPY7hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y102n2P5gzKsS; Sat, 30 Nov 2024 19:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUJ95v2097129; Sat, 30 Nov 2024 19:09:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUJ95gN097126; Sat, 30 Nov 2024 19:09:05 GMT (envelope-from git) Date: Sat, 30 Nov 2024 19:09:05 GMT Message-Id: <202411301909.4AUJ95gN097126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c58efaec2192 - stable/13 - ngatm: Fix mismatches between function definitions and prototypes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c58efaec21926b960ed76f0d4a02794fc858a662 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c58efaec21926b960ed76f0d4a02794fc858a662 commit c58efaec21926b960ed76f0d4a02794fc858a662 Author: John Baldwin AuthorDate: 2024-11-30 18:07:30 +0000 Commit: John Baldwin CommitDate: 2024-11-30 18:25:00 +0000 ngatm: Fix mismatches between function definitions and prototypes This is a direct commit to stable/13 (ngatm was removed in 14.0) to fix warnings reported by GCC 13 such as: /freebsd/stable/13/sys/contrib/ngatm/netnatm/sig/sig_reset.c:82:1: error: conflicting types for 'uni_sig_start' due to enum/integer mismatch; have 'void(struct uni *, u_int, uint32_t, struct uni_msg *, struct uni_all *)' {aka 'void(struct uni *, unsigned int, unsigned int, struct uni_msg *, struct uni_all *)'} [-Werror=enum-int-mismatch] 82 | uni_sig_start(struct uni *uni, u_int sig, uint32_t cookie, | ^~~~~~~~~~~~~ In file included from /freebsd/stable/13/sys/contrib/ngatm/netnatm/sig/sig_reset.c:40: /freebsd/stable/13/sys/contrib/ngatm/netnatm/sig/unipriv.h:257:6: note: previous declaration of 'uni_sig_start' with type 'void(struct uni *, enum start_sig, uint32_t, struct uni_msg *, struct uni_all *)' {aka 'void(struct uni *, enum start_sig, unsigned int, struct uni_msg *, struct uni_all *)'} 257 | void uni_sig_start(struct uni *, enum start_sig, uint32_t cookie, | ^~~~~~~~~~~~~ Reported by: GCC -Wenum-int-mismatch --- sys/contrib/ngatm/netnatm/api/ccatm.h | 2 +- sys/contrib/ngatm/netnatm/sig/sig_reset.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/contrib/ngatm/netnatm/api/ccatm.h b/sys/contrib/ngatm/netnatm/api/ccatm.h index 1b4a179a3348..920aa5a065ac 100644 --- a/sys/contrib/ngatm/netnatm/api/ccatm.h +++ b/sys/contrib/ngatm/netnatm/api/ccatm.h @@ -134,7 +134,7 @@ struct ccuser *cc_user_create(struct ccdata *, void *, const char *); void cc_user_destroy(struct ccuser *); /* signal from user */ -int cc_user_signal(struct ccuser *, u_int, struct uni_msg *); +int cc_user_signal(struct ccuser *, enum atmop, struct uni_msg *); /* Management is given up on this node. */ void cc_unmanage(struct ccdata *); diff --git a/sys/contrib/ngatm/netnatm/sig/sig_reset.c b/sys/contrib/ngatm/netnatm/sig/sig_reset.c index 469b9f762a6e..615d5fa00d08 100644 --- a/sys/contrib/ngatm/netnatm/sig/sig_reset.c +++ b/sys/contrib/ngatm/netnatm/sig/sig_reset.c @@ -79,7 +79,7 @@ TIMER_FUNC_UNI(t316, t316_func) * Reset-Start process. */ void -uni_sig_start(struct uni *uni, u_int sig, uint32_t cookie, +uni_sig_start(struct uni *uni, enum start_sig sig, uint32_t cookie, struct uni_msg *m, struct uni_all *u) { if (sig >= SIGS_END) { @@ -435,7 +435,7 @@ start_status(struct uni *uni, struct uni_msg *m, struct uni_all *u) * Reset-Respond process. */ void -uni_sig_respond(struct uni *uni, u_int sig, uint32_t cookie, +uni_sig_respond(struct uni *uni, enum respond_sig sig, uint32_t cookie, struct uni_msg *m, struct uni_all *u) { if (sig >= SIGR_END) { From nobody Sat Nov 30 19:09:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y102q0TbQz5fVrY; Sat, 30 Nov 2024 19:09:07 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y102p3n8gz4FFk; Sat, 30 Nov 2024 19:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V0EvEMdT++qMh/KVySDG5oND8c+maT0tbvYIJpfUmig=; b=fp4Q7iC1Jtc48l6PYGxKGkEv3MtPQVelqQMMS/c6X2PnGqIdVdH7IJxh5O+l+kz6ZIzuWU cXDtn7q1+DuxMytQXPYdWIV5HkN+DcgTfeqkDNbgRb1trEYc5ech6fjPh8Ah1KhIeBf0rL MI86YeMnwCqmd+lQSRqKGvMb7fE8PSulpEn0u1VWcCJhCKrv/EqtX3u5G6RSR8kDAsU86c CYCPXqsNEMTnYWu+kOLr2AqlIl2KHiBXyAmHSWszNTB2/uQpSxagAS+RAy6GQsBfM848Gh 605AiAMN6/nxE8GQZCZIKRK3v66o0lY9AKCIqYFvHjCjRVQxScGrUlam7a7Gwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V0EvEMdT++qMh/KVySDG5oND8c+maT0tbvYIJpfUmig=; b=YSqpyBcRwg9GywHGSYSx0G9I/40qpvxcO+tTBDjKIt8F/hcmz3oS1S4x4O7hBOvJ158apx LqIyPiFKaNoiXTC3LB7wfZhowLpJkFVh/Ja1rg6ps8ZICFqilXuZ+T9/6fHtB1kW2h07sX qCbPbEbXa6ZB8K24sd/M5dy3jvGGWMnjmFw5v9p8OAoh8VtTuX2V2DOjh48k+67OCdJOYd 73TxCYr1fdI1nD8aNyIhAJbWzu3cpLZQDAHM78I7SmxkEE5q2EXPBh4olMyJbmx3JUmLdO siLY2FYYJeE62Ak6ohvVT6sPfxpa3JYqKkj0xBH0ceYbznLhmqkTpkEN8oDe3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732993746; a=rsa-sha256; cv=none; b=j3HgtyhgDDGKWV7XnfBbDd8eR6VJjaCa7O6tK96T/Ubrv3z/VkRrig6OO5EUaTvFUdWm2J CiTHr7AA4uxH6ObLi0vVHt2JRi3Gm2x0XE+NtrHe6mYGy0kZ5wxJ5IpFp4lLRJvQsQp2bx xd0eUQROWPTyTfd/qGyW4dbzmXiiNlDpn15LmIUtlO0rYCkICBximuX8JW8mozcA/A4lLb ZaC0XPLwJAd7w6oMmsdFxNnjkZPLHdNUItYleSHuAtHlzr854gl7GoKniTGUTlPdwB3YtH GK4ye6FAU3pcq2dAgjhFPdsm48MTW8oWuXPw3Nho9uB8zzlVgqhqAHDQuzKalQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y102p3NmKzKxl; Sat, 30 Nov 2024 19:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUJ96gT097174; Sat, 30 Nov 2024 19:09:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUJ96XX097171; Sat, 30 Nov 2024 19:09:06 GMT (envelope-from git) Date: Sat, 30 Nov 2024 19:09:06 GMT Message-Id: <202411301909.4AUJ96XX097171@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bd8c7df1536b - stable/13 - libgpio: Fix type mismatch for gpio_pin_[gs]et List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bd8c7df1536bdc44697d323a380ab97783e8a7f3 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bd8c7df1536bdc44697d323a380ab97783e8a7f3 commit bd8c7df1536bdc44697d323a380ab97783e8a7f3 Author: John Baldwin AuthorDate: 2023-11-15 02:34:21 +0000 Commit: John Baldwin CommitDate: 2024-11-30 18:26:12 +0000 libgpio: Fix type mismatch for gpio_pin_[gs]et Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42577 (cherry picked from commit 0355ecace82cce8322e5fcdf48f751d253792ce3) --- lib/libgpio/libgpio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libgpio/libgpio.h b/lib/libgpio/libgpio.h index b493d63dc9e2..35651ecd8cca 100644 --- a/lib/libgpio/libgpio.h +++ b/lib/libgpio/libgpio.h @@ -81,8 +81,8 @@ int gpio_pin_set_flags(gpio_handle_t, gpio_config_t *); /* * GPIO pin values. */ -int gpio_pin_get(gpio_handle_t, gpio_pin_t); -int gpio_pin_set(gpio_handle_t, gpio_pin_t, int); +gpio_value_t gpio_pin_get(gpio_handle_t, gpio_pin_t); +int gpio_pin_set(gpio_handle_t, gpio_pin_t, gpio_value_t); int gpio_pin_toggle(gpio_handle_t, gpio_pin_t); /* * Helper functions to set pin states. From nobody Sat Nov 30 19:09:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y102q6ND4z5fVTd; Sat, 30 Nov 2024 19:09:07 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y102q4p4Kz4FJ3; Sat, 30 Nov 2024 19:09:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2Z1y+dpMXcxdE2j3IZPFjAYc0m4ORHI54Ztyf5TLEa0=; b=ClxaQTqqjNQmCiNuQKYsOWk1vGEgIn4DuVsGMguhbYGo3boqFw4+72PG9EPmu+lRcGXsvA 4/Q/O3vXWXIMHfw4BrVDQ60x6esPPW0Vlsi+gRUJSRbvFbzanZDk3aZ6XXk7HjGTtTtz3I vTbJJOKuvcSkAMsJS3z0j5VPmCB6tW14cCU2E/wGe1zADov4CaimFrR7T2hC3tPZ0Ckb4X 0idD0Li2hnUBNx9feOSWjp9ihasiCYRJJ4UV4Nw45P07fz6LHDZ2Qwfq1YbUKzVOnB7rqT XaVmTr/+JeJ1/3IY2kzuiWFTdXCYu6AhyvGAfZvPgfcKpur1LAQNbTENEI2RhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2Z1y+dpMXcxdE2j3IZPFjAYc0m4ORHI54Ztyf5TLEa0=; b=TcWQ77dqNmQsL6vtbMbrg11AZIQ+RwqYQPo+7AYrYRzJ6YDs7k5DuN8UPx+oenrt5ctvZ5 Owq8rrhOpE91OAhpZTspnVq0dfrB/ysGWDOzrlvkb1/o5gE3x7aMI4s65u0Bg9kDymqq9v gwzLsY8lMtagwm30ZiEb2I2qz/mKKrXtfdgN2atalIZC7bKqOHH2egaiK9ix11Ztd9xTTn ct/Nb+oS+peTO3kOHNeROsOztDtaDpkn26yPaXM8+XqZtXYEorIsLcU/mEzLKqz/n05jKe 9/Gb0PkcKe2Yhz7hQoc7zDq3FypvA5FVqftJFvNUWxfUVIpaPraKjMng8qpm2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732993747; a=rsa-sha256; cv=none; b=WvOWn8Qe0f3rR7xZxya/NHVQdFmehTZqF3PRjSMLguBi3vrZ6qYW3Wo24d+m/Eq0wTtbja GBah+FcrCiH1rkjWShf5sm23FQ3dS1NIBEzscX+fAb/w8ap2OhUGq41+mUXe0/ciG8QgaV RVXx2vpb3br+3T8QSf8JQ/+QFWUAeHraJpTDgwAKJRwkTS+tyy+q9IC2gmGlSzdhMiHjoo RDxKZYv6zxLnmGIBvnhb8hf6yy8WzAkVfi7y3r9lkQfEDyopDvGSct0Ogn9fdy+VyBUX51 b4rVnlo1Eyp2QzX8KWPsPgv0gfMh5gCdbMHZsY+NZLr0jVCWgg7x/78Dpci84A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y102q4PxszKsT; Sat, 30 Nov 2024 19:09:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUJ97cM097239; Sat, 30 Nov 2024 19:09:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUJ97n3097236; Sat, 30 Nov 2024 19:09:07 GMT (envelope-from git) Date: Sat, 30 Nov 2024 19:09:07 GMT Message-Id: <202411301909.4AUJ97n3097236@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: da72456591ee - stable/13 - bsd.sys.mk: Disable -Wdangling-reference for GCC 13+ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: da72456591eee5b6bea590080a05f593b118a6a9 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=da72456591eee5b6bea590080a05f593b118a6a9 commit da72456591eee5b6bea590080a05f593b118a6a9 Author: John Baldwin AuthorDate: 2023-11-15 02:35:04 +0000 Commit: John Baldwin CommitDate: 2024-11-30 18:49:27 +0000 bsd.sys.mk: Disable -Wdangling-reference for GCC 13+ GCC raises this warning for libc++'s istream. It raises false positives in other cases as well (GCC bugs 109640, 109642, 109671). Warning from : /usr/include/c++/v1/istream:1464:34: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 1464 | const ctype<_CharT>& __ct = std::use_facet >(__is.getloc()); | ^~~~ /usr/include/c++/v1/istream:1464:71: note: the temporary was destroyed at the end of the full expression 'std::__1::use_facet >(std::__1::ios_base::getloc() const())' 1464 | const ctype<_CharT>& __ct = std::use_facet >(__is.getloc()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42579 (cherry picked from commit 28fc837b70372a1a99c28ef4f74325bce711960a) --- share/mk/bsd.sys.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index d28bf09f2cb2..e537d7f045c4 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -243,6 +243,13 @@ CXXWARNFLAGS+= -Wno-literal-suffix \ -Wno-error=unknown-pragmas .endif +# GCC 13.1.0 +.if ${COMPILER_VERSION} >= 130100 +# These warnings are raised by headers in libc++ so are disabled +# globally for all C++ +CXXWARNFLAGS+= -Wno-dangling-reference +.endif + # GCC produces false positives for functions that switch on an # enum (GCC bug 87950) CWARNFLAGS+= -Wno-return-type From nobody Sat Nov 30 19:09:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y102s0B6Zz5fVXm; Sat, 30 Nov 2024 19:09:09 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y102r5xK7z4FP6; Sat, 30 Nov 2024 19:09:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3FyJYcYAQKamUPAaYdGIKarBvwoFz5wbOFlL+WsawMM=; b=WP7jBF+jZUEq4K17wrC5j/w321EnbMfFh0+Sxi5sd/0et+gD4ImUTuSNUuSDwWg1aQRJMs rXcR5Lh4L/PlFnPpMHnWOrWBjuXnAn2okOhQT3F04dkz4c3x5xrX2kPVDcO45wyu5egOwZ 9sFmU3zQh91A7AuT1o8TIZg1xBU5bt5P6Hr+Q2A2dyRgFq++7PJ6CWF1Mwecq6nPWtQj9I sNr4rjIqp5VBIuV8kTwccpKylkELoGyT6LozhSkF+MFNp9I6vbCd5SYWNLYVdm1rKeYwvt og8gpDWLNHqWu20Rg6iLjpiFcLVn63hvocsQQ0R2ebHnl2IYEQr5QtBYnjhZsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3FyJYcYAQKamUPAaYdGIKarBvwoFz5wbOFlL+WsawMM=; b=BdVUql/HA2m4cqhEGgmvTDfYrp4cV2u+nM+eu5ImQF27+UNSXI6q2I568O5DCgB0tkBioS bOBhdeXcG/uJHF0DchzEdGSv+NQbSUZmRTzRDKlH2dXnUCZxs4hVN/knDQWOrlpN5xTVLK XsU/99l2XYtqCj1Rx0q3TLiq5vf1LwmcHU3vaO/BUlS8CMMYsJbxoW/8HNGz0XjNG2zMvg U8u0AiknWq2kHGx0PmSFZpzmDM2AVm23HlGT+oThLr2IudZPvbJuR7W3Mmo4eK88T23UCW QZwOFLwRvZWWsXVD3qAWJP7KK1yQS7F+iAQuR91LlywY5vlOvd+sRasGSEPOKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732993748; a=rsa-sha256; cv=none; b=LL1lGuu7li3re6VVm5TUoWGYHY9mwYODsXaq91wgcwDOwwvI5mPfY3HEGLbj+WB1hKqflS zyU1ND24/BC5UTWxKapPGB9kjvLF45bXk20531rr4IQMzvL5govQ4zR8HOYWcf4+OeT4cr vkBt0S1KcUz+sNcWHKioY7jF8EMDrznCf12+z6gRUgfpBEKB8AEW8pcRG62Fm08G8XEKB+ e8Xm2JqJgKEjMGN6CQ8+u5MurKTYO4ZIhaYzA26szuDNa0FM/qCRaQ49pyTHNR6O0gqhsb xc5WdRSuz2vXiZiJkN/Lqj5Qqo6Ui2GXWpCy7MW3XeIvRRLPfQhUAthZo2scfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y102r5QpTzL6D; Sat, 30 Nov 2024 19:09:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUJ98SF097287; Sat, 30 Nov 2024 19:09:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUJ98X0097284; Sat, 30 Nov 2024 19:09:08 GMT (envelope-from git) Date: Sat, 30 Nov 2024 19:09:08 GMT Message-Id: <202411301909.4AUJ98X0097284@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a6817cd6fac8 - stable/13 - makefs cd9660: Unexpand a few TAILQ macros List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a6817cd6fac8c0b01f7d4aeb19f12356a7de642f Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a6817cd6fac8c0b01f7d4aeb19f12356a7de642f commit a6817cd6fac8c0b01f7d4aeb19f12356a7de642f Author: John Baldwin AuthorDate: 2023-11-15 02:35:27 +0000 Commit: John Baldwin CommitDate: 2024-11-30 18:55:37 +0000 makefs cd9660: Unexpand a few TAILQ macros Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42580 (cherry picked from commit c06962057bedb3f1ed8c3560c1d1147dbf04ba68) --- usr.sbin/makefs/cd9660.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c index cc56421a873c..7ce9a3b6cbb2 100644 --- a/usr.sbin/makefs/cd9660.c +++ b/usr.sbin/makefs/cd9660.c @@ -1516,10 +1516,10 @@ cd9660_generate_path_table(iso9660_disk *diskStructure) TAILQ_INSERT_HEAD(&pt_head, n, ptq); /* Breadth-first traversal of file structure */ - while (pt_head.tqh_first != 0) { - n = pt_head.tqh_first; + while (!TAILQ_EMPTY(&pt_head)) { + n = TAILQ_FIRST(&pt_head); dirNode = n->node; - TAILQ_REMOVE(&pt_head, pt_head.tqh_first, ptq); + TAILQ_REMOVE(&pt_head, n, ptq); free(n); /* Update the size */ From nobody Sat Nov 30 19:09:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y102t0m1Yz5fVTg; Sat, 30 Nov 2024 19:09:10 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y102s6qM4z4FfS; Sat, 30 Nov 2024 19:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kyzU1u6LQgiDAe3GRkGEJ5W39y54MFPKLecwcMpe5Hc=; b=RqjFtpbGEHQlHBSW9A1/J7T8p2gd7muXeRfDqtto9YOSE9WqejW7+XgR7ZJhA20oFmB68c nqmAjKgnvQwnZLvk5r6Q5HFOjrxBBF9P+dbvvk2p0UO7aD4K2+ky57JBdP3j8pq6NLSnWO EgenCf8Gu2dzwDvS4a6QlFFCi4Al4Bf5k8uJkKbVoOagQ6McLCFp3nyqIqi8xP/IRNNF2N hPW/nR8JLJVhQuGUFF8zWaIFxTI+6Ba9ydBmDZbiLybUSc9+/YbYoTRrh/5YhzTHABwPFp 6dC2KAMMdnkIy5zwBdJffuAUPuLMG0S4RanuQF64rfcac+/O1nC6BrHDpSUaJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kyzU1u6LQgiDAe3GRkGEJ5W39y54MFPKLecwcMpe5Hc=; b=G+fzpcykAjIHKoGD6rD7Xdangh31/MykzbbpjghFZ383EB1sJtvvDnqC3leWphiOS67X3P EvG+Bpae2zvBlY7B6kP5nt4Q+v/a/TfRKp5H00OqqssqZSXSHT2zGccgBNHeCpFHBHMIzH eQOpbKQtzYafm4ZsZr0tDsdo0Uh69CokoBDusl3LnwuAI+rrWR1Wibwqz5+gCYw07wQJW6 iJtgrVM4ax7iLuDwoRGok3nrrRWbtEfBQOpe5P1FLDt2Gz/W3RWple2BrH5dCTB/fvYLCS LxIEYkxbcqwAjNryW+gAp2nmLnkSXkjq88BcXW0SCJR5Cou7V1/So7ncY2sFxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732993750; a=rsa-sha256; cv=none; b=K2oMTfeEQQC9CkJBTdpBEIGaBnNZUVxMSbIzlnq44gGCcBFaMR+d76ftWF+c6Ls1N8idDS QtbUEZ1iJordgB/XT+TBPcHozjrvl1AFrQhjaLLqvtafW3MsXyVHS1c19VEowLD5rJyCpf L0vCvwR8Hn+uipOoGMdGVVcaeXUYsUCEB+CjvFGy+lSNlDdJbJ6Jzm8X0gz8Jb3pICvtGp g+SlTpms9ABxtaqMMoVdDLWMKaGbkpXPGdT1Iio0Y6EKWrMbaBNx4x+c/eeqgE+F5fdW27 XDSJdshwUD4f1ZVAJ2xQIcNYI32Lz41JwPmuyIelWlSUtddKuMBJWzOh6dghig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y102s6QPBzLM2; Sat, 30 Nov 2024 19:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUJ993U097335; Sat, 30 Nov 2024 19:09:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUJ99YC097332; Sat, 30 Nov 2024 19:09:09 GMT (envelope-from git) Date: Sat, 30 Nov 2024 19:09:09 GMT Message-Id: <202411301909.4AUJ99YC097332@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2758ca2ebf7a - stable/13 - makefs: Quiet a -Wdangling-pointer warning in cd9660_generate_path_table List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2758ca2ebf7ac8ad019e775afc07e802b4f9adae Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2758ca2ebf7ac8ad019e775afc07e802b4f9adae commit 2758ca2ebf7ac8ad019e775afc07e802b4f9adae Author: John Baldwin AuthorDate: 2023-11-15 02:35:44 +0000 Commit: John Baldwin CommitDate: 2024-11-30 18:55:44 +0000 makefs: Quiet a -Wdangling-pointer warning in cd9660_generate_path_table This function temporarily stores a pointer to an on-stack variable (a TAILQ_HEAD of a temporary list) into a global variable (*n). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42581 (cherry picked from commit 5fc8ed9313609fbafe505deaea253e6bde5ac165) --- usr.sbin/makefs/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/makefs/Makefile b/usr.sbin/makefs/Makefile index b3f6c08fe361..e578ceae5046 100644 --- a/usr.sbin/makefs/Makefile +++ b/usr.sbin/makefs/Makefile @@ -38,4 +38,9 @@ LIBADD= netbsd util sbuf HAS_TESTS= SUBDIR.${MK_TESTS}+= tests +# cd9660_generate_path_table adds a global variable to an on-stack +# TAILQ which temporarily stores a pointer to the on-stack TAILQ head +# in the global +CWARNFLAGS.cd9660.c+= ${NO_WDANGLING_POINTER} + .include From nobody Sat Nov 30 19:09:10 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y102v28l7z5fVf1; Sat, 30 Nov 2024 19:09:11 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y102v0q2Dz4FcC; Sat, 30 Nov 2024 19:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JdUIRoaTlABuNrngLJ2ePtaWIFZ8ApUmFk7jwLJLHl8=; b=LAheheNSGtzMXign8jGtB3G/IenDDXpiDn9//+ShsV0yMPGaiNo1NHj9whaDg/XXt7oNeb HrAFXtTJSyYNspyYxjgWbP+FyrwDEKpm3+TxHlmf4K4RAesmqjt6vYGR43Z/rPBJG1icsy icUV+b4udi9yYZ8n1Y65CIW6x7edS9o5WdDso0XsTQVaf3relPYvdiTrNgzx9B975u5xf2 R4M9neepncXXZHejkkHfvzVCaXB1NZcr5PTWaNAp1DqtLotpXQr3QYydmed30EgcPsp4e3 slXqADjcUQpvAq9fbPHZQv5cnrtVpU7JK5udKQ99ybb6BwjU5F2o9GIzwXgJzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JdUIRoaTlABuNrngLJ2ePtaWIFZ8ApUmFk7jwLJLHl8=; b=MAtYeqaxnLvx39D2AbnvJBGbjbhaOqHV48dhs9aDnDXPCywPJYh2UjNMO/8+55Y2T7w9lp LkTMFPT0YlVMze2PaSg8802y4Vak6Fn3yI1oUghfpWgnOnfERsut0smLFnWf86Mhm8urrH yrt+z6RF+9++hK/iw4BKYU7Gtve0xOQYrpmr0nt8re9nbWxxHwZfO0RvFaxGkDmQRjUKEi X2sTDTXLMdu/uEAyCq0gXX6IzetMYg2CrTfZQ9V2bRTvUwWRHE0CjPA69LT0+9YZbN1E5r B/+xwy3JzgBg7eB4SQQhv6J1o1T7neHOSzFgx4dlCKKnpgK9tn+mdS+zDmRjKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732993751; a=rsa-sha256; cv=none; b=gMdiyc4ZbiZCF9YxMQU9+xOcT6ufXBZRMX+jWREAuKuO1B3D7n7UUyetUazVvAv2H6D60o j8zUSjTz+vRzyzJVr0UGkAuxsXQCS4WO4cRLz6IGycqggEWHBpNcvdsPdIWvUaUgKKL4fx AoNfFHJQvbFpN0KQTTV3OtDxvPsQKRDMttBdkuGEpPIIQ7bFNBx86CBQeVopKyHHXRCWzu vKvaIiTNvnPZ6svJiWxm8+ivoWl7xBzDCS8XQThpTJOnKMO/FmSYNUxq/7Y/dyXe2vguG9 H5s2PgkLNOr/RiAHwFn8atjYL7WLMh0bBrFNj7ZPw3zhbVqw64YhwAy0xlNZaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y102v0RKtzL1G; Sat, 30 Nov 2024 19:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUJ9APP097396; Sat, 30 Nov 2024 19:09:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUJ9Ar1097393; Sat, 30 Nov 2024 19:09:10 GMT (envelope-from git) Date: Sat, 30 Nov 2024 19:09:10 GMT Message-Id: <202411301909.4AUJ9Ar1097393@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 801be06b9006 - stable/13 - snmp_wlan: Fix a couple of type mismatches in function prototypes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 801be06b90066772c7e1091ee2c0b877ce1bdd22 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=801be06b90066772c7e1091ee2c0b877ce1bdd22 commit 801be06b90066772c7e1091ee2c0b877ce1bdd22 Author: John Baldwin AuthorDate: 2023-11-15 02:36:03 +0000 Commit: John Baldwin CommitDate: 2024-11-30 18:57:59 +0000 snmp_wlan: Fix a couple of type mismatches in function prototypes Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42582 (cherry picked from commit cc61bf9eccd46592704f3e7bc189c94ccae8f524) --- usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c b/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c index e5a6e0653b39..b129e42b9d85 100644 --- a/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c +++ b/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c @@ -68,8 +68,8 @@ static uint32_t wlan_cryptocaps_to_snmp(uint32_t); static uint32_t wlan_htcaps_to_snmp(uint32_t); static uint32_t wlan_peerstate_to_snmp(uint32_t); static uint32_t wlan_peercaps_to_snmp(uint32_t ); -static uint32_t wlan_channel_flags_to_snmp_phy(uint32_t); -static uint32_t wlan_regdomain_to_snmp(int); +static enum WlanIfPhyMode wlan_channel_flags_to_snmp_phy(uint32_t); +static enum WlanRegDomainCode wlan_regdomain_to_snmp(int); static uint32_t wlan_snmp_to_scan_flags(int); static int wlan_config_snmp2ioctl(int); static int wlan_snmp_to_regdomain(enum WlanRegDomainCode); From nobody Sat Nov 30 19:09:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y102w5ZKBz5fW5k; Sat, 30 Nov 2024 19:09:12 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y102w34Qwz4FcP; Sat, 30 Nov 2024 19:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OSLSUPvIKPyYmU+QjaV6VKI6zVC6j82Gx2p09FQsOSs=; b=ewGnH3h1lJC7PyNqGH6xpU02XtCTp2c9FdzJilLwL4hni/b0k3x/VSFR77YgDkj4+tTcyD RPSw5j8uRbK0Ag0VKga0a/eHhYQd927Eyce+jzFL1uQjBTmUTj/IsA+JIKOaq00fC6/o4P FZrI7XBtGQZMb3TmSWpb9EPP6qGATkhGFBkA33/I86+Fd73qivMTHMYdntRv4kUHv6c9y7 nNpaXkAFbBfco034IbH7t62ePmO9N2AUegE+oX5lyfEfNxgVGeFSmh8ZKuo+h2cHEY8IX+ 6nuboq9CneP/N4PHZzjjdj2IZ7QURjhf/y18tHvvOsr5xRRmzptfJX4Xs7yX2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OSLSUPvIKPyYmU+QjaV6VKI6zVC6j82Gx2p09FQsOSs=; b=RSL+Gz5KhrJr04F7NYXbY8PK72VBZdGTHlKF7nuUtWSpUek67VamQVq8SiHj9dFmbxnyXh t5/nNJ5XE8djheTnWo16OtO0AtHO+7MRgWjIJatWlyxnFaJIGedEO6m2ucJB7crlKalcem Cd4umsm90sGAegTegiWRPqIRaIQ03q5rQQ+bCspC4QKDKcoN45Z9NP5vGN0oY6WiZLd3uB Zk+xT8Es/WWUeXQP9Uq/TF2F5uHYDJGyjQkckIaabUz39i0OIypeZw0D5uKaJb6AC8S7YE BuyLXX2yj/iggKW+CfpHWa0Ke48TthMBCXYD0dHITOIFUQ+BO9JkrbgytiKQ8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732993752; a=rsa-sha256; cv=none; b=bsV8b4XvBZTEumI9BY7vCz1qKmi2Odmia0q7p7zkzS2pq/XwPmQYoBpHHNzCt6BCZEasSr 1rzBUq3iaGwse0RZEcqdtyilRvxg+XVbYJlebyCVW6AjyRBQT10dzPrhZNt7s/N/L6aaEZ fR8wac9hN/2NYynAu10D/6SCH1QiLl1bG5pYHDpcZi0Qp7l1EPc5W6WuRVw0ccV3drJ+6z H7GQiZJm338EyetchEuWl5WiUwJRvziVYmRZfgunjE8/0j9hH4DCjtFb1y2Td5LbthYFO7 VuNTJigEtz1/FZuqgvSpUUuSXNT8P0qxdsyNVdWYG3g/3ggXDha9sPPtvUh1GA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y102w1JHrzKsV; Sat, 30 Nov 2024 19:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUJ9Ccl097450; Sat, 30 Nov 2024 19:09:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUJ9CC4097447; Sat, 30 Nov 2024 19:09:12 GMT (envelope-from git) Date: Sat, 30 Nov 2024 19:09:12 GMT Message-Id: <202411301909.4AUJ9CC4097447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a979d6f59919 - stable/13 - pkg: Allocate a suitably-sized string for the local ABI List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a979d6f59919c734baa2e648de521d56b0da02c4 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a979d6f59919c734baa2e648de521d56b0da02c4 commit a979d6f59919c734baa2e648de521d56b0da02c4 Author: John Baldwin AuthorDate: 2023-11-16 00:53:53 +0000 Commit: John Baldwin CommitDate: 2024-11-30 18:58:38 +0000 pkg: Allocate a suitably-sized string for the local ABI Previously the local ABI string was written to an on-stack buffer and the pointer to that buffer was saved in a global before the function returned. This had two issues: c[ABI].val pointed to a no-longer-valid on-stack buffer after config_init returned, and the string could potentially be truncated. Fix both of those by changing pkg_get_myabi to return a pointer to a string allocated by asprintf. Note that the allocated string is left in the global config array until it is implicitly freed on process exit. Reported by: GCC 13 -Wdangling-pointer Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42623 (cherry picked from commit fd9ae9ac04edf9acef4a2ffbf663698a2b8e7ced) --- usr.sbin/pkg/config.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/usr.sbin/pkg/config.c b/usr.sbin/pkg/config.c index a2b005eca835..ce3a11cf8c81 100644 --- a/usr.sbin/pkg/config.c +++ b/usr.sbin/pkg/config.c @@ -144,32 +144,35 @@ static struct config_entry c[] = { } }; -static int -pkg_get_myabi(char *dest, size_t sz) +static char * +pkg_get_myabi(void) { struct utsname uts; char machine_arch[255]; + char *abi; size_t len; int error; error = uname(&uts); if (error) - return (errno); + return (NULL); len = sizeof(machine_arch); error = sysctlbyname("hw.machine_arch", machine_arch, &len, NULL, 0); if (error) - return (errno); + return (NULL); machine_arch[len] = '\0'; /* * Use __FreeBSD_version rather than kernel version (uts.release) for * use in jails. This is equivalent to the value of uname -U. */ - snprintf(dest, sz, "%s:%d:%s", uts.sysname, __FreeBSD_version/100000, + error = asprintf(&abi, "%s:%d:%s", uts.sysname, __FreeBSD_version/100000, machine_arch); + if (error < 0) + return (NULL); - return (error); + return (abi); } static void @@ -453,10 +456,9 @@ config_init(const char *requested_repo) char *val; int i; const char *localbase; - char *env_list_item; + char *abi, *env_list_item; char confpath[MAXPATHLEN]; struct config_value *cv; - char abi[BUFSIZ]; for (i = 0; i < CONFIG_SIZE; i++) { val = getenv(c[i].key); @@ -512,7 +514,8 @@ config_init(const char *requested_repo) finalize: if (c[ABI].val == NULL && c[ABI].value == NULL) { - if (pkg_get_myabi(abi, BUFSIZ) != 0) + abi = pkg_get_myabi(); + if (abi == NULL) errx(EXIT_FAILURE, "Failed to determine the system " "ABI"); c[ABI].val = abi; From nobody Sat Nov 30 19:09:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y102y0bFSz5fW1T; Sat, 30 Nov 2024 19:09:13 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y102x33NQz4FZg; Sat, 30 Nov 2024 19:09:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pr9gpoCnEff1jyqbkthsExav/fHCKBRv/H0Ik35nRQc=; b=XwUyYfteQguJvh5pF1qbmCTzkj4Z0/EQ6hBtohGdv1G+FwK5w/UsuEpITCQOI0iKDVn5Dj BzDUUEkVQKb5vlFvbyr8yAsD2t3ql2xto99Iq0/sV9rl7Dd7PmnRmVGby6d3rRNgSTxqPJ ARblHFKBmDVwPAULybtvFbZQM0PMvrdMo+/0TcS5pzzArW5VbNdOa2/VQp97DTQZH/61mG pVx0jwC2OHF1u2KK+UIdYMiKoVf7aAhA9XmfkiNvSgK+alCe70dTLDx+Q2BgRmgn/CvcOU xCThgKpoWMzz/LARF+DQfAhHbZ6QJkTS1oNAlENlAsiJXO37MDqQB+TWjG3lSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pr9gpoCnEff1jyqbkthsExav/fHCKBRv/H0Ik35nRQc=; b=d6kQ3qxGqvc3sJ35uZCGDCJa8MMz9Q4+sc1j2TgDRW4IYxF1sJjUU7pOTiLpZGlDg7URsh NMZxUGinGOQ2P1VXtiqwNeBLStMJ6W0aBvgG/ZqsDHZLIPUFRUCLC0Qa+/VM5m5oLNgXj1 /jmH4kxn7mM0R9954NFWN2dRhSQCxze8P51SO/guDrZFF104IBlo8MFsIS0Ei40rIqdVUS 9bX8jeE9n25aRYbQtENlyyvHBiVeMjfu+lcb3NOOCjMf/gWsm6Zeqe11yQvvtxFfkMsqLs /2ESJHba1YiEHClRcpdfiNvpcyixLpat+qyQL5QyQ7cENEo4xne9EACC7XYjUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732993753; a=rsa-sha256; cv=none; b=owrxDNY6GhRwPTG/X8p/S4aD6LpxBxS3pXjDy7bn70QFHTj0h4taGktMnZXEOU7Vy6lpS0 oX6hk+I9E00lOhV3fUMlgm5TUsEJk9/WTJuu82mDUkUhJiSo5T6jSIw6zBQLV4+bDpfUKn xo53pCv/WTVjbGqp2u/QFNmHKyWAiN2RQTvSaZlY9Qv0IZMu8RZs57hgFHYE6cdjvklA52 Zn0SEIS/07iMmQvySRl17MpzyqJsBlmo3zcZAoiZLr8PKhidKvqsZyxF97YjQz987+D991 cKh8CtlwEbC4KAbbtl4qMYtjLnjbXvAoNTBdHvuQcWU4xrB40KNs/cDyphDZ6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y102x2h0zzKsW; Sat, 30 Nov 2024 19:09:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUJ9DO0097514; Sat, 30 Nov 2024 19:09:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUJ9DWR097511; Sat, 30 Nov 2024 19:09:13 GMT (envelope-from git) Date: Sat, 30 Nov 2024 19:09:13 GMT Message-Id: <202411301909.4AUJ9DWR097511@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f3fb0f6512bb - stable/13 - ath_hal: Fix a couple of type mismatches in function prototypes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f3fb0f6512bbc71ec4cb9ed97d7db4ece0a200ab Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f3fb0f6512bbc71ec4cb9ed97d7db4ece0a200ab commit f3fb0f6512bbc71ec4cb9ed97d7db4ece0a200ab Author: John Baldwin AuthorDate: 2023-11-15 02:36:32 +0000 Commit: John Baldwin CommitDate: 2024-11-30 19:04:28 +0000 ath_hal: Fix a couple of type mismatches in function prototypes Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42584 (cherry picked from commit 1e65df68403acac2231dda161fd12e62f888a031) --- sys/dev/ath/ath_hal/ar5210/ar5210.h | 2 +- sys/dev/ath/ath_hal/ar5211/ar5211.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ath/ath_hal/ar5210/ar5210.h b/sys/dev/ath/ath_hal/ar5210/ar5210.h index fc9f6826149b..57162561ec03 100644 --- a/sys/dev/ath/ath_hal/ar5210/ar5210.h +++ b/sys/dev/ath/ath_hal/ar5210/ar5210.h @@ -276,7 +276,7 @@ extern HAL_BOOL ar5210SetKeyCacheEntry(struct ath_hal *, uint16_t entry, extern HAL_BOOL ar5210SetKeyCacheEntryMac(struct ath_hal *, uint16_t, const uint8_t *); -extern HAL_BOOL ar5210SetPowerMode(struct ath_hal *, uint32_t powerRequest, +extern HAL_BOOL ar5210SetPowerMode(struct ath_hal *, HAL_POWER_MODE mode, int setChip); extern HAL_POWER_MODE ar5210GetPowerMode(struct ath_hal *); diff --git a/sys/dev/ath/ath_hal/ar5211/ar5211.h b/sys/dev/ath/ath_hal/ar5211/ar5211.h index 52d7fcbd2e1e..9764062ab47b 100644 --- a/sys/dev/ath/ath_hal/ar5211/ar5211.h +++ b/sys/dev/ath/ath_hal/ar5211/ar5211.h @@ -302,7 +302,7 @@ extern HAL_BOOL ar5211SetKeyCacheEntry(struct ath_hal *, uint16_t entry, extern HAL_BOOL ar5211SetKeyCacheEntryMac(struct ath_hal *, uint16_t, const uint8_t *); -extern HAL_BOOL ar5211SetPowerMode(struct ath_hal *, uint32_t powerRequest, +extern HAL_BOOL ar5211SetPowerMode(struct ath_hal *, HAL_POWER_MODE mode, int setChip); extern HAL_POWER_MODE ar5211GetPowerMode(struct ath_hal *); From nobody Sat Nov 30 19:09:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y102z6vPpz5fW8J; Sat, 30 Nov 2024 19:09:15 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y102z4wlPz4FXb; Sat, 30 Nov 2024 19:09:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DzrLnZ1Sr7hXRTXA/+QuC8xR8zPh0k/iPXXOlJqcqxw=; b=uHk3861zQDDeVtJ4QWxMl5/jILrwaPwTaiwPXHnknsGi0u+x2c4rdU3IM1BXIAsDxXKCHY GwuYwArk5HZzTNjQW1pEgJ8j7mIOSREmhGofx+I2UAMiYrEL5sWL54mtlxiDIsPeXNP07u O++O7yFYXC41AsCRse/XFk1t1LxCDP1+JgBkuTN+bOFg5d1hrqDLzm5uC6yBUAATZlMdaX 8PFA1VagFm2mcE8hXPhS5SGv2r14ol5Ytg9wgH8Sc95V3BcJkptsjeXtBoEsUnH41Q112X v0Brurt0qx2xGv7GPQICerIDj3HtW+ljuX9flIcpiY5y9ubw3C7kdvBA7bvTaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DzrLnZ1Sr7hXRTXA/+QuC8xR8zPh0k/iPXXOlJqcqxw=; b=FolnQ1/yR5D0ZkJMCYSixfezfNjpBWIAtYSr0CF+Lz4D9t9995JInTqY7dSOPDjF+8th4T 5+2sI9QJeqGCC3qugiplXqE7Ylsu/IJvVEKIzZP0I7lkWp3pXN4JbTq+LorFbJNFExIPVm UzzpnqoKvId1sgsfp1/kzx68TJjhae1aOZASU43tFJfmYrO/dGD47Mblnevu5QhRQmRiva eVYzQwAjl/GecGk3Lahgp65DigbgYpm7PBUF8/B+/NXHK+YKd4TwQuFTof3hF50bRmnKlE 9BjlGN2SsRAqHzMEtz6tiDMcbqIBCDQTxkOKsa6b1Iz80R4ePPJAKnudInM4Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732993755; a=rsa-sha256; cv=none; b=Va1QQhxEM4hdNTmfxrZ3mnz0n5lUTqlkoQSD1jCv4/5mMjnlRLwJILh8jqs8Z3htQQcDjA mryM06ZRVw5cZymWrf0rBVTgrMIr+1aP/wtEmWPwtF1gX5cI6FCu5JPf1IarHLP/F6GB9R WHCpPUXqBGmpdsm9tPSJ4MDZVkbEIvhGiAA/jDU2hYLUj0WxV+/AIKCBaWUirIWd6DEBIw kUZwZ+JXUqSvRAmbzA79bDZdcjfUTO4kWPQR+vNWCCHfrCiJdtfUSv9grXOqlgwskVS0b5 slYLhYt5T6PNjk1in4h3tNb9Plb4OmXeie/fKNgN4cxfA+eVPP816gvDQpwKvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y102z4YRDzL1H; Sat, 30 Nov 2024 19:09:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUJ9FNb097629; Sat, 30 Nov 2024 19:09:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUJ9FTO097626; Sat, 30 Nov 2024 19:09:15 GMT (envelope-from git) Date: Sat, 30 Nov 2024 19:09:15 GMT Message-Id: <202411301909.4AUJ9FTO097626@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ecefb5d33ceb - stable/13 - sys: Disable -Walloc-size-larger-than for GCC 9+ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ecefb5d33cebb599ffcc8f6ae29354eb6e798424 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ecefb5d33cebb599ffcc8f6ae29354eb6e798424 commit ecefb5d33cebb599ffcc8f6ae29354eb6e798424 Author: John Baldwin AuthorDate: 2023-11-15 02:37:25 +0000 Commit: John Baldwin CommitDate: 2024-11-30 19:07:56 +0000 sys: Disable -Walloc-size-larger-than for GCC 9+ By default this warns about sizes larger than PTRDIFF_MAX passed to malloc (rather than SIZE_MAX). This doesn't trigger deterministically, but it does trigger for kmalloc() of struct_size() in iwlwifi's iwl_configure_rxq even when struct_size() is changed to use PTRDIFF_MAX. NB: struct_size() in Linux caps the size at SIZE_MAX, not PTRDIFF_MAX via size_mul(). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42587 (cherry picked from commit ede077bf2a259c23923d1ab1231dc8c4577e6672) --- sys/conf/kern.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 7a2cc4bfa7ff..5e79dd2af66a 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -88,6 +88,7 @@ CWARNEXTRA+= -Wno-error=packed-not-aligned .endif .if ${COMPILER_VERSION} >= 90100 CWARNEXTRA+= -Wno-address-of-packed-member \ + -Wno-alloc-size-larger-than \ -Wno-error=alloca-larger-than= .if ${COMPILER_VERSION} >= 120100 CWARNEXTRA+= -Wno-error=nonnull \ From nobody Sat Nov 30 19:09:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y102z25sBz5fVwZ; Sat, 30 Nov 2024 19:09:15 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y102y4h0Pz4Flm; Sat, 30 Nov 2024 19:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RixbowPZz9wjz/Dbl8ScH2Ydet9cF1YKWXl0+po/Pes=; b=FsABe1Uy7l3P6Y2g3TDEZJQ75ZZclEmjL5RD6mmxm+/mbCuuLmr/MEbwa06GuV/hCNj9ID NJBbH/GzQQtIg6b19VAQIBGPT7zhVUbaLW1ZTUQRswpA9J7ypk8MuV8shCUzoxTMt4gTd4 CzX5Tp4xDB5IMPqjvXf4g9pE71DgaosKbyB4uO0Ny0FOC5FhIJC69I3hmjFwwcEGzWa3SB vA0lH/CfRJwDCaRF28SfUo9Q5aANYU4oZXQvDW8HM5UK2JKqk3rihQwaLpDC3wguDX6kli a0i3/8I9P7nKFci9KN2rcmhGQMtj67R0CDrVplbE92cDsncp40dgT084gdxx1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RixbowPZz9wjz/Dbl8ScH2Ydet9cF1YKWXl0+po/Pes=; b=oCgPsg9FaFxJNMoO78ggQaRY72wV0dzTy4GwN6qOHkp7HnmFNGs0soi6/WdqYpJLPtvlAJ fnwklvoEN5T7FDj5bF3WNHkWVfjN8p0WQkOyOEsXygg54Se8dlZUfVJpZjNWeUhg9ICM0w sYNH+tkITPV20eTf2wlgNkq5rKD++dbUGyp1RljrigO3HGZ2Ay8wxT+8xrV3MtPjBpyDDt sccv6NhK2RuIZRnDU3mJCEQIu2fn4ycGm5aodx2/X0HkUMmHvUeu6eYpLPbwLIMmWgghOr RJCpK7lNlG0agIq6jK+i2YpbXi4lSvU7geAI4QPe8CB31MkIV//RMDO9J18OUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732993754; a=rsa-sha256; cv=none; b=SbFIVi6STo1ItO9OcuHxUQ4ugbZNHJdyq9jonIzIuKSMVmIxQC0cyvONlIrJnoE7o2VLq2 qt7wRBeJ+YiuwQLZrv019rJwMpHSl2VJ0qWGzSRjwWay3N3lfLwTfauwrVtek6CGnvbCgw rmbwlDfVYlmslMGdN0sTTiAD2VqQW+AnOBVqvWaMzEQ0/JQ/grxCsC4f19EDWj1HuDSdjt i1iYJp0qddTseR1laiXkaXxC7OcIYekr13G//y6z+GyJFnUljMI3W6HquCbgFIDCSHD3L+ 4C8H57JJXFri/xsuE7UBxjlahHxPkDXUUfQrhlGisSdCeHtoPcHcymS4ugkoEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y102y3l0RzKsX; Sat, 30 Nov 2024 19:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUJ9EmR097572; Sat, 30 Nov 2024 19:09:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUJ9ERc097569; Sat, 30 Nov 2024 19:09:14 GMT (envelope-from git) Date: Sat, 30 Nov 2024 19:09:14 GMT Message-Id: <202411301909.4AUJ9ERc097569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a612e0607e52 - stable/13 - ocs: Fix a couple of type mismatches in function prototypes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a612e0607e52a0ed9d7e15e6e18e8dc6ac1bec7a Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a612e0607e52a0ed9d7e15e6e18e8dc6ac1bec7a commit a612e0607e52a0ed9d7e15e6e18e8dc6ac1bec7a Author: John Baldwin AuthorDate: 2023-11-15 02:36:48 +0000 Commit: John Baldwin CommitDate: 2024-11-30 19:04:54 +0000 ocs: Fix a couple of type mismatches in function prototypes Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42585 (cherry picked from commit 7aa5b2a9e7f5f3cd33e72cb1e95790fe7637f10f) --- sys/dev/ocs_fc/ocs_hw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/ocs_fc/ocs_hw.c b/sys/dev/ocs_fc/ocs_hw.c index a437342bd0d0..62ef3cd49be3 100644 --- a/sys/dev/ocs_fc/ocs_hw.c +++ b/sys/dev/ocs_fc/ocs_hw.c @@ -7759,7 +7759,7 @@ ocs_hw_get_active_profile_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *a * context. * - OCS_HW_RTN_ERROR on any other error. */ -int32_t +ocs_hw_rtn_e ocs_hw_get_active_profile(ocs_hw_t *hw, ocs_get_active_profile_cb_t cb, void* ul_arg) { uint8_t *mbxdata; @@ -7856,7 +7856,7 @@ ocs_hw_get_nvparms_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg) * context. * - OCS_HW_RTN_ERROR on any other error. */ -int32_t +ocs_hw_rtn_e ocs_hw_get_nvparms(ocs_hw_t *hw, ocs_get_nvparms_cb_t cb, void* ul_arg) { uint8_t *mbxdata; @@ -7953,7 +7953,7 @@ ocs_hw_set_nvparms_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg) * context. * - OCS_HW_RTN_ERROR on any other error. */ -int32_t +ocs_hw_rtn_e ocs_hw_set_nvparms(ocs_hw_t *hw, ocs_set_nvparms_cb_t cb, uint8_t *wwpn, uint8_t *wwnn, uint8_t hard_alpa, uint32_t preferred_d_id, void* ul_arg) { @@ -8118,7 +8118,7 @@ ocs_hw_set_active_profile_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *a * context. * - OCS_HW_RTN_ERROR on any other error. */ -int32_t +ocs_hw_rtn_e ocs_hw_set_active_profile(ocs_hw_t *hw, ocs_set_active_profile_cb_t cb, uint32_t profile_id, void* ul_arg) { uint8_t *mbxdata; From nobody Sat Nov 30 19:09:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y10311KKhz5fW8Q; Sat, 30 Nov 2024 19:09:17 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y10305mXvz4FmG; Sat, 30 Nov 2024 19:09:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eIggiy7gtlh1pC+eFB+EiNVuRndIHen8ivQFkafNcRA=; b=mEdV1bw8IjMr03O8i+tIaQenn03ElHJ/ghtizku3FaSjcf06OoLQAB747iU66xyoIIEDSC YCG/mmZFoL0QwmeXSTaKCWioRMzs1zRt48po0ou74x/jRLJQaaCh36jhbANSC0AGvTIHmw zOW9+58aAQzt/zU9PFTsjq4xgBZRzRDNWENQZuIFySrmZk1PH99EyHC5a5DWtcuicjjoKC CDuwe3KZgtm/yvyIYeEaXxQs9Nb23u7C6dYMkCQbNeclT1SBgt3KUupEMKuouD8I9qQGx2 ExIT/x+TrNoKX0bRgN4gXtS0mBQMUAYPQaYzCy42enrhWDwTjH7vwJN8aItLqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732993756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eIggiy7gtlh1pC+eFB+EiNVuRndIHen8ivQFkafNcRA=; b=kik1YaMDImT6LMB9va5bTAMP7tIIHEXDTe1XhK9Y5Lu/E1Omq1D9bz2LMuvVKHNZqur7A4 g/a/e2VTlnivcnP3drCfnBStoSJLC1GyZDbOwwrwWhCBw2RiA3vPdwinO9iIyttRTRWKGn 8kfPzodOZxtwOB7buPz2o97hPyMnHKf5wj+4mdeyWtWbeqpeB4OcscciFEBXHKv/ifeCzg F66dOnxDlDBFaB8WoLAOe1Wr4m6XS1WdcrZ5GSsFc+xBNYfj/2AeiNiHluN65GZgQ2JjTe ZGNopViXkoM9rbZpZv2l9JUP+fAQhauid8s3GZhFOi3NStN5B4kuC+hgZsh0bQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732993756; a=rsa-sha256; cv=none; b=m1Gn6BtSsw3sO+yQmPZs3rPvLwnBIJ4tpH43AeBqi8ha9GuL2c3ronXLNqRYu3ey9wDrFE 062Kf6CdQVWHhyAmYGdXeHVjipEzLVA7/+J37Q5d1yzQ1O4biLrSj8PuEeMTW3whtEWDqp YFea1gTGxxI/s7hlvacHPGK4sCuXabocC4PGAHgiBqKGxrkRSuWmlvlZ+eFGql1FuHrfrG 3O7fKvBWsX8pPUeZZ5kQaigz5Lv/fhRvSiWP/5ebU8Q/4Wtlun4SoojoUBSWd3B8J0ctox rvN5xOFx+ajHkgkn/pH/s7Dm2AErzPnls6HDn/W61m3L0To+dNwOSnKayKHVLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y10305LWhzL3k; Sat, 30 Nov 2024 19:09:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUJ9G6p097692; Sat, 30 Nov 2024 19:09:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUJ9Gj7097689; Sat, 30 Nov 2024 19:09:16 GMT (envelope-from git) Date: Sat, 30 Nov 2024 19:09:16 GMT Message-Id: <202411301909.4AUJ9Gj7097689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2898e2c7ce10 - stable/13 - qlnx: Fix a couple of type mismatches in function declarations List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2898e2c7ce10da4f835a119f0b11a8009c63ad7c Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2898e2c7ce10da4f835a119f0b11a8009c63ad7c commit 2898e2c7ce10da4f835a119f0b11a8009c63ad7c Author: John Baldwin AuthorDate: 2023-11-15 02:37:06 +0000 Commit: John Baldwin CommitDate: 2024-11-30 19:08:31 +0000 qlnx: Fix a couple of type mismatches in function declarations Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42586 (cherry picked from commit be909a79a8e2506b49ed81f9bd8115512dd613a4) --- sys/dev/qlnx/qlnxe/ecore_l2.c | 6 ++++-- sys/dev/qlnx/qlnxe/ecore_sriov.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/ecore_l2.c b/sys/dev/qlnx/qlnxe/ecore_l2.c index 487b56629009..ee7d225540d0 100644 --- a/sys/dev/qlnx/qlnxe/ecore_l2.c +++ b/sys/dev/qlnx/qlnxe/ecore_l2.c @@ -2240,7 +2240,8 @@ ecore_configure_rfs_ntuple_filter(struct ecore_hwfn *p_hwfn, return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL); } -int ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn, +enum _ecore_status_t +ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, struct ecore_queue_cid *p_cid, u16 *p_rx_coal) @@ -2275,7 +2276,8 @@ int ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn, return ECORE_SUCCESS; } -int ecore_get_txq_coalesce(struct ecore_hwfn *p_hwfn, +enum _ecore_status_t +ecore_get_txq_coalesce(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, struct ecore_queue_cid *p_cid, u16 *p_tx_coal) diff --git a/sys/dev/qlnx/qlnxe/ecore_sriov.c b/sys/dev/qlnx/qlnxe/ecore_sriov.c index 65df523bb83e..e1198f91e497 100644 --- a/sys/dev/qlnx/qlnxe/ecore_sriov.c +++ b/sys/dev/qlnx/qlnxe/ecore_sriov.c @@ -4925,7 +4925,7 @@ bool ecore_iov_is_vf_started(struct ecore_hwfn *p_hwfn, } #endif -enum _ecore_status_t +int ecore_iov_get_vf_min_rate(struct ecore_hwfn *p_hwfn, int vfid) { struct ecore_wfq_data *vf_vp_wfq; From nobody Sat Nov 30 20:12:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y11SF6KkLz5fbNx; Sat, 30 Nov 2024 20:12:45 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y11SF3rJGz4Tnq; Sat, 30 Nov 2024 20:12:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732997565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3Kz8jQNv1kmmlubaehM+I238VhFNVCEreW/btcj/fs=; b=NpTAFibl4osdg8Fk9cYO+GlfsaEtNr3TZraUXQodgimJ/Y9FzET+hsCkXQlyisa75F65OU r+gQSkE7C1tC/BFvIREARQcH/tXAIp4mhLMJx4+BT5fmJkBz1kfprZ/mDXEe6BhZaUV+J4 nxus+0abZKHSQ8OE3W1Ygtk006Yk06pr2LmsNiHToWsNWfFC0874Ukf7bLVRw1Dmeqr33w qZzU+VZZFLT6h2rJWMMeKNQR9L/4J7XuYsJ+VujKPfw3Hl2iTLJs59bypglG0hNbLvXKC2 mEtHcTeE/Lde/mZ1YuteA7P5uxIowKbZfxQPvGKCSabxBg3+5bZB5WsWRnbTWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732997565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3Kz8jQNv1kmmlubaehM+I238VhFNVCEreW/btcj/fs=; b=fuRSIDmcAlS3lNltNOa1GvSvlaWcYmLvjfbhWWKR5i1KWuZArqlV9alkK5PrZfx9llh3P1 eHI1Qf1rvbYZyU6vUqM5mgDXbdGAISvg+UMHdpE3UAuAetjt9s5jvrX3k6sd9qV50/VqHP NvzpS41lyq7ax7dxkMlQNIZg6EVM2WIN5mL5vf187SCvE8aL8zdQmLuC9UwjCjRgIYZlpS XDFXoxSKS0IfiSwbn7yt4PhX3AK2h9O6jPFUyGMdcEBJZ28wZ5T9lE/Iws13rpXpzoF+u0 wdRGj4FbpjqpEynJ3pfgRIhLA/peoESzj2xfW+K07ZCmtsEGVWU+Q1B5Y3oAAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732997565; a=rsa-sha256; cv=none; b=bKmZ2iyBg8vxizf0OXzmo23cQR3i7z7Gprmm05L6W/S+WQm832YMQOti2sJOP1s8WvAYvU ni0XEtcd7BXlN2Vt4eN7SdVGB9it2YmrpXgXwxgbgK85P/ooo5yBKH5ADuETb59fM9FSl9 ZKv/gGaTTe5P0p+ii6ou2G5UZx8XmPz9jcraleAEZ2XLGVEA0SU/qcBAlftGICO+ie8PDD Yyk3sroKakyifY3/B28esYi3P4q8a7FhL6v5kJ/vq+rxDwWLaDWOEMU2oY3jobILcu9I5d fAgFZX7ZdBr5pUfrLFvPMftIn51w1LXvR+l03z8oWUly+uC/Fuc7bQUdzeZDNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y11SF37gkzM46; Sat, 30 Nov 2024 20:12:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUKCj4A026533; Sat, 30 Nov 2024 20:12:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUKCjYF026530; Sat, 30 Nov 2024 20:12:45 GMT (envelope-from git) Date: Sat, 30 Nov 2024 20:12:45 GMT Message-Id: <202411302012.4AUKCjYF026530@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: eb9ef9d7dfa1 - stable/13 - Merge commit cb7a03b41fff from llvm git (by Nikolas Klauser): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eb9ef9d7dfa1d8ef2a74d03cdf7169edd90ec83a Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=eb9ef9d7dfa1d8ef2a74d03cdf7169edd90ec83a commit eb9ef9d7dfa1d8ef2a74d03cdf7169edd90ec83a Author: John Baldwin AuthorDate: 2024-08-05 19:19:30 +0000 Commit: John Baldwin CommitDate: 2024-11-30 19:11:03 +0000 Merge commit cb7a03b41fff from llvm git (by Nikolas Klauser): [libc++] Fix failures with GCC 14 (#92663) Fixes #91831 Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D46003 (cherry picked from commit 9bc300465e48e19d794d88d0c158a2adb92c7197) --- contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h | 2 +- contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h | 5 +++++ contrib/llvm-project/libcxx/include/bitset | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h b/contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h index 198f0f5e6809..46ad388ec2ea 100644 --- a/contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h +++ b/contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h @@ -108,7 +108,7 @@ __constexpr_memcmp_equal(const _Tp* __lhs, const _Up* __rhs, __element_count __n } return true; } else { - return __builtin_memcmp(__lhs, __rhs, __count * sizeof(_Tp)) == 0; + return ::__builtin_memcmp(__lhs, __rhs, __count * sizeof(_Tp)) == 0; } } diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h index 54390a1939f7..1048f67055a2 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h @@ -23,8 +23,13 @@ struct remove_pointer { using type _LIBCPP_NODEBUG = __remove_pointer(_Tp); }; +# ifdef _LIBCPP_COMPILER_GCC +template +using __remove_pointer_t = typename remove_pointer<_Tp>::type; +# else template using __remove_pointer_t = __remove_pointer(_Tp); +# endif #else // clang-format off template struct _LIBCPP_TEMPLATE_VIS remove_pointer {typedef _LIBCPP_NODEBUG _Tp type;}; diff --git a/contrib/llvm-project/libcxx/include/bitset b/contrib/llvm-project/libcxx/include/bitset index 308c58995dc3..5ea48d491303 100644 --- a/contrib/llvm-project/libcxx/include/bitset +++ b/contrib/llvm-project/libcxx/include/bitset @@ -376,8 +376,11 @@ template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long __bitset<_N_words, _Size>::to_ullong(true_type, true_type) const { unsigned long long __r = __first_[0]; + _LIBCPP_DIAGNOSTIC_PUSH + _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wshift-count-overflow") for (size_t __i = 1; __i < sizeof(unsigned long long) / sizeof(__storage_type); ++__i) __r |= static_cast(__first_[__i]) << (sizeof(__storage_type) * CHAR_BIT); + _LIBCPP_DIAGNOSTIC_POP return __r; } From nobody Sat Nov 30 20:12:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y11SG55tWz5fbjg; Sat, 30 Nov 2024 20:12:46 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y11SG4XQ0z4Tlf; Sat, 30 Nov 2024 20:12:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732997566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+KY9maGsH6Iv2lmxaiCLKGH2PgGRr4F94P//cTdARgQ=; b=kS0j0dXl+VZNeFIXWUQoCeu4mNFt2WesG37uv4jdu9446dSbKVxuY32lkH7D9uiDi75gKI fbUIXd3YM2azahXvrIJIzOr4l4SUsAV/FGcWnOHMrm/PLyx4sJHvi/XdG3whgLApDnMzRx 8kspTwSOnF5YlLiwAwIitXjMHOZd4MpJ1h5UXLKoOMy1gUt5w7iQifvaWuLhujnGpiQAiC i3UM8yJQvJdlIneJYSayUoeZSDCCvvUTJlWO8pwxYfK6w1+Enqg7edAgKYFSH1NUI3bo5m 6hYk2xRgN/OOtq7+lzBClqABF3iWOorivpCzsJbwe0kFtadT8g91EXJTeoIHMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732997566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+KY9maGsH6Iv2lmxaiCLKGH2PgGRr4F94P//cTdARgQ=; b=O1naOe2ubBFEVUaFlbm5AtPoEXNNBU4j6BTadMPRu9HWryiZqjVznEmoYCLjXEPXmem9+q 2p965Y9H2GpvEojb0TiRP1BPVyeLdUSOhgrxagc5S5Xwp5twFTFeq3RSmCojmoNzUEe7C+ Vpa3C++oO71uIC6suQKzRzAeARUfa5BEJ3aINspN3uhTnzhzqGS2Snaxr1bcfiMYgbN0KB l7EVQ60rL8akA6b/kqZxZ1ownWwzd+kzz/sdUyZdDQ2+MPAUqyX9idiZ3Xlfy613eFp3mc Sp8zqn6Z0PW/m926P8YTWU+0jQ2reG8W9IMfuNYbSpUvGM3C6HlTV2l8XgJfGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732997566; a=rsa-sha256; cv=none; b=trXR6KzFWcBkOsCyTmAN79f406oN9BdEIdZNVY583fQvlW/HGLPcAlWQfEs3FUy3KOv+mV AT0OgUufXdpe/gxxG04idL9Q0ot8NuMyZo/BZgcSCQJt28wFZUNYMdc+RNpB0v2nGBWkq7 UjhPbsH6YqxweQ+SofgLWf8qTBB3OvvfFw8nU9Xh42fHqPkCqyPDxV7+qEs+UvpPKKaIZ4 NB/3OaXBolK+6KqFojhFB4FLiAjKQNyfiBxUFf5hKzxOi1JHat6B1KZqtdHpXBRdbjoSVI TaGsVzSKtTio3lFT1ZE2iY3lrpsDo0pJSpdMYJFUmWPgGNpdk7w6mCRcTyCvTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y11SG479szN9J; Sat, 30 Nov 2024 20:12:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUKCkN5026586; Sat, 30 Nov 2024 20:12:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUKCkth026583; Sat, 30 Nov 2024 20:12:46 GMT (envelope-from git) Date: Sat, 30 Nov 2024 20:12:46 GMT Message-Id: <202411302012.4AUKCkth026583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 9084eb8678d3 - stable/13 - openzfs: Fix GCC 14 warnings List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9084eb8678d3c76f10dd4c7db86897e3f04a222b Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9084eb8678d3c76f10dd4c7db86897e3f04a222b commit 9084eb8678d3c76f10dd4c7db86897e3f04a222b Author: Tony Hutter AuthorDate: 2024-04-29 18:31:50 +0000 Commit: John Baldwin CommitDate: 2024-11-30 19:18:32 +0000 openzfs: Fix GCC 14 warnings This is a direct cherry-pick to stable/13 of OpenZFS commit 4840f023afae7c4932c903cf3a436c02c6704e20: GCC: Fixes for gcc 14 on Fedora 40 - Workaround dangling pointer in uu_list.c (#16124) - Fix calloc() transposed arguments in zpool_vdev_os.c - Make some temp variables unsigned to prevent triggering a '-Werror=alloc-size-larger-than' error. Reviewed-by: Brian Behlendorf Signed-off-by: Tony Hutter Closes #16124 Closes #16125 --- sys/contrib/openzfs/cmd/zpool/os/linux/zpool_vdev_os.c | 2 +- sys/contrib/openzfs/lib/libuutil/uu_list.c | 14 ++++++++++---- sys/contrib/openzfs/module/zfs/vdev_raidz.c | 5 +++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sys/contrib/openzfs/cmd/zpool/os/linux/zpool_vdev_os.c b/sys/contrib/openzfs/cmd/zpool/os/linux/zpool_vdev_os.c index cfaeef56a20e..42ccd39919bf 100644 --- a/sys/contrib/openzfs/cmd/zpool/os/linux/zpool_vdev_os.c +++ b/sys/contrib/openzfs/cmd/zpool/os/linux/zpool_vdev_os.c @@ -432,7 +432,7 @@ static char *zpool_sysfs_gets(char *path) return (NULL); } - buf = calloc(sizeof (*buf), statbuf.st_size + 1); + buf = calloc(statbuf.st_size + 1, sizeof (*buf)); if (buf == NULL) { close(fd); return (NULL); diff --git a/sys/contrib/openzfs/lib/libuutil/uu_list.c b/sys/contrib/openzfs/lib/libuutil/uu_list.c index c3a447d01de3..0ad5fff6fd4b 100644 --- a/sys/contrib/openzfs/lib/libuutil/uu_list.c +++ b/sys/contrib/openzfs/lib/libuutil/uu_list.c @@ -507,14 +507,20 @@ uu_list_walk(uu_list_t *lp, uu_walk_fn_t *func, void *private, uint32_t flags) } if (lp->ul_debug || robust) { - uu_list_walk_t my_walk; + uu_list_walk_t *my_walk; void *e; - list_walk_init(&my_walk, lp, flags); + my_walk = uu_zalloc(sizeof (*my_walk)); + if (my_walk == NULL) + return (-1); + + list_walk_init(my_walk, lp, flags); while (status == UU_WALK_NEXT && - (e = uu_list_walk_next(&my_walk)) != NULL) + (e = uu_list_walk_next(my_walk)) != NULL) status = (*func)(e, private); - list_walk_fini(&my_walk); + list_walk_fini(my_walk); + + uu_free(my_walk); } else { if (!reverse) { for (np = lp->ul_null_node.uln_next; diff --git a/sys/contrib/openzfs/module/zfs/vdev_raidz.c b/sys/contrib/openzfs/module/zfs/vdev_raidz.c index 5c25007f17b9..ecdaea0bcc51 100644 --- a/sys/contrib/openzfs/module/zfs/vdev_raidz.c +++ b/sys/contrib/openzfs/module/zfs/vdev_raidz.c @@ -1182,8 +1182,9 @@ vdev_raidz_matrix_reconstruct(raidz_row_t *rr, int n, int nmissing, static void vdev_raidz_reconstruct_general(raidz_row_t *rr, int *tgts, int ntgts) { - int n, i, c, t, tt; - int nmissing_rows; + int i, c, t, tt; + unsigned int n; + unsigned int nmissing_rows; int missing_rows[VDEV_RAIDZ_MAXPARITY]; int parity_map[VDEV_RAIDZ_MAXPARITY]; uint8_t *p, *pp; From nobody Sat Nov 30 20:12:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y11SJ2L8Bz5fbd0; Sat, 30 Nov 2024 20:12:48 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y11SH5vSLz4TQr; Sat, 30 Nov 2024 20:12:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732997567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Gbdrt0sL6ccNdDK1ZqWc3XPGl27YJMLFTfwxan0goU=; b=PEtyWdZLPizOZeDPFeF6yxaBFjiZlvUqX/SEBFYNCUpRneAuh3204ZektBP9tySX2EL0AS /rE9bzTFZpmal12NEeqmMJ1tSsF00bHGuEvnqrroNaYo7cPGfAGtJOI2MVcGVUOdyNdFWd k1o28in5ssheEZlYfifjrVqfBYIloTIJOgaS/cqTcc+uGW0iLfnJhvM5qaiO+6RK+hqenV BWgilbF247Ev0Sy4qnlofhy10SklUYwoqdDLdyhkINF1JWWEATbiuKgV2p5t+V6sdz/boB xdHKGSzxeifIHGVAHG2rrtjuxFQNoCKETNR6wi/8v3uUGrBTp4tje8pLlHQ8Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732997567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Gbdrt0sL6ccNdDK1ZqWc3XPGl27YJMLFTfwxan0goU=; b=cLZ6l8qtJENm3ffE4EbJuxnZZiP8T4srJFvTAPIW6oHAThHOapGMccdXAnE5F3eLQq8q95 HjsmP0uwMWQuIkBbOrFRlyN2FjcNK3C0sY5pvTUEBoV0L7wP8KYM7IwDB1lXxgzvcbQTXA mEAt4ksXRJMDK4f6XVW0eXMkMOnJ8BqNiEGrIQ7NwJ9lvFdq6EayE/Y38xRU7aE+jEEc4+ 09wS/2gQw0BuX6A6lRVvkKQZHnSo4lEt6l7vVzQkNh6BjopehMY94y/B/wQ+sQaENI+0wv DOPzbHZzLbIzuP5NDSw06wgTD8P1Z0zPH68MTjo0Y3k0ozBO4GjXgmtLp8wrPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732997567; a=rsa-sha256; cv=none; b=I34j1fwsAc/kqC/au8sxMpGvz9Iueza3axPJbeAhPQvbyeyUDXWrGWf08eQMfZ26Fg87dv LeJ7NSr5pUW+LPaawz4TPcY41DZ+4Ik0G7C7Dum/L1fGi7tTkV/d/sFRVYvRN8wYoI5Kkm Po7VOnZVGPu/6qLlJ0eBnkOczpd/lUnSPI3TsM2kEItQnXGb1AmrsYTp+ii9Ut6cT7VFgH EWJHhJQMeIxY2bj5nlRFwA7v4aWhf+ac/AwLNESx7LqLEoiF5R0aZIWdrfi1Wse8RjMqtN cQWHkQKkVz+5iOd7kGNly7BQeBvgx2nL+zIV+bL7Xm4CK04IfVh5KovYcdf4OA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y11SH5T9FzMYn; Sat, 30 Nov 2024 20:12:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUKClCP026638; Sat, 30 Nov 2024 20:12:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUKCl2B026635; Sat, 30 Nov 2024 20:12:47 GMT (envelope-from git) Date: Sat, 30 Nov 2024 20:12:47 GMT Message-Id: <202411302012.4AUKCl2B026635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6b5a9d287d03 - stable/13 - libcxxrt: Add a stub implementation of __cxa_call_terminate List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6b5a9d287d03fde3801afa9809b0a9640ec6bf89 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6b5a9d287d03fde3801afa9809b0a9640ec6bf89 commit 6b5a9d287d03fde3801afa9809b0a9640ec6bf89 Author: John Baldwin AuthorDate: 2024-08-21 17:37:48 +0000 Commit: John Baldwin CommitDate: 2024-11-30 19:53:22 +0000 libcxxrt: Add a stub implementation of __cxa_call_terminate This function is called by GCC 14 if a destructor invoked during exception unwinding throws an exception. Reviewed by: emaste Obtained from: libcxxrt commit 391a3dcc1054e18c2f0dff4e14d6d79ac95399d7 Differential Revision: https://reviews.freebsd.org/D46004 (cherry picked from commit 297a9e552b9a5adf07d195eae9649b0758f395af) --- contrib/libcxxrt/exception.cc | 13 +++++++++++++ lib/libcxxrt/Version.map | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 35ff997dd445..b56333e979a2 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -1433,6 +1433,19 @@ extern "C" void __cxa_call_unexpected(void*exception) abort(); } +/** + * ABI function, called when an object destructor exits due to an + * exception during stack unwinding. + * + * This function does not return. + */ +extern "C" void __cxa_call_terminate(void *exception) throw() +{ + std::terminate(); + // Should not be reached. + abort(); +} + /** * ABI function, returns the adjusted pointer to the exception object. */ diff --git a/lib/libcxxrt/Version.map b/lib/libcxxrt/Version.map index a54b6a4daad5..39a54f4868a9 100644 --- a/lib/libcxxrt/Version.map +++ b/lib/libcxxrt/Version.map @@ -287,6 +287,10 @@ CXXABI_1.3.11 { __cxa_init_primary_exception; } CXXABI_1.3.9; +CXXABI_1.3.15 { + __cxa_call_terminate; +} CXXABI_1.3.11; + CXXRT_1.0 { extern "C++" { From nobody Sat Nov 30 20:12:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y11SK0fP1z5fbLl; Sat, 30 Nov 2024 20:12:49 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y11SJ70TWz4TrW; Sat, 30 Nov 2024 20:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732997569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wIDxp0vqJZXWo6T9zM6BeEYuGpXGRKvahoEtDAO+TxI=; b=Kq5ZQxy2e0HST78f4wZ8BNStlS6W3UDNC4vgiyz/BjkXQjhrIROSBYajOLgGfBvxumNpe8 fvqnV1ajCcoK8mp7RG+kQhZmSb2e/npA0idOq81CpPRFV/JxjgnAu0MFStMD6IMAiWyGSs MMS8hMcHsuz4mkVYVbdE9lmlgYLv0bua46QUNMzsiVbZ7DMSdGUG/U3Gn+SMNl0Km3cZna 4KPwiuHMBPTz7b0keNKLomVxVI5ATYQg6+YoENFO/X6XbysU84eXsnA4Su59jlaUsJncwR qkDUSFT0stlEdY3TlTrlQFT0ItgzVIAqSt5noa/Mgu/LtQINSMNvzCueUoCKbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732997569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wIDxp0vqJZXWo6T9zM6BeEYuGpXGRKvahoEtDAO+TxI=; b=ipOt+joxgUQi7sHOY7LxsMoiMlCeoeTpT1hEie4zHQdqJCmGjsmskgnd9dzVvRWc5UeU3s VTi2iOFuq6USHEu19/gg5Nd2Sv4AVxku5gqaXw4f0JYXOUF1kTf9FoU+JwO2BVB3naQIUH TIIwUm3PV6Jck/yEQkrfNfj7Rdypk+HA9ESlWW5eFjLwsEualeFNJ2/jFfFVBcJQjWZiYi 9TLQhLecWZTOzvwJjRg4ZocrquiFWAKdJtPoRiXDp/5NDoqnO2+3QpqCLZbHyo93u5Mh0J XG+7t05NyCCLoj01BETi17p6A5p2+gVhhys3ubVNszIl+bE4eYwF5Ab8ad3oFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732997569; a=rsa-sha256; cv=none; b=u9D/rTZAxvLaDyJjQDwCcsRVQvln9HIE9DAV2Ky4thQXC6B82batJ1x7EyEl0tIDYVhCKM i2TAewTe4Nce3hMQm8Fcjb7KSfWALGzA7fhSHFlHX0G4bmlP4CFu0zo3MvabtVFAakUD5H 4VctnXBjhh1QlLBNAqJbUL1LMCi4vZzeX8mfAIbmXU5BDxHggNA64D1sbVZPRCT8WlNcQe mUKl01z6qAvz0hep8fRT3JdYr/tTYq92HmREWL567Fe5++jRRZrgs0QqqyryIP5mRopRwZ NwSIIQd01UapkdpWtwsYzjAmo1zuuNzHWIExptsaToZ+A7bF/lmYBPp88zUPZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y11SJ6bRGzMYp; Sat, 30 Nov 2024 20:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUKCmRm026702; Sat, 30 Nov 2024 20:12:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUKCmV0026697; Sat, 30 Nov 2024 20:12:48 GMT (envelope-from git) Date: Sat, 30 Nov 2024 20:12:48 GMT Message-Id: <202411302012.4AUKCmV0026697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: be20e3fd93c4 - stable/13 - bsdinstall: Consistently use item count as the first argument to calloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: be20e3fd93c43009b389555bcc4261de309cfab3 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=be20e3fd93c43009b389555bcc4261de309cfab3 commit be20e3fd93c43009b389555bcc4261de309cfab3 Author: John Baldwin AuthorDate: 2024-11-30 19:53:30 +0000 Commit: John Baldwin CommitDate: 2024-11-30 19:53:30 +0000 bsdinstall: Consistently use item count as the first argument to calloc This is a direct commit to stable/13. Reported by: GCC 14 -Wcalloc-transposed-args --- usr.sbin/bsdinstall/distfetch/distfetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c b/usr.sbin/bsdinstall/distfetch/distfetch.c index fb8d2cc048ad..9bbaf6a2f137 100644 --- a/usr.sbin/bsdinstall/distfetch/distfetch.c +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c @@ -117,7 +117,7 @@ fetch_files(int nfiles, char **urls) uint8_t block[4096]; /* Make the transfer list for dialog */ - items = calloc(sizeof(char *), nfiles * 2); + items = calloc(nfiles * 2, sizeof(char *)); if (items == NULL) errx(EXIT_FAILURE, "Out of memory!"); From nobody Sat Nov 30 21:24:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y13362JZ7z5fhPb; Sat, 30 Nov 2024 21:24:34 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y13361WfRz4bCx; Sat, 30 Nov 2024 21:24:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1QClL/N9telrxWfDmFyVsyBp4aBChNmhNPD77iBGMTY=; b=Wpou/skNR+zcaoWdCY7UaNXpKlXkdxdwWR0P72HZdptPH9IYeXJj5gopzvcbGhINT2cYKi f4IIWxhsd77MGDLhGjwXLSkgQaK59iNIErkqDRSBQ4mC8evmKpnyWfgnSYuWigDGwq95BG 7GN5kQJpiWqgnVqM7thM2Y2qL9SacvA6dUlCfeBaH0f4EXkGqRjCrwUwCkxObH31bgI36R 9j/lA3blUG0i6yklO07YxwWt81fmy+jvGY9wMTIIKkTI4o0ku5Ao/1Ru2XWpqgWiyERmeK l5j/tWqiRk3WKIEuvOfuSsFaeojvwVRuDt5omJ9l86C2qUSxhzi0PhJLk7FcQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1QClL/N9telrxWfDmFyVsyBp4aBChNmhNPD77iBGMTY=; b=Ptsv1ldT1wVqSI2fANw53zCK/JvfopVgJRUS8jIMqnB61njp/vzQou8farKlLFDUGzZ/IF F8VuwiHUfhf3abyG53d1StuSeqsivP8HewWMqGOFxjU6i0QGHIKfoFJhVX93WFfeHfvt47 VxQJB+IgpIcg8s4XQ10SBkyUMkOhrQIgw5jdmeobByIq/e4UnxHxRHKsEOhgRPnfgWhUnE JtxXc1F1HIO83QM02goQr8kuz1Ix6mP85lrsyaaUbX4DovKYmnEtAnaL/sgjDTUoLqJXuw J7P/mrwDswYA+zTOHbObUUGOu1JnORMcTnkU/B/ziVEsCcYIZ99pO0WWwsYtQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733001874; a=rsa-sha256; cv=none; b=Fa3bTdS4/yM9Z2EA04585fgTys6vmEeiZKMk5eUtmjM9tPclpch0NdoP1TFr2QgQN+Peo1 2DBSle8iw1/5pmgeLG3DvgqaVlwSE0uzBBZhbRZa5wsSa6m/zx989kuT3Q/pdcI42NUGRj 8anl7p+ZkxulFp68GElM5MXYOO+84+7neMwNdnc8hxi2Yk1rKATYwD4A7Pkf4C5OFyWpxt /6WJ98Q8YGsbcCcOyOccXpYaTYiD8HsTAG+gUWwSozyQRD7tKQ495GlDallUe0ad30wow9 RYEGhb5UmcEk2fy08FuextXXv0lJSZp4z3a9Sa9c/SwPOAMM+6a7kVF/zG4D7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y133616yczQ09; Sat, 30 Nov 2024 21:24:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AULOYok057354; Sat, 30 Nov 2024 21:24:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AULOYFi057351; Sat, 30 Nov 2024 21:24:34 GMT (envelope-from git) Date: Sat, 30 Nov 2024 21:24:34 GMT Message-Id: <202411302124.4AULOYFi057351@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f333500783f6 - stable/14 - ObsoleteFiles.inc: Remove dtrace/amd64/kinst test directory List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f333500783f69cb6d3c95a8998d4f9b58ad65a9b Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f333500783f69cb6d3c95a8998d4f9b58ad65a9b commit f333500783f69cb6d3c95a8998d4f9b58ad65a9b Author: John Baldwin AuthorDate: 2024-07-31 18:36:41 +0000 Commit: John Baldwin CommitDate: 2024-11-30 19:25:16 +0000 ObsoleteFiles.inc: Remove dtrace/amd64/kinst test directory Reported by: Mark Millard Fixes: 911f0260390e dtrace: move kinst tests to common (cherry picked from commit 20cd6bbc1048d985ac75667c23fcae5f5fe98001) --- ObsoleteFiles.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index a39336af81db..1c3cb47f080e 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -1008,6 +1008,9 @@ OLD_FILES+=usr/include/machine/swi.h # 20230714: gsignal OLD_FILES+=usr/share/man/man9/gsignal.9.gz +# 20230704: kinst dtrace tests moved to common +OLD_DIRS+=usr/tests/cddl/usr.sbin/dtrace/amd64/kinst + # 20230626: Only install sys/dev/nvme/nvme.h to /usr/include OLD_FILES+=usr/include/dev/nvme/nvme_private.h From nobody Sat Nov 30 21:24:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y133755Hnz5fhDG; Sat, 30 Nov 2024 21:24:35 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y13372qTvz4ZlX; Sat, 30 Nov 2024 21:24:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mjkhiEd73mrmhUjVbkXOhGImpuU9HcSlCrHzvEL/R0s=; b=GCOGqevvzQ2DXZqKJFFZ8xMTAiib9nSJ1lg2dPEBZfw8IgNFgOO+noEeMv9lci7i5GvzuI zhkfFbCiizuVpPuIehP9gKLgI04wVro+kuP7/b1eaJalcWKpg+kmhxfn36DAc13A7VjM0C wfomuUO86eBdmGvYJ+blEBmHaACtpvyKWTiy41UsBZvQMcFs0x+Qq2GuDICXNAU/dcouN7 ++3cmXmiqSeKRryopiunufKEV3piZ+hAHbsEv3oVS8euJCU2m2PwscztzLsQSobjvU0DjO ggw7O6+oKOnwWA8gI5m+Jccs0NeRh1Zcdg+FE3yFSarWH6yZzdO6K4oiJxvp+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mjkhiEd73mrmhUjVbkXOhGImpuU9HcSlCrHzvEL/R0s=; b=WuO7ys9D2/W6cx9oy5e6C52EJAW9zTe1Qm0EVb2DyvIvviqj0YTmkquBxOU1OSJ2W7Bl5p taOFYLGHwMuNs65lbSB/i3zf4233AY4i4gmmyYQfwNor+3pNSSUkTaIs8jwOY1L2/9sonY S6pwzgJv7vewnQnSz4u7Q/1BmWqUe7c85xuleXQLGZ2QBnnncciPMpzb4PLXHTyGCxgw0T Oy/BDDZvZm+M0OVlc7E1Kwj2gA7erkzwGlBAxxaiKMuIZTgaJU5XTPHWZtlTZ5W7thFM/O hbZv8UQQOQaYckBqq6L1yoSuQOtW9H9YAbhdVLEYSqE2CkKhKnxkJepg/XJllw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733001875; a=rsa-sha256; cv=none; b=aHYM4oC+LJV0fiqF9ejOO//Pzu/YbKMDeWeR/rqparp6yJzX6Bo+aqbzF0zFq71WOajBm0 phVZSeJiyZUUz240mEW1Unnv8FoBanY3ZP+gJSpKCEVfkjzlhvl/RlhSGPErZLW6H49Sbn fX10oP7RkDGJIe6ZnpAhiXBeoiDlA20ODEUb/UfWEdgYq7XqsG6GvwLRRD4+Jg6sr3dNDy 3y92+ddpJbNPfygeohvQ0t14+Nlv2uoKe3RWAN64mt2eZp9Pcq4OFzM0Oc2xT2lAChbhlK NdRcu7r7J9R7sN1bEw/bxfbpfCrqwwZUlME1Sq+PBhnn9trg/3kARVi5+1BbRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y13372RZGzPnR; Sat, 30 Nov 2024 21:24:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AULOZck057432; Sat, 30 Nov 2024 21:24:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AULOZ7R057429; Sat, 30 Nov 2024 21:24:35 GMT (envelope-from git) Date: Sat, 30 Nov 2024 21:24:35 GMT Message-Id: <202411302124.4AULOZ7R057429@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 5d425cdf4e01 - stable/14 - ObsoleteFiles.inc: Add missing .gz suffix to various manpage entries List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5d425cdf4e01bee8ddcf6f5c06e6cf908eb30d89 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5d425cdf4e01bee8ddcf6f5c06e6cf908eb30d89 commit 5d425cdf4e01bee8ddcf6f5c06e6cf908eb30d89 Author: John Baldwin AuthorDate: 2024-07-31 18:48:24 +0000 Commit: John Baldwin CommitDate: 2024-11-30 19:28:09 +0000 ObsoleteFiles.inc: Add missing .gz suffix to various manpage entries Reported by: Mark Millard (cherry picked from commit c04ef1bfb461a1c8d426b16532d85af5637727c9) --- ObsoleteFiles.inc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 1c3cb47f080e..858a1a07be87 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -536,7 +536,7 @@ OLD_FILES+=usr/tests/usr.bin/uniq/d_show_duplicates.out OLD_FILES+=usr/tests/usr.bin/uniq/d_show_uniques.out # 20240114: Removal of geom_map(4) -OLD_FILES+=usr/share/man/man4/geom_map.4 +OLD_FILES+=usr/share/man/man4/geom_map.4.gz # 20240107: new clang import which bumps version from 16 to 17 OLD_FILES+=usr/lib/clang/16/include/__clang_cuda_builtin_vars.h @@ -982,9 +982,9 @@ OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-matchers_test OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-linked-ptr-test # 20230807: Removal of the ath(4) AHB bus-frontend for MIPS -OLD_FILES+=usr/share/man/man4/ath_ahb.4 -OLD_FILES+=usr/share/man/man4/ath_pci.4 -OLD_FILES+=usr/share/man/man4/if_ath_pci.4 +OLD_FILES+=usr/share/man/man4/ath_ahb.4.gz +OLD_FILES+=usr/share/man/man4/ath_pci.4.gz +OLD_FILES+=usr/share/man/man4/if_ath_pci.4.gz # 20230803: Removal of support for cloning pseudo interfaces from iflib(9) OLD_FILES+=usr/include/net/iflib_private.h @@ -2018,8 +2018,8 @@ OLD_FILES+=usr/include/netinet/tcp_debug.h # 20221213: remove sync serial drivers and utilities OLD_FILES+=sbin/sconfig -OLD_FILES+=usr/share/man/man4/ce.4 -OLD_FILES+=usr/share/man/man4/cp.4 +OLD_FILES+=usr/share/man/man4/ce.4.gz +OLD_FILES+=usr/share/man/man4/cp.4.gz OLD_FILES+=usr/share/man/man8/sconfig.8.gz # 20221202: remove trpt(8) @@ -12463,8 +12463,8 @@ OLD_DIRS+=usr/lib/clang/3.9.1/lib OLD_DIRS+=usr/lib/clang/3.9.1 # 20170226: SVR4 compatibility removed .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/share/man/man4/streams.4 -OLD_FILES+=usr/share/man/man4/svr4.4 +OLD_FILES+=usr/share/man/man4/streams.4.gz +OLD_FILES+=usr/share/man/man4/svr4.4.gz .endif # 20170219: OpenPAM RADULA upgrade removed the libpam tests OLD_FILES+=usr/tests/lib/libpam/Kyuafile From nobody Sat Nov 30 21:24:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y13384Yg8z5fhHh; Sat, 30 Nov 2024 21:24:36 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y13383b8nz4b4v; Sat, 30 Nov 2024 21:24:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cgdT7B9hOgMfIbQsWQ2TKJUL1kvIe1GqVsIFJ+LM4Ks=; b=cT8WBM3pRpgrK9yrWB3k8qFXkcRDQDMUEpGSrRyRnqXrCsAgnA1oHFEmEHa2I+INq96toE dLgevOf3VW90hVDSAm9Ha8iDCj3XuQQ4eRyKRHKY9eQ32wAxCxr4whQr1IKCOC/unNR8WK 4aX0+hG4oQVyMWDkBcorQgVGWv6usP6TEyr7MV1Nibgg0oV0o31RCXSrzkgfra2iZrNDu+ glxcCnD8Ce4N1uT4GmsOlTaXH/naSt97o7gOiZovg8VZedwRtW4BpYCTb2bIMynlqopiG9 o2r/VyXgknBYKAqZ76Ynp+xo2md9vZma65KICKR7U7aBQQM2HiwuIEHew07Qsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cgdT7B9hOgMfIbQsWQ2TKJUL1kvIe1GqVsIFJ+LM4Ks=; b=JCiCCgrVcU1miSx2A16MxyMeqhr8wU6Lq4BoRFcQw0uiEWepVof1/xLKHp0kGtj9L0+h4k HKlOGPS4CAv3MwVx5Ra/PocxUPlwdCb1SeYE8zpp8poS3Wb+abUk+Kt4CY84NyYt6bOYA0 xF74/dA5fyw/gWQd8SV+pvz9+hC5V7zDAyjH5WJXG7cF3WGieBl/keP9+hnY+MKXxkNsUJ QYKUHHb3HSD3jGjpV8p9H2JSAlFN2tiI7DC/Sy3Yxe3I8GhmlbS1XK/x0Jf1rURT/rGhUt /GqOqnhrDDqIHiKE1o3AWwaHot6J8B946sIuGSD6pdZ+dV7wb2ovLqMP/LdXWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733001876; a=rsa-sha256; cv=none; b=Bk6OEoOM/slMxLcftmFG3HjzzVG5rqfyc9G6voLYrrdAGxvnKMDSGcDMRuCgw35MlsL4C1 lRFEdO9UnWUa3T23Lv9BVbAHDpdr8NmWClhJUVhtQm0fpnHBVSs9+GqkvuKFCgRAPjnWfD 93kHxJomyoHRy9ZR1IxxnY+SkNd09gS9OuevEMc3l36epb+yXJzB0pJsRWMz76cg1G1JTp b8EZXeGjAKZfdXDDP4JNdnr4m7FI0JJZ0OrVYRmH06pyTR1FVPFj9VriJcPLQkNUigXZoO S+Mm4r+oWIbx9eYYseHd4fHiMEmOF/4QB+bRGZesxNu3NVMTgwViF5Re6K7Ccw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y13383C01zPky; Sat, 30 Nov 2024 21:24:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AULOa5g057488; Sat, 30 Nov 2024 21:24:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AULOaKB057485; Sat, 30 Nov 2024 21:24:36 GMT (envelope-from git) Date: Sat, 30 Nov 2024 21:24:36 GMT Message-Id: <202411302124.4AULOaKB057485@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e22b4c90c5a4 - stable/14 - freebsd32: Fix a few typos in syscalls.conf comments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e22b4c90c5a4c7b1e798fd061512f6346701c8c6 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e22b4c90c5a4c7b1e798fd061512f6346701c8c6 commit e22b4c90c5a4c7b1e798fd061512f6346701c8c6 Author: John Baldwin AuthorDate: 2024-08-21 21:14:56 +0000 Commit: John Baldwin CommitDate: 2024-11-30 20:40:44 +0000 freebsd32: Fix a few typos in syscalls.conf comments Sponsored by: AFRL, DARPA (cherry picked from commit c0c1b1cd899aae5712786ce73469422fd5d3918a) --- sys/compat/freebsd32/syscalls.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/syscalls.conf b/sys/compat/freebsd32/syscalls.conf index 055a041cf72a..a6e47cf470f1 100644 --- a/sys/compat/freebsd32/syscalls.conf +++ b/sys/compat/freebsd32/syscalls.conf @@ -18,7 +18,7 @@ abi_ptr_array_t="uint32_t" abi_headers="#include " # -# Variables below this line are exceptions to the ABI changes programatically +# Variables below this line are exceptions to the ABI changes programmatically # detected by makesyscalls.lua. New system calls should not require an entry # here in nearly virtually all cases. New entries are almost certainly # representative of badly designed interfaces. @@ -53,5 +53,5 @@ obsol="getkerninfo" # nlm_syscall - requires significant porting, probably doesn't make sense # nnpfs_syscall - requires significant porting, probably doesn't make sense # ntp_gettime - should be implemented -# thr_create - was unimplemented and appears to be unnecessicary +# thr_create - was unimplemented and appears to be unnecessary unimpl="afs3_syscall kldsym __mac_get_proc __mac_set_proc __mac_get_fd __mac_get_file __mac_set_fd __mac_set_file __mac_get_pid __mac_get_link __mac_set_link __mac_execve nfssvc nlm_syscall ntp_gettime lgetfh nnpfs_syscall thr_create" From nobody Sat Nov 30 21:24:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y133964wgz5fhKK; Sat, 30 Nov 2024 21:24:37 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y13394flzz4b57; Sat, 30 Nov 2024 21:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vQlrQMDgGgR0fn0k/1djWQo7SliRTYUSupDehTgtUGM=; b=l74Vo5mW+3IJhAPYtb/kXYuzvcFfrylbx5D+Y/ZyPpt3dILOjArAjkOhXI/eykkAz/A8OQ l8CX8Fh5y6PMCT+rJotgF8qzv4kCbRfjVNN02b0SVacQqUrEAUDo3RP/suy+PSH/7DZR2b ydcO+f0CDeOLuQluk3SHZTeuChY3LWESs9DS/itrZCPzMP8k0OTi04gDapbODy1nx/3hi5 cL0+OQvHFSjM0ncpzTbaKUPtEG6M9lGzzVty2rjEZhje74OzV7OxzYDMbG6n80Suazg/vC WkkT8OQtCnM6SS6JxPiKRDVxEMu8zMmJcqrTR0COf1/ZQVk/rJ9Q5ZC8upvLpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vQlrQMDgGgR0fn0k/1djWQo7SliRTYUSupDehTgtUGM=; b=RhFx8X785AzOXIWvEzK0qtjdBgCLvbYwD/Cnz3xW2VLmhiFtvz+AHsUHr5fKu5HsXJEU5k l5LbWea+od7UPLuXtAdQQsMV2Cpf+pLTw8AKK7GAHygP2R1TlRdvaU++tGcn1Hv3dzJObJ EhDB6199jItBIEKFuHEC8bNtgswiDZLroWSh5oGDz2VPrs7Dm3mKb7PS3l3/4vIhreqsMb 1qCFcOAHNE4ZZsj4iBysjDYDgTzWRVViuE2fLSblHz0XTpt8JKmCHcITgLqT0OIOvEe2zC WYr3Jzsh03qc2W7k0OhsHjIU0STKjIhhSG6rU8Rg96YBpLwN72jRr+jm7/A1qA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733001877; a=rsa-sha256; cv=none; b=ihw+vaxGckv19tnMXNWh72cGijxSKGrL5KPEFph74SXjhNrSbr/dJmMkxohfpayY/98pCu zZ2aS9GBs2xSc/o5Mw3QUrqRs+AYRU6pHEtTasR0jWhGAIf3T59K166yy/UHtUh/G5vSTX cWtpouFfMDWyxkA0TpNz/ilvwpY7H6tSU06m20iBPcAGh54/Bsx0Ccj5vBJHcXLV1qmtnc 7I5+nD3PwF/mvq9bATlIOhmyAAkxkV3DpIZ7wjq+5JH6Sx0Djo43cKvIBg8kwcgoXaFZQC dHAXRAlP9XrWnrwyiFeEs4X8CSEu0vzxv/9pZaK+1u0AaMaPIYR8+drMPKEhwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y13394GKnzPKm; Sat, 30 Nov 2024 21:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AULOb3l057548; Sat, 30 Nov 2024 21:24:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AULObp2057545; Sat, 30 Nov 2024 21:24:37 GMT (envelope-from git) Date: Sat, 30 Nov 2024 21:24:37 GMT Message-Id: <202411302124.4AULObp2057545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 4aada122862a - stable/14 - bhyve: Treat the COMMAND register for PCI passthru devices as emulated List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4aada122862ad5631b4a8eb58a5923e9d79565a0 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4aada122862ad5631b4a8eb58a5923e9d79565a0 commit 4aada122862ad5631b4a8eb58a5923e9d79565a0 Author: John Baldwin AuthorDate: 2024-07-31 14:50:33 +0000 Commit: John Baldwin CommitDate: 2024-11-30 20:42:08 +0000 bhyve: Treat the COMMAND register for PCI passthru devices as emulated Don't pass through writes of the command register through to the physical device. These registers do not need to be in sync, and in some cases (e.g. when the guest is sizing the BAR and temporarily disables decoding), the states need to diverge. PR: 205549 Reviewed by: corvink Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46179 (cherry picked from commit f44ff2aba2d64d1d9312cb55008dc90275ccdc04) --- usr.sbin/bhyve/pci_passthru.c | 46 +++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 0a80ee649689..345971641f8a 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -608,6 +608,7 @@ cfginit(struct pci_devinst *pi, int bus, int slot, int func) { int error; struct passthru_softc *sc; + uint16_t cmd; uint8_t intline, intpin; error = 1; @@ -619,16 +620,18 @@ cfginit(struct pci_devinst *pi, int bus, int slot, int func) sc->psc_sel.pc_func = func; /* - * Copy physical PCI header to virtual config space. INTLINE and INTPIN - * shouldn't be aligned with their physical value and they are already set by - * pci_emul_init(). + * Copy physical PCI header to virtual config space. COMMAND, + * INTLINE, and INTPIN shouldn't be aligned with their + * physical value and they are already set by pci_emul_init(). */ + cmd = pci_get_cfgdata16(pi, PCIR_COMMAND); intline = pci_get_cfgdata8(pi, PCIR_INTLINE); intpin = pci_get_cfgdata8(pi, PCIR_INTPIN); for (int i = 0; i <= PCIR_MAXLAT; i += 4) { pci_set_cfgdata32(pi, i, pci_host_read_config(&sc->psc_sel, i, 4)); } + pci_set_cfgdata16(pi, PCIR_COMMAND, cmd); pci_set_cfgdata8(pi, PCIR_INTLINE, intline); pci_set_cfgdata8(pi, PCIR_INTPIN, intpin); @@ -644,13 +647,6 @@ cfginit(struct pci_devinst *pi, int bus, int slot, int func) goto done; } - pci_host_write_config(&sc->psc_sel, PCIR_COMMAND, 2, - pci_get_cfgdata16(pi, PCIR_COMMAND)); - - /* - * We need to do this after PCIR_COMMAND got possibly updated, e.g., - * a BAR was enabled, as otherwise the PCIOCBARMMAP might fail on us. - */ if (pci_msix_table_bar(pi) >= 0) { error = init_msix_table(sc); if (error != 0) { @@ -920,7 +916,7 @@ passthru_init(struct pci_devinst *pi, nvlist_t *nvl) passthru_cfgread_emulate, passthru_cfgwrite_emulate)) != 0) goto done; - /* Allow access to the physical command and status register. */ + /* Allow access to the physical status register. */ if ((error = set_pcir_handler(sc, PCIR_COMMAND, 0x04, NULL, NULL)) != 0) goto done; @@ -1074,28 +1070,26 @@ passthru_cfgwrite_default(struct passthru_softc *sc, struct pci_devinst *pi, return (0); } -#ifdef LEGACY_SUPPORT /* - * If this device does not support MSI natively then we cannot let - * the guest disable legacy interrupts from the device. It is the - * legacy interrupt that is triggering the virtual MSI to the guest. + * The command register is emulated, but the status register + * is passed through. */ - if (sc->psc_msi.emulated && pci_msi_enabled(pi)) { - if (coff == PCIR_COMMAND && bytes == 2) - val &= ~PCIM_CMD_INTxDIS; - } -#endif - - pci_host_write_config(&sc->psc_sel, coff, bytes, val); if (coff == PCIR_COMMAND) { + if (bytes <= 2) + return (-1); + + /* Update the physical status register. */ + pci_host_write_config(&sc->psc_sel, PCIR_STATUS, val >> 16, 2); + + /* Update the virtual command register. */ cmd_old = pci_get_cfgdata16(pi, PCIR_COMMAND); - if (bytes == 1) - pci_set_cfgdata8(pi, PCIR_COMMAND, val); - else if (bytes == 2) - pci_set_cfgdata16(pi, PCIR_COMMAND, val); + pci_set_cfgdata16(pi, PCIR_COMMAND, val & 0xffff); pci_emul_cmd_changed(pi, cmd_old); + return (0); } + pci_host_write_config(&sc->psc_sel, coff, bytes, val); + return (0); } From nobody Sat Nov 30 21:24:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y133C0qcHz5fh83; Sat, 30 Nov 2024 21:24:39 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y133B5n7Gz4bBK; Sat, 30 Nov 2024 21:24:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JZ1sFWLgb2U6/HFGfBRbisbPN4SlF1hbnSAmthCoUNU=; b=e2661QMUvdNmaeKuyJ5H6ZtlCFJ/s3+JjE+Hu09978OZRv6kQxy4L4vDhCDAh0Bwu5ldiA SOA46h2FHbFkpchod4dWgMqetPZ0L2nxe4K96xsmOhKeqtnVq4cZxd6vOvfvoELc++lL5z 5bhEWwGjlLSTGcSEu2laSXlLgX83kbrMbr8DzpzGDcWc1euxa2m9/NxE/wRTQ+0bGxgVkR MvmppHUX/j3bBa2rJG6AEDQdyXfQrhHMswa0IT1AR/OW9hGebYGnDOV18T3JtVJ/Qqd6FC RnlcHYsFaHFFMBnqFfNv/GECYxTDMAg9fhktBoSqvWckv2m0DF16RGscGMmVPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JZ1sFWLgb2U6/HFGfBRbisbPN4SlF1hbnSAmthCoUNU=; b=v8UeWgNppg7+mvRTGyKGleGvTJxDbePMxQhL3HB1fXoOiuetw7NlQoAzNbBWGMAURby7Up hBKIOaG1BNKZh2VyQ0SnLFRwp2xuruNDanejU9w4BvUytBxcZ9da+/Frtip9ibwmuLlLkn DYd7FAc/0dhLNKn0fNkE1nW5IaCAfXxZg8zlgbcptHek002OzqrnV4PbqAx/exN0SPqdlk y0hTSKKxC/MD6mDl/YhhD79Fh8b5Qy1j03zuwhme7G/nt2uEvIBl7TTpsOUSMOHhUpROzS TVK2iF3rnzsi+RkqVjH40EJvMEmxI1IZgk2KByHGnaSx/PyjUU/2rGq/CKZRUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733001878; a=rsa-sha256; cv=none; b=Ce16R5OphG6l3F/DOY/pOSedRNAzxhFO1sFTSqt6c9Vn7sXvD3fEcuM1mey4jOL95tf2ZX nX82/lmeuGg8RjTB+kjfn0j/GHiftcyDOzCLJ88nRiIr/QQH1jJVLEG1YHdtaXuDr81Lfp KMFH4zTpAbNo20svPn2rQVLK1CLCCjHeICeFiif5RUHrsb/zHzDkCU7swpm+dEijJuLOOh 86iuP8czSP6iRxO+NJx1PM/EBTjl3NnJJ+A3mIzJ88wIaYzt83K2xVpteQPpl92OJvPA5H 8q46IcrkZOrCJt/KTZY41UHsomDvlNgc2F2QnXlbDjaLwl1CikyZZQ3NVRUINg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y133B5PWczPl0; Sat, 30 Nov 2024 21:24:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AULOc78057611; Sat, 30 Nov 2024 21:24:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AULOcD2057608; Sat, 30 Nov 2024 21:24:38 GMT (envelope-from git) Date: Sat, 30 Nov 2024 21:24:38 GMT Message-Id: <202411302124.4AULOcD2057608@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 0b2f891f3bda - stable/14 - vmm ppt: Enable busmastering and BAR decoding while a device is assigned List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0b2f891f3bda8cffdbcfbc9efaa819a9b3a01b8f Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0b2f891f3bda8cffdbcfbc9efaa819a9b3a01b8f commit 0b2f891f3bda8cffdbcfbc9efaa819a9b3a01b8f Author: John Baldwin AuthorDate: 2024-08-22 18:40:48 +0000 Commit: John Baldwin CommitDate: 2024-11-30 20:42:15 +0000 vmm ppt: Enable busmastering and BAR decoding while a device is assigned Reviewed by: corvink, markj Fixes: f44ff2aba2d6 bhyve: Treat the COMMAND register for PCI passthru devices as emulated Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46245 (cherry picked from commit 776cd02b891ccd984963c9ec26f9748d213f0b9b) --- sys/amd64/vmm/io/ppt.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c index 27cbb3ac2986..7643ba0c2973 100644 --- a/sys/amd64/vmm/io/ppt.c +++ b/sys/amd64/vmm/io/ppt.c @@ -152,9 +152,13 @@ static int ppt_attach(device_t dev) { struct pptdev *ppt; + uint16_t cmd; ppt = device_get_softc(dev); + cmd = pci_read_config(dev, PCIR_COMMAND, 2); + cmd &= ~(PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); + pci_write_config(dev, PCIR_COMMAND, cmd, 2); iommu_remove_device(iommu_host_domain(), pci_get_rid(dev)); num_pptdevs++; TAILQ_INSERT_TAIL(&pptdev_list, ppt, next); @@ -177,7 +181,6 @@ ppt_detach(device_t dev) return (EBUSY); num_pptdevs--; TAILQ_REMOVE(&pptdev_list, ppt, next); - pci_disable_busmaster(dev); if (iommu_host_domain() != NULL) iommu_add_device(iommu_host_domain(), pci_get_rid(dev)); @@ -377,11 +380,28 @@ ppt_pci_reset(device_t dev) pci_power_reset(dev); } +static uint16_t +ppt_bar_enables(struct pptdev *ppt) +{ + struct pci_map *pm; + uint16_t cmd; + + cmd = 0; + for (pm = pci_first_bar(ppt->dev); pm != NULL; pm = pci_next_bar(pm)) { + if (PCI_BAR_IO(pm->pm_value)) + cmd |= PCIM_CMD_PORTEN; + if (PCI_BAR_MEM(pm->pm_value)) + cmd |= PCIM_CMD_MEMEN; + } + return (cmd); +} + int ppt_assign_device(struct vm *vm, int bus, int slot, int func) { struct pptdev *ppt; int error; + uint16_t cmd; /* Passing NULL requires the device to be unowned. */ error = ppt_find(NULL, bus, slot, func, &ppt); @@ -393,6 +413,9 @@ ppt_assign_device(struct vm *vm, int bus, int slot, int func) pci_restore_state(ppt->dev); ppt->vm = vm; iommu_add_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); + cmd = pci_read_config(ppt->dev, PCIR_COMMAND, 2); + cmd |= PCIM_CMD_BUSMASTEREN | ppt_bar_enables(ppt); + pci_write_config(ppt->dev, PCIR_COMMAND, cmd, 2); return (0); } @@ -401,11 +424,15 @@ ppt_unassign_device(struct vm *vm, int bus, int slot, int func) { struct pptdev *ppt; int error; + uint16_t cmd; error = ppt_find(vm, bus, slot, func, &ppt); if (error) return (error); + cmd = pci_read_config(ppt->dev, PCIR_COMMAND, 2); + cmd &= ~(PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); + pci_write_config(ppt->dev, PCIR_COMMAND, cmd, 2); pci_save_state(ppt->dev); ppt_pci_reset(ppt->dev); pci_restore_state(ppt->dev); From nobody Sat Nov 30 21:24:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y133D3Mhkz5fhPh; Sat, 30 Nov 2024 21:24:40 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y133C6nkNz4bGf; Sat, 30 Nov 2024 21:24:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mfS1GRjqJH7/I6Zj349ws00N7hYtB8dCC4ScgUekxwU=; b=foZUGUxDJt7oP6EF4vvoISdbd7DpQc2MCcNBOVri3g0wOzfxr9qFXCN3SUo3GyS6HjMQpQ h4FrwAl+dzfYNAXgjGUUeGI+ohVXsDCHpt5JUxs4yqRsx5Cu/9OPweP+QM0qUek/IyglzD T4zlwjcQzrH/Vy6SeLPraldLAz3hHdrzkY+tSZ/XdllPZpYk8k/EuhvwqPsSpATL1a067k bI7ergkL5HwnrNxmiARF/mbisbu1zX2WaAiAkgWkyNyMVgvn1El+GwJwnZ5EahyHTF24zd h7WFGybbjyQ4pgInypWLo8V1/efKnQRcX/t18fqNr1iQiRuGeEhUUsdHJaR/Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mfS1GRjqJH7/I6Zj349ws00N7hYtB8dCC4ScgUekxwU=; b=rU5iJsACRe1NmF2etjMj78eReglb/OzVx9zHao32E3P+H+hqpwrJK3CiGt6a96LDS6jR9R yWaknve5r2aCfXmFplYot7wW4rzrMpsoiNQ1KKCJejRtd5KTqGpn6UIwrVh2i8bMQUqv8i 4+1KgKFbUETc5CLossYm1yf4QL/2XAvuKgfsqCaE2+ndzwrUyDtLkhpLH1C65LjpRdn+we CG68hZv23CIvufRV/Ao8vnxgNC1z1gWOrvKjA3SxcrVMpljKT0zlqaRb0y9wXMVsjYf9WR 3iCLmJzJaNOdR5+9PuDL2Zcb4e5Khzagx1siFdbWgfQONLti67gEBosTsFgh2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733001880; a=rsa-sha256; cv=none; b=GaxfSzL3LyqsF12BZsmYAiHn0TEnU4l4TN730S8B2nsenekQShl/KJ8l7M6tjn4mw0xA04 vSBuTL6+NRa+GI92Pa6cuR8SsU5nMJbaoKEpOut9hhmgY/iAL9yYYW4YVD0FDYgrS02hNQ LoIhI7jrcG7JKqMcCfa9+wWBPsSxo47LuUiEhH9ssZt9vGx6BFrQOmAjfWkRHZ0d+oePCD 2gHShuzHqziW+7pYdUxQm2eRCRci1XJn/dk7xJ7gnJE2fuR41cKlVkT/smuo/k/FUbd96l 8GPi08p6EhOZVW0OgiuaN8gVZxuqteVKCS0lvGmkvhh5/LXkGNqeL4zXhY1RUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y133C6QCBzPKn; Sat, 30 Nov 2024 21:24:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AULOdWu057664; Sat, 30 Nov 2024 21:24:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AULOdSA057661; Sat, 30 Nov 2024 21:24:39 GMT (envelope-from git) Date: Sat, 30 Nov 2024 21:24:39 GMT Message-Id: <202411302124.4AULOdSA057661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2e18c66924ed - stable/14 - grep: Fix various bugs in recursive tree handling List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2e18c66924ed0a5af36e01b9bf2e332138da6974 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2e18c66924ed0a5af36e01b9bf2e332138da6974 commit 2e18c66924ed0a5af36e01b9bf2e332138da6974 Author: John Baldwin AuthorDate: 2024-09-04 19:53:17 +0000 Commit: John Baldwin CommitDate: 2024-11-30 20:43:14 +0000 grep: Fix various bugs in recursive tree handling The -OpS options were effectively ignored due to a collection of bugs in the use of fts(3): - fts_open(3) requires one of FTS_PHYSICAL or FTS_LOGICAL to be specified, but in the -O case, only FTS_COMFOLLOW was given. Fix this to use FTS_COMFOLLOW | FTS_PHYSICAL. - The switch on the entry type returned by fts_read() did not check for symbolic links, so symbolic links fell into the default case and were always passed to procfile() even when -p was given. Fix this by adding cases in the switch statement to explicitly ignore FTS_SL. - FTS_NOSTAT was passed to fts_open(), so fts_open() couldn't detect symbolic links when FTS_PHYSICAL was passed, instead both regular files and symbolic links were returned as FTS_NSOK entries. Fix by only using FTS_NOSTAT with FTS_LOGICAL. While here, fix a few other nits: - Treat FTS_NS as an error like FTS_DNR and FTS_ERR. - Just ignore FTS_DP. The logic to skip descending into skipped directories is only relevant when a directory is first visited, not after the directory has been visited. - Use warnc instead of warnx + strerror. PR: 280676 Reviewed by: kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46255 (cherry picked from commit 77eb877714d69ee0279d70eb3331920fba90db95) --- usr.bin/grep/util.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c index 936abc41b3ef..4e1c44b442f2 100644 --- a/usr.bin/grep/util.c +++ b/usr.bin/grep/util.c @@ -136,16 +136,16 @@ grep_tree(char **argv) /* This switch effectively initializes 'fts_flags' */ switch(linkbehave) { case LINK_EXPLICIT: - fts_flags = FTS_COMFOLLOW; + fts_flags = FTS_COMFOLLOW | FTS_PHYSICAL; break; case LINK_SKIP: fts_flags = FTS_PHYSICAL; break; default: - fts_flags = FTS_LOGICAL; + fts_flags = FTS_LOGICAL | FTS_NOSTAT; } - fts_flags |= FTS_NOSTAT | FTS_NOCHDIR; + fts_flags |= FTS_NOCHDIR; fts = fts_open((argv[0] == NULL) ? __DECONST(char * const *, wd) : argv, fts_flags, NULL); @@ -154,15 +154,13 @@ grep_tree(char **argv) while (errno = 0, (p = fts_read(fts)) != NULL) { switch (p->fts_info) { case FTS_DNR: - /* FALLTHROUGH */ case FTS_ERR: + case FTS_NS: file_err = true; if(!sflag) - warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); + warnc(p->fts_errno, "%s", p->fts_path); break; case FTS_D: - /* FALLTHROUGH */ - case FTS_DP: if (dexclude || dinclude) if (!dir_matching(p->fts_name) || !dir_matching(p->fts_path)) @@ -173,6 +171,17 @@ grep_tree(char **argv) warnx("warning: %s: recursive directory loop", p->fts_path); break; + case FTS_DP: + break; + case FTS_SL: + /* + * Skip symlinks for LINK_EXPLICIT and + * LINK_SKIP. Note that due to FTS_COMFOLLOW, + * symlinks on the command line are followed + * for LINK_EXPLICIT and not reported as + * symlinks. + */ + break; default: /* Check for file exclusion/inclusion */ ok = true; From nobody Sat Nov 30 21:24:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y133F4MRTz5fhHk; Sat, 30 Nov 2024 21:24:41 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y133F0h7rz4b8P; Sat, 30 Nov 2024 21:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d9bweqfAa28mH26Y1IDe4pY3bIyBua3nDw23rxwLxtI=; b=bqujXdRjSFCxcmd7k8uIX9o92W6dGHFZvUO23uwdXOqB0dpzWXk64wHP7T+85aEgaUniZT voJA5o8Q4aEuzngkRYeKgiQlmDHlTlGs5HMgsh4at9Zqf+XwX1VEAuCN29O0gLVliGMwwU RCudB+nLzjPp2sa+/zLvEbzhUVJ8bF5eYiObBeemtp8i1EoF61UGFnK8BJXWjQ5nDptc/I HTWfWMajwjoClak09mmRYVi1lq8oNGvLtCl7H8xuV/G/PaXUNjpJF+SPz6CjXbGp5Uw5kp MxQUCERO0oFvztZ5AvJuwNBMHbftvM0OIvKWUSq6/G3cYCE039xgZcir9UDjKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d9bweqfAa28mH26Y1IDe4pY3bIyBua3nDw23rxwLxtI=; b=cmYZi/fYdID0BnXXfGua5P1eApfX4QWuKk93tDgvfMsFtwYCfs7YIkYZjUuRimJIMAmBQj WKu61Rc/ak3CCjmrkYjyrzl5WPOprHMawbwjrUonTWU5DCpRXTlK2cZoyU190sgbKok102 zUU2XfMRsjzo24c9sBPbQAELKcZPiujrVfW+YlzH3rShrYr7vHpk8Vp9WbWtzf2vt2oU75 AXHjyhqI6Ks/uNCS2Q26zyJ7NvcHo/CTzViDOSSMJeidnfZX1ifriMCK7jqDVnl4EX12yW pi7FjWYqfAdC1nSNuK7pBA2sGhJKmKgEI3VtdY5cW8d7c66fPQVVQoavjMzyPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733001881; a=rsa-sha256; cv=none; b=yNKaUCqtUPQ2uazZdg0xB75w8Cs4KHNlCgPIwDn7ygcJpU06317IcpzXfaKzJS3rTyMBqr quJxEBpduohqN2bYZKOTf3NnsVNxCDohVqrUJj+YPJEaMxG7wL2qk68/eKOltUgQDK3CNu N/xqSswaV4BOPLQYsBJTTl4HBB6yxfPi/iPf0dC8fJ/Q9pg47p6KukIIqKgmpAMWVNYWxB pfsY3PpgAzZs+E5xj/g8zL4zxhY9PewKBsaL2Ix//j85bAX63iVWiQC0T6yOH2B0ggls7L FL5iQEaEcNddRw85JRBpKQ3jtRAmoTsyxH6Ym5JRnGOxuQUuK26cwqtjmF3NVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y133F079ZzQ0B; Sat, 30 Nov 2024 21:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AULOec6057718; Sat, 30 Nov 2024 21:24:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AULOeAb057715; Sat, 30 Nov 2024 21:24:40 GMT (envelope-from git) Date: Sat, 30 Nov 2024 21:24:40 GMT Message-Id: <202411302124.4AULOeAb057715@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 83f1b98d8227 - stable/14 - grep: Default to -p instead of -S. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 83f1b98d822704f87e28f8e0016c3169d75ae87f Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=83f1b98d822704f87e28f8e0016c3169d75ae87f commit 83f1b98d822704f87e28f8e0016c3169d75ae87f Author: John Baldwin AuthorDate: 2024-09-04 19:53:22 +0000 Commit: John Baldwin CommitDate: 2024-11-30 20:43:28 +0000 grep: Default to -p instead of -S. This matches the documented behavior in the manpage as well as the default behavior on macOS. PR: 280676 Reported by: Radosław Piliszek Reviewed by: kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46256 (cherry picked from commit fc12c191c087b63e1204fee210ba76082ea40b96) --- usr.bin/grep/grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index 9f960f74dbb6..feaf17d7c1e1 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -112,7 +112,7 @@ int binbehave = BINFILE_BIN; /* -aIU: handling of binary files */ int filebehave = FILE_STDIO; int devbehave = DEV_READ; /* -D: handling of devices */ int dirbehave = DIR_READ; /* -dRr: handling of directories */ -int linkbehave = LINK_READ; /* -OpS: handling of symlinks */ +int linkbehave = LINK_SKIP; /* -OpS: handling of symlinks */ bool dexclude, dinclude; /* --exclude-dir and --include-dir */ bool fexclude, finclude; /* --exclude and --include */ From nobody Sat Nov 30 21:24:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y133K4YHmz5fhSW; Sat, 30 Nov 2024 21:24:45 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y133K1YSKz4bQ2; Sat, 30 Nov 2024 21:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XW4+Sxd/s6wc8NyfZ1hJ9FzyeWloqW0tUzTQ1cHVwtc=; b=jIf8Ek+xMDz+EYqW5B39aIHToW7ggefmurv7qlAJ/2fF8BVfbN4gmaknqAFDTjmAK12e7i qORfk5/jCDyfr5ykACzuOJp8Et+VGIThv/xqmD9RjX2U9e97Yap2i6yK8jm5dZxBItr8L+ T1L1nJGIT8o6U/5xURjzKHNhWy2636bZuA5Fh8h26+XBM8y5/u6/KjhWNBiDleyW9W0Zg7 g4lF0Da8M4QwyR/OpdhVVIFqaeFRVhssEMWkyB4CEsqaR+nqZyq9d5G7xN50JMTeGl83GU XE6/6qhvUX8sAKQ348xAZcsSIFvTlcsWi26Rrw573p7+QSO8ONdKbjjEZOsU/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XW4+Sxd/s6wc8NyfZ1hJ9FzyeWloqW0tUzTQ1cHVwtc=; b=i3W8u2lnGhy+Ow6GdALabL3tiPcKuOI+iMBMVAOfDQ+6P8WvDbxOlBlAeOrRMsDXIkyWdk aBEYaDClewMJ9y7e3wio4j6lJIGxjKVyO/QgCceNWA4LFRBZvvnqduSCnZpxvMDrRvIBse 101ZhyBFJY04flNDstoLvH/rJi782hR+8WNMrsfz+X2qPzfsUl1Z3VMlhvffzFxVXwbsDU o6yBu7i3mlqNQqXBjS19WT0uqTURiZrW+iNkZxnYenP3kkl/66csmBdQV26In9SFVJrUkF MJM/kDMBEKUocUo5abKuzYYPriCRfjLDvwJRLAZ6cs2y1zqC/VLHWje76VY3ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733001885; a=rsa-sha256; cv=none; b=USn/wpS/cWnvvpLTuGx13FJ4uogw2Aeq4Z+PlQGMOfKq2ULPZ2NB21v5YbQU5jKDyUIJtO 9yfbDI6jcxGMluvq6KZ70NAWKyqp5xaFZo0dkP22RtEjuIH0RVAYJ9lFqIdGpZ8hyENCGa 0+YumrYXnydTJwsEF1JCw2Obf1u9TbJOKSllYYQR8lXhr/IF4x1bMUFBbe3VY8MGYAS91J R0XyTS2PAZZw8z80bJsADuR9k2ND//zYidPYvLy/rJOAgacx2g9wzmVAsX7XKn4Bi4s5yd 3pml9VCpkVuUlr4yp5HrhaNVUqDkGSqLOqobCuACeUkm3wcyBBwbLp+GRaXo7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y133K174SzPyq; Sat, 30 Nov 2024 21:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AULOjhl057933; Sat, 30 Nov 2024 21:24:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AULOjqu057930; Sat, 30 Nov 2024 21:24:45 GMT (envelope-from git) Date: Sat, 30 Nov 2024 21:24:45 GMT Message-Id: <202411302124.4AULOjqu057930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 331a1c259546 - stable/13 - ObsoleteFiles.inc: Add missing .gz suffix to various manpage entries List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 331a1c259546155238c9e52c25b7589e0fb9a8cd Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=331a1c259546155238c9e52c25b7589e0fb9a8cd commit 331a1c259546155238c9e52c25b7589e0fb9a8cd Author: John Baldwin AuthorDate: 2024-07-31 18:48:24 +0000 Commit: John Baldwin CommitDate: 2024-11-30 20:38:49 +0000 ObsoleteFiles.inc: Add missing .gz suffix to various manpage entries Reported by: Mark Millard (cherry picked from commit c04ef1bfb461a1c8d426b16532d85af5637727c9) --- ObsoleteFiles.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index d759e7db2bc6..e768b5f4cfdd 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -8842,8 +8842,8 @@ OLD_DIRS+=usr/lib/clang/3.9.1/lib OLD_DIRS+=usr/lib/clang/3.9.1 # 20170226: SVR4 compatibility removed .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/share/man/man4/streams.4 -OLD_FILES+=usr/share/man/man4/svr4.4 +OLD_FILES+=usr/share/man/man4/streams.4.gz +OLD_FILES+=usr/share/man/man4/svr4.4.gz .endif # 20170219: OpenPAM RADULA upgrade removed the libpam tests OLD_FILES+=usr/tests/lib/libpam/Kyuafile From nobody Sat Nov 30 21:24:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y133L71bYz5fhBc; Sat, 30 Nov 2024 21:24:46 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y133L1tqsz4bYd; Sat, 30 Nov 2024 21:24:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cDwLWf2tIcXTUJ4cPxuP1Nk7R0g6TABkqNs6AxJ7i8Y=; b=gaI4Y748H4HL41eLTFKap3BR2uDO6yqPdOyFJcsOlO9YZDI1AJCtfYPuGt1Yh4f2G7aeh7 0X6SLMp1nSQOkUpHG2GSXZn32qcR0eE/FLg8mR1tBwY7Zv+8StyeO6TLSIdjISBXF1SlWY jFRySmgn65CRw4eONl99TCMu+ike+GCIw0KQigLT4s27f8bXQm//W/9no/QKlyCM1Kykys +qgD4UE4i6wbmnpa7ElcOZJ++AlFCaaKQyBbEzoD+AjzrM9EHj6r/UtJvVoNGKHRb/l1QY S2g6XUNYaABdC8b62P6sHafnZRwTO8mE81PSt6aA+tk06BitLPQXgFK1VfEAJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cDwLWf2tIcXTUJ4cPxuP1Nk7R0g6TABkqNs6AxJ7i8Y=; b=v3d4GFgBtfQrI7VW4W5Q5BA2o5TVGzhaDkXFaYIi7YHuIrM5ooxsOqEIlWVV6VcvLIfL2l iSgykpT5YktHLtRLVo/P6gHSKSDY2GCpLDRUH2YURj2sbcrECcXvox8WGPCkVlsHDzAQBU cYgBc4HrPGsHDyvgLhGF2Bv5Rd+Bd9rt0NolM5Eic4JjSEwO98kPRL+7VXrFWCMU3veZ9+ jFvgLdtnahI/pMI07PQxV6qLJV+Gb0KwVQEhtvy3sR2mjKSPUi7AFnxK4u4NylbEb+dtjV pxHMxCJBOndz4+KQAD+kDihuJ5xjkpovnUEqJo9+kwyC8QAUqzGBIZ6QgMXH4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733001886; a=rsa-sha256; cv=none; b=wr63obkIGMP3JUzf4Is8PO4Gp/oHu+FTZaOiVSM+dfkg5FWfc7JrjpvuAQiRrzR+9ZTv7P 6Br/oxllBF18N7yrkvuDzZJzpzsLZKz//WUApw9XSR9XnLPnQDXmXljAM9NRPq4yZ+JHAf WnhiQMZpGqm+93lIucueP2rs7J9kg6U0voYRVvnS0a81ZJbDOaHj2HymmICb8zl1hkOMtH pv+sn0ry+jGuOkMe37bVe7JA/xwVHZ1xXAHXL594uOi3M6FuWlxnn71wDsQ/Gh6fShJovO uGjrWVsXpl5K1rPBp1ZVffI/RTGZMpOwoMIEdPW1zK3a4UUbbcVOGaCwnoSkiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y133L1VpBzPyr; Sat, 30 Nov 2024 21:24:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AULOktq057996; Sat, 30 Nov 2024 21:24:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AULOk9M057993; Sat, 30 Nov 2024 21:24:46 GMT (envelope-from git) Date: Sat, 30 Nov 2024 21:24:46 GMT Message-Id: <202411302124.4AULOk9M057993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6ce090af2832 - stable/13 - grep: Fix various bugs in recursive tree handling List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6ce090af28326d9c25a4258278a69952b41e2091 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6ce090af28326d9c25a4258278a69952b41e2091 commit 6ce090af28326d9c25a4258278a69952b41e2091 Author: John Baldwin AuthorDate: 2024-09-04 19:53:17 +0000 Commit: John Baldwin CommitDate: 2024-11-30 20:43:20 +0000 grep: Fix various bugs in recursive tree handling The -OpS options were effectively ignored due to a collection of bugs in the use of fts(3): - fts_open(3) requires one of FTS_PHYSICAL or FTS_LOGICAL to be specified, but in the -O case, only FTS_COMFOLLOW was given. Fix this to use FTS_COMFOLLOW | FTS_PHYSICAL. - The switch on the entry type returned by fts_read() did not check for symbolic links, so symbolic links fell into the default case and were always passed to procfile() even when -p was given. Fix this by adding cases in the switch statement to explicitly ignore FTS_SL. - FTS_NOSTAT was passed to fts_open(), so fts_open() couldn't detect symbolic links when FTS_PHYSICAL was passed, instead both regular files and symbolic links were returned as FTS_NSOK entries. Fix by only using FTS_NOSTAT with FTS_LOGICAL. While here, fix a few other nits: - Treat FTS_NS as an error like FTS_DNR and FTS_ERR. - Just ignore FTS_DP. The logic to skip descending into skipped directories is only relevant when a directory is first visited, not after the directory has been visited. - Use warnc instead of warnx + strerror. PR: 280676 Reviewed by: kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46255 (cherry picked from commit 77eb877714d69ee0279d70eb3331920fba90db95) --- usr.bin/grep/util.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c index e3cf6e3cb4d8..63ee6f191180 100644 --- a/usr.bin/grep/util.c +++ b/usr.bin/grep/util.c @@ -136,16 +136,16 @@ grep_tree(char **argv) /* This switch effectively initializes 'fts_flags' */ switch(linkbehave) { case LINK_EXPLICIT: - fts_flags = FTS_COMFOLLOW; + fts_flags = FTS_COMFOLLOW | FTS_PHYSICAL; break; case LINK_SKIP: fts_flags = FTS_PHYSICAL; break; default: - fts_flags = FTS_LOGICAL; + fts_flags = FTS_LOGICAL | FTS_NOSTAT; } - fts_flags |= FTS_NOSTAT | FTS_NOCHDIR; + fts_flags |= FTS_NOCHDIR; fts = fts_open((argv[0] == NULL) ? __DECONST(char * const *, wd) : argv, fts_flags, NULL); @@ -154,15 +154,13 @@ grep_tree(char **argv) while (errno = 0, (p = fts_read(fts)) != NULL) { switch (p->fts_info) { case FTS_DNR: - /* FALLTHROUGH */ case FTS_ERR: + case FTS_NS: file_err = true; if(!sflag) - warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); + warnc(p->fts_errno, "%s", p->fts_path); break; case FTS_D: - /* FALLTHROUGH */ - case FTS_DP: if (dexclude || dinclude) if (!dir_matching(p->fts_name) || !dir_matching(p->fts_path)) @@ -173,6 +171,17 @@ grep_tree(char **argv) warnx("warning: %s: recursive directory loop", p->fts_path); break; + case FTS_DP: + break; + case FTS_SL: + /* + * Skip symlinks for LINK_EXPLICIT and + * LINK_SKIP. Note that due to FTS_COMFOLLOW, + * symlinks on the command line are followed + * for LINK_EXPLICIT and not reported as + * symlinks. + */ + break; default: /* Check for file exclusion/inclusion */ ok = true; From nobody Sat Nov 30 21:24:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y133M75h3z5fh8D; Sat, 30 Nov 2024 21:24:47 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y133M314mz4bSv; Sat, 30 Nov 2024 21:24:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7NAVssmbzqT71GuLRA8cP8kYNc381LF8fcWvYUPYl9w=; b=nuN6XXsIWasbksIzBjuLPk8Xa4wBwcoTShpZ4Xhk6l8qLN3WU/IqJ2WGT07Tnk4rqvCRsx +OsK3Pu06vrh7H1EMId0uc6OMKB31n99DINdTIwYAERn2pcOi2L9s3u3mdyP7W7hm15dF0 qYENM6xlOXofTtd9xZgnsWAJqhW7jAmpbgS1xRwrxJhB35lzdPHOyobXmZTAZdX39+5ZGE kLESq+PAn01qskIOeWLotJ9qAFF7fUXSS+4cbimzemFM0ZttHCDd5iHP1KGNueHEmEGVSc hhnxp5JzhbqOVo29lWkxsfOcoUP0cK0VJiD+WiZWE/9rW4u9K6xWdvwUQMygPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733001887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7NAVssmbzqT71GuLRA8cP8kYNc381LF8fcWvYUPYl9w=; b=Boc6rhfDnsLxIQb2jCphk7+gVJKKds/HSuh3qLmSY9yuFe+emiXTmkg+tCnXD4eLaXjSwM jaGXT1SWCCEMn/M1eo5Lhi42sLoylaWTmilr7mxs9hLz1/cXk2i82a96fQYiMnoPaxbH+s fMPfAUN3iS06YkMViiStV5dohpXsXMQjIr/VLRHkSEb0YEBY9b7HS44yTG+L2JLhzdPLy/ P4I5DsqDfSSNVxTqZOxWVADGOOXUaCS+N8SVg5gL3s8vVZNB7QxO8MjGQ3ZlsrqJCQpTiH pHDObnIxTevqvXcSXxyn4pJ5aWBsgjUo4Gr/kgT9YePq/IQLqQcvM9DnCTrUtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733001887; a=rsa-sha256; cv=none; b=HyX8Jb7Bk5qmllk/z58j9eaiWqlAdLLzU7z0LkkvTP3YvJYKOxS7O6zJLanqI1ZykU1XFC FxrwMXFFxLIWvkcDtR+oGWEZVvZa3GoBTHubmzUjNgOjLflSJb6vVHE5CrpGSJFSJXQheO m4VD12oyvdBc3oq/GnCSqn3TrE9dR0ab7UKu3kRyi2LT8aDaaiwipcqQTZZFOdzCjcMhUo gErA2fMgu7/ts9ETx0tJsqFFut81DJeu4xWnAkWa9vsC3FppLo+KubssdUpMRKGWyV55A3 SLEF2hPqAp1OLPicMzde3Q2S8iqrCZ8rTu9Bi0fIpA1Jk9+kjt81l+goKjfKGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y133M2Z9vzQ2N; Sat, 30 Nov 2024 21:24:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AULOlSr058049; Sat, 30 Nov 2024 21:24:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AULOlCa058046; Sat, 30 Nov 2024 21:24:47 GMT (envelope-from git) Date: Sat, 30 Nov 2024 21:24:47 GMT Message-Id: <202411302124.4AULOlCa058046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 35b193572545 - stable/13 - grep: Default to -p instead of -S. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 35b193572545e09682f56494ac445b58dd89697c Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=35b193572545e09682f56494ac445b58dd89697c commit 35b193572545e09682f56494ac445b58dd89697c Author: John Baldwin AuthorDate: 2024-09-04 19:53:22 +0000 Commit: John Baldwin CommitDate: 2024-11-30 20:43:34 +0000 grep: Default to -p instead of -S. This matches the documented behavior in the manpage as well as the default behavior on macOS. PR: 280676 Reported by: Radosław Piliszek Reviewed by: kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46256 (cherry picked from commit fc12c191c087b63e1204fee210ba76082ea40b96) --- usr.bin/grep/grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index 8be0e662b642..e1ecd4da7999 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -112,7 +112,7 @@ int binbehave = BINFILE_BIN; /* -aIU: handling of binary files */ int filebehave = FILE_STDIO; int devbehave = DEV_READ; /* -D: handling of devices */ int dirbehave = DIR_READ; /* -dRr: handling of directories */ -int linkbehave = LINK_READ; /* -OpS: handling of symlinks */ +int linkbehave = LINK_SKIP; /* -OpS: handling of symlinks */ bool dexclude, dinclude; /* --exclude-dir and --include-dir */ bool fexclude, finclude; /* --exclude and --include */ From nobody Sat Nov 30 21:28:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y137X2L8Qz5fhhn; Sat, 30 Nov 2024 21:28:24 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y137X1qF9z4dVL; Sat, 30 Nov 2024 21:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733002104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4PRANw4++xBtq81gDdJLDftXkBAUoWqZ5EM/4KwYRn0=; b=goXMVS3KcPoDviuoxY2sQk0++zukUe7LvdqbeFfliqVYsbZtIcH2hTHgxgIa40zRQVqdiC IgFs+qV6bTVqIR2eY5lOsg2qsQkkMLAinP215tlAKX8RcOyXExEm62aPSchs6iQasUBImF zB7P4o9TEGpsQmwuYcgb5ZHPc4uAwIg/i4aiEmJ5L4jHdI48I/Iw0dauX4QIxo77Wsk1xg Sie2GeyCYyE1DZkSdRx6YJCz7ailHJil1dLaLV4kQ4E41SwVXpklUjssAaZYjwcEDIXNQA aQu1s8B9WOjFu9CcdjkDykZOwMdfTy81WY3qfu8DHHLqqBBSokpA7hZBl7rcng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733002104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4PRANw4++xBtq81gDdJLDftXkBAUoWqZ5EM/4KwYRn0=; b=lHfTKPw3EqGT7sww5340uaf4GO/qPh5QU318HL08OOIF5SlJyeAyIDbpUYhBMscoMl6Mme 5g2giA2TdEBNfJtRZ3qX0gMXBqDJAhAoA02n9VGqbnFAcWhhfkTwcc94TYWUwjps54htu0 KqErg4meegzfUN4FNdC1YN328TiFU0F1x08dU6lzSgM7bTY40butZQbPWvnuOUAYnNp7Fa gak558e1wfZ6ps9Ogsv2txa1iPaRYLQh+h+c+tphLyNrjH/5c7XPq+riTAfTI3kJtVX6UB Vu1gBsBCqWFcgE1f1MPuC/tHKOlFFfLouxoTZ3dtpXmsr1WFLpfFQiKdVDaUDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733002104; a=rsa-sha256; cv=none; b=XUXtmCY64bxtSKysK1Tv6vGF9ujlOSpJK2WhSbjptz+hZ8egxBUssPTqcXfdIJCOJmDN1f 3wT4hiTs3ecN6AApG4Abumzw1fEFWeRUfZmaUGLbsvnBTeQy6C0CXcovBLlBSEjJ0hPK6r 78AueBrtBzuieSX3F10txVMfBFzLoDwegwmRniPG3PEcAwIupM1mjGS7/bADn140/C23SG yxWTen0F8ChFOHh3qCIMoIm3Nn8A0frBoDdIEWoWsLAmSAx5Nmozw+8WHkxel3PZa1e0oF Im8BtZllYonCPCZY4b++WM9jbeeg5N0YFCx8RZA1QMX0DFqD3gDv9VxUyfowtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y137X1QhvzPl5; Sat, 30 Nov 2024 21:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AULSOfJ059270; Sat, 30 Nov 2024 21:28:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AULSOOu059267; Sat, 30 Nov 2024 21:28:24 GMT (envelope-from git) Date: Sat, 30 Nov 2024 21:28:24 GMT Message-Id: <202411302128.4AULSOOu059267@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 3a2ec5957ea9 - stable/14 - RELNOTES: Document that grep no longer follows symlinks by default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3a2ec5957ea95dc9ac22ad8e5b57bcb5c2a59208 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3a2ec5957ea95dc9ac22ad8e5b57bcb5c2a59208 commit 3a2ec5957ea95dc9ac22ad8e5b57bcb5c2a59208 Author: John Baldwin AuthorDate: 2024-11-30 21:28:01 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:28:01 +0000 RELNOTES: Document that grep no longer follows symlinks by default --- RELNOTES | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RELNOTES b/RELNOTES index 1ff7364f0ed5..e1ed1d18fc63 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,11 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +83f1b98d8227: + grep(1) no longer follows symbolic links by default for + recursive searches. This matches the documented behavior in + the manual page. + c333758fca3e: new MAC/do policy and mdo(1) utility which enables a user to become another user without the requirement of setuid root. From nobody Sat Nov 30 21:28:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y137Z2KBZz5fhhq; Sat, 30 Nov 2024 21:28:26 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y137Z1K3hz4dgj; Sat, 30 Nov 2024 21:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733002106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jU+VzVWxxv6xLTfm04LVDyYijQZqOkn8NDAGFKyJPLg=; b=d3Y88sRn8fbZ+VfgIqILLjYQfw215fBPE6SmLPZll8ZEHs7RVzsoQ8Xi8jZiGscxFeGL6A glpIanyUY1ZfG5HPhAJA3kSPttpWkver/l16yU8jUkB+DIYsvfTxHQn8v6DUEJBmEFbfap oNw8hNpsoKEHluOyvP+mlb5Zi45ieiyVJwBUIfA3HMwtllAO/DiD0UULj/vVvcztE1lrlX urAnrrUhsoQWvCAT3wHsZD+WW9nSjSpZfFUhMxoOln4HErB7opGGiCpces8YL18Y9R3Af4 Lh7wOI+F4ziX+kC58Kq2vb2BTgud399uQk1QuE9GjuxXluZwEuaHGy97DL/fUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733002106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jU+VzVWxxv6xLTfm04LVDyYijQZqOkn8NDAGFKyJPLg=; b=JH/0FbvxC2Uev9rcchshSTp1IHBTfL8j2heOedK2TriSMGtp1U666gPqlKyBLuVWYzpw3j g0CraD2hggyqJFgUAhSHfhrGgbS7F5zVMQz6uCGIzvvAMnyMJFRveiHM1Nt8khVxE8/nzF e6UuBp1pUhCoAZcO9aDbgHIpRjHr32NA6XZdiYjEFzSdlOxeye+gotXg1qf+KnRr4/cI5K EL4F75+z63mQAUgIynRx7eaSyZ/ZrxKPJqyMPRwlnM9g3X0yiSTKZMgVYAg2QY7p967PdE 065ulY/TAzf0HNEQsezCA3IuxG9DjQo+bTOTzLWKh+GgxS5XWszvc74JP5yusQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733002106; a=rsa-sha256; cv=none; b=KPzVii786zLhKyCtuVArW31lYVphmICcKxre8V6qRGdxEi92Pl4g1YNkAu/3qTG0fuh3uu GedhFkXKO3l8lw9NjDaVw24+IyzNjJPDyl0Cq8ec58DFgarzjiSk8lXDaHzW62eduGU9PJ 2buYxYUSicbytq+dSvAhS2c2o55M6g6ThjvEQWysm0gAt/8HAlkIhq+saxVZi7t5rri7vX 5cf/3FCZqoZsfge8xiaFvqUQl6fs93sK0c2wfpopEEuGiF15pk3/XceVHFpZ6p/C364ymu 5HrSulXAJ2ocUCcxsOyNsZk4D7rrEBEKhujDLhyZmKauYljvqBcWBA+ztkzMqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y137Z0rZgzQ2R; Sat, 30 Nov 2024 21:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AULSQ1b059433; Sat, 30 Nov 2024 21:28:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AULSQQm059430; Sat, 30 Nov 2024 21:28:26 GMT (envelope-from git) Date: Sat, 30 Nov 2024 21:28:26 GMT Message-Id: <202411302128.4AULSQQm059430@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e77d49921c27 - stable/13 - RELNOTES: Document that grep no longer follows symlinks by default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e77d49921c271cc13119ce7e29dd974af8560524 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e77d49921c271cc13119ce7e29dd974af8560524 commit e77d49921c271cc13119ce7e29dd974af8560524 Author: John Baldwin AuthorDate: 2024-11-30 21:28:14 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:28:14 +0000 RELNOTES: Document that grep no longer follows symlinks by default --- RELNOTES | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RELNOTES b/RELNOTES index 2ed706bc716e..57cabbff342e 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,11 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +35b193572545: + grep(1) no longer follows symbolic links by default for + recursive searches. This matches the documented behavior in + the manual page. + 0644746d5091: Add a new "syskrb5" mount option for Kerberized NFSv4.1/4.2 mounts. Without this patch, a Kerberized NFSv4.1/4.2 mount must provide From nobody Sun Dec 1 00:56:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y17lc6MGbz5fwvm; Sun, 01 Dec 2024 00:56:28 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y17lc5cjlz4xQr; Sun, 1 Dec 2024 00:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733014588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+QgvMqXrWu4J9WoOKs0tBAUOkw0Xgdw3GA+zW+ZXJ2I=; b=ELkBPjplOr2wVI+Y1mP4eIlzEDLqXnIyf9EuGJO47e03a/t8A9ElvhDxd2QfrOxsUOKt1O GVJIr3yB2deeig7TXb2sCJ1MHfYfUeydNcXiE2beu2A2V+tecea79MRm6q1z0Yoc+46AZW Z2JOObr0ThhhOqzpIyZ3o5/yw73f9Q8hq2mqVZZumfuM8m6AZlKIO9b5gOzf2ZwjMWnMwq BCZFH80t7DZK9HRgSADcp5uyE4Duwv5KR73HK5ti0/wbmznygjqSEROfZlCi4UKQlB7MH9 L1zVhtX40ix9qqsmYP6kjg0ewYFwOa7FZlGU3b97D3zXNpyAZaCt0m3RmQOWXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733014588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+QgvMqXrWu4J9WoOKs0tBAUOkw0Xgdw3GA+zW+ZXJ2I=; b=adB+bVT6LtpYIrCY4OItWLB83yJAMEwQUCUZhuOkBMeBaBs8WhVv+8Fq+BCpOE972iBloT xVvO/B0/5WWpcc/99RJ3oV1Vfm47vc7OkB1blQWhR85Unf4XofE5PrhJMQ10HCLeO1Di4l 7oJpcA7Gs+ODF2o3yHdn0y3duXxvWGEsiKJIIRqWRasg1iiIhzXkZCXWGyR20I6RUnkvCH wSRn3Vi9l6Qu3j1wTn9Vyi6SyHhMKgptcmIk/RBXCaAfoZRZT0aB9veoBTl8d9j/UicMJR eFP8jWtgsFiQ5WaD1csB7fdxS+4aQdHQiKyhoSTq6jn7hKssHIKp8SITKCdJ9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733014588; a=rsa-sha256; cv=none; b=ctr8p236aQ/aoAqRClcrmkGAbqAVRU2SyNTAoIK9wuq/B4MmTm/pA6Eq1X+4FmE+Y8l4v+ aN/Wclb+DokgXONnFqd8Z3HT03yunfjdmSYEqnODWIqUHZOEkem4phmz5jY2G8m+s2ODC0 lTcmqs5QwvFxlNATfxi+gBzZWuk+AIDzkpAjP9QM9IWNCuh0hBYCsIvrcHTkfbJjBqJRP7 dG/PWa3X6iNZk1cVWWQ6MAA1vhtlMUI4SggtvB+/AKHZcIqtqDRIdOLmdtxmYfJBmdTav/ 2e3aJuOFTbUvHMAj7F6YzHDYx1t+nb8k6zgjX3MbcNeqr0X469L7Bq9k3M1Oiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y17lc5DRYzX84; Sun, 1 Dec 2024 00:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B10uSP5046799; Sun, 1 Dec 2024 00:56:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B10uSJH046796; Sun, 1 Dec 2024 00:56:28 GMT (envelope-from git) Date: Sun, 1 Dec 2024 00:56:28 GMT Message-Id: <202412010056.4B10uSJH046796@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 7589f9bb7555 - stable/14 - hwpmc: Restore line lost in previous commit List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7589f9bb7555c0f84eed9df6f1964082e6ff2698 Auto-Submitted: auto-generated The branch stable/14 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=7589f9bb7555c0f84eed9df6f1964082e6ff2698 commit 7589f9bb7555c0f84eed9df6f1964082e6ff2698 Author: Alexander Motin AuthorDate: 2024-11-28 16:53:24 +0000 Commit: Alexander Motin CommitDate: 2024-12-01 00:56:10 +0000 hwpmc: Restore line lost in previous commit MFC after: 3 days (cherry picked from commit de852d78ff58643d91bb672571757ef73ca74c39) --- sys/dev/hwpmc/hwpmc_logging.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/hwpmc/hwpmc_logging.c b/sys/dev/hwpmc/hwpmc_logging.c index 8b6c2a1feb5b..f63b0e216fae 100644 --- a/sys/dev/hwpmc/hwpmc_logging.c +++ b/sys/dev/hwpmc/hwpmc_logging.c @@ -140,6 +140,7 @@ static struct mtx pmc_kthread_mtx; /* sleep lock */ ph = (struct pmclog_header *)_le; \ ph->pl_header =_PMCLOG_TO_HEADER(TYPE,_len); \ ph->pl_tsc = tsc; \ + _le += sizeof(*ph) / 4 /* skip over timestamp */ #define PMCLOG_RESERVE_SAFE(P, T, L, TSC) \ _PMCLOG_RESERVE_SAFE(P, T, L, return, TSC) From nobody Sun Dec 1 04:56:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F4z6lcfz5gCmG; Sun, 01 Dec 2024 04:56:51 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F4z604cz480h; Sun, 1 Dec 2024 04:56:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VoEmjAldbKTMeKGxdFdVbET+VQharQf6DBLRw45PXQk=; b=U6S9/ZTAhHue7OEg6X5bMTIyKBl2VyeOytRWv+JtgoDmE2gebD7fVfdMBUm1SAa+gjA9/2 9jXTtjJEx6P7qLW9b5YERL0lbbi3O+ZGkCXwMPtGvNy4vv0BNMbdCmI4n0Os97k5emN5u3 gFvaNA2FrW8HzkcynjqZ62CyC4TP2naN8G+JkfdaGCi6eaR+wqR51Yb5Uk/wQ/MKMwjj44 /M1fT0eYrDLpoe6QH/KX4FnxSwcFSIlqfs3dftGGpFTcQSn93LqVvECxLcu12v4XyBvGKh EKRUMTrLT6TU6WwSf11FRd1m6w/kqLkm6E7Fi5oCo24kcEPoXeZTaok8orftLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VoEmjAldbKTMeKGxdFdVbET+VQharQf6DBLRw45PXQk=; b=VSuWM/Wgtl08Ah1MuNoAuwWzAqyN4KpmoDn+ajvFOnZER7H6/aCbiwyzGlj7N6yhKCl+m8 KzitYu27tYtqEQJ2J15kJ1qbsLOpanGTxPMksqRVBccrXciGTnUXcGNE+uQ+AxfRJYtmxg fojv/KCgD0wuRvxewqoommnCOrcOwAG9rAAAajEiomY6PKedPtZ5gkorG5jmDc9bKDNbLy QEEDbq8R/wTKP3Jks7/fPRlnz8yichDhBOf0LEKMlo9K3BGotln/+JTYQ1MJChH6KsCq98 3jdEpeBY51QRRAQvBeQzuEWdggdWOJAb5626mqLDWp1WiTyoxdqId/2KW9fLpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029011; a=rsa-sha256; cv=none; b=hyq3QUprWpd4fX10go9BlOBAok+s6WMagb93OQEVgnW5gqalcw2Y8FEc/wRSrXdRRnR6Wa vb6IROV1OP0OUl5XopdnGP0p8jZwHX6djP9pY10bvptJRUbCMc2C+M8Ki0xiG7U3RktLuw bbRd2LcUiUfduKWQMsXWjJ8h3XdyFaEfGJPfH165/JPOXwRMqtMEdYGrPdfNEz0rswXBSN Zt3p+/RPVJ1Zi/ufUwDIMzpV3/BU3bwbTcreYYeYJ4IUNBDqgG9mfjDvLUN4aP08JFzF+t CPxgHBcqOzhSUFQLr/TlgJH/XaVj9pml9f2D4ZcVdG26Q3V9ZioUQTHIlkHG5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F4z5bR1zdxf; Sun, 1 Dec 2024 04:56:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14upeV094276; Sun, 1 Dec 2024 04:56:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14upjD094273; Sun, 1 Dec 2024 04:56:51 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:56:51 GMT Message-Id: <202412010456.4B14upjD094273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 09cfc202bc05 - stable/14 - btx: Align the PXE prompt with other options List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 09cfc202bc0521858185605edbe8d7f7f037a249 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=09cfc202bc0521858185605edbe8d7f7f037a249 commit 09cfc202bc0521858185605edbe8d7f7f037a249 Author: Tatsuki Makino AuthorDate: 2024-09-30 19:41:42 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:03 +0000 btx: Align the PXE prompt with other options To fit within in the same space, drop the newline before the PXE prompt to make room for the additional space character. PR: 281494 (cherry picked from commit 4fa4693dcdd8176f1d12cce5f026eb2052036dfc) --- stand/i386/boot0/boot0.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/i386/boot0/boot0.S b/stand/i386/boot0/boot0.S index 80c7702840c1..6c48e380a32b 100644 --- a/stand/i386/boot0/boot0.S +++ b/stand/i386/boot0/boot0.S @@ -581,7 +581,7 @@ intx13: # Prepare CHS parameters */ prompt: #ifdef PXE - .ascii "\nF6 PXE\r" + .ascii "F6 PXE\r" #endif .ascii "\nBoot:" item: .ascii " "; .byte ' '|0x80 From nobody Sun Dec 1 04:56:52 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F510RS6z5gDB6; Sun, 01 Dec 2024 04:56:53 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F506zQRz47v3; Sun, 1 Dec 2024 04:56:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ULAj4SRv7pLkFMmr7QW3hZLCCHBGGMmlOWKXCeKw158=; b=WXZQtRbgB9IgoNl4y6U02AKgHuJUUbo54JyDfGk+Itw0jW0yTjf3DAw0wG+BSNXmzf1mUe hwpP9e1pO1YsL7/X7HBpRVFKvCgqanEl7/KbKiLS+2kV6FkuY4NjSRA8YPjVUDWH+cPXIu og86p+H9GGf32YQOZGjvJbkaazufotKc1A2K0v9MOiaGSry6CCmmWBXmmOZkjwDqsjzYcp moEnlcrscWuKbyKgTC9UalgM4PLOgUZLXPJULRoWDG9DuRBWZxQW5nqj2WtfLVcEy0j8hX uuajpVvz7S6RtB4lz5T+nc6ZPda3AiHO86B/YxUtm8xgElXtW/dq/bT7XNbzuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ULAj4SRv7pLkFMmr7QW3hZLCCHBGGMmlOWKXCeKw158=; b=NEhM4Jn03UeewFqpjtQXcOPGyXkMtrlImwa/g9DAGpnRIsyFI5oBkQlaxpmr4nNv6YJ5OE vc8UYcV7jPJixlgFT2WkTnC5UPYtcriYz9gQLYsKduWy/q1raF+pesLQDk1MKNkK2PNZg4 qnvk9GwivD161iTospcIiBOG4LD4Bb5YR7k93zwZalzzZiDEpjZhSjum/+jK0feo1s1ZgR b1pJvEiObBBczSCSl1n/L9fYmJYiuiH3a9VvXFVAy1nT7+tgk/PL8Lhmh6+wRSR9Co/6af JPhFZgRaEzFkzH9h2TcCh+DWzL8QMojfc2oMIKWlyBVLNT12i/qQrhnzyecREw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029013; a=rsa-sha256; cv=none; b=qZjESaZceUkSXTe4syREVbo3tpWjRYrC9C2i5JE4ymK35fcJTXG9OMbgvUgYsIgNlu1l/f q7oj8FC62YjRMVVZwBpusXhohfnmxHhvTjHWFOBk2FKU8iHdjhlrOTvdFY5T1OTaTAYnyb 46N9B/ZfbeqoNA5qYBxonlPNjzN3rNd2FHeH07a7BCpq6TBZRscN4V5yETNcnXI/AFfykR 391kTZBlNqQFH4EiwS+a0pk5UfsEwmBLcwC8inVgxePmWsN0nkJwsMrLhsAwPNYFjRjdPa NvHsepC5uRuxV1WlZxoU2mBGaZ+4zt3OZXVCsU3vvWtvENezpiEag30p70tBDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F506byWzfNd; Sun, 1 Dec 2024 04:56:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14uqVF094327; Sun, 1 Dec 2024 04:56:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14uqWT094324; Sun, 1 Dec 2024 04:56:52 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:56:52 GMT Message-Id: <202412010456.4B14uqWT094324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1a264ff0cca7 - stable/14 - tcp_output: Clear FIN if tcp_m_copym truncates output length List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1a264ff0cca786b0cb1fdb5037805db02edcaa20 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1a264ff0cca786b0cb1fdb5037805db02edcaa20 commit 1a264ff0cca786b0cb1fdb5037805db02edcaa20 Author: John Baldwin AuthorDate: 2024-10-02 19:12:37 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:04 +0000 tcp_output: Clear FIN if tcp_m_copym truncates output length Reviewed by: rscheff, tuexen, gallatin Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46824 (cherry picked from commit 519981e3c09c2875b136635459c87ab24d3104e2) --- sys/netinet/tcp_output.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index d1a81123ebad..9855083b579a 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1088,13 +1088,18 @@ send: sbsndptr_adv(&so->so_snd, mb, len); m->m_len += len; } else { + int32_t old_len; + if (SEQ_LT(tp->snd_nxt, tp->snd_max)) msb = NULL; else msb = &so->so_snd; + old_len = len; m->m_next = tcp_m_copym(mb, moff, &len, if_hw_tsomaxsegcount, if_hw_tsomaxsegsize, msb, hw_tls); + if (old_len != len) + flags &= ~TH_FIN; if (len <= (tp->t_maxseg - optlen)) { /* * Must have ran out of mbufs for the copy From nobody Sun Dec 1 04:56:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F524lf0z5gD5S; Sun, 01 Dec 2024 04:56:54 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F521CdNz47vL; Sun, 1 Dec 2024 04:56:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4cKLoFCOSOcCprkKe8T9HcT/rEtuezQMrt2ByJvvNSo=; b=KyRk5jF5f21dgwhpQheyPz01baoe6lbM9v6FAt4EneBYr8DAXrVXuIbDGWQ7TBS+UfMDFw XaTifuWW37oOEuRo1rfwgf+Rko6eXJH+rbU3eGYmn3F/TA5KmXh0pXOe6okbKWxFcix2Ve mDRfxlHSrGPrP/FU6vem4RfiEGM1xc4UlM9igPm2Pq7T5ibWyp8Bb5AmEy13jrOkBI7eQv +YsAFZRhudKLK2nF1aNOU2bLflXKNQ7rYbCswQenIF1tByohKfRfxpK1HTtuHF4hVlFUsz nIIhrj9ivACKKzotHFPlUD8jCXT7BDI3gEuaKXg9cU9xZ1Hj+OzGLu411ZjRXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4cKLoFCOSOcCprkKe8T9HcT/rEtuezQMrt2ByJvvNSo=; b=tBWA1Zf0eF90G2a4QKCaD+hGT6vD5EgtERXM95ywJQ5B+m05wbPh7GIzyHeLbjej3xztL6 btmr094nGzwjNlsT1QdsB+YEilmNvsVfJBBWG5Fj0Dvm6H1KrgTt5dE5ZLqTLjILwt1ZaK z37dl/yqqi3kK7LhbXSoZ7dZ+KgbDtw1lpReowKYzzm71ZPW6oR0/q9+DRi3MW6UI+CJLW pJaEe4+syViY80Aqa0UtdyaYWteHQ60OHc4Q2h9tsCezXjGfmRJ9U2txT8ONbkDwtEIntB CGEhAddhk9hSE6CJvMaL5UJu9m77XOWIxaBdViUNnzmrOy50yxZS5AyrderwFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029014; a=rsa-sha256; cv=none; b=qcxQI0yUAyU78lXZg2mJJyCjNof7MMipHxa8bsQtSBc1FlUVb7lUuOOYnL5FHA0ongwbt6 7gbi4XVY5clugkF0MR6MqlhgCPUjXz5XjhIkEwro/i9kWvDJVhC7aS8/YJANQfbExB/vGa 2+DpoAGszEqpq8tUE40dL63BPnpNuR8azyXR2r27b7f+kZoOk4fZ5I9lYsmvyy3OPwAhqK BZOreLHhHTZ3o4AfThMMXOiy5190PscvO22+/NSoiqdcH2WQx4utJy3y6GKsdpFSSAh+wC ak2+KIpKsH65TZYbW4Ksaa6urwUeGq6fOTHEH6H/xfwOAYdg27ir5Ixl5hgLfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F520SlGzf7Q; Sun, 1 Dec 2024 04:56:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14urS4094377; Sun, 1 Dec 2024 04:56:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14urqJ094374; Sun, 1 Dec 2024 04:56:53 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:56:53 GMT Message-Id: <202412010456.4B14urqJ094374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bce5607513fa - stable/14 - device_delete_child: Update comments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bce5607513fa59b066f8a4eff05545f5169eb268 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bce5607513fa59b066f8a4eff05545f5169eb268 commit bce5607513fa59b066f8a4eff05545f5169eb268 Author: John Baldwin AuthorDate: 2024-10-16 18:08:24 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:04 +0000 device_delete_child: Update comments This better matches the variable names and the function comment as well as clarifying the reason for the order of operations. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47154 (cherry picked from commit 1ad3351966563b71b9e45803abd5c3e12af3b65a) --- sys/kern/subr_bus.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index f55a7210e825..982eeaebf21c 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -1522,11 +1522,14 @@ device_delete_child(device_t dev, device_t child) PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev))); - /* detach parent before deleting children, if any */ + /* + * Detach child. Ideally this cleans up any grandchild + * devices. + */ if ((error = device_detach(child)) != 0) return (error); - /* remove children second */ + /* Delete any grandchildren left after detach. */ while ((grandchild = TAILQ_FIRST(&child->children)) != NULL) { error = device_delete_child(child, grandchild); if (error) From nobody Sun Dec 1 04:56:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F534Klyz5gD5W; Sun, 01 Dec 2024 04:56:55 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F531vL3z47h2; Sun, 1 Dec 2024 04:56:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6csPBYHFhUoLTvYZwITLQ3Vssspo3Mmvfn0UafBIuQc=; b=J1SjsKu9DHQPLfHMZ1jeA32fYgI2YA74v3z4oZFqJX3u1byB6rs5OArSvf4noYcdMGmr4V t1ewIGk0UEh9XrUvZyzmPiQo4sR7MMeN+GsFpHHmpcpg+xM2QIaxS8I25qs5zGYn2k395Z HFBdMnJLrIgoHgUL+Eyi3MZZEm3a8jpzrtdV6kVGO0f7jkAUQmLvVcmDozns9CBOGyRVW4 1dTAFDhBUF8U5rVsiDcTGFNe6h4Bc0xqcJcq+sudkHL5ny1isumjZtC9I/GliBsSJWbE3c Tq8hoSiLFhvdANtV683idUn5ury9vuSU4bR6yRf4VFXoPxoxcmKMS1D5BRVbyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6csPBYHFhUoLTvYZwITLQ3Vssspo3Mmvfn0UafBIuQc=; b=L+MoJEjjst1mWGd6jeNacGQRjaPN47nfCQuC2T6qqXlvnoL1BVev6G4qgIVy+HUmZzCse/ 0LL3h2W1Q/4VHpMRPdwM8sTbzqJZ2wIkmhJjKnkDLuq9RCSEUTkUKoTwGBqrf1ehLhF15j RpPa7DyPYRi/elH+e2YVHGQ3crfN8hEobptZ/KGyhw5jIWp2IbCcTURIWu5GGuBq18CCOE 6HDe2yi8fW1++hZ4yUhxAd414qCq3E21PhP99EfdEcpNHBkG3SVltTzkfrZ+E6DdA5tAYW eXu2oikdg7fP1uLkmYnGBa6T3vJmMTcLpRQsS3hJ9fHKj9/Dad1lclfRhzu1zQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029015; a=rsa-sha256; cv=none; b=U86EUEckogG6YyT0ysYyl/Mowyh6K9RDuZgmawisR/QeOR5ipAMkyF+quzZIDSkNbabp4G lc2SlkYaRX9tbmglV/YCnfG0boVXfddiHgatSUOFHeQhNMpxaYqj2i+WDzOutA/BcDcpNV FV+Bt72ucWE1EJeoZCo+sEXi7OlzGT8scLtT8mZZRhC/u5wj0GjOGBb5HDZEIbuXUpDIQe 8NMssAMstBo8FjBy1z+h8vjjsb5ENt8zmu/T6HxhSjL72FF3WhqCRFRAfDJV8MwpstS+kf py+RPnjam1fb1rnXkkSGfCwfixquR83xye2aUF8vzT0O1zztKzArMOt5yZrO3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F531TFQzf7R; Sun, 1 Dec 2024 04:56:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14utbp094442; Sun, 1 Dec 2024 04:56:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14utnq094439; Sun, 1 Dec 2024 04:56:55 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:56:55 GMT Message-Id: <202412010456.4B14utnq094439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c7ec1fadb52d - stable/14 - device_attach: Invoke BUS_CHILD_DETACHED if an attach routine fails List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c7ec1fadb52d05c998c8e304ed8085946d971389 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c7ec1fadb52d05c998c8e304ed8085946d971389 commit c7ec1fadb52d05c998c8e304ed8085946d971389 Author: John Baldwin AuthorDate: 2024-10-16 18:08:35 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:04 +0000 device_attach: Invoke BUS_CHILD_DETACHED if an attach routine fails This gives the parent bus driver the opportunity to cleanup any allocated resources, etc. left behind by a failed attach attempt. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47155 (cherry picked from commit 42078dfb0f72edbf83217cc8c997c0a54d951990) --- sys/kern/subr_bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 982eeaebf21c..d271013b4b1f 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -2597,6 +2597,7 @@ device_attach(device_t dev) if ((error = DEVICE_ATTACH(dev)) != 0) { printf("device_attach: %s%d attach returned %d\n", dev->driver->name, dev->unit, error); + BUS_CHILD_DETACHED(dev->parent, dev); if (disable_failed_devs) { /* * When the user has asked to disable failed devices, we From nobody Sun Dec 1 04:56:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F546Ywtz5gD5X; Sun, 01 Dec 2024 04:56:56 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F542sq2z48Gm; Sun, 1 Dec 2024 04:56:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u1PLmPcd1S+dDmB5BER3QxqsvbXRVAG1hopaTrnPRLo=; b=fEyGrxnzCCkEpBzRaKmos4gB6cQP4Y2ZM82FJ+jy99unCMDp3oD+sHvEpOJGb7/7VJ85H+ yM02lTpRAiBQrUQd8dDIowlQRkejWjcLnagDtV9INAS4XtX4xwTOtkoq+RkzDf+bJqu6uj EQrK0FKUa0Jkz8qSsIse3GlQQPURUOCHJrKO9dViKwSTt77d4co+qZu28FhJCSVGA9pE39 KFzeh77ODlQVjN2eHRepPYydAjtmTilBRjpzcD5FGDpEO7lY0DHwH/KmVZEbO+kjV8H+Fl DZujRLxFowTRM08koOKtW6bk4j9+GIF4OUSVxvI2i6Zng5jF+8NF02/U5qpusQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u1PLmPcd1S+dDmB5BER3QxqsvbXRVAG1hopaTrnPRLo=; b=PSNLYzULBUd0oR0Rtq5EFnaVyzmLr8ecUjJ4Ifd33iQ+XiHx/6Bo7Olz96amjb6Xe4+tVq kYY9B5YFVoa3+6Rmo9o5q7qmzkfCEbOzq9/5EZXqt0M4RlpHYzoVwSn3CgMEI8W7IvBaV/ D7Zlm4XxnSsEBEPJHqbOgjchJs67BHv99JvyrXmGRpqtztMHj9o03By2Y39ssq58/wqJ2l ZJcVCxekwVaSbIFaUHBaYc8h37T+et6iTwStilk8+7gRZPJsemeC5Sy1fDGHaEU00NcbJu fu1vYnnHTDiXDev7Ye4qx121uKMkN95xHihZtasyYHIeXuGIU9dH/urEb+pyng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029016; a=rsa-sha256; cv=none; b=dj3n4g6xrdKmSx/s3X7AmhyJKnkVVFCQCCs7HFpEjOoUTisiBz0vMwMb5A9m6qNWz/+bdU 73RYAt+m7tbtfy7/0eMYbghhGnlUPajshAtwyprlNGl1LlixBCZhWAnmfyjEBUdaPe7M6R vYPQRpRy0EiaOOiyr0i/k8WNbZ/fvBbpuwxVIOgpELGhqM7UXvqI9sZHBDcgmn5y7eCIvf 4aFLKOUyZFyUVLa2f3vq2hK/HPyC7StXYNdxHUnnMSvK7v6oNTFldz/hEuFd51xWb9UtL2 AIPsaQqiaNpNW9sWKo3fivfS6JpKmkELanPC1xBu2iRiMgTFl9t5uyavujFS/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F542PtBzdxg; Sun, 1 Dec 2024 04:56:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14uurT094496; Sun, 1 Dec 2024 04:56:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14uuOs094493; Sun, 1 Dec 2024 04:56:56 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:56:56 GMT Message-Id: <202412010456.4B14uuOs094493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 4e3ad581b5dc - stable/14 - bus_generic_detach: Remove redundant check List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4e3ad581b5dc350dfc7b0d311c06fa2a489a3d20 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4e3ad581b5dc350dfc7b0d311c06fa2a489a3d20 commit 4e3ad581b5dc350dfc7b0d311c06fa2a489a3d20 Author: John Baldwin AuthorDate: 2024-10-16 18:08:49 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:04 +0000 bus_generic_detach: Remove redundant check device_detach() checks the device state and only calls a driver's DEVICE_DETACH method if the device is attached but not busy. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47156 (cherry picked from commit 3342afcbaf42c2e6a4604c84e267901411e790ca) --- sys/kern/subr_bus.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index d271013b4b1f..d22dd4868ff6 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3465,9 +3465,6 @@ bus_generic_detach(device_t dev) device_t child; int error; - if (dev->state != DS_ATTACHED) - return (EBUSY); - /* * Detach children in the reverse order. * See bus_generic_suspend for details. From nobody Sun Dec 1 04:56:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F556JlXz5gCjR; Sun, 01 Dec 2024 04:56:57 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5548PJz481q; Sun, 1 Dec 2024 04:56:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MrjNx5JJmjQPBq0dZt4JxzLorN6/EVNlsxNfvu8NsP0=; b=yeWpvaEiA2SWhHub9MmT+SPCfUpFAIl7cx8Rjoa6TO2yRv822hDZQhW/tnYn5cC4G/SaKg 7/ZRBG7kUZm87noGrTHGrwApEiHKKxaTng3zkBFuiav1FXizu+FuNttOI/trinAMacY/Q3 LOwna2z9v9hvRhWUNpMNrX1l689drFZZZyOaIT8WmNLgSuoa3U9jlSTf6k/weqprDcEbfd PEiS+h1hHwSBgBk9aO+wNB274jdzKA5aHGhef6VQxKCgIUXxHWXegC6MSJu6gfI5H5PZDk qT/0MvBleCmYD+NZstI0KOLw1KNm1kcKCEc8Ipn5ER5XKjOE1N9kN7UOYLFr7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MrjNx5JJmjQPBq0dZt4JxzLorN6/EVNlsxNfvu8NsP0=; b=in1BmId8WDar8jzshdWITvrMAj7Cq9JYNvCYctl8m1baIBoUogyKdNgmXKhfZXjSzZFZik I3Qo6HmaOfPBQarqDQuZZNOHeX0OMYrkHSI95VZTwJn6vy4KRJtXCV7g47DGa5Ist+50OT pIpKnp8n2hf6eZPgXBgB8oylBuqlMDUGqZ5F6EVtl0i4/Ci0h/lX5aphkHOtLq+plMgtkI mSeeQ9/G8NaH79rqPsw4ocx/c51V73L7pv6Ro5b1sof+8mzkNI+UBen53l3VqZKWnyL5+H +ZlfEZE5WFITk2PpxGtopZSaIAP8Uh26zzTWAI8dmp0kKwrNjPrwy+C6GCk/yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029017; a=rsa-sha256; cv=none; b=xSxmNpj3O+i0aRVZaUew1CN32K0M2OACmNfRA+Rptw1A+KEuX2BsYoIzxh5NDPrMzsZjJX mJN7Mp+0focaNhrwFburEdwU5nz62f/LfSamUQ64TUzY/jPJXrt2ro6CHRq/406DYwEZve 8uAM4PagfFDOyTRKamTRPrUdQ0jaVdi1eGi3XHK5sJuuF1I8q6ZEd081vnAAlHfz2Em/Cd vDtCUXFighEfYKGbYZjuJkhUqSRkZlQsqNH4y1Ca7wpregk8LDR6BnB1pbYRYeZZaJ4fru 7Ou4kpgmnq0Z9mTcDFrbGv+3Lnk+wPQ+BNgHQynhSd+j7765Pfhxp9nO1NAofA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F553Qzzzdmt; Sun, 1 Dec 2024 04:56:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14uvRd094545; Sun, 1 Dec 2024 04:56:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14uvb3094542; Sun, 1 Dec 2024 04:56:57 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:56:57 GMT Message-Id: <202412010456.4B14uvb3094542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 09a4700fecb1 - stable/14 - devinfo: Output device description in verbose mode List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 09a4700fecb1e8ee5890bf74bc5c1f30292f90db Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=09a4700fecb1e8ee5890bf74bc5c1f30292f90db commit 09a4700fecb1e8ee5890bf74bc5c1f30292f90db Author: John Baldwin AuthorDate: 2024-10-16 18:09:05 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:04 +0000 devinfo: Output device description in verbose mode The description is listed in angle brackets after the device name similar to device probe messages. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47157 (cherry picked from commit 60516a51abd4b09095bc70a830e4a2c5c761af04) --- usr.sbin/devinfo/devinfo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 060f272dda79..d7d5c7c0487d 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -135,6 +135,8 @@ print_dev(struct devinfo_dev *dev) { printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown"); + if (vflag && *dev->dd_desc) + printf(" <%s>", dev->dd_desc); if (vflag && *dev->dd_pnpinfo) printf(" pnpinfo %s", dev->dd_pnpinfo); if (vflag && *dev->dd_location) From nobody Sun Dec 1 04:56:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F565jGNz5gD5c; Sun, 01 Dec 2024 04:56:58 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5657Nqz486X; Sun, 1 Dec 2024 04:56:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8iuTXPZe1X6RFNqyrm4j/i8jweA1yX3NQrUCySMPavo=; b=fBobuW+OoyzR4nwzYwLyrcUHN1YCw6pppcpGwsWsv4fl7f/5HU0F/n7naqyWEXoRHVjHxz tISajeO7tHu+eFHs9UAGBB2OLKnSNTWm8R1BjSGI74GQAbA0852J3WXdK39zBlfCsw+K9r x41/FWJ7o/DEvKp3WDmErSZ6H+evMhyxfJPy6L2NTozCAnmRHXepSNihwj//+pYMVpex/x GoUDVm1qLuEztptO8mtHXC2KvtX0osEIa+WjYBxDHWL8M3O4hSJFDeDlRmIow+goOijTbX lErMA7VT21Qus6Zx+4NiMWRJNnsRsHY7+m2FOy06+rwthXGYOjMpYIwdLPKrNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8iuTXPZe1X6RFNqyrm4j/i8jweA1yX3NQrUCySMPavo=; b=aJMo77v9FEA3wf3k+sTaszhMf6KmkIPQaNUXBhnZtI5AwWmvtSz1Pr1i7Dbu7TkgRahY4X pg4HyVvTguOIZzd/fMVlVHlNguveIJiCl55K0zgytF0L0a+zVSRdr08fcgqVT1BsBn4/d7 VB746kW/a+kvegzv3P52psL1mdqVmWDTqjlFPn9HGXWNvDIm69i+Etv1bTWO39ihSPmu+Z 1eGBd69Y5TPBH4h44eEJl0zs5z6xHU3lBazsLJW5UhvtTSxDQoLZHyZz1Nag5GfPUwQed3 yHX5L/Y917dXDKzzZznXbNoLQbw8i4kxgRv6dd+unzTGHDexnViJ+zapD1wGww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029018; a=rsa-sha256; cv=none; b=bIqbEwLc/+MSwOwyJwMi7d2Oj8lXr/3ZZha5DX7rjcOLAPll0gEWE0+xM1/4tqg3RfYGKA JzjrnHhTFEc83j0jhUdqmzgzl4f6gZjBRf1UCA+0xnORUsgExQVwwJPpBoUPq/B4Uhf+l0 y5tkmm9KDju5wH2fX/J+/UW523Cx+BSc8iomeHMKsmp/ppalqBdwma/0R84m1let3CLDuK o/tJQrdpX22Ynxs0xU3Z8cHdaa45VGytwPINLMxEDtzQ5a2JviRLMlTtrE1ltEgNZC2dt7 iqXhJQna4jPNvWNOA8wYnwEybzoWivvbDvYc+PkrTXZjgjBul3Og1qa0WCY+qA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F564T2Dzdmv; Sun, 1 Dec 2024 04:56:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14uws8094590; Sun, 1 Dec 2024 04:56:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14uwJU094587; Sun, 1 Dec 2024 04:56:58 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:56:58 GMT Message-Id: <202412010456.4B14uwJU094587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6e1d5e32a2f6 - stable/14 - cpufreq: Use a real device_probe routine List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6e1d5e32a2f69014757c47049d9e29ccec2c289c Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6e1d5e32a2f69014757c47049d9e29ccec2c289c commit 6e1d5e32a2f69014757c47049d9e29ccec2c289c Author: John Baldwin AuthorDate: 2024-10-21 14:24:15 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:04 +0000 cpufreq: Use a real device_probe routine cpufreq doesn't have any child drivers, so calling bus_generic_probe was a nop. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47184 (cherry picked from commit ce968b095e75262ba3605491acf6850ce331481d) --- sys/kern/kern_cpu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_cpu.c b/sys/kern/kern_cpu.c index 524ffc1e3420..247b5f6c150a 100644 --- a/sys/kern/kern_cpu.c +++ b/sys/kern/kern_cpu.c @@ -98,6 +98,7 @@ TAILQ_HEAD(cf_setting_lst, cf_setting_array); printf("cpufreq: " msg); \ } while (0) +static int cpufreq_probe(device_t dev); static int cpufreq_attach(device_t dev); static void cpufreq_startup_task(void *ctx, int pending); static int cpufreq_detach(device_t dev); @@ -117,7 +118,7 @@ static int cpufreq_levels_sysctl(SYSCTL_HANDLER_ARGS); static int cpufreq_settings_sysctl(SYSCTL_HANDLER_ARGS); static device_method_t cpufreq_methods[] = { - DEVMETHOD(device_probe, bus_generic_probe), + DEVMETHOD(device_probe, cpufreq_probe), DEVMETHOD(device_attach, cpufreq_attach), DEVMETHOD(device_detach, cpufreq_detach), @@ -142,6 +143,13 @@ SYSCTL_INT(_debug_cpufreq, OID_AUTO, lowest, CTLFLAG_RWTUN, &cf_lowest_freq, 1, SYSCTL_INT(_debug_cpufreq, OID_AUTO, verbose, CTLFLAG_RWTUN, &cf_verbose, 1, "Print verbose debugging messages"); +static int +cpufreq_probe(device_t dev) +{ + device_set_desc(dev, "CPU frequency control"); + return (BUS_PROBE_DEFAULT); +} + /* * This is called as the result of a hardware specific frequency control driver * calling cpufreq_register. It provides a general interface for system wide From nobody Sun Dec 1 04:56:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F582HQMz5gD2f; Sun, 01 Dec 2024 04:57:00 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F575kJXz482K; Sun, 1 Dec 2024 04:56:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BfPaquzK/11tBzQxSc8nToGDevz6MvarkhS+FTjcmKw=; b=BZ3ApxcctRe9K8Y2o3zTKiCar9E+dK+y4W+9FBGqAD1F2nJZld+njXda8a+LjrJ9ZzOlrN k6kKWoX0W+PQdANY9GPCbgS2Y+BH9qU9pL0WET0mNiTqeIPpk5keXH46l5AnnwQyiAP2u9 jRpjNUZyevub1mwt2tLku/Ch5O9mCW+yjeOc/SmfpJtoXI54rlsX+mLvbJNkjxuPu1UvHy +w4UMC5pVpzyaPTynw5GUsE9PQCvakuJmrmAkUn28CdFHrW38mb5Ac630kjtIJGQDW70A8 9ydrarCEthIUfSQtuGUhjmb+xs65xRlDND8O52SgfYGCtnsaMkrAgRpMzg9vyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BfPaquzK/11tBzQxSc8nToGDevz6MvarkhS+FTjcmKw=; b=kGzpCY50YI2WziO2s9v+o0ZLNcZZQ9bQkYpm31N/ph+97saZchVbkHdt1i6MWtinBisYW7 nP3XqVmYP+c7U/tZPn7Jqdyk81Xcy5Dancq6G1IlmGUQ8HVlaNzSeq9eTR0cBrjlvyPPBo pnh488VTsiAe+iqjAkv9RwdxINVpxYDL07u9LnuvpPxk6qIce82SFf8gk7RkU/WTP+pk9k 4A+MnFyGSkiXv91tM52M1MKLfZSI2LnEthDLzZ/o9DuHdG1Jf4XaupTzMI279lH9jGMKnO fq20e+PXvRq4alJYuFXsNgDWGIr7dezu+YM+D8y0O1Rrld0T69Bibay7lqEDYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029019; a=rsa-sha256; cv=none; b=B4Q0vHuOV1LiMXxoNHpfA1Vl3VkOScLkxMe8/Gfndr5tREWEayqKWNZEyVN7O/qJh8Eiyv 27Jjoseq1+XnPpBrFYPfYBA1OZCNBBEAya7CCFdZJh9Hcrte1UueJKkv7iXr9P0QLiIKmq mp1EYCL4vijZVenDRFMMrEKO8qIh+2Fd3hYiPu/Z+OVp+8/psIW6WEfo9fysGWZLQRH9Ch lmqNFf2r2H5FWKjq46YeX/wzmYTS6zBulIeJek3dVxdvl3Viw0Ri/+DoaN60S4/Zmp3zLR udtEmuRqw4gXBP27VIuqE9YkmEz9i3+fOKwGA3RUDuG987IHlXodSjiYb/IToQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F575L8fzdmw; Sun, 1 Dec 2024 04:56:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14uxcD094649; Sun, 1 Dec 2024 04:56:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14uxNa094646; Sun, 1 Dec 2024 04:56:59 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:56:59 GMT Message-Id: <202412010456.4B14uxNa094646@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 47158359cbc1 - stable/14 - legacy cpu: Add proper device_probe and device_attach routines List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 47158359cbc1f01fb5fa899a2287e86b61da8906 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=47158359cbc1f01fb5fa899a2287e86b61da8906 commit 47158359cbc1f01fb5fa899a2287e86b61da8906 Author: John Baldwin AuthorDate: 2024-10-21 14:24:28 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:04 +0000 legacy cpu: Add proper device_probe and device_attach routines Set a device description in probe and handle both adding and attaching children in attach. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47185 (cherry picked from commit ab4f969f8d305665c478b25d4268501445fa5ba6) --- sys/x86/x86/legacy.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/x86/x86/legacy.c b/sys/x86/x86/legacy.c index 6ece5e085dab..23439a4b549f 100644 --- a/sys/x86/x86/legacy.c +++ b/sys/x86/x86/legacy.c @@ -267,6 +267,8 @@ legacy_write_ivar(device_t dev, device_t child, int which, uintptr_t value) * cpufreq(4) hang off this. */ static void cpu_identify(driver_t *driver, device_t parent); +static device_probe_t cpu_probe; +static device_attach_t cpu_attach; static int cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result); static device_t cpu_add_child(device_t bus, u_int order, const char *name, @@ -281,8 +283,8 @@ struct cpu_device { static device_method_t cpu_methods[] = { /* Device interface */ DEVMETHOD(device_identify, cpu_identify), - DEVMETHOD(device_probe, bus_generic_probe), - DEVMETHOD(device_attach, bus_generic_attach), + DEVMETHOD(device_probe, cpu_probe), + DEVMETHOD(device_attach, cpu_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), @@ -330,6 +332,21 @@ cpu_identify(driver_t *driver, device_t parent) } } +static int +cpu_probe(device_t dev) +{ + device_set_desc(dev, "legacy CPU"); + return (BUS_PROBE_DEFAULT); +} + +static int +cpu_attach(device_t dev) +{ + bus_generic_probe(dev); + bus_generic_attach(dev); + return (0); +} + static device_t cpu_add_child(device_t bus, u_int order, const char *name, int unit) { From nobody Sun Dec 1 04:57:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F590pstz5gDBG; Sun, 01 Dec 2024 04:57:01 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F586qTZz482b; Sun, 1 Dec 2024 04:57:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1+zfZKH9+9A+g42YpMp8uvkZewyrO5reqHuLzxa7+aU=; b=VmTVdp9xIPrAVfUDsp0EBwWAopj+2SyfoEeLWWyODU4RGaVBQZeaDDPRjeDcEpirTjFxwL BTjoDCKL4gycD4VypgYwWeHzdu/iJIMLv1pk5aFnKFJK1bc0v2IX5yhayyw137qzWvqSCD jZW614su7C5Id18tU8dqyl21AkmnOEdl0lAv48OrNMkLip08EHQKUBNqGsoL1dge62hz2G rr6N2EGpfx0WPjr7gxV7pXp1Y+7W4OwuTwSwe5kolMmNuZKafkP3dgmJ8eW9RGG3YY30Gr jj3uFyEBf529EOv46oFZQIpUNrqSTmw4Mgdw+PHOPcdeJhTTlAcAYW/cSU67HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1+zfZKH9+9A+g42YpMp8uvkZewyrO5reqHuLzxa7+aU=; b=XD/VgvJhHS7ypn4s0IqWgeOGTAxIDg638m0bpqWFzJ1cf6t0e41nTsPXWMxXcPE07vd6Nd Bhr0O88nyGvy1cgpgc9NYTyOiwtpbVbloajSCk4pyQEYvM4RJZrdQ5kIVICcQpKUU/2sRz c3H/HSoTnohPY9Io6jPuaj93UhqRc3+3tKPppb5JtUawNXFaPqIt3dVxoAVzaJVmESvuEg siAIfqIdv2z/PANdTB5Ew9hHjsZ36Dk7TT++ThNv5JUW7tFcF+XyCYhmtKdhu+jmzB1nZ5 /fDWKM18udCCXd1H3u9/H+sxVdayG7YxSck/JR2n48UfAFQPO94qO8Pepo+qrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029021; a=rsa-sha256; cv=none; b=hFkR2OpmXM+k4At9UbiS4Y94AisqXbD3d5TiqxCEPJIK7h8XEGfDzSEcesabOHCZAR8kuw b1ffyOIRU5SdrLqhSsB7fPy91G72NjIRZrAjZdws/gFjyjXBB2x4l0isbAC+BDoi7d38N+ CYL9SDv0CvZ4QLegqrAVzHcw9bjLEbX8DzPsXC2Riw1YHZXA0AD3GRb/iTrlVU/NmeMTx6 UQT7Sb3+lYkpMWH4eQxMnOP94LYQ4epwYKAc6rwxeDioQ3tlgxY2KkOq2ERYmglX8MvSTs pI84AGfa8yHdYedhbtRGutvOta/YR+l5RDu8ZnavwuiErlJYvGCKDvR6UOOGmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F586Nvnzdmx; Sun, 1 Dec 2024 04:57:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14v066094703; Sun, 1 Dec 2024 04:57:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14v0O5094700; Sun, 1 Dec 2024 04:57:00 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:00 GMT Message-Id: <202412010457.4B14v0O5094700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 081207e22c17 - stable/14 - Use bus_delayed_attach_children instead of its inline implementation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 081207e22c173a8f49982e31610657d97a8d78aa Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=081207e22c173a8f49982e31610657d97a8d78aa commit 081207e22c173a8f49982e31610657d97a8d78aa Author: John Baldwin AuthorDate: 2024-10-21 14:24:39 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:05 +0000 Use bus_delayed_attach_children instead of its inline implementation Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47186 (cherry picked from commit 5201decc8b431a8f4f53efb8db5fc452557de68b) --- sys/arm/xilinx/zy7_qspi.c | 2 +- sys/arm/xilinx/zy7_spi.c | 2 +- sys/dev/iicbus/controller/opencores/iicoc_fdt.c | 2 +- sys/riscv/sifive/sifive_spi.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm/xilinx/zy7_qspi.c b/sys/arm/xilinx/zy7_qspi.c index d639c0bb02cf..1aa7176ee84c 100644 --- a/sys/arm/xilinx/zy7_qspi.c +++ b/sys/arm/xilinx/zy7_qspi.c @@ -603,7 +603,7 @@ zy7_qspi_attach(device_t dev) zy7_qspi_add_sysctls(dev); /* Attach spibus driver as a child later when interrupts work. */ - config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + bus_delayed_attach_children(dev); return (0); } diff --git a/sys/arm/xilinx/zy7_spi.c b/sys/arm/xilinx/zy7_spi.c index 0010cd6e00a0..822d8cbcfba3 100644 --- a/sys/arm/xilinx/zy7_spi.c +++ b/sys/arm/xilinx/zy7_spi.c @@ -440,7 +440,7 @@ zy7_spi_attach(device_t dev) 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); + bus_delayed_attach_children(dev); return (0); } diff --git a/sys/dev/iicbus/controller/opencores/iicoc_fdt.c b/sys/dev/iicbus/controller/opencores/iicoc_fdt.c index cff19c723c53..57ec953cfff3 100644 --- a/sys/dev/iicbus/controller/opencores/iicoc_fdt.c +++ b/sys/dev/iicbus/controller/opencores/iicoc_fdt.c @@ -128,7 +128,7 @@ iicoc_attach(device_t dev) } /* Probe and attach the iicbus when interrupts are available. */ - config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + bus_delayed_attach_children(dev); return (0); diff --git a/sys/riscv/sifive/sifive_spi.c b/sys/riscv/sifive/sifive_spi.c index c51e3ab2d322..65f4f4c95798 100644 --- a/sys/riscv/sifive/sifive_spi.c +++ b/sys/riscv/sifive/sifive_spi.c @@ -347,7 +347,7 @@ sfspi_attach(device_t dev) /* Probe and attach the spibus when interrupts are available. */ sc->parent = device_add_child(dev, "spibus", -1); - config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + bus_delayed_attach_children(dev); return (0); From nobody Sun Dec 1 04:57:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5B4nt9z5gD2j; Sun, 01 Dec 2024 04:57:02 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5B0zqXz48gW; Sun, 1 Dec 2024 04:57:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zM6X3nmYNEZqLhG1HFchsl2RtLDWuTVgJyW/Yc/BfNY=; b=o4uq2G+6j+SQ6fCtHeKZ+qgmtflNGKFkkALC3GipfuaYMFgX9CC2LNSIOmkolVm8e7XJG1 w1Jn/cE8vWg8yaMYK7JZ4MMCyInoilojKQDptT7VDCSkJz0y9GO8J1mv7aps/3Jg14iA2A sce5bIy7Na/dwNWllrzzp5+BhL5y6+ptmRRYpH2hhDEX43ET+4pvlkN4eXMhIw4Bp/laqd PlqtwhxbFp1n00LoQGfA5MNN3XH5O33ZgPdMWf7JIYsuWb5xnlII8LYgQlSyheVczi4zbP FnK2lbehFvGAiKYVrgvTG7R5MK6f8z6uWNTN9DppwUuOdj64sehyrZ9p5oVvow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zM6X3nmYNEZqLhG1HFchsl2RtLDWuTVgJyW/Yc/BfNY=; b=NsFkoktwlXtVAgaNXO9UYZuczV/PExp/edq73hyLnSl4LYAaCPWcS8Atf06DqOISQ5t3z8 MTu/P3Sy8vTIgF+DGgd20IKKQHo745RwMEwMyETj89FK0GalQDZOac70b8tt0kvc9+iPf3 TWYm533bjgKyOWuq5nJg6S6tzMRN5ZgFEgcax8SD7v4dNYMX09RXlMZMap8iOPNvSEpW11 JkhIE3Vu3eTmTRCLGNbG9ub1+i3PYhhxetqo43ijZ3fe2AnYeCR8g/k2x0Dx1F8PBlZBac SQMNShdCXv5Qh9s6JJnpnjaEV9cKZ2HwVlNvYQ8jEqi153Eml4jnKl6xmVMPcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029022; a=rsa-sha256; cv=none; b=QiyxvK08LxUw6PyfR3t2g8G6w9gHCrF2g83Bmls+3mqqeIiodw9iBeBZSFaNz2+WtFfI9P n+1A1X0my/9toIFw1C1Xny5xBP4RCnr91qbkePtJp/HJuNhJ8c4SraTbop3vrn9qYC80tu srJSyVf6M2yovBTfpYdl/22O8CmiOy7DrFfgNKBZh8/2zCNCHuX01FD+oPsgAKAgiob6C8 hvj9gB7jO/xv2TX3YhsHwk3RosRUIskktTkbwbQrnuF4gxMoqEE4jkMYkJ3QzSOb7BcjEy TCbTdZ6DODCA2EMVe4M4AzU8t4BKCjTspz98Rh6NoTIZgiJy+0vR8p55djzhbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5B0Tc5zdkg; Sun, 1 Dec 2024 04:57:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14v1ir094755; Sun, 1 Dec 2024 04:57:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14v1Ae094752; Sun, 1 Dec 2024 04:57:01 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:01 GMT Message-Id: <202412010457.4B14v1Ae094752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 159756c6add9 - stable/14 - ctl_report_supported_opcodes: Rename invalid label to invalid_options List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 159756c6add92694f5c0208550b1307fec9e4902 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=159756c6add92694f5c0208550b1307fec9e4902 commit 159756c6add92694f5c0208550b1307fec9e4902 Author: John Baldwin AuthorDate: 2024-09-25 14:20:22 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:05 +0000 ctl_report_supported_opcodes: Rename invalid label to invalid_options This error handling is specific to an invalid value in the REPORTING OPTIONS field of a REPORT SUPPORTED OPERATION CODES command. While here, reuse the label for another case. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D46775 (cherry picked from commit 0063ef79f9e6b9ad47969af3b94ae63e7888852c) --- sys/cam/ctl/ctl.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 5c33645f0f0d..1a1a27ae16dd 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -7494,33 +7494,26 @@ ctl_report_supported_opcodes(struct ctl_scsiio *ctsio) break; case RSO_OPTIONS_OC: if (ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) { - ctl_set_invalid_field(/*ctsio*/ ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 2, - /*bit_valid*/ 1, - /*bit*/ 2); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; case RSO_OPTIONS_OC_SA: if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) == 0 || service_action >= 32) { - goto invalid; + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; case RSO_OPTIONS_OC_ASA: if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) != 0 && service_action >= 32) { - goto invalid; + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; default: -invalid: +invalid_options: ctl_set_invalid_field(/*ctsio*/ ctsio, /*sks_valid*/ 1, /*command*/ 1, From nobody Sun Dec 1 04:57:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5C4MX4z5gD81; Sun, 01 Dec 2024 04:57:03 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5C1YbJz48j7; Sun, 1 Dec 2024 04:57:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f9tCvcRVVn4H+s4MHoK6QsJtzk4T/1gbilun+R3lmko=; b=gp+NVHLZsPmO6itdRsykZ1XR3j6NWCPM4dQMiAdyGGzwptZFZUp1O0J/0DYvHRtauLTR7e UFkTGoLApMPFp7Q0WFPhzzOTyLA8EFrBQOKuOWMyZnYq865pJ4tgcxQ5K53k7xoxdQK0Qo c+18naB4+0kElYNdS3JzUOXwmzfBxeOCWXCCVsOZsWY1bgNp5XArp8NNBNdEeP2zVHj0Rq BqGQ/481tMjk9hmx66fqfcSspDqNDkozcrD6q4FA660awyvgoI0H0McvU7hytKI5qYtU5n bcwFNGf992Yvlkq40exPQRtIe+A+6J+C8o1if885mVbyG59NrgkmzkMc/rjSRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f9tCvcRVVn4H+s4MHoK6QsJtzk4T/1gbilun+R3lmko=; b=L4N/z0Ke68ZRUPJQVJhlJkcaDEUjJubHwNO46hYVaaDO9DPCktzKx8V3IsGD4WRulBBXeU o+giCB1O2oBO9yh8tueYQKbHM/SiiMDivJHYu7MEWhbHjDoRKtBbIfuNvIHUy8BmFUS5XK bv56iuGmqllcopofJcg/3I6qslQyhjOGE5oxL1KdXpuM9daz4ecoEKVBc7DLgyoO2rgBbO HbQUHKcXEAPh1ep6bm3iyl/wwdl/M+XFMBe8lz20TSxWlZQYbb3QwRorpLClEoJxpRam1N 9S0nzjrevDLWVs3YVW2AzGF19YLcMraBDSGsTe2naqg18HzkbMWaQM25bFy6Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029023; a=rsa-sha256; cv=none; b=TKOb8pshj5HzX9aSwXIjFa54wQcFqLfA92KzKp+bqssfxjsAYJY9uTFu40eAZvbt1C7psc ieMdsNy0DR7o/YEGmRB/EGyYvFvv/BwVStyJ96zvtwu3YWk7ImkbGGHwQtS3Y93EXpsTLn d/oYtyVqddLxXTyM95bfQRmGjGl24ahTZCCo/T+E76xtVyTlXfaMg24xvmEBgz635Q/WoC o4LYbQevisVIoUBIoUTDH+niVYxMjwgmHSrETIxvX2+k8zJWReBSQl1Wly09HwupRD7O0K yplC1JBOALPDF7sDFxk59tu76tIAdcUJ8OVVJt0vTtYHe1XPzH9EhVQec0f9Zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5C145vzfLF; Sun, 1 Dec 2024 04:57:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14v3tQ094801; Sun, 1 Dec 2024 04:57:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14v3jT094798; Sun, 1 Dec 2024 04:57:03 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:03 GMT Message-Id: <202412010457.4B14v3jT094798@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 9a2a95eaa6b9 - stable/14 - ctl_report_supported_opcodes: Handle invalid requested service action List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9a2a95eaa6b9321fae5044a27f23624bfb2ad159 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9a2a95eaa6b9321fae5044a27f23624bfb2ad159 commit 9a2a95eaa6b9321fae5044a27f23624bfb2ad159 Author: John Baldwin AuthorDate: 2024-10-21 14:53:48 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:05 +0000 ctl_report_supported_opcodes: Handle invalid requested service action Service actions are only valid up to 31 as they are encoded in the low 5 bits of byte 1 in CDBs. Fail requests with a requested service action of 32 or higher with an INVALID FIELD IN COMMAND specifying byte 4 as the illegal byte. Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D46611 (cherry picked from commit 0e3a211961014e0991a54f583b2866ac19ed0e76) --- sys/cam/ctl/ctl.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 1a1a27ae16dd..f22b6ae924bc 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -7499,16 +7499,20 @@ ctl_report_supported_opcodes(struct ctl_scsiio *ctsio) total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; case RSO_OPTIONS_OC_SA: - if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) == 0 || - service_action >= 32) { + if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) == 0) { goto invalid_options; } - total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; - break; + /* FALLTHROUGH */ case RSO_OPTIONS_OC_ASA: - if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) != 0 && - service_action >= 32) { - goto invalid_options; + if (service_action >= 32) { + ctl_set_invalid_field(/*ctsio*/ ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 4, + /*bit_valid*/ 0, + /*bit*/ 0); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; From nobody Sun Dec 1 04:57:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5F0V6kz5gD2l; Sun, 01 Dec 2024 04:57:05 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5D3hfPz48t7; Sun, 1 Dec 2024 04:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W81ObUly8W3133ouCAKa4odihvVmsaaXHoyIdzAnIqg=; b=mlybm/Yy355kWmqnklfQWmRdt0vdQQoPvyabi8GfTj9h/7KLEcWGVPsXpyZWX+2gNHVZuE 7oQtB2jxb6PlwWPOmdahyFAZ5nt9Mzglv5u4r9MyONEscY+ebqnvBrV+cooNszT9xwNhqU bWXOVqqa0pwXwr+WkJEb9HXpFBvIZjfcThZn9ppkba1bMCfMYiSuJLKv/IjHKHNZ5Gnq7B lEI7Fr7YSMIa6jmOLJR2iWMl0x9MrPfFVKUk7T3WCpLnN8G5WaTIfWuNhjQEtoTzPdcSQw O619xyP47KSE5ix6291XxTRECi9CGUGWzq0vnwft3h4g1lRcdPyTFgx0BFUgbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W81ObUly8W3133ouCAKa4odihvVmsaaXHoyIdzAnIqg=; b=cINYm5CgKv4GIH/ZD1oqtgiNr7nQyQwpwhei3bbgvv+D+i3kj1b5F+O9JIIFwOOmrpaALZ BPVjxHhohidKMXrCY5jf5vV97mGgeoyabHtQLbrbJFzBhuhT+7BowFe//JRxjcJqqX/Nk5 2j8tuKrBmlkpaiCRhdvoiwN3MMLuVfl9unEkYmQVQUDtkU4daX7SDv5YV8PTezRa1PG7n/ EhS7Nl/tyaYn6IXxEhjXRqJFokLaESOngJ6JjpvKarMMTzjuRUeWajsvMBinUdCoWAkGWN z49xfSs0TkljLKudWcErB90UWK4k/6K+BRyTspZNSCFbIi2Cjy65A/Vq+/cXcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029024; a=rsa-sha256; cv=none; b=GQXy5601S0fWp0S8rDfVk71MptNCZJ7xDOzIhQQO70LSJfqoHTKJF69GFcnVYHI4Hl4kDx bTzzE/vlfTBwS85SrZCvjD70U2rsunwJECXZkYGJscNJkPjiSAhAQSlYn6cTSjjut3W2JD dI9JfVsfoXEEPpNm2Q2R0ROnHokYl0cjwz2Jr3hhEah1p65jY3Cut9YDfuYijrdnLY8sPM vpFXiWwnuNzjvNqjldVDhpznRqx2hPkGXxbOhDmHXch1F7TpEXCsO0Qk6+p5LigfdfjaZf ER8/kwa1rO28NPowxB36ijp4C40DFYBBbeKIRNvYzDqgxUs2RytlSYIehP1nLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5D2Rhvzdkh; Sun, 1 Dec 2024 04:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14v4c9094847; Sun, 1 Dec 2024 04:57:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14v4EA094844; Sun, 1 Dec 2024 04:57:04 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:04 GMT Message-Id: <202412010457.4B14v4EA094844@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b8b100db9fcb - stable/14 - csa: Use pci_find_device to simplify clkrun_hack List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b8b100db9fcbcdf7944ac88557820930fbc7603c Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b8b100db9fcbcdf7944ac88557820930fbc7603c commit b8b100db9fcbcdf7944ac88557820930fbc7603c Author: John Baldwin AuthorDate: 2024-10-24 14:18:53 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:05 +0000 csa: Use pci_find_device to simplify clkrun_hack Reviewed by: christos, imp Differential Revision: https://reviews.freebsd.org/D47222 (cherry picked from commit f0bc751d6fb4f7fe46fdaa1486b0ae20b04bb544) --- sys/dev/sound/pci/csa.c | 47 +++++++++++++---------------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c index 662f0de80188..f293a8fc8af8 100644 --- a/sys/dev/sound/pci/csa.c +++ b/sys/dev/sound/pci/csa.c @@ -109,46 +109,25 @@ static int clkrun_hack(int run) { #ifdef __i386__ - devclass_t pci_devclass; - device_t *pci_devices, *pci_children, *busp, *childp; - int pci_count = 0, pci_childcount = 0; - int i, j, port; + device_t child; + int port; u_int16_t control; bus_space_tag_t btag; - if ((pci_devclass = devclass_find("pci")) == NULL) { - return ENXIO; - } + child = pci_find_device(0x8086, 0x7113); + if (child == NULL) + return (ENXIO); - devclass_get_devices(pci_devclass, &pci_devices, &pci_count); - - for (i = 0, busp = pci_devices; i < pci_count; i++, busp++) { - pci_childcount = 0; - if (device_get_children(*busp, &pci_children, &pci_childcount)) - continue; - for (j = 0, childp = pci_children; j < pci_childcount; j++, childp++) { - if (pci_get_vendor(*childp) == 0x8086 && pci_get_device(*childp) == 0x7113) { - port = (pci_read_config(*childp, 0x41, 1) << 8) + 0x10; - /* XXX */ - btag = X86_BUS_SPACE_IO; - - control = bus_space_read_2(btag, 0x0, port); - control &= ~0x2000; - control |= run? 0 : 0x2000; - bus_space_write_2(btag, 0x0, port, control); - free(pci_devices, M_TEMP); - free(pci_children, M_TEMP); - return 0; - } - } - free(pci_children, M_TEMP); - } + port = (pci_read_config(child, 0x41, 1) << 8) + 0x10; + /* XXX */ + btag = X86_BUS_SPACE_IO; - free(pci_devices, M_TEMP); - return ENXIO; -#else - return 0; + control = bus_space_read_2(btag, 0x0, port); + control &= ~0x2000; + control |= run? 0 : 0x2000; + bus_space_write_2(btag, 0x0, port, control); #endif + return (0); } static struct csa_card cards_4610[] = { From nobody Sun Dec 1 04:57:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5G1jbyz5gDBM; Sun, 01 Dec 2024 04:57:06 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5F3rfgz480v; Sun, 1 Dec 2024 04:57:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UaHNgcHJmTH8cH7qPzzu/tct+UIOWrcWKd+uWO4CtZU=; b=RIc+dfAwTtjJ3szxUqdDiK+4QrMum6VmG55q3tZzG44PaIhtc7xj35lat0iWwECdse9kUC /ZhgKW7sLXD2CkXjjbrIa2RgZjfb0G4bwsLXToym5oc7gyViqssGc/Nr+Qkcdv0YlOb8B1 DS8xpP1KxOsmwLTmD9HnzLXXXADPIAAJdqlrSBWjmhjHL3Is0kLigIs8aRwEVFaXQCOULA S2kIz9PASKCyHyEjWsP27wQ90L7qc7xuIvrJ+vI/y88LvRUJczxK/nImWKfMM1QUPt2U1C y/D4FDO3OgNECa93+ytO39ND6Cgv2+hPYKvGmOM0bAs6iiMspUZWFSfG32tivw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UaHNgcHJmTH8cH7qPzzu/tct+UIOWrcWKd+uWO4CtZU=; b=HhzcJPJ8ihlXXUqz2zXO7/cFtwOCBhQ5Iod9ZbVENaMGbwcR4HNlI1+lYgLk0EV7chC1uM egSIZoep8v2Rf+aFdfPHQddiiEtQKrrexTaerswLeCC4KrsiaHw7GniubAXAKiD5rH9PQf f8CLtrO9MGt/9QRn2mX+NV6atA1mDelJvlZloy90C/aH0PrnyOLeQvshTPXcnooASEv0Ok UJ4q2J3Enalo0QpKuCplMgXvLkOnYEA+/YqvIpQjezh0PlflPEUlLHA2n6Z2gkRGNIN3AQ XylKf/kH9D0EViq1frq1joX5U2CfBn14tRgvEoxjlSZlbCCBTyOP4D9yREBd+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029025; a=rsa-sha256; cv=none; b=rnCTCvIR6fDaWxWR85MWEirxNwbxHe3U4/tGz78K29F+pgDRQQk/hGvxJIyfjzK54bOZFB LZri5AD+QdMNO8tLH9Tvd2Okx7j4FKy5m8BPSabzhWKtxbQlHyIK/cSluhR5GE+2HfeYjj czcjLrrRSECspYEZweFgKtqItQnZu5eu9v2883PWQ4WIxItL7mM3hKAFBkrXTZ/F6/tqyg rP2DaBa7R8J/ew7YJVRMYHTxyQT/+YedtK1Dqjb2DhZbSIwr+hCILXgBQPL1lGDi0WksA9 E9CF5OWTeZPAAtFUo4XidzgTqm1kzSN1IkLb0vxAct30W4uWmtdrLOnZFlfoYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5F3SylzfNf; Sun, 1 Dec 2024 04:57:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14v5w3094889; Sun, 1 Dec 2024 04:57:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14v5Vp094886; Sun, 1 Dec 2024 04:57:05 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:05 GMT Message-Id: <202412010457.4B14v5Vp094886@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1f398acbc991 - stable/14 - fixup_pci: Remove unused attach DEVMETHOD List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1f398acbc9917c2671fdcd128cce7b49b86e6e01 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1f398acbc9917c2671fdcd128cce7b49b86e6e01 commit 1f398acbc9917c2671fdcd128cce7b49b86e6e01 Author: John Baldwin AuthorDate: 2024-10-31 19:49:05 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:05 +0000 fixup_pci: Remove unused attach DEVMETHOD The probe routine always fails, so the attach routine is unused. However, this weird driver is really a quirk system for PCI and should be turned into PCI quirks instead. The Natoma quirk is also broken as it should be doing a runtime check either on mp_ncpus (or more likely to see if it is using APIC) instead of #ifdef. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47219 (cherry picked from commit 1cddce89ce30570d554120af864d23c554cd5d18) --- sys/dev/pci/fixup_pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/pci/fixup_pci.c b/sys/dev/pci/fixup_pci.c index 5f4e881d5c76..56ee1e93cbe2 100644 --- a/sys/dev/pci/fixup_pci.c +++ b/sys/dev/pci/fixup_pci.c @@ -56,7 +56,6 @@ static void fixc1_nforce2(device_t dev); static device_method_t fixup_pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, fixup_pci_probe), - DEVMETHOD(device_attach, bus_generic_attach), { 0, 0 } }; From nobody Sun Dec 1 04:57:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5H13ndz5gDDR; Sun, 01 Dec 2024 04:57:07 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5G4kr4z493S; Sun, 1 Dec 2024 04:57:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XjPU1hk3nlbs/INSk1Ot4C3qECZXFAC8y35Ps4VNNJs=; b=MPZAAzBHlmHqPbX+kJh5amEBYn7U6HuHGZv2QSrV8tmfqLAJUfhv6CgO/r85BsA0eSJWXa W5taIc7y+kVm3ZIaBe+4Yf1JeEVk3Y+lagAOEJ3mzpqhRbT51QosSdpjsNV0LNBw1uLCKt gc53VVPcUU6G++VZQBU3WAMEc/x/bmRGkxZb3ZzExuJSogHMDD8Z5LSTlt0WYypnz8SIG3 lYPyLaseykCycRzs5IAoRxGZ3La6y400GPQh1llOkkVCtOmok+pJHR98gbgzdtIKbIBhIa XbGUAPGYCAMAc1MtyvET7paR1ouq+DKBRkr8DwDGLk2lsn4SJkkNL+TcKuB2/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XjPU1hk3nlbs/INSk1Ot4C3qECZXFAC8y35Ps4VNNJs=; b=xgjTPH1bhgey0HzZaQGVzsqCvo6X/1OgsKyBm4RfqN3KQVPVWD5ldkkd7tnyIHJPQvJztG BGslGIe3HnBNKAmvG86j+Uyj+MqATQ6/KlwA95E3HH1US9QxZUCkCPGScmCilxPGHcUvlh zqfZI2YgqXsuCHwQuBqwBo7zBBRWW5Pey7gbPLie0MkSX3VKKbJN1EiwPT0fg68eoEDpJO fO2LGgriZ+zgQs89WEO0C96XlSRBWJR4p97Zh6NsowpMV7C2k0JwuFNNdkFtyqWCgmjLW8 ORPhU+cMJZKleSnbrvEYr7zFfQleSKN0Gz52FHnrP20oNWlsb5J5IqnZJDRt9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029026; a=rsa-sha256; cv=none; b=Ll/1uCYBcEPQF8YTePYCgli8RlK30uakv7+/8KCb148ex2GmzwUD4YulduqQWLaB6RkV9q 4Sp7bQwgrXoPsTDbVNa5pAID+lWJPqRzjwCzXVoPVCMKrEpAF6lXWZpIpljNAnVVDe1nxf oaIa6oeSE6EtLtcLsRSGf5TLLZf0vL79/qTKNBaYR06+rgi7FnAtw2noxsEyYvbTSTV/Xn p3v6eInMTCQ8FDUchcAseFQeRb8p8pYp9YPKOP7WS3CL/jIHWJ6unWPjU28SX2S6TVU9U0 YkZFnT1TQtkIxZgAUO4uLQbT4FnjkxQi7VFgRa4ro8AJ7uAZV5/Q4cYnhhXF3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5G4FjBzdmy; Sun, 1 Dec 2024 04:57:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14v6Zq094937; Sun, 1 Dec 2024 04:57:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14v6WC094934; Sun, 1 Dec 2024 04:57:06 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:06 GMT Message-Id: <202412010457.4B14v6WC094934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 82ee73e713c4 - stable/14 - ignore_pci: Add a proper stub attach routine List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 82ee73e713c493f26f837d27bf3f011c57ef15c1 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=82ee73e713c493f26f837d27bf3f011c57ef15c1 commit 82ee73e713c493f26f837d27bf3f011c57ef15c1 Author: John Baldwin AuthorDate: 2024-10-31 19:49:27 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:05 +0000 ignore_pci: Add a proper stub attach routine This isn't a bus driver, so an empty attach routine is more appropriate. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47220 (cherry picked from commit f2e50ce0a37a40363b7ec6a165aa0b0a2e81ffc4) --- sys/dev/pci/ignore_pci.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/ignore_pci.c b/sys/dev/pci/ignore_pci.c index 22964e55b81d..8a12e43bcae3 100644 --- a/sys/dev/pci/ignore_pci.c +++ b/sys/dev/pci/ignore_pci.c @@ -41,11 +41,12 @@ #include static int ignore_pci_probe(device_t dev); +static int ignore_pci_attach(device_t dev); static device_method_t ignore_pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ignore_pci_probe), - DEVMETHOD(device_attach, bus_generic_attach), + DEVMETHOD(device_attach, ignore_pci_attach), { 0, 0 } }; @@ -68,3 +69,9 @@ ignore_pci_probe(device_t dev) } return(ENXIO); } + +static int +ignore_pci_attach(device_t dev) +{ + return (0); +} From nobody Sun Dec 1 04:57:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5J0gk5z5gDDT; Sun, 01 Dec 2024 04:57:08 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5H67fyz49DB; Sun, 1 Dec 2024 04:57:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTz/k+x5nTtNiEIPxijeCENhc/CTyWts2jXO2s8zNDE=; b=gjHqAKy/zbDZViz1rTPQ1QPI4NCrPJ+cqCmCevVN/5MHtHdHb9JSOfbLAoWGFw6FvoQVfo //GdTNjd1w/BOogVFUUUdxFpxN+G3cM82hOXUZWsHiy9E+JxHgFLR2neaK03mBYjsmMr8Z nKvzOxxEYfvxFnLjiD+OHpUo0rCBLlySdZSiIkOq/4wLrHib/bIkSzgnmzr46m/m5ITqBo Cdr3zcpKAjOeycJJSe4ASR8OiUzJ01fv95doKdJ0S7jrWR9vS8COTXH0DgU4JPnGZ0H2Ku KRXzV1Xq7PgoZurs9F/Un3iLwIoQKBsGVB7UTwPdBXryORr8bSIkxWtZQACuzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTz/k+x5nTtNiEIPxijeCENhc/CTyWts2jXO2s8zNDE=; b=cbuc7VzgQK5U7bQFAFZEVFR9/RnZtRDycq/5+iR2QCNGAS2lPb14G4h1EC7GmnzHZG5s6w 1x5pfWEsnYNOzUvlp77tpPtMEcehS+LIsJaRSWtoqVyP0IOtMfygityvA6TRjTBx5yJjzV HrbaRErien7Puz3918ve6Tm0jboC0z6AImP/prxR+WmZHu3I1QFKI+fw04cNQCYzNZcKGj fNYGptMo1+15rFcAZ5SQ41ZhsHUd6SsaXtDmlOOU/kWy6Wej01Y4EffaycodL39xZ+K94S g6vVVA9xeeJqxKGhyLdBnYN4s8jA3OocgGDAnWLu13B8NrqSLSMutEn7wOlkcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029028; a=rsa-sha256; cv=none; b=uB4fZBHNWseFXprJ+JUbN32vu3imWID8mVHA1fKPwO/tRl1/05uBGQhcJtwLG5yLr/s3Xy fXtdUrwj0YNyA3e4AmzCgnEpmHOKps3lLbJz7Ds5we7T7r9CaDUbptsj3fDcGktcAwZ/O+ m+zJSiFfYVp99IxYEOBHilkmRfJE1+WirXTaRdnkwDoiXpLugA1f0ehaIOC+qu9qXj4/qn wR4QxWUe9YQradDbDnLAbKGdoghVJAvwBkVC3A0NGUB5Xp2udKhO0MwgCa7IvTJUWFKX66 AUyC/XxE+UhbIAXRcFyfZMJE5q9T79JIZbY4oh173OP6af4lZszNW2szlwAlhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5H5G2LzdwY; Sun, 1 Dec 2024 04:57:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14v7Gp095000; Sun, 1 Dec 2024 04:57:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14v7HO094997; Sun, 1 Dec 2024 04:57:07 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:07 GMT Message-Id: <202412010457.4B14v7HO094997@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e09c819e6a4c - stable/14 - vf_i2c: Don't hold a mutex across bus_generic_detach List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e09c819e6a4ceb6babc51057e12afa792569342f Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e09c819e6a4ceb6babc51057e12afa792569342f commit e09c819e6a4ceb6babc51057e12afa792569342f Author: John Baldwin AuthorDate: 2024-10-31 19:49:41 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:05 +0000 vf_i2c: Don't hold a mutex across bus_generic_detach This was also leaking the lock if bus_generic_detach failed. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47221 (cherry picked from commit 13a1dbfed57b167a6dc4d68b60115eb0e070b9b6) --- sys/dev/iicbus/controller/vybrid/vf_i2c.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/iicbus/controller/vybrid/vf_i2c.c b/sys/dev/iicbus/controller/vybrid/vf_i2c.c index d3c3664af78c..e034ab278f40 100644 --- a/sys/dev/iicbus/controller/vybrid/vf_i2c.c +++ b/sys/dev/iicbus/controller/vybrid/vf_i2c.c @@ -207,13 +207,6 @@ i2c_detach(device_t dev) sc = device_get_softc(dev); vf_i2c_dbg(sc, "i2c detach\n"); - mtx_lock(&sc->mutex); - - if (sc->freq == 0) { - vf_i2c_dbg(sc, "Writing 0x00 to clock divider register\n"); - WRITE1(sc, I2C_IBFD, 0x00); - } - error = bus_generic_detach(dev); if (error != 0) { device_printf(dev, "cannot detach child devices.\n"); @@ -226,6 +219,13 @@ i2c_detach(device_t dev) return (error); } + mtx_lock(&sc->mutex); + + if (sc->freq == 0) { + vf_i2c_dbg(sc, "Writing 0x00 to clock divider register\n"); + WRITE1(sc, I2C_IBFD, 0x00); + } + bus_release_resources(dev, i2c_spec, sc->res); mtx_unlock(&sc->mutex); From nobody Sun Dec 1 04:57:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5K2TBwz5gD87; Sun, 01 Dec 2024 04:57:09 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5J6ksCz49Dw; Sun, 1 Dec 2024 04:57:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h9KU4x0oABOojL+/8XxB0D11Janu0lKrhTD4inla59Q=; b=rJqQhe6K3gt9Q4DYRiMN4j8owQof7MWBsSOGjcU/ybqVxzFRKl4RkTBJnalaNnTxscXTFo l1mZB+WNimWU+gbeXFzjC6FoD6xxNT7SXmf07DDjfjsfL6k29iS/Fpk7YLrUlTY4l1tqqB qOTbDO8+3v8uMpkDIE+1odSNXUa+t84ER1VlbBS6BIxIsSraC5OWhF2i0G+E8XaYdb4oVV iFkIAWd7lMJY9N0GBFnAGFOA02ASXLLHPn3vJ2Kv/nQ5ArY2YAEf9Pf3synjA1sddvBnLK kwKIG4OrrO09oeAgtfe0bx4bf8TXf20BJcizGtkXA6fGXg+mJIPithmePrQhLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h9KU4x0oABOojL+/8XxB0D11Janu0lKrhTD4inla59Q=; b=n/seYHzgH89R8dZYVRArmLTcoX1Q/9ASa6gt+BIivJ0cJrpeRIWPdr2PBNlkb2whjoVKhS H1+S7crO0A/NlHiCIZ+Xpi1v+XdMzpADN+I+Qs0cjhz6Rhw7LHdKQlUgrblFaL4X6Iwrse povN/zr9GdeCKLYPg/G6DciCUIaKFAxX7FqMYej/comlo+SPc15F0tvT2o7ILI+JaEnj3V Cuhd3Q8yW+W3LlYLPgDULHYzb4z/jioBR3os7vZJxPgZ3ccsTS8rfOLh0rIzlm1jN1vPHH PSCeBNN87kQksDqDuxSwmIN7wmaUXOFDdPN7JqOy0YbWGaGcWiVYxNUZox9OmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029028; a=rsa-sha256; cv=none; b=vvVdeggu9CccEiwDlm5DnmOcWFsY1uBkOQSjg7StkcF6pkSKowNm8blilkkSOmVh5KFD/v zkwFDaoF7eMYsy+RnF0VWkkwb1uC3vsfOrKtPO6GlvsEl6RmXsrhW4LHT+DNe/TH9o2x3Q PMT6aDNFoltUunEsH8vDADVDcIV5EdCwduAm+KSt7HcpSmBpYNADoMU4ZDqEd4qC/VUjgn PHKsdMlmuHe+taZQbpwU/FL9EW2rSLeu+4vitGHj0T1qDmH04onRFltLNEutUZPEUd/Jkf q8LRv2VeciWFiKGu/8LKhOVPyTV6opMLxykpYdr9iKnZPLBkR9x+9cfDuEvhFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5J6J87zfJ4; Sun, 1 Dec 2024 04:57:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14v8L9095073; Sun, 1 Dec 2024 04:57:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14v8NV095070; Sun, 1 Dec 2024 04:57:08 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:08 GMT Message-Id: <202412010457.4B14v8NV095070@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 02905fab22a3 - stable/14 - nvdimm: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 02905fab22a315343909bd13bbb80dd1d0b601b2 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=02905fab22a315343909bd13bbb80dd1d0b601b2 commit 02905fab22a315343909bd13bbb80dd1d0b601b2 Author: John Baldwin AuthorDate: 2024-11-01 14:08:44 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:06 +0000 nvdimm: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47363 (cherry picked from commit 5c7af84925aa0916983551b0d470b461a70c0f1f) --- sys/dev/nvdimm/nvdimm_acpi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/dev/nvdimm/nvdimm_acpi.c b/sys/dev/nvdimm/nvdimm_acpi.c index 995e60e8b4ee..8a6cbc32ce5c 100644 --- a/sys/dev/nvdimm/nvdimm_acpi.c +++ b/sys/dev/nvdimm/nvdimm_acpi.c @@ -197,13 +197,18 @@ nvdimm_root_attach(device_t dev) return (error); } +static void +nvdimm_root_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_NVDIMM_ACPI); +} + static int nvdimm_root_detach(device_t dev) { struct nvdimm_root_dev *root; struct SPA_mapping *spa, *next; - device_t *children; - int i, error, num_children; + int error; root = device_get_softc(dev); SLIST_FOREACH_SAFE(spa, &root->spas, link, next) { @@ -215,12 +220,6 @@ nvdimm_root_detach(device_t dev) error = bus_generic_detach(dev); if (error != 0) return (error); - error = device_get_children(dev, &children, &num_children); - if (error != 0) - return (error); - for (i = 0; i < num_children; i++) - free(device_get_ivars(children[i]), M_NVDIMM_ACPI); - free(children, M_TEMP); error = device_delete_children(dev); return (error); } @@ -264,6 +263,7 @@ static device_method_t nvdimm_acpi_methods[] = { DEVMETHOD(device_attach, nvdimm_root_attach), DEVMETHOD(device_detach, nvdimm_root_detach), DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_child_deleted, nvdimm_root_child_deleted), DEVMETHOD(bus_read_ivar, nvdimm_root_read_ivar), DEVMETHOD(bus_write_ivar, nvdimm_root_write_ivar), DEVMETHOD(bus_child_location, nvdimm_root_child_location), From nobody Sun Dec 1 04:57:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5M3b7sz5gCjf; Sun, 01 Dec 2024 04:57:11 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5M1Vv5z49LL; Sun, 1 Dec 2024 04:57:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=auwXXZn25af32IpCHiarsHwwO3Dw6DOZC1GL4w6OAv8=; b=duTBYzlv8ugQ0cYo1JtaxZePHnGJUY3Qd2MRsxhBM88dQPApoh3rb0/cQ/7Dal5SyqKofc OLSG8cLaznVFA5VyGfJLLVTx2gpAasYx0RPS8AkxZlccvckQ5lE10/juv4CrnMiRJrz4Zt 6RwqbOMJLOSoUAmXdHCjernsXIf+VH0yRYnFtejyX9MSYUcFe0Z6j0zmuGrm2X6QWYw9tY wy+yzAbMtqzZu66jidD2nYjGRgzwtwFnxFbVY+Pah7mj1KCOWbxYsaZRUe1gz4+yt62wxj LF1n6ecdLhkyKcWU/zYot1L3A3Wi/X6F0yzKYsGO6Csrw/HPoAro2AqVMjKZyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=auwXXZn25af32IpCHiarsHwwO3Dw6DOZC1GL4w6OAv8=; b=hZ54PiwBnvVZaC29Okdt5YzpRl6b6NE/j1WZTf6SM1XxWIrlvpWtteKVxzDTghUtNKIiEi wlAvRWr1xayE6ScCsADtDSQHVC3NMd/KLUj6DzZg9c0+KIUGeeL61xCborBYvJ+WhTElvX 7Lfb8qBPPsC/5m27IzjiCeAz13ws6Bxv0fIBaUN0cBEmOa9NFi59SJK49fp2aznghkUHnN N5WISTUL17cwYNZtSzVhyjBFtK2AHX/Xpn0TdyOtUy8pygabP45meviyFkISPg5dFLl4+Q XO0NREsU19wbdZrsX+ar/9cONPGo7fLpI7hHAWHPpDG7UN+OQHaJ3U/NuUTMrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029031; a=rsa-sha256; cv=none; b=b7kcxKr6SS0p8fTQ4sXeWlqKdGsqxH6JKXIe59ssUIJM5daO3vYfPcPvXAdtHiI9xWlyLo Rox6d096kWkOJsXH/M1HDSVkDMOr+dz+Kj7swNeUdba+UuvZIWn6nTLQxipVaL5tnezLQv GIAm5+KDWXMAMmiDNJLs4TGIdpgjH7QWuQej/CbysQr+rvr0ilSG0XstTvKw58BaaBoFIl wUZk9tQE3bH41C+rGEQ/a4R4CFv9jA06sjyJdeSoKsQLTHwr3ME7J2BFQvpawwGU65bUwu sNdWGOCn5/q9Zl6ePmnSczBfSKrN2BK5KNTUZAUyjigDbaE4wOnGEfvc28ZJDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5M15r1zfJ5; Sun, 1 Dec 2024 04:57:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vB32095187; Sun, 1 Dec 2024 04:57:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vB6a095184; Sun, 1 Dec 2024 04:57:11 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:11 GMT Message-Id: <202412010457.4B14vB6a095184@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8f1c955292f6 - stable/14 - msk/sk: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8f1c955292f617699c6daa859b8fa4815226f357 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8f1c955292f617699c6daa859b8fa4815226f357 commit 8f1c955292f617699c6daa859b8fa4815226f357 Author: John Baldwin AuthorDate: 2024-11-01 14:09:01 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:06 +0000 msk/sk: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47365 (cherry picked from commit 2ff5c85027356038969d03c2beb55b98db389b41) --- sys/dev/msk/if_msk.c | 12 ++++++++---- sys/dev/sk/if_sk.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c index ff9fdb96b745..9105dc08d320 100644 --- a/sys/dev/msk/if_msk.c +++ b/sys/dev/msk/if_msk.c @@ -253,6 +253,7 @@ static const char *model_name[] = { static int mskc_probe(device_t); static int mskc_attach(device_t); +static void mskc_child_deleted(device_t, device_t); static int mskc_detach(device_t); static int mskc_shutdown(device_t); static int mskc_setup_rambuffer(struct msk_softc *); @@ -336,6 +337,7 @@ static device_method_t mskc_methods[] = { DEVMETHOD(device_resume, mskc_resume), DEVMETHOD(device_shutdown, mskc_shutdown), + DEVMETHOD(bus_child_deleted, mskc_child_deleted), DEVMETHOD(bus_get_dma_tag, mskc_get_dma_tag), DEVMETHOD_END @@ -2047,6 +2049,12 @@ msk_detach(device_t dev) return (0); } +static void +mskc_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_DEVBUF); +} + static int mskc_detach(device_t dev) { @@ -2057,13 +2065,9 @@ mskc_detach(device_t dev) if (device_is_alive(dev)) { if (sc->msk_devs[MSK_PORT_A] != NULL) { - free(device_get_ivars(sc->msk_devs[MSK_PORT_A]), - M_DEVBUF); device_delete_child(dev, sc->msk_devs[MSK_PORT_A]); } if (sc->msk_devs[MSK_PORT_B] != NULL) { - free(device_get_ivars(sc->msk_devs[MSK_PORT_B]), - M_DEVBUF); device_delete_child(dev, sc->msk_devs[MSK_PORT_B]); } bus_generic_detach(dev); diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index db5588047385..789a5911ea2a 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -185,6 +185,7 @@ static const struct sk_type sk_devs[] = { static int skc_probe(device_t); static int skc_attach(device_t); +static void skc_child_deleted(device_t, device_t); static int skc_detach(device_t); static int skc_shutdown(device_t); static int skc_suspend(device_t); @@ -291,6 +292,7 @@ static device_method_t skc_methods[] = { DEVMETHOD(device_resume, skc_resume), DEVMETHOD(device_shutdown, skc_shutdown), + DEVMETHOD(bus_child_deleted, skc_child_deleted), DEVMETHOD(bus_get_dma_tag, skc_get_dma_tag), DEVMETHOD_END @@ -1738,6 +1740,12 @@ fail: return(error); } +static void +skc_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_DEVBUF); +} + /* * Shutdown hardware and free up resources. This can be called any * time after the mutex has been initialized. It is called in both @@ -1796,11 +1804,9 @@ skc_detach(device_t dev) if (device_is_alive(dev)) { if (sc->sk_devs[SK_PORT_A] != NULL) { - free(device_get_ivars(sc->sk_devs[SK_PORT_A]), M_DEVBUF); device_delete_child(dev, sc->sk_devs[SK_PORT_A]); } if (sc->sk_devs[SK_PORT_B] != NULL) { - free(device_get_ivars(sc->sk_devs[SK_PORT_B]), M_DEVBUF); device_delete_child(dev, sc->sk_devs[SK_PORT_B]); } bus_generic_detach(dev); From nobody Sun Dec 1 04:57:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5P1hhbz5gD2y; Sun, 01 Dec 2024 04:57:13 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5N2Nvlz49Qv; Sun, 1 Dec 2024 04:57:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dKZpe5xddoEwYadL6M400zVxoaevUpFFiO7DJxRANz8=; b=O1vlOEvX73AzFth536J9ZQPSf3s5i8ZQY6AAXIX5EueToYCfg3VvRp0ULfEIVFz+RNBxHF 6s2zDx66Tj4cvh8jv5UfolBQzyfWVvAsipDxWTkBGKy1jux+ECZUlmllAshr1VL8oiMRfz p+sOIdoT/+vaX00AWrl+OJFXCQWI04ZPAmRBDxihfJHeON+0klDnazsdXq4cUUAuq012aC m6I7jMe4DiKscO0YOFztoS6pGKAp6Zd23kLbQv4vewq1F+AqA8F1bGIwDGEhlktuTwZg2v QSUG/QHyj7No2e06rLBLmNu4BkOZxofMNe5MMc3RODJni1mQCqAcFv/E0zqzOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dKZpe5xddoEwYadL6M400zVxoaevUpFFiO7DJxRANz8=; b=MsXAx8clDzBjwep9/lvsUm1gkALu4n3wSNAr42UZgfvFwM/poyPjAZmYNDfpzxGmmFePnO pcqI4/2th7cOOnorhqvhv0gqphFZZ2+VL/aIPl3D3X7ecbd8K3YIgThxZapSHfSj1KGz/3 IPXDpfSqfk6rSqlnK5LEWKdq49KHqn69gpQ8Xy2SFfNVoXbcpca821kK1oWT14D2bzEyND 2jLWFynSAqpsathz5HhMfggQnaf797fe5lfbTbn+H2ea6rm9PiKdDRPKo8COP4qYRpo9xs QVljf3KJFJG7+14BTlSTrb7oWTbfK8TV4CH/OCxCVw8O8TCI11frVdpwD6iL6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029032; a=rsa-sha256; cv=none; b=fEgojHNt1fHTbiOt9ec1nro9xrsScMtV4BLNQaiIL2mth43dHwYr03fs52jvXSuO6KDyVA 3Za/EZZ1Ixh1Ag6FpzUqVBHttcLyS4/kjnP5mzMmR0wJrCtCj3qtKUWOQv1L2DcuwQxkMa Cd9I68NG1xgaxIEhzqH7REfgMJCh+fnvQRxtE98B9mPUZAYAn/xjqwYyAR3aDO0sEbuT5U YXKN9haGSLOHqup48pa+lfIYNqSyCV+FoH1Kr8CPgzy5VJ5zxxHJVrrDzX3H9iyU6AL1Kx /svy/KKDiUbV37tJYyy92tAhOevXPvblvTrOs/TSADgtK1u8/1et3C/liXfZ3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5N21G0zfQr; Sun, 1 Dec 2024 04:57:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vCcX095244; Sun, 1 Dec 2024 04:57:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vCfF095241; Sun, 1 Dec 2024 04:57:12 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:12 GMT Message-Id: <202412010457.4B14vCfF095241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bfe10b7712a5 - stable/14 - superio: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bfe10b7712a5c3ab7511f0714c82fb6a022c2450 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bfe10b7712a5c3ab7511f0714c82fb6a022c2450 commit bfe10b7712a5c3ab7511f0714c82fb6a022c2450 Author: John Baldwin AuthorDate: 2024-11-01 14:09:21 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:06 +0000 superio: Use a bus_child_deleted method to free ivars for children Previously these ivars were leaked. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47367 (cherry picked from commit 2520675d3f0ef9039049fd67481f013b36f250ee) --- sys/dev/superio/superio.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/dev/superio/superio.c b/sys/dev/superio/superio.c index ff05d378ce92..b8797d1bab0e 100644 --- a/sys/dev/superio/superio.c +++ b/sys/dev/superio/superio.c @@ -769,6 +769,18 @@ superio_add_child(device_t dev, u_int order, const char *name, int unit) return (child); } +static void +superio_child_deleted(device_t dev, device_t child) +{ + struct superio_devinfo *dinfo; + + dinfo = device_get_ivars(child); + if (dinfo == NULL) + return; + resource_list_free(&dinfo->resources); + free(dinfo, M_DEVBUF); +} + static int superio_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { @@ -1079,6 +1091,7 @@ static device_method_t superio_methods[] = { DEVMETHOD(device_resume, bus_generic_resume), DEVMETHOD(bus_add_child, superio_add_child), + DEVMETHOD(bus_child_deleted, superio_child_deleted), DEVMETHOD(bus_child_detached, superio_child_detached), DEVMETHOD(bus_child_location, superio_child_location), DEVMETHOD(bus_child_pnpinfo, superio_child_pnp), From nobody Sun Dec 1 04:57:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5Q6QJpz5gDDk; Sun, 01 Dec 2024 04:57:14 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5Q4XKKz49GF; Sun, 1 Dec 2024 04:57:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QsUUUlLI3FaWQBN7bOSGVy8fPj9c0PEkRdzXjLqpI/k=; b=j+Pq6NQFKb5NblyXg2xi1S5YE4MifOt/x1274BHrZyeEvbVhOIEHJNQoXhHvEsSxpgVMVG HZvpy0d9MSTk4lKnDzCoPBF/1ElhMRPBSDi0dSmIfOVnXUmAziRfIFrglNrBztUVlBPnZm MV5/jwytS0pjvKfOrUXNRss0DE8NJkAvky3hVynSLqKNBBvcW+WNhPpjpGHIN8YQy/8CV6 Rf+hyRy7XyB3lbUFFytl/CrrbcEhUvjYUs9URBN40shW1EtXgW4oxs+MT2UzoznQhB+cff cZeicQryVFDIA1gF1UgkvrBlgJWmqY8rx5FBBWWdUfs2rHcqgkEja2MN0l5y+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QsUUUlLI3FaWQBN7bOSGVy8fPj9c0PEkRdzXjLqpI/k=; b=hRHC0VQ5mRAve+0P0/jgeYz3yPdw3Xsz0nep61udowC4ZsNJVzBvLCZPyTA7zXRYMttHjq iO7wSarD9OZZ0juyJigYj11O6ommT/Yy+g8I0X/lUl6ZiwK3ob90hIQ1thNoiXlRnYGu6u LS1y79m7SpUI5i8SfOeVYrSvT4/LLWn/kTcYYsOZfddJR6do0LySYQdSIlXbEo9N36YPPq gSzoBZ44zJe2f08QCQklI4hdQu2DyAk5jALWtX/WBl2cnK746Kukkj1H/6xu2uE7UFMOj2 TuIBfMP4xcFmm3NV5adr3R7XfM8/2xbIJmOom9zOG3qR6PdlZFCvXA7vueiLvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029034; a=rsa-sha256; cv=none; b=lpP3/BWsYZTnJLGUVEbkJ0MisjVhrM9yvQAj+HeqXDgjsu8yZQvSff4QWqbpTFUL2iEEBU diiPf76/Vy6rEHB8KEokh1RhokUFhZx8CsllyyhopMaLfNtYsxk0duXqjU4hN/hFYNXMuH aSDGANJhn/A9uffckF+vlvX8VlZuuhwslLekOz9ZXR6Lj5qPvzO0ZTc5cfUZvjuFgjwRlw 76U44m1ZN04Ys0b3jBXyclgev8LkSkOZpsC1xgZi6eTN4j895Prts34glbxyUAhVM0hfHs FIP+ShOURowOtDhutHm6S8yLcutGtBNR/8Gg+OiWKDQnu/FboYOkbKULti58sQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5Q46hHzfLH; Sun, 1 Dec 2024 04:57:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vEl3095380; Sun, 1 Dec 2024 04:57:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vE7i095377; Sun, 1 Dec 2024 04:57:14 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:14 GMT Message-Id: <202412010457.4B14vE7i095377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 9daf43bd4586 - stable/14 - gpiobus: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9daf43bd458607d47729913d8c39c8668ae7cbe1 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9daf43bd458607d47729913d8c39c8668ae7cbe1 commit 9daf43bd458607d47729913d8c39c8668ae7cbe1 Author: John Baldwin AuthorDate: 2024-11-01 14:09:39 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:06 +0000 gpiobus: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47369 (cherry picked from commit c9e880c0ceef9541625c18add3f5a8499137e016) --- sys/dev/gpio/gpiobus.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c index 674a04bc401b..db18703606aa 100644 --- a/sys/dev/gpio/gpiobus.c +++ b/sys/dev/gpio/gpiobus.c @@ -575,9 +575,7 @@ int gpiobus_detach(device_t dev) { struct gpiobus_softc *sc; - struct gpiobus_ivar *devi; - device_t *devlist; - int i, err, ndevs; + int i, err; sc = GPIOBUS_SOFTC(dev); KASSERT(mtx_initialized(&sc->sc_mtx), @@ -586,17 +584,9 @@ gpiobus_detach(device_t dev) if ((err = bus_generic_detach(dev)) != 0) return (err); - - if ((err = device_get_children(dev, &devlist, &ndevs)) != 0) + if ((err = device_delete_children(dev)) != 0) return (err); - for (i = 0; i < ndevs; i++) { - devi = GPIOBUS_IVAR(devlist[i]); - gpiobus_free_ivars(devi); - resource_list_free(&devi->rl); - free(devi, M_DEVBUF); - device_delete_child(dev, devlist[i]); - } - free(devlist, M_TEMP); + rman_fini(&sc->sc_intr_rman); if (sc->sc_pins) { for (i = 0; i < sc->sc_npins; i++) { @@ -700,6 +690,19 @@ gpiobus_add_child(device_t dev, u_int order, const char *name, int unit) return (child); } +static void +gpiobus_child_deleted(device_t dev, device_t child) +{ + struct gpiobus_ivar *devi; + + devi = GPIOBUS_IVAR(child); + if (devi == NULL) + return; + gpiobus_free_ivars(devi); + resource_list_free(&devi->rl); + free(devi, M_DEVBUF); +} + static int gpiobus_rescan(device_t dev) { @@ -719,7 +722,6 @@ static void gpiobus_hinted_child(device_t bus, const char *dname, int dunit) { struct gpiobus_softc *sc = GPIOBUS_SOFTC(bus); - struct gpiobus_ivar *devi; device_t child; const char *pins; int irq, pinmask; @@ -729,19 +731,14 @@ gpiobus_hinted_child(device_t bus, const char *dname, int dunit) } child = BUS_ADD_CHILD(bus, 0, dname, dunit); - devi = GPIOBUS_IVAR(child); if (resource_int_value(dname, dunit, "pins", &pinmask) == 0) { if (gpiobus_parse_pins(sc, child, pinmask)) { - resource_list_free(&devi->rl); - free(devi, M_DEVBUF); device_delete_child(bus, child); return; } } else if (resource_string_value(dname, dunit, "pin_list", &pins) == 0) { if (gpiobus_parse_pin_list(sc, child, pins)) { - resource_list_free(&devi->rl); - free(devi, M_DEVBUF); device_delete_child(bus, child); return; } @@ -1064,6 +1061,7 @@ static device_method_t gpiobus_methods[] = { DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_get_resource_list, gpiobus_get_resource_list), DEVMETHOD(bus_add_child, gpiobus_add_child), + DEVMETHOD(bus_child_deleted, gpiobus_child_deleted), DEVMETHOD(bus_rescan, gpiobus_rescan), DEVMETHOD(bus_probe_nomatch, gpiobus_probe_nomatch), DEVMETHOD(bus_print_child, gpiobus_print_child), From nobody Sun Dec 1 04:57:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5P4MBMz5gCjk; Sun, 01 Dec 2024 04:57:13 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5P3PDkz49NW; Sun, 1 Dec 2024 04:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96Ua9PKI18USscJBoeSXTDGYCB9mnBCMjc4rYeXcHaI=; b=tVJQ/XLPRqK8JR0Tw7zh5thBhM6e9e7l/ZBb5PqzCd9s3yZO6Abn6xAkld7QhHF2j7seoA lXMlp/zPbRYvycA/VH75POgKJoOBlzaSUbhnIEVgXpYIRQOyv/nW17nXRTbPk0Ll1J/FVh Vn+GuT7EP7IxMKxinmMQQ4EsFcVGtOZ22S2mzAfLU62LvjC+Nv4UQMq2nFeWrzm4iT8H3Q S/jb8RIpJKgKn/m+UiwnJHqrNGw9i3Ut3fMlsRFFzpVI/lP0wn0B90HNNeVNLlTkI6JFWi cwYGYuCi32meniDLvD1pcGRcJMhkZUkYiNrW1XqPyvDpSMzVQ0iZlXxpt8KuXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96Ua9PKI18USscJBoeSXTDGYCB9mnBCMjc4rYeXcHaI=; b=mc1lny8z2gwh+N8Yh4EAPFmksI7y0OepsLgv/iVPHpgwnrkGBCeKC/NOvuLuZgHaVjT3Lp kafGc/BkfkT1i5Z7nwu54YJwHZGKXfnC8hVZHfPgD2SJDjz7rAhk4dD1zCKo3egiHACK8K 6YkdRUvqCpw6Fhv0AavQpW9PR6jT4DrJIceUel/Y78lpD+XK9joWK4HfiZClqhrShmdMkb tQhdebOWJCIPsGU5msbiMmaMjGTS92QbxEK1A9VGkC+0Vg4dAcM7YRXwyTfkHnezlW5CUx nVivAt/XDtJBEtMBI31LpIoIFN9cpPwR09A0rdhVy2KfuEl1CVBM2+XE1Ve+OQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029033; a=rsa-sha256; cv=none; b=mq6YlVC6OWk1+lYJr3/x35VzdayRRK4rPuilmqIjvUvgLicOJvIbX6D0raFuC3OSoviYds LVI2kcDqx95MPt9WOdS85o0iShaQRDoQ4U8TuUoxMJ46ADxNPeH35Cdo4IW3r75VYIyVqw FrMefFSW4QeK3FshGow2iQaFK184lE6IwSGLr8j0geT3IcFprqXnwcRv8174OF9XzBGj8y mTT+9Z4qWrrtpCTACqYUhLo+OkrMq8IUGZ8w02GDBVVIhQj3yXY8HdqJuTqKkCHfhet0rS oGziEA9h1Jgc0/Z7lwgGzCFWZeXo5i233lFo+QICV9lTuX1FsP0/KYehsPUSJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5P30DTzdwZ; Sun, 1 Dec 2024 04:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vD0A095321; Sun, 1 Dec 2024 04:57:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vDnH095318; Sun, 1 Dec 2024 04:57:13 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:13 GMT Message-Id: <202412010457.4B14vDnH095318@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 047c1f1b08e7 - stable/14 - isa: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 047c1f1b08e7c147d1155721eeb068be996d7b91 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=047c1f1b08e7c147d1155721eeb068be996d7b91 commit 047c1f1b08e7c147d1155721eeb068be996d7b91 Author: John Baldwin AuthorDate: 2024-11-01 14:09:31 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:06 +0000 isa: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47368 (cherry picked from commit c8fa54882226d89e987fb26b94979aed85a3bd9a) --- sys/isa/isa_common.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index b6f99a0922e5..511c85b05366 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -622,6 +622,12 @@ isa_add_child(device_t dev, u_int order, const char *name, int unit) return (child); } +static void +isa_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_ISADEV); +} + static int isa_print_all_resources(device_t dev) { @@ -1060,6 +1066,7 @@ static device_method_t isa_methods[] = { /* Bus interface */ DEVMETHOD(bus_add_child, isa_add_child), + DEVMETHOD(bus_child_deleted, isa_child_deleted), DEVMETHOD(bus_print_child, isa_print_child), DEVMETHOD(bus_probe_nomatch, isa_probe_nomatch), DEVMETHOD(bus_read_ivar, isa_read_ivar), From nobody Sun Dec 1 04:57:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5S2BRBz5gD8M; Sun, 01 Dec 2024 04:57:16 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5R5hLVz49WP; Sun, 1 Dec 2024 04:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x4Zeec0Y8hTD1EMDb5HWgrFp7By3pejv8y7k/e8V8js=; b=CxEk8FHzhK0dci2JHNWcA2pBMsvwUbbSFmkQ0ZEg9D+T3NpkumrLt+++gl4+xWNgvpXgZM 72n5GuKhxdF0ZBzeEw+g34oSPKhST5zR9e4RpC0qI96WFFzkmn4gSYW9twRahEMA12RFwj TaCFyEa/bRW4DuQVOQkgSadgn9IxeHaZELKUIWXLMmFEMV/UoD4zpIjUVFon7Ka6wOjfa3 R9xTu33MKWj8KIE6sTcSpQh4P9AtluVl+JrML2Eeh9TOEbMuJEoxIOLiY7KpdwZbDfXBXW 4ex6wfmPBeSjmTlijHXtXxWx3PNjye/OvaWQi6pN72yuxzJoOL6lI49dM4gpuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x4Zeec0Y8hTD1EMDb5HWgrFp7By3pejv8y7k/e8V8js=; b=gnB1UoVMMcw/WkSwh8bzLrXeMbSWuwJFU6pXzz8n3VxJGGGRGPdu264JC7W4YPH/lrYx00 WKzGRfn/05+PdBjqJuJHinvgnr3JN/kJWnZ6t28tMKJQWtScyk5GMG6DOCI7AOj6GQ3wKp TIXTb7fshw3W6wlM00HL8xzvm9zf41qJ1TG/OoOSP25jPRIqN2q7PrVZqJTv+oUi9bJlm/ Ddc9qMnm9KYL+KHz834US9KOUcFPo6CtGawC5ifdLyYjUuDXH5GR9Bl65Bvqgt9J7AQnPE 6eNmU9jtlOsk8j07KcFe/4ppyWXdXWPZINqVVanxf4PkwFhVtWxu1S7b7RuvkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029035; a=rsa-sha256; cv=none; b=g3fSoKnJ6fySe5ICmFcECUCiXvpJVNrvRRvd41XqL84yTkbSaiJsG0y4EwwDin3LsaL9SC 6tI7TX7UtkyHYVmuiLlrOKbdxp1QskKoZOvBJ9eO+xSqmi3GQqqFMqK0foqQcn1XYHBVt6 xxjzGPu/fVreljtiL7Fae0SUeu5bioGXdgt99X62RmR4qW2x95pQrw7p5KFvGqBiL7rE9O pGUIUMwzePmHNxG49zKf5YYltQxBGD415M8s5ba4j/YQ6tq4Vowkc8hHXyx8+vAvKVO4fx cZxWdPQb6Mm5eVwwnoKr3QeynjtWCx3koZxQ9EMg/i84dYAMAYwiMuYBqarf1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5R5JpJzfLJ; Sun, 1 Dec 2024 04:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vFLU095437; Sun, 1 Dec 2024 04:57:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vFoJ095434; Sun, 1 Dec 2024 04:57:15 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:15 GMT Message-Id: <202412010457.4B14vFoJ095434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: af26e45173a1 - stable/14 - iicbus: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: af26e45173a170f6c02f5757a15890b320aae251 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=af26e45173a170f6c02f5757a15890b320aae251 commit af26e45173a170f6c02f5757a15890b320aae251 Author: John Baldwin AuthorDate: 2024-11-01 14:09:50 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:06 +0000 iicbus: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47370 (cherry picked from commit 9c99ba9a0677a7b5c3c578c430211dafb4ad0dd5) --- sys/dev/iicbus/iicbus.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/dev/iicbus/iicbus.c b/sys/dev/iicbus/iicbus.c index 33fb5c875c50..f48338865e0a 100644 --- a/sys/dev/iicbus/iicbus.c +++ b/sys/dev/iicbus/iicbus.c @@ -248,6 +248,18 @@ iicbus_add_child(device_t dev, u_int order, const char *name, int unit) dev, order, name, unit, sizeof(struct iicbus_ivar))); } +static void +iicbus_child_deleted(device_t dev, device_t child) +{ + struct iicbus_ivar *devi; + + devi = device_get_ivars(child); + if (devi == NULL) + return; + resource_list_free(&devi->rl); + free(devi, M_DEVBUF); +} + static void iicbus_hinted_child(device_t bus, const char *dname, int dunit) { @@ -360,6 +372,7 @@ static device_method_t iicbus_methods[] = { DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_get_resource_list, iicbus_get_resource_list), DEVMETHOD(bus_add_child, iicbus_add_child), + DEVMETHOD(bus_child_deleted, iicbus_child_deleted), DEVMETHOD(bus_print_child, iicbus_print_child), DEVMETHOD(bus_probe_nomatch, iicbus_probe_nomatch), DEVMETHOD(bus_read_ivar, iicbus_read_ivar), From nobody Sun Dec 1 04:57:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5T1Jfkz5gD68; Sun, 01 Dec 2024 04:57:17 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5S6mMFz49cZ; Sun, 1 Dec 2024 04:57:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cqiEXCH8h6qEdYclJvosO9Ikw79NCozHuDZfHzFjTZk=; b=aVdlvXJVQ7/34hNeg4rILqaFXnBl8iSKp273dmDEGo5z7Yjeogwgskdd8YTBZcyzA884tF 8CJR3Vf9/se9M9ju8AHzBKGUlVYMDiIvxFlxOGqMAsRUYeEoknzaRkktVO1MopS4jFPEhj 0UFRelxRZDCQIAP070DnTsSUGWZrwVxnF1ejNTkMO89tA9m7Ul/oDtdHQNZQboMN3klD7+ hcpPjmMF2AZz/HHYtmJhWtgHftJ73PUBLaJO3hC5JQQcYKetGI+mr8zz/do1FjVQwA9zK3 9R+JJp+5kyt1rQvlL6XqS3kSVrjvmkhgQNsTk29rwQelCTnWCsKzS2EMhoDKYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cqiEXCH8h6qEdYclJvosO9Ikw79NCozHuDZfHzFjTZk=; b=IMrejYqYR60XgnO661/Y6CJmSsJGqzIWbB6QGzzWim6kd7k/CRMorZg4AM2jLvBWQpCC5A TFJtPZaQ9/kdrSm8feFZ78Iu3zFdTGExYR321lMIRZhsyFtvsSnHH/gQN6LMmPOIK5M0pO vC4qbppDkf0D4nZGEuxH6Nz4vJXpsoEZG8YFEd1GVIKN6eniQvXn0HfR41tu6CDutrGBbi efJENpLbKac0VI9ozdAJinzHJ9z2P5hiyuzH2Xi4kYGJfxFdSIalI92VRPxCNALleXOkuh 1yfGHnuJE3+U1H6wmV95E8qlJyxI2xIFIMw10reJEs5XTLEJWRhFJattKqiaxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029036; a=rsa-sha256; cv=none; b=NaHZbzSH/Hw6+BDDaCX9Sup9sMMAMKq7bG4yMMc/MF8/a+/gDkK8pZQN2B9Nlheg+NHX2J sFEqxecysPlpE+vg44pf2zPrkObKqU7RVnuDqWxGljNk0ZtRIOfTQrsR22noChlQg5M+rn nPq+oaIZUvrBXYMwDIC06fQvRD/ylpJr73oYUwl+dPmdE+XjAKQOqeexku8Z1fn12IUdUy NRA/N7jQDdEEtXeLr7L2RF0O5/vP2356j55majK71YCVOA47UFWLs6QP355UYIIA5F7hXr UA3GYM2dyownmTxhleKXNOzOAmWthEFot8saiswyozyiJFW/3YBtfajZNH6uTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5S6NdfzfQs; Sun, 1 Dec 2024 04:57:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vGGb095502; Sun, 1 Dec 2024 04:57:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vGZP095499; Sun, 1 Dec 2024 04:57:16 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:16 GMT Message-Id: <202412010457.4B14vGZP095499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 69cfc0c25d13 - stable/14 - miibus: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 69cfc0c25d131fc46617951a23f794032dd365d3 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=69cfc0c25d131fc46617951a23f794032dd365d3 commit 69cfc0c25d131fc46617951a23f794032dd365d3 Author: John Baldwin AuthorDate: 2024-11-01 14:10:01 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:07 +0000 miibus: Use a bus_child_deleted method to free ivars for children If a device was detached (e.g. via devctl) and then re-attached, the ivars would be freed by the previous bus_child_detached method during detach, but device_get_ivars during the subsequent attach would return a stale pointer resulting in a use after free. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47371 (cherry picked from commit dc569c894207a524b0cb542040b35b0edd57d1c8) --- sys/dev/mii/mii.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index 83c8aafdf9fb..0ca779a9311f 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -58,7 +58,7 @@ MODULE_VERSION(miibus, 1); #include "miibus_if.h" -static bus_child_detached_t miibus_child_detached; +static bus_child_deleted_t miibus_child_deleted; static bus_child_location_t miibus_child_location; static bus_child_pnpinfo_t miibus_child_pnpinfo; static device_detach_t miibus_detach; @@ -84,7 +84,7 @@ static device_method_t miibus_methods[] = { /* bus interface */ DEVMETHOD(bus_print_child, miibus_print_child), DEVMETHOD(bus_read_ivar, miibus_read_ivar), - DEVMETHOD(bus_child_detached, miibus_child_detached), + DEVMETHOD(bus_child_deleted, miibus_child_deleted), DEVMETHOD(bus_child_pnpinfo, miibus_child_pnpinfo), DEVMETHOD(bus_child_location, miibus_child_location), DEVMETHOD(bus_hinted_child, miibus_hinted_child), @@ -167,7 +167,7 @@ miibus_detach(device_t dev) } static void -miibus_child_detached(device_t dev, device_t child) +miibus_child_deleted(device_t dev, device_t child) { struct mii_attach_args *args; From nobody Sun Dec 1 04:57:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5V2tZpz5gD8S; Sun, 01 Dec 2024 04:57:18 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5V0HPqz49V1; Sun, 1 Dec 2024 04:57:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TjVn6gm64HatXWc8RMVw2SGNxaaA5J6+IpSrp6LD3l4=; b=c+QJpQF84mQPY4LWXMDdhTWtinH2gwUibUiSaRGS0TunrONOObUHvRnDTauJEJq/Rs2kNd vrJGvzsaFMe/wecdCvyRdMammQ++oe7ZLSaCGOIl/9elyNuCSbmWiZbxdKxI0kvUIefXhm Z0RoGyNgk43rMtY7YhOxTes0M/daaM40HP2fV33uvFCcEuVDjDnNG1YjMAHJ0uwdiIpePc DEZiBNKYTcA31KstYTE3pYMS8hSpoVhwQZ/jCS+SsOzmr99uhv4Uy6jmAJX62asloqqNWb rvlbA7VCjBv0yE/NOKTBmvxLoVtkYcHMot1C523Z9YU0OvOzXiCBhnX//cX0Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TjVn6gm64HatXWc8RMVw2SGNxaaA5J6+IpSrp6LD3l4=; b=hjG2uovRFSQWeqY1kYuPjKs8FYhdqaIFChH2LuF+Af/sE2jyuUfnqPPg1YLHnlWTEQXahm 44PbzRCQLSBU7wO4OvnUKlgW/6wKlwjeKQgzrMqrc7wzT7WykD2Day8ZDpPI6P0ZjUzDmL ghcNVXHdr0PNyztc19WI/ogKAktKbM+wgWGiNmEL7lWybsgqkpu0RbDQwFneIe4aeqr09A f0QUg8uw0fO1dApH16Hfw4pO76/smfu/K9z7MMQ32fi6oeqMgT0Wv2Dm8EQa79W9NstNjH oWawV7wLRn8Izz65JVCguDkvBh+WOb3VOXiSQOXAj91lic6W2l4FtDksRxhMDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029038; a=rsa-sha256; cv=none; b=pTRUy5ajvHUzhiul2ahS+/aLPDjeaH/umEPRyPz+8y17WIVo2oN/h2P8SmR9uFsQ7RwEqw OygP3IRcg7FPIjqLDwRg/xcve/kxuxPpunbr2Wsh4b/cK/3GoCBSfGS4EXudOPjkOi5efh yze+MX9Lk7d0hWXcWIJDX6JtbX/ehi7JGmwr7GRuO9mw/rXyYkQN8h7MBWAjcoq18Yvq9Y vFZTUQg/8k1wQBoVhYfvsPEaPXkfGuqFm0QXtynNs4JJLhV1quaxpV7L59AmXDGUY0Wp3v shTgubCQN6VN3Xi6C0fuGWUIofrxpByDemv6nzc/q9YuI5ElcSISNcDe+ouspQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5T715QzfQt; Sun, 1 Dec 2024 04:57:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vHMg095559; Sun, 1 Dec 2024 04:57:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vHs8095556; Sun, 1 Dec 2024 04:57:17 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:17 GMT Message-Id: <202412010457.4B14vHs8095556@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 87bb96bb4788 - stable/14 - smbus: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 87bb96bb4788cc33c1a9b19671bdd0884acc5152 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=87bb96bb4788cc33c1a9b19671bdd0884acc5152 commit 87bb96bb4788cc33c1a9b19671bdd0884acc5152 Author: John Baldwin AuthorDate: 2024-11-01 14:10:10 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:07 +0000 smbus: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47372 (cherry picked from commit 03f641f9b1d82b7369c8988afbd75a32d9913aaf) --- sys/dev/smbus/smbus.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/smbus/smbus.c b/sys/dev/smbus/smbus.c index 074530081049..3d0f5fe65464 100644 --- a/sys/dev/smbus/smbus.c +++ b/sys/dev/smbus/smbus.c @@ -113,6 +113,12 @@ smbus_add_child(device_t dev, u_int order, const char *name, int unit) return (child); } +static void +smbus_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_DEVBUF); +} + static void smbus_hinted_child(device_t bus, const char *dname, int dunit) { @@ -223,6 +229,7 @@ static device_method_t smbus_methods[] = { /* bus interface */ DEVMETHOD(bus_add_child, smbus_add_child), + DEVMETHOD(bus_child_deleted, smbus_child_deleted), DEVMETHOD(bus_hinted_child, smbus_hinted_child), DEVMETHOD(bus_probe_nomatch, smbus_probe_nomatch), DEVMETHOD(bus_child_location, smbus_child_location), From nobody Sun Dec 1 04:57:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5X44kmz5gDDv; Sun, 01 Dec 2024 04:57:20 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5X227Qz49L1; Sun, 1 Dec 2024 04:57:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oerbNATS/qFM4VkIlDq3vnjTPBGkWVJrEcfaUVqARjk=; b=hJRF/y5A9kyWvmu0KCsegv3PCf03ReRk0+SfQOOSr1YMQq4cOh266AdT4TKjZTID3X8wqs bIz/nyYTnGxF2xZVXCINkekiIGWHy8oykvxsFIQ5ZrGcRLf8uzMALmbX0b+wUBVORwt4h6 lKkgimgA+HTpwRaR8jfczblPsjEvUO4qXPuG9x8trjiqKq4jLnOHKDUR7+ztdkYkHFIAri N1GNr2S7gA+EXRyS+BynyRJgXZ4QP4ifYlKnFwqYYCfawoRhx9JkliSVb93OOu2U9Zi3r/ mE73jPa6piRezSxBfLqOJ2gjoU35rSX4hji4hNs6R/oFqcuTpYw7I7/k+DGmdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oerbNATS/qFM4VkIlDq3vnjTPBGkWVJrEcfaUVqARjk=; b=h3tnDpSKYcYqvVxauxdPc1Z+gqvmIC9rCb6iHpwSBil+LN3hXRAie6us3bydfnQvoH1i1C mWDpwM9+AbWzRLd+hjE4SRF8/lv916Rd7iNq/k9upWfSioPS6JvZy3CovW9dTTvQQfmKyc eYfuLJFVWbj0vQ0I0asot1ExaPKoUNfCK2j1etEnGkB+THaCJ4bjFt9jDFPa83yJcCfwnG GjfaSh+6tKY/dpBiOV4Wea8duZ8vgK2raQhdsKjz4VbB3PQ+S11da+SRGfgZLFQblugZU8 L5w/qQvIqnhuTn9lGzv/eVq/k/Q+oqgoo6rXsIeC7KwulwR/0UvjizQXJ74GQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029040; a=rsa-sha256; cv=none; b=aEjRviMoXd0ynQb2+xMPO76RicxODJsiztjNG/uyXR5/+ibkUUQjnEv8Hmi2ZKRxUhC4ce z9VAXrXduUqimZZCQGW1Nbt/EhxOiQuJLF23bhPRwossHFlKUGL/jx1fQ029beTj4w4NgC P6lJAdNWehJZAvnsgyZFVS8t2L1nDg/rtzASUgMn2lyX7+fBNxzpiFvK93T/A5UTLU/gNM p3TFNTmtciNP9DYOmX3vcKcZ8nRuG3GGhR5XWAsc+UiJvXKs/+Da1yV8Q/ZyglOvXS5UtU AQkS7gDdZE8olQiu5pB5x7TUUhPZD9tsO1ZSHNGwRRQvnbZq2dIbFIy3uyJ2xA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5X1dJ7zfJ7; Sun, 1 Dec 2024 04:57:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vKPF095675; Sun, 1 Dec 2024 04:57:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vK8O095672; Sun, 1 Dec 2024 04:57:20 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:20 GMT Message-Id: <202412010457.4B14vK8O095672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f5641a80b7fd - stable/14 - x86: Remove invalid DEVMETHOD methods for leaf devices List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f5641a80b7fd20935c3c76854f2561c72f5137a0 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f5641a80b7fd20935c3c76854f2561c72f5137a0 commit f5641a80b7fd20935c3c76854f2561c72f5137a0 Author: John Baldwin AuthorDate: 2024-11-01 14:10:30 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:07 +0000 x86: Remove invalid DEVMETHOD methods for leaf devices None of these drivers are for bus devices, so bus_generic_* is not appropriate. Most of these were nops except that detach would actually "succeed" (but not do any cleanup). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47374 (cherry picked from commit df615735960370255d3acc4ac2a6f4fd297b7461) --- sys/amd64/amd64/fpu.c | 4 ---- sys/i386/i386/npx.c | 4 ---- sys/x86/isa/atpic.c | 4 ---- sys/x86/isa/atrtc.c | 3 --- sys/x86/isa/clock.c | 3 --- sys/x86/isa/isa_dma.c | 4 ---- sys/x86/pci/pci_bus.c | 4 ---- sys/x86/x86/nexus.c | 4 ---- 8 files changed, 30 deletions(-) diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index 8a0666fc0614..fb0b74433eaa 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -1069,10 +1069,6 @@ static device_method_t fpupnp_methods[] = { /* Device interface */ DEVMETHOD(device_probe, fpupnp_probe), DEVMETHOD(device_attach, fpupnp_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), { 0, 0 } }; diff --git a/sys/i386/i386/npx.c b/sys/i386/i386/npx.c index 122452598f29..33d17b10574a 100644 --- a/sys/i386/i386/npx.c +++ b/sys/i386/i386/npx.c @@ -1341,10 +1341,6 @@ static device_method_t npxisa_methods[] = { /* Device interface */ DEVMETHOD(device_probe, npxisa_probe), DEVMETHOD(device_attach, npxisa_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), { 0, 0 } }; diff --git a/sys/x86/isa/atpic.c b/sys/x86/isa/atpic.c index 556951d1b886..4ea80cfff7f9 100644 --- a/sys/x86/isa/atpic.c +++ b/sys/x86/isa/atpic.c @@ -599,10 +599,6 @@ static device_method_t atpic_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atpic_probe), DEVMETHOD(device_attach, atpic_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), { 0, 0 } }; diff --git a/sys/x86/isa/atrtc.c b/sys/x86/isa/atrtc.c index df0acdd499be..63f41d866679 100644 --- a/sys/x86/isa/atrtc.c +++ b/sys/x86/isa/atrtc.c @@ -639,9 +639,6 @@ static device_method_t atrtc_isa_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atrtc_probe), DEVMETHOD(device_attach, atrtc_isa_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), /* XXX stop statclock? */ DEVMETHOD(device_resume, atrtc_resume), diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c index a0bf60159e78..0ceca41790ab 100644 --- a/sys/x86/isa/clock.c +++ b/sys/x86/isa/clock.c @@ -637,9 +637,6 @@ static device_method_t attimer_methods[] = { /* Device interface */ DEVMETHOD(device_probe, attimer_probe), DEVMETHOD(device_attach, attimer_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, attimer_resume), { 0, 0 } }; diff --git a/sys/x86/isa/isa_dma.c b/sys/x86/isa/isa_dma.c index 827e04d930ab..041527231ccf 100644 --- a/sys/x86/isa/isa_dma.c +++ b/sys/x86/isa/isa_dma.c @@ -589,10 +589,6 @@ static device_method_t atdma_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atdma_probe), DEVMETHOD(device_attach, atdma_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), { 0, 0 } }; diff --git a/sys/x86/pci/pci_bus.c b/sys/x86/pci/pci_bus.c index d06cfca53673..ecca10dd2606 100644 --- a/sys/x86/pci/pci_bus.c +++ b/sys/x86/pci/pci_bus.c @@ -705,10 +705,6 @@ static device_method_t pcibus_pnp_methods[] = { /* Device interface */ DEVMETHOD(device_probe, pcibus_pnp_probe), DEVMETHOD(device_attach, pcibus_pnp_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), { 0, 0 } }; diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c index 9b05758a6cbf..7e3ffb174559 100644 --- a/sys/x86/x86/nexus.c +++ b/sys/x86/x86/nexus.c @@ -747,10 +747,6 @@ static device_method_t sysresource_methods[] = { /* Device interface */ DEVMETHOD(device_probe, sysresource_probe), DEVMETHOD(device_attach, sysresource_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), DEVMETHOD_END }; From nobody Sun Dec 1 04:57:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5W2wSTz5gD6G; Sun, 01 Dec 2024 04:57:19 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5W1NTCz49gS; Sun, 1 Dec 2024 04:57:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lCKMEuk5wR9qBc0KCuhzlURHexhFJzcCHpGBZ0aYfYE=; b=QlsO0vfejw7wGsdMK1NUefnJKM7amVh4zzrjNWnfoFooWKy1jJ78Fq7C5b2TTKW23g96/y ihYukDG0BsqIDoPAmd7jhGeF5c+HUaYpbOeadHz15DBgy34khQyABW8FcPiD10qLqBpzvv MENH91OjF1ujoYRLXwog2rptQkHJ9r+3r6bQ9UEkGi/mEv0T55ZVtblo0aRDvHjbRYKHv5 lEggiRPS7kXYbyu37c9eG/5b0u5bpqNz3YwH4/r9aroRvWy/7logBEjRImM8n52ZFkiMOK 77GWf6I158Ywaua9DUiUGKm1flN65MNHIDMTpzQ/i+59n+u03iVcMGmAk7JTow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lCKMEuk5wR9qBc0KCuhzlURHexhFJzcCHpGBZ0aYfYE=; b=bsFWbiwYeCqat+8tVV4Ja4SAVXG9QBdblhORyyLkZmumm/OqJkW0Lyxo+CjCdezpn8FiKY g8UwgQlcwMIcZapvYFFJfpPb3hAsdbNdr3sJexRdbu3G7joIu44yEwzLRSOgkOF8yJYKjD xzeqpMa5G4pTjfH02l9UneqZCX/oOEhnsVGNlUKS6biZ/UU6Uk8W0k3DPh+XJ/NvvXPF3b n0z3hzxcNvf+G7H7oJGPlU7jmv3lSca2W9vBYhpquw7q91N7Ruy37mfMRg4xt8FNYh1tMx v7Ys43SesiClvTsHsgjxRY+Wxj1eD0w1/CsJetmLCoRVGoCi+mg1AvAqp+s02g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029039; a=rsa-sha256; cv=none; b=l966we5XTJkvpGHYN5Lp90LH/U+0Eiwr0AnsRN9Y1eChSEN4Y79Lq2300zEKc24dF7+j/q 0PheuSDT5KTOwNvizFOOeNzrSEsF4Z/CET8nj1PrDlLVkdRCeMHjGuw6IqmRnT3VoFaZ4h 9VBB+yvrSw/IXAlS6LAUCWbl0IUmRSZoYnrZRI2vLymSuFQ5NTkxlv9PcDXZ2Oi7mstDFv l0fG7JNkFj3fa0t5mn942OO2QJCufPmeD+mNnWtf5DxAKCJsxUZ0qdHWYsrugSU0Ry7y5B qZPrkaSFg/BW+C8dO8AP2GFy4B2xo6PAJuRimMFZoSoaKD4PbIvGmHSDwHp+OQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5W107bzfJ6; Sun, 1 Dec 2024 04:57:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vJiU095620; Sun, 1 Dec 2024 04:57:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vJ0w095617; Sun, 1 Dec 2024 04:57:19 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:19 GMT Message-Id: <202412010457.4B14vJ0w095617@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 35c71ac2b6d5 - stable/14 - spibus: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 35c71ac2b6d5dc0d77755154cf8edddc1d4caab0 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=35c71ac2b6d5dc0d77755154cf8edddc1d4caab0 commit 35c71ac2b6d5dc0d77755154cf8edddc1d4caab0 Author: John Baldwin AuthorDate: 2024-11-01 14:10:19 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:07 +0000 spibus: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47373 (cherry picked from commit 84553ccd0c8b1fa5b3f0b5b70a42a244f26cea75) --- sys/dev/spibus/acpi_spibus.c | 1 + sys/dev/spibus/ofw_spibus.c | 7 +++++++ sys/dev/spibus/spibus.c | 13 +++++++++++++ sys/dev/spibus/spibusvar.h | 1 + 4 files changed, 22 insertions(+) diff --git a/sys/dev/spibus/acpi_spibus.c b/sys/dev/spibus/acpi_spibus.c index 7241ad15bdab..9bce45b93dba 100644 --- a/sys/dev/spibus/acpi_spibus.c +++ b/sys/dev/spibus/acpi_spibus.c @@ -561,6 +561,7 @@ static device_method_t acpi_spibus_methods[] = { DEVMETHOD(bus_alloc_resource, acpi_spibus_alloc_resource), #endif DEVMETHOD(bus_add_child, acpi_spibus_add_child), + DEVMETHOD(bus_child_deleted, spibus_child_deleted), DEVMETHOD(bus_probe_nomatch, acpi_spibus_probe_nomatch), DEVMETHOD(bus_driver_added, acpi_spibus_driver_added), DEVMETHOD(bus_child_deleted, acpi_spibus_child_deleted), diff --git a/sys/dev/spibus/ofw_spibus.c b/sys/dev/spibus/ofw_spibus.c index f9323ab342ee..3342bf874553 100644 --- a/sys/dev/spibus/ofw_spibus.c +++ b/sys/dev/spibus/ofw_spibus.c @@ -191,6 +191,12 @@ ofw_spibus_add_child(device_t dev, u_int order, const char *name, int unit) return (child); } +static void +ofw_spibus_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_DEVBUF); +} + static const struct ofw_bus_devinfo * ofw_spibus_get_devinfo(device_t bus, device_t dev) { @@ -217,6 +223,7 @@ static device_method_t ofw_spibus_methods[] = { /* Bus interface */ DEVMETHOD(bus_child_pnpinfo, ofw_bus_gen_child_pnpinfo), DEVMETHOD(bus_add_child, ofw_spibus_add_child), + DEVMETHOD(bus_child_deleted, ofw_spibus_child_deleted), DEVMETHOD(bus_get_resource_list, ofw_spibus_get_resource_list), /* ofw_bus interface */ diff --git a/sys/dev/spibus/spibus.c b/sys/dev/spibus/spibus.c index d72475a3fdba..95d3759002df 100644 --- a/sys/dev/spibus/spibus.c +++ b/sys/dev/spibus/spibus.c @@ -199,6 +199,18 @@ spibus_add_child_common(device_t dev, u_int order, const char *name, int unit, return (child); } +void +spibus_child_deleted(device_t dev, device_t child) +{ + struct spibus_ivar *devi; + + devi = device_get_ivars(child); + if (devi == NULL) + return; + resource_list_free(&devi->rl); + free(devi, M_DEVBUF); +} + static device_t spibus_add_child(device_t dev, u_int order, const char *name, int unit) { @@ -263,6 +275,7 @@ static device_method_t spibus_methods[] = { DEVMETHOD(bus_get_resource_list, spibus_get_resource_list), DEVMETHOD(bus_add_child, spibus_add_child), + DEVMETHOD(bus_child_deleted, spibus_child_deleted), DEVMETHOD(bus_print_child, spibus_print_child), DEVMETHOD(bus_probe_nomatch, spibus_probe_nomatch), DEVMETHOD(bus_read_ivar, spibus_read_ivar), diff --git a/sys/dev/spibus/spibusvar.h b/sys/dev/spibus/spibusvar.h index 338bacd82dcf..6a74f9b1053d 100644 --- a/sys/dev/spibus/spibusvar.h +++ b/sys/dev/spibus/spibusvar.h @@ -79,6 +79,7 @@ extern driver_t ofw_spibus_driver; int spibus_attach(device_t); int spibus_detach(device_t); device_t spibus_add_child_common(device_t, u_int, const char *, int, size_t); +void spibus_child_deleted(device_t, device_t); void spibus_probe_nomatch(device_t, device_t); int spibus_child_location(device_t, device_t, struct sbuf *); int spibus_read_ivar(device_t, device_t, int, uintptr_t *); From nobody Sun Dec 1 04:57:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5Y41y6z5gD38; Sun, 01 Dec 2024 04:57:21 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5Y2cFrz49ly; Sun, 1 Dec 2024 04:57:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tdU7Nw8ibQ7oQj2QVZEgfnpMIqMJUDxVp1+CvqcUSTA=; b=jaMU1nv+j7+BQAWClbnDPyNGpImg4uHzU6GQ+SSX+BxV0T7GZlNRxCoRCZ0Pd7h/cY40Hq ciLQ15+AfRkus0d14wZA/qd9sQOpo1N+MUA8W8kh8odw38pwuSjPwVwe3iuGZAU6rAJYtA lykBYAMfgVx7I64JBJnqJ0zjppf3oVjlwMl8QHNy0dnuyb0p4oG1pU4QO4pQWz4exr3iOT ZkmMtorIlHhcjsdTWZ0EBszYQDzV7Nb7VWRPFjntts/JO8U+yyjK6zwdG9T5qDnkwVsPqM QeIBi770zxIURsbKC7hTFh+me68byLj/x9mmXfa9zuW/g4cYeSm0UPInlrZEiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tdU7Nw8ibQ7oQj2QVZEgfnpMIqMJUDxVp1+CvqcUSTA=; b=W1jtd5rjmd2kmUUg0PGJeRV/gSXCczYp24yHJ2l1RsSIGSMkQ0OukGYalWixCkgW1CHwWu HURLF822OXmPlTj/dsScPAmF+zH62A7+x/imaqjpyI0ap7QMxWWk5pDaSANuYfkSBm/IZY Pw6Yvppys/vCo2rViPJh9eEDPhX83M9Wl3N0Cpdx92AhqFRIsTChn7ZyWvWnh6FBoQgyEX a9kL0BXGrs/751CtgFHJehoOeILO+r6WPVatcWbCr088eB9DFzmB6uVQs85Fgj9OI9wyEv n86FlcxWeXfpzsBAOR7VRZl3TlN0AKaMY75tJX54KrPLCk4DLaMEIIlcVRwryQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029041; a=rsa-sha256; cv=none; b=p/fPtCzKRVNWL1xjmcLuDZ4X/8hi9McAAvJ2oi2Z/gCIp+vRWfEr+pojSpvWpUMZbIITID lRVn9kVqdo+OFJ/u3p5iyB7SNrkQKVGHAnDmt64LHDcypSF+fHB0Jw8vua+tEiiZjDIhf0 VpLlnrVWgEJN+FL1RUPLYDGOG7Ry/7VmmF2Dn5yAVy6/mbSKUO/Jfq2JV5RBhqFGHgl9m7 a2+HBw7fzF/z+WhgMyV2g9vlW5BLtU/yx15QVx9qd2lN031+DkySVY8RJ4WeK+ZS6m+hng nzb4p/62ELF6IfXUCQLnNvqPgjcZi3GK1O2+ENpLCNqxPL8FkqgJrhnLOPoHzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5Y2DpJzfQv; Sun, 1 Dec 2024 04:57:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vL4L095716; Sun, 1 Dec 2024 04:57:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vLwp095713; Sun, 1 Dec 2024 04:57:21 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:21 GMT Message-Id: <202412010457.4B14vLwp095713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: fa95268aeb8a - stable/14 - Remove bogus detach routines List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fa95268aeb8acc2e10588aa78d3335bcfccb10a5 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fa95268aeb8acc2e10588aa78d3335bcfccb10a5 commit fa95268aeb8acc2e10588aa78d3335bcfccb10a5 Author: John Baldwin AuthorDate: 2024-11-05 01:31:16 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:07 +0000 Remove bogus detach routines These drivers are not bus drivers, and would need proper detach routines that tore down state stored in the softc. Better to just fail detach outright instead of an incorrect success. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47389 (cherry picked from commit 7ebc7d1ab76b9d06be9400d6c9fc74fcc43603a1) --- sys/dev/gpio/gpiomdio.c | 1 - sys/dev/sff/sfp_fdt.c | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/dev/gpio/gpiomdio.c b/sys/dev/gpio/gpiomdio.c index deb9a25bd290..dc43b2783bc5 100644 --- a/sys/dev/gpio/gpiomdio.c +++ b/sys/dev/gpio/gpiomdio.c @@ -213,7 +213,6 @@ static device_method_t gpiomdio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, gpiomdio_probe), DEVMETHOD(device_attach, gpiomdio_attach), - DEVMETHOD(device_detach, bus_generic_detach), /* MDIO interface */ DEVMETHOD(miibus_readreg, gpiomdio_readreg), diff --git a/sys/dev/sff/sfp_fdt.c b/sys/dev/sff/sfp_fdt.c index 7430282ede70..e566d8ced78c 100644 --- a/sys/dev/sff/sfp_fdt.c +++ b/sys/dev/sff/sfp_fdt.c @@ -138,7 +138,6 @@ static device_method_t sfp_fdt_methods[] = { /* Device interface */ DEVMETHOD(device_probe, sfp_fdt_probe), DEVMETHOD(device_attach, sfp_fdt_attach), - DEVMETHOD(device_detach, bus_generic_detach), /* SFF */ DEVMETHOD(sff_get_i2c_bus, sfp_fdt_get_i2c_bus), From nobody Sun Dec 1 04:57:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5b0Mwhz5gDGt; Sun, 01 Dec 2024 04:57:23 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5Z30Jqz49pC; Sun, 1 Dec 2024 04:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7byZhYCq/K6kLbLz9Ke2UgmliBaNOCWDC/udVkC7JRk=; b=uCulsJDCx+/h0nQmcxGfCvCseI9v2jVfldTxhJbrxElKKLlrsyH76SlI9cif+Wck5tznhZ N9ZoR/UHqesY06G85tcZTz2HwSJwOYOhJnWPPEHJ5jyV0NSInNN/Hw4gPxQqxopKjuablD Vz/06PUDtjuB4TzlZD/K2Gcy85IGF80lXPcbVvmuwB5rOIhDVMz8rF+kolSDE1R5/kAcYI tuGbc2W1E1kUd3ie7aXJ1WCgFkmhlxoxq0+lxojzOZ+6bmbG0foM8vpIw93LVynupuGOKS to10JGht87tKwo5e64y2aOH8hcUBJyLSwwjLKgwHuGVderNTakcunsL6pRVJiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7byZhYCq/K6kLbLz9Ke2UgmliBaNOCWDC/udVkC7JRk=; b=hgYSOKxwKNCtAgP6pG4BNZEbfLsCdmfkUxcxp58QHAVEnRfzVEXmlL56718/9tf+e896VP GihR+4TwQTth0brN5JJiVQdx5ukpYwkYqVhErkApaiwOGyckSUAmlxT3qmFi3NTAeONIAs UgjBujgR7R9QOGaqAR5K6uYBZIoN7ypGZTi75nknBZ72N2USdwHl0sNaqwn0plytIVIl5Q OnWLUhpqXEgBDPoqGVs2a9jS/HYGoBUkGJ097mIpkP6yoFPyNpTiGZZSnA1ylVSqRMQrjn 7gIyalwtwCCW8/GxJhe8jdzW9e2nDIrXi2ACDheUlr7PUUOHGf7MQ9+k/g8yyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029042; a=rsa-sha256; cv=none; b=ZEOw6vvJYVUDd/T9cS6+UFTyXW+A+Oe7KiVzuM5+IXCIIS9NMS90aFiN9kW/4jfKvPtove j1IpfG4wf52hU7APa6jq12aSPim02/RXZwa151sK1i+HwHZ/Bnpyb9OqWQLW//191zxZ/X wpXMgpUw80Tk18N/1LUmJ+amBO1S7ozU9QCMNzxZ8+nePeVc8gkn8PCu+fvdO5Kzak8y7J V4FaQaGrPEfev8OiecsHtp83Wd1V4zefn9+phdySfLB3zgpFSsQld00dqO44PYyg1GjnuR GFD6eVpdz7qhWbbLG2tf+noU/vcZDEBklHtplAUYnA3t0PIoPv9EG8FT1D5YHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5Z2cg2zfLK; Sun, 1 Dec 2024 04:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vMVB095760; Sun, 1 Dec 2024 04:57:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vMWD095757; Sun, 1 Dec 2024 04:57:22 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:22 GMT Message-Id: <202412010457.4B14vMWD095757@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 4380cca46dd9 - stable/14 - riscv: Add implementations of atomic_testand(set|clear)_(32|64|long) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4380cca46dd900b96c60b54c2de0315c2f8fa104 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4380cca46dd900b96c60b54c2de0315c2f8fa104 commit 4380cca46dd900b96c60b54c2de0315c2f8fa104 Author: John Baldwin AuthorDate: 2024-11-19 15:19:54 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:07 +0000 riscv: Add implementations of atomic_testand(set|clear)_(32|64|long) These use amoor and amoand rather than a loop. Also define atomic_testandset_acq_(64|long) using amoor.aq. Reviewed by: mhorne, kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47627 (cherry picked from commit a474e53d03ca8c78696fc222520de7d6876cc530) --- sys/riscv/include/atomic.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index ef9aa5ef057d..be4137cb0df4 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -239,6 +239,34 @@ atomic_readandclear_32(volatile uint32_t *p) return (ret); } +static __inline int +atomic_testandclear_32(volatile uint32_t *p, u_int val) +{ + uint32_t mask, old; + + mask = 1u << (val & 31); + __asm __volatile("amoand.w %0, %2, %1" + : "=&r" (old), "+A" (*p) + : "r" (~mask) + : "memory"); + + return ((old & mask) != 0); +} + +static __inline int +atomic_testandset_32(volatile uint32_t *p, u_int val) +{ + uint32_t mask, old; + + mask = 1u << (val & 31); + __asm __volatile("amoor.w %0, %2, %1" + : "=&r" (old), "+A" (*p) + : "r" (mask) + : "memory"); + + return ((old & mask) != 0); +} + #define atomic_add_int atomic_add_32 #define atomic_clear_int atomic_clear_32 #define atomic_cmpset_int atomic_cmpset_32 @@ -410,6 +438,48 @@ atomic_readandclear_64(volatile uint64_t *p) return (ret); } +static __inline int +atomic_testandclear_64(volatile uint64_t *p, u_int val) +{ + uint64_t mask, old; + + mask = 1ul << (val & 63); + __asm __volatile("amoand.d %0, %2, %1" + : "=&r" (old), "+A" (*p) + : "r" (~mask) + : "memory"); + + return ((old & mask) != 0); +} + +static __inline int +atomic_testandset_64(volatile uint64_t *p, u_int val) +{ + uint64_t mask, old; + + mask = 1ul << (val & 63); + __asm __volatile("amoor.d %0, %2, %1" + : "=&r" (old), "+A" (*p) + : "r" (mask) + : "memory"); + + return ((old & mask) != 0); +} + +static __inline int +atomic_testandset_acq_64(volatile uint64_t *p, u_int val) +{ + uint64_t mask, old; + + mask = 1ul << (val & 63); + __asm __volatile("amoor.d.aq %0, %2, %1" + : "=&r" (old), "+A" (*p) + : "r" (mask) + : "memory"); + + return ((old & mask) != 0); +} + static __inline uint32_t atomic_swap_32(volatile uint32_t *p, uint32_t val) { @@ -447,6 +517,9 @@ atomic_swap_64(volatile uint64_t *p, uint64_t val) #define atomic_set_long atomic_set_64 #define atomic_subtract_long atomic_subtract_64 #define atomic_swap_long atomic_swap_64 +#define atomic_testandclear_long atomic_testandclear_64 +#define atomic_testandset_long atomic_testandset_64 +#define atomic_testandset_acq_long atomic_testandset_acq_64 #define atomic_add_ptr atomic_add_64 #define atomic_clear_ptr atomic_clear_64 From nobody Sun Dec 1 04:57:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5b6tWgz5gCs1; Sun, 01 Dec 2024 04:57:23 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5b49snz49hk; Sun, 1 Dec 2024 04:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uqoEd6dl7W6j8L3pnDnnRnKoAFmyG1vS4bCT3BLaVYE=; b=obu3RxHDVR1IozZOEMNzxZDtG/u9zC/+cmxmk1oCXiZ5icKA81hVB+5aHHtStvta94LO++ 2/uiyxiQg6oiPnma49EfvvmqTrM2Owh2x11PaPLx+NGu13Rhpu4T0FOZ8/yHWCBQQc4mXP in8hYNiB1tvY/jn62b4Wr62LuRUVkc7sr0CfU9C2H6CE/ephfaZlToqOnyMs6tBOILEwZv b5eOY3X5sW1lcpquGTL6sopxz9Cra0blJiuOt2YcVA/V13eWIGYYMv36QhC/ESA+efRmUp QDT/tMGtBQdcEIVeIkzdWlm4KIswcDKfEXuFykUzUFM5MUkE01pBSCvC1Lp8ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uqoEd6dl7W6j8L3pnDnnRnKoAFmyG1vS4bCT3BLaVYE=; b=O+yCeZIkBLpQ8x+Ib+fQlm1xuh0pnhV6d4Zh17pnF3D4V/JufsgJe031PXHNoOiPz1j0cr DiF+ZmjbieYxmzsD/XZBgXuP1b0ce0bwap11TolLA2m3VLRq/Ps6Wuo5U0AL6tJ4Ix8B74 RRturtIRPXFHhDXcQ0/kzZ63Mndu5J5Znm9ShBUk58CMQvt9sO2tj4b27Ep0dDBspwoBPL QsD6/XINwtoSn2umkNxJAXb2Jw++rPADwmmJm5zfXsT1uQA8+U2rcslAKXPK2Hu+cztrXF Yjdbi0RLyI39EcfYxhsIhk+103MI+OOwNTFJUKGSMnr4Tc2R8r2POVITVDCfoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029043; a=rsa-sha256; cv=none; b=GjI5Pa9erkVoUmg8wKDtacMYJVdI9yvv4uk4Y2NavMxx6/dz7IXNFT5O2ARUwtEoYq2g73 ZWJs+kOd2WWgHqRZabidZghT2eGSa6zAB64ULq3JfXtuyv5sW7wxmvF++aZF24anz7bnYf hP+/m4XSxRwlUKmCLeqSmqqth+6w5waJgLJWPKHzGwlv4imzMKuUYxXZ2joTX3oqXjG9zy pOHSwdfoFqn6FCwNcDogvRnkka+Sr0XtJOfI12dvyuN3U4X5KO9W4w08o/OoDlXmCXyz4J 2X7r0NvqEeZOeIGlbSZlKVjGrP+7F0hsKZtnRqlNH8/cydkvhreyCodPZngmSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5b3mNKzdxh; Sun, 1 Dec 2024 04:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vNN7095814; Sun, 1 Dec 2024 04:57:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vN1C095811; Sun, 1 Dec 2024 04:57:23 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:23 GMT Message-Id: <202412010457.4B14vN1C095811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 994b7127f670 - stable/14 - arm: Implement atomic_testandset_acq_long as a simple wrapper List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 994b7127f670db8ab0799e5954ea2f40042c1c3a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=994b7127f670db8ab0799e5954ea2f40042c1c3a commit 994b7127f670db8ab0799e5954ea2f40042c1c3a Author: John Baldwin AuthorDate: 2024-11-19 15:22:50 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:07 +0000 arm: Implement atomic_testandset_acq_long as a simple wrapper Use a memory barrier after calling the existing atomic_testandset_long rather than using the fcmpset-based fallback version from . Reviewed by: kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47628 (cherry picked from commit 987c5a1944183cf82884fdb96b0432bd810aa8b9) --- sys/arm/include/atomic.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index 2cf97017b04a..dd2ad47e9bed 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -960,6 +960,17 @@ atomic_testandset_long(volatile u_long *p, u_int v) } #define atomic_testandset_long atomic_testandset_long +static __inline int +atomic_testandset_acq_long(volatile u_long *p, u_int v) +{ + int ret; + + ret = atomic_testandset_32((volatile uint32_t *)p, v); + dmb(); + return (ret); +} +#define atomic_testandset_acq_long atomic_testandset_acq_long + static __inline int atomic_testandset_64(volatile uint64_t *p, u_int v) { @@ -1097,7 +1108,6 @@ atomic_thread_fence_seq_cst(void) * For: * - atomic_load_acq_8 * - atomic_load_acq_16 - * - atomic_testandset_acq_long */ #include From nobody Sun Dec 1 04:57:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5d0pFpz5gDK2; Sun, 01 Dec 2024 04:57:25 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5c58J7z49j0; Sun, 1 Dec 2024 04:57:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EnzM8BJCOib4Lu6H3jxIlVZhtvSySOvBpCMfsZS1M6E=; b=KFTO7JqgLNgowaNSlBDB71wFYs/Vpxzkh1+Cb5746TiGqLMzmyT3aLePAT7whJMUrkaZS4 sUkilNdO8a5YvZtDFKjSxd94BotuZ9GrhLU/rN6L8HU6A9COCWfK/onpckjU4sLm3sT3bC gkIb4ldbwBr2tTK2XrhYk+oezois8zvdDLvhf+UlI9pkvpmasIKf78oLA/CrXKgNn+HSWn L098NVvH/YdB42wu+7bJaA3xg/kUfDABwaoevQOYmmVY3bHRUuknOpwsDAYuQJXBDcloMa kXpGlLeTAfbUyW7qcVHB5A9l2NN6D8W1OVXpOcqHgsGTb0QkndSNDq0f09wTsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EnzM8BJCOib4Lu6H3jxIlVZhtvSySOvBpCMfsZS1M6E=; b=d5NsT9rpuDs7Xc6Ny0/ffpVi9Z+ruHNYIgR32g5bVUkzgs7xA6g4gCYK9vrvtRmjRJ7Fa1 UyDh4+11XutWeJzwUf6Fbs4VFXqu8IMSaoq4+ixD3PNX7bioopVXpVAzM90ti2CUUGyzGI EF/sL1Dpals9UcGuaXP3EDOR9JCF8M7U4jf9PiBTVioTA1Zx6ei3PYblmQj5w29LS8ZctY h6e3+Ngs+zQowYEM5kPTtBBTWGaPdFjtCw8XCN9cqb1yrYPvTaY3+k0BbwXjiIuEV6m6hV 7KB18plih8+CDXv48Z0u5YXGu2b5XQ2TDCZ5fpA/g8VyYz4F+Neh+u5NP9FcTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029044; a=rsa-sha256; cv=none; b=uYHZHHlUDEPqwHimDv74LXCubMTLHnLiupyieZfLjcAMxrMkio7StjXUPX0o+n/tq7n7PR W8ieaqDNAizM8/wgePytdVcuRJLn/r28fmVxNAEmAfKVn9d6iGojOsP2U2n3GyrQd4z2Pl psOgPHHqzCKjfqrOY3kAhJ0BCvAGQvPG55DEKTF0/pge57+QDoGSCORNvdRLbBBVTjToZD lvJkPCBqL8yrhWExpL2L0XQTqExyjT+rv6cfqfDx2n0f1EZicp/5zqiYJ75IoATsjC7L12 MP5O1qgL4eIlQNJFIVe8w5upUKxZ5ixWZxDOEjOvx2hEqJw6kNDqHOu/xMOGPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5c4mkRzdwb; Sun, 1 Dec 2024 04:57:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vOrD095861; Sun, 1 Dec 2024 04:57:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vOC1095858; Sun, 1 Dec 2024 04:57:24 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:24 GMT Message-Id: <202412010457.4B14vOC1095858@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f72d503330a4 - stable/14 - atomic(9): Remove fcmpset-based fallback for atomic_testand(clear|set) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f72d503330a4d904c3423ebd5fa20606ebe9c7d9 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f72d503330a4d904c3423ebd5fa20606ebe9c7d9 commit f72d503330a4d904c3423ebd5fa20606ebe9c7d9 Author: John Baldwin AuthorDate: 2024-11-19 15:23:15 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:07 +0000 atomic(9): Remove fcmpset-based fallback for atomic_testand(clear|set) All architectures implement a MD version Reviewed by: kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47629 (cherry picked from commit fa2091d7571ffbae82dfc828f554745f283adeb0) --- sys/arm/include/atomic.h | 4 --- sys/powerpc/include/atomic.h | 6 ----- sys/sys/_atomic_subword.h | 64 -------------------------------------------- 3 files changed, 74 deletions(-) diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index dd2ad47e9bed..d632a6db89df 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -898,8 +898,6 @@ atomic_testandclear_long(volatile u_long *p, u_int v) return (atomic_testandclear_32((volatile uint32_t *)p, v)); } -#define atomic_testandclear_long atomic_testandclear_long - static __inline int atomic_testandclear_64(volatile uint64_t *p, u_int v) @@ -958,7 +956,6 @@ atomic_testandset_long(volatile u_long *p, u_int v) return (atomic_testandset_32((volatile uint32_t *)p, v)); } -#define atomic_testandset_long atomic_testandset_long static __inline int atomic_testandset_acq_long(volatile u_long *p, u_int v) @@ -969,7 +966,6 @@ atomic_testandset_acq_long(volatile u_long *p, u_int v) dmb(); return (ret); } -#define atomic_testandset_acq_long atomic_testandset_acq_long static __inline int atomic_testandset_64(volatile uint64_t *p, u_int v) diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h index 77ee5d8c6d46..47fd9ce30fd6 100644 --- a/sys/powerpc/include/atomic.h +++ b/sys/powerpc/include/atomic.h @@ -1093,12 +1093,6 @@ atomic_testandset_acq_long(volatile u_long *p, u_int v) return (a); } -#define atomic_testandclear_int atomic_testandclear_int -#define atomic_testandset_int atomic_testandset_int -#define atomic_testandclear_long atomic_testandclear_long -#define atomic_testandset_long atomic_testandset_long -#define atomic_testandset_acq_long atomic_testandset_acq_long - static __inline void atomic_thread_fence_acq(void) { diff --git a/sys/sys/_atomic_subword.h b/sys/sys/_atomic_subword.h index dc1b2f23e731..dad23383f642 100644 --- a/sys/sys/_atomic_subword.h +++ b/sys/sys/_atomic_subword.h @@ -205,68 +205,4 @@ atomic_load_acq_16(volatile uint16_t *p) #undef _ATOMIC_BYTE_SHIFT #undef _ATOMIC_HWORD_SHIFT -/* - * Provide generic testandset_long implementation based on fcmpset long - * primitive. It may not be ideal for any given arch, so machine/atomic.h - * should define the macro atomic_testandset_long to override with an - * MD-specific version. - * - * (Organizationally, this isn't really subword atomics. But atomic_common is - * included too early in machine/atomic.h, so it isn't a good place for derived - * primitives like this.) - */ -#ifndef atomic_testandset_acq_long -static __inline int -atomic_testandset_acq_long(volatile u_long *p, u_int v) -{ - u_long bit, old; - bool ret; - - bit = (1ul << (v % (sizeof(*p) * NBBY))); - - old = atomic_load_acq_long(p); - ret = false; - while (!ret && (old & bit) == 0) - ret = atomic_fcmpset_acq_long(p, &old, old | bit); - - return (!ret); -} -#endif - -#ifndef atomic_testandset_long -static __inline int -atomic_testandset_long(volatile u_long *p, u_int v) -{ - u_long bit, old; - bool ret; - - bit = (1ul << (v % (sizeof(*p) * NBBY))); - - old = atomic_load_long(p); - ret = false; - while (!ret && (old & bit) == 0) - ret = atomic_fcmpset_long(p, &old, old | bit); - - return (!ret); -} -#endif - -#ifndef atomic_testandclear_long -static __inline int -atomic_testandclear_long(volatile u_long *p, u_int v) -{ - u_long bit, old; - bool ret; - - bit = (1ul << (v % (sizeof(*p) * NBBY))); - - old = atomic_load_long(p); - ret = false; - while (!ret && (old & bit) != 0) - ret = atomic_fcmpset_long(p, &old, old & ~bit); - - return (ret); -} -#endif - #endif /* _SYS__ATOMIC_SUBWORD_H_ */ From nobody Sun Dec 1 04:57:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5f3mYxz5gDF4; Sun, 01 Dec 2024 04:57:26 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5d6GDzz49bX; Sun, 1 Dec 2024 04:57:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=en0Evk4wwQeHt4efcjK6etpKKq8q6tpbVS5/CejHYcE=; b=QZsL2iSmxeOI3Wq+oIOMkjHAMEcYuyu+L3wnDuLsxWxi5Gw053Mtwe9wYDY3lzM3utH6HS VH8OVHs3IXiggQS2ujk5noXu2U0G8l05dsmQaU2WAJT5Rr9LG9JQIFidRggvODXA6ubLVc 5O2v30HGVC8M3oIDuUn2EPkneGkOMJbrVIV99Cb3q2dNgCa8FSHhESHItCvpsV0bGEGPXO j7HNJ24PLaF4CgE8jH/66mdwwMWuFpB5KLJXUFzSUr02yRIpuGGBbZ8XRPcRve7sW/rcQ6 Gjo/ATziTEmR2ngNovOBBEjxjGpIJ9I48XX5/qNPoSTMubEjXkpeB9pb55ps4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=en0Evk4wwQeHt4efcjK6etpKKq8q6tpbVS5/CejHYcE=; b=LlZ3izwcXodNocookE1rn6ZJmTyJI2lhAvdkpxz2XQf5EPIuIOCY8HBPAPiNVYAd68Pqdz 3Ex5W47vZbgda/vh9U2ejdCvM82lyfIpnQgeJwN7TeaifpMG2IX63d7KU2KlJ6kRE/1YCw cFDOo0EOTYZZq2BbtuTHOWyInaP19+jh0lXclO5qiIMb7B6zDp23ywB3ZdGE/yU2p3VzGI YS8JRDJWoAah9jkAkxMuxpaj9nEMNU9NtkOkcFC7JO/7p8///U4VarCUiNxfihClqrz94o hRbzXFVhqQweM4vCr2gbTPJXV3mX+Rb9i0Ss579y7bw7EFNB+9hAZPSlF8ne6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029045; a=rsa-sha256; cv=none; b=gS8DRRBdTGihalvNvKJ0j0i4nyuDyU5cmabl8ce0FWM9S0xbnodNZ4xwJGQKE7oyZVNKb1 XbisoXfhXLc/Lw2c47rzwA3cY+cYMfeI9bBAwC6kSnwp8wQ+YpZCGSwMot0lDmnFd7YmZq e1XrxJv+f71SoLhn8mSI8kqPgrKAvpRTCEN53Gi3ZVrfDIXv5byN5S5a7C6kzGFrg9Zn+s oHW8tIVgBkFImfx2Leo3yTZDQ96DGhfGz1dUam8M6dHWWmnlx1iIvsPU1oUtk/ylHzsOn+ JDjSJg32D/gysWk6V+H3VXGWqt0mp/2lSX64gH91nHKEjXgUXPBFjUWOLKtrdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5d5mcPzfJ8; Sun, 1 Dec 2024 04:57:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vPJR095909; Sun, 1 Dec 2024 04:57:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vPc6095906; Sun, 1 Dec 2024 04:57:25 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:25 GMT Message-Id: <202412010457.4B14vPc6095906@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 40319a5e589c - stable/14 - atomic.9: Document atomic_testand*_64 and atomic_testandset_acq_long List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 40319a5e589cbba00c007c36209338f89d3dbef6 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=40319a5e589cbba00c007c36209338f89d3dbef6 commit 40319a5e589cbba00c007c36209338f89d3dbef6 Author: John Baldwin AuthorDate: 2024-11-19 15:24:06 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:08 +0000 atomic.9: Document atomic_testand*_64 and atomic_testandset_acq_long Reviewed by: kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47630 (cherry picked from commit 3ca22e1e8fc8ce927b3d064b29dfdc5df252e102) --- share/man/man9/atomic.9 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/share/man/man9/atomic.9 b/share/man/man9/atomic.9 index 98d392dd6032..436cfb7ee225 100644 --- a/share/man/man9/atomic.9 +++ b/share/man/man9/atomic.9 @@ -20,7 +20,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 16, 2023 +.Dd November 19, 2024 .Dt ATOMIC 9 .Os .Sh NAME @@ -480,10 +480,13 @@ and .Fn atomic_testandclear functions are only implemented for the types .Dq Li int , -.Dq Li long +.Dq Li long , +.Dq Li 32 , and -.Dq Li 32 -and do not have any variants with memory barriers at this time. +.Dq Li 64 +and generally do not have any variants with memory barriers at this time +except for +.Fn atomic_testandset_acq_long . .Pp The type .Dq Li 64 From nobody Sun Dec 1 04:57:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5h3Fttz5gDCd; Sun, 01 Dec 2024 04:57:28 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5h11G1z4B3d; Sun, 1 Dec 2024 04:57:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RnUnamxfCrx3CpvUKo23uXrkm99BUWXmQ0TMhhWTdMk=; b=NsUSIGl2+2q7zWCkMk3v+vRpppGk8M9j8gaQEhqunZeiBFGFdulUv/3GyOVJavP5JFmZjG 00T7Vvd10Igy4T8IHOq2dPrYjHQqoMow5o0T5g4PM5c4h+coMIcIFkvrXWAw9VLItdoR58 gCIUUCQeY+UKkpGI6d2RVsPu6y2ed2UprVyjinQFmgILO+QDD2JSzu74Dv6v+CExJ7xSLa i6CPgjM0VLfEOlt1gfH3LhfJcNiN/UFlZLcsaPNsdFj4+Hv9L89cz5D8ZsMmfsENMEIs9v 9RqjA/cDu4zKh7IUJ6NkAN7Yq93mtCVDh8Z+eYjXJHpbmGMQfBOWQJXkJuc4hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RnUnamxfCrx3CpvUKo23uXrkm99BUWXmQ0TMhhWTdMk=; b=uz9NFtULrrfzYB/3GXq4XzOUHdswDZlqkgN2mJFNXmCjf2eU2ZeuKcIP9rdDLSl9pP59WR 2pZuMDKy4aThArY0pL8Wg67drJVbKAZay4Yj/t8M8pfReHm2a1QkWF7RtEMJX5d755o/sT bm8oSyJTrTIL4Lpz5ASeoYR3gcTfrxKOhHYpXaovu4qYsxhbaapzuYLfBL2TYJGPFyslWp xMbTX3mqywu1W+l9GyhTNtmrJfQdGX7EnYyN29Xis9RBW8uioIBj3JuyXBU7TtrOYGxMQr 42aXB4r4Gj8epZEtjhDikO+0lpTLpHSSKr/TH91lKmEtdNRmnnXiE35PRaZfWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029048; a=rsa-sha256; cv=none; b=f/sAhOkpTGXIRXMbSA5QXMG51YDzpAMocgkRnHEUH8zvwy/LPGajSGJW1+C1ODldyI8IAh OF6ph0oI+F7nl2syVhrEuwTOw69GDRc+sb+HQN69s2xJqNv+nOwptqKvQMPOrVo4//0/PL zYXUsCO1NL/yzelR8WD99N8avIFWIP9l22RlFpjrsYsMBtUeh/1m6pCneGG1JJuocDLq1U lc+3QZCV4OCt8UdhcC/0qWFPholEg8qdo/b+6fssoUAfkXB+pQU+MHXsDdILhP4yz5L7Jm 53rSJOo/NISI5SeGF/rDrargsFOK5q2SpLsdLS8BvZb1xfkO3exB/TaR3psDgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5g7325zfLL; Sun, 1 Dec 2024 04:57:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vROS096002; Sun, 1 Dec 2024 04:57:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vR4Z095999; Sun, 1 Dec 2024 04:57:27 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:27 GMT Message-Id: <202412010457.4B14vR4Z095999@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b291c7168a78 - stable/14 - atomic(9): Implement atomic_testand(clear|set)_ptr List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b291c7168a7840a74c4e976a91dec21ff0f1e4ce Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b291c7168a7840a74c4e976a91dec21ff0f1e4ce commit b291c7168a7840a74c4e976a91dec21ff0f1e4ce Author: John Baldwin AuthorDate: 2024-11-19 15:24:50 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:08 +0000 atomic(9): Implement atomic_testand(clear|set)_ptr For current architectures, these are just aliases for the existing operation on the relevant scalar integer. Reviewed by: imp, kib Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47631 (cherry picked from commit a80b9ee15aa0f2da9f9f0c48e13324e0e5f2e840) --- share/man/man9/atomic.9 | 1 + sys/amd64/include/atomic.h | 2 ++ sys/arm/include/atomic.h | 2 ++ sys/arm64/include/atomic.h | 2 ++ sys/i386/include/atomic.h | 4 ++++ sys/kern/subr_asan.c | 2 ++ sys/kern/subr_csan.c | 2 -- sys/kern/subr_msan.c | 2 ++ sys/powerpc/include/atomic.h | 10 ++++++++++ sys/riscv/include/atomic.h | 2 ++ 10 files changed, 27 insertions(+), 2 deletions(-) diff --git a/share/man/man9/atomic.9 b/share/man/man9/atomic.9 index 436cfb7ee225..581aac9878c8 100644 --- a/share/man/man9/atomic.9 +++ b/share/man/man9/atomic.9 @@ -481,6 +481,7 @@ and functions are only implemented for the types .Dq Li int , .Dq Li long , +.Dq ptr , .Dq Li 32 , and .Dq Li 64 diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h index e5f21b2efd05..8eb3fddb0478 100644 --- a/sys/amd64/include/atomic.h +++ b/sys/amd64/include/atomic.h @@ -589,6 +589,8 @@ atomic_swap_long(volatile u_long *p, u_long v) #define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_long #define atomic_swap_ptr atomic_swap_long #define atomic_readandclear_ptr atomic_readandclear_long +#define atomic_testandset_ptr atomic_testandset_long +#define atomic_testandclear_ptr atomic_testandclear_long #endif /* !WANT_FUNCTIONS */ diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index f39de8eaabdf..73e769885f71 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -1082,6 +1082,8 @@ atomic_thread_fence_seq_cst(void) #define atomic_load_acq_ptr atomic_load_acq_32 #define atomic_store_rel_ptr atomic_store_rel_32 #define atomic_swap_ptr atomic_swap_32 +#define atomic_testandset_ptr atomic_testandset_32 +#define atomic_testandclear_ptr atomic_testandclear_32 #define atomic_add_int atomic_add_32 #define atomic_add_acq_int atomic_add_acq_32 diff --git a/sys/arm64/include/atomic.h b/sys/arm64/include/atomic.h index c7aaa76d9de9..f7018f2f9e0b 100644 --- a/sys/arm64/include/atomic.h +++ b/sys/arm64/include/atomic.h @@ -609,6 +609,8 @@ _ATOMIC_STORE_REL_IMPL(64, , ) #define atomic_set_ptr atomic_set_64 #define atomic_swap_ptr atomic_swap_64 #define atomic_subtract_ptr atomic_subtract_64 +#define atomic_testandclear_ptr atomic_testandclear_64 +#define atomic_testandset_ptr atomic_testandset_64 #define atomic_add_acq_long atomic_add_acq_64 #define atomic_fcmpset_acq_long atomic_fcmpset_acq_64 diff --git a/sys/i386/include/atomic.h b/sys/i386/include/atomic.h index 5aca9fb15181..71aa09c57007 100644 --- a/sys/i386/include/atomic.h +++ b/sys/i386/include/atomic.h @@ -865,6 +865,10 @@ atomic_swap_long(volatile u_long *p, u_long v) atomic_swap_int((volatile u_int *)(p), (u_int)(v)) #define atomic_readandclear_ptr(p) \ atomic_readandclear_int((volatile u_int *)(p)) +#define atomic_testandclear_ptr(p, val) \ + atomic_testandclear_int((volatile u_int *)(p), (val)) +#define atomic_testandset_ptr(p, val) \ + atomic_testandset_int((volatile u_int *)(p), (val)) #endif /* !WANT_FUNCTIONS */ diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c index c3664d9cf6c2..bd143a816932 100644 --- a/sys/kern/subr_asan.c +++ b/sys/kern/subr_asan.c @@ -817,11 +817,13 @@ ASAN_ATOMIC_FUNC_TESTANDCLEAR(32, uint32_t); ASAN_ATOMIC_FUNC_TESTANDCLEAR(64, uint64_t); ASAN_ATOMIC_FUNC_TESTANDCLEAR(int, u_int); ASAN_ATOMIC_FUNC_TESTANDCLEAR(long, u_long); +ASAN_ATOMIC_FUNC_TESTANDCLEAR(ptr, uintptr_t); ASAN_ATOMIC_FUNC_TESTANDSET(32, uint32_t); ASAN_ATOMIC_FUNC_TESTANDSET(64, uint64_t); ASAN_ATOMIC_FUNC_TESTANDSET(int, u_int); ASAN_ATOMIC_FUNC_TESTANDSET(long, u_long); +ASAN_ATOMIC_FUNC_TESTANDSET(ptr, uintptr_t); ASAN_ATOMIC_FUNC_SWAP(32, uint32_t); ASAN_ATOMIC_FUNC_SWAP(64, uint64_t); diff --git a/sys/kern/subr_csan.c b/sys/kern/subr_csan.c index 0c238bf9684a..368f8b6ba981 100644 --- a/sys/kern/subr_csan.c +++ b/sys/kern/subr_csan.c @@ -659,10 +659,8 @@ CSAN_ATOMIC_FUNC_SET(ptr, uintptr_t) CSAN_ATOMIC_FUNC_SUBTRACT(ptr, uintptr_t) CSAN_ATOMIC_FUNC_STORE(ptr, uintptr_t) CSAN_ATOMIC_FUNC_SWAP(ptr, uintptr_t) -#if 0 CSAN_ATOMIC_FUNC_TESTANDCLEAR(ptr, uintptr_t) CSAN_ATOMIC_FUNC_TESTANDSET(ptr, uintptr_t) -#endif #define CSAN_ATOMIC_FUNC_THREAD_FENCE(name) \ void kcsan_atomic_thread_fence_##name(void) \ diff --git a/sys/kern/subr_msan.c b/sys/kern/subr_msan.c index ef3c6c10b0ba..029c5ed8df96 100644 --- a/sys/kern/subr_msan.c +++ b/sys/kern/subr_msan.c @@ -1289,11 +1289,13 @@ MSAN_ATOMIC_FUNC_TESTANDCLEAR(32, uint32_t); MSAN_ATOMIC_FUNC_TESTANDCLEAR(64, uint64_t); MSAN_ATOMIC_FUNC_TESTANDCLEAR(int, u_int); MSAN_ATOMIC_FUNC_TESTANDCLEAR(long, u_long); +MSAN_ATOMIC_FUNC_TESTANDCLEAR(ptr, uintptr_t); MSAN_ATOMIC_FUNC_TESTANDSET(32, uint32_t); MSAN_ATOMIC_FUNC_TESTANDSET(64, uint64_t); MSAN_ATOMIC_FUNC_TESTANDSET(int, u_int); MSAN_ATOMIC_FUNC_TESTANDSET(long, u_long); +MSAN_ATOMIC_FUNC_TESTANDSET(ptr, uintptr_t); MSAN_ATOMIC_FUNC_SWAP(32, uint32_t); MSAN_ATOMIC_FUNC_SWAP(64, uint64_t); diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h index 47fd9ce30fd6..0c3a57698342 100644 --- a/sys/powerpc/include/atomic.h +++ b/sys/powerpc/include/atomic.h @@ -1093,6 +1093,16 @@ atomic_testandset_acq_long(volatile u_long *p, u_int v) return (a); } +#ifdef __powerpc64__ +#define atomic_testandclear_ptr atomic_testandclear_long +#define atomic_testandset_ptr atomic_testandset_long +#else +#define atomic_testandclear_ptr(p,v) \ + atomic_testandclear_32((volatile u_int *)(p), v) +#define atomic_testandset_ptr(p,v) \ + atomic_testandset_32((volatile u_int *)(p), v) +#endif + static __inline void atomic_thread_fence_acq(void) { diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index be4137cb0df4..fee82e6a6bc9 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -530,6 +530,8 @@ atomic_swap_64(volatile uint64_t *p, uint64_t val) #define atomic_set_ptr atomic_set_64 #define atomic_subtract_ptr atomic_subtract_64 #define atomic_swap_ptr atomic_swap_64 +#define atomic_testandclear_ptr atomic_testandclear_64 +#define atomic_testandset_ptr atomic_testandset_64 ATOMIC_ACQ_REL(set, 64) ATOMIC_ACQ_REL(clear, 64) From nobody Sun Dec 1 04:57:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5g1q0rz5gD6R; Sun, 01 Dec 2024 04:57:27 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5g01q2z49kb; Sun, 1 Dec 2024 04:57:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LCYgM+j74eEjzbPIbdqI4kfb4mKoS0OnCOF7CEv7qZ4=; b=Z0/eJOPgjSt/uUg8xiME8i81tyMYS1KcN6e7Kso6fMcmlz7rX1xYYKiYVYeNYVZt1+HM8M 7LjlYMECLN0ibEkvnLDOB5tiitsWKBGilCNJWj3F9bF1T029CGkTsE/EXpbZsiZbczMCOx 8eOQ2RARxWlzntpDWLr90JrnJxvH0lBy1HOWOvgMBJ8LwPu3+PcimvxuCbAdfOPoM/zVv8 DlwmbCREqTPESj8h3A6RdexdlseFgBJm2B/7C9dib3vbR59xbYA4KGrsAZb3HZo1E7gZcf swVnW2PBzyHUiNd6EfoHDm776KLm9ACEMsatgnkNAuCNCwOb+7ffiQuanpBy6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LCYgM+j74eEjzbPIbdqI4kfb4mKoS0OnCOF7CEv7qZ4=; b=uhZG+zqjG7WCCYWH1Q87HU0ZzTZTPU+Hwj6v2SqV6kMXEghvFTD1ZIehtq9zgCHlLCbji5 1oLvTzbHqXhPQyGTbzRpaZUlCm70uZX0ZR+UzUtV1Sas95R1bCwhHN2y6w1qk8/xhi+szk y1bTcIYMjtYjHn/l1tuF1tYg8rTSB7LCGZCGv+e3acF8DMv7KIcuSPqATtjXQIgC/wfIht 1QatccZc31P5R8Q/X59TyiP1volJGWYKbyQZ7lnj+REdRbs0jJhAHfXv5OKnTyO8/KQpHw 43nfaAN9lF45Ow0OuCw0NRwwEbPmfFaQCIz7OVC51KSYcV4Th7IDxQVQVAdpSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029047; a=rsa-sha256; cv=none; b=srothj9BRbjvvaXG5tdTe++H1czqulNWMnffGePkEwjEwVfD3IZuByv6Yy9OiLWKBINdhW b+3Cpu3jmV0srGl+na2pwGvaYXixh8kLLIaVmrSJsg381s2d9wKukAkdS5nyCIqtsev21T 285PWFOHFva7KACbKaS46FVvjMRmyLDpHN2Hsgtw+3Sjdp4va/D9VpafKD+O6TtjuStmBP BC590pWnpJkq4nhFvjavh3mrla0Ksf4hn250ft3zJiPDatITG09C4iY7muLMoQk8BrKht5 qpraAWRhmrRceokqb2BOvL3Ai81RDibHf7a1AbmUkqutf9q0ylGw5o7T8EXutw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5f6g9yzdn0; Sun, 1 Dec 2024 04:57:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vQnU095951; Sun, 1 Dec 2024 04:57:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vQuZ095948; Sun, 1 Dec 2024 04:57:26 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:26 GMT Message-Id: <202412010457.4B14vQuZ095948@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 72b4bd2df77c - stable/14 - arm: add missing atomic-pointer functions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 72b4bd2df77c52f184bad81dcaaa4851e917e86b Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=72b4bd2df77c52f184bad81dcaaa4851e917e86b commit 72b4bd2df77c52f184bad81dcaaa4851e917e86b Author: Elliott Mitchell AuthorDate: 2024-05-09 23:04:35 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:08 +0000 arm: add missing atomic-pointer functions The pointer function types were missing for these functions, so add them. Valuable for places where type sizes vary by architecture. Differential Revision: https://reviews.freebsd.org/D37778 Reviewed by: imp, andrew Pull Request: https://github.com/freebsd/freebsd-src/pull/1126 (cherry picked from commit 98c276811aece750cd93cec53cd6c8f926519da5) --- sys/arm/include/atomic.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index d632a6db89df..f39de8eaabdf 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -1059,6 +1059,12 @@ atomic_thread_fence_seq_cst(void) dmb(); } +#define atomic_add_ptr atomic_add_32 +#define atomic_add_acq_ptr atomic_add_acq_32 +#define atomic_add_rel_ptr atomic_add_rel_32 +#define atomic_subtract_ptr atomic_subtract_32 +#define atomic_subtract_acq_ptr atomic_subtract_acq_32 +#define atomic_subtract_rel_ptr atomic_subtract_rel_32 #define atomic_clear_ptr atomic_clear_32 #define atomic_clear_acq_ptr atomic_clear_acq_32 #define atomic_clear_rel_ptr atomic_clear_rel_32 @@ -1066,15 +1072,16 @@ atomic_thread_fence_seq_cst(void) #define atomic_set_acq_ptr atomic_set_acq_32 #define atomic_set_rel_ptr atomic_set_rel_32 #define atomic_fcmpset_ptr atomic_fcmpset_32 -#define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_32 #define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_32 +#define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_32 #define atomic_cmpset_ptr atomic_cmpset_32 #define atomic_cmpset_acq_ptr atomic_cmpset_acq_32 #define atomic_cmpset_rel_ptr atomic_cmpset_rel_32 +#define atomic_fetchadd_ptr atomic_fetchadd_32 +#define atomic_readandclear_ptr atomic_readandclear_32 #define atomic_load_acq_ptr atomic_load_acq_32 #define atomic_store_rel_ptr atomic_store_rel_32 #define atomic_swap_ptr atomic_swap_32 -#define atomic_readandclear_ptr atomic_readandclear_32 #define atomic_add_int atomic_add_32 #define atomic_add_acq_int atomic_add_acq_32 From nobody Sun Dec 1 04:57:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5k58vTz5gCsF; Sun, 01 Dec 2024 04:57:30 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5k2Ldvz4B6J; Sun, 1 Dec 2024 04:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1aSVJizZ821KFwwIwqFQvb9TTxBGiE2xhc0d/RCTCTw=; b=VqeYpbVmgSFL38yS02yZ+L7pZOK0Waml9YXoiF74l+YF/p37Zv7N+O3pDRvRMP8j17kvqX WldZaf9+UsR5GkmKVuo1uGQd/2gANWS9EtKV70FGw4v6U7v+QqIM7RRPvD5n+bH/aWYgbf Sf9wLW5ND9yaFnVrASDRj1MTsn0jh+iic7XGIOMU83LnXbA/AyWiY9c9T3mJrxCt8OuRZV 3jT6Tg3B2gH0ICZq6MVI4TOG+iMW6ClBpOsWbcIVeOQnn14mWGgacp8jzvT/a8WMFzSVoM Khd0TJKfXf5a98tCLfdZWEmTZ5kRDsPH4c4qHOH/jLvXAfSr6VFp+1RKU8iCfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1aSVJizZ821KFwwIwqFQvb9TTxBGiE2xhc0d/RCTCTw=; b=akK3ThxXPPZEY0UgXS75tGJ0amlG7+jQR7gly4koG4ffg4lk2FEBCxudm7VZrOHr5VybTY 3ZMIM5Oi/I0bdqaV6AR3HuTKkGwRozTmzWbh8sMz68gaw1nmpDGpt6AKlIqg5MI2OSCfuD 8F+JrpitwekS89+fNhfkqKO80dL/wV9dC3KLDQL/lRQcuitpob+/EsBjFixG38LUlImGzc CHgOJOaKU5KVQlnQnwak4+vfTYvAjrEbZQzzQTWl+z6ZDcRCh9EcX0GRJ7X2LoKGkwRJEQ Q2LpC2lrqdJkQGHD19cSip63972LHtuG1x+W6RxpqXi3wUFsunuQkcINYnuPCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029050; a=rsa-sha256; cv=none; b=alBQpGTfEKDSMwJ7IgzbMjs6bNVCEc7D7c45UqWjsaWEGZyP4vSlCRxlBuqLNnnoB1mdXD U+mDTpqBkw9WACTGgIYt/ZQddPtV7BBO2ZMVVKtq4pYzRF+tCxzzNf8wN6mVKmZ+xPHFuo Out0uiZSXYD/hBIkyGtH7lYEl1z6SFacHCRXyglD6pkCJFu8dm1+yKMtHco/uzlimKQDku AOXfpLHNiMJbkVH65BRJ3E5F4aJnl1Lm0ZYIhqPRMn8MYCCkgaaggyJ6IctN10uC+S3l/5 OWqo4m6TTyRyxXzpMAdAdiqKYP24tUf5I4nHyqgYZPNqlchEWL5l3pKJ4siOrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5k1z88zf7S; Sun, 1 Dec 2024 04:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vURL096112; Sun, 1 Dec 2024 04:57:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vUsD096109; Sun, 1 Dec 2024 04:57:30 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:30 GMT Message-Id: <202412010457.4B14vUsD096109@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d53146682254 - stable/14 - new-bus: Fix some shortcomings in disabling devices via hints List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d5314668225469e2b59ee929ad9717e63271ab0a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d5314668225469e2b59ee929ad9717e63271ab0a commit d5314668225469e2b59ee929ad9717e63271ab0a Author: John Baldwin AuthorDate: 2024-11-23 16:39:02 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:08 +0000 new-bus: Fix some shortcomings in disabling devices via hints A device can be disabled via a hint after it is probed (but before it is attached). The initial version of this marked the device disabled, but left the device "alive" meaning that dev->driver and dev->desc were untouched and still pointed into the driver that probed the device. If that driver lives in a kernel module that is later unloaded, device_detach() called from devclass_delete_driver() doesn't do anything (the device's state is DS_ALIVE). In particular, it doesn't call device_set_driver(dev, NULL) to disassociate the device from the driver that is being unloaded. There are several places where these stale pointers can be tripped over. After kldunload, invoking the sysctl to fetch device info can dereference dev->desc and dev->driver causing panics. Even without kldunload, a system suspend request will call the device_suspend and device_resume DEVMETHODs of the driver in question even though the device is not attached which can cause some excitement. To clean this up, more fully detach a device that is disabled by a hint by clearing the driver and setting the state to DS_NOTPRESENT. However, to keep the device name+unit combination reserved, leave the device attached to its devclass. This requires a change to 'devctl enable' handling to deal with this updated state. It now checks for a non-NULL devclass to determine if a disabled device is in this state and if so it clears the hint. However, it also now clears the devclass before attaching the device. This gives all drivers an opportunity to attach to the now-enabled device. Reported by: adrian Discussed with: imp Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47691 (cherry picked from commit b4c700fa7cca7d3e4da84dd417fc3efc42788a52) --- sys/kern/subr_bus.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index d22dd4868ff6..f08a7718e071 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -2579,7 +2579,13 @@ device_attach(device_t dev) int error; if (resource_disabled(dev->driver->name, dev->unit)) { + /* + * Mostly detach the device, but leave it attached to + * the devclass to reserve the name and unit. + */ device_disable(dev); + (void)device_set_driver(dev, NULL); + dev->state = DS_NOTPRESENT; if (bootverbose) device_printf(dev, "disabled via hints entry\n"); return (ENXIO); @@ -5720,17 +5726,20 @@ devctl2_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, * attach the device rather than doing a full probe. */ device_enable(dev); - if (device_is_alive(dev)) { + if (dev->devclass != NULL) { /* * If the device was disabled via a hint, clear * the hint. */ - if (resource_disabled(dev->driver->name, dev->unit)) - resource_unset_value(dev->driver->name, + if (resource_disabled(dev->devclass->name, dev->unit)) + resource_unset_value(dev->devclass->name, dev->unit, "disabled"); - error = device_attach(dev); - } else - error = device_probe_and_attach(dev); + + /* Allow any drivers to rebid. */ + if (!(dev->flags & DF_FIXEDCLASS)) + devclass_delete_device(dev->devclass, dev); + } + error = device_probe_and_attach(dev); break; case DEV_DISABLE: if (!device_is_enabled(dev)) { From nobody Sun Dec 1 04:57:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5j3PsKz5gCsD; Sun, 01 Dec 2024 04:57:29 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5j1cSZz49y9; Sun, 1 Dec 2024 04:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hhYBKO5+zI5ZPWtExTfhXyRfeI3ajz0Br1zgxY3lqbc=; b=awlD+nsqY4YMFd8AcL2zJpcyiMwGaIjpyr1YURT649GBu+JbZRZY2f8EsT/p0lIXueIyqn O3DLZM1F+xCgtUWa14Y3Ki/047JJtO3oH27IbR2QWgotAzEc0Kkw2JRs1WLMh7RYe9+BfA uR5EEWYUhDTTkKjW976gML8+cW+ajKCcQ0Oi8/F84a7zthi1kAnOzIwxQvUxryqcCy4+ah J5UJeCqDqEFRCasUW2a7dchfcYwFTppqHYbkYSFXu29nwkHj5ATur7JhU22z0PkU1HMfjv xIkQq6YCYKLV19bS3qPVl81Tcewc1K6RzaLQTAFSiGjUq1DdlwHXDMIL2xGSLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hhYBKO5+zI5ZPWtExTfhXyRfeI3ajz0Br1zgxY3lqbc=; b=Cr0g5PyXPSXapqjjXsTW9EWVWECAM/JZfVkT91BFJ+FhxU1EAgmETT/Cazn8Vu6ubpT8hA GWJJJSl/lq63TumEUzxs6ZS6IuUTM55zddjPQBo/1rpG2eb3/LFo7m97tZRoA+hS2xYomQ Ph/N7hSr3b6C0I3BJndnkl86f8/74ZgQf8eCPWPg6WGbpk/DNCoot4FNCsatILLadpTgrL mm3q9mEf/4IEn8DTjMBLJSN2fb9DvOdSG0GKegv+ws7SXaBAmqfimTkPJZ88gTXV0vJf9K f3cmDuglRu6U7O73n5s+q9U0IQucNJRBtVdio2CJgaLM9CH2IvLREL2NAnZZ1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029049; a=rsa-sha256; cv=none; b=YOorQEknp+htudcd6s3/Ljs7UqAo9k5WzxjOavg3t969a8yaDHmJOGDJiv5WtSUWqSRYs3 cwabiJOCi+3Q9QylUrCoIxTMP37YIutuVzMmM+YeAHGV3yn1V0hEciB1pXUHBOeUtjg8cp P2ndN+kb77lcuM5bs8lqUx2iuWtLd/YFJwKgh3CsxidgqOXtbmAzrPbPcFwdLYcBGm689f eqdwrsTTex4DqLZ2AWfwFkHhvSNOq5mTCeMIFXqy1H/hYGh6UxE4V+qJEga5xV8dlqitrY Atk1EHUG0vOLVtulyG7QNiK9CwvezsFZiwgc/6rA1g4u26ZVtjYyE7HA4EKWHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5j1F54zfJ9; Sun, 1 Dec 2024 04:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vTXN096050; Sun, 1 Dec 2024 04:57:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vTjD096047; Sun, 1 Dec 2024 04:57:29 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:29 GMT Message-Id: <202412010457.4B14vTjD096047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 44eaee18f808 - stable/14 - vga_pci: Use bus_generic_* directly instead of wrappers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 44eaee18f8086fd75c79f5ae8ed21c4f556a8beb Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=44eaee18f8086fd75c79f5ae8ed21c4f556a8beb commit 44eaee18f8086fd75c79f5ae8ed21c4f556a8beb Author: John Baldwin AuthorDate: 2024-11-19 15:26:32 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:08 +0000 vga_pci: Use bus_generic_* directly instead of wrappers Differential Revision: https://reviews.freebsd.org/D47375 (cherry picked from commit c7d29adcb3ce6544eb30c6b5489999d8f001cb71) --- sys/dev/pci/vga_pci.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 57fec1780e3c..a205d28b2cab 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -381,13 +381,6 @@ vga_pci_attach(device_t dev) return (0); } -static int -vga_pci_suspend(device_t dev) -{ - - return (bus_generic_suspend(dev)); -} - static int vga_pci_detach(device_t dev) { @@ -399,13 +392,6 @@ vga_pci_detach(device_t dev) return (error); } -static int -vga_pci_resume(device_t dev) -{ - - return (bus_generic_resume(dev)); -} - /* Bus interface. */ static int @@ -736,9 +722,9 @@ static device_method_t vga_pci_methods[] = { DEVMETHOD(device_probe, vga_pci_probe), DEVMETHOD(device_attach, vga_pci_attach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, vga_pci_suspend), + DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_detach, vga_pci_detach), - DEVMETHOD(device_resume, vga_pci_resume), + DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ DEVMETHOD(bus_read_ivar, vga_pci_read_ivar), From nobody Sun Dec 1 04:57:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5l6WZZz5gD6l; Sun, 01 Dec 2024 04:57:31 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5l3jC3z4B9T; Sun, 1 Dec 2024 04:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q8dDX4TyONqOujj/8Nab/U/ipMJIVJnYjo8w4mIqeAc=; b=oK77t4LIcFoLou4K++M5ptP0wntOfkxaB/9gLhJPB4tSEpcB/JcQCOJf095qpZlESZ+RfE FCEWPt5SlBbssrcysx1Fiv1ZiJCW4YDdYwaoXsOtxM/PmnWOOIf9kaOn79IskhhngPtGL5 QMcRuA5UX8zBvj9l59ytC4EyYgAxRp7Lx2feo3DIc2t6cEG8MzE8gZ7pzYOuYuZka2RjVl 9/JGkdLE7IzDFaqhlKgPfUNasvNgP+PLKCSgY+DgTSsdK5cKCirF4VOifoVTYPCjEdyGNt zXLV50o58/vrgDRoziPwMn5qeEUgrUHaGMyNCfD+CMQxNGoHvUFcqVb+OYqUvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q8dDX4TyONqOujj/8Nab/U/ipMJIVJnYjo8w4mIqeAc=; b=XszSDNQW8CPsZXxoCCkZkCF5VKLDvpVYaly3GSemAbaaMLFSrKsNTPgMbSzS0D18G7kHZC l1rsxBY+sdbM1tnZRhWqEcD1nECMBXX84Qtec93kk2AASvwZ8krqFh1eUT2MSiqQ95jYiZ 73kTUwZMTg4gF2V7HOu1DMyjHh2GRn41rdbeRFNcNA2PCxEIlMPYGWZlKVAFxZN5SH4iu/ 0ZoinocRzsppZP0Cxdo57+0gLjPqy0Qf8te5tuIKYL9ALzzyXmwp04ENWUh+JrIOm8LKct W1GfywOQ2M/AjE3fGPckPh3ESUAu97d6DlfD8ywkM4UwWMLEmj2pLfinhDTRyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029051; a=rsa-sha256; cv=none; b=DHc3Oa2FsE3AlMdU3MtYsAtfISjH705vk3ISrVTZjXQK/zARCVOisQN3zFEMX4ZqXSO9hG 6sqHh45aWjG2vFniHmjVakYRHnLDOqWENn4ZSkO3TTNlCcKGYuCB3O7EZCKbqw09Pusmg7 tJ7AdrigMG8erfvn+FG4+jPHjKpPuyASiOkJ14vfDtXy/OEwGjHuW3VK/xgGwxCCL9/vvC TwGC+xFBFzrFY1bTUi1FRB8zPfG3q9NFi93J245HKPfCutD8L3LCRdliiHBYuN1qdNRRR9 +c2JanJd1/GRe/amMSb3rMPQ3vESp6LhsHYr7NWq1aSSYGc8k2xqn6Ef2Qc9ZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5l3KXkzfLM; Sun, 1 Dec 2024 04:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vV3o096176; Sun, 1 Dec 2024 04:57:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vViI096173; Sun, 1 Dec 2024 04:57:31 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:31 GMT Message-Id: <202412010457.4B14vViI096173@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 4ec46a286b26 - stable/14 - find: Correct ls(1) equivalent command for -ls primary List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4ec46a286b26901d5ee9ac3b405faaa36867e8a1 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4ec46a286b26901d5ee9ac3b405faaa36867e8a1 commit 4ec46a286b26901d5ee9ac3b405faaa36867e8a1 Author: Thomas Eberhardt AuthorDate: 2024-11-23 16:45:27 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:08 +0000 find: Correct ls(1) equivalent command for -ls primary After commit 3bfbb521fef5, -g stopped being a no-op. The -g hasn't been required for equivalent output since 4.4BSD. PR: 282901 Fixes: 3bfbb521 ls: Improve POSIX compatibility for -g and -n. (cherry picked from commit b4ede68c21c6c0277bc283c2bda35f3136e836b6) --- usr.bin/find/find.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index def6a82d0a97..c10380ac499a 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -30,7 +30,7 @@ .\" .\" @(#)find.1 8.7 (Berkeley) 5/9/95 .\" -.Dd January 21, 2024 +.Dd November 23, 2024 .Dt FIND 1 .Os .Sh NAME @@ -602,7 +602,7 @@ displayed preceded by .Dq Li -> . The format is identical to that produced by .Bk -words -.Dq Nm ls Fl dgils . +.Dq Nm ls Fl dils . .Ek .It Ic -maxdepth Ar n Always true; descend at most From nobody Sun Dec 1 04:57:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5y057Nz5gD3c; Sun, 01 Dec 2024 04:57:42 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5x6dfRz4Br1; Sun, 1 Dec 2024 04:57:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GB1AuUYkeKOaDC/Ss5+zhXUKG3+J8UW1kD2mey3QQPs=; b=HbBfuxYXMOFtPjzKv9SWtTyA+CfAHB46FUy2a4xj/l2/5LYpCmcjRYsTgm7Ey4Um4wEAHs LLHeATZ9BS/d8NkAvdcBcyZ0fOURoKEJyFbHeEdA+AII88NyVTzSdcuv9A9YJ2bXCJGW6K qNBskWDrU1ulUVhWKDNU+UK5d/siRb4s0NMqHDVZVitGJIGpWL9AQ3lKMbhSKRs1+iYHg1 8LjHlUrwdO2VMZbJu0a5PKtl+oIqIOj63/YWCT9bIRyeWclYCFNls4yTG/QKC0dU88sFI7 vBq5VxT+7B/fnJ6oX5PtV5WMpM3EbR6LZUr8WrnwLhmmNt+d9PX9MG+Y2EDxdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GB1AuUYkeKOaDC/Ss5+zhXUKG3+J8UW1kD2mey3QQPs=; b=M/r/9bXNG3+56dahzg+GCL6ADhmsYEPdTP3RJiVTo8NniMwV5fyJaFERFntqgjZMgu3jye B4BU+DifPXrU9MNV+7Ufttpv7LkRdN1tFnYHUpVgWYRduQg0G2dP++dt0IvOpLZXAZVK1t egh75Lgf+8Hl4LXSt33WXvzjQId6UkCX2FTGc8WqegRvKYiE+NnW0LsY29+mt/ygha3pYB jn6AR3khinqtdAtOpc2ySYdyBSSx+a1k4QSBJZYNNBSWzyxl6ynlkrJ+pfoPWDO0vXHWfh luJzfJP/tJXPbQrc4heY6l2gWcWpy3PQSiOn+/JERIGe14nnlri6Qp/8j+5ANA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029061; a=rsa-sha256; cv=none; b=oH60SAFVa5a5oDrveNeJVX7QDnvrGbu5Pp6L/7BM5CUgDi05z9vyNyF7iiDXgEf0Z2Cud2 PBe9aG9lWZDJ4L7T1/LBcOWOL4smvq7w8NrtxG2DVJkidxQ5Z+aPVBZzBi0VktaduqW1/r +EpdUgcsdfSVvuJfp0bu+OAQGI8Jeq2l6FXiHXOdPJE2+UAiQEyQOqSBVOXaUyOPx7jyMr 7bGrcXQFZ52iktLe59t3lfQdH34j/zz1CXHPsSa9THY60KnJDUgKyERtofhun/sILjKf0B nqG7ZkQCEgvHSCl4GkIw8V+GqRBJyImcwEuxZ0J4CxHKOiJEigj7B0NbUfOCsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5x6GHjzfNg; Sun, 1 Dec 2024 04:57:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vfRt096664; Sun, 1 Dec 2024 04:57:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vfsP096662; Sun, 1 Dec 2024 04:57:41 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:41 GMT Message-Id: <202412010457.4B14vfsP096662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a845238dd609 - stable/13 - btx: Align the PXE prompt with other options List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a845238dd609a1f18e5b80404545122f498e7f2c Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a845238dd609a1f18e5b80404545122f498e7f2c commit a845238dd609a1f18e5b80404545122f498e7f2c Author: Tatsuki Makino AuthorDate: 2024-09-30 19:41:42 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:28:51 +0000 btx: Align the PXE prompt with other options To fit within in the same space, drop the newline before the PXE prompt to make room for the additional space character. PR: 281494 (cherry picked from commit 4fa4693dcdd8176f1d12cce5f026eb2052036dfc) --- stand/i386/boot0/boot0.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/i386/boot0/boot0.S b/stand/i386/boot0/boot0.S index d92f8dcb05f1..79ff2ec6610c 100644 --- a/stand/i386/boot0/boot0.S +++ b/stand/i386/boot0/boot0.S @@ -588,7 +588,7 @@ intx13: # Prepare CHS parameters */ prompt: #ifdef PXE - .ascii "\nF6 PXE\r" + .ascii "F6 PXE\r" #endif .ascii "\nBoot:" item: .ascii " "; .byte ' '|0x80 From nobody Sun Dec 1 04:57:42 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F5z1cvPz5gDQ1; Sun, 01 Dec 2024 04:57:43 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5z07Kqz4BrG; Sun, 1 Dec 2024 04:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vqqdz5NxiXMIgYGB/mm4jouQkdndFTq3MDbnGDzo9sM=; b=i0aFYdMu4nkzQKd0NPPyKRo4k0DpZITCgjjYBUa6k/+tWFOJizuSuo6bMnCJKASK/NOdyy Vjn4j6YhlJGbjmYvdwIxGB4h3PglTPkcNIQwES/U24pyRgjirzu+nD/qUuCILBkGj6qG89 mjfrZXH9mQmtJTwEwaZ2MXNmz0ghi+cuQsduW3pVX6WvF/3VDpxSaUQLWN8TToxeOx6fGz jHWmS2ifj/KbcwmCVTAGZo+jO1u0HfGb/JBg5TrTyybnkHks1WBJxqiEKsJajmYjNJ8GsX MUPAMwNnG58zjnWSq1bmlRZwZGXzz6TSX3860+MpnrIGU1SvWSstGyzg76p8+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vqqdz5NxiXMIgYGB/mm4jouQkdndFTq3MDbnGDzo9sM=; b=sfU38i3ULeCYYrhJ6Ouvp67s3LMCBH8D7s/PiwbqPQILRy0kYw8by2cdhlKnTGUcVqmNxe iGZG5uHr3l1v/ZZhIvDYLTDFqrlvrgxLGfNTxrJx9JhUgxDaqncaEPmLUNVAO3WYEPEAtc viHPDIA1O3JQsLB0Yb9+mfLy9VLGbpEehULKevikuEnNOEz09+no1QytDpA4Ud28pFqbqD A3q37k+4IasUyl5K2V2o4HY0mUQBJ7VbdM14zV9u8KKbsSGBTVbdq1yI5+HiGr/0DOA6Ui 3R/xKuHtD0tYGSkYDURJXDrvGemg3E1vwW39hbnb3AOFSbejRv/4XXCa6OnB/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029063; a=rsa-sha256; cv=none; b=ZobAfcpn+c1+hnc3AbOHlGb8pW2+HKjbAZt64KrIB2MSVW60P1Po+0EugohRkkztPWKdxe yjTQfxcXyCzGNBp0R2VabWDCVcafiVyV0W+FMfiQH2k0QHNiemFh4EaQpBhnpBTU9o8+Pt xa44OmqNl0WC9jURjzWpUurDWzrs5NgAhwgB8bIBuUxIOaCx/TnyuQjYI6xHFDObbX+HBK xpZ6HG6POqD65lFp+oXiRF0wru3HZTFhKdk8pDPPId905OV240l/doQvE0g7WfF7WSlAMb wvO0rY+D/bcHHIIihazXe07kek4mZEtImwZVJZTl3Wv12iMvL1pH0O2I5eAfvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F5y6sKYzfNh; Sun, 1 Dec 2024 04:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vgr0096730; Sun, 1 Dec 2024 04:57:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vg4L096727; Sun, 1 Dec 2024 04:57:42 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:42 GMT Message-Id: <202412010457.4B14vg4L096727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 05d81feb50d4 - stable/13 - tcp_output: Clear FIN if tcp_m_copym truncates output length List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 05d81feb50d4a757ccdff644b49195ddb5e72a56 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=05d81feb50d4a757ccdff644b49195ddb5e72a56 commit 05d81feb50d4a757ccdff644b49195ddb5e72a56 Author: John Baldwin AuthorDate: 2024-10-02 19:12:37 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:29:20 +0000 tcp_output: Clear FIN if tcp_m_copym truncates output length Reviewed by: rscheff, tuexen, gallatin Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46824 (cherry picked from commit 519981e3c09c2875b136635459c87ab24d3104e2) --- sys/netinet/tcp_output.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index d95174e53789..076562938d74 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1092,13 +1092,18 @@ send: sbsndptr_adv(&so->so_snd, mb, len); m->m_len += len; } else { + int32_t old_len; + if (SEQ_LT(tp->snd_nxt, tp->snd_max)) msb = NULL; else msb = &so->so_snd; + old_len = len; m->m_next = tcp_m_copym(mb, moff, &len, if_hw_tsomaxsegcount, if_hw_tsomaxsegsize, msb, hw_tls); + if (old_len != len) + flags &= ~TH_FIN; if (len <= (tp->t_maxseg - optlen)) { /* * Must have ran out of mbufs for the copy From nobody Sun Dec 1 04:57:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F602Pn9z5gDHQ; Sun, 01 Dec 2024 04:57:44 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6010Dlz4CNL; Sun, 1 Dec 2024 04:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HHpW6px5YTd7n7FF7waPgF1fp8h2+D1I8kIGjQC9xfk=; b=X/eXbA5ZGx+mqTxrGRQFnJ91nBihdn7ARfxDMbEF+vjwkq2CodDf8R23cQTTtWXAHinZNo GIolBpejAbwm8DrYxT/rXwVI1OV6v5jSAkaAJczskcwM+mmb1QSvK2mZ7kRazhFzeGfd7T jB7daqqRseEVdyGEOq3ygkuxAaBzJy+s1AWULa+kgVqsovh3VepOhZErr08G5hn0wtcYFd kBbWn895/MU04P3JLOLV0XbvpVB9ZFMfsf9U6zdffkeM06WpTJiWeMkeOCntdDGgFU9yGA IqSfUkjvfVNPs6czF2Wmeehvy+T1AeiNvYVUIHwtsuCfcsSAvW5eKcJ5Axi2Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HHpW6px5YTd7n7FF7waPgF1fp8h2+D1I8kIGjQC9xfk=; b=NN6FwxOynncOFYuA58qLhXAEinP82jJw2sfvz0Auh+DGBA3sQM8GybXJWG/eXtzlLHBGco ghVPUlv0pEpxOU4BCmcA7OnWq16VxN1Zqt6L2hSYEwnm/pSnc26Ji/eNcyHwXOUbjs//cy 3lTrm1JuPwa3xGSA7wcg07HTPgnbRC2LQ1vMverqlWFvC/2YL005ORyvHJbZX9PAo17me/ mibGmhefpbDKUmkMsuWzEWWkpyydVHDlh4WXdVwz34Qp0o7/ddRjxzVSq6Zvfegon4acX7 M1FG8F6gUfxi8AdTf0WLDjYe6+NK3Ojhhentb2Cu9X+MYsVOhbKJg61lBLL3Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029064; a=rsa-sha256; cv=none; b=hRo6mEdNmY86DQrbViZgyyIrIOPCitxa6KO4d/5OSiDNgM26qI+N8ouwfRL+GsfkKuJfqU iorMS5knr+zNnj48vur0SeG7MuPpmGzk04IrjBfrjQGRh46ZbJzmpPKijtcjWayMHesXDQ 8Ey9uShfNVQr/eCd7H3AnVBbaYRh03BAKTyfyXU2UR9IvkYJV81xlJNFWTo6vWkdwWBG3r pGssOILSoAKto3ak5HIyh4VRwMCjCuIH5xMR/euIYt7K7HjFM36yE1GDuhV99Tr/vdZ31T zRrSFgyRnYJRgMF5trNdE2wCWopM4tXrCgSHBENqZi8av3kB8GuTh/i3vlSZZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F600bMJzfLN; Sun, 1 Dec 2024 04:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vhqE096780; Sun, 1 Dec 2024 04:57:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vhW0096775; Sun, 1 Dec 2024 04:57:43 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:43 GMT Message-Id: <202412010457.4B14vhW0096775@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 664491911597 - stable/13 - device_delete_child: Update comments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 664491911597bdefa4ae2273218ca216b8693290 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=664491911597bdefa4ae2273218ca216b8693290 commit 664491911597bdefa4ae2273218ca216b8693290 Author: John Baldwin AuthorDate: 2024-10-16 18:08:24 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:31:44 +0000 device_delete_child: Update comments This better matches the variable names and the function comment as well as clarifying the reason for the order of operations. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47154 (cherry picked from commit 1ad3351966563b71b9e45803abd5c3e12af3b65a) --- sys/kern/subr_bus.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 9b4a4c65190a..5e76bbeee2bb 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -1968,11 +1968,14 @@ device_delete_child(device_t dev, device_t child) PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev))); - /* detach parent before deleting children, if any */ + /* + * Detach child. Ideally this cleans up any grandchild + * devices. + */ if ((error = device_detach(child)) != 0) return (error); - /* remove children second */ + /* Delete any grandchildren left after detach. */ while ((grandchild = TAILQ_FIRST(&child->children)) != NULL) { error = device_delete_child(child, grandchild); if (error) From nobody Sun Dec 1 04:57:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F614tdlz5gDFX; Sun, 01 Dec 2024 04:57:45 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F612Xq1z4CRJ; Sun, 1 Dec 2024 04:57:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ukUL6Rj8HSLh98ZZYXj3Dfwxz6khwIJDTQn/Vlfw+g4=; b=NZzXxBhEWxnMy+gafaedfci1HcpkaFcoVwYdjS998nI2kEAK4W59NDdQqTC9DIHSt/7eKm 2UkUbi7WyIg5epAL0A2M93hhfOe/QH12xJhyZfMPzLBojCSsVr1c8yCPSE+CI2VL4jBMZA UOsRJbn14Q2QFiGz04ancfZ93gf2Go9/buRD42AX/OYoUfPztVJjdGZalYEkT3OI4VeKw2 2gNuiUdPTGm7iBSC5Xx4ofmf//BhRZgeZHXfL3u+KgRkFc/bcpUkRcXOjhSN6s+qeE0HoN 7j994cxzHe4TZnesb5nbp2xC2raorTD9wdhLGqcG9NtbDvXWwOddX1qwzDWhRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ukUL6Rj8HSLh98ZZYXj3Dfwxz6khwIJDTQn/Vlfw+g4=; b=LG77W8b5LBVZmTmdjk5SsT5aTUZIPzsz8t9bjr/E+C8/sVNEo17hmJUQxwxSEsRMI9/X/B k8oxgOZCd3S/AWecXKVuvQTItvzokcNA8gm9Mnam32eEDy8hGdHnUaPL8bJBNytV8ps/C3 sv60cOH/R337h68k/kkxTcIJBKnuRJiUUmakVsrVoNf4N8t6kQf3sXmlKGwwKgu97LHJa4 W0nBGVA81ijajHszNc5ocwbECV4Z5/3jOP0l76qJdhsld80HGtldwIARXyFhzREPPPxI07 ozw14u/9W02NhtWn0AaXmpCEkXrjuQbF7K+JPmnSDyn31NCX9z/ujRftsy/jIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029065; a=rsa-sha256; cv=none; b=IsW0OZDZRk4Mtc6tg16MB3rm8QWNOKezBjUPMqG4zPv0D8zLjFPPYbl5/L3xp26FZqA6nm STB15XGRBbVQajQ+3KR77M9qtPlzkXiurR1X8IVNBhbMnYSTSFcSg3XTDJQfzMWBSWIg4G QuYJOkedME4nFG8deq2vmVwlJ2r8egylDTc41eL7auyjgSZ2Qc/dZCr39v8+lildSTj67C +eAzsHN8sxQN5+cN+17r0CfQibfUGCY6aiRZIZ/GLHiIhZ0WSWj/pDM4vVCexyJw9ojx+W bMDT8YjSgD1TnY+NXSJ2OGRIVFxPhIB42iDsbUONPUjU/mWH0aUbXFjvEtvbeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F611d1lzfQw; Sun, 1 Dec 2024 04:57:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vj9D096837; Sun, 1 Dec 2024 04:57:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vjER096834; Sun, 1 Dec 2024 04:57:45 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:45 GMT Message-Id: <202412010457.4B14vjER096834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 304744faa13b - stable/13 - device_attach: Invoke BUS_CHILD_DETACHED if an attach routine fails List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 304744faa13b521ce2de5f7817895867d4d11264 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=304744faa13b521ce2de5f7817895867d4d11264 commit 304744faa13b521ce2de5f7817895867d4d11264 Author: John Baldwin AuthorDate: 2024-10-16 18:08:35 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:33:07 +0000 device_attach: Invoke BUS_CHILD_DETACHED if an attach routine fails This gives the parent bus driver the opportunity to cleanup any allocated resources, etc. left behind by a failed attach attempt. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47155 (cherry picked from commit 42078dfb0f72edbf83217cc8c997c0a54d951990) --- sys/kern/subr_bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 5e76bbeee2bb..1f490850579e 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3036,6 +3036,7 @@ device_attach(device_t dev) if ((error = DEVICE_ATTACH(dev)) != 0) { printf("device_attach: %s%d attach returned %d\n", dev->driver->name, dev->unit, error); + BUS_CHILD_DETACHED(dev->parent, dev); if (!(dev->flags & DF_FIXEDCLASS)) devclass_delete_device(dev->devclass, dev); (void)device_set_driver(dev, NULL); From nobody Sun Dec 1 04:57:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F651Z50z5gDCq; Sun, 01 Dec 2024 04:57:49 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F644jcHz4CZm; Sun, 1 Dec 2024 04:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SVXDa7FUOxCZ/epvgu6LB1PwvHsF38txzaB5JLDJuEY=; b=WyEm/PEdTReoFEkZ0lpbsLqfG6uyZiTynVS4SDKV4uwoQ7HnHK1O632BUngKko9WUqZr2P gT6No30e19NUUWkCL7+XMptazOEWdkBmWUyqO8YY9S29x4VvUaQdfK/z7isNABXPtldRNb 9sxQhLNnzARywQxiDZc+qyf3EfJGR4AOF2FmfMMI80S2J2ezCeVKNRXOnzkAjDFXxhg0nx 5mZmnxrYwSgUVmRP1ZLx/RTgCehs5zbsTMdFZHcshim4UcGnQ3uF6rUK4/MJ/p21AJfEi0 oRGuoHwpseI6xnxGWLT/mAFO74HYoDmx+iupns4SzKkYzDEwzg3yj3Gvk5n/9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SVXDa7FUOxCZ/epvgu6LB1PwvHsF38txzaB5JLDJuEY=; b=m6hMtWax1BZl9m0KjG6S/eX7ca+9PDLU9pYeLJDFvWC4lPSPFC2CO7Lgq+NShIRHCxwJOS UxLP9paFtoyMTRgp7Fr/aPGXTf5tC1jl/pW5n7jyKxrm6+Q8/Ym858WdI/PDY/Q9TD+W2p 8oBBCa9Sd6cbEaHl27WMaxWEht7f0eLtBh3czbDbd7KXZxKlQVOA7/bSZRXLphcn7cPrVG g9eX1vVft4hfQ+0icZsXoxemOlVUKYFLSEv77nxnShAX8xh1+hr+YpPFRe9Oyx0ymvT+aI 91dgS9oUrZYaK+S7+NHLMqSKaW2dz1Ocg336FlRXgJfLzAxAq28ppQQN6f9oXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029068; a=rsa-sha256; cv=none; b=PAt9+vbKEUPVgIPFrv+B7G6K72K7wjeE2fFhUhA6hQpFwZ+EpJZtS9PHT9oYXyMMEqywqi Vmowvfcyxxg3vty3vT4ZxlkC3GmF9ZJhWroGLCd/duBkWMdK7QYu5rWFwVpuOe8MyKoSMq ifGUYXGdbescgktx4FhVaOsNyiEDL5b1bozIMkNS6Nfu8qQKe0lV1FFV+nNmY3HUdo2GZD 9fBezMzeM4vSOUDAInL2dRRtbr/+WTaKSCHQFobmmhSoEkY1NA8jBHMxB4ckC3jRJpwfGp MC+MKtv/bO53HY+J6mYZmxTubjeCckTIAzXY2aOxjGe7z5GQAhMKOehTGA79YA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F644KYzzfLP; Sun, 1 Dec 2024 04:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vmj5096983; Sun, 1 Dec 2024 04:57:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vm6F096980; Sun, 1 Dec 2024 04:57:48 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:48 GMT Message-Id: <202412010457.4B14vm6F096980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 191ed65ad2ce - stable/13 - cpufreq: Use a real device_probe routine List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 191ed65ad2ce1b96361b2d05862b9745f9cdcec6 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=191ed65ad2ce1b96361b2d05862b9745f9cdcec6 commit 191ed65ad2ce1b96361b2d05862b9745f9cdcec6 Author: John Baldwin AuthorDate: 2024-10-21 14:24:15 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:34:41 +0000 cpufreq: Use a real device_probe routine cpufreq doesn't have any child drivers, so calling bus_generic_probe was a nop. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47184 (cherry picked from commit ce968b095e75262ba3605491acf6850ce331481d) --- sys/kern/kern_cpu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_cpu.c b/sys/kern/kern_cpu.c index 8d7d9b59bd07..04a9b2ac6c44 100644 --- a/sys/kern/kern_cpu.c +++ b/sys/kern/kern_cpu.c @@ -98,6 +98,7 @@ TAILQ_HEAD(cf_setting_lst, cf_setting_array); printf("cpufreq: " msg); \ } while (0) +static int cpufreq_probe(device_t dev); static int cpufreq_attach(device_t dev); static void cpufreq_startup_task(void *ctx, int pending); static int cpufreq_detach(device_t dev); @@ -117,7 +118,7 @@ static int cpufreq_levels_sysctl(SYSCTL_HANDLER_ARGS); static int cpufreq_settings_sysctl(SYSCTL_HANDLER_ARGS); static device_method_t cpufreq_methods[] = { - DEVMETHOD(device_probe, bus_generic_probe), + DEVMETHOD(device_probe, cpufreq_probe), DEVMETHOD(device_attach, cpufreq_attach), DEVMETHOD(device_detach, cpufreq_detach), @@ -141,6 +142,13 @@ SYSCTL_INT(_debug_cpufreq, OID_AUTO, lowest, CTLFLAG_RWTUN, &cf_lowest_freq, 1, SYSCTL_INT(_debug_cpufreq, OID_AUTO, verbose, CTLFLAG_RWTUN, &cf_verbose, 1, "Print verbose debugging messages"); +static int +cpufreq_probe(device_t dev) +{ + device_set_desc(dev, "CPU frequency control"); + return (BUS_PROBE_DEFAULT); +} + /* * This is called as the result of a hardware specific frequency control driver * calling cpufreq_register. It provides a general interface for system wide From nobody Sun Dec 1 04:57:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F635whDz5gD3h; Sun, 01 Dec 2024 04:57:47 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F634229z4CTN; Sun, 1 Dec 2024 04:57:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gau4DMONW+ixQxcF70KwD40U81Lnfw0gboSGd12MRBA=; b=TOHLkeNYCSifaA1o1nYQ5zZqq3V6+9G/tzMpvjdnrNrtYVYOyAkkda7ewxYTbdvFVQ0jZf GSqDOyLs9P1xA+HrEIEMdFwqAWhqs2ki3z89G+N6tLTDE7WTpHqYPcDHpHvcMR+/tT5w2s yw2S3bmFZUIAqUeqxEbq7XBtYIsUztGM6l4lF0Z1k9qKTJaET4G2afLodEDKtQlM+0tDII nPhYKpUUocMjkCfwNaPKvDNy5DI/9jnr+5uBMuz+E3vWgW/ns2mx1MC9V+GWPxMy4TDANA xO+GNJY7lLsAaAoAL5c0POskAD3iv+f6gqg5u3TY6eHgGiQzvWvjwlorReS0+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gau4DMONW+ixQxcF70KwD40U81Lnfw0gboSGd12MRBA=; b=wMaE5txbQRc/8jLtLKnYGa3khKbeUoC3ZksjwPsBTHXiWOurKPKNHjXy4j1Hq6X/hgOp1W 0CF0AjELLfOi8B6bwvNbFgMi1hweF1d5Cu0x+IJaQNxNeq4CHGGeiIAcPprtkfolZtQO/0 lvhEiWi1FnGnf/pshsqNzSPeXjswQR2RSkgaEVPwLsx2nw6f4wF2mK1K3mSysGUbi2qcRN Xp1a+BWJfVBR3VpS4QPeXFNux6S/l+WTi3yTImhcW5Ixl0wsf3sd1EZXU1iGzhvwCgev49 RF0xEvWjTEBHuupMGe4KAYm9Y/2zrtprpqye1pkMslgbbOczZM1okmDdpsVhJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029067; a=rsa-sha256; cv=none; b=qI+m8Fn4ucjtRq1ZXs6Xokc4XekshjxbaMTJP/gO0jH2bN799SgMDLRDfqpJaZoBI6UHex Kr60Z8litRRw+K137dn3S0RRVcEomrqPGSe/clbp0tGez8+67J2a5+qnrUJ5d4fr1RfG/r KNf6CUnaQ8nq7Rg59/vX8zxAX2SsY5yquglOCvjxwTNtwnl0Zr6p/2aH6VEmFYoAL14YwT fl1nVFkIrW23AzIxDuNJmCpZu08A5XhBi8jFD830ghejl0KB1sz9AY+D/ARIlu2/Gq4RdU 20/c3UxbiIAoRz2+bUqptBjPhFx/TizwMYhtgRa81/LYW8srpIdeAn86PL9oIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F633fD6zf7V; Sun, 1 Dec 2024 04:57:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vlaA096924; Sun, 1 Dec 2024 04:57:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vlNa096921; Sun, 1 Dec 2024 04:57:47 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:47 GMT Message-Id: <202412010457.4B14vlNa096921@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7a230f2fc16d - stable/13 - devinfo: Output device description in verbose mode List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7a230f2fc16d24ce0914a0728df1f9e134a2138c Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7a230f2fc16d24ce0914a0728df1f9e134a2138c commit 7a230f2fc16d24ce0914a0728df1f9e134a2138c Author: John Baldwin AuthorDate: 2024-10-16 18:09:05 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:33:52 +0000 devinfo: Output device description in verbose mode The description is listed in angle brackets after the device name similar to device probe messages. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47157 (cherry picked from commit 60516a51abd4b09095bc70a830e4a2c5c761af04) --- usr.sbin/devinfo/devinfo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 060f272dda79..d7d5c7c0487d 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -135,6 +135,8 @@ print_dev(struct devinfo_dev *dev) { printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown"); + if (vflag && *dev->dd_desc) + printf(" <%s>", dev->dd_desc); if (vflag && *dev->dd_pnpinfo) printf(" pnpinfo %s", dev->dd_pnpinfo); if (vflag && *dev->dd_location) From nobody Sun Dec 1 04:57:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F624tg6z5gDCp; Sun, 01 Dec 2024 04:57:46 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F622zphz4CSK; Sun, 1 Dec 2024 04:57:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hg4xE94pnSLC/MEt8FMa+iAG8wodhfo0RS+18bcT5GY=; b=bL/6hQh8Sa6AftzIGz/jNT4nKJkOlGiCJpsce29O6Jo66TAvXciAluOdyqskOBaaOr3nGV NsOm+mmKuJveveA5V7s4mZzjQenH8/wmXw6DI/BQkks5o2Gix748ygp56zGhllE178HW5J f3VbSHeXuF6Qc2N/i08xdX+oOePxIitpDOk6CJqHpN9/xsio2VNIAu7lLm4aKgtG69QubB 6/NRi2dc6ntHJqejaQvB5/lKqwNVzyo0psc0jsVI7YuSPeL9qmKoZItKBaQ5jgkTy4IgW+ DwojYhNU98i/xc+t7imumwmd/Jlpy7+1y4ZRLCYuMz5GbBQHMqCifc1GMj9EEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hg4xE94pnSLC/MEt8FMa+iAG8wodhfo0RS+18bcT5GY=; b=OyG5OJPJlqlKoWhidY3n2Gj0fH4jdhURMIKhfmVV6CFuoqV0vSFdA0R+949S166CG7/qph TdkV94UjEfbTQBstMeLDkLGjggVBoH7Lx1Db1SduvamO6oXjOVafIbcm1rUOnVOXm08R1M ieQROSrtcxcGLbLoLfvKCxUtfukSiuLkVY9CVsQpSiYkN1tgkY/XqXsrJWj9fC0n3fo+n/ jS5ogxuchsw5ITM5GInN8etcJSHiAsmbacKAwsYksS0vTtzwH6/7acUkP0123+1QZO0RN6 ElZTp6EvsK49xcMX/NJZXxDtR7mZ3tHIpg+u0wbZxefQ7tS3R+ldofGmpCBp9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029066; a=rsa-sha256; cv=none; b=V3xQ8DgZrwBLq90NrftbeegTutg67HDpAIksxLkf+S36DHLB+tOfMmGvG8qkEjUgVqbPi0 mYY7G/byuxZWkRhX1i6mWb9k8eJ/DxBUTZBeEgesjIOYL2hOOqrkPSj1Ngd9OcMhJn/9WR HB9tWB9iQz1qHvxvRYtWK5syp33lVxye4H6TE9oTFzzpU0lhdpbyE5+a3gxZnKyUyg+Fel /i3Otnc1caFvJTVQUY15WMKGS6IXNLxPjaMYXTN8c57yA8RlFammc/VoNTor025SiXNh86 O/uwFGTeH4o95ef/qa5PP6/uvHEtF0xUHmCucpH41Bvg3Bz0uYI/NxK+JX6OkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F622cTMzdwc; Sun, 1 Dec 2024 04:57:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vkH1096876; Sun, 1 Dec 2024 04:57:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vkQP096873; Sun, 1 Dec 2024 04:57:46 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:46 GMT Message-Id: <202412010457.4B14vkQP096873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a52372fc472a - stable/13 - bus_generic_detach: Remove redundant check List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a52372fc472a98b2dbbfd92261713abe1c5cea13 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a52372fc472a98b2dbbfd92261713abe1c5cea13 commit a52372fc472a98b2dbbfd92261713abe1c5cea13 Author: John Baldwin AuthorDate: 2024-10-16 18:08:49 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:33:38 +0000 bus_generic_detach: Remove redundant check device_detach() checks the device state and only calls a driver's DEVICE_DETACH method if the device is attached but not busy. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47156 (cherry picked from commit 3342afcbaf42c2e6a4604c84e267901411e790ca) --- sys/kern/subr_bus.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 1f490850579e..aec5b4c615fd 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3839,9 +3839,6 @@ bus_generic_detach(device_t dev) device_t child; int error; - if (dev->state != DS_ATTACHED) - return (EBUSY); - /* * Detach children in the reverse order. * See bus_generic_suspend for details. From nobody Sun Dec 1 04:57:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F672mmGz5gDFg; Sun, 01 Dec 2024 04:57:51 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6671Qjz4Ckc; Sun, 1 Dec 2024 04:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53OmtrtWkllGrg7gLbpjSPDR13Ce5zLckt93KoW5WrE=; b=XFSPt+RQWUnbUYtEa8BVLBASW9vcWrC1yWv44clLpBOj/lSnnVInUEi1e/i2j14N6S6wSx qP0AC2oxMdKYQNQYoT1i5rnmsSIBxACB0afv70zztilCQZqCOjcgywMybdCOEXRPd4ZuRM j4XqxfYWPUEz4aE1mZpa/XT5rbMCjTc7YNKdiE2Fkp2yC/4Avejr791g1KBczt7b585Aq8 KFe7+BFR7Smyj3TYIZTyPtKeFF9/yUPMKk3x0/E1OTVcnFwCWUfCJBq9IOCGGLu0yjQFU+ Wtgwvi3MbBVBdQCxgauN2T3nQV4SMmVhBZRSmRY552n6xVaPi09d8DInXtQeHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53OmtrtWkllGrg7gLbpjSPDR13Ce5zLckt93KoW5WrE=; b=v/bziijNxB1y1uL9CmIbNx/3x7oEXncNuhOduUU9OwECSor5UKraIB06DtGBbW25Zfctgu mV/JBKB8skmff73HTeP9DYG2Cm3U3L4b12NxXsvruOyidJyprSaJRtEr2iOuv9LZgYbt9T G8NKWdrUBB0WYuoKpgNWl8adeTqhpqLPYGrIqxNrZhCIMIm/sph7HRNYUop51mxelRufYT S4nA5cqhc6jIKyueyphEIrZ12SpZiBS+H6LB50sQqUs1e/30MyPDTU89Ky6vU2MVGYG+Xr EqN2XL6n5blh5gX+V4ASY5g6NRz9j8eSfvRPUlkiq/zIrzhuTsyZMJ0vA/53UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029071; a=rsa-sha256; cv=none; b=yPpzc8k84NEKaxujLp8G4ycwHyUrWO/OHjv7FSn16FeF2fvsfR/tv8BHw5XkJnNiLgGrUZ bpDkZg/jpTZR5Sa5mOfPm4FjC2y6poMY9ggTV19EofQq9z/FGZy7Mpx2B87zWevr7B+Rst KsUbg9sNX+an0a5iIEH/40Mzg1fWZeITf/P3fqLQQuezS0fXDwsobTZDM3m0rBlyy4QvuD nR0CSBjw6mSK5UiKADOKnZtcvEh/TL8oO7IkA70nzL2U2e9/dcftpkLm3w2DcREPqhpDyL bbtrk54bZBSw49VehmJAznsAgR5pSLbcNzIGImi/M8anQZIhP6cd/oM+Svo83Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F666dJwzdn5; Sun, 1 Dec 2024 04:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vovJ097102; Sun, 1 Dec 2024 04:57:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14voDF097099; Sun, 1 Dec 2024 04:57:50 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:50 GMT Message-Id: <202412010457.4B14voDF097099@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 3e50ccca4cb2 - stable/13 - Use bus_delayed_attach_children instead of its inline implementation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3e50ccca4cb23d8382fa427604698a33ed0ed900 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3e50ccca4cb23d8382fa427604698a33ed0ed900 commit 3e50ccca4cb23d8382fa427604698a33ed0ed900 Author: John Baldwin AuthorDate: 2024-10-21 14:24:39 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:36:44 +0000 Use bus_delayed_attach_children instead of its inline implementation Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47186 (cherry picked from commit 5201decc8b431a8f4f53efb8db5fc452557de68b) --- sys/arm/xilinx/zy7_qspi.c | 2 +- sys/arm/xilinx/zy7_spi.c | 2 +- sys/dev/iicbus/iicoc_fdt.c | 2 +- sys/riscv/sifive/sifive_spi.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm/xilinx/zy7_qspi.c b/sys/arm/xilinx/zy7_qspi.c index bfb1f69f5cf2..077dc7c660a2 100644 --- a/sys/arm/xilinx/zy7_qspi.c +++ b/sys/arm/xilinx/zy7_qspi.c @@ -603,7 +603,7 @@ zy7_qspi_attach(device_t dev) zy7_qspi_add_sysctls(dev); /* Attach spibus driver as a child later when interrupts work. */ - config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + bus_delayed_attach_children(dev); return (0); } diff --git a/sys/arm/xilinx/zy7_spi.c b/sys/arm/xilinx/zy7_spi.c index 8c8a507374ff..fe04d1c71196 100644 --- a/sys/arm/xilinx/zy7_spi.c +++ b/sys/arm/xilinx/zy7_spi.c @@ -440,7 +440,7 @@ zy7_spi_attach(device_t dev) 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); + bus_delayed_attach_children(dev); return (0); } diff --git a/sys/dev/iicbus/iicoc_fdt.c b/sys/dev/iicbus/iicoc_fdt.c index 4eedc0344593..f3ebadb4e670 100644 --- a/sys/dev/iicbus/iicoc_fdt.c +++ b/sys/dev/iicbus/iicoc_fdt.c @@ -125,7 +125,7 @@ iicoc_attach(device_t dev) } /* Probe and attach the iicbus when interrupts are available. */ - config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + bus_delayed_attach_children(dev); return (0); diff --git a/sys/riscv/sifive/sifive_spi.c b/sys/riscv/sifive/sifive_spi.c index 2d9643bc6f5a..1f3d06a9f71b 100644 --- a/sys/riscv/sifive/sifive_spi.c +++ b/sys/riscv/sifive/sifive_spi.c @@ -347,7 +347,7 @@ sfspi_attach(device_t dev) /* Probe and attach the spibus when interrupts are available. */ sc->parent = device_add_child(dev, "spibus", -1); - config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + bus_delayed_attach_children(dev); return (0); From nobody Sun Dec 1 04:57:49 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F660rTJz5gD3p; Sun, 01 Dec 2024 04:57:50 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6569z7z4Cmt; Sun, 1 Dec 2024 04:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VtO87J8rBB/2xNvRHJrnMewsFrMr2vAIcx5oHNVOxxg=; b=nDWPy3sAAqTxuP93Vo26ixraW8TrOtorgntnGXzgZfTY0XZTJLXfHvnDtwLPfMaDVeHp1p pxMbMIEdjnRQgRZfq+9gBPwmNIQu7A7yvbQxnKBLZ8594ohz8ahI2775ST99/lR+1Epvw1 SojUZPsyr+EWJjxiRTEwpJlebCZYhbpId/O9rC71kSaKF8zkxrahVfcJr2pTQPgkIxZ8Zw UwlqfyidwX/IGLx4cYOhFDHIIRSRWXPOkV8XFjbKr90piYfJO0MouTJ/N8nbuIcJdQOTjO A50JU9/D9ngd+kq8IAh12EkKfW6+Shki7j5/O3SDmJn8/YR0MTiHB5uOc4x9Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VtO87J8rBB/2xNvRHJrnMewsFrMr2vAIcx5oHNVOxxg=; b=rZ/vwgpsBcrWhsAvHaA8JohdMiHATV4ZEY77DRRmpgNm5Vhdtyiaa6sTYU8Tmc4W0yQTS9 VL0ZyPnUzHoLj8hRHqiowfXBunsq7I+mRHW1q0fcC3C7+yjQsrz7u8Aw0ZgPjCWiaVgyJW MuD/hQhlarspEYKI4oUR1/UWHRLOnxODUm+gWsFW5eIWePlmrwiVl5rU/bkVDqBpjzb4nP cQwPC845H8KEg5dN78i7YFeSJxpzrosXH6nEeUFEEIH5vLsxg8sUlt/GQamuB555rqVx7o LfYPG2/wCqBiUbOk7BAPu00g97QV1k6caN34cYnBmWj0zSyNuuJZ1SIHZBXbig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029069; a=rsa-sha256; cv=none; b=TmPJY+8SRg/GXl0rDUh/C0aQqzFZ8lC5MZhnATZzuu9TS6moVzMdRa7y9VvoEy4pONfvwT W2pOvO2YKlS+E0kapl/LZIVFm9xHmydDTCRo6Y2rEzmIF/Muw0f7h8scmfODqD3nOJLiXL C1YmtYOP0xXPfEH885taNvg6sL9eN80wG0b+LdFyRQrZMC0ux8o4BIRhvg4+hVI8Hd2FR8 Ddgvou59O1ebzJ4w1iwsFvUSub361SuGmuCl+vbm76n//mCYmCDBoIIfR4GUvU16S9+kD/ 6Lf9gVCZzrgO59MYqC/W+JqFKEGjo6pBh9VXOJK9l3vwtXgIjKWvPda8CdbHrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F655fTczf7W; Sun, 1 Dec 2024 04:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vnXr097044; Sun, 1 Dec 2024 04:57:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vnt1097041; Sun, 1 Dec 2024 04:57:49 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:49 GMT Message-Id: <202412010457.4B14vnt1097041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 165e8ecbea01 - stable/13 - legacy cpu: Add proper device_probe and device_attach routines List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 165e8ecbea011e7661dd48c67579304daa570270 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=165e8ecbea011e7661dd48c67579304daa570270 commit 165e8ecbea011e7661dd48c67579304daa570270 Author: John Baldwin AuthorDate: 2024-10-21 14:24:28 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:34:50 +0000 legacy cpu: Add proper device_probe and device_attach routines Set a device description in probe and handle both adding and attaching children in attach. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47185 (cherry picked from commit ab4f969f8d305665c478b25d4268501445fa5ba6) --- sys/x86/x86/legacy.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/x86/x86/legacy.c b/sys/x86/x86/legacy.c index 3a5e878be7ed..1bbaf31af0ee 100644 --- a/sys/x86/x86/legacy.c +++ b/sys/x86/x86/legacy.c @@ -268,6 +268,8 @@ legacy_write_ivar(device_t dev, device_t child, int which, uintptr_t value) * cpufreq(4) hang off this. */ static void cpu_identify(driver_t *driver, device_t parent); +static device_probe_t cpu_probe; +static device_attach_t cpu_attach; static int cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result); static device_t cpu_add_child(device_t bus, u_int order, const char *name, @@ -282,8 +284,8 @@ struct cpu_device { static device_method_t cpu_methods[] = { /* Device interface */ DEVMETHOD(device_identify, cpu_identify), - DEVMETHOD(device_probe, bus_generic_probe), - DEVMETHOD(device_attach, bus_generic_attach), + DEVMETHOD(device_probe, cpu_probe), + DEVMETHOD(device_attach, cpu_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), @@ -331,6 +333,21 @@ cpu_identify(driver_t *driver, device_t parent) } } +static int +cpu_probe(device_t dev) +{ + device_set_desc(dev, "legacy CPU"); + return (BUS_PROBE_DEFAULT); +} + +static int +cpu_attach(device_t dev) +{ + bus_generic_probe(dev); + bus_generic_attach(dev); + return (0); +} + static device_t cpu_add_child(device_t bus, u_int order, const char *name, int unit) { From nobody Sun Dec 1 04:57:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F693Mskz5gDMX; Sun, 01 Dec 2024 04:57:53 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F691nRzz4ChG; Sun, 1 Dec 2024 04:57:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1JxIS1J3ALtrREee0yuSf++oecG69laBXSU2ZqZWvBo=; b=l4Rt0WVi80UfcBlNyvMYpFiKJhf+HgJS1F5Jtwz1vIiLr8h1E68OhwyeHJJIuVj4nbvbgV BziHUE95pY/XXZtQ/wrVv9LNZxZR0qkovDaXozdQjfR1PZAUqXfY+ZlcZV5z91AspVwj5U oF8Esf+bLyvdcWDwZE6l4ZnuaSy/ucqrqg6zfRKzBXEk0TjD5lmnWgXAylNBt9zW7O/uao sQDvCnd4uhzNzUPOvj2m5Viqdub5MUk7r5fEYC3RPbuanOEM3DK6k6K8U7AjRYpcsyCLr+ aEVyPWp38x2XMsG/dL8Su+Nhmi54bQRo3Q4SpyfpwxqtOEpLPArrNDPUJtwsMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1JxIS1J3ALtrREee0yuSf++oecG69laBXSU2ZqZWvBo=; b=SE1Wlx4zfCE5ErBNGw4me7GLwbY9pwksAB2ng0ErB5lQtX3C2mlBt29oqtrNJaHn86txCn EfQa75XMBD+5w7IXIeBi3XeFJBJW3q36HIR0ri3KKu2LpOVJjtM5ccjFY7wqqGFnvmknLI z8SVDUK3lGLNWtsqHQ3isk1GNllQFm5afJnqNLqI/gB2eKu2iBEyjnzqMJzU6iVRqLP3Rk m5ChrnMDexzr/shyqYBDATNLmps8WRZH2oGO3HNVL6qqVfbGdokpD7UTOAau4is7BDVyk+ UM26JQIuOJKjWC/iyj3eQOyg4IF72+O0+pnRv0SujicPxeqMW6+UnUiJ1oxtLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029073; a=rsa-sha256; cv=none; b=bclahVSraZ6J4dfqrryQSnjr/pS1syhtXq7WvswiL3UGXN1Jy7uGSNF94CBOySH6Gq+uYo YAmzahv+e/2wrJE9upqJa4ir3v6TPe8ADgOc4N8kjk7eJWMbyrOYrmzqV3wuLZjGGqytLB BGsAZkFxwGQ03S32BsK/KxJ1pr96PADGBbpR/frKQOznhy3lM5DFhxiQqSLIaMh+PX36OE rC6lcY0bbFK/eSrpeQ/EFcHPYenUaO72AUNBuOtFAxtHkcGvAbLkx68wZYSftkz+k9L1WG LMesPa5vTUtbEaSUVJBIqadmH2zlOStZ9rnILUSJrRjqZg3TzhQj8kxrAVQouA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F691NHZzdn6; Sun, 1 Dec 2024 04:57:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vrat097192; Sun, 1 Dec 2024 04:57:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vrHB097189; Sun, 1 Dec 2024 04:57:53 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:53 GMT Message-Id: <202412010457.4B14vrHB097189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1ea0d07628d3 - stable/13 - ctl_report_supported_opcodes: Handle invalid requested service action List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1ea0d07628d3927304f5d684eb2c153aeaf925d4 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1ea0d07628d3927304f5d684eb2c153aeaf925d4 commit 1ea0d07628d3927304f5d684eb2c153aeaf925d4 Author: John Baldwin AuthorDate: 2024-10-21 14:53:48 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:38:48 +0000 ctl_report_supported_opcodes: Handle invalid requested service action Service actions are only valid up to 31 as they are encoded in the low 5 bits of byte 1 in CDBs. Fail requests with a requested service action of 32 or higher with an INVALID FIELD IN COMMAND specifying byte 4 as the illegal byte. Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D46611 (cherry picked from commit 0e3a211961014e0991a54f583b2866ac19ed0e76) --- sys/cam/ctl/ctl.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 02feb19cd8f0..6a782b79fa7c 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -7498,16 +7498,20 @@ ctl_report_supported_opcodes(struct ctl_scsiio *ctsio) total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; case RSO_OPTIONS_OC_SA: - if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) == 0 || - service_action >= 32) { + if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) == 0) { goto invalid_options; } - total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; - break; + /* FALLTHROUGH */ case RSO_OPTIONS_OC_ASA: - if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) != 0 && - service_action >= 32) { - goto invalid_options; + if (service_action >= 32) { + ctl_set_invalid_field(/*ctsio*/ ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 4, + /*bit_valid*/ 0, + /*bit*/ 0); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; From nobody Sun Dec 1 04:57:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F681vbMz5gDFj; Sun, 01 Dec 2024 04:57:52 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F680lpBz4Cnf; Sun, 1 Dec 2024 04:57:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q70V0mImQRh8OUFVQ7P7XA3CiwILdh+480oN44KGsiE=; b=diXMWsyD629VTgaXcVpWTB0wj+T33tARGRf0q2T/qO5OSpjo9/wojLvv2Qm2vGEAwee6N8 f5qbOGg9nz50Ho1srug/Mw5bOnzICU6CRzNbSQT/uBpaKW7o4RN58JlgcEyYJ0XY3+f1F6 2GmeCuaCA4xyyR/6DwNVnBQoyejg8n78+PJ9TVMpi7zv1bGhVRcG2qPRc0vOK2AglYarDW rOOgd7jlSAwwNQxiUfy5rFQ6/uK4o6emqD7gnCw/o+UwMOt0ng1gDyLZeXpq6xIEnPHp0v jqEb0fWoXw2wAEl8+Joh8rBdcVvFIpJ3uzn+yO0DIs9Nv4aZyZWDYKKhfD8/nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q70V0mImQRh8OUFVQ7P7XA3CiwILdh+480oN44KGsiE=; b=OUTkkgn+fMUTwn327r0hTmpfs+39pD9eOGbMakCWlTlvFRIijDojKflIeVVuz3utjzm9cf 5NSqDmG4Q6j2iAnVY3P140expVkGoEwT11Un6bowKrUvjO+4EXwXXUMTAIIQNVIc+5GQ8i 1Y17DDeOXLB52mSsACZxzeavDOpX8+lcM5MSdWxkQfzIhJG+qalj3a+aX2yHz1PukXvWk1 dIDDD7Q0AGlKENRBCSzzV6rq9Zz4erEeKAKail3vnBb7zVqEuc1a1SQW6BmeYZ9Otpnlv5 bCvw3YRTZTf/9T6XYVzaarQ2JXQlkPHcARjn76azueEwgk7cKWuZ1cRx/dnPFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029072; a=rsa-sha256; cv=none; b=sp/cMGWsSF58FSXNg5BcE5YJZTSll7nbrpka7242lyt52K2FT5DgJ4EWhh4o53paB7edQG 7tJqftwjRyBmRCU6Otrcn1AH0OCkiA78TMD7M18v1YO62FnvS/Z9qx4z0vCpli5eSHhh5y 55ES0EsS9N/SfzLokwdnX2Dip1eDS66vl53ChR5/FPkI7cX1OyH2Yv40VY2ptuNFmnsdom XM9goms1hHcFZsxMf0w1csX6mgs6egcY/G9MINrTJS34SWZHciFsMWvzdMrFXymdbEtxM5 CZm1wJ2JrD4WXAZezy6gxqx/qDs3gUagYhs4ZaTMFow2OclvSon4FAWuboaRyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F680KFBzfJD; Sun, 1 Dec 2024 04:57:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vpRc097147; Sun, 1 Dec 2024 04:57:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vpXf097144; Sun, 1 Dec 2024 04:57:51 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:51 GMT Message-Id: <202412010457.4B14vpXf097144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c93b892f71cf - stable/13 - ctl_report_supported_opcodes: Rename invalid label to invalid_options List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c93b892f71cfe1e624b82adbba8492e460a8f235 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c93b892f71cfe1e624b82adbba8492e460a8f235 commit c93b892f71cfe1e624b82adbba8492e460a8f235 Author: John Baldwin AuthorDate: 2024-09-25 14:20:22 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:38:28 +0000 ctl_report_supported_opcodes: Rename invalid label to invalid_options This error handling is specific to an invalid value in the REPORTING OPTIONS field of a REPORT SUPPORTED OPERATION CODES command. While here, reuse the label for another case. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D46775 (cherry picked from commit 0063ef79f9e6b9ad47969af3b94ae63e7888852c) --- sys/cam/ctl/ctl.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 13b7995fd74c..02feb19cd8f0 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -7493,33 +7493,26 @@ ctl_report_supported_opcodes(struct ctl_scsiio *ctsio) break; case RSO_OPTIONS_OC: if (ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) { - ctl_set_invalid_field(/*ctsio*/ ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 2, - /*bit_valid*/ 1, - /*bit*/ 2); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; case RSO_OPTIONS_OC_SA: if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) == 0 || service_action >= 32) { - goto invalid; + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; case RSO_OPTIONS_OC_ASA: if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) != 0 && service_action >= 32) { - goto invalid; + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; default: -invalid: +invalid_options: ctl_set_invalid_field(/*ctsio*/ ctsio, /*sks_valid*/ 1, /*command*/ 1, From nobody Sun Dec 1 04:57:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6B5TFmz5gDSV; Sun, 01 Dec 2024 04:57:54 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6B2h9kz4CYd; Sun, 1 Dec 2024 04:57:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CLKQHaX9Z1ZvOM1Z/6JLVV+zUUrKUEYFR6fZxWTXd4c=; b=S164n4mBwtZuF74xl/g08QWYw5xrj8AO9lo7x2BWYcDGtIx/O8PeGsqarZ145vcCIn8Ujc 3Fir39ZDZcLiHMefSPsqC1TnQUae8Jx392Ua+Zc/gDwB1RjC2jx0iXNiD+TJLkyh5vFJCx FXAz019OvZWyuDUCr2LP93LcQM5Nf3pI9INwcqlQC5it2Pk0x2coNk+H0cHGnC1fIo+q1f oxznQBXn1MNLEjKNxlNOKUXcTI15aEBjDHXFdzZ+c66J1LzcL88SEbJpM2as/LdsmMzHSl AFqFy79dv63buZ44MaMnG+yd73NAW9jc1uJdEm95GlL/Q1W+tUhTAykeSvYMFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CLKQHaX9Z1ZvOM1Z/6JLVV+zUUrKUEYFR6fZxWTXd4c=; b=MpZ8KGnxPTlF5EQNDAVINU4xzXj3RBR+E69S/jznUs7ydgrL/+rlFhhXyFmtrxGxQCSSnB y3XNcQ94hl15R6e/K3oQ9Oc689ZCes6h9cLOtI9srPEYzzCfbzwM52BDtH1L836ItCPs8i s3gc9kANbTrDHHTySnhloL7a6Dv1SGYvFBaoO9g763Y420h9aikus7weDRzMlx901BLK7C EwoRZowdY2c4p54BSt99f6FTacAH89aKe9ZWkPrHABHoOgKJWZpi/ZpbEL+wT43OovARut vbupjyD9pyP5effBJXqB+jLSDzNsAoPM8eqNB8Zh8Bs/AR5HK38ELpcmusIjNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029074; a=rsa-sha256; cv=none; b=CYlsazyXDkKjc78Jf+nQi4OcCAFFU/uOfMCfDhQeuLfD267HHlXEzd1c9G6LmIIIrijjHm 5MWFe3dmV0j41v+T64fmFerd3WEWI5QVSljVUZAIb1JPPcGktMcGNZXsFldtL74eVciQ6C Wpl8ikBKFLfn9e10MI1kdn0FPC/zq7EHeGJCjbTFgeLE2cTkNVLji5ggG94jHuq9iqL0g9 VJOSzfZNFioD5occPHZMYGb9xtwI6FTQniWzy4dKHv0VYbKNe8nmDW5nlBxh4P2kmltrny ACWbOg2h26ALiHXJlcDVHXLFthkBGVdx1aV/FYYZZq/3SkePlsfJBqwAeJLxrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6B1tdCzfJF; Sun, 1 Dec 2024 04:57:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vsZq097257; Sun, 1 Dec 2024 04:57:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vseD097254; Sun, 1 Dec 2024 04:57:54 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:54 GMT Message-Id: <202412010457.4B14vseD097254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 11592af90f0d - stable/13 - csa: Use pci_find_device to simplify clkrun_hack List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 11592af90f0d902c979097df3a583b07ba5a419d Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=11592af90f0d902c979097df3a583b07ba5a419d commit 11592af90f0d902c979097df3a583b07ba5a419d Author: John Baldwin AuthorDate: 2024-10-24 14:18:53 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:38:58 +0000 csa: Use pci_find_device to simplify clkrun_hack Reviewed by: christos, imp Differential Revision: https://reviews.freebsd.org/D47222 (cherry picked from commit f0bc751d6fb4f7fe46fdaa1486b0ae20b04bb544) --- sys/dev/sound/pci/csa.c | 47 +++++++++++++---------------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c index d84d2a1e9310..caba61d31def 100644 --- a/sys/dev/sound/pci/csa.c +++ b/sys/dev/sound/pci/csa.c @@ -114,46 +114,25 @@ static int clkrun_hack(int run) { #ifdef __i386__ - devclass_t pci_devclass; - device_t *pci_devices, *pci_children, *busp, *childp; - int pci_count = 0, pci_childcount = 0; - int i, j, port; + device_t child; + int port; u_int16_t control; bus_space_tag_t btag; - if ((pci_devclass = devclass_find("pci")) == NULL) { - return ENXIO; - } + child = pci_find_device(0x8086, 0x7113); + if (child == NULL) + return (ENXIO); - devclass_get_devices(pci_devclass, &pci_devices, &pci_count); - - for (i = 0, busp = pci_devices; i < pci_count; i++, busp++) { - pci_childcount = 0; - if (device_get_children(*busp, &pci_children, &pci_childcount)) - continue; - for (j = 0, childp = pci_children; j < pci_childcount; j++, childp++) { - if (pci_get_vendor(*childp) == 0x8086 && pci_get_device(*childp) == 0x7113) { - port = (pci_read_config(*childp, 0x41, 1) << 8) + 0x10; - /* XXX */ - btag = X86_BUS_SPACE_IO; - - control = bus_space_read_2(btag, 0x0, port); - control &= ~0x2000; - control |= run? 0 : 0x2000; - bus_space_write_2(btag, 0x0, port, control); - free(pci_devices, M_TEMP); - free(pci_children, M_TEMP); - return 0; - } - } - free(pci_children, M_TEMP); - } + port = (pci_read_config(child, 0x41, 1) << 8) + 0x10; + /* XXX */ + btag = X86_BUS_SPACE_IO; - free(pci_devices, M_TEMP); - return ENXIO; -#else - return 0; + control = bus_space_read_2(btag, 0x0, port); + control &= ~0x2000; + control |= run? 0 : 0x2000; + bus_space_write_2(btag, 0x0, port, control); #endif + return (0); } static struct csa_card cards_4610[] = { From nobody Sun Dec 1 04:57:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6D6HNLz5gDHf; Sun, 01 Dec 2024 04:57:56 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6D4Fm2z4Cpf; Sun, 1 Dec 2024 04:57:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=chMVs60EiLkQTz3HTKO2HYnEL8zVMST4RGiliwvjOSM=; b=NUvhDk+Jasqr50dGqeWyzjEc9RJxjPKZBkFGibkOuIc/dd16jS5ALYkweooskOP6yxTRM3 1qg6Ry9KJIqll3jmVxDBgYtoPHJBmGlmrcoXQADCvy1OZ1GimiDiI8pbbY9lQONsIXwXRu aLmTmpbFLPbT494q7h4JWAiBCvkhB1YG5V+vkKphx9oWj39wzJaW8bOdyhqJcrQTaRDMkT u7hkHkczO+kjnJqzXxYyBZFyE7Rlr072qeq/fTs/77jf7rQeonwYXAd9pKfxkfyzjhBVYX dMRLgjhMXfmtnawHPJ8GbhKdXQc8ryLiaItjhEVpPAXt7vBcraF8yrD8mbCAOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=chMVs60EiLkQTz3HTKO2HYnEL8zVMST4RGiliwvjOSM=; b=sVwE4hc6GY4jy2LVat1EzZXRu2l/QyDReIW3C8eiEJZIRvmrBj0ouKGpKOD8UWLXJk+09X FpJeo1ferkX1XLIMpkxwU5/fgVQIjUePuovjkRBOylddVTuNJUyImF89w5jimJgyiN9zP8 Q9ZEe7Q70LmN3Md7ySfttQ/29O4RkxBg01P1Thl+tW86TBsVfo1r1sMfiOf5tjbVIHvL4U kbTnXxp2u/0h80AZWogv73a3DHbCYy1+BsmuE9dXm8ATCNc6XeyRY+rvw3B+MjWe/8wNSp 1Fd3EQb7YU2CbdJ1YhEKYlCcXv2jgfEpYog3ilrKMY0/TRmAo/S+1T0X6U4hnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029076; a=rsa-sha256; cv=none; b=JQNyxUb+vqp5PbyGkctiV5vgNVNYNp9yUOha6rNQLP3MvilLg8OjqJX1Ix4740PzjjktsY m8CbolRfCWcetSM7bcGWmvOuVvF4PUIwKklF3oOiVzB0QgFqegVNp5CbgIYToNjLBXBCH7 ivnVm6Kw7q0pUcfNPf34iZKdei3Z0nb1pMUKI8SkGxEQeeH9j2pJ3v9Fw1NOgLZiNgt/3P +rp/1ijN5ZcEwoBXRADyIzVR2hGlfNGH7a2ompqg6p1gkSO1NxtD2IAXamKTjIKHntacH/ egqVQlj6a+Db/VIzTWASfZPI0JNydbKQ9bGgwNAYJOaL+aBfMeG1xBpjFLnq1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6D3rN0zfLR; Sun, 1 Dec 2024 04:57:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vu9p097370; Sun, 1 Dec 2024 04:57:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vuBq097367; Sun, 1 Dec 2024 04:57:56 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:56 GMT Message-Id: <202412010457.4B14vuBq097367@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 12f6518570b8 - stable/13 - ignore_pci: Add a proper stub attach routine List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 12f6518570b86eee8223a69ff6b4db98c983e07f Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=12f6518570b86eee8223a69ff6b4db98c983e07f commit 12f6518570b86eee8223a69ff6b4db98c983e07f Author: John Baldwin AuthorDate: 2024-10-31 19:49:27 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:39:16 +0000 ignore_pci: Add a proper stub attach routine This isn't a bus driver, so an empty attach routine is more appropriate. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47220 (cherry picked from commit f2e50ce0a37a40363b7ec6a165aa0b0a2e81ffc4) --- sys/dev/pci/ignore_pci.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/ignore_pci.c b/sys/dev/pci/ignore_pci.c index b60518e0ec75..bd80c9db3250 100644 --- a/sys/dev/pci/ignore_pci.c +++ b/sys/dev/pci/ignore_pci.c @@ -41,11 +41,12 @@ #include static int ignore_pci_probe(device_t dev); +static int ignore_pci_attach(device_t dev); static device_method_t ignore_pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ignore_pci_probe), - DEVMETHOD(device_attach, bus_generic_attach), + DEVMETHOD(device_attach, ignore_pci_attach), { 0, 0 } }; @@ -70,3 +71,9 @@ ignore_pci_probe(device_t dev) } return(ENXIO); } + +static int +ignore_pci_attach(device_t dev) +{ + return (0); +} From nobody Sun Dec 1 04:57:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6C5BXpz5gDLk; Sun, 01 Dec 2024 04:57:55 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6C3WvVz4Clj; Sun, 1 Dec 2024 04:57:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GPd35OHO24oTSetY4UKFzy8M0m2SG3wZXm0oDmFP6To=; b=aUvTmBi/2yFozotL+bsao7j8Dp4ydlGPwJC+ENd2xkgfHJHhqjxCSkbeB+KLrWu/5beICn ltgQ1tFFDBm/PadAvii2e5vTy0PeavuQMHNjq8htc/knubWkEgZN6iiNrTFyeNX1/mak8Z GDDjEaFBqxM/QrhU6GulbepgLOp5+krCvn39vBl6xOkgp785y06FhJOVInkAs0FqIX1ZiQ eiYNA2pg58y3FBLondurfeiayRFFw5fcbJIpI5fhL5n/5XDx//wPfExuHS3k4Q9gJzIQD1 GbnngeQYa9qC+EMcoX6EeRLxx3+7TiSFSfgarsVNToIMnronGGS4y2Rj2utxmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GPd35OHO24oTSetY4UKFzy8M0m2SG3wZXm0oDmFP6To=; b=ggfX+G3DyyXAMmLuWx+2az32DRZG9w4Rsp6uAZiU+BUlbNhv7PykLfmA6wtYBtG9BhMemL s/JKDPSG4bxM7J5OMUE7rLqAtWYBP0r3CRhCA99Vm8+o4xPZBPnaHioNkJh84QD6d5obaA yGh91SiY6sdyrUqzbeKQlCG669gb0WbMelnFEv1/jdq4hiQdImEnQRhr3lZMPbpIy1foph NKfCuRTBphS0DBlhX1d6zHlTzOfq34XiWX9SITmgecf0TuvpkppVanE3jtSRo1TymkBdh2 G4NRwVeoJm6JBiA8CQ3d/0sIAOnurGaKklRy+7aOV/c3Q+Lj6PzNO9/+lstLVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029075; a=rsa-sha256; cv=none; b=v4qNW0FRTtmP+NdMzhvkP+28M8IQHEPsfqUn0H32pq6uixL9msYYHGhsFLghIwf+IYLKor q/8oBSTehB9EpsquRMOmPXDpNjzXKCP5bwljr7TEH92B/X97lv1oOJo0LF4thVTc89irJ1 CTg0Y5jRcT92VEKQ/e/ajAOl5YkM1yeVuvNAnW1TDIPwUfVTMepfXuXoBJ9rg/T9s0r9y2 aAqOlA1Awdr8iRfdQAKcZYHvwt3nw67QckYBeBoT2nHdwzW1FhTfJMhXicYgEJhaKMFmo5 xmto3sClBc6NUH4vMNjfwORd65O5N1WQlnuc0sS9/jUNpRxxPvYssRsnwPibNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6C37PYzfNk; Sun, 1 Dec 2024 04:57:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vtDe097313; Sun, 1 Dec 2024 04:57:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vt7t097310; Sun, 1 Dec 2024 04:57:55 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:55 GMT Message-Id: <202412010457.4B14vt7t097310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 3cc3bfe4ea98 - stable/13 - fixup_pci: Remove unused attach DEVMETHOD List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3cc3bfe4ea98d5063a907743ca26d1bd5a7339e2 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3cc3bfe4ea98d5063a907743ca26d1bd5a7339e2 commit 3cc3bfe4ea98d5063a907743ca26d1bd5a7339e2 Author: John Baldwin AuthorDate: 2024-10-31 19:49:05 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:39:08 +0000 fixup_pci: Remove unused attach DEVMETHOD The probe routine always fails, so the attach routine is unused. However, this weird driver is really a quirk system for PCI and should be turned into PCI quirks instead. The Natoma quirk is also broken as it should be doing a runtime check either on mp_ncpus (or more likely to see if it is using APIC) instead of #ifdef. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47219 (cherry picked from commit 1cddce89ce30570d554120af864d23c554cd5d18) --- sys/dev/pci/fixup_pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/pci/fixup_pci.c b/sys/dev/pci/fixup_pci.c index dc1ad448fd36..5bbf293c7c32 100644 --- a/sys/dev/pci/fixup_pci.c +++ b/sys/dev/pci/fixup_pci.c @@ -56,7 +56,6 @@ static void fixc1_nforce2(device_t dev); static device_method_t fixup_pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, fixup_pci_probe), - DEVMETHOD(device_attach, bus_generic_attach), { 0, 0 } }; From nobody Sun Dec 1 04:57:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6H0bkzz5gDMf; Sun, 01 Dec 2024 04:57:59 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6G6SrGz4Cqs; Sun, 1 Dec 2024 04:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyRksV3L818TqhDisQMWUVOsWGGwPV57A9WOPiD+4ds=; b=gpQqTdmGKLWOymjomDaMysfdMLkA9G0pbo5umBDvAMJoN1p4qNIXv/rrwoOSYhqvhxUWJW VbT9uGoGXhyO7E17rHDafVXMS4jrb4WuMp7GExcdZ5CxgbXco7Ij2E02T4OrF1IJtSCdXe WO5KjWF6vjpLQbUqAZsFExpSgafV5EuDR9oPxX7Y40cGRKoDn7c82en9lPwcd4UUz7kAsU lKiJ09YFmFqw+d/PzteBlkkZz5g3Y+/Ci6MmDn4mI80Qlesv2Xb83MNl1YUFUc/4vJoNYs hHeZ3HNrGhLwKoGYjphXiJkGGzm+VdQSzuGznJL/2sJhLmw+mYSSLiJhMZzqOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyRksV3L818TqhDisQMWUVOsWGGwPV57A9WOPiD+4ds=; b=pIE716ghwxNzd9kujlm5VKqnHiBnlMCgUtgpKiARzUUZKw8GDKiecJLukvqDrrvPQ/bBdc wJiZx6e7WcR7cLCMHsrm/wP5Zf050ws9iiXERXqN0wW5VlZKLS1MSj22Q3JZcaihYyBkt0 25m4oZyJGrSeUYm0qUokTm8Jtjvh2eLnlNZgoCRkiFk/d+EZ+IhqLsJIkJWXJ0jONXV0Or +8xfhMMwg9NxpyUBOcOGW4b9NRCJuREqgg8l+V9JK1ZYDGOti8vbq+HQZKgDH0YCYf4HTq IlKWpAB9oTB9KdFyVeMQHo5CbZnT/53tbtu9zYhhDJeBCNtdjZj1dcF3ylvq2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029078; a=rsa-sha256; cv=none; b=iUx8+3TwFJFFot1LQWXt1zxFwoiS3ke5ZQjS9Owh4NDmi1BJO4Fac3i0eM35Ira2miLD4p pyQKxjVIylnYb78aox5Gp2wjGSEqI9JNNwIRVDkBZnidM4VIpuSxKPRugxaQLcPl1DjCco 2ZRBkEQZUyFnd2vKvM1Gtp9YuxXd49iHO5BAzVCgwDaFdoYfoHLlLD9wUZdJCyQmwRBgjT hpRnUtgqykRbJPpgivPTOYIa+on7NHs99HDf4w3EuVVJvbBFd8BcLUUhcE7Mb0D0nmMJg5 3Z/3jQi6R+f849TEc2FaQLghm3mouk3wgNiz4rcLx602Yt8qGMHlr1KLbHTOrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6G60T9zdn7; Sun, 1 Dec 2024 04:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vwUI097484; Sun, 1 Dec 2024 04:57:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vwnr097481; Sun, 1 Dec 2024 04:57:58 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:58 GMT Message-Id: <202412010457.4B14vwnr097481@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 190b7cd16067 - stable/13 - ow: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 190b7cd16067ae8d79066d604f99834d16841a13 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=190b7cd16067ae8d79066d604f99834d16841a13 commit 190b7cd16067ae8d79066d604f99834d16841a13 Author: John Baldwin AuthorDate: 2024-11-01 14:08:52 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:41:46 +0000 ow: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47364 (cherry picked from commit 79dfe2b761891eb3ab1b6a769d4f6adc97335350) --- sys/dev/ow/ow.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/ow/ow.c b/sys/dev/ow/ow.c index 465df5d34438..9121e1b75653 100644 --- a/sys/dev/ow/ow.c +++ b/sys/dev/ow/ow.c @@ -330,6 +330,12 @@ ow_add_child(device_t dev, romid_t romid) return (0); } +static void +ow_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_OW); +} + static device_t ow_child_by_romid(device_t dev, romid_t romid) { @@ -560,7 +566,6 @@ ow_detach(device_t ndev) { device_t *children, child; int nkid, i; - struct ow_devinfo *di; struct ow_softc *sc; sc = device_get_softc(ndev); @@ -577,8 +582,6 @@ ow_detach(device_t ndev) return ENOMEM; for (i = 0; i < nkid; i++) { child = children[i]; - di = device_get_ivars(child); - free(di, M_OW); device_delete_child(ndev, child); } free(children, M_TEMP); @@ -719,6 +722,7 @@ static device_method_t ow_methods[] = { DEVMETHOD(device_detach, ow_detach), /* Bus interface */ + DEVMETHOD(bus_child_deleted, ow_child_deleted), DEVMETHOD(bus_child_pnpinfo_str, ow_child_pnpinfo_str), DEVMETHOD(bus_child_location_str, ow_child_location_str), DEVMETHOD(bus_read_ivar, ow_read_ivar), From nobody Sun Dec 1 04:57:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6G15dzz5gD9H; Sun, 01 Dec 2024 04:57:58 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6F5ZfZz4CsW; Sun, 1 Dec 2024 04:57:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AiJjz4xPZ/hL2BMiDydAZXRQew8oRhw/p0G03mA5r4s=; b=WCeL5+ZQx/WpeeFBqfuGPkt1XTNE3QtQ6Lyh8YGwfcTCVfzYEUe6Ml6NDvosmnPP4uMLle XzmPXxMHR3hnIJGHeVs97DFn8vn6AVrJ+G7SOimYqTgTWgP78PBlS0Whm3oKi4oSfkvbdp BL2m2WRiRg+7fgf5SmSOABdPTYqacjR2qYueTJ0aSu7oavoeu1vsn+t2ZzVBSnH9/FteXq txg6aE1n14B0xZ8b5MYI9mHQW5S7bK17Threq7Ml9vwOaVoyfPXpwqR8y/hXcbrC3ITWEc KuyBoxl9mgDeaqiJmX7X50HfNyCY9uQ0mh+EJUpNOSn4zFjOOtMA14AKtR9lJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AiJjz4xPZ/hL2BMiDydAZXRQew8oRhw/p0G03mA5r4s=; b=ETD8fT+eRE5DTLFhWy4MYw84D7TIB9PkbAJlwMuJBZb8f7slZz5IntpFWY07F4ClWsg6bt JmEq8dd6npMtWohl8KoCovRWhrw5VNYzaTsx0SsRV1EmDpe63XqFY4KcGsuUNDGAcqSpr5 97Bpl/TZSgOXdlOPasDhkCRl5M5U1WVf1dkazYunDqt4KK3Jg+nSY/Oc8FTRbbJiESXDX5 IgM1erINN+xM8FKClXEFkVn8TJxSo/ROgU4PqtPe6+HsA1csPBeF+cSNL9Ob+2IH5vdDi9 0wITFAexHiGyoD3Psg8j4RTtaHZRC6+VQk5zEimx9FD/lQlpa0WvTjn9MxJ4nQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029077; a=rsa-sha256; cv=none; b=AiiwsCuTFohiEbGQNFyC4Axz1gpFS6MwLF7khh+eNMLIup7aexcazkhC1OuO3Pl6WdO0J+ WOIVuhDdMIcf+fN8oTOJUSKMn7ZdjeeeQNDKG1g6wWkbivjXzF4gzxZfX0j00Qrr1vhGSk /Zpdqz1SmgDMwz6RpfRkmNiSwOvFcsxNWnqUHjCZkPUfq0cMA8YwGe1mX+HitzYeXSJVnR 0a5vFG5coBKUEhytJmbCep0UAr1kPgYmVMgd86Pq5VgHf4J4vvPNWirUwqUd59OIHvF5yk bVt81cd5nDPRPHiptcmYIq4lE/9jgELDuycocdOL3TwLRFGQK2jmotazyKW3dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6F5BkYzfLS; Sun, 1 Dec 2024 04:57:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vvhF097427; Sun, 1 Dec 2024 04:57:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vvO9097424; Sun, 1 Dec 2024 04:57:57 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:57 GMT Message-Id: <202412010457.4B14vvO9097424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2aeba8972f03 - stable/13 - nvdimm: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2aeba8972f030be6c313c912a0ef7e678d96e82c Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2aeba8972f030be6c313c912a0ef7e678d96e82c commit 2aeba8972f030be6c313c912a0ef7e678d96e82c Author: John Baldwin AuthorDate: 2024-11-01 14:08:44 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:40:42 +0000 nvdimm: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47363 (cherry picked from commit 5c7af84925aa0916983551b0d470b461a70c0f1f) --- sys/dev/nvdimm/nvdimm_acpi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/dev/nvdimm/nvdimm_acpi.c b/sys/dev/nvdimm/nvdimm_acpi.c index 6243b68842b8..3ba9e2549d03 100644 --- a/sys/dev/nvdimm/nvdimm_acpi.c +++ b/sys/dev/nvdimm/nvdimm_acpi.c @@ -192,13 +192,18 @@ nvdimm_root_attach(device_t dev) return (error); } +static void +nvdimm_root_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_NVDIMM_ACPI); +} + static int nvdimm_root_detach(device_t dev) { struct nvdimm_root_dev *root; struct SPA_mapping *spa, *next; - device_t *children; - int i, error, num_children; + int error; root = device_get_softc(dev); SLIST_FOREACH_SAFE(spa, &root->spas, link, next) { @@ -210,12 +215,6 @@ nvdimm_root_detach(device_t dev) error = bus_generic_detach(dev); if (error != 0) return (error); - error = device_get_children(dev, &children, &num_children); - if (error != 0) - return (error); - for (i = 0; i < num_children; i++) - free(device_get_ivars(children[i]), M_NVDIMM_ACPI); - free(children, M_TEMP); error = device_delete_children(dev); return (error); } @@ -265,6 +264,7 @@ static device_method_t nvdimm_acpi_methods[] = { DEVMETHOD(device_attach, nvdimm_root_attach), DEVMETHOD(device_detach, nvdimm_root_detach), DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_child_deleted, nvdimm_root_child_deleted), DEVMETHOD(bus_read_ivar, nvdimm_root_read_ivar), DEVMETHOD(bus_write_ivar, nvdimm_root_write_ivar), DEVMETHOD(bus_child_location_str, nvdimm_root_child_location_str), From nobody Sun Dec 1 04:57:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6J3xzZz5gDFn; Sun, 01 Dec 2024 04:58:00 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6J0PQVz4CWq; Sun, 1 Dec 2024 04:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1CtDZy4qR6C00Jxfufb0U6EwFHE94N2xoeBW0PCkD6U=; b=V1zdNrFWBHgZka9huY3hGjDrWgiXrleWqH6lCv+Wa3HfTH7KgZ1IO3VAXccW/B5WcBwVQY fx94RVf3ov50z7+bRfDXuCQiYhue++Hk7RFR3G+ARXObvMuswD3ZWaumyEDUkeVR5Y06nL ubabO+e+PCwwYJTXryzNw2O8jWUOr8EhEjslvtfkCuTAoaCindd+36cCwEcHtyCZnn2Nic HD+IJNlbZsF4DY8HScNVlDUyq23IanigNmr8K/aZgonjCCHD9p+eoZ79hlB+4137CG076I 49ROGxeSJrSSw6p0PuAodS3aRiLdyI/WiB/PeA/sMCMV9B2RZmuiWdobFH3WSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1CtDZy4qR6C00Jxfufb0U6EwFHE94N2xoeBW0PCkD6U=; b=SXTHygJSjAfwtJZ8kWhskEoSbS7RT176f6irH55CyZ7ih+tuw4Qe417WUFKtRZoriHSuT1 dcq999OUEkC7DWspjms8Cl9CCP7t1x+SBZCmN8sCRc3zSXOJckPyPXox3PUr+Dx31dgeMM Zoe/nrHWB7pXaTXMgmZhEvnJtn1OS/eTfLvtHbEXbYKCnqHGIXrchlVm9AMI45X46PNDZW SXkNg+22c4Vv2coAOKQ1xeIrLlvBuizLRskWW9FjCoTWnb954oW76y+HLTohXEnh96MKw4 1vka4XhK0ahytYRmjtM/xt5uaSlNvy9/p1BEyngL8VMMBgc2cRRsOAAx7sSJQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029080; a=rsa-sha256; cv=none; b=ujTpbr6UjMSyfvCiGNS+fBV16EDzmSqvU636/1B8qCgiKGXmoF2yz89m8cA6AeNvSlFv43 tFKTeCAHE4O1Mg8b+8G8XYz5eYi+h3ZwnXA3m2v/rPsfIqKX8JN6z03DuSi/6f5U4E0sYg tFt5jyxrDMRPr1IPwUzWsNXvkFjFZgPrTK9O15fSxXhtKXxVhG8vuxONTun+SgQjdfRX/B N8tEkd661YgQdZXVqsqkLXBHVu8TV3MWW/C5fTREJzxfnhWuLmLvxzdCsl0NNTzT1+E5cy qqdpnXjy2VKYkyOdiJOLkQHrGtDk0Y3BJ4GW4uJdR8giSOJ/cb3YbXhtdC5koQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6H73Pszdwd; Sun, 1 Dec 2024 04:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14vxIP097555; Sun, 1 Dec 2024 04:57:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vxui097552; Sun, 1 Dec 2024 04:57:59 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:59 GMT Message-Id: <202412010457.4B14vxui097552@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2e8eefcf3b31 - stable/13 - msk/sk: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2e8eefcf3b3120a014abec6232ee3bb5c05e9bd7 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2e8eefcf3b3120a014abec6232ee3bb5c05e9bd7 commit 2e8eefcf3b3120a014abec6232ee3bb5c05e9bd7 Author: John Baldwin AuthorDate: 2024-11-01 14:09:01 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:42:09 +0000 msk/sk: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47365 (cherry picked from commit 2ff5c85027356038969d03c2beb55b98db389b41) --- sys/dev/msk/if_msk.c | 12 ++++++++---- sys/dev/sk/if_sk.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c index dfb1de57e39e..e706387e58d3 100644 --- a/sys/dev/msk/if_msk.c +++ b/sys/dev/msk/if_msk.c @@ -253,6 +253,7 @@ static const char *model_name[] = { static int mskc_probe(device_t); static int mskc_attach(device_t); +static void mskc_child_deleted(device_t, device_t); static int mskc_detach(device_t); static int mskc_shutdown(device_t); static int mskc_setup_rambuffer(struct msk_softc *); @@ -336,6 +337,7 @@ static device_method_t mskc_methods[] = { DEVMETHOD(device_resume, mskc_resume), DEVMETHOD(device_shutdown, mskc_shutdown), + DEVMETHOD(bus_child_deleted, mskc_child_deleted), DEVMETHOD(bus_get_dma_tag, mskc_get_dma_tag), DEVMETHOD_END @@ -2054,6 +2056,12 @@ msk_detach(device_t dev) return (0); } +static void +mskc_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_DEVBUF); +} + static int mskc_detach(device_t dev) { @@ -2064,13 +2072,9 @@ mskc_detach(device_t dev) if (device_is_alive(dev)) { if (sc->msk_devs[MSK_PORT_A] != NULL) { - free(device_get_ivars(sc->msk_devs[MSK_PORT_A]), - M_DEVBUF); device_delete_child(dev, sc->msk_devs[MSK_PORT_A]); } if (sc->msk_devs[MSK_PORT_B] != NULL) { - free(device_get_ivars(sc->msk_devs[MSK_PORT_B]), - M_DEVBUF); device_delete_child(dev, sc->msk_devs[MSK_PORT_B]); } bus_generic_detach(dev); diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index 484954bd9bad..1688d590c149 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -185,6 +185,7 @@ static const struct sk_type sk_devs[] = { static int skc_probe(device_t); static int skc_attach(device_t); +static void skc_child_deleted(device_t, device_t); static int skc_detach(device_t); static int skc_shutdown(device_t); static int skc_suspend(device_t); @@ -291,6 +292,7 @@ static device_method_t skc_methods[] = { DEVMETHOD(device_resume, skc_resume), DEVMETHOD(device_shutdown, skc_shutdown), + DEVMETHOD(bus_child_deleted, skc_child_deleted), DEVMETHOD(bus_get_dma_tag, skc_get_dma_tag), DEVMETHOD_END @@ -1743,6 +1745,12 @@ fail: return(error); } +static void +skc_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_DEVBUF); +} + /* * Shutdown hardware and free up resources. This can be called any * time after the mutex has been initialized. It is called in both @@ -1801,11 +1809,9 @@ skc_detach(device_t dev) if (device_is_alive(dev)) { if (sc->sk_devs[SK_PORT_A] != NULL) { - free(device_get_ivars(sc->sk_devs[SK_PORT_A]), M_DEVBUF); device_delete_child(dev, sc->sk_devs[SK_PORT_A]); } if (sc->sk_devs[SK_PORT_B] != NULL) { - free(device_get_ivars(sc->sk_devs[SK_PORT_B]), M_DEVBUF); device_delete_child(dev, sc->sk_devs[SK_PORT_B]); } bus_generic_detach(dev); From nobody Sun Dec 1 04:58:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6K3Kfrz5gDFp; Sun, 01 Dec 2024 04:58:01 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6K1PrMz4Cwp; Sun, 1 Dec 2024 04:58:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FQrdhyEG4j5QT1kZ8shL4DGTmeNdQn2xyTnhmvntzU=; b=fwQMR4ALjYbsP5b2gQWp5iLUzVDTZfx2JxmWfYcolKN0je/Bdak4bGpqaI4en4++RWEyTI x3lvQ6O2pUnxnv4JK4CzzXcrfBto/r0AhBd7TwMxId2kpTBi2XsrKVshyv85Id1op4fJu0 T1h+gAFX2FdKCBTco4dl36/Cd/hgKFGVPTJsV7ACs0b5+6W/sbQbQogESbJ/Jawa660ojU LZQUTfMvSzIPNXnzj3xbrEGg3wTc9GvO52c5HtmgjaOmSFopJII1vUIoAJJMGshLSyQvtX m0MBDYNA0D85EJpXkJ+/yUbLXB7tyLgD9OrlOQyT32Bd+rOHBzdtueD+khbueg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FQrdhyEG4j5QT1kZ8shL4DGTmeNdQn2xyTnhmvntzU=; b=uGT2XVmIrLVpKslJbszOOIo8WxcoAEQP92AXaLy8cL1lLjB7dvtmD7UNFsDukYBspUpaYP jUarRh/iYJfiXJ4xtdAIbt9IYT1WpN+nDwmSMWR9ACpQcwBdncWTUsWkpQiw3G4UasGJcw QjIGBqRA+4EZYwlII3CdmOTgSi/540sJz8YPiKHNiRaMK+2qATsRrfaoYX2mwRDHOV0scq dOBvLdxPMqNjZevabMHo+L+WfGx1fs6X/1WWx9Segn8yTRLHidAl08x2/9kvvTV3hBBvr1 PlJimxGDzvosMoGCMMqjSFQ9OC8w7Iwh0X0v5n3yGFub492dRVEKfLtV8gVGBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029081; a=rsa-sha256; cv=none; b=ejRc0CLJjQJaw5NVoGjWdmA0yg5wxOJF2rFB/49qnCsFChTK+uBg/gWSNjjn4QHDDeC1yp ZhenYvVX0tbOZsVo/MHO7/isctnFPmZw3QneuKyXb/ArL+Pqh4FpOc3Hggct4cB22GvoUt G168z/sKGSGgYnjb+l7AtO32zh3QI2D10/13H41iyJf4c1orBTq2FMXa72JEawZBKvCsow PnGweGZaLvGnorChL0B3RMgiHBLNaimY00vzrzxeksDn2wLbJoeMH3KHFwSqEth1xoevjX bm1M5ZXF/nZesnoZBwQgY/aKT3mtU+7Q6i09912ebAZll/SsiqKm2JmyZz1UzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6K0z4rzf7X; Sun, 1 Dec 2024 04:58:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14w1Rj097618; Sun, 1 Dec 2024 04:58:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14w190097615; Sun, 1 Dec 2024 04:58:01 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:58:01 GMT Message-Id: <202412010458.4B14w190097615@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8973edf29b3d - stable/13 - superio: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8973edf29b3dffb31b0b481ad462121e50cd3c67 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8973edf29b3dffb31b0b481ad462121e50cd3c67 commit 8973edf29b3dffb31b0b481ad462121e50cd3c67 Author: John Baldwin AuthorDate: 2024-11-01 14:09:21 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:43:37 +0000 superio: Use a bus_child_deleted method to free ivars for children Previously these ivars were leaked. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47367 (cherry picked from commit 2520675d3f0ef9039049fd67481f013b36f250ee) --- sys/dev/superio/superio.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/dev/superio/superio.c b/sys/dev/superio/superio.c index dd25a7176d5f..3ad06e04d5cf 100644 --- a/sys/dev/superio/superio.c +++ b/sys/dev/superio/superio.c @@ -710,6 +710,18 @@ superio_add_child(device_t dev, u_int order, const char *name, int unit) return (child); } +static void +superio_child_deleted(device_t dev, device_t child) +{ + struct superio_devinfo *dinfo; + + dinfo = device_get_ivars(child); + if (dinfo == NULL) + return; + resource_list_free(&dinfo->resources); + free(dinfo, M_DEVBUF); +} + static int superio_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { @@ -1001,6 +1013,7 @@ static device_method_t superio_methods[] = { DEVMETHOD(device_resume, bus_generic_resume), DEVMETHOD(bus_add_child, superio_add_child), + DEVMETHOD(bus_child_deleted, superio_child_deleted), DEVMETHOD(bus_child_detached, superio_child_detached), DEVMETHOD(bus_child_location_str, superio_child_location_str), DEVMETHOD(bus_child_pnpinfo_str, superio_child_pnp_str), From nobody Sun Dec 1 04:58:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6L6hhnz5gDFr; Sun, 01 Dec 2024 04:58:02 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6L2TTRz4Cth; Sun, 1 Dec 2024 04:58:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+m7LvyfxBTJ1Zvra/mF8QvTM2NNue1AAGqgKuUe/Kks=; b=WBhxUEdj+1rZ22F3WNrRa7GCEJ8dgHG6pSI5GxI+LeCdSwEeJoWGmiD6GJcGu8uq3xgmxr bmdQb55ssrwwW+POr6qWH6gRy3FA9h0f0thbvFPgw8qE+cmEI892r5oCsVBt9TxS1QPKOO jjD/Ao/0sEzfgUKNaG3Uzfwwg1oSSnDhipCxY8nT5YrHzKfbpy4dmFhGekeGzx6OIIk/7X B385i9LhGlPMbXOPrbdCXAI+hyTWepPPLnfd3XtTLumdmEHkT/w1ajjiL7OLIDuUvnK+ZA BUgt7WMeIWUpcran+4bepgSM7G+D8E8CzdIznwSDB8WbkrKTCH5JpzaL++wNAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+m7LvyfxBTJ1Zvra/mF8QvTM2NNue1AAGqgKuUe/Kks=; b=oCvmzXl3PheJL0MqqwVMNjCZZQkqI7XAgfwuaJI1Xx8Mg48iOCKN9rTHcWJmDmc1shYega Qoq7lxpY43U4XVf6N4RF7gOj6I6c8uZNbNWfGx7wON3t1M6w8RXBRSKDti5PRTkNr7TgfG kSoXPRZhcrXtYau+SsoEGHXCElbZViJAzLg2UplMFwb7jFpYwLSWqEzvH96FqRxwRzTC56 iclGdF8sDwxZRlTzUOuQv1dU2YM45YXOTX24Br/3grih3+WVDmDiIQfhMYJMrDMbqm0u60 UwjVHRw2imW4cavEihAGJXs9VHzJmzm4Da+yQOe0MNbKhf87bBfRC+NK+vcpWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029082; a=rsa-sha256; cv=none; b=IBcOhbT5cinwUWlfL55iwAifzZu3x6SmwzJ5TDE8OBTz3pDdDtZLy0glUZJyuDX8fxhW12 ZG2czz6K36URV42lnmpPSYDFC8HFVqzuIJ8nXG0HFgu5AdIqaIh6Y2Ws3u7xBD5OnByYMO 2oAFMLVaXcPc/MXT4+C7r7NHZ9zcw7jy5PXCAuxi7CwqSXq1EsPTsJ7WXbJtcecaVudz8Z 9NZ6l4PsJM1UheTIPHJLxczdjHM/eqeqvfaU0PQ4PRk+DPyowtILpldG7/mbno+xyqPRqS lDfjnLAAn/cXWUX2i5Wm5Whe0L5P5yu5sxOPTQnu//6B8V/Gcj9vOhiKLfeOXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6L22HPzfQy; Sun, 1 Dec 2024 04:58:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14w2tX097677; Sun, 1 Dec 2024 04:58:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14w2Em097674; Sun, 1 Dec 2024 04:58:02 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:58:02 GMT Message-Id: <202412010458.4B14w2Em097674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b669f1b35c79 - stable/13 - isa: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b669f1b35c793f3671c65618d13590b2fd855614 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b669f1b35c793f3671c65618d13590b2fd855614 commit b669f1b35c793f3671c65618d13590b2fd855614 Author: John Baldwin AuthorDate: 2024-11-01 14:09:31 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:43:46 +0000 isa: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47368 (cherry picked from commit c8fa54882226d89e987fb26b94979aed85a3bd9a) --- sys/isa/isa_common.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index 856551a7abba..29b48375257c 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -626,6 +626,12 @@ isa_add_child(device_t dev, u_int order, const char *name, int unit) return (child); } +static void +isa_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_ISADEV); +} + static int isa_print_all_resources(device_t dev) { @@ -1068,6 +1074,7 @@ static device_method_t isa_methods[] = { /* Bus interface */ DEVMETHOD(bus_add_child, isa_add_child), + DEVMETHOD(bus_child_deleted, isa_child_deleted), DEVMETHOD(bus_print_child, isa_print_child), DEVMETHOD(bus_probe_nomatch, isa_probe_nomatch), DEVMETHOD(bus_read_ivar, isa_read_ivar), From nobody Sun Dec 1 04:58:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6M58sXz5gDFs; Sun, 01 Dec 2024 04:58:03 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6M3mJCz4Ctw; Sun, 1 Dec 2024 04:58:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LYVg//Z98Npo6iQnURluica7X1T6cM9fA596XMgQ5ys=; b=EfV+452GLiITNZvN5SccsmZSMSE8HxC34BytF+uubnCgFcse79MAvRmqyLBmTuYYPvDWww 08QhUZeD7Z3f0HRvY3Wjd6iI1700zM6yZkSLnZIQHDmbGl0i+1xGHBZHR7ZsEgAlhaQ3q2 e0EWQbOGpQf8K5FZGMc/HQGY4vCIiEnBQpsDgjTXBNgdOO126uqRtzSESsQP/rp4ihEj9o RdPNdew2rH8c9DRUEqJPxBgPr5O7ZhIuUzYO1UybhKrwBFywt1/Yu27phl0Mb9A3ILV0Lc XcvW98gJOtDA5rNTjTRcQx6MUBxEqmqo83L7oqMSzOZokBCuwXmnjjvzLNaJzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LYVg//Z98Npo6iQnURluica7X1T6cM9fA596XMgQ5ys=; b=XoEmT1RM4UNEocl9Nhg4VciCOnmM7uc+v2lvTSu1hExiUlIU14r8k0cidC+HWNptHJuwGU 68PLRU9/BenApto83ygjHAHfxT/3Uaw5282MRIbe5666syWNRo54y6k1Bvx7xUhMYcO+rQ 9OjTqmH7clzPRTraOwJKPOrrcBu9CR75qw/9yJXHPSDnZBp2y3ZgqOZM6u0iIk3ZOIkG5P 0SKqZfNRX4kuJEdF5JUWl8mT0pGpxsmV1mLFkSzJGcblrqUIK8psLYXucd59oiJyJ9mWdA dlzK2gyi4eaAu3WFOiSvqtd28R/TP6AVR5C9wx0nbxkdEG55AN1rZkRQWXfDlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029083; a=rsa-sha256; cv=none; b=PlcZr2vgWEw/fWQ3uZB6YXUCGv/fETKP+1vvbuF9mS1f112tvFsERb80+X6EoungjVYncY JrRu/h6d9NX+E98X+KHctdnHgz8bJ2ahVD8qA/wTq8AW4DQxymHBo3mvKIfuom8BGlpeYK ofVgjAN7zzpBMA5Q2QFplLWn8YQM7B8klgQHJJvdCpX2rbGplCFMt2WAIxS2c55CGcXOHR q5f6dwAWZ5wqmHZ8N5FxMbk5rpDp4ZPP6W/ng3Qctg1ncBW0eJ7l23aN+7s38Yk2B+LTzK eAnPg3T6v7R7hkzsh/g7nowFYj8AaOmP+v2L/T3xJMV5dVa1c5H7IBE0TOjlAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6M3Cwyzdxj; Sun, 1 Dec 2024 04:58:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14w38c097734; Sun, 1 Dec 2024 04:58:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14w3iR097731; Sun, 1 Dec 2024 04:58:03 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:58:03 GMT Message-Id: <202412010458.4B14w3iR097731@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: dd47685dbdc8 - stable/13 - gpiobus: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dd47685dbdc89e33632d1e7da25e112849c324f7 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dd47685dbdc89e33632d1e7da25e112849c324f7 commit dd47685dbdc89e33632d1e7da25e112849c324f7 Author: John Baldwin AuthorDate: 2024-11-01 14:09:39 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:43:55 +0000 gpiobus: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47369 (cherry picked from commit c9e880c0ceef9541625c18add3f5a8499137e016) --- sys/dev/gpio/gpiobus.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c index 4dceea15b00d..8e4b8be7e931 100644 --- a/sys/dev/gpio/gpiobus.c +++ b/sys/dev/gpio/gpiobus.c @@ -587,9 +587,7 @@ static int gpiobus_detach(device_t dev) { struct gpiobus_softc *sc; - struct gpiobus_ivar *devi; - device_t *devlist; - int i, err, ndevs; + int i, err; sc = GPIOBUS_SOFTC(dev); KASSERT(mtx_initialized(&sc->sc_mtx), @@ -598,17 +596,9 @@ gpiobus_detach(device_t dev) if ((err = bus_generic_detach(dev)) != 0) return (err); - - if ((err = device_get_children(dev, &devlist, &ndevs)) != 0) + if ((err = device_delete_children(dev)) != 0) return (err); - for (i = 0; i < ndevs; i++) { - devi = GPIOBUS_IVAR(devlist[i]); - gpiobus_free_ivars(devi); - resource_list_free(&devi->rl); - free(devi, M_DEVBUF); - device_delete_child(dev, devlist[i]); - } - free(devlist, M_TEMP); + rman_fini(&sc->sc_intr_rman); if (sc->sc_pins) { for (i = 0; i < sc->sc_npins; i++) { @@ -723,6 +713,19 @@ gpiobus_add_child(device_t dev, u_int order, const char *name, int unit) return (child); } +static void +gpiobus_child_deleted(device_t dev, device_t child) +{ + struct gpiobus_ivar *devi; + + devi = GPIOBUS_IVAR(child); + if (devi == NULL) + return; + gpiobus_free_ivars(devi); + resource_list_free(&devi->rl); + free(devi, M_DEVBUF); +} + static int gpiobus_rescan(device_t dev) { @@ -742,7 +745,6 @@ static void gpiobus_hinted_child(device_t bus, const char *dname, int dunit) { struct gpiobus_softc *sc = GPIOBUS_SOFTC(bus); - struct gpiobus_ivar *devi; device_t child; const char *pins; int irq, pinmask; @@ -752,19 +754,14 @@ gpiobus_hinted_child(device_t bus, const char *dname, int dunit) } child = BUS_ADD_CHILD(bus, 0, dname, dunit); - devi = GPIOBUS_IVAR(child); if (resource_int_value(dname, dunit, "pins", &pinmask) == 0) { if (gpiobus_parse_pins(sc, child, pinmask)) { - resource_list_free(&devi->rl); - free(devi, M_DEVBUF); device_delete_child(bus, child); return; } } else if (resource_string_value(dname, dunit, "pin_list", &pins) == 0) { if (gpiobus_parse_pin_list(sc, child, pins)) { - resource_list_free(&devi->rl); - free(devi, M_DEVBUF); device_delete_child(bus, child); return; } @@ -1103,6 +1100,7 @@ static device_method_t gpiobus_methods[] = { DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_get_resource_list, gpiobus_get_resource_list), DEVMETHOD(bus_add_child, gpiobus_add_child), + DEVMETHOD(bus_child_deleted, gpiobus_child_deleted), DEVMETHOD(bus_rescan, gpiobus_rescan), DEVMETHOD(bus_probe_nomatch, gpiobus_probe_nomatch), DEVMETHOD(bus_print_child, gpiobus_print_child), From nobody Sun Dec 1 04:58:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6N71qRz5gD44; Sun, 01 Dec 2024 04:58:04 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6N56Ryz4CvK; Sun, 1 Dec 2024 04:58:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qG0gVHEWD+hOSYtLN6TDIsKvq5NT18Y2WhxvsJhD3Gg=; b=wd674V+issbTxvEiDXdWbtZVViLR2HKR3Id07Iy2bYHxsZN2tKdJlT4jfY45CY5e93MIM+ vdNTX+gVZ+u3pVaSPDgUKv6JGkPsh54NBJNGP7VoEAqW2QhUQlLHSAad/rs4HS3wOju6pK LxFJDmTqjkRcZqsqXYLF5smVfsK5lQQQZ9dR8qrRq+lGCJ6fwkWVW2jEqDvGqgIQRyaz50 TZRxngYpIQS80IkDhbbp/StG9gAgSIoVn27pXbSN+RwIJI4DkvbrZOEKu6dE/FkXbiSw5u iN2296XS3lc2ja5WvXLEYRJ7u9X3n41nPogmWGz91IEK/I0jpSR24lvrtzIqAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qG0gVHEWD+hOSYtLN6TDIsKvq5NT18Y2WhxvsJhD3Gg=; b=G5FZdOedh689jF4CMuDSFInrX+V6nNeJZcku6ddS7cI8YdvemdDM5kp9OH9u1FSeEsZoVJ cPled3cHMEASS2HtyjOXbepONKHntZkudFdmtlTLwwX+rqkslamG5udjvQ/971PlJOFqoc 63UjMIDQ3x7zpgfR/FETiEydyyJkA4hMUUAChdGbHsx56Yf5sPp1u53w+KyR7ZfYBmo/9O 2yAIxEXK/AWhw95rhjoLfTje6jLgXvMFJwt0DbNbzoyUJj2A3msI6OxUmzY7/4vxmXJHgj L2cvF2RpIvLJlIAUlEmDdfJLP9lxykWIBTUgEZK3dt58YPfroHBtDvE/BWESTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029084; a=rsa-sha256; cv=none; b=ZjW3FnQ0BoLYbjrW5p1ZtJMQ3kyYH+EQYWXF61orbXH0+DZqibIW4Kc5P3lxvGrLsgpeLr uYkBbS1VMBvMQiwD5+78WBsCV/3SG4/p0Ykjs6bMcaS68k5KzGNokVJr/1D9iccKkTpB/F x23DzofZ18H72LR9BuVQinZFvAZ0SnS3IctnFcsltYr4TXuE3TWrCy4NhxHHq0t4ubQOHv Ex33Cq3HorOtcEa30LnWDx62hdmZ5uLplsSrE+aqriyryjIkpcaKICwP5yu4W57oLXOadb wjxWUFtLCFN5HWfE62ZqVq2gASbGCKELC7QqszywhsYCUv8HxPSPxsoio0rOtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6N4f24zf7Y; Sun, 1 Dec 2024 04:58:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14w4im097792; Sun, 1 Dec 2024 04:58:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14w4Bw097789; Sun, 1 Dec 2024 04:58:04 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:58:04 GMT Message-Id: <202412010458.4B14w4Bw097789@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: de7568362a93 - stable/13 - iicbus: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: de7568362a936fb39e393f72e0ed002bc29521d1 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=de7568362a936fb39e393f72e0ed002bc29521d1 commit de7568362a936fb39e393f72e0ed002bc29521d1 Author: John Baldwin AuthorDate: 2024-11-01 14:09:50 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:44:03 +0000 iicbus: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47370 (cherry picked from commit 9c99ba9a0677a7b5c3c578c430211dafb4ad0dd5) --- sys/dev/iicbus/iicbus.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/dev/iicbus/iicbus.c b/sys/dev/iicbus/iicbus.c index 223a7885cbb9..ce249982f6eb 100644 --- a/sys/dev/iicbus/iicbus.c +++ b/sys/dev/iicbus/iicbus.c @@ -250,6 +250,18 @@ iicbus_add_child(device_t dev, u_int order, const char *name, int unit) dev, order, name, unit, sizeof(struct iicbus_ivar))); } +static void +iicbus_child_deleted(device_t dev, device_t child) +{ + struct iicbus_ivar *devi; + + devi = device_get_ivars(child); + if (devi == NULL) + return; + resource_list_free(&devi->rl); + free(devi, M_DEVBUF); +} + static void iicbus_hinted_child(device_t bus, const char *dname, int dunit) { @@ -362,6 +374,7 @@ static device_method_t iicbus_methods[] = { DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_get_resource_list, iicbus_get_resource_list), DEVMETHOD(bus_add_child, iicbus_add_child), + DEVMETHOD(bus_child_deleted, iicbus_child_deleted), DEVMETHOD(bus_print_child, iicbus_print_child), DEVMETHOD(bus_probe_nomatch, iicbus_probe_nomatch), DEVMETHOD(bus_read_ivar, iicbus_read_ivar), From nobody Sun Dec 1 04:58:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6R0hcWz5gD47; Sun, 01 Dec 2024 04:58:07 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6Q75KDz4DBW; Sun, 1 Dec 2024 04:58:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PZx1YgNaPyGbN9qzSF1pp8g6MEhLYkd5MjyQoSEXpZ0=; b=DI2Gvkjdh1GxN4Qipj0Fgx/JTOB07L+wSq58PKCZR2wm2EJHnwSE3BHcIwFlI7rEYeP/gn 1qOVo+qnCc1cpEZOJPXEkgBKtY/dVRYRz5YPe4wXpI6OGdga4f/W/ft6PRY6MG7CaMUKkV q/ZwYilrnTQt52ESCEMDJouPmvMr9l/V5mZnLrJxL2EC5Km/R76/CqwnbOUmUospbyzL34 N4tzpUIqzfQWXorpkBnY/D+dMAnCDj7gwKXbe1bfEzrYZMpx9NsSQnBg+gtEDOG22EEyY9 pJFut1n8N6k5V2XqSllH/638JSTtWoBUby7PQBsO+Va4l4ZF9ywikrFiCTqc+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PZx1YgNaPyGbN9qzSF1pp8g6MEhLYkd5MjyQoSEXpZ0=; b=Q3oDY/YPpLgTjhd44fJKdiolfCb8kN5fLMAAC5jiZXUWil9sWk1M7gIkKzt7sZLbuBAbF3 bjyB4iuuEMLyCuOTLQb/onsK7+iXXIBuFN7v8wxU0bpGNBlTHezbjHXpPZ7MDbp1IkcNga aL/yTnTcw1c/xWj9mrX27xpJ+1DHPB9LjVaS7Fvf3+NsUb/l1WwdNAC110JQr0lNY6l7cZ /NIrm/LYWuwG1u0YAZ/LqzIO3eA0M9gwBafCWshuqbBDXTltSaatS4YZcTF8rBNQSA1Tcw Q2Mu+o1aG13WwosWHmqvhPvxWyi00KpeJD3XJGYfuzaF/GgSKwQCc5RLJgCT7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029087; a=rsa-sha256; cv=none; b=gXZHxIdFy30z1zs5lFmUqaT0JhEPvJdoZjdgEK7Bl9gOBoTKHF+hCBU+0Z4RdWC6G8ecup MVVDBBPv0isanoTuxDddqRPUnLVKEjYktttx6/okyRQ3iAFyguWWKI6lbltBm9kN8pDROg Odoaul86wqLveapNr/mR3tltQYvFbADllhsODP/owhvM8O+XF1Dxc/g/5QMDjbMkTdk5Ad 4XXJgKGTf5kVoZy+O+RN7Q99i1I0dGJnvyU+kpwDPn3dqNGyWXPFA6mDDhjxCFHdbBV24i b0ZuHgRtXWwHx9sNqlGkP9Svabir+NUbNNyBPjUPYyKaPhIcaO96tEL4oUvA4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6Q6fgQzf7b; Sun, 1 Dec 2024 04:58:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14w61p097933; Sun, 1 Dec 2024 04:58:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14w67G097930; Sun, 1 Dec 2024 04:58:06 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:58:06 GMT Message-Id: <202412010458.4B14w67G097930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a6586a518bc2 - stable/13 - smbus: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a6586a518bc2a06de53babc9d8f8b964fe4647f5 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a6586a518bc2a06de53babc9d8f8b964fe4647f5 commit a6586a518bc2a06de53babc9d8f8b964fe4647f5 Author: John Baldwin AuthorDate: 2024-11-01 14:10:10 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:45:44 +0000 smbus: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47372 (cherry picked from commit 03f641f9b1d82b7369c8988afbd75a32d9913aaf) --- sys/dev/smbus/smbus.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/smbus/smbus.c b/sys/dev/smbus/smbus.c index 988e05e8ea75..2eb840a05c44 100644 --- a/sys/dev/smbus/smbus.c +++ b/sys/dev/smbus/smbus.c @@ -112,6 +112,12 @@ smbus_add_child(device_t dev, u_int order, const char *name, int unit) return (child); } +static void +smbus_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_DEVBUF); +} + static void smbus_hinted_child(device_t bus, const char *dname, int dunit) { @@ -225,6 +231,7 @@ static device_method_t smbus_methods[] = { /* bus interface */ DEVMETHOD(bus_add_child, smbus_add_child), + DEVMETHOD(bus_child_deleted, smbus_child_deleted), DEVMETHOD(bus_hinted_child, smbus_hinted_child), DEVMETHOD(bus_probe_nomatch, smbus_probe_nomatch), DEVMETHOD(bus_child_location_str, smbus_child_location_str), From nobody Sun Dec 1 04:58:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6Q2msRz5gDHv; Sun, 01 Dec 2024 04:58:06 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6P64WQz4Cxq; Sun, 1 Dec 2024 04:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ord4ELq/AXE2bUwVhbF/w747VCqG7KO9Umetq1wL/o0=; b=iMLAHi1A/GU8xXoy5ZF68O2WI/sbSysi13oU/HS242ci6ja28viJaSD9KnnjniBTlVbYU2 8Elp1nwDS75Vj3mpwjh9Wm029ezn/PMGD1SHWTNbStNQR6ql6vX+oXRF06zDmben3oRyvD VPgv7hE1+UJ+z3jLs1sB1JHvkDy8YJ6TR/hw4d5eD0T0vwHQ7Ex0ly3XfuhobHxxVSaa/k NzyDCkKNXJWRFYq3GS2/n6yA+qE8XJzv+Jkn+BylM0DmUaBKdZkrvvWvu4jwaaZPc6WGxz EY6RvDo4lKo9bo9b5TGyZmPk7BRPw2smpDRfDAkgFfyQwkUADJ81y34ZPiGcNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ord4ELq/AXE2bUwVhbF/w747VCqG7KO9Umetq1wL/o0=; b=oqS71Jt/AibvF1hrYZV0/wV7zIL1gBVrZrrhmL5cqwaz/GtGcSK19qoLpbN7PZHXS0uSOY cUXc5CjE2tNnILIPjOq7bwrtf8mKgOv51EcCjD0z6A8JnMZrBN6Y7ojmBPer6O58UGOUKo v098u3jEISh05OvSMgXK4XjGYGZNGpwR6RASWhCEL+fa+jaIAkg5ZYrwyCcIaG1UoR8TOz k9LInwzUddzIHq3bMQC2SAcb1ZYJ5TGvQulMMh60154xavapRxQH+36DWSKoZ5WDL6hSYM QHEJHEdRBxM0bye6Q1chvNza5eOH4RNvHEVVeVSwFwwf+7byqxpZ3y8S0CUAPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029085; a=rsa-sha256; cv=none; b=oUCbNOZeEk8NpQEQdrJ4w2lq5+oF/2s0uHjMvTNdTE0XdG8dPzf4pCpdPUxC6VxnF0VcTy cLmIvWhuynt0j08p70Xx5ypFyJmPpEKs3BFncYCkI8GxDFK/A9DdG2NddEKhk+loFuoN/S qG3w5QfEDj8l0iMQBV1RUACGEckGys4tz5fLlhkUNsYk7sVGMVNgNDkrEZMsmgg82lYRDZ pJVrtx+kl85wwmH34jIS0Kf2HwBjSKPuXp8ScEVX95p1+7I3q1aEbsfhb3lHeJvJR3Cgh8 M5aVCUcoHX8IgpqJIab0vDBgwlaAySyNAsLMP+YqNg2ArAPEdMqmeSFmbOgjiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6P5dYyzf7Z; Sun, 1 Dec 2024 04:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14w54X097855; Sun, 1 Dec 2024 04:58:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14w5iN097852; Sun, 1 Dec 2024 04:58:05 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:58:05 GMT Message-Id: <202412010458.4B14w5iN097852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7f77a2883ffb - stable/13 - miibus: Use a bus_child_deleted method to free ivars for children List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7f77a2883ffb9d57d21d854e4b92754504951025 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7f77a2883ffb9d57d21d854e4b92754504951025 commit 7f77a2883ffb9d57d21d854e4b92754504951025 Author: John Baldwin AuthorDate: 2024-11-01 14:10:01 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:45:29 +0000 miibus: Use a bus_child_deleted method to free ivars for children If a device was detached (e.g. via devctl) and then re-attached, the ivars would be freed by the previous bus_child_detached method during detach, but device_get_ivars during the subsequent attach would return a stale pointer resulting in a use after free. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47371 (cherry picked from commit dc569c894207a524b0cb542040b35b0edd57d1c8) --- sys/dev/mii/mii.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index 5db0fd877a5c..de7b908b3d2d 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -57,7 +57,7 @@ MODULE_VERSION(miibus, 1); #include "miibus_if.h" -static bus_child_detached_t miibus_child_detached; +static bus_child_deleted_t miibus_child_deleted; static bus_child_location_str_t miibus_child_location_str; static bus_child_pnpinfo_str_t miibus_child_pnpinfo_str; static device_detach_t miibus_detach; @@ -83,7 +83,7 @@ static device_method_t miibus_methods[] = { /* bus interface */ DEVMETHOD(bus_print_child, miibus_print_child), DEVMETHOD(bus_read_ivar, miibus_read_ivar), - DEVMETHOD(bus_child_detached, miibus_child_detached), + DEVMETHOD(bus_child_deleted, miibus_child_deleted), DEVMETHOD(bus_child_pnpinfo_str, miibus_child_pnpinfo_str), DEVMETHOD(bus_child_location_str, miibus_child_location_str), DEVMETHOD(bus_hinted_child, miibus_hinted_child), @@ -167,7 +167,7 @@ miibus_detach(device_t dev) } static void -miibus_child_detached(device_t dev, device_t child) +miibus_child_deleted(device_t dev, device_t child) { struct mii_attach_args *args; From nobody Sun Dec 1 04:58:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6S2j4gz5gDMD; Sun, 01 Dec 2024 04:58:08 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6S107Qz4D63; Sun, 1 Dec 2024 04:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+oteSdBB2MdPK15MYI7o14Msiz3+U0pNB7DZ74sr6/w=; b=oF5dMtaMOP0EJKR0bTfrWkdIMXlMHhGsqdNQNsuhYFEZ4/zrsQlxMfl/5ivG6lYpen/xyR /dPf3NlAKKJtdJyy78ExI6lBClwHRfIVZvtEaUK94P/eAVeSL0oRdVVn3+BscsZW97rwTi aTeTrEB+n8BegczUoKFivqmexKG1e20fjsW+I13iIgiLht6ZBQmU9HS2QKYK4+BQ+G2Nrk rcZ5UWhtu7Q6zZXFtjda9VpZcRta1UxjpRXJxR2N4+inx7BqWNcB+Fy2DvJSH14wmzOmYF 9ol9qongOfW/7Vcv9+fZj6BtFdGbG54TB+rXHP4ovIuOM7oAUBGhU+qE1cQHng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+oteSdBB2MdPK15MYI7o14Msiz3+U0pNB7DZ74sr6/w=; b=X4QPxFXOBb7mk4Zboc0OEqW7wLXMupoa8RSsIxfxASADUpwvP7QbGEWVqYJR4as7zlDU3g IHJNzUAtKGTKIQI4EcAEweTVTf8Ml6wXlphUgYGTBAcrQOZobMgot2+kUo7ap1iuhGccEB c0u7xqkwHI1tIhg0EEGLNw52i0WQrdUrqmrn8N91xourwjAQ3kPNxjrhvbgswCeqNI+2uk XWbWJ6wrXli6ETtJjgEta0DphVFwXOXzeVtkZjmIh4UVnOezhuLyasS770ty3img5aicUs 01WvGBCU+sBsuvMop8OhVv9Cn5okduOu9AFstGX9v4bF1iArlIlcD0Tzwy87xQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029088; a=rsa-sha256; cv=none; b=BZD1JCDPhkjXts1Zz/LF9UMACfTEyILj++g4bk265/pkG4KcK3OwxhYyYNO301QXoRef2s PW16nygNYje6vcPQX7PTHwApIhpfpE7ZTnG8TmBLkyVApjFPy7lNOBMUfIl4tOZUfllY3p otssgTlSd09DWHz+m/uS6QxINQFB97dB4JI9omYpbimje/XY6821QwaC+fR8VRuOrnw/B8 6O3i+K5nmkMX9c+rg5xV+y/eZRV1nSVAg9rJ2I/IVPaMvMHGskIciRuc11uWi5XhiUU2lE Vrq2IesO9A2Yh6sQlYUf6V5c255otL/EFsJdeTj7yZUqtZhzINFvjrnf4avxRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6S0KqYzdxk; Sun, 1 Dec 2024 04:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14w74F097995; Sun, 1 Dec 2024 04:58:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14w79s097992; Sun, 1 Dec 2024 04:58:07 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:58:07 GMT Message-Id: <202412010458.4B14w79s097992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1c3c574f8483 - stable/13 - x86: Remove invalid DEVMETHOD methods for leaf devices List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1c3c574f8483c597ab62f7acacf01271b2f86c3a Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1c3c574f8483c597ab62f7acacf01271b2f86c3a commit 1c3c574f8483c597ab62f7acacf01271b2f86c3a Author: John Baldwin AuthorDate: 2024-11-01 14:10:30 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:46:42 +0000 x86: Remove invalid DEVMETHOD methods for leaf devices None of these drivers are for bus devices, so bus_generic_* is not appropriate. Most of these were nops except that detach would actually "succeed" (but not do any cleanup). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47374 (cherry picked from commit df615735960370255d3acc4ac2a6f4fd297b7461) --- sys/amd64/amd64/fpu.c | 4 ---- sys/i386/i386/npx.c | 4 ---- sys/x86/isa/atpic.c | 4 ---- sys/x86/isa/atrtc.c | 3 --- sys/x86/isa/clock.c | 3 --- sys/x86/isa/isa_dma.c | 4 ---- sys/x86/pci/pci_bus.c | 4 ---- sys/x86/x86/nexus.c | 4 ---- 8 files changed, 30 deletions(-) diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index 3f06033ae89a..256bd83e720e 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -1091,10 +1091,6 @@ static device_method_t fpupnp_methods[] = { /* Device interface */ DEVMETHOD(device_probe, fpupnp_probe), DEVMETHOD(device_attach, fpupnp_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), { 0, 0 } }; diff --git a/sys/i386/i386/npx.c b/sys/i386/i386/npx.c index 09abf7c17438..91904d70c4a2 100644 --- a/sys/i386/i386/npx.c +++ b/sys/i386/i386/npx.c @@ -1365,10 +1365,6 @@ static device_method_t npxisa_methods[] = { /* Device interface */ DEVMETHOD(device_probe, npxisa_probe), DEVMETHOD(device_attach, npxisa_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), { 0, 0 } }; diff --git a/sys/x86/isa/atpic.c b/sys/x86/isa/atpic.c index 07c3b42e5d8d..3097d8eb67b5 100644 --- a/sys/x86/isa/atpic.c +++ b/sys/x86/isa/atpic.c @@ -598,10 +598,6 @@ static device_method_t atpic_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atpic_probe), DEVMETHOD(device_attach, atpic_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), { 0, 0 } }; diff --git a/sys/x86/isa/atrtc.c b/sys/x86/isa/atrtc.c index 668834307eb2..7fe0402de791 100644 --- a/sys/x86/isa/atrtc.c +++ b/sys/x86/isa/atrtc.c @@ -636,9 +636,6 @@ static device_method_t atrtc_isa_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atrtc_probe), DEVMETHOD(device_attach, atrtc_isa_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), /* XXX stop statclock? */ DEVMETHOD(device_resume, atrtc_resume), diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c index 05296b5849ad..cbd6b59580c5 100644 --- a/sys/x86/isa/clock.c +++ b/sys/x86/isa/clock.c @@ -644,9 +644,6 @@ static device_method_t attimer_methods[] = { /* Device interface */ DEVMETHOD(device_probe, attimer_probe), DEVMETHOD(device_attach, attimer_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, attimer_resume), { 0, 0 } }; diff --git a/sys/x86/isa/isa_dma.c b/sys/x86/isa/isa_dma.c index 5415d05febc5..d0e9bf736263 100644 --- a/sys/x86/isa/isa_dma.c +++ b/sys/x86/isa/isa_dma.c @@ -589,10 +589,6 @@ static device_method_t atdma_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atdma_probe), DEVMETHOD(device_attach, atdma_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), { 0, 0 } }; diff --git a/sys/x86/pci/pci_bus.c b/sys/x86/pci/pci_bus.c index 40136be72f6d..ac8a00139eff 100644 --- a/sys/x86/pci/pci_bus.c +++ b/sys/x86/pci/pci_bus.c @@ -707,10 +707,6 @@ static device_method_t pcibus_pnp_methods[] = { /* Device interface */ DEVMETHOD(device_probe, pcibus_pnp_probe), DEVMETHOD(device_attach, pcibus_pnp_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), { 0, 0 } }; diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c index 08875d498e53..18fc28428891 100644 --- a/sys/x86/x86/nexus.c +++ b/sys/x86/x86/nexus.c @@ -887,10 +887,6 @@ static device_method_t sysresource_methods[] = { /* Device interface */ DEVMETHOD(device_probe, sysresource_probe), DEVMETHOD(device_attach, sysresource_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), DEVMETHOD_END }; From nobody Sun Dec 1 04:58:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6T2wDlz5gDHy; Sun, 01 Dec 2024 04:58:09 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6T1hNzz4D8b; Sun, 1 Dec 2024 04:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EWP79V7FH30BLy/pWTOzTiHRyM/3SgySLo8oo31vP8k=; b=JQF36hNDRwaePPhsNAkTJULu3niTl5+8WYSKuDL9KGJGpghpnZ2SCSUsCch46g2moqA7sP 0wobHhZvHsjwnO7UYvnVeCwY26FuCttO0aYyv+MIxKXo5077naSWFfvS9jDBncUENbAkOy lL6CGjdbQi1FrgCqwuReDk3zcP+tCheNVvtU/YzD8mih+BKP/IPkABv1iWrH47gHosSa/g B3Mu92L7A4GEfo+gQmFAdR5tve5FpGTbkD++M/Qn8zx7IfD808BGQGt1WiqIoH1xV5x4Jc Uzj6+neeZ6byFV4eszY44OrAeR/s2VWs2HKvF8WUqmQOFWWIMpiWBaBjnVh0WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EWP79V7FH30BLy/pWTOzTiHRyM/3SgySLo8oo31vP8k=; b=KpdhgjQbXe0w430RDrfOA1Q9Zl6w9r0GF4OGdjDSvQRwJ2RcCWt6dXHapHCg/3GtXpP5l4 WtbBxoZGkxX/IGxft8cn+Jwaa77P0jKOrn+UJMLbcoDorHp2bdj4EGKgDCYLeSVjXWbOIA mmp/nflVnP1yq/1jrFKsvZfxCe647ECT8IwW3ttPpyVzPBfyTJMZAxcMw7VytKPSUZzgX8 ddU/lq4Q/kj+lLQsNiGDSb85WtKIdewXBi2Rl2CAluab7gwxDAUrOdTeoCxEX4YuDuZ4d/ Loi0r+LitlayZ22I4myhsvU6w8w215/rQw5RwfdrGRX114S/op75/J43qxiIFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029089; a=rsa-sha256; cv=none; b=pV3TPYyPnjI9B5vUlTO2DkH83YHtgBKzhibKP/wb9+xBg2/T/+QVAqo0SVbl4PmSEFR7gP UygKi7HEfZWhwx0efH+yJDb71PrKl7ShvughAAaSwkm+oTgR3YtrI+akEnmFrPEySKdgr7 Pm/hLyTfa4KUCYRL9FiQSz7PUGMkucCPGA9Kp9L7W+XU0gA5t5vr74c/zHY1R1DJw5rP0m 6Sy0J2tnaKHlsTCLC/8g9kUBcs8nW9N5pW2enAcANOYF0+suz9Euumwrtc5Hl8oM/EUsu0 OC1xPuQdLy++82wkFy1+KgcFRMHu076m2CwBamIxswIKO93utsNKsD0M8t+Dmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6T1JtSzdn8; Sun, 1 Dec 2024 04:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14w9s3098051; Sun, 1 Dec 2024 04:58:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14w9ds098048; Sun, 1 Dec 2024 04:58:09 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:58:09 GMT Message-Id: <202412010458.4B14w9ds098048@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: fba4ef71b71e - stable/13 - Remove bogus detach routines List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fba4ef71b71e5f3808680f22401d3eab15dd6a4f Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fba4ef71b71e5f3808680f22401d3eab15dd6a4f commit fba4ef71b71e5f3808680f22401d3eab15dd6a4f Author: John Baldwin AuthorDate: 2024-11-05 01:31:16 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:48:00 +0000 Remove bogus detach routines These drivers are not bus drivers, and would need proper detach routines that tore down state stored in the softc. Better to just fail detach outright instead of an incorrect success. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47389 (cherry picked from commit 7ebc7d1ab76b9d06be9400d6c9fc74fcc43603a1) --- sys/dev/gpio/gpiomdio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/gpio/gpiomdio.c b/sys/dev/gpio/gpiomdio.c index 4e835e2c9ccd..1faf8b7e7a04 100644 --- a/sys/dev/gpio/gpiomdio.c +++ b/sys/dev/gpio/gpiomdio.c @@ -215,7 +215,6 @@ static device_method_t gpiomdio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, gpiomdio_probe), DEVMETHOD(device_attach, gpiomdio_attach), - DEVMETHOD(device_detach, bus_generic_detach), /* MDIO interface */ DEVMETHOD(miibus_readreg, gpiomdio_readreg), From nobody Sun Dec 1 04:58:10 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6V4mPmz5gDMH; Sun, 01 Dec 2024 04:58:10 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6V2Pdlz4D8v; Sun, 1 Dec 2024 04:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r7mcMK8B39F6dxk9/0FNVfx3xJ7D4TdnAY0aaY9SeMs=; b=LwGmXmzNrnoUHarHV71fiRnMdsV29sfOZMwcyLH4pyN2wP1nJv7gA6UKEKnhRLnWr5X0cb eKFVpR4rMLMhBn//PmlL8GbnDMcbBONH3ATP+eCQUW6LcW8cHT1Ifm4BGv54OsmqX8OWWI rHeAyJZF33AF0aS9OaXoVe+vp/PnSxU3fnjueRjD4fNHwnJ++j5qacoi4Gylw7iAWrJoBU Eiwes6VxQAkUJA/T0BE/whzjxWDNAPCUUWmd+yNmVGZorJ+3B3yOgJumqyUhuzIYX617i6 YqVDcUNtWkMj2qS+u1ddmZaWcjMCSqEA9toRfkL9kIQlP/6mlqeM6mlUqWj3Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r7mcMK8B39F6dxk9/0FNVfx3xJ7D4TdnAY0aaY9SeMs=; b=UJWNl0oiubmYvq1B6llx80B54s0j1iepQjM9HpRRfJgvkRFi0r+au1rPpl3N9wDF0bbV9m zi0WM1oD6M12jpWyl1o8v2Yia6xIoviDgH+1ybK6HcbdeQBODpimdZxwU+nW3v9D+Nv+GA +X7PV0plrhbEKfUb0QNqBvoCt+sWCJDh4Rgvz3BjiK5D0xCol8lCa/aPOHsyCpHnEgqGO9 s40MGlaanmcLczyo8wco6lfqnEoff/DgNTtZVVJD/tH0glFw+TwGqFi/WDcViPmbGx5QoI cUjzaQzcwaZALUB7tdsT9yzsqdU/dHk3+HDVV9niBAOYPjaArSh1pwZePbTYrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029090; a=rsa-sha256; cv=none; b=UUFtbHVvUthgBaD2bOYzw875KWW1B1TnTqccYN1iZOlT9gjr26jT4dIAMljveAewH0V52a w6jqoWrC5FZPhUHNdd+uoRgCnumx0t8ZQGsUzv+nPFAB2V77kf7HMbFKdyBIuoqLHFezkB CjxV5+LK2iPFPivkUf2IQFT2VGKUMkZkWvxLngxGr0gf1tPaeacqb3ooMELvpJojZ/GK9l 7Vuhwbzowpd4lNxqISr3/gMVfX/aSqwH19pea4mf3b787PYySwe4mWYSgq9yH2EW4p+283 q+QtQBmx2mb5D7YmbG2IyGs4i4kKDp1Zzm9F/rkff1aBj6V5z+L3BJxyaqBK4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6V224hzfNl; Sun, 1 Dec 2024 04:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14wACB098099; Sun, 1 Dec 2024 04:58:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14wAn0098096; Sun, 1 Dec 2024 04:58:10 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:58:10 GMT Message-Id: <202412010458.4B14wAn0098096@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6fa094ed183c - stable/13 - vga_pci: Use bus_generic_* directly instead of wrappers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6fa094ed183c0e4ff91c7fc4ed56b0f38bc15534 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6fa094ed183c0e4ff91c7fc4ed56b0f38bc15534 commit 6fa094ed183c0e4ff91c7fc4ed56b0f38bc15534 Author: John Baldwin AuthorDate: 2024-11-19 15:26:32 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:51:08 +0000 vga_pci: Use bus_generic_* directly instead of wrappers Differential Revision: https://reviews.freebsd.org/D47375 (cherry picked from commit c7d29adcb3ce6544eb30c6b5489999d8f001cb71) --- sys/dev/pci/vga_pci.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index f1f645840cae..671bc94a1118 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -382,13 +382,6 @@ vga_pci_attach(device_t dev) return (0); } -static int -vga_pci_suspend(device_t dev) -{ - - return (bus_generic_suspend(dev)); -} - static int vga_pci_detach(device_t dev) { @@ -400,13 +393,6 @@ vga_pci_detach(device_t dev) return (error); } -static int -vga_pci_resume(device_t dev) -{ - - return (bus_generic_resume(dev)); -} - /* Bus interface. */ static int @@ -737,9 +723,9 @@ static device_method_t vga_pci_methods[] = { DEVMETHOD(device_probe, vga_pci_probe), DEVMETHOD(device_attach, vga_pci_attach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, vga_pci_suspend), + DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_detach, vga_pci_detach), - DEVMETHOD(device_resume, vga_pci_resume), + DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ DEVMETHOD(bus_read_ivar, vga_pci_read_ivar), From nobody Sun Dec 1 04:58:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6W6n3zz5gDMx; Sun, 01 Dec 2024 04:58:11 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6W3lXtz4DHT; Sun, 1 Dec 2024 04:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1E9CDmdhvrwlATGtaM/RU+9Kh7k8MDGLC0eYBL0wyzM=; b=GWAqZo0ytO+EpOHcyueZ1SM9iZLP1fm0Vw0253Zi3rpSguaLW+iMUwFrzpS17v0W4erhxx ufAAqG7iIE3lXuHDOS5DWEW/ZfAnfCF99rH3pp1dR53rnkndzyDKvtYLF+66Gv/PqOkJ+R WAnPi8QKzSpVrMvQclk9ZB8Rg5rHjkceFRCG25dW5qQVED/sGQUJO+TZEYu2EII+jFeNKF 2zNYD8Sb7TAz405OmQnzzUF262YpGJoYMalxB16Z7lVYDDRRjPOufCHvtfut64TmeS7fMf TVN77bBO8+atBA8xVsfdeMzUaxVRegm9/nIA8U0BWO91a9WNPrdn9SH4tCR8Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1E9CDmdhvrwlATGtaM/RU+9Kh7k8MDGLC0eYBL0wyzM=; b=M/DoDW4L5RfU5s5Lgyech6NrwVjVhwUR7QqEUAZLRsblUBGRPBMAq9cirgv70C0K7a+cUZ auIpFPkTjjIHktSbaZa8BS0Qq+t/ePlGpHi0KkbZhyOKKxyVl9bl1Mrepm1y9XmXbadUMa Ba0QGJ2h0TFwYlL8ADOcnhKDQswjPgirBPK4XDd7y1j3HZmXeiosjo/oDDaa8JyHE2TIIm vYmxnLTS/pfdnJobRjrBs7Rq4dk71xrzEk88B6yPe7ckGCN6C1m6QC5EZs1eO6oWhzx4/Z vqzfIkjy+ZHh/F6tbDCS9GDganFuYFj+uqaT6xB0ejZZoOD67gY88Dj/9WOuWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029091; a=rsa-sha256; cv=none; b=mcGdjZI6bPnO6Q4za8yeHIBKcspe7RMixTpNu8TNfbk0p9DPPc6pk41BKZ8gTftcWiXpk8 xyfkrvUT/oLrq/iIwZmguYRi3sTbLLKkQHPNGBKTASKIsnUjVzxc2Z/0BW5BcS46YHO2C3 wWOr4ZJ2MGtrn5tuJil68dZpUbC1a6lvMrxTzK/lOV7ZARr8jBfTZM0KlprNMKntdbwt7c DJOD+9xNbVXfRuiDU3nHO/67PY0rh1RifSFfpWMY8ADeTGfGps3NGZ94DUYmZGz9KYBH80 ayQvkkvdXex04M+EvGxO+slYMcJb2O4x1lvOKYUsIyA7r7Xly24jt/X6a/JOGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6W3KnDzfLT; Sun, 1 Dec 2024 04:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14wBNU098160; Sun, 1 Dec 2024 04:58:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14wBPY098157; Sun, 1 Dec 2024 04:58:11 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:58:11 GMT Message-Id: <202412010458.4B14wBPY098157@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 9ee1bb61d76a - stable/13 - new-bus: Fix some shortcomings in disabling devices via hints List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9ee1bb61d76a9a74983ae13985b66485d16f49dd Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9ee1bb61d76a9a74983ae13985b66485d16f49dd commit 9ee1bb61d76a9a74983ae13985b66485d16f49dd Author: John Baldwin AuthorDate: 2024-11-23 16:39:02 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:51:22 +0000 new-bus: Fix some shortcomings in disabling devices via hints A device can be disabled via a hint after it is probed (but before it is attached). The initial version of this marked the device disabled, but left the device "alive" meaning that dev->driver and dev->desc were untouched and still pointed into the driver that probed the device. If that driver lives in a kernel module that is later unloaded, device_detach() called from devclass_delete_driver() doesn't do anything (the device's state is DS_ALIVE). In particular, it doesn't call device_set_driver(dev, NULL) to disassociate the device from the driver that is being unloaded. There are several places where these stale pointers can be tripped over. After kldunload, invoking the sysctl to fetch device info can dereference dev->desc and dev->driver causing panics. Even without kldunload, a system suspend request will call the device_suspend and device_resume DEVMETHODs of the driver in question even though the device is not attached which can cause some excitement. To clean this up, more fully detach a device that is disabled by a hint by clearing the driver and setting the state to DS_NOTPRESENT. However, to keep the device name+unit combination reserved, leave the device attached to its devclass. This requires a change to 'devctl enable' handling to deal with this updated state. It now checks for a non-NULL devclass to determine if a disabled device is in this state and if so it clears the hint. However, it also now clears the devclass before attaching the device. This gives all drivers an opportunity to attach to the now-enabled device. Reported by: adrian Discussed with: imp Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47691 (cherry picked from commit b4c700fa7cca7d3e4da84dd417fc3efc42788a52) --- sys/kern/subr_bus.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index aec5b4c615fd..0add4e019043 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3018,7 +3018,13 @@ device_attach(device_t dev) int error; if (resource_disabled(dev->driver->name, dev->unit)) { + /* + * Mostly detach the device, but leave it attached to + * the devclass to reserve the name and unit. + */ device_disable(dev); + (void)device_set_driver(dev, NULL); + dev->state = DS_NOTPRESENT; if (bootverbose) device_printf(dev, "disabled via hints entry\n"); return (ENXIO); @@ -5858,17 +5864,20 @@ devctl2_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, * attach the device rather than doing a full probe. */ device_enable(dev); - if (device_is_alive(dev)) { + if (dev->devclass != NULL) { /* * If the device was disabled via a hint, clear * the hint. */ - if (resource_disabled(dev->driver->name, dev->unit)) - resource_unset_value(dev->driver->name, + if (resource_disabled(dev->devclass->name, dev->unit)) + resource_unset_value(dev->devclass->name, dev->unit, "disabled"); - error = device_attach(dev); - } else - error = device_probe_and_attach(dev); + + /* Allow any drivers to rebid. */ + if (!(dev->flags & DF_FIXEDCLASS)) + devclass_delete_device(dev->devclass, dev); + } + error = device_probe_and_attach(dev); break; case DEV_DISABLE: if (!device_is_enabled(dev)) { From nobody Sun Dec 1 04:58:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1F6Y0hSjz5gDML; Sun, 01 Dec 2024 04:58:13 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F6X4SHMz4DL6; Sun, 1 Dec 2024 04:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3gYclD+6f5L0o6LR1hp1g8TwXeSHOu08CuAQZfid1zc=; b=VpE1OTP3/93PfyBSTNidkWiAl4k6JSNWjlD4e9pZ10bM8BrJRESCOky3sx56gM3X1PgNIH wEjlQhyR+j8Nz5wkixqbIZMsa3hdp/SEKvOgDDKSP4eBDpuqzFZfSyCc35bhopJDdEWiIA RuLrnvyusXW58fD2ohsGVpSow0m70ZrcH50uHJH3lVF1B+XttdMPU58Std4C0XhbRinKwH YVt1XMfzPAqrZEvB4LeO6+lcHGWSJ6jaml0YDaPkP14VWoryc+uXqQyZklmuO++vKkub/B 13HD1azjzXalI5eZLM4iqzfbFfhNObi1sXwZ0EMirpValZZL0SQ+HFASF0tVZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3gYclD+6f5L0o6LR1hp1g8TwXeSHOu08CuAQZfid1zc=; b=enN6rsCf9wPsd/2Nd3Db8PQ9F0K9qfaNmBbxtAcLQcbCsWkjhJoKPti1P2DrvhmL24m+UI 9oaDMEo26mYydvNsTrLx5U0Pio1aGumjuuUxnRsFXUjWIsaImrPN5CRM0fk1agNgIwkgy8 Kn3YxiI+cKmKYrSw95/8Ec4MJrKner3NytQjX9d+d2AjYRcIZGiTZ+yEkVipvd3tebxn4Q e6UtJe8vXqewygjfxFzTO37oc6bOetly3yJMQ75l3DEaXiPOxOVbH57ntFTMQeYTVk2age pSzHEZ7mbQSyTz7jkRnU4wQoEX8kazblo34zPv4GAyl1JDRNemdB3c3kbdKf5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029092; a=rsa-sha256; cv=none; b=yF2qLcKrm0MoX7OJuxT/LFS5B8Qbnqhnzpqeg+oUC54IMsec/2s1CFrwICtyhWBQechASy kUC3QkEcPlcArupY4KlNd2YYC/idOyCLowZFX8kdqWip3KJB+0zudjX910nxKdArkRcH+Y lEmQJjBezKudzutK3lQGlGC2jMAdyK9sFq9Cd+J/cnUfLLLqlwqudTgT3IidDOtSE1/vug 9+v+mDmncbUskdfRk2YpQ5GCUQyhyeNP8LrASzHg2ie0rhI2ckiHEKfZa2I7+d4sy+WNu4 UFFEGoee9qUhflnT21N7ix/MHdXgqmVF+7tRjUAhCZv63J6KIGxnEW5cdZ0BEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1F6X44htzf7c; Sun, 1 Dec 2024 04:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14wCLP098211; Sun, 1 Dec 2024 04:58:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14wChm098208; Sun, 1 Dec 2024 04:58:12 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:58:12 GMT Message-Id: <202412010458.4B14wChm098208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ac8517f04c0f - stable/13 - find: Correct ls(1) equivalent command for -ls primary List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ac8517f04c0fe31968ed43e36608ad02d72d3597 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ac8517f04c0fe31968ed43e36608ad02d72d3597 commit ac8517f04c0fe31968ed43e36608ad02d72d3597 Author: Thomas Eberhardt AuthorDate: 2024-11-23 16:45:27 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:54:18 +0000 find: Correct ls(1) equivalent command for -ls primary After commit 3bfbb521fef5, -g stopped being a no-op. The -g hasn't been required for equivalent output since 4.4BSD. PR: 282901 Fixes: 3bfbb521 ls: Improve POSIX compatibility for -g and -n. The ls(1) change hasn't been merged to stable/13, but the -g is still a no-op on stable/13 so the updated docs here are still correct and more future-proof. (cherry picked from commit b4ede68c21c6c0277bc283c2bda35f3136e836b6) --- usr.bin/find/find.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index def6a82d0a97..c10380ac499a 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -30,7 +30,7 @@ .\" .\" @(#)find.1 8.7 (Berkeley) 5/9/95 .\" -.Dd January 21, 2024 +.Dd November 23, 2024 .Dt FIND 1 .Os .Sh NAME @@ -602,7 +602,7 @@ displayed preceded by .Dq Li -> . The format is identical to that produced by .Bk -words -.Dq Nm ls Fl dgils . +.Dq Nm ls Fl dils . .Ek .It Ic -maxdepth Ar n Always true; descend at most From nobody Sun Dec 1 11:18:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYK5b4Bz5fTHc; Sun, 01 Dec 2024 11:18:29 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYK5C5Vz42hK; Sun, 1 Dec 2024 11:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nJIWMmknHJho5GRfRLzEzHuA2zoq6YZUHGmU9uOs4tk=; b=J4IKDMVl6M6eUxshnAsisQnWSA4kckR36+Fjm0KmsBU3wyzbUv1kF992xtraVmCPkgubcT 4rae8frQOnGlBuoBRqDBAL5ZJrNfjzMmFKo9G2NER4IreAMtrUC3bSifpIGqoToWg3KdZH 8CbH+EUO8LCEfHpif/pY01ay6tpmXhMd2Y/QacFcLMmDIcsFjTVs5kdqiLtmna7NX+6wqJ XUmPjGH9MZ5JyAkp5lFUN+krQD5opAdbfvqo/EYBzebhsgWOt+xF/nIRB3MEq8i7673Qqn /JMJECMPSiaL+ict1lAthpFKwZZhuwPKIObw+hwE4EBxiLII4mJz6Rxivjoupg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nJIWMmknHJho5GRfRLzEzHuA2zoq6YZUHGmU9uOs4tk=; b=f2kZZMWnQdnDIofcwiAXrPMmHhcfy/Vd4l1jkOOspwaZ/Tg7TRmv5G32zqdEWooqmw88wC FtdZLCVynKWK7YSyzRbyLuCt5mupIMqmeoze8E9WdTvOUZWcRQ1YeoKfC9xiAkWXgCvpKo jzNPTVz60igqTePVFiCNx9tGte7pOLVEE9gzl5OmPMPihQ+ccsrvd+KOdBTq0D7p9V3Z15 wT/WdbS3GqLHJFw/7o2H/jTeYFJhQA7w3agsNfejQ6jBsnj3qg57mC4Ebs4E5fgs+yNCe3 0cU+3HvhgBmZyKemECOyKlipNDg+lIuaVP1kixBqV23jgel5bTobiSousMbn+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051909; a=rsa-sha256; cv=none; b=KzP6cPsibhIJd/TD+Xavn+/COhcol8Te6FtoOvanWZ93FBGxLP/PWE8ebb4QzAP3eOLjGa tdYlB5hTiae8rGAjtpXBP+yONYQ6njVZyqq/Y371Kq5gDmCFH6dY36GgOU0Tqhzioyzmg4 hvESeCy7bRAAKUNSCXfAo8ffOBcvjKI6bAI6I1CX8yB3eNttmNrl7iprvgVLeVd7x06u+l zU8u5BPgNxpe5+egq7N9QRUChSFgUAZT13FJk1l2OFy0Lvb4ULrbfvgbiB5TPEpP5zz+Us PdWyJBYO+Vo4tQMffuwdgIDGZZ172K7UCuQWor9lqGdN0hk1Ruq9YVHuuUhevg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYK4YbWzr0N; Sun, 1 Dec 2024 11:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BITpd007593; Sun, 1 Dec 2024 11:18:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIGb5007561; Sun, 1 Dec 2024 11:18:16 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:16 GMT Message-Id: <202412011118.4B1BIGb5007561@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 0eb20fbda7a3 - stable/14 - Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0eb20fbda7a3b7e431f5592716af9bdcbe39bf0a Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0eb20fbda7a3b7e431f5592716af9bdcbe39bf0a commit 0eb20fbda7a3b7e431f5592716af9bdcbe39bf0a Author: Dimitry Andric AuthorDate: 2024-07-27 23:34:35 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:16:52 +0000 Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-19-init-18630-gf2ccf80136a0, the last commit before the upstream release/19.x branch was created. PR: 280562 MFC after: 1 month (cherry picked from commit 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583) --- ObsoleteFiles.inc | 477 + contrib/llvm-project/FREEBSD-Xlist | 56 +- contrib/llvm-project/clang/include/clang-c/Index.h | 85 +- .../clang/include/clang/APINotes/APINotesManager.h | 2 +- .../clang/include/clang/APINotes/APINotesReader.h | 25 +- .../clang/include/clang/APINotes/APINotesWriter.h | 29 +- .../clang/include/clang/APINotes/Types.h | 77 +- .../clang/include/clang/AST/ASTConcept.h | 11 +- .../clang/include/clang/AST/ASTConsumer.h | 3 +- .../clang/include/clang/AST/ASTContext.h | 134 +- .../clang/include/clang/AST/ASTMutationListener.h | 27 + .../clang/include/clang/AST/ASTNodeTraverser.h | 130 +- .../clang/include/clang/AST/ASTUnresolvedSet.h | 9 +- .../clang/include/clang/AST/AbstractBasicReader.h | 13 +- .../clang/include/clang/AST/AbstractBasicWriter.h | 12 +- .../clang/include/clang/AST/Availability.h | 63 + .../clang/include/clang/AST/BuiltinTypes.def | 5 +- .../clang/include/clang/AST/CommentCommandTraits.h | 22 + .../clang/include/clang/AST/CommentCommands.td | 9 +- .../clang/include/clang/AST/CommentParser.h | 9 +- .../clang/include/clang/AST/ComparisonCategories.h | 2 +- .../clang/include/clang/AST/ComputeDependence.h | 6 +- .../llvm-project/clang/include/clang/AST/Decl.h | 286 +- .../clang/include/clang/AST/DeclAccessPair.h | 37 +- .../clang/include/clang/AST/DeclBase.h | 72 +- .../llvm-project/clang/include/clang/AST/DeclCXX.h | 63 +- .../clang/include/clang/AST/DeclContextInternals.h | 41 +- .../clang/include/clang/AST/DeclFriend.h | 2 +- .../llvm-project/clang/include/clang/AST/DeclID.h | 274 + .../clang/include/clang/AST/DeclObjC.h | 119 +- .../clang/include/clang/AST/DeclOpenMP.h | 19 +- .../clang/include/clang/AST/DeclTemplate.h | 395 +- .../llvm-project/clang/include/clang/AST/Expr.h | 577 +- .../llvm-project/clang/include/clang/AST/ExprCXX.h | 199 +- .../clang/include/clang/AST/ExprOpenMP.h | 124 - .../clang/include/clang/AST/ExternalASTSource.h | 8 +- .../clang/include/clang/AST/FormatString.h | 13 + .../clang/include/clang/AST/GlobalDecl.h | 4 + .../clang/include/clang/AST/JSONNodeDumper.h | 5 + .../llvm-project/clang/include/clang/AST/Mangle.h | 11 +- .../clang/include/clang/AST/NestedNameSpecifier.h | 8 +- .../clang/include/clang/AST/OpenACCClause.h | 917 + .../clang/include/clang/AST/OpenMPClause.h | 40 + .../clang/include/clang/AST/OperationKinds.def | 6 + .../clang/include/clang/AST/ParentMapContext.h | 2 +- .../clang/include/clang/AST/PrettyPrinter.h | 7 +- .../clang/include/clang/AST/PropertiesBase.td | 3 + .../clang/include/clang/AST/RawCommentList.h | 15 +- .../clang/include/clang/AST/RecursiveASTVisitor.h | 170 +- .../clang/include/clang/AST/Redeclarable.h | 4 +- .../llvm-project/clang/include/clang/AST/Stmt.h | 31 +- .../clang/include/clang/AST/StmtObjC.h | 3 +- .../clang/include/clang/AST/StmtOpenACC.h | 256 + .../clang/include/clang/AST/StmtOpenMP.h | 157 +- .../clang/include/clang/AST/StmtVisitor.h | 3 +- .../clang/include/clang/AST/TemplateBase.h | 2 +- .../clang/include/clang/AST/TemplateName.h | 37 +- .../clang/include/clang/AST/TextNodeDumper.h | 17 + .../llvm-project/clang/include/clang/AST/Type.h | 1137 +- .../llvm-project/clang/include/clang/AST/TypeLoc.h | 71 +- .../clang/include/clang/AST/TypeProperties.td | 51 + .../clang/include/clang/AST/UnresolvedSet.h | 1 + .../clang/include/clang/AST/VTTBuilder.h | 6 +- .../clang/include/clang/AST/VTableBuilder.h | 29 + .../clang/include/clang/ASTMatchers/ASTMatchers.h | 148 +- .../clang/ASTMatchers/ASTMatchersInternal.h | 50 +- .../clang/Analysis/Analyses/ExprMutationAnalyzer.h | 136 +- .../clang/Analysis/Analyses/PostOrderCFGView.h | 36 +- .../clang/Analysis/Analyses/ThreadSafetyCommon.h | 6 +- .../clang/Analysis/Analyses/UnsafeBufferUsage.h | 58 +- .../Analysis/Analyses/UnsafeBufferUsageGadgets.def | 12 +- .../clang/include/clang/Analysis/CFG.h | 3 + .../include/clang/Analysis/FlowSensitive/ASTOps.h | 156 + .../clang/Analysis/FlowSensitive/AdornedCFG.h | 96 + .../clang/Analysis/FlowSensitive/CNFFormula.h | 179 + .../Analysis/FlowSensitive/ControlFlowContext.h | 79 - .../Analysis/FlowSensitive/DataflowAnalysis.h | 200 +- .../FlowSensitive/DataflowAnalysisContext.h | 75 +- .../Analysis/FlowSensitive/DataflowEnvironment.h | 323 +- .../clang/Analysis/FlowSensitive/DataflowLattice.h | 8 +- .../clang/Analysis/FlowSensitive/DataflowValues.h | 12 +- .../include/clang/Analysis/FlowSensitive/Logger.h | 6 +- .../clang/Analysis/FlowSensitive/RecordOps.h | 6 +- .../include/clang/Analysis/FlowSensitive/Solver.h | 3 + .../clang/Analysis/FlowSensitive/Transfer.h | 9 +- .../FlowSensitive/TypeErasedDataflowAnalysis.h | 25 +- .../include/clang/Analysis/FlowSensitive/Value.h | 41 - .../Analysis/FlowSensitive/WatchedLiteralsSolver.h | 10 +- .../clang/include/clang/Analysis/PathDiagnostic.h | 8 +- .../clang/include/clang/Analysis/SelectorExtras.h | 4 +- .../clang/include/clang/Basic/AMDGPUTypes.def | 21 + .../include/clang/Basic/ASTSourceDescriptor.h | 52 + .../clang/include/clang/Basic/AllDiagnostics.h | 1 + .../llvm-project/clang/include/clang/Basic/Attr.td | 508 +- .../clang/include/clang/Basic/AttrDocs.td | 449 +- .../include/clang/Basic/AttributeCommonInfo.h | 6 +- .../clang/include/clang/Basic/Builtins.def | 1705 +- .../clang/include/clang/Basic/Builtins.h | 7 +- .../clang/include/clang/Basic/Builtins.td | 4770 ++++ .../clang/include/clang/Basic/BuiltinsAArch64.def | 15 +- .../clang/include/clang/Basic/BuiltinsAMDGPU.def | 82 +- .../clang/include/clang/Basic/BuiltinsBPF.def | 33 - .../clang/include/clang/Basic/BuiltinsBPF.td | 37 + .../clang/include/clang/Basic/BuiltinsBase.td | 127 + .../clang/include/clang/Basic/BuiltinsNVPTX.def | 20 +- .../clang/include/clang/Basic/BuiltinsRISCV.def | 93 - .../clang/include/clang/Basic/BuiltinsRISCV.td | 148 + .../include/clang/Basic/BuiltinsWebAssembly.def | 12 + .../clang/include/clang/Basic/BuiltinsX86.def | 66 +- .../clang/include/clang/Basic/CharInfo.h | 36 +- .../clang/include/clang/Basic/CodeGenOptions.def | 12 +- .../clang/include/clang/Basic/CodeGenOptions.h | 19 +- .../llvm-project/clang/include/clang/Basic/Cuda.h | 51 +- .../include/clang/Basic/CustomizableOptional.h | 8 - .../clang/include/clang/Basic/DarwinSDKInfo.h | 24 + .../clang/include/clang/Basic/DebugOptions.def | 5 + .../clang/include/clang/Basic/DeclNodes.td | 2 +- .../clang/include/clang/Basic/Diagnostic.td | 1 + .../include/clang/Basic/DiagnosticASTKinds.td | 2 + .../include/clang/Basic/DiagnosticCommonKinds.td | 25 +- .../include/clang/Basic/DiagnosticDriverKinds.td | 93 +- .../include/clang/Basic/DiagnosticFrontendKinds.td | 49 +- .../clang/include/clang/Basic/DiagnosticGroups.td | 131 +- .../clang/include/clang/Basic/DiagnosticIDs.h | 9 +- .../include/clang/Basic/DiagnosticInstallAPI.h | 26 + .../clang/Basic/DiagnosticInstallAPIKinds.td | 77 + .../include/clang/Basic/DiagnosticLexKinds.td | 45 +- .../clang/include/clang/Basic/DiagnosticOptions.h | 2 +- .../include/clang/Basic/DiagnosticParseKinds.td | 64 +- .../include/clang/Basic/DiagnosticSemaKinds.td | 669 +- .../clang/Basic/DiagnosticSerializationKinds.td | 5 + .../clang/include/clang/Basic/DirectoryEntry.h | 7 - .../clang/include/clang/Basic/Features.def | 18 +- .../clang/include/clang/Basic/FileEntry.h | 10 - .../clang/include/clang/Basic/FileManager.h | 29 +- .../clang/include/clang/Basic/IdentifierTable.h | 164 +- .../clang/include/clang/Basic/LangOptions.def | 36 +- .../clang/include/clang/Basic/LangOptions.h | 114 +- .../clang/include/clang/Basic/LangStandard.h | 41 +- .../clang/include/clang/Basic/LangStandards.def | 9 + .../clang/include/clang/Basic/MSP430Target.def | 583 +- .../clang/include/clang/Basic/Module.h | 50 +- .../clang/include/clang/Basic/OpenACCClauses.def | 58 + .../clang/include/clang/Basic/OpenACCKinds.h | 166 +- .../include/clang/Basic/OpenCLExtensionTypes.def | 2 +- .../clang/include/clang/Basic/OpenMPKinds.h | 14 + .../clang/include/clang/Basic/PointerAuthOptions.h | 193 + .../clang/include/clang/Basic/RISCVVTypes.def | 8 +- .../clang/include/clang/Basic/Sanitizers.def | 23 +- .../clang/include/clang/Basic/SourceLocation.h | 1 + .../clang/include/clang/Basic/SourceManager.h | 56 +- .../clang/include/clang/Basic/Specifiers.h | 54 +- .../clang/include/clang/Basic/StmtNodes.td | 13 +- .../clang/include/clang/Basic/SyncScope.h | 3 +- .../clang/include/clang/Basic/TargetBuiltins.h | 4 +- .../clang/include/clang/Basic/TargetCXXABI.h | 2 +- .../clang/include/clang/Basic/TargetInfo.h | 124 +- .../clang/include/clang/Basic/TargetOSMacros.def | 5 +- .../llvm-project/clang/include/clang/Basic/Thunk.h | 15 +- .../clang/include/clang/Basic/TokenKinds.def | 95 +- .../clang/include/clang/Basic/TokenKinds.h | 10 +- .../clang/include/clang/Basic/TypeNodes.td | 4 + .../clang/include/clang/Basic/Visibility.h | 3 + .../clang/include/clang/Basic/arm_fp16.td | 2 +- .../clang/include/clang/Basic/arm_neon.td | 125 +- .../clang/include/clang/Basic/arm_neon_incl.td | 4 +- .../clang/include/clang/Basic/arm_sme.td | 210 +- .../clang/include/clang/Basic/arm_sve.td | 1787 +- .../clang/include/clang/Basic/arm_sve_sme_incl.td | 7 +- .../include/clang/Basic/riscv_sifive_vector.td | 29 +- .../clang/include/clang/Basic/riscv_vector.td | 145 +- .../include/clang/CIR/Dialect/IR/CIRDialect.h | 16 + .../include/clang/CIR/Dialect/IR/CIRDialect.td | 44 + .../clang/include/clang/CIR/Dialect/IR/CIROps.td | 19 + .../clang/include/clang/CodeGen/CGFunctionInfo.h | 11 + .../clang/include/clang/CodeGen/CodeGenABITypes.h | 8 + .../clang/include/clang/CodeGen/CodeGenAction.h | 2 + .../include/clang/CodeGen/ConstantInitBuilder.h | 10 +- .../clang/include/clang/CodeGen/ModuleBuilder.h | 4 + .../clang/include/clang/Driver/ClangOptionDocs.td | 3 +- .../clang/include/clang/Driver/Distro.h | 3 +- .../clang/include/clang/Driver/Driver.h | 54 +- .../clang/include/clang/Driver/OffloadBundler.h | 23 +- .../clang/include/clang/Driver/Options.td | 671 +- .../clang/include/clang/Driver/SanitizerArgs.h | 3 + .../clang/include/clang/Driver/ToolChain.h | 20 +- .../clang/include/clang/Driver/Types.def | 1 + .../clang/Driver/aarch64-mlr-for-calls-only.c | 3 + .../clang/include/clang/ExtractAPI/API.h | 1629 +- .../clang/include/clang/ExtractAPI/APIRecords.inc | 115 + .../include/clang/ExtractAPI/AvailabilityInfo.h | 76 - .../clang/ExtractAPI/DeclarationFragments.h | 118 +- .../clang/ExtractAPI/ExtractAPIActionBase.h | 8 +- .../include/clang/ExtractAPI/ExtractAPIVisitor.h | 789 +- .../include/clang/ExtractAPI/FrontendActions.h | 6 - .../clang/ExtractAPI/Serialization/APISetVisitor.h | 172 + .../ExtractAPI/Serialization/SerializerBase.h | 314 - .../Serialization/SymbolGraphSerializer.h | 258 +- .../clang/include/clang/Format/Format.h | 415 +- .../clang/include/clang/Frontend/ASTUnit.h | 25 +- .../include/clang/Frontend/CompilerInstance.h | 42 + .../include/clang/Frontend/CompilerInvocation.h | 15 + .../clang/include/clang/Frontend/FrontendActions.h | 23 +- .../clang/include/clang/Frontend/FrontendOptions.h | 58 +- .../include/clang/Frontend/MultiplexConsumer.h | 6 +- .../include/clang/Frontend/PrecompiledPreamble.h | 4 +- .../clang/Frontend/PreprocessorOutputOptions.h | 3 + .../clang/Frontend/SerializedDiagnosticReader.h | 7 +- .../clang/include/clang/Frontend/TextDiagnostic.h | 18 +- .../clang/include/clang/InstallAPI/Context.h | 103 + .../include/clang/InstallAPI/DirectoryScanner.h | 81 + .../clang/include/clang/InstallAPI/DylibVerifier.h | 228 + .../clang/include/clang/InstallAPI/FileList.h | 43 + .../clang/include/clang/InstallAPI/Frontend.h | 50 + .../include/clang/InstallAPI/FrontendRecords.h | 113 + .../clang/include/clang/InstallAPI/HeaderFile.h | 167 + .../clang/InstallAPI/InstallAPIDiagnostic.h | 14 + .../clang/include/clang/InstallAPI/Library.h | 65 + .../clang/include/clang/InstallAPI/MachO.h | 54 + .../clang/include/clang/InstallAPI/Visitor.h | 89 + .../clang/include/clang/Interpreter/Interpreter.h | 53 +- .../clang/include/clang/Interpreter/Value.h | 1 + .../include/clang/Lex/ExternalPreprocessorSource.h | 59 +- .../clang/include/clang/Lex/HeaderSearch.h | 79 +- .../clang/include/clang/Lex/HeaderSearchOptions.h | 23 +- .../clang/include/clang/Lex/LiteralSupport.h | 13 +- .../clang/include/clang/Lex/MacroInfo.h | 8 +- .../clang/include/clang/Lex/ModuleMap.h | 15 +- .../clang/include/clang/Lex/PPCallbacks.h | 70 +- .../clang/include/clang/Lex/PPDirectiveParameter.h | 33 + .../clang/include/clang/Lex/PPEmbedParameters.h | 93 + .../clang/include/clang/Lex/PreprocessingRecord.h | 3 +- .../clang/include/clang/Lex/Preprocessor.h | 151 +- .../clang/include/clang/Lex/PreprocessorOptions.h | 30 +- .../llvm-project/clang/include/clang/Lex/Token.h | 5 +- .../clang/include/clang/Parse/Parser.h | 358 +- .../include/clang/Parse/RAIIObjectsForParser.h | 2 +- .../clang/include/clang/Rewrite/Core/HTMLRewrite.h | 15 +- .../include/clang/Sema/AnalysisBasedWarnings.h | 4 + .../llvm-project/clang/include/clang/Sema/Attr.h | 192 + .../include/clang/Sema/CodeCompleteConsumer.h | 10 +- .../clang/include/clang/Sema/CodeCompleteOptions.h | 9 + .../clang/include/clang/Sema/DeclSpec.h | 156 +- .../clang/include/clang/Sema/DelayedDiagnostic.h | 2 + .../include/clang/Sema/HLSLExternalSemaSource.h | 1 - .../clang/include/clang/Sema/Initialization.h | 4 +- .../llvm-project/clang/include/clang/Sema/Lookup.h | 47 +- .../clang/Sema/MultiplexExternalSemaSource.h | 2 +- .../clang/include/clang/Sema/Overload.h | 60 +- .../clang/include/clang/Sema/ParsedAttr.h | 66 +- .../clang/include/clang/Sema/ParsedTemplate.h | 7 +- .../clang/include/clang/Sema/Redeclaration.h | 31 + .../llvm-project/clang/include/clang/Sema/Scope.h | 59 + .../clang/include/clang/Sema/ScopeInfo.h | 37 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 25015 ++++++++++--------- .../clang/include/clang/Sema/SemaAMDGPU.h | 68 + .../clang/include/clang/Sema/SemaARM.h | 77 + .../clang/include/clang/Sema/SemaAVR.h | 32 + .../clang/include/clang/Sema/SemaBPF.h | 35 + .../clang/include/clang/Sema/SemaBase.h | 227 + .../clang/include/clang/Sema/SemaCUDA.h | 304 + .../clang/include/clang/Sema/SemaCodeCompletion.h | 237 + .../clang/include/clang/Sema/SemaConcept.h | 193 +- .../clang/include/clang/Sema/SemaHLSL.h | 68 + .../clang/include/clang/Sema/SemaHexagon.h | 29 + .../clang/include/clang/Sema/SemaInternal.h | 4 - .../clang/include/clang/Sema/SemaLoongArch.h | 30 + .../clang/include/clang/Sema/SemaM68k.h | 30 + .../clang/include/clang/Sema/SemaMIPS.h | 37 + .../clang/include/clang/Sema/SemaMSP430.h | 30 + .../clang/include/clang/Sema/SemaNVPTX.h | 30 + .../clang/include/clang/Sema/SemaObjC.h | 1085 + .../clang/include/clang/Sema/SemaOpenACC.h | 463 + .../clang/include/clang/Sema/SemaOpenCL.h | 107 + .../clang/include/clang/Sema/SemaOpenMP.h | 1457 ++ .../clang/include/clang/Sema/SemaPPC.h | 58 + .../clang/include/clang/Sema/SemaPseudoObject.h | 40 + .../clang/include/clang/Sema/SemaRISCV.h | 57 + .../clang/include/clang/Sema/SemaSYCL.h | 69 + .../clang/include/clang/Sema/SemaSwift.h | 59 + .../clang/include/clang/Sema/SemaSystemZ.h | 28 + .../clang/include/clang/Sema/SemaWasm.h | 52 + .../clang/include/clang/Sema/SemaX86.h | 44 + .../clang/include/clang/Sema/Template.h | 1 + .../clang/include/clang/Sema/TemplateDeduction.h | 5 + .../include/clang/Serialization/ASTBitCodes.h | 352 +- .../Serialization/ASTDeserializationListener.h | 4 +- .../clang/include/clang/Serialization/ASTReader.h | 300 +- .../include/clang/Serialization/ASTRecordReader.h | 31 +- .../include/clang/Serialization/ASTRecordWriter.h | 17 + .../clang/include/clang/Serialization/ASTWriter.h | 183 +- .../clang/include/clang/Serialization/ModuleFile.h | 45 +- .../clang/Serialization/ModuleFileExtension.h | 1 - .../include/clang/Serialization/ModuleManager.h | 3 +- .../clang/Serialization/PCHContainerOperations.h | 4 +- .../clang/Serialization/SourceLocationEncoding.h | 91 +- .../include/clang/Serialization/TypeBitCodes.def | 3 + .../clang/StaticAnalyzer/Checkers/Checkers.td | 129 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.def | 52 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.h | 9 +- .../StaticAnalyzer/Core/BugReporter/BugReporter.h | 12 + .../Core/BugReporter/BugReporterVisitors.h | 26 +- .../Core/BugReporter/BugSuppression.h | 5 + .../Core/BugReporter/Z3CrosscheckVisitor.h | 92 + .../clang/StaticAnalyzer/Core/CheckerManager.h | 2 +- .../StaticAnalyzer/Core/PathDiagnosticConsumers.h | 2 +- .../Core/PathSensitive/CallDescription.h | 84 +- .../StaticAnalyzer/Core/PathSensitive/CallEvent.h | 72 + .../Core/PathSensitive/CheckerContext.h | 24 +- .../Core/PathSensitive/CheckerHelpers.h | 4 + .../StaticAnalyzer/Core/PathSensitive/CoreEngine.h | 18 +- .../StaticAnalyzer/Core/PathSensitive/ExprEngine.h | 14 +- .../StaticAnalyzer/Core/PathSensitive/MemRegion.h | 9 +- .../Core/PathSensitive/ProgramState.h | 16 +- .../Core/PathSensitive/SMTConstraintManager.h | 5 +- .../Core/PathSensitive/SValBuilder.h | 12 +- .../StaticAnalyzer/Core/PathSensitive/SVals.h | 8 - .../StaticAnalyzer/Core/PathSensitive/Store.h | 14 +- .../include/clang/Support/RISCVVIntrinsicUtils.h | 9 +- .../clang/include/clang/Testing/CommandLineArgs.h | 1 + .../clang/include/clang/Testing/TestAST.h | 4 + .../clang/include/clang/Testing/TestClangConfig.h | 16 +- .../include/clang/Tooling/CommonOptionsParser.h | 15 +- .../DependencyScanningFilesystem.h | 105 +- .../DependencyScanning/DependencyScanningService.h | 14 +- .../DependencyScanning/ModuleDepCollector.h | 18 +- .../clang/Tooling/Inclusions/IncludeStyle.h | 23 + .../include/clang/Tooling/NodeIntrospection.h | 101 - .../clang/include/clang/Tooling/Syntax/Tokens.h | 4 +- .../clang/Tooling/Transformer/RangeSelector.h | 5 + .../llvm-project/clang/include/module.modulemap | 20 +- .../clang/lib/APINotes/APINotesFormat.h | 107 +- .../clang/lib/APINotes/APINotesManager.cpp | 8 +- .../clang/lib/APINotes/APINotesReader.cpp | 426 +- .../clang/lib/APINotes/APINotesTypes.cpp | 2 +- .../clang/lib/APINotes/APINotesWriter.cpp | 199 +- .../clang/lib/APINotes/APINotesYAMLCompiler.cpp | 173 +- .../llvm-project/clang/lib/ARCMigrate/ARCMT.cpp | 3 +- .../llvm-project/clang/lib/ARCMigrate/ObjCMT.cpp | 12 +- .../clang/lib/ARCMigrate/TransAPIUses.cpp | 2 +- .../clang/lib/ARCMigrate/TransGCAttrs.cpp | 2 +- .../clang/lib/ARCMigrate/TransUnbridgedCasts.cpp | 2 +- .../clang/lib/ARCMigrate/Transforms.cpp | 5 +- contrib/llvm-project/clang/lib/AST/APValue.cpp | 8 +- contrib/llvm-project/clang/lib/AST/ASTConcept.cpp | 36 +- contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 984 +- .../llvm-project/clang/lib/AST/ASTDiagnostic.cpp | 111 +- contrib/llvm-project/clang/lib/AST/ASTDumper.cpp | 51 +- contrib/llvm-project/clang/lib/AST/ASTImporter.cpp | 398 +- .../clang/lib/AST/ASTStructuralEquivalence.cpp | 45 +- .../llvm-project/clang/lib/AST/ASTTypeTraits.cpp | 2 + .../llvm-project/clang/lib/AST/AttrDocTable.cpp | 2 +- .../AvailabilityInfo.cpp => AST/Availability.cpp} | 27 +- .../llvm-project/clang/lib/AST/CommentParser.cpp | 171 + .../clang/lib/AST/ComparisonCategories.cpp | 16 +- .../clang/lib/AST/ComputeDependence.cpp | 43 +- contrib/llvm-project/clang/lib/AST/Decl.cpp | 294 +- contrib/llvm-project/clang/lib/AST/DeclBase.cpp | 98 +- contrib/llvm-project/clang/lib/AST/DeclCXX.cpp | 215 +- contrib/llvm-project/clang/lib/AST/DeclFriend.cpp | 2 +- contrib/llvm-project/clang/lib/AST/DeclObjC.cpp | 123 +- contrib/llvm-project/clang/lib/AST/DeclOpenMP.cpp | 14 +- contrib/llvm-project/clang/lib/AST/DeclPrinter.cpp | 281 +- .../llvm-project/clang/lib/AST/DeclTemplate.cpp | 393 +- contrib/llvm-project/clang/lib/AST/Expr.cpp | 237 +- contrib/llvm-project/clang/lib/AST/ExprCXX.cpp | 118 +- .../clang/lib/AST/ExprClassification.cpp | 15 +- .../llvm-project/clang/lib/AST/ExprConstShared.h | 10 + .../llvm-project/clang/lib/AST/ExprConstant.cpp | 926 +- .../clang/lib/AST/ExternalASTSource.cpp | 6 +- .../llvm-project/clang/lib/AST/FormatString.cpp | 54 +- .../llvm-project/clang/lib/AST/Interp/Boolean.h | 15 +- .../clang/lib/AST/Interp/ByteCodeEmitter.cpp | 111 +- .../clang/lib/AST/Interp/ByteCodeEmitter.h | 9 +- .../clang/lib/AST/Interp/ByteCodeExprGen.cpp | 3088 --- .../clang/lib/AST/Interp/ByteCodeGenError.h | 46 - .../clang/lib/AST/Interp/ByteCodeStmtGen.cpp | 680 - .../clang/lib/AST/Interp/ByteCodeStmtGen.h | 91 - .../llvm-project/clang/lib/AST/Interp/Compiler.cpp | 5599 +++++ .../AST/Interp/{ByteCodeExprGen.h => Compiler.h} | 408 +- .../llvm-project/clang/lib/AST/Interp/Context.cpp | 169 +- .../llvm-project/clang/lib/AST/Interp/Context.h | 26 +- .../clang/lib/AST/Interp/Descriptor.cpp | 164 +- .../llvm-project/clang/lib/AST/Interp/Descriptor.h | 66 +- .../llvm-project/clang/lib/AST/Interp/Disasm.cpp | 315 +- .../clang/lib/AST/Interp/DynamicAllocator.cpp | 118 + .../clang/lib/AST/Interp/DynamicAllocator.h | 102 + .../clang/lib/AST/Interp/EvalEmitter.cpp | 126 +- .../clang/lib/AST/Interp/EvalEmitter.h | 31 +- .../clang/lib/AST/Interp/EvaluationResult.cpp | 152 +- .../clang/lib/AST/Interp/EvaluationResult.h | 22 +- .../llvm-project/clang/lib/AST/Interp/Floating.h | 2 +- .../llvm-project/clang/lib/AST/Interp/Function.cpp | 3 +- .../llvm-project/clang/lib/AST/Interp/Function.h | 21 +- .../clang/lib/AST/Interp/FunctionPointer.h | 36 +- .../llvm-project/clang/lib/AST/Interp/Integral.h | 10 +- .../llvm-project/clang/lib/AST/Interp/IntegralAP.h | 39 +- .../llvm-project/clang/lib/AST/Interp/Interp.cpp | 563 +- contrib/llvm-project/clang/lib/AST/Interp/Interp.h | 1279 +- .../clang/lib/AST/Interp/InterpBlock.cpp | 11 +- .../clang/lib/AST/Interp/InterpBlock.h | 50 +- .../clang/lib/AST/Interp/InterpBuiltin.cpp | 933 +- .../clang/lib/AST/Interp/InterpFrame.cpp | 62 +- .../clang/lib/AST/Interp/InterpFrame.h | 16 +- .../clang/lib/AST/Interp/InterpShared.cpp | 42 + .../clang/lib/AST/Interp/InterpShared.h | 26 + .../clang/lib/AST/Interp/InterpStack.cpp | 1 + .../clang/lib/AST/Interp/InterpStack.h | 4 +- .../clang/lib/AST/Interp/InterpState.cpp | 33 +- .../clang/lib/AST/Interp/InterpState.h | 29 +- .../clang/lib/AST/Interp/MemberPointer.cpp | 76 + .../clang/lib/AST/Interp/MemberPointer.h | 112 + .../llvm-project/clang/lib/AST/Interp/Opcodes.td | 216 +- .../llvm-project/clang/lib/AST/Interp/Pointer.cpp | 404 +- .../llvm-project/clang/lib/AST/Interp/Pointer.h | 456 +- .../llvm-project/clang/lib/AST/Interp/PrimType.cpp | 1 + .../llvm-project/clang/lib/AST/Interp/PrimType.h | 62 +- .../llvm-project/clang/lib/AST/Interp/Program.cpp | 165 +- .../llvm-project/clang/lib/AST/Interp/Program.h | 12 +- .../llvm-project/clang/lib/AST/Interp/Record.cpp | 21 +- contrib/llvm-project/clang/lib/AST/Interp/Record.h | 21 +- .../llvm-project/clang/lib/AST/Interp/Source.cpp | 2 +- .../llvm-project/clang/lib/AST/Interp/State.cpp | 5 +- .../llvm-project/clang/lib/AST/ItaniumMangle.cpp | 144 +- .../llvm-project/clang/lib/AST/JSONNodeDumper.cpp | 71 +- contrib/llvm-project/clang/lib/AST/Linkage.h | 3 + contrib/llvm-project/clang/lib/AST/Mangle.cpp | 28 +- .../llvm-project/clang/lib/AST/MicrosoftMangle.cpp | 263 +- contrib/llvm-project/clang/lib/AST/NSAPI.cpp | 109 +- .../clang/lib/AST/NestedNameSpecifier.cpp | 18 +- .../llvm-project/clang/lib/AST/ODRDiagsEmitter.cpp | 19 +- contrib/llvm-project/clang/lib/AST/ODRHash.cpp | 25 +- .../llvm-project/clang/lib/AST/OpenACCClause.cpp | 552 + .../llvm-project/clang/lib/AST/OpenMPClause.cpp | 2 + contrib/llvm-project/clang/lib/AST/ParentMap.cpp | 7 +- .../clang/lib/AST/ParentMapContext.cpp | 25 +- .../clang/lib/AST/PrintfFormatString.cpp | 95 +- .../llvm-project/clang/lib/AST/QualTypeNames.cpp | 9 +- .../clang/lib/AST/RecordLayoutBuilder.cpp | 12 + .../clang/lib/AST/ScanfFormatString.cpp | 4 +- .../clang/lib/AST/SelectorLocationsKind.cpp | 4 +- contrib/llvm-project/clang/lib/AST/Stmt.cpp | 1 + contrib/llvm-project/clang/lib/AST/StmtOpenACC.cpp | 125 + contrib/llvm-project/clang/lib/AST/StmtOpenMP.cpp | 43 +- contrib/llvm-project/clang/lib/AST/StmtPrinter.cpp | 66 +- contrib/llvm-project/clang/lib/AST/StmtProfile.cpp | 210 +- .../llvm-project/clang/lib/AST/TemplateBase.cpp | 21 +- .../llvm-project/clang/lib/AST/TemplateName.cpp | 115 +- .../llvm-project/clang/lib/AST/TextNodeDumper.cpp | 321 +- contrib/llvm-project/clang/lib/AST/Type.cpp | 664 +- contrib/llvm-project/clang/lib/AST/TypeLoc.cpp | 18 +- contrib/llvm-project/clang/lib/AST/TypePrinter.cpp | 179 +- contrib/llvm-project/clang/lib/AST/VTTBuilder.cpp | 2 +- .../llvm-project/clang/lib/AST/VTableBuilder.cpp | 105 +- .../clang/lib/ASTMatchers/Dynamic/Marshallers.cpp | 4 +- .../clang/lib/ASTMatchers/Dynamic/Marshallers.h | 4 +- .../clang/lib/ASTMatchers/Dynamic/Registry.cpp | 1 + contrib/llvm-project/clang/lib/Analysis/CFG.cpp | 9 +- .../clang/lib/Analysis/CalledOnceCheck.cpp | 5 +- .../clang/lib/Analysis/ExprMutationAnalyzer.cpp | 168 +- .../clang/lib/Analysis/FlowSensitive/ASTOps.cpp | 287 + .../lib/Analysis/FlowSensitive/AdornedCFG.cpp | 183 + .../lib/Analysis/FlowSensitive/CNFFormula.cpp | 303 + .../Analysis/FlowSensitive/ControlFlowContext.cpp | 121 - .../FlowSensitive/DataflowAnalysisContext.cpp | 73 +- .../Analysis/FlowSensitive/DataflowEnvironment.cpp | 991 +- .../lib/Analysis/FlowSensitive/DebugSupport.cpp | 2 - .../lib/Analysis/FlowSensitive/HTMLLogger.cpp | 129 +- .../lib/Analysis/FlowSensitive/HTMLLogger.css | 10 + .../lib/Analysis/FlowSensitive/HTMLLogger.html | 1 + .../clang/lib/Analysis/FlowSensitive/Logger.cpp | 8 +- .../Models/UncheckedOptionalAccessModel.cpp | 279 +- .../clang/lib/Analysis/FlowSensitive/RecordOps.cpp | 97 +- .../clang/lib/Analysis/FlowSensitive/Transfer.cpp | 361 +- .../FlowSensitive/TypeErasedDataflowAnalysis.cpp | 261 +- .../clang/lib/Analysis/FlowSensitive/Value.cpp | 2 - .../FlowSensitive/WatchedLiteralsSolver.cpp | 482 +- .../clang/lib/Analysis/MacroExpansionContext.cpp | 2 +- .../clang/lib/Analysis/ObjCNoReturn.cpp | 5 +- .../clang/lib/Analysis/PathDiagnostic.cpp | 7 +- .../clang/lib/Analysis/ReachableCode.cpp | 51 +- .../clang/lib/Analysis/ThreadSafetyCommon.cpp | 8 +- .../clang/lib/Analysis/UninitializedValues.cpp | 2 +- .../clang/lib/Analysis/UnsafeBufferUsage.cpp | 1173 +- .../clang/lib/Basic/ASTSourceDescriptor.cpp | 33 + .../llvm-project/clang/lib/Basic/Attributes.cpp | 8 +- contrib/llvm-project/clang/lib/Basic/Builtins.cpp | 7 +- contrib/llvm-project/clang/lib/Basic/CharInfo.cpp | 20 +- contrib/llvm-project/clang/lib/Basic/Cuda.cpp | 111 +- .../llvm-project/clang/lib/Basic/Diagnostic.cpp | 8 +- .../llvm-project/clang/lib/Basic/DiagnosticIDs.cpp | 27 +- .../llvm-project/clang/lib/Basic/FileManager.cpp | 104 +- .../clang/lib/Basic/IdentifierTable.cpp | 39 +- .../llvm-project/clang/lib/Basic/LangOptions.cpp | 4 +- .../llvm-project/clang/lib/Basic/LangStandards.cpp | 13 + contrib/llvm-project/clang/lib/Basic/Module.cpp | 41 +- .../llvm-project/clang/lib/Basic/OpenMPKinds.cpp | 379 +- contrib/llvm-project/clang/lib/Basic/Sarif.cpp | 3 +- .../llvm-project/clang/lib/Basic/SourceManager.cpp | 45 +- .../llvm-project/clang/lib/Basic/TargetInfo.cpp | 15 + contrib/llvm-project/clang/lib/Basic/Targets.cpp | 7 +- .../clang/lib/Basic/Targets/AArch64.cpp | 262 +- .../llvm-project/clang/lib/Basic/Targets/AArch64.h | 21 +- .../clang/lib/Basic/Targets/AMDGPU.cpp | 75 +- .../llvm-project/clang/lib/Basic/Targets/AMDGPU.h | 14 +- .../llvm-project/clang/lib/Basic/Targets/ARM.cpp | 11 +- contrib/llvm-project/clang/lib/Basic/Targets/ARM.h | 21 +- contrib/llvm-project/clang/lib/Basic/Targets/AVR.h | 4 + .../llvm-project/clang/lib/Basic/Targets/BPF.cpp | 6 +- contrib/llvm-project/clang/lib/Basic/Targets/BPF.h | 4 + .../llvm-project/clang/lib/Basic/Targets/CSKY.cpp | 3 +- .../llvm-project/clang/lib/Basic/Targets/CSKY.h | 2 +- .../llvm-project/clang/lib/Basic/Targets/DirectX.h | 1 - .../clang/lib/Basic/Targets/Hexagon.cpp | 12 + .../llvm-project/clang/lib/Basic/Targets/Hexagon.h | 10 + .../clang/lib/Basic/Targets/LoongArch.cpp | 33 +- .../clang/lib/Basic/Targets/LoongArch.h | 5 +- .../llvm-project/clang/lib/Basic/Targets/M68k.cpp | 11 +- .../llvm-project/clang/lib/Basic/Targets/M68k.h | 5 + .../llvm-project/clang/lib/Basic/Targets/Mips.cpp | 28 + .../llvm-project/clang/lib/Basic/Targets/Mips.h | 42 +- .../llvm-project/clang/lib/Basic/Targets/NVPTX.cpp | 163 +- .../llvm-project/clang/lib/Basic/Targets/NVPTX.h | 25 +- .../clang/lib/Basic/Targets/OSTargets.h | 1 + .../llvm-project/clang/lib/Basic/Targets/PPC.cpp | 106 +- contrib/llvm-project/clang/lib/Basic/Targets/PPC.h | 40 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.cpp | 23 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.h | 10 +- .../llvm-project/clang/lib/Basic/Targets/SPIR.cpp | 75 + .../llvm-project/clang/lib/Basic/Targets/SPIR.h | 66 +- .../llvm-project/clang/lib/Basic/Targets/Sparc.h | 4 + .../clang/lib/Basic/Targets/SystemZ.cpp | 10 + .../llvm-project/clang/lib/Basic/Targets/SystemZ.h | 16 +- contrib/llvm-project/clang/lib/Basic/Targets/VE.h | 1 + .../clang/lib/Basic/Targets/WebAssembly.cpp | 197 +- .../clang/lib/Basic/Targets/WebAssembly.h | 21 +- .../llvm-project/clang/lib/Basic/Targets/X86.cpp | 122 +- contrib/llvm-project/clang/lib/Basic/Targets/X86.h | 40 +- .../llvm-project/clang/lib/Basic/TypeTraits.cpp | 10 + .../clang/lib/CIR/Dialect/IR/CIRDialect.cpp | 13 + contrib/llvm-project/clang/lib/CodeGen/ABIInfo.cpp | 62 +- contrib/llvm-project/clang/lib/CodeGen/ABIInfo.h | 24 +- .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp | 76 +- .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.h | 23 +- contrib/llvm-project/clang/lib/CodeGen/Address.h | 229 +- .../clang/lib/CodeGen/BackendConsumer.h | 17 +- .../llvm-project/clang/lib/CodeGen/BackendUtil.cpp | 113 +- .../llvm-project/clang/lib/CodeGen/CGAtomic.cpp | 499 +- .../llvm-project/clang/lib/CodeGen/CGBlocks.cpp | 78 +- contrib/llvm-project/clang/lib/CodeGen/CGBlocks.h | 3 +- contrib/llvm-project/clang/lib/CodeGen/CGBuilder.h | 247 +- .../llvm-project/clang/lib/CodeGen/CGBuiltin.cpp | 1575 +- .../llvm-project/clang/lib/CodeGen/CGCUDANV.cpp | 110 +- .../llvm-project/clang/lib/CodeGen/CGCUDARuntime.h | 5 + contrib/llvm-project/clang/lib/CodeGen/CGCXX.cpp | 11 +- .../llvm-project/clang/lib/CodeGen/CGCXXABI.cpp | 21 +- contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.h | 31 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 671 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.h | 28 +- contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp | 135 +- .../llvm-project/clang/lib/CodeGen/CGCleanup.cpp | 186 +- contrib/llvm-project/clang/lib/CodeGen/CGCleanup.h | 72 +- .../llvm-project/clang/lib/CodeGen/CGCoroutine.cpp | 166 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp | 371 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.h | 39 +- contrib/llvm-project/clang/lib/CodeGen/CGDecl.cpp | 182 +- .../llvm-project/clang/lib/CodeGen/CGDeclCXX.cpp | 25 +- .../llvm-project/clang/lib/CodeGen/CGException.cpp | 23 +- contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp | 691 +- .../llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 332 +- .../llvm-project/clang/lib/CodeGen/CGExprCXX.cpp | 228 +- .../clang/lib/CodeGen/CGExprComplex.cpp | 161 +- .../clang/lib/CodeGen/CGExprConstant.cpp | 492 +- .../clang/lib/CodeGen/CGExprScalar.cpp | 591 +- .../clang/lib/CodeGen/CGGPUBuiltin.cpp | 7 +- .../clang/lib/CodeGen/CGHLSLRuntime.cpp | 23 +- .../llvm-project/clang/lib/CodeGen/CGHLSLRuntime.h | 35 + .../llvm-project/clang/lib/CodeGen/CGLoopInfo.cpp | 15 +- .../llvm-project/clang/lib/CodeGen/CGLoopInfo.h | 7 +- .../clang/lib/CodeGen/CGNonTrivialStruct.cpp | 26 +- contrib/llvm-project/clang/lib/CodeGen/CGObjC.cpp | 92 +- .../llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp | 55 +- .../llvm-project/clang/lib/CodeGen/CGObjCMac.cpp | 142 +- .../clang/lib/CodeGen/CGObjCRuntime.cpp | 6 +- .../clang/lib/CodeGen/CGOpenMPRuntime.cpp | 495 +- .../clang/lib/CodeGen/CGOpenMPRuntime.h | 25 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 1574 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.h | 3 - .../clang/lib/CodeGen/CGPointerAuth.cpp | 621 + .../clang/lib/CodeGen/CGPointerAuthInfo.h | 99 + .../clang/lib/CodeGen/CGRecordLayout.h | 5 + .../clang/lib/CodeGen/CGRecordLayoutBuilder.cpp | 513 +- contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp | 332 +- .../clang/lib/CodeGen/CGStmtOpenMP.cpp | 498 +- contrib/llvm-project/clang/lib/CodeGen/CGVTT.cpp | 35 +- .../llvm-project/clang/lib/CodeGen/CGVTables.cpp | 63 +- contrib/llvm-project/clang/lib/CodeGen/CGVTables.h | 6 +- contrib/llvm-project/clang/lib/CodeGen/CGValue.h | 272 +- .../clang/lib/CodeGen/CodeGenAction.cpp | 168 +- .../clang/lib/CodeGen/CodeGenFunction.cpp | 264 +- .../clang/lib/CodeGen/CodeGenFunction.h | 569 +- .../clang/lib/CodeGen/CodeGenModule.cpp | 750 +- .../llvm-project/clang/lib/CodeGen/CodeGenModule.h | 105 +- .../llvm-project/clang/lib/CodeGen/CodeGenPGO.cpp | 266 +- .../llvm-project/clang/lib/CodeGen/CodeGenPGO.h | 20 +- .../llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp | 142 +- .../llvm-project/clang/lib/CodeGen/CodeGenTBAA.h | 16 +- .../clang/lib/CodeGen/CodeGenTypeCache.h | 2 +- .../clang/lib/CodeGen/CodeGenTypes.cpp | 78 +- .../llvm-project/clang/lib/CodeGen/CodeGenTypes.h | 25 +- .../clang/lib/CodeGen/ConstantEmitter.h | 12 +- .../clang/lib/CodeGen/ConstantInitBuilder.cpp | 18 + .../clang/lib/CodeGen/CoverageMappingGen.cpp | 626 +- .../clang/lib/CodeGen/CoverageMappingGen.h | 19 +- .../clang/lib/CodeGen/ItaniumCXXABI.cpp | 525 +- .../clang/lib/CodeGen/LinkInModulesPass.cpp | 16 +- .../clang/lib/CodeGen/LinkInModulesPass.h | 3 +- contrib/llvm-project/clang/lib/CodeGen/MCDCState.h | 49 + .../clang/lib/CodeGen/MacroPPCallbacks.cpp | 4 +- .../clang/lib/CodeGen/MacroPPCallbacks.h | 3 +- .../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 106 +- .../clang/lib/CodeGen/ModuleBuilder.cpp | 18 +- .../clang/lib/CodeGen/SwiftCallingConv.cpp | 2 +- .../llvm-project/clang/lib/CodeGen/TargetInfo.cpp | 22 + .../llvm-project/clang/lib/CodeGen/TargetInfo.h | 26 +- .../clang/lib/CodeGen/Targets/AArch64.cpp | 295 +- .../clang/lib/CodeGen/Targets/AMDGPU.cpp | 56 +- .../llvm-project/clang/lib/CodeGen/Targets/ARC.cpp | 10 +- .../llvm-project/clang/lib/CodeGen/Targets/ARM.cpp | 40 +- .../clang/lib/CodeGen/Targets/CSKY.cpp | 16 +- .../clang/lib/CodeGen/Targets/Hexagon.cpp | 15 +- .../clang/lib/CodeGen/Targets/LoongArch.cpp | 15 +- .../clang/lib/CodeGen/Targets/MSP430.cpp | 9 +- .../clang/lib/CodeGen/Targets/Mips.cpp | 29 +- .../clang/lib/CodeGen/Targets/NVPTX.cpp | 40 +- .../clang/lib/CodeGen/Targets/PNaCl.cpp | 13 +- .../llvm-project/clang/lib/CodeGen/Targets/PPC.cpp | 115 +- .../clang/lib/CodeGen/Targets/RISCV.cpp | 42 +- .../clang/lib/CodeGen/Targets/Sparc.cpp | 21 +- .../clang/lib/CodeGen/Targets/SystemZ.cpp | 26 +- .../clang/lib/CodeGen/Targets/WebAssembly.cpp | 10 +- .../llvm-project/clang/lib/CodeGen/Targets/X86.cpp | 97 +- .../clang/lib/CodeGen/Targets/XCore.cpp | 12 +- .../linux/DirectoryWatcher-linux.cpp | 9 +- contrib/llvm-project/clang/lib/Driver/Distro.cpp | 1 + contrib/llvm-project/clang/lib/Driver/Driver.cpp | 406 +- .../clang/lib/Driver/OffloadBundler.cpp | 237 +- .../clang/lib/Driver/SanitizerArgs.cpp | 36 +- .../llvm-project/clang/lib/Driver/ToolChain.cpp | 129 +- .../clang/lib/Driver/ToolChains/AIX.cpp | 124 +- .../llvm-project/clang/lib/Driver/ToolChains/AIX.h | 2 + .../clang/lib/Driver/ToolChains/AMDGPU.cpp | 46 +- .../clang/lib/Driver/ToolChains/AMDGPU.h | 6 + .../clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp | 10 +- .../clang/lib/Driver/ToolChains/Arch/AArch64.cpp | 50 +- .../clang/lib/Driver/ToolChains/Arch/AArch64.h | 3 + .../clang/lib/Driver/ToolChains/Arch/ARM.cpp | 53 +- .../clang/lib/Driver/ToolChains/Arch/LoongArch.cpp | 68 +- .../clang/lib/Driver/ToolChains/Arch/Mips.cpp | 19 + .../clang/lib/Driver/ToolChains/Arch/Mips.h | 2 +- .../clang/lib/Driver/ToolChains/Arch/PPC.cpp | 20 + .../clang/lib/Driver/ToolChains/Arch/RISCV.cpp | 77 +- .../clang/lib/Driver/ToolChains/Arch/RISCV.h | 4 +- .../clang/lib/Driver/ToolChains/Arch/Sparc.h | 2 +- .../clang/lib/Driver/ToolChains/Arch/SystemZ.cpp | 8 + .../clang/lib/Driver/ToolChains/Arch/X86.cpp | 26 +- .../clang/lib/Driver/ToolChains/BareMetal.cpp | 90 +- .../clang/lib/Driver/ToolChains/Clang.cpp | 941 +- .../clang/lib/Driver/ToolChains/Clang.h | 15 + .../clang/lib/Driver/ToolChains/CommonArgs.cpp | 500 +- .../clang/lib/Driver/ToolChains/CommonArgs.h | 19 +- .../clang/lib/Driver/ToolChains/Cuda.cpp | 228 +- .../clang/lib/Driver/ToolChains/Cuda.h | 17 +- .../clang/lib/Driver/ToolChains/Darwin.cpp | 188 +- .../clang/lib/Driver/ToolChains/Darwin.h | 19 +- .../clang/lib/Driver/ToolChains/DragonFly.cpp | 9 +- .../clang/lib/Driver/ToolChains/Flang.cpp | 121 +- .../clang/lib/Driver/ToolChains/Flang.h | 7 + .../clang/lib/Driver/ToolChains/FreeBSD.cpp | 17 +- .../clang/lib/Driver/ToolChains/Fuchsia.cpp | 23 +- .../clang/lib/Driver/ToolChains/Gnu.cpp | 90 +- .../clang/lib/Driver/ToolChains/HIPAMD.cpp | 51 +- .../clang/lib/Driver/ToolChains/HIPAMD.h | 4 + .../clang/lib/Driver/ToolChains/HIPSPV.cpp | 2 +- .../clang/lib/Driver/ToolChains/HIPUtility.cpp | 265 +- .../clang/lib/Driver/ToolChains/HLSL.cpp | 66 +- .../clang/lib/Driver/ToolChains/HLSL.h | 3 + .../clang/lib/Driver/ToolChains/Haiku.cpp | 11 +- .../clang/lib/Driver/ToolChains/Hexagon.cpp | 39 +- .../clang/lib/Driver/ToolChains/Linux.cpp | 57 +- .../clang/lib/Driver/ToolChains/Linux.h | 4 - .../clang/lib/Driver/ToolChains/MSVC.cpp | 25 +- .../clang/lib/Driver/ToolChains/MSVC.h | 5 +- .../clang/lib/Driver/ToolChains/MinGW.cpp | 38 +- .../clang/lib/Driver/ToolChains/MipsLinux.cpp | 7 +- .../clang/lib/Driver/ToolChains/NetBSD.cpp | 9 +- .../clang/lib/Driver/ToolChains/OHOS.cpp | 2 +- .../clang/lib/Driver/ToolChains/OpenBSD.cpp | 12 +- .../clang/lib/Driver/ToolChains/PS4CPU.cpp | 182 +- .../clang/lib/Driver/ToolChains/PS4CPU.h | 27 +- .../clang/lib/Driver/ToolChains/RISCVToolchain.cpp | 8 + .../clang/lib/Driver/ToolChains/RISCVToolchain.h | 2 + .../clang/lib/Driver/ToolChains/SPIRV.cpp | 12 +- .../clang/lib/Driver/ToolChains/Solaris.cpp | 6 +- .../clang/lib/Driver/ToolChains/WebAssembly.cpp | 108 +- .../clang/lib/Driver/ToolChains/ZOS.cpp | 9 +- .../clang/lib/Edit/RewriteObjCFoundationAPI.cpp | 11 +- contrib/llvm-project/clang/lib/ExtractAPI/API.cpp | 551 +- .../clang/lib/ExtractAPI/DeclarationFragments.cpp | 398 +- .../clang/lib/ExtractAPI/ExtractAPIConsumer.cpp | 119 +- .../Serialization/SymbolGraphSerializer.cpp | 988 +- .../ExtractAPI/TypedefUnderlyingTypeResolver.cpp | 6 +- .../clang/lib/Format/BreakableToken.cpp | 4 +- .../llvm-project/clang/lib/Format/BreakableToken.h | 3 - .../clang/lib/Format/ContinuationIndenter.cpp | 79 +- .../clang/lib/Format/ContinuationIndenter.h | 7 +- contrib/llvm-project/clang/lib/Format/Encoding.h | 1 - contrib/llvm-project/clang/lib/Format/Format.cpp | 317 +- .../llvm-project/clang/lib/Format/FormatInternal.h | 4 +- .../llvm-project/clang/lib/Format/FormatToken.cpp | 54 +- .../llvm-project/clang/lib/Format/FormatToken.h | 89 +- .../clang/lib/Format/FormatTokenLexer.cpp | 52 +- .../clang/lib/Format/FormatTokenLexer.h | 5 - .../clang/lib/Format/FormatTokenSource.h | 14 +- .../clang/lib/Format/MacroCallReconstructor.cpp | 68 +- .../clang/lib/Format/MacroExpander.cpp | 12 +- contrib/llvm-project/clang/lib/Format/Macros.h | 40 +- .../clang/lib/Format/QualifierAlignmentFixer.cpp | 29 +- .../clang/lib/Format/QualifierAlignmentFixer.h | 18 +- .../clang/lib/Format/SortJavaScriptImports.cpp | 18 +- .../clang/lib/Format/SortJavaScriptImports.h | 3 - .../clang/lib/Format/TokenAnalyzer.cpp | 4 +- .../llvm-project/clang/lib/Format/TokenAnalyzer.h | 12 +- .../clang/lib/Format/TokenAnnotator.cpp | 934 +- .../llvm-project/clang/lib/Format/TokenAnnotator.h | 13 +- .../clang/lib/Format/UnwrappedLineFormatter.cpp | 65 +- .../clang/lib/Format/UnwrappedLineFormatter.h | 2 - .../clang/lib/Format/UnwrappedLineParser.cpp | 365 +- .../clang/lib/Format/UnwrappedLineParser.h | 18 +- .../clang/lib/Format/WhitespaceManager.cpp | 136 +- .../clang/lib/Format/WhitespaceManager.h | 21 +- .../llvm-project/clang/lib/Frontend/ASTUnit.cpp | 31 +- .../clang/lib/Frontend/CompilerInstance.cpp | 148 +- .../clang/lib/Frontend/CompilerInvocation.cpp | 280 +- .../clang/lib/Frontend/DependencyFile.cpp | 28 +- .../clang/lib/Frontend/DependencyGraph.cpp | 31 +- .../clang/lib/Frontend/FrontendAction.cpp | 27 +- .../clang/lib/Frontend/FrontendActions.cpp | 62 +- .../clang/lib/Frontend/FrontendOptions.cpp | 1 + .../clang/lib/Frontend/InitPreprocessor.cpp | 268 +- .../Frontend/InterfaceStubFunctionsConsumer.cpp | 5 +- .../lib/Frontend/ModuleDependencyCollector.cpp | 5 +- .../clang/lib/Frontend/MultiplexConsumer.cpp | 37 +- .../clang/lib/Frontend/PrecompiledPreamble.cpp | 7 +- .../clang/lib/Frontend/PrintPreprocessedOutput.cpp | 133 +- .../lib/Frontend/Rewrite/InclusionRewriter.cpp | 10 +- .../lib/Frontend/Rewrite/RewriteModernObjC.cpp | 46 +- .../lib/Frontend/SerializedDiagnosticPrinter.cpp | 2 +- .../clang/lib/Frontend/TextDiagnostic.cpp | 213 +- .../clang/lib/Frontend/TextDiagnosticPrinter.cpp | 2 +- .../lib/Frontend/VerifyDiagnosticConsumer.cpp | 16 +- .../lib/FrontendTool/ExecuteCompilerInvocation.cpp | 14 +- .../clang/lib/Headers/__clang_cuda_intrinsics.h | 4 +- .../clang/lib/Headers/__stdarg_header_macro.h | 12 + .../clang/lib/Headers/__stddef_header_macro.h | 12 + contrib/llvm-project/clang/lib/Headers/arm_acle.h | 36 +- .../clang/lib/Headers/avx512erintrin.h | 271 - .../clang/lib/Headers/avx512fp16intrin.h | 76 +- .../clang/lib/Headers/avx512pfintrin.h | 92 - contrib/llvm-project/clang/lib/Headers/avxintrin.h | 102 +- contrib/llvm-project/clang/lib/Headers/bmiintrin.h | 6 +- contrib/llvm-project/clang/lib/Headers/builtins.h | 3 + contrib/llvm-project/clang/lib/Headers/cpuid.h | 26 +- .../clang/lib/Headers/cuda_wrappers/algorithm | 2 +- contrib/llvm-project/clang/lib/Headers/emmintrin.h | 469 +- contrib/llvm-project/clang/lib/Headers/float.h | 28 + contrib/llvm-project/clang/lib/Headers/fmaintrin.h | 48 +- .../clang/lib/Headers/hlsl/hlsl_basic_types.h | 13 +- .../clang/lib/Headers/hlsl/hlsl_intrinsics.h | 1341 +- .../llvm-project/clang/lib/Headers/ia32intrin.h | 72 +- contrib/llvm-project/clang/lib/Headers/immintrin.h | 244 +- contrib/llvm-project/clang/lib/Headers/intrin.h | 272 +- contrib/llvm-project/clang/lib/Headers/intrin0.h | 247 + contrib/llvm-project/clang/lib/Headers/inttypes.h | 4 + contrib/llvm-project/clang/lib/Headers/iso646.h | 4 + .../clang/lib/Headers/keylockerintrin.h | 13 +- contrib/llvm-project/clang/lib/Headers/limits.h | 5 + .../clang/lib/Headers/llvm_libc_wrappers/assert.h | 2 +- contrib/llvm-project/clang/lib/Headers/mm3dnow.h | 147 +- contrib/llvm-project/clang/lib/Headers/mmintrin.h | 160 +- .../clang/lib/Headers/module.modulemap | 15 +- .../llvm-project/clang/lib/Headers/opencl-c-base.h | 4 + contrib/llvm-project/clang/lib/Headers/opencl-c.h | 15 + .../llvm-project/clang/lib/Headers/prfchwintrin.h | 18 +- contrib/llvm-project/clang/lib/Headers/ptrauth.h | 305 + .../llvm-project/clang/lib/Headers/sifive_vector.h | 102 + contrib/llvm-project/clang/lib/Headers/smmintrin.h | 24 +- contrib/llvm-project/clang/lib/Headers/stdalign.h | 5 + contrib/llvm-project/clang/lib/Headers/stdarg.h | 34 +- contrib/llvm-project/clang/lib/Headers/stdatomic.h | 8 +- contrib/llvm-project/clang/lib/Headers/stdbool.h | 5 + contrib/llvm-project/clang/lib/Headers/stddef.h | 43 +- contrib/llvm-project/clang/lib/Headers/stdint.h | 5 + .../llvm-project/clang/lib/Headers/stdnoreturn.h | 6 + contrib/llvm-project/clang/lib/Headers/tmmintrin.h | 36 +- contrib/llvm-project/clang/lib/Headers/varargs.h | 6 +- .../llvm-project/clang/lib/Headers/x86gprintrin.h | 21 +- contrib/llvm-project/clang/lib/Headers/x86intrin.h | 32 +- contrib/llvm-project/clang/lib/Headers/xmmintrin.h | 382 +- .../llvm-project/clang/lib/Headers/yvals_core.h | 25 + .../clang/lib/Headers/zos_wrappers/builtins.h | 18 + .../llvm-project/clang/lib/Index/CommentToXML.cpp | 40 +- contrib/llvm-project/clang/lib/Index/IndexBody.cpp | 2 +- contrib/llvm-project/clang/lib/Index/IndexDecl.cpp | 15 +- .../llvm-project/clang/lib/Index/IndexSymbol.cpp | 3 +- .../clang/lib/Index/IndexingAction.cpp | 2 +- .../llvm-project/clang/lib/Index/USRGeneration.cpp | 32 +- .../lib/InstallAPI/DiagnosticBuilderWrappers.cpp | 110 + .../lib/InstallAPI/DiagnosticBuilderWrappers.h | 49 + .../clang/lib/InstallAPI/DirectoryScanner.cpp | 300 + .../clang/lib/InstallAPI/DylibVerifier.cpp | 1005 + .../llvm-project/clang/lib/InstallAPI/FileList.cpp | 192 + .../llvm-project/clang/lib/InstallAPI/Frontend.cpp | 220 + .../clang/lib/InstallAPI/HeaderFile.cpp | 88 + .../llvm-project/clang/lib/InstallAPI/Library.cpp | 40 + .../llvm-project/clang/lib/InstallAPI/Visitor.cpp | 728 + .../clang/lib/Interpreter/CodeCompletion.cpp | 3 +- .../clang/lib/Interpreter/DeviceOffload.cpp | 1 + .../clang/lib/Interpreter/IncrementalExecutor.cpp | 35 +- .../clang/lib/Interpreter/IncrementalExecutor.h | 20 +- .../clang/lib/Interpreter/IncrementalParser.cpp | 34 +- .../clang/lib/Interpreter/Interpreter.cpp | 522 +- .../clang/lib/Interpreter/InterpreterUtils.cpp | 2 +- .../llvm-project/clang/lib/Interpreter/Value.cpp | 10 +- .../llvm-project/clang/lib/Interpreter/Wasm.cpp | 114 + contrib/llvm-project/clang/lib/Interpreter/Wasm.h | 37 + .../clang/lib/Lex/DependencyDirectivesScanner.cpp | 31 +- .../llvm-project/clang/lib/Lex/HeaderSearch.cpp | 347 +- contrib/llvm-project/clang/lib/Lex/Lexer.cpp | 68 +- .../llvm-project/clang/lib/Lex/LiteralSupport.cpp | 68 +- contrib/llvm-project/clang/lib/Lex/MacroInfo.cpp | 2 +- contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp | 66 +- .../llvm-project/clang/lib/Lex/PPDirectives.cpp | 552 +- .../llvm-project/clang/lib/Lex/PPExpressions.cpp | 57 +- .../llvm-project/clang/lib/Lex/PPLexerChange.cpp | 9 +- .../clang/lib/Lex/PPMacroExpansion.cpp | 140 +- contrib/llvm-project/clang/lib/Lex/Pragma.cpp | 3 +- .../clang/lib/Lex/PreprocessingRecord.cpp | 11 +- .../llvm-project/clang/lib/Lex/Preprocessor.cpp | 138 +- .../clang/lib/Lex/TokenConcatenation.cpp | 5 +- contrib/llvm-project/clang/lib/Parse/ParseAST.cpp | 10 +- .../clang/lib/Parse/ParseCXXInlineMethods.cpp | 86 +- contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp | 760 +- .../llvm-project/clang/lib/Parse/ParseDeclCXX.cpp | 490 +- contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp | 339 +- .../llvm-project/clang/lib/Parse/ParseExprCXX.cpp | 193 +- contrib/llvm-project/clang/lib/Parse/ParseHLSL.cpp | 125 +- contrib/llvm-project/clang/lib/Parse/ParseInit.cpp | 49 +- contrib/llvm-project/clang/lib/Parse/ParseObjc.cpp | 438 +- .../llvm-project/clang/lib/Parse/ParseOpenACC.cpp | 742 +- .../llvm-project/clang/lib/Parse/ParseOpenMP.cpp | 932 +- .../llvm-project/clang/lib/Parse/ParsePragma.cpp | 56 +- contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp | 72 +- .../llvm-project/clang/lib/Parse/ParseTemplate.cpp | 244 +- .../clang/lib/Parse/ParseTentative.cpp | 35 +- contrib/llvm-project/clang/lib/Parse/Parser.cpp | 123 +- .../llvm-project/clang/lib/Rewrite/HTMLRewrite.cpp | 135 +- .../clang/lib/Sema/AnalysisBasedWarnings.cpp | 60 +- .../clang/lib/Sema/CheckExprLifetime.cpp | 1321 + .../clang/lib/Sema/CheckExprLifetime.h | 39 + .../clang/lib/Sema/CodeCompleteConsumer.cpp | 3 +- contrib/llvm-project/clang/lib/Sema/DeclSpec.cpp | 60 +- .../clang/lib/Sema/HLSLExternalSemaSource.cpp | 84 +- .../clang/lib/Sema/JumpDiagnostics.cpp | 28 +- .../clang/lib/Sema/MultiplexExternalSemaSource.cpp | 2 +- .../llvm-project/clang/lib/Sema/OpenCLBuiltins.td | 26 +- contrib/llvm-project/clang/lib/Sema/ParsedAttr.cpp | 8 +- contrib/llvm-project/clang/lib/Sema/Scope.cpp | 9 + contrib/llvm-project/clang/lib/Sema/ScopeInfo.cpp | 1 + contrib/llvm-project/clang/lib/Sema/Sema.cpp | 503 +- contrib/llvm-project/clang/lib/Sema/SemaAMDGPU.cpp | 311 + .../llvm-project/clang/lib/Sema/SemaAPINotes.cpp | 1036 + contrib/llvm-project/clang/lib/Sema/SemaARM.cpp | 1340 + contrib/llvm-project/clang/lib/Sema/SemaAVR.cpp | 49 + contrib/llvm-project/clang/lib/Sema/SemaAccess.cpp | 83 +- contrib/llvm-project/clang/lib/Sema/SemaAttr.cpp | 44 +- .../clang/lib/Sema/SemaAvailability.cpp | 202 +- contrib/llvm-project/clang/lib/Sema/SemaBPF.cpp | 194 + contrib/llvm-project/clang/lib/Sema/SemaBase.cpp | 90 + .../clang/lib/Sema/SemaBoundsSafety.cpp | 193 + contrib/llvm-project/clang/lib/Sema/SemaCUDA.cpp | 439 +- .../clang/lib/Sema/SemaCXXScopeSpec.cpp | 115 +- contrib/llvm-project/clang/lib/Sema/SemaCast.cpp | 120 +- .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 24572 +++++++----------- .../clang/lib/Sema/SemaCodeComplete.cpp | 1479 +- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 734 +- .../llvm-project/clang/lib/Sema/SemaCoroutine.cpp | 103 +- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 2648 +- .../llvm-project/clang/lib/Sema/SemaDeclAttr.cpp | 4156 +-- .../llvm-project/clang/lib/Sema/SemaDeclCXX.cpp | 1920 +- .../llvm-project/clang/lib/Sema/SemaDeclObjC.cpp | 1463 +- .../clang/lib/Sema/SemaExceptionSpec.cpp | 69 +- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 2586 +- .../llvm-project/clang/lib/Sema/SemaExprCXX.cpp | 924 +- .../llvm-project/clang/lib/Sema/SemaExprMember.cpp | 383 +- .../llvm-project/clang/lib/Sema/SemaExprObjC.cpp | 1398 +- contrib/llvm-project/clang/lib/Sema/SemaHLSL.cpp | 1103 +- .../llvm-project/clang/lib/Sema/SemaHexagon.cpp | 290 + contrib/llvm-project/clang/lib/Sema/SemaInit.cpp | 1813 +- contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp | 159 +- contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp | 503 +- .../llvm-project/clang/lib/Sema/SemaLoongArch.cpp | 515 + contrib/llvm-project/clang/lib/Sema/SemaM68k.cpp | 56 + contrib/llvm-project/clang/lib/Sema/SemaMIPS.cpp | 300 + contrib/llvm-project/clang/lib/Sema/SemaMSP430.cpp | 78 + contrib/llvm-project/clang/lib/Sema/SemaModule.cpp | 169 +- contrib/llvm-project/clang/lib/Sema/SemaNVPTX.cpp | 35 + contrib/llvm-project/clang/lib/Sema/SemaObjC.cpp | 2408 ++ .../clang/lib/Sema/SemaObjCProperty.cpp | 297 +- .../llvm-project/clang/lib/Sema/SemaOpenACC.cpp | 1710 ++ contrib/llvm-project/clang/lib/Sema/SemaOpenCL.cpp | 578 + contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp | 8531 +++---- .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 1807 +- contrib/llvm-project/clang/lib/Sema/SemaPPC.cpp | 439 + .../clang/lib/Sema/SemaPseudoObject.cpp | 309 +- contrib/llvm-project/clang/lib/Sema/SemaRISCV.cpp | 1491 ++ .../clang/lib/Sema/SemaRISCVVectorLookup.cpp | 497 - contrib/llvm-project/clang/lib/Sema/SemaSYCL.cpp | 95 +- contrib/llvm-project/clang/lib/Sema/SemaStmt.cpp | 509 +- .../llvm-project/clang/lib/Sema/SemaStmtAsm.cpp | 2 +- .../llvm-project/clang/lib/Sema/SemaStmtAttr.cpp | 121 +- contrib/llvm-project/clang/lib/Sema/SemaSwift.cpp | 765 + .../llvm-project/clang/lib/Sema/SemaSystemZ.cpp | 94 + .../llvm-project/clang/lib/Sema/SemaTemplate.cpp | 1848 +- .../clang/lib/Sema/SemaTemplateDeduction.cpp | 1727 +- .../clang/lib/Sema/SemaTemplateDeductionGuide.cpp | 1435 ++ .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 542 +- .../clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 559 +- .../clang/lib/Sema/SemaTemplateVariadic.cpp | 106 +- contrib/llvm-project/clang/lib/Sema/SemaType.cpp | 1069 +- contrib/llvm-project/clang/lib/Sema/SemaWasm.cpp | 341 + contrib/llvm-project/clang/lib/Sema/SemaX86.cpp | 972 + .../llvm-project/clang/lib/Sema/TreeTransform.h | 2073 +- .../clang/lib/Serialization/ASTCommon.cpp | 18 +- .../clang/lib/Serialization/ASTCommon.h | 24 - .../clang/lib/Serialization/ASTReader.cpp | 1215 +- .../clang/lib/Serialization/ASTReaderDecl.cpp | 346 +- .../clang/lib/Serialization/ASTReaderInternals.h | 10 +- .../clang/lib/Serialization/ASTReaderStmt.cpp | 180 +- .../clang/lib/Serialization/ASTWriter.cpp | 1914 +- .../clang/lib/Serialization/ASTWriterDecl.cpp | 179 +- .../clang/lib/Serialization/ASTWriterStmt.cpp | 117 +- .../clang/lib/Serialization/GeneratePCH.cpp | 87 +- .../clang/lib/Serialization/GlobalModuleIndex.cpp | 14 +- .../clang/lib/Serialization/ModuleFile.cpp | 6 +- .../lib/Serialization/ModuleFileExtension.cpp | 2 +- .../clang/lib/Serialization/MultiOnDiskHashTable.h | 4 +- .../lib/Serialization/PCHContainerOperations.cpp | 2 - .../Checkers/ArrayBoundCheckerV2.cpp | 488 +- .../Checkers/BasicObjCFoundationChecks.cpp | 12 +- .../Checkers/BlockInCriticalSectionChecker.cpp | 383 +- .../Checkers/BoolAssignmentChecker.cpp | 55 +- .../Checkers/BuiltinFunctionChecker.cpp | 66 +- .../lib/StaticAnalyzer/Checkers/CStringChecker.cpp | 321 +- .../StaticAnalyzer/Checkers/CXXDeleteChecker.cpp | 4 +- *** 1060364 LINES SKIPPED *** From nobody Sun Dec 1 11:18:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYM0kXwz5fT4b; Sun, 01 Dec 2024 11:18:31 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYL6ym5z42Xm; Sun, 1 Dec 2024 11:18:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vkt9DmToX0EoS/nurQBYmOI+1r2u5qXYJD0yQjTOvNQ=; b=b4opAGgTCC6N93SsM2TgbrkX6doLmH4OmO5csgMB251/rT0n9AO3kT+jUWl9E2ZtPNp7GT jGeaVCzU3LuKkNtLELMPaZER1gQOx37UQki1WlC1bkoeDUyv8BYt84pIqiwFaUF5jGCMoh QmTDIw24ATnpwIgx+1TNiUpVBXun97LmHNeN24BGpaGAFYBRb/JUbuOWdMKMqGvEXOv6ud cRgXHugnvC2Aa8zrIeTThDilsOAA+4TTdkzpY3VNCSzYzFcTzF3JvS6O3FTv8YLWOG0FQR Px/t3gPU4I5fgNHvoSSrG+ifaiji0QdBvZwe1dLatLpPlATiAY8tFbkqRFzgzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vkt9DmToX0EoS/nurQBYmOI+1r2u5qXYJD0yQjTOvNQ=; b=cA0sZSWCnqum8eYTtBvag2kyuzFJ/p99jtuD7SGm4nd8WzFI3nh8f5givUK9AOVRIuks9i 7D6q1j0MSZ/igpli9Kg0fdzEfvMwlRlX1+d6ToqsybITgZM5PVmBdtoxAp4zaSDW3B70dC iX+vju9vuumytGi7scHzdfxM0Rujqaypv1jt5DTnbRHCEJUVikbK4WAiwoaDROFLqRG7DI 53wbJYb0HYudauEp3q6V6AuR8GsQvWTZjKMmdeCQ61+ZUOSjqKeM4gh8YF1nA1fhg3DSwl hHnVrUuRl4KGdaNUFbPWne4byzbZEpsL2eoqiY5xPoEmSjTOj1qC78LaVWFGnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051911; a=rsa-sha256; cv=none; b=GQTcjCMgceWXOx1Wa/J6KN385bah0mGAodTobuRoyGnOWTPo+fk/Cj2RivUVd7CbgplQJd oq/BmeZKtejazqUBpgLG3isRjNZEm0swuHFsazto4rvSJ6PG+lltWg4FtMuvxqJywGARGy ZPC9jO22qjg4IILkozjXRqIdHL5HajhzngFTPwot3iTrLNqvhtRk1VsepRmNSMbuElMkzm ILJXybOnr/bqTJsypW0HFXzMA6mQJtDJgKOShYygbcJp/JfNAMF4hKbDrBjIueg3MtTIbe SCr+Ycbf9tYBSbgWADnJ+tJlUWDDVczAlPkd74WJdaX5zhYiO4qNr6v/X8ZJAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYL6Sl1zqjj; Sun, 1 Dec 2024 11:18:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIURM007648; Sun, 1 Dec 2024 11:18:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIU1c007643; Sun, 1 Dec 2024 11:18:30 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:30 GMT Message-Id: <202412011118.4B1BIU1c007643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: d544fe589b6a - stable/14 - Merge llvm-project release/19.x llvmorg-19.1.0-rc1-0-ga4902a36d5c2 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d544fe589b6a0bbec230e392f9dc11a8209a7496 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d544fe589b6a0bbec230e392f9dc11a8209a7496 commit d544fe589b6a0bbec230e392f9dc11a8209a7496 Author: Dimitry Andric AuthorDate: 2024-07-30 14:27:43 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:07 +0000 Merge llvm-project release/19.x llvmorg-19.1.0-rc1-0-ga4902a36d5c2 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-rc1-0-ga4902a36d5c2. PR: 280562 MFC after: 1 month (cherry picked from commit 36b606ae6aa4b24061096ba18582e0a08ccd5dba) --- ObsoleteFiles.inc | 1 - .../include/clang/Basic/DiagnosticSemaKinds.td | 3 + .../clang/include/clang/Basic/TokenKinds.def | 2 + .../clang/include/clang/Driver/Options.td | 10 +- .../clang/include/clang/Parse/Parser.h | 2 + .../clang/include/clang/Sema/Overload.h | 4 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 2 + .../llvm-project/clang/lib/AST/ExprConstant.cpp | 32 +- contrib/llvm-project/clang/lib/AST/Interp/Interp.h | 22 +- .../llvm-project/clang/lib/AST/ItaniumMangle.cpp | 8 + .../llvm-project/clang/lib/Basic/Targets/PPC.cpp | 39 +- contrib/llvm-project/clang/lib/Basic/Targets/PPC.h | 19 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 3 +- .../clang/lib/Driver/ToolChains/Arch/PPC.cpp | 3 + .../clang/lib/Driver/ToolChains/Clang.cpp | 4 + contrib/llvm-project/clang/lib/Headers/ptrauth.h | 19 + contrib/llvm-project/clang/lib/Headers/stdarg.h | 4 +- contrib/llvm-project/clang/lib/Headers/stdatomic.h | 4 + contrib/llvm-project/clang/lib/Headers/stddef.h | 21 +- contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp | 27 +- .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 10 +- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 23 +- .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 20 +- .../compiler-rt/lib/builtins/README.txt | 5 + .../compiler-rt/lib/builtins/aarch64/sme-abi-vg.c | 28 - .../compiler-rt/lib/builtins/aarch64/sme-abi.S | 44 + .../compiler-rt/lib/builtins/trampoline_setup.c | 42 + .../lib/sanitizer_common/sanitizer_ptrauth.h | 46 +- .../lib/ubsan/ubsan_type_hash_itanium.cpp | 2 +- .../llvm-project/libcxx/include/__bit_reference | 14 + contrib/llvm-project/libcxx/include/__config | 2 +- .../libcxx/include/__iterator/bounded_iter.h | 24 + .../libcxx/include/__iterator/wrap_iter.h | 23 + contrib/llvm-project/libcxx/include/__math/hypot.h | 89 + contrib/llvm-project/libcxx/include/cmath | 25 +- contrib/llvm-project/libcxx/include/deque | 29 +- contrib/llvm-project/libcxx/include/locale | 4 + contrib/llvm-project/libcxx/include/string | 17 +- .../llvm/include/llvm/Analysis/AliasAnalysis.h | 17 +- .../llvm/include/llvm/Analysis/SimplifyQuery.h | 6 + .../llvm/include/llvm/CodeGen/MachineFrameInfo.h | 14 +- .../include/llvm/CodeGen/TargetFrameLowering.h | 4 +- .../llvm/include/llvm/MC/MCAsmBackend.h | 2 +- .../llvm-project/llvm/include/llvm/MC/MCDwarf.h | 44 +- .../include/llvm/TargetParser/PPCTargetParser.def | 3 + .../llvm/lib/Analysis/BasicAliasAnalysis.cpp | 28 +- .../llvm/lib/Analysis/ValueTracking.cpp | 22 +- .../llvm/lib/CodeGen/CFIInstrInserter.cpp | 10 +- .../llvm/lib/CodeGen/MachineFrameInfo.cpp | 2 +- .../llvm/lib/CodeGen/PrologEpilogInserter.cpp | 4 +- contrib/llvm-project/llvm/lib/MC/MCDwarf.cpp | 6 +- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 58 + .../llvm/lib/Target/AArch64/AArch64ISelLowering.h | 2 + .../llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 7 +- .../Target/AArch64/AArch64MachineFunctionInfo.cpp | 4 + .../llvm/lib/Target/AArch64/AArch64PointerAuth.cpp | 3 +- .../llvm/lib/Target/AArch64/AArch64Subtarget.cpp | 9 +- .../llvm/lib/Target/AArch64/AArch64Subtarget.h | 3 +- .../AArch64/MCTargetDesc/AArch64AsmBackend.cpp | 8 +- .../llvm/lib/Target/ARM/ARMFrameLowering.cpp | 4 +- .../lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 2 +- .../Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h | 2 +- .../lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp | 8 +- .../lib/Target/Hexagon/HexagonFrameLowering.cpp | 4 +- .../lib/Target/LoongArch/LoongArchInstrInfo.td | 1 - .../llvm/lib/Target/MSP430/MSP430FrameLowering.cpp | 2 +- .../llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp | 5 +- .../llvm-project/llvm/lib/Target/PowerPC/PPC.td | 20 +- .../llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 3 + .../llvm/lib/Target/PowerPC/PPCInstrInfo.cpp | 1 + .../llvm/lib/Target/PowerPC/PPCSubtarget.h | 1 + .../lib/Target/PowerPC/PPCTargetTransformInfo.cpp | 4 +- .../llvm/lib/Target/RISCV/RISCVInstrInfoC.td | 8 +- .../lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp | 12 +- .../llvm/lib/Target/X86/X86FrameLowering.cpp | 4 +- .../llvm-project/llvm/lib/TargetParser/Host.cpp | 7 + .../llvm/lib/Transforms/Scalar/LICM.cpp | 62 - .../lib/Transforms/Scalar/LoopStrengthReduce.cpp | 6 +- .../lib/Transforms/Vectorize/LoopVectorize.cpp | 2 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/clang/libclang/Makefile | 5 + lib/clang/libllvm/Makefile | 1 + lib/libc++/Makefile | 4 +- lib/libc++/module.modulemap | 2136 -------------------- 90 files changed, 790 insertions(+), 2476 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 544250c9530d..3195b277ab5f 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -978,7 +978,6 @@ OLD_FILES+=usr/include/c++/v1/__pstl/internal/parallel_backend_utils.h OLD_FILES+=usr/include/c++/v1/__pstl/internal/unseq_backend_simd.h OLD_FILES+=usr/include/c++/v1/__pstl/internal/utils.h OLD_DIRS+=usr/include/c++/v1/__pstl/internal -OLD_DIRS+=usr/include/c++/v1/__pstl OLD_FILES+=usr/include/c++/v1/__pstl_algorithm OLD_FILES+=usr/include/c++/v1/__pstl_memory OLD_FILES+=usr/include/c++/v1/__pstl_numeric diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td index 9fcb1d165e8b..3669b8b48e53 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -942,6 +942,9 @@ def warn_ptrauth_auth_null_pointer : InGroup; def err_ptrauth_string_not_literal : Error< "argument must be a string literal%select{| of char type}0">; +def err_ptrauth_type_disc_undiscriminated : Error< + "cannot pass undiscriminated type %0 to " + "'__builtin_ptrauth_type_discriminator'">; def note_ptrauth_virtual_function_pointer_incomplete_arg_ret : Note<"cannot take an address of a virtual member function if its return or " diff --git a/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def b/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def index 7f4912b9bcd9..8c54661e65cf 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def +++ b/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def @@ -596,6 +596,8 @@ ALIAS("__is_same_as", __is_same, KEYCXX) KEYWORD(__private_extern__ , KEYALL) KEYWORD(__module_private__ , KEYALL) +UNARY_EXPR_OR_TYPE_TRAIT(__builtin_ptrauth_type_discriminator, PtrAuthTypeDiscriminator, KEYALL) + // Extension that will be enabled for Microsoft, Borland and PS4, but can be // disabled via '-fno-declspec'. KEYWORD(__declspec , 0) diff --git a/contrib/llvm-project/clang/include/clang/Driver/Options.td b/contrib/llvm-project/clang/include/clang/Driver/Options.td index 69269cf7537b..359a698ea87d 100644 --- a/contrib/llvm-project/clang/include/clang/Driver/Options.td +++ b/contrib/llvm-project/clang/include/clang/Driver/Options.td @@ -1165,19 +1165,19 @@ def client__name : JoinedOrSeparate<["-"], "client_name">; def combine : Flag<["-", "--"], "combine">, Flags<[NoXarchOption, Unsupported]>; def compatibility__version : JoinedOrSeparate<["-"], "compatibility_version">; def config : Joined<["--"], "config=">, Flags<[NoXarchOption]>, - Visibility<[ClangOption, CLOption, DXCOption]>, MetaVarName<"">, + Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, MetaVarName<"">, HelpText<"Specify configuration file">; -def : Separate<["--"], "config">, Alias; +def : Separate<["--"], "config">, Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, Alias; def no_default_config : Flag<["--"], "no-default-config">, - Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, DXCOption]>, + Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, HelpText<"Disable loading default configuration files">; def config_system_dir_EQ : Joined<["--"], "config-system-dir=">, Flags<[NoXarchOption, HelpHidden]>, - Visibility<[ClangOption, CLOption, DXCOption]>, + Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, HelpText<"System directory for configuration files">; def config_user_dir_EQ : Joined<["--"], "config-user-dir=">, Flags<[NoXarchOption, HelpHidden]>, - Visibility<[ClangOption, CLOption, DXCOption]>, + Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, HelpText<"User directory for configuration files">; def coverage : Flag<["-", "--"], "coverage">, Group, Visibility<[ClangOption, CLOption]>; diff --git a/contrib/llvm-project/clang/include/clang/Parse/Parser.h b/contrib/llvm-project/clang/include/clang/Parse/Parser.h index 613bab9120df..35bb1a19d40f 100644 --- a/contrib/llvm-project/clang/include/clang/Parse/Parser.h +++ b/contrib/llvm-project/clang/include/clang/Parse/Parser.h @@ -3890,6 +3890,8 @@ private: ExprResult ParseArrayTypeTrait(); ExprResult ParseExpressionTrait(); + ExprResult ParseBuiltinPtrauthTypeDiscriminator(); + //===--------------------------------------------------------------------===// // Preprocessor code-completion pass-through void CodeCompleteDirective(bool InConditional) override; diff --git a/contrib/llvm-project/clang/include/clang/Sema/Overload.h b/contrib/llvm-project/clang/include/clang/Sema/Overload.h index 9d8b797af666..26ffe057c74a 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Overload.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Overload.h @@ -998,7 +998,9 @@ class Sema; private: friend class OverloadCandidateSet; OverloadCandidate() - : IsSurrogate(false), IsADLCandidate(CallExpr::NotADL), RewriteKind(CRK_None) {} + : IsSurrogate(false), IgnoreObjectArgument(false), + TookAddressOfOverload(false), IsADLCandidate(CallExpr::NotADL), + RewriteKind(CRK_None) {} }; /// OverloadCandidateSet - A set of overload candidates, used in C++ diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index d638d31e050d..7bfdaaae45a9 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -3456,6 +3456,8 @@ public: TemplateIdAnnotation *TemplateId, bool IsMemberSpecialization); + bool checkPointerAuthEnabled(SourceLocation Loc, SourceRange Range); + bool checkConstantPointerAuthKey(Expr *keyExpr, unsigned &key); /// Diagnose function specifiers on a declaration of an identifier that diff --git a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp index fcb382474ea6..5e57b5e8bc8f 100644 --- a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp @@ -2839,6 +2839,8 @@ static bool handleIntIntBinOp(EvalInfo &Info, const BinaryOperator *E, // During constant-folding, a negative shift is an opposite shift. Such // a shift is not a constant expression. Info.CCEDiag(E, diag::note_constexpr_negative_shift) << RHS; + if (!Info.noteUndefinedBehavior()) + return false; RHS = -RHS; goto shift_right; } @@ -2849,19 +2851,23 @@ static bool handleIntIntBinOp(EvalInfo &Info, const BinaryOperator *E, if (SA != RHS) { Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth(); + if (!Info.noteUndefinedBehavior()) + return false; } else if (LHS.isSigned() && !Info.getLangOpts().CPlusPlus20) { // C++11 [expr.shift]p2: A signed left shift must have a non-negative // operand, and must not overflow the corresponding unsigned type. // C++2a [expr.shift]p2: E1 << E2 is the unique value congruent to // E1 x 2^E2 module 2^N. - if (LHS.isNegative()) + if (LHS.isNegative()) { Info.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS; - else if (LHS.countl_zero() < SA) + if (!Info.noteUndefinedBehavior()) + return false; + } else if (LHS.countl_zero() < SA) { Info.CCEDiag(E, diag::note_constexpr_lshift_discards); + if (!Info.noteUndefinedBehavior()) + return false; + } } - if (Info.EvalStatus.Diag && !Info.EvalStatus.Diag->empty() && - Info.getLangOpts().CPlusPlus11) - return false; Result = LHS << SA; return true; } @@ -2875,6 +2881,8 @@ static bool handleIntIntBinOp(EvalInfo &Info, const BinaryOperator *E, // During constant-folding, a negative shift is an opposite shift. Such a // shift is not a constant expression. Info.CCEDiag(E, diag::note_constexpr_negative_shift) << RHS; + if (!Info.noteUndefinedBehavior()) + return false; RHS = -RHS; goto shift_left; } @@ -2882,13 +2890,13 @@ static bool handleIntIntBinOp(EvalInfo &Info, const BinaryOperator *E, // C++11 [expr.shift]p1: Shift width must be less than the bit width of the // shifted type. unsigned SA = (unsigned) RHS.getLimitedValue(LHS.getBitWidth()-1); - if (SA != RHS) + if (SA != RHS) { Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth(); + if (!Info.noteUndefinedBehavior()) + return false; + } - if (Info.EvalStatus.Diag && !Info.EvalStatus.Diag->empty() && - Info.getLangOpts().CPlusPlus11) - return false; Result = LHS >> SA; return true; } @@ -14054,6 +14062,12 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr( E); } + case UETT_PtrAuthTypeDiscriminator: { + if (E->getArgumentType()->isDependentType()) + return false; + return Success( + Info.Ctx.getPointerAuthTypeDiscriminator(E->getArgumentType()), E); + } case UETT_VecStep: { QualType Ty = E->getTypeOfArgument(); diff --git a/contrib/llvm-project/clang/lib/AST/Interp/Interp.h b/contrib/llvm-project/clang/lib/AST/Interp/Interp.h index 8e96f78d9056..253a433e7340 100644 --- a/contrib/llvm-project/clang/lib/AST/Interp/Interp.h +++ b/contrib/llvm-project/clang/lib/AST/Interp/Interp.h @@ -153,7 +153,8 @@ bool CheckShift(InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS, if (RHS.isNegative()) { const SourceInfo &Loc = S.Current->getSource(OpPC); S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt(); - return false; + if (!S.noteUndefinedBehavior()) + return false; } // C++11 [expr.shift]p1: Shift width must be less than the bit width of @@ -163,17 +164,24 @@ bool CheckShift(InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS, const APSInt Val = RHS.toAPSInt(); QualType Ty = E->getType(); S.CCEDiag(E, diag::note_constexpr_large_shift) << Val << Ty << Bits; - return !(S.getEvalStatus().Diag && !S.getEvalStatus().Diag->empty() && S.getLangOpts().CPlusPlus11); + if (!S.noteUndefinedBehavior()) + return false; } if (LHS.isSigned() && !S.getLangOpts().CPlusPlus20) { const Expr *E = S.Current->getExpr(OpPC); // C++11 [expr.shift]p2: A signed left shift must have a non-negative // operand, and must not overflow the corresponding unsigned type. - if (LHS.isNegative()) + if (LHS.isNegative()) { S.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt(); - else if (LHS.toUnsigned().countLeadingZeros() < static_cast(RHS)) + if (!S.noteUndefinedBehavior()) + return false; + } else if (LHS.toUnsigned().countLeadingZeros() < + static_cast(RHS)) { S.CCEDiag(E, diag::note_constexpr_lshift_discards); + if (!S.noteUndefinedBehavior()) + return false; + } } // C++2a [expr.shift]p2: [P0907R4]: @@ -2269,8 +2277,7 @@ inline bool DoShift(InterpState &S, CodePtr OpPC, LT &LHS, RT &RHS) { // shift is not a constant expression. const SourceInfo &Loc = S.Current->getSource(OpPC); S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt(); - if (S.getLangOpts().CPlusPlus11 && S.getEvalStatus().Diag && - !S.getEvalStatus().Diag->empty()) + if (!S.noteUndefinedBehavior()) return false; RHS = -RHS; return DoShift < LT, RT, @@ -2286,8 +2293,7 @@ inline bool DoShift(InterpState &S, CodePtr OpPC, LT &LHS, RT &RHS) { // E1 x 2^E2 module 2^N. const SourceInfo &Loc = S.Current->getSource(OpPC); S.CCEDiag(Loc, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt(); - if (S.getLangOpts().CPlusPlus11 && S.getEvalStatus().Diag && - !S.getEvalStatus().Diag->empty()) + if (!S.noteUndefinedBehavior()) return false; } } diff --git a/contrib/llvm-project/clang/lib/AST/ItaniumMangle.cpp b/contrib/llvm-project/clang/lib/AST/ItaniumMangle.cpp index 40ef82785f45..d46d621d4c7d 100644 --- a/contrib/llvm-project/clang/lib/AST/ItaniumMangle.cpp +++ b/contrib/llvm-project/clang/lib/AST/ItaniumMangle.cpp @@ -5179,6 +5179,14 @@ recurse: Diags.Report(DiagID); return; } + case UETT_PtrAuthTypeDiscriminator: { + DiagnosticsEngine &Diags = Context.getDiags(); + unsigned DiagID = Diags.getCustomDiagID( + DiagnosticsEngine::Error, + "cannot yet mangle __builtin_ptrauth_type_discriminator expression"); + Diags.Report(E->getExprLoc(), DiagID); + return; + } case UETT_VecStep: { DiagnosticsEngine &Diags = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error, diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp index 4ba4a49311d3..9ff54083c923 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp @@ -385,6 +385,8 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("_ARCH_PWR9"); if (ArchDefs & ArchDefinePwr10) Builder.defineMacro("_ARCH_PWR10"); + if (ArchDefs & ArchDefinePwr11) + Builder.defineMacro("_ARCH_PWR11"); if (ArchDefs & ArchDefineA2) Builder.defineMacro("_ARCH_A2"); if (ArchDefs & ArchDefineE500) @@ -622,10 +624,17 @@ bool PPCTargetInfo::initFeatureMap( addP10SpecificFeatures(Features); } - // Future CPU should include all of the features of Power 10 as well as any + // Power11 includes all the same features as Power10 plus any features + // specific to the Power11 core. + if (CPU == "pwr11" || CPU == "power11") { + initFeatureMap(Features, Diags, "pwr10", FeaturesVec); + addP11SpecificFeatures(Features); + } + + // Future CPU should include all of the features of Power 11 as well as any // additional features (yet to be determined) specific to it. if (CPU == "future") { - initFeatureMap(Features, Diags, "pwr10", FeaturesVec); + initFeatureMap(Features, Diags, "pwr11", FeaturesVec); addFutureSpecificFeatures(Features); } @@ -696,6 +705,10 @@ void PPCTargetInfo::addP10SpecificFeatures( Features["isa-v31-instructions"] = true; } +// Add any Power11 specific features. +void PPCTargetInfo::addP11SpecificFeatures( + llvm::StringMap &Features) const {} + // Add features specific to the "Future" CPU. void PPCTargetInfo::addFutureSpecificFeatures( llvm::StringMap &Features) const {} @@ -870,17 +883,17 @@ ArrayRef PPCTargetInfo::getGCCAddlRegNames() const { } static constexpr llvm::StringLiteral ValidCPUNames[] = { - {"generic"}, {"440"}, {"450"}, {"601"}, {"602"}, - {"603"}, {"603e"}, {"603ev"}, {"604"}, {"604e"}, - {"620"}, {"630"}, {"g3"}, {"7400"}, {"g4"}, - {"7450"}, {"g4+"}, {"750"}, {"8548"}, {"970"}, - {"g5"}, {"a2"}, {"e500"}, {"e500mc"}, {"e5500"}, - {"power3"}, {"pwr3"}, {"power4"}, {"pwr4"}, {"power5"}, - {"pwr5"}, {"power5x"}, {"pwr5x"}, {"power6"}, {"pwr6"}, - {"power6x"}, {"pwr6x"}, {"power7"}, {"pwr7"}, {"power8"}, - {"pwr8"}, {"power9"}, {"pwr9"}, {"power10"}, {"pwr10"}, - {"powerpc"}, {"ppc"}, {"ppc32"}, {"powerpc64"}, {"ppc64"}, - {"powerpc64le"}, {"ppc64le"}, {"future"}}; + {"generic"}, {"440"}, {"450"}, {"601"}, {"602"}, + {"603"}, {"603e"}, {"603ev"}, {"604"}, {"604e"}, + {"620"}, {"630"}, {"g3"}, {"7400"}, {"g4"}, + {"7450"}, {"g4+"}, {"750"}, {"8548"}, {"970"}, + {"g5"}, {"a2"}, {"e500"}, {"e500mc"}, {"e5500"}, + {"power3"}, {"pwr3"}, {"power4"}, {"pwr4"}, {"power5"}, + {"pwr5"}, {"power5x"}, {"pwr5x"}, {"power6"}, {"pwr6"}, + {"power6x"}, {"pwr6x"}, {"power7"}, {"pwr7"}, {"power8"}, + {"pwr8"}, {"power9"}, {"pwr9"}, {"power10"}, {"pwr10"}, + {"power11"}, {"pwr11"}, {"powerpc"}, {"ppc"}, {"ppc32"}, + {"powerpc64"}, {"ppc64"}, {"powerpc64le"}, {"ppc64le"}, {"future"}}; bool PPCTargetInfo::isValidCPUName(StringRef Name) const { return llvm::is_contained(ValidCPUNames, Name); diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h index b15ab6fbcf49..6d5d8dd54d01 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h @@ -44,8 +44,9 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { ArchDefinePwr8 = 1 << 12, ArchDefinePwr9 = 1 << 13, ArchDefinePwr10 = 1 << 14, - ArchDefineFuture = 1 << 15, - ArchDefineA2 = 1 << 16, + ArchDefinePwr11 = 1 << 15, + ArchDefineFuture = 1 << 16, + ArchDefineA2 = 1 << 17, ArchDefineE500 = 1 << 18 } ArchDefineTypes; @@ -166,11 +167,16 @@ public: ArchDefinePwr7 | ArchDefinePwr6 | ArchDefinePwr5x | ArchDefinePwr5 | ArchDefinePwr4 | ArchDefinePpcgr | ArchDefinePpcsq) + .Cases("power11", "pwr11", + ArchDefinePwr11 | ArchDefinePwr10 | ArchDefinePwr9 | + ArchDefinePwr8 | ArchDefinePwr7 | ArchDefinePwr6 | + ArchDefinePwr5x | ArchDefinePwr5 | ArchDefinePwr4 | + ArchDefinePpcgr | ArchDefinePpcsq) .Case("future", - ArchDefineFuture | ArchDefinePwr10 | ArchDefinePwr9 | - ArchDefinePwr8 | ArchDefinePwr7 | ArchDefinePwr6 | - ArchDefinePwr5x | ArchDefinePwr5 | ArchDefinePwr4 | - ArchDefinePpcgr | ArchDefinePpcsq) + ArchDefineFuture | ArchDefinePwr11 | ArchDefinePwr10 | + ArchDefinePwr9 | ArchDefinePwr8 | ArchDefinePwr7 | + ArchDefinePwr6 | ArchDefinePwr5x | ArchDefinePwr5 | + ArchDefinePwr4 | ArchDefinePpcgr | ArchDefinePpcsq) .Cases("8548", "e500", ArchDefineE500) .Default(ArchDefineNone); } @@ -192,6 +198,7 @@ public: const std::vector &FeaturesVec) const override; void addP10SpecificFeatures(llvm::StringMap &Features) const; + void addP11SpecificFeatures(llvm::StringMap &Features) const; void addFutureSpecificFeatures(llvm::StringMap &Features) const; bool handleTargetFeatures(std::vector &Features, diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp index f5bd4a141cc2..8965a14d88a6 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp @@ -1695,7 +1695,8 @@ void CGOpenMPRuntimeGPU::emitReduction( CGF.AllocaInsertPt->getIterator()); InsertPointTy CodeGenIP(CGF.Builder.GetInsertBlock(), CGF.Builder.GetInsertPoint()); - llvm::OpenMPIRBuilder::LocationDescription OmpLoc(CodeGenIP); + llvm::OpenMPIRBuilder::LocationDescription OmpLoc( + CodeGenIP, CGF.SourceLocToDebugLoc(Loc)); llvm::SmallVector ReductionInfos; CodeGenFunction::OMPPrivateScope Scope(CGF); diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp index 634c09652331..acd5757d6ea9 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp @@ -70,6 +70,7 @@ static std::string normalizeCPUName(StringRef CPUName, const llvm::Triple &T) { .Case("power8", "pwr8") .Case("power9", "pwr9") .Case("power10", "pwr10") + .Case("power11", "pwr11") .Case("future", "future") .Case("powerpc", "ppc") .Case("powerpc64", "ppc64") @@ -103,6 +104,8 @@ const char *ppc::getPPCAsmModeForCPU(StringRef Name) { .Case("power9", "-mpower9") .Case("pwr10", "-mpower10") .Case("power10", "-mpower10") + .Case("pwr11", "-mpower11") + .Case("power11", "-mpower11") .Default("-many"); } diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp index 78936fd634f3..5de29f1eca61 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp @@ -1516,6 +1516,10 @@ static void handlePAuthABI(const ArgList &DriverArgs, ArgStringList &CC1Args) { options::OPT_fno_ptrauth_vtable_pointer_type_discrimination)) CC1Args.push_back("-fptrauth-vtable-pointer-type-discrimination"); + if (!DriverArgs.hasArg(options::OPT_fptrauth_indirect_gotos, + options::OPT_fno_ptrauth_indirect_gotos)) + CC1Args.push_back("-fptrauth-indirect-gotos"); + if (!DriverArgs.hasArg(options::OPT_fptrauth_init_fini, options::OPT_fno_ptrauth_init_fini)) CC1Args.push_back("-fptrauth-init-fini"); diff --git a/contrib/llvm-project/clang/lib/Headers/ptrauth.h b/contrib/llvm-project/clang/lib/Headers/ptrauth.h index e0bc8c4f9acf..4724155b0dc7 100644 --- a/contrib/llvm-project/clang/lib/Headers/ptrauth.h +++ b/contrib/llvm-project/clang/lib/Headers/ptrauth.h @@ -202,6 +202,23 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t; #define ptrauth_string_discriminator(__string) \ __builtin_ptrauth_string_discriminator(__string) +/* Compute a constant discriminator from the given type. + + The result can be used as the second argument to + ptrauth_blend_discriminator or the third argument to the + __ptrauth qualifier. It has type size_t. + + If the type is a C++ member function pointer type, the result is + the discriminator used to signed member function pointers of that + type. If the type is a function, function pointer, or function + reference type, the result is the discriminator used to sign + functions of that type. It is ill-formed to use this macro with any + other type. + + A call to this function is an integer constant expression. */ +#define ptrauth_type_discriminator(__type) \ + __builtin_ptrauth_type_discriminator(__type) + /* Compute a signature for the given pair of pointer-sized values. The order of the arguments is significant. @@ -289,6 +306,8 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t; ((ptrauth_extra_data_t)0); \ }) +#define ptrauth_type_discriminator(__type) ((ptrauth_extra_data_t)0) + #define ptrauth_sign_generic_data(__value, __data) \ ({ \ (void)__value; \ diff --git a/contrib/llvm-project/clang/lib/Headers/stdarg.h b/contrib/llvm-project/clang/lib/Headers/stdarg.h index 8292ab907bec..6203d7a600a2 100644 --- a/contrib/llvm-project/clang/lib/Headers/stdarg.h +++ b/contrib/llvm-project/clang/lib/Headers/stdarg.h @@ -20,19 +20,18 @@ * modules. */ #if defined(__MVS__) && __has_include_next() -#include <__stdarg_header_macro.h> #undef __need___va_list #undef __need_va_list #undef __need_va_arg #undef __need___va_copy #undef __need_va_copy +#include <__stdarg_header_macro.h> #include_next #else #if !defined(__need___va_list) && !defined(__need_va_list) && \ !defined(__need_va_arg) && !defined(__need___va_copy) && \ !defined(__need_va_copy) -#include <__stdarg_header_macro.h> #define __need___va_list #define __need_va_list #define __need_va_arg @@ -45,6 +44,7 @@ !defined(__STRICT_ANSI__) #define __need_va_copy #endif +#include <__stdarg_header_macro.h> #endif #ifdef __need___va_list diff --git a/contrib/llvm-project/clang/lib/Headers/stdatomic.h b/contrib/llvm-project/clang/lib/Headers/stdatomic.h index 2027055f3879..1991351f9e9e 100644 --- a/contrib/llvm-project/clang/lib/Headers/stdatomic.h +++ b/contrib/llvm-project/clang/lib/Headers/stdatomic.h @@ -172,7 +172,11 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t; typedef struct atomic_flag { atomic_bool _Value; } atomic_flag; +#ifdef __cplusplus +#define ATOMIC_FLAG_INIT {false} +#else #define ATOMIC_FLAG_INIT { 0 } +#endif /* These should be provided by the libc implementation. */ #ifdef __cplusplus diff --git a/contrib/llvm-project/clang/lib/Headers/stddef.h b/contrib/llvm-project/clang/lib/Headers/stddef.h index 8985c526e8fc..99b275aebf5a 100644 --- a/contrib/llvm-project/clang/lib/Headers/stddef.h +++ b/contrib/llvm-project/clang/lib/Headers/stddef.h @@ -20,7 +20,6 @@ * modules. */ #if defined(__MVS__) && __has_include_next() -#include <__stddef_header_macro.h> #undef __need_ptrdiff_t #undef __need_size_t #undef __need_rsize_t @@ -31,6 +30,7 @@ #undef __need_max_align_t #undef __need_offsetof #undef __need_wint_t +#include <__stddef_header_macro.h> #include_next #else @@ -40,7 +40,6 @@ !defined(__need_NULL) && !defined(__need_nullptr_t) && \ !defined(__need_unreachable) && !defined(__need_max_align_t) && \ !defined(__need_offsetof) && !defined(__need_wint_t) -#include <__stddef_header_macro.h> #define __need_ptrdiff_t #define __need_size_t /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is @@ -49,7 +48,24 @@ #define __need_rsize_t #endif #define __need_wchar_t +#if !defined(__STDDEF_H) || __has_feature(modules) +/* + * __stddef_null.h is special when building without modules: if __need_NULL is + * set, then it will unconditionally redefine NULL. To avoid stepping on client + * definitions of NULL, __need_NULL should only be set the first time this + * header is included, that is when __STDDEF_H is not defined. However, when + * building with modules, this header is a textual header and needs to + * unconditionally include __stdef_null.h to support multiple submodules + * exporting _Builtin_stddef.null. Take module SM with submodules A and B, whose + * headers both include stddef.h When SM.A builds, __STDDEF_H will be defined. + * When SM.B builds, the definition from SM.A will leak when building without + * local submodule visibility. stddef.h wouldn't include __stddef_null.h, and + * SM.B wouldn't import _Builtin_stddef.null, and SM.B's `export *` wouldn't + * export NULL as expected. When building with modules, always include + * __stddef_null.h so that everything works as expected. + */ #define __need_NULL +#endif #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \ defined(__cplusplus) #define __need_nullptr_t @@ -65,6 +81,7 @@ /* wint_t is provided by and not . It's here * for compatibility, but must be explicitly requested. Therefore * __need_wint_t is intentionally not defined here. */ +#include <__stddef_header_macro.h> #endif #if defined(__need_ptrdiff_t) diff --git a/contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp b/contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp index a12c375c8d48..e82b56527283 100644 --- a/contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp +++ b/contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp @@ -763,6 +763,9 @@ class CastExpressionIdValidator final : public CorrectionCandidateCallback { bool Parser::isRevertibleTypeTrait(const IdentifierInfo *II, tok::TokenKind *Kind) { if (RevertibleTypeTraits.empty()) { +// Revertible type trait is a feature for backwards compatibility with older +// standard libraries that declare their own structs with the same name as +// the builtins listed below. New builtins should NOT be added to this list. #define RTT_JOIN(X, Y) X##Y #define REVERTIBLE_TYPE_TRAIT(Name) \ RevertibleTypeTraits[PP.getIdentifierInfo(#Name)] = RTT_JOIN(tok::kw_, Name) @@ -790,7 +793,6 @@ bool Parser::isRevertibleTypeTrait(const IdentifierInfo *II, REVERTIBLE_TYPE_TRAIT(__is_fundamental); REVERTIBLE_TYPE_TRAIT(__is_integral); REVERTIBLE_TYPE_TRAIT(__is_interface_class); - REVERTIBLE_TYPE_TRAIT(__is_layout_compatible); REVERTIBLE_TYPE_TRAIT(__is_literal); REVERTIBLE_TYPE_TRAIT(__is_lvalue_expr); REVERTIBLE_TYPE_TRAIT(__is_lvalue_reference); @@ -841,6 +843,26 @@ bool Parser::isRevertibleTypeTrait(const IdentifierInfo *II, return false; } +ExprResult Parser::ParseBuiltinPtrauthTypeDiscriminator() { + SourceLocation Loc = ConsumeToken(); + + BalancedDelimiterTracker T(*this, tok::l_paren); + if (T.expectAndConsume()) + return ExprError(); + + TypeResult Ty = ParseTypeName(); + if (Ty.isInvalid()) { + SkipUntil(tok::r_paren, StopAtSemi); + return ExprError(); + } + + SourceLocation EndLoc = Tok.getLocation(); + T.consumeClose(); + return Actions.ActOnUnaryExprOrTypeTraitExpr( + Loc, UETT_PtrAuthTypeDiscriminator, + /*isType=*/true, Ty.get().getAsOpaquePtr(), SourceRange(Loc, EndLoc)); +} + /// Parse a cast-expression, or, if \pisUnaryExpression is true, parse /// a unary-expression. /// @@ -1806,6 +1828,9 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind, Res = ParseArrayTypeTrait(); break; + case tok::kw___builtin_ptrauth_type_discriminator: + return ParseBuiltinPtrauthTypeDiscriminator(); + case tok::kw___is_lvalue_expr: case tok::kw___is_rvalue_expr: if (NotPrimaryExpression) diff --git a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp index 45b9bbb23dbf..cf1196ad23c2 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp @@ -1489,14 +1489,18 @@ enum PointerAuthOpKind { }; } -static bool checkPointerAuthEnabled(Sema &S, Expr *E) { - if (S.getLangOpts().PointerAuthIntrinsics) +bool Sema::checkPointerAuthEnabled(SourceLocation Loc, SourceRange Range) { + if (getLangOpts().PointerAuthIntrinsics) return false; - S.Diag(E->getExprLoc(), diag::err_ptrauth_disabled) << E->getSourceRange(); + Diag(Loc, diag::err_ptrauth_disabled) << Range; return true; } +static bool checkPointerAuthEnabled(Sema &S, Expr *E) { + return S.checkPointerAuthEnabled(E->getExprLoc(), E->getSourceRange()); +} + static bool checkPointerAuthKey(Sema &S, Expr *&Arg) { // Convert it to type 'int'. if (convertArgumentToType(S, Arg, S.Context.IntTy)) diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp index 439db55668cc..74c0e0170590 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp @@ -4117,6 +4117,21 @@ static bool CheckVectorElementsTraitOperandType(Sema &S, QualType T, return false; } +static bool checkPtrAuthTypeDiscriminatorOperandType(Sema &S, QualType T, + SourceLocation Loc, + SourceRange ArgRange) { + if (S.checkPointerAuthEnabled(Loc, ArgRange)) + return true; + + if (!T->isFunctionType() && !T->isFunctionPointerType() && + !T->isFunctionReferenceType() && !T->isMemberFunctionPointerType()) { + S.Diag(Loc, diag::err_ptrauth_type_disc_undiscriminated) << T << ArgRange; + return true; + } + + return false; +} + static bool CheckExtensionTraitOperandType(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, @@ -4511,6 +4526,10 @@ bool Sema::CheckUnaryExprOrTypeTraitOperand(QualType ExprType, return CheckVectorElementsTraitOperandType(*this, ExprType, OpLoc, ExprRange); + if (ExprKind == UETT_PtrAuthTypeDiscriminator) + return checkPtrAuthTypeDiscriminatorOperandType(*this, ExprType, OpLoc, + ExprRange); + // Explicitly list some types as extensions. if (!CheckExtensionTraitOperandType(*this, ExprType, OpLoc, ExprRange, ExprKind)) @@ -5711,7 +5730,6 @@ static bool isParenthetizedAndQualifiedAddressOfExpr(Expr *Fn) { if (!UO || UO->getOpcode() != clang::UO_AddrOf) return false; if (auto *DRE = dyn_cast(UO->getSubExpr()->IgnoreParens())) { - assert(isa(DRE->getDecl()) && "expected a function"); return DRE->hasQualifier(); } if (auto *OVL = dyn_cast(UO->getSubExpr()->IgnoreParens())) @@ -17027,7 +17045,8 @@ Sema::VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, // not a constant expression as a side-effect. bool Folded = E->EvaluateAsRValue(EvalResult, Context, /*isConstantContext*/ true) && - EvalResult.Val.isInt() && !EvalResult.HasSideEffects; + EvalResult.Val.isInt() && !EvalResult.HasSideEffects && + (!getLangOpts().CPlusPlus || !EvalResult.HasUndefinedBehavior); if (!isa(E)) E = ConstantExpr::Create(Context, E, EvalResult.Val); diff --git a/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp b/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp index a8d250fbabfe..554a2df14bea 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp @@ -6857,10 +6857,7 @@ void Sema::AddOverloadCandidate( Candidate.Viable = true; Candidate.RewriteKind = CandidateSet.getRewriteInfo().getRewriteKind(Function, PO); - Candidate.IsSurrogate = false; Candidate.IsADLCandidate = IsADLCandidate; - Candidate.IgnoreObjectArgument = false; - Candidate.TookAddressOfOverload = false; Candidate.ExplicitCallArguments = Args.size(); // Explicit functions are not actually candidates at all if we're not @@ -7422,8 +7419,6 @@ Sema::AddMethodCandidate(CXXMethodDecl *Method, DeclAccessPair FoundDecl, Candidate.Function = Method; Candidate.RewriteKind = CandidateSet.getRewriteInfo().getRewriteKind(Method, PO); - Candidate.IsSurrogate = false; - Candidate.IgnoreObjectArgument = false; Candidate.TookAddressOfOverload = CandidateSet.getKind() == OverloadCandidateSet::CSK_AddressOfOverloadSet; Candidate.ExplicitCallArguments = Args.size(); @@ -7617,7 +7612,6 @@ void Sema::AddMethodTemplateCandidate( Candidate.IgnoreObjectArgument = cast(Candidate.Function)->isStatic() || ObjectType.isNull(); - Candidate.TookAddressOfOverload = false; Candidate.ExplicitCallArguments = Args.size(); if (Result == TemplateDeductionResult::NonDependentConversionFailure) Candidate.FailureKind = ovl_fail_bad_conversion; @@ -7705,7 +7699,6 @@ void Sema::AddTemplateOverloadCandidate( Candidate.IgnoreObjectArgument = isa(Candidate.Function) && !isa(Candidate.Function); - Candidate.TookAddressOfOverload = false; Candidate.ExplicitCallArguments = Args.size(); if (Result == TemplateDeductionResult::NonDependentConversionFailure) Candidate.FailureKind = ovl_fail_bad_conversion; @@ -7886,9 +7879,6 @@ void Sema::AddConversionCandidate( OverloadCandidate &Candidate = CandidateSet.addCandidate(1); Candidate.FoundDecl = FoundDecl; Candidate.Function = Conversion; - Candidate.IsSurrogate = false; - Candidate.IgnoreObjectArgument = false; - Candidate.TookAddressOfOverload = false; Candidate.FinalConversion.setAsIdentityConversion(); Candidate.FinalConversion.setFromType(ConvType); Candidate.FinalConversion.setAllToTypes(ToType); @@ -8084,9 +8074,6 @@ void Sema::AddTemplateConversionCandidate( Candidate.Function = FunctionTemplate->getTemplatedDecl(); Candidate.Viable = false; Candidate.FailureKind = ovl_fail_bad_deduction; - Candidate.IsSurrogate = false; - Candidate.IgnoreObjectArgument = false; - Candidate.TookAddressOfOverload = false; Candidate.ExplicitCallArguments = 1; Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result, Info); @@ -8119,10 +8106,8 @@ void Sema::AddSurrogateCandidate(CXXConversionDecl *Conversion, Candidate.FoundDecl = FoundDecl; Candidate.Function = nullptr; Candidate.Surrogate = Conversion; - Candidate.Viable = true; Candidate.IsSurrogate = true; - Candidate.IgnoreObjectArgument = false; - Candidate.TookAddressOfOverload = false; + Candidate.Viable = true; Candidate.ExplicitCallArguments = Args.size(); // Determine the implicit conversion sequence for the implicit @@ -8328,9 +8313,6 @@ void Sema::AddBuiltinCandidate(QualType *ParamTys, ArrayRef Args, OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size()); Candidate.FoundDecl = DeclAccessPair::make(nullptr, AS_none); Candidate.Function = nullptr; - Candidate.IsSurrogate = false; - Candidate.IgnoreObjectArgument = false; - Candidate.TookAddressOfOverload = false; std::copy(ParamTys, ParamTys + Args.size(), Candidate.BuiltinParamTypes); // Determine the implicit conversion sequences for each of the diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/README.txt b/contrib/llvm-project/compiler-rt/lib/builtins/README.txt index 2d213d95f333..19f26c92a0f9 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/README.txt +++ b/contrib/llvm-project/compiler-rt/lib/builtins/README.txt @@ -272,6 +272,11 @@ switch32 switch8 switchu8 +// This function generates a custom trampoline function with the specific +// realFunc and localsPtr values. +void __trampoline_setup(uint32_t* trampOnStack, int trampSizeAllocated, + const void* realFunc, void* localsPtr); + // There is no C interface to the *_vfp_d8_d15_regs functions. There are // called in the prolog and epilog of Thumb1 functions. When the C++ ABI use // SJLJ for exceptions, each function with a catch clause or destructors needs diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c b/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c index 062cf80fc684..20061012e16c 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c +++ b/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c @@ -10,15 +10,6 @@ struct FEATURES { extern struct FEATURES __aarch64_cpu_features; -struct SME_STATE { - long PSTATE; - long TPIDR2_EL0; -}; - -extern struct SME_STATE __arm_sme_state(void) __arm_streaming_compatible; - -extern bool __aarch64_has_sme_and_tpidr2_el0; - #if __GNUC__ >= 9 #pragma GCC diagnostic ignored "-Wprio-ctor-dtor" #endif @@ -28,22 +19,3 @@ __attribute__((constructor(90))) static void get_aarch64_cpu_features(void) { __init_cpu_features(); } - -__attribute__((target("sve"))) long -__arm_get_current_vg(void) __arm_streaming_compatible { - struct SME_STATE State = __arm_sme_state(); - unsigned long long features = - __atomic_load_n(&__aarch64_cpu_features.features, __ATOMIC_RELAXED); - bool HasSVE = features & (1ULL << FEAT_SVE); - - if (!HasSVE && !__aarch64_has_sme_and_tpidr2_el0) - return 0; - - if (HasSVE || (State.PSTATE & 1)) { - long vl; - __asm__ __volatile__("cntd %0" : "=r"(vl)); - return vl; - } - - return 0; -} diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi.S b/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi.S index 4c0ff66931db..cd8153f60670 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi.S +++ b/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi.S @@ -12,11 +12,15 @@ #if !defined(__APPLE__) *** 4259 LINES SKIPPED *** From nobody Sun Dec 1 11:18:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYN3dJ9z5fSy3; Sun, 01 Dec 2024 11:18:32 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYN0xSpz42Y2; Sun, 1 Dec 2024 11:18:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UWBNytLN0Ag3K8mTBHVRm7yUqJiaqKmdtHzHtkKRE/w=; b=Im6BPSN2T7df+m2mED0s4o8voKyNPH09gftRyg8Mc5K9kwpxLoLQNQ3Z2o0hou5JFPNg2+ E+8/cgSOrlYfg2+btVG/zz/KgPuSe216/jUOoDN18cV8JBwYDSqeeRZ0mx8TR5aAXnYHWi hQYSd+fQvNZVO6HfiqwM+s6EUA7kT16bvtSIFrH6lQ5GbglDD3vHSbajSRDryjCVkNpGln FyI2SukpaDzq6eI8sjudBzRnuSMocTqepEZPfZL1o6ClzftFrtNftTlq1ZzUIdEJJ8j18t f/hLNhIevFWDkmMkbqlPemOGt9RyxKpn8nbv9ePuR0/rGRgEz5ulpdxa9htaTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UWBNytLN0Ag3K8mTBHVRm7yUqJiaqKmdtHzHtkKRE/w=; b=ynKYlv5wEmYHjVtBNh0W2SUlJ94PgcLfuFMcZAItyYm13AGH6IVdaDEXrtuZQIfe3WUHW2 5Bsa51AuxwIk+UcccNLEGA/fW06M2ZurvL/wvM3mKXHM+6CsE9zcA39F1kV8rgxGhXT5Z3 aT5mXdLs1BLw9KJBjUFJYaztNDp6Gvkj1Ej+tUeoimk/f5znC8GzkdVVdIzX7MGhqztdec iCnXf/oIFBw0ljv1Tih08jMCk7pcpzYqy4yOtdcb7JrYTVl3I0UZ5QEfxzoBr6jv1kJIno N3HQ90KyHd2Vzp8kaHsO0DNIF2npGyOwORVHoPR4T94kO94+1cGXorbQ7cquSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051912; a=rsa-sha256; cv=none; b=f/0RiBWvyll4asCvCgbSDKZRwIk4P/T9hAAb4XMhqN/3lnEUUetGDQRjmbDqnCl/ABMTu+ cn/r+4UcA9BqNlkBjMdQx4+QY8ds9bFiXiZa4/4dXz0EAyL+bmZF89JwgJeMFX1DliLGDq Q2lSL+vIJYof4iiqib6gF7l3vSZV1KnjqFuxJk6jmAHEhMji9mJGYwP5enDVZnYuB1+FPM cSXWtUUiGHrEfeTlA6347EUFdhb4z987gcAV5uQXaRmr4aOf+VEVmL/O4G5UFOsiRg90rz 8WoQVTyVhR8r1mHiypYbN/UeqBBbw809N9gBgKFRGbMDRiPb5J9DMC6Os3S0Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYN0K7yzqjk; Sun, 1 Dec 2024 11:18:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIV9R007690; Sun, 1 Dec 2024 11:18:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIV4S007687; Sun, 1 Dec 2024 11:18:31 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:31 GMT Message-Id: <202412011118.4B1BIV4S007687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 3d31a1d8cdfd - stable/14 - Tentatively apply https://github.com/llvm/llvm-project/pull/101403 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3d31a1d8cdfdfe1417688249ca5ac8eda69964b2 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3d31a1d8cdfdfe1417688249ca5ac8eda69964b2 commit 3d31a1d8cdfdfe1417688249ca5ac8eda69964b2 Author: Dimitry Andric AuthorDate: 2024-07-31 20:16:45 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:07 +0000 Tentatively apply https://github.com/llvm/llvm-project/pull/101403 PR: 280562 MFC after: 1 month (cherry picked from commit 3f157662c0ef9298725340be1f40cbf307bd154e) --- .../source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h | 2 +- .../Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h | 2 +- .../Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h index 89ffa617294a..b9537e6952f6 100644 --- a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h +++ b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h @@ -30,7 +30,7 @@ class NativeProcessFreeBSD; class NativeRegisterContextFreeBSD_arm : public NativeRegisterContextFreeBSD { public: NativeRegisterContextFreeBSD_arm(const ArchSpec &target_arch, - NativeThreadProtocol &native_thread); + NativeThreadFreeBSD &native_thread); uint32_t GetRegisterSetCount() const override; diff --git a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h index 0b4a508a7d5d..286b4fd8d8b9 100644 --- a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h +++ b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h @@ -31,7 +31,7 @@ class NativeRegisterContextFreeBSD_mips64 : public NativeRegisterContextFreeBSD { public: NativeRegisterContextFreeBSD_mips64(const ArchSpec &target_arch, - NativeThreadProtocol &native_thread); + NativeThreadFreeBSD &native_thread); uint32_t GetRegisterSetCount() const override; diff --git a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h index 3df371036f91..420db822acc0 100644 --- a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h +++ b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h @@ -31,7 +31,7 @@ class NativeRegisterContextFreeBSD_powerpc : public NativeRegisterContextFreeBSD { public: NativeRegisterContextFreeBSD_powerpc(const ArchSpec &target_arch, - NativeThreadProtocol &native_thread); + NativeThreadFreeBSD &native_thread); uint32_t GetRegisterSetCount() const override; From nobody Sun Dec 1 11:18:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYP5XLkz5fT4c; Sun, 01 Dec 2024 11:18:33 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYP23n9z42Sm; Sun, 1 Dec 2024 11:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o6oVLnDhPmNZzw19I76xfvybqGGcjon0lbp6lvS3dew=; b=MwI5PbGR99jzreJYadQuYgpem33AQr0iz5DJHWAw2AADQh5JPWTVRPPuVvQ2GtLBbvcwWc CwmuEa5QA0+OMqrdOn5J7Be1u7ce5aRSYuMA41rMwxIJ941y1bHlkAH1eXHXSIv80msemS 8HrMtZlI1EwjtTB1KvNKq7o+1I89GQxaCm8zU7PwuAxVGT69k2UrTyjnKkJMFPZNgbm29v HoPVy/cO3r+/E+tz6moCFXe1tDTQj7Vx/CB6UghfJMD637VrpkY/QYvjO28VmcFGy9jh9p PN8ogLOHmGBYMv0Fewbw4hQq92cOSaC9gneJ9aU7uffuOfR6uVGuWSy4oSBsNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o6oVLnDhPmNZzw19I76xfvybqGGcjon0lbp6lvS3dew=; b=Qft033fbQAeRKFz4B5iea5ZmIjYNAPzKTHCOrlEFjigcilVc1HtPgHkK9glkaY8Cii+q3R 1xecVTk1zvOA6ueoLnnW/h8mn2NPq8mJY9lnQ5LeFfqLjgosJHb/F9wMPfeVOZSi5F5DBZ yfOKifmAdJa7W3iHDUuphhpAfCg0Y4BMsSkxjgHvgZmzIMe8YVBWCid4SzCx1C//s+s67+ +UFE4uukw7jI5wDAtEQdDvNVHwvlaOQeNZhBqnYp0YKexK61iTmuKYhgYXZAr8hmYcfOVy LdaxPyxzxmVN4yCUskQzn4apJdPM1bpGV/UhkYoQyVReIbMHWjNlN/TrwRXJVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051913; a=rsa-sha256; cv=none; b=Pv9KmYs4SebzEPSYyVbz/Y3w9/AvuQS9VR1klN8MjH8xi1bYvTxAC5GltkLBNfq/8QWuj7 xCbfjTWZJ4lwSotSujsrE19fcaIZ+E+9jpKso2Juarex3w0nFKsiIVn1Tlr2ejcKe9ARUq VIEXzMRVloqhbItrv37gIeHNN3vblb+xj/UwepXYpA0Bkn1DljsJ/h8ZDvhb0xvlY+SBvK llpSUNOQDRYB0B128THKweS6OwXJc3zksqHu4nVBJGyaISSqbbB0/rWlYk6PC4y55pC+0D lmja8Dm0tWL/FCBLxSpaL4R/o5lVLbfA0Y6VWJvgOWaRFBfWJEps7Ye/2C06nA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYP1Qtdzr9d; Sun, 1 Dec 2024 11:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIXp3007772; Sun, 1 Dec 2024 11:18:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIXEr007769; Sun, 1 Dec 2024 11:18:33 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:33 GMT Message-Id: <202412011118.4B1BIXEr007769@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: cc1632ed3075 - stable/14 - libcxx simd_utils.h: only enable _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS for clang >= 15, since older versions do not support the required builtins. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cc1632ed307517e28b58505abc2480f67780c778 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cc1632ed307517e28b58505abc2480f67780c778 commit cc1632ed307517e28b58505abc2480f67780c778 Author: Dimitry Andric AuthorDate: 2024-08-05 20:05:46 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:08 +0000 libcxx simd_utils.h: only enable _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS for clang >= 15, since older versions do not support the required builtins. PR: 280562 MFC after: 1 month (cherry picked from commit 6846ab2fb6630ca91ab0a71350d77358e521c1c7) --- contrib/llvm-project/libcxx/include/__algorithm/simd_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__algorithm/simd_utils.h b/contrib/llvm-project/libcxx/include/__algorithm/simd_utils.h index 549197be8018..cb5c93675cad 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/simd_utils.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/simd_utils.h @@ -28,7 +28,7 @@ _LIBCPP_PUSH_MACROS #include <__undef_macros> // TODO: Find out how altivec changes things and allow vectorizations there too. -#if _LIBCPP_STD_VER >= 14 && defined(_LIBCPP_CLANG_VER) && !defined(__ALTIVEC__) +#if _LIBCPP_STD_VER >= 14 && (defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1500) && !defined(__ALTIVEC__) # define _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS 1 #else # define _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS 0 From nobody Sun Dec 1 11:18:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYQ5lSHz5fTHk; Sun, 01 Dec 2024 11:18:34 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYQ2qWWz42Sv; Sun, 1 Dec 2024 11:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YZJUz4OsMrRSaycLuQRQWEzJqICpRuyS+1VplzYjHbs=; b=lN6f+y7aJZfwRuBFANpIOI4aElCU86UlOXQGrHcY+kTzwNG7etgPmInrCmSTXke/HNezE4 RHe0ctV2BlYcvkUFJQiytFpjO2jKqDH8XbE3pLQ/WwQXH38xjqc2YdWXTJaNykGyEWnnS5 uVcWUBXVXyh7rCoAPzEcm2x3+if/a4ai/N30dIlqJY7iiN+H+C4UzLLS0S3dD+TYnRa1F4 XaTXAE6Uyg+bzG/9tyMKq7vFKkT/Z7+NTzD7rmyK6KxXirr7x239Rk6SGoxY7jH2OuBjkk 3Sb7Nv/9qM0uaR7VFETG5dabVcflaIk37dk/0ihjzZ8KXxXXDIJeDdE6tecb/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YZJUz4OsMrRSaycLuQRQWEzJqICpRuyS+1VplzYjHbs=; b=dN50ByBQ9BVA6PeZ3KIVb+/k6QHTs5jm+rpt7zCprB4Kpnkj6FpmWfNtD83n06OLfYJ6Lo MPOSypAwbkpy/XVb34vxXuayaTWIGyYavKX7vfBqQ4bxIQhdHE24ViLGVjzJkH1RlaPjBj aBEQDbhQE6OCoblLjUdQYsGoFrJ3tahN7s1DScFORLpsw2Lo1eXcGZAgBqA1Va06kXnb31 fUm4igShFeKTrTIOhHZRy2rW1+15+wjvJVrsGYdYFhbbPNXsGVMrsVI3ssBrqxEek8VM9Q bS49yRkvmJxbKv9W6Wv7rW+IsxN6O1ZmwePSDn6tRxUWxvplDW4dGAU1sZV32g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051914; a=rsa-sha256; cv=none; b=KflhucPiRFZ4eXX29AtTn0RMrn77iHEmser8fzAQR55LlClt9+g11rxE+/0iYXtAQXjMeP jq7RBYgC+v9PhmUEWEbjn2ONGgdX3j+IQ82HdEyUSIlgApKi6IoHycYZ4TuCuXLqbuP3ih PxEQYnll9dl4uXRktr7vtBKGZqAdsZjAheWTg1EOYBViMBJdgYx/Ry/Tdvr0o50PNTS2iD Sh3hHjAH2SaPXf6ryLAPFpCCMuYucB7XSqh/RTz15yHP2X1zxP2S8vzw1T4U9Qk3jn6V+J xskC+Lpfizlv45anvbJ905JEjqzrpUeCxUyotV1mKYSmelIPZezLvhcP5sxAow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYQ2DJYzqjl; Sun, 1 Dec 2024 11:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIYp6007856; Sun, 1 Dec 2024 11:18:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIYqK007853; Sun, 1 Dec 2024 11:18:34 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:34 GMT Message-Id: <202412011118.4B1BIYqK007853@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 5ace2b9e19cd - stable/14 - libcxx atomic_ref.h: add typename keyword for difference_type declarations, otherwise older clang versions cannot compile this header. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5ace2b9e19cdee9c26b50df22dfc60efd9ca9c76 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5ace2b9e19cdee9c26b50df22dfc60efd9ca9c76 commit 5ace2b9e19cdee9c26b50df22dfc60efd9ca9c76 Author: Dimitry Andric AuthorDate: 2024-08-05 20:07:28 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:08 +0000 libcxx atomic_ref.h: add typename keyword for difference_type declarations, otherwise older clang versions cannot compile this header. PR: 280562 MFC after: 1 month (cherry picked from commit 81e300df5e654eee3835ec2c6a2ae34cf317df72) --- contrib/llvm-project/libcxx/include/__atomic/atomic_ref.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__atomic/atomic_ref.h b/contrib/llvm-project/libcxx/include/__atomic/atomic_ref.h index 156f1961151c..f5ab6ffc9e77 100644 --- a/contrib/llvm-project/libcxx/include/__atomic/atomic_ref.h +++ b/contrib/llvm-project/libcxx/include/__atomic/atomic_ref.h @@ -241,7 +241,7 @@ template struct atomic_ref<_Tp> : public __atomic_ref_base<_Tp> { using __base = __atomic_ref_base<_Tp>; - using difference_type = __base::value_type; + using difference_type = typename __base::value_type; _LIBCPP_HIDE_FROM_ABI explicit atomic_ref(_Tp& __obj) : __base(__obj) { _LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN( @@ -287,7 +287,7 @@ template struct atomic_ref<_Tp> : public __atomic_ref_base<_Tp> { using __base = __atomic_ref_base<_Tp>; - using difference_type = __base::value_type; + using difference_type = typename __base::value_type; _LIBCPP_HIDE_FROM_ABI explicit atomic_ref(_Tp& __obj) : __base(__obj) { _LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN( From nobody Sun Dec 1 11:18:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYR6Tynz5fTHl; Sun, 01 Dec 2024 11:18:35 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYR4K12z42W9; Sun, 1 Dec 2024 11:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0drbIcQ2hhf3lhJrRcSGqeg3x6PNrnyvW9xC4RFuXiA=; b=t+TZGXF0t89pwxtP/TONPjcDnEFQW9yFawBFqCa/fVKBLQVfBsmSV/dPE1ZQDiT6lrwxbD JGgZLkw8JUCL94oEugir2WWps40mJoFXXAwqyfABK33m/oOnJVtmSJiWiafuZvEtuSYhjE 6QmSTyt+H3+CI5WQjV4PA2QOapIzDPBVl7sFImhCFokF7ufX00KJuOjc9coGXXB9dxB5uq FFd28KmlUfKfZ+4iPxmXBoRs12UM6KANGj6E1iOZH80BsD0b0zgnCk3pjj2vOrIkHiNeAl d9N/PglkIPjEQP3xJmJJVGYEq8pH3AtSfLiEn+bara0KAeqLPX8yb3e2CdH2JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0drbIcQ2hhf3lhJrRcSGqeg3x6PNrnyvW9xC4RFuXiA=; b=SXOpHrEp/29qbKdM3TRSx9pZ6r8EZW8REaM/UmudADNha76xDb3iSRKHy6gYD+3vCKyZ2p 1JfK8BQY4ieH86EYjNPL19ytGWMHRMUL+qy5ZSxY6M9S+3x2ARfhtk9+nNEYyCM4FiNLLP TyaQ+IK57+iz9Xb/ZWLJ55fAlz/z4cHdZWG/z85DXKMT4562HZQhx/HFHKnNE4tfGMZT4c v0kZVYUmwrQN31jF7EtyScwEFWDjMzYwsKaGqwBaPTqB3WglkTFJWVUTtBPbme6QGaIT5o ngBkLRP70ZgAg3Xenf7LU3qrIGybdH7wphXuwAU2urX6/aa+ol4XSKeToD6oyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051915; a=rsa-sha256; cv=none; b=UlDsHRWzyj8O3E5D6OqLtOPgdDOGgxZE00zwR1VdpF/ik9MvukksJNHOxDXe+eikjhTH87 jrHcrzLIf/lmvpWuc61/sENYDrfxt533h0LK2dZAiJauC/gg1s26e1CGmWF4QNeDmGXp4Z rXV/7tCDUAFoSCEJFdulS7F1h0S6X/ItKXKKFBx7/TwmyIZxiVu1o/weXD/K0tsdJ7Vt/J r9Cxhud7lMaYcj/SJHG7zAec0wTqqNQfbM3Y+OiJ3nGA+Tl8XS1yChPp/fCDceB7Nr0Len QxFzWSrARh+HicpXOa4UeBiYH9tmVmwjK+RN9pVRhGO1hDDQ6eRlRiw0EbZZ+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYR3jdtzq9y; Sun, 1 Dec 2024 11:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIZWE007949; Sun, 1 Dec 2024 11:18:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIZuU007946; Sun, 1 Dec 2024 11:18:35 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:35 GMT Message-Id: <202412011118.4B1BIZuU007946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 983d17bc1d75 - stable/14 - libcxx cstdlib, cwchar: avoid using long long functions if not supported, even for older compilers that do not support the using_if_exists attribute. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 983d17bc1d753b0653415da20147080d4d03971b Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=983d17bc1d753b0653415da20147080d4d03971b commit 983d17bc1d753b0653415da20147080d4d03971b Author: Dimitry Andric AuthorDate: 2024-08-05 20:08:49 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:08 +0000 libcxx cstdlib, cwchar: avoid using long long functions if not supported, even for older compilers that do not support the using_if_exists attribute. PR: 280562 MFC after: 1 month (cherry picked from commit 6b4981df6008fb59a5b4c1f0b79f0a0b21ac232e) --- contrib/llvm-project/libcxx/include/cstdlib | 12 ++++++++++++ contrib/llvm-project/libcxx/include/cwchar | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/contrib/llvm-project/libcxx/include/cstdlib b/contrib/llvm-project/libcxx/include/cstdlib index c817fd8f4acc..d9e17ee65c56 100644 --- a/contrib/llvm-project/libcxx/include/cstdlib +++ b/contrib/llvm-project/libcxx/include/cstdlib @@ -102,18 +102,26 @@ _LIBCPP_BEGIN_NAMESPACE_STD using ::size_t _LIBCPP_USING_IF_EXISTS; using ::div_t _LIBCPP_USING_IF_EXISTS; using ::ldiv_t _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::lldiv_t _LIBCPP_USING_IF_EXISTS; +#endif using ::atof _LIBCPP_USING_IF_EXISTS; using ::atoi _LIBCPP_USING_IF_EXISTS; using ::atol _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::atoll _LIBCPP_USING_IF_EXISTS; +#endif using ::strtod _LIBCPP_USING_IF_EXISTS; using ::strtof _LIBCPP_USING_IF_EXISTS; using ::strtold _LIBCPP_USING_IF_EXISTS; using ::strtol _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::strtoll _LIBCPP_USING_IF_EXISTS; +#endif using ::strtoul _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::strtoull _LIBCPP_USING_IF_EXISTS; +#endif using ::rand _LIBCPP_USING_IF_EXISTS; using ::srand _LIBCPP_USING_IF_EXISTS; using ::calloc _LIBCPP_USING_IF_EXISTS; @@ -130,10 +138,14 @@ using ::bsearch _LIBCPP_USING_IF_EXISTS; using ::qsort _LIBCPP_USING_IF_EXISTS; using ::abs _LIBCPP_USING_IF_EXISTS; using ::labs _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::llabs _LIBCPP_USING_IF_EXISTS; +#endif using ::div _LIBCPP_USING_IF_EXISTS; using ::ldiv _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::lldiv _LIBCPP_USING_IF_EXISTS; +#endif using ::mblen _LIBCPP_USING_IF_EXISTS; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS using ::mbtowc _LIBCPP_USING_IF_EXISTS; diff --git a/contrib/llvm-project/libcxx/include/cwchar b/contrib/llvm-project/libcxx/include/cwchar index 08cfac58c846..dd16eaeaa07f 100644 --- a/contrib/llvm-project/libcxx/include/cwchar +++ b/contrib/llvm-project/libcxx/include/cwchar @@ -151,9 +151,13 @@ using ::wcstod _LIBCPP_USING_IF_EXISTS; using ::wcstof _LIBCPP_USING_IF_EXISTS; using ::wcstold _LIBCPP_USING_IF_EXISTS; using ::wcstol _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::wcstoll _LIBCPP_USING_IF_EXISTS; +#endif using ::wcstoul _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::wcstoull _LIBCPP_USING_IF_EXISTS; +#endif using ::wcscpy _LIBCPP_USING_IF_EXISTS; using ::wcsncpy _LIBCPP_USING_IF_EXISTS; using ::wcscat _LIBCPP_USING_IF_EXISTS; From nobody Sun Dec 1 11:18:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYT19K7z5fSyN; Sun, 01 Dec 2024 11:18:37 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYS5bTjz42jx; Sun, 1 Dec 2024 11:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tuVTGG+/j+FwOB6a/iHZGK6EyqP0QLbPwvEz+W2V8+k=; b=vkdJMug4bi0syTZ3T9me/3s1KbAWiezEIXrXRxe3uLVO9LO7qtuoymICgipjqCz64q9Nov aE5rG3MYeif+/MkxbLrjS27PKAecMCJM7YfX2rOgTpJ3j+gNgNlnCvaJ/PWJnLTJFuekX0 s9BWuCmUmKXQQiecYQiRVWs33jL0WY/oKq4MASctwUwtPXtMHzXxUHvPICcPZ7WDXSR1Cf bRDPakXA43KdXDeGXY/OB8RZkv3s7jGdIcypy6gBQpcR3WZLQZ+TUSvBpd3IDNvn2EWOrc 8/rqPz93kDDVjzPa2Bf9yqigXtnEM7lJ711GqiJUTqEaym9rZigbsLJIhp5+1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tuVTGG+/j+FwOB6a/iHZGK6EyqP0QLbPwvEz+W2V8+k=; b=kTttWP0joft0VbRIGuyXhZbbosz+vTLOKsOxKQr+vIQFZkYJQ2xoS7ts8hffAP/2Q9ZAbe ASgEJKeT2rv/++oX+1PNZKQLA9Vml5LElD74jM+F4XpHMpvC5q2/x57eG2/yXgIbpprOWV 0PMbXyCm+Vlfi72D6JmavFQ6MHE/Qvac9u1xTre6ni9pd7xTe2CkwB3TFcT1qfoYrOGM6q mXNEwybY6f69REi3xbPyjMzDGNnYQKKT9l+xnMGXkUSM2aRD/t3S2V6tbxTVtOwV5CQvBN CKFqOhFdFnwp0PXcm1zWO5fHLweOGy3Whbudb8KvbNzTbKk9WYP/iT2NUCjCjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051916; a=rsa-sha256; cv=none; b=HrfKFKElu8M/CGsKuvMbqKKtLpSxCVexm8K/bT3Ov3XusLiajxQH4ieHY4hZZ/656o1C21 VbXLvyYvy7+MyMAUYARfNylqvNRC5Fu0jzAQAs9vyxts1o2LQsnbOdqAhSUrL9wQzZMVkh a+G8S3rqzJqMOq10Y64k6sEb1dMKvDNKggAiBbMzGP812LwjedSTz30JvsW25ou29re1TZ g8vwPs3GiGx1ONpJUhwHc7Ut9ZQCEyPZS+SVfMwYk4ldMvixjQsuo1yGhiDGt8hWRrWgUJ +SvOK+rLHrtobIVkHThMjVOfjKqKs5GgECOqXMijdOpykqQQdHM40aFY/DlZ1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYS4gG7zqjm; Sun, 1 Dec 2024 11:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIa7Y007991; Sun, 1 Dec 2024 11:18:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIauJ007988; Sun, 1 Dec 2024 11:18:36 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:36 GMT Message-Id: <202412011118.4B1BIauJ007988@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 70c9d584e490 - stable/14 - libcxx-compat: revert llvmorg-19-init-18063-g561246e90282: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 70c9d584e49000f7138192e8dacbd53db6b23daf Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=70c9d584e49000f7138192e8dacbd53db6b23daf commit 70c9d584e49000f7138192e8dacbd53db6b23daf Author: Dimitry Andric AuthorDate: 2024-08-05 20:13:12 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:08 +0000 libcxx-compat: revert llvmorg-19-init-18063-g561246e90282: [libc++][NFC] Remove wrong #endif comment PR: 280562 MFC after: 1 month (cherry picked from commit 2f6d6eaf2d511b212eab8ed002f3152c96deca3c) --- contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h index 50e9f3e8aa78..2c4e9e419a1b 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h @@ -28,7 +28,7 @@ using __remove_cv_t = typename remove_cv<_Tp>::type; #else template using __remove_cv_t = __remove_cv(_Tp); -#endif +#endif // __has_builtin(__remove_cv) #if _LIBCPP_STD_VER >= 14 template From nobody Sun Dec 1 11:18:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYV1ZFQz5fTKd; Sun, 01 Dec 2024 11:18:38 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYV0N8dz42QZ; Sun, 1 Dec 2024 11:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rifYFBeerGCuVKaxoTSP7b+YfUlNj54GhlKDNhe83aA=; b=P9MTTd0sYV9YbgqLMRI6SyRd3uEG96YddaedvuXQFT6MX8U6gvOPfTEAnBtJvHh3qJ1aB0 mbLRoJwnn7wwdUlTg8tqokUkv44K6FS9t2q7jC0gwjibFHo44TmoiPqgMDEY4ORjA5JmbJ 9UDNzOryeOn8Gkf0e075SBrs1b7iM90G8K/S2MsU81LYZ+fJ3uXe2j5GmFQAEfCbq3Dvi+ 6jUwlwYxgAjkMHiXFOwDJIUm+A1Dlu4j+BQUGOFtCTj6PWgoEsn+8l2HThHtGwYgYNdkaD 50Qo+QJpVfRGGPeSboyCtNX2a0NzJQWZxwazh1lhvyWhlVG9/BTRI+SxqTHuag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rifYFBeerGCuVKaxoTSP7b+YfUlNj54GhlKDNhe83aA=; b=hAJOIwCt405pAh7THiDW80o4svjtLtA+D2ZI7KhHTXqyVK7TEARQGjEg+qXIrltXWEil1M BRNFAOYdUCYGxN1PIh4/4YyavKj+/2SHkumJr+v0S8WypIO4LHkjfZ/bkjBWoQWlU1rBur qc81Qj7VEJ5N81u5L9VtAkBMrtln3u59oONHhVT7QQspWBZ3rp71R5RCEzV5a5jXYHUnuK PKKlkFodVDMECpywAs9ehamgwcfgkR8eSuWAGeg0lF+9g0NBiSkNdtzIkO8NOXISm1YC/M us3yEPw0XHWNlXss+NfRDoE3XkcMa0wtSV+QAIxJCfcH+G+NzjCqO+1LfFI7SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051918; a=rsa-sha256; cv=none; b=w1s5afrEiLyJxt1XjOYImCI3vatBAjeGGzf021sRJFxWwaNagNWPQM90m6MSErNTfu1rQn 10FYYcriKR6KWNqEgGSpqMRMeFwSAgLctWpKllbJYUnWIBD1YfLgowF8xFbnNrQnZD83s+ jLtMjApjFrAIWOs1aEmabRS91r3HNAMj+vmtoYiS3xOzTn6WCZFT9c9AgIyfHdB+aAO/nl i+q3RY8quVBUAC3yNaYnAOoEfQajly1q6/FLbKHyWKoWT86Nr9LgFxe1BAiWFv8Ms5zVW0 30FFA/OYELR7mBuop2tpiYNDYQr7uDeulRf8u6mTPqS/Uvuy3vov2Scfdv/ZbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYT5h5Zzqnf; Sun, 1 Dec 2024 11:18:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIbRu008032; Sun, 1 Dec 2024 11:18:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIbPi008029; Sun, 1 Dec 2024 11:18:37 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:37 GMT Message-Id: <202412011118.4B1BIbPi008029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: df90f45043a8 - stable/14 - libcxx-compat: revert llvmorg-19-init-18062-g4dfa75c663e5: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: df90f45043a802ebccb9de62acfaec45db934813 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=df90f45043a802ebccb9de62acfaec45db934813 commit df90f45043a802ebccb9de62acfaec45db934813 Author: Dimitry Andric AuthorDate: 2024-08-05 20:16:04 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:09 +0000 libcxx-compat: revert llvmorg-19-init-18062-g4dfa75c663e5: [libc++] Merge is_scoped_enum.h into is_enum.h (#99458) PR: 280562 MFC after: 1 month (cherry picked from commit 04f5b79cfa4972b371e7751dee5bbfaa91f2f2fc) --- .../libcxx/include/__type_traits/is_enum.h | 10 ------- .../libcxx/include/__type_traits/is_scoped_enum.h | 33 ++++++++++++++++++++++ .../llvm-project/libcxx/include/module.modulemap | 1 + contrib/llvm-project/libcxx/include/type_traits | 4 +++ 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_enum.h b/contrib/llvm-project/libcxx/include/__type_traits/is_enum.h index 2fab6db2c8d5..77ca3ea10874 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_enum.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_enum.h @@ -26,16 +26,6 @@ template inline constexpr bool is_enum_v = __is_enum(_Tp); #endif -#if _LIBCPP_STD_VER >= 23 - -template -struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {}; - -template -inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp); - -#endif // _LIBCPP_STD_VER >= 23 - _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_ENUM_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h b/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h new file mode 100644 index 000000000000..cb3e25cf5733 --- /dev/null +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H +#define _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H + +#include <__config> +#include <__type_traits/integral_constant.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +#if _LIBCPP_STD_VER >= 23 + +template +struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {}; + +template +inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp); + +#endif // _LIBCPP_STD_VER >= 23 + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H diff --git a/contrib/llvm-project/libcxx/include/module.modulemap b/contrib/llvm-project/libcxx/include/module.modulemap index 13d0dce34d97..d76659664f75 100644 --- a/contrib/llvm-project/libcxx/include/module.modulemap +++ b/contrib/llvm-project/libcxx/include/module.modulemap @@ -2013,6 +2013,7 @@ module std_private_type_traits_is_scalar [system header "__type_traits/is_scalar.h" export std_private_type_traits_is_null_pointer } +module std_private_type_traits_is_scoped_enum [system] { header "__type_traits/is_scoped_enum.h" } module std_private_type_traits_is_signed [system] { header "__type_traits/is_signed.h" } module std_private_type_traits_is_signed_integer [system] { header "__type_traits/is_signed_integer.h" } module std_private_type_traits_is_specialization [system] { header "__type_traits/is_specialization.h" } diff --git a/contrib/llvm-project/libcxx/include/type_traits b/contrib/llvm-project/libcxx/include/type_traits index 7f231cd09df5..ffa137338b6a 100644 --- a/contrib/llvm-project/libcxx/include/type_traits +++ b/contrib/llvm-project/libcxx/include/type_traits @@ -514,6 +514,10 @@ namespace std # include <__type_traits/unwrap_ref.h> #endif +#if _LIBCPP_STD_VER >= 23 +# include <__type_traits/is_scoped_enum.h> +#endif + #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) From nobody Sun Dec 1 11:18:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYX0zvFz5fTCZ; Sun, 01 Dec 2024 11:18:40 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYW350Fz42jZ; Sun, 1 Dec 2024 11:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SrPWr1UBVSLwjWeAjsaHKLO6n/W89+lyKcyIfUrW/1M=; b=d8nBgvSt5lppEMO1rJ8BCG6ICERJkSgB6wIjbI/s3Y7/bOOG2OK3Wh8qmyGYjKIWO3t6gO rJpxYQ729+CTT4SPjqBubeCtkUVzLe9GtKPzwBb6YR0phyM0E8t1sV38Fz8YBmb3q4DQF0 XYp07P7AbZDoXTffdjgsrtqmckX3p1RTuOiklKa3k6+1ugFsVQX6HlijyxBXflEJJM5UQd NDd2koV1CdWJ2oMkaNXFFAxbkr5Niozc1QoL6mASEsBvH5aQkYPUEF61PISDN606rDDpzn 4kcnX+XbzBGHJpi/Ml9DYarvpNLpxmy0EcWQF3bMEkztamf2A+7oemj7pFVyJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SrPWr1UBVSLwjWeAjsaHKLO6n/W89+lyKcyIfUrW/1M=; b=K2tYZttBhraMHbAMGOim95FB9DObwxz5iQUbkhQUk7u2XtYLMhJXJyFALRda+1raZeqdui Y+vxMhpEWSKx6TI5Iw8oIQGqgbccL3JdhPDInrB9S+Dh2qe8EGFZCMg5yfc8sI7G8osHwM bZJCmTVrLBK9d1MgkbvfXMvj+P7mSmbElY/k6zkCzv6lWi9hxrZXIVEGdmC2WCci21zN5g tzvWX51a41E3iFicvIkiUwVVpPL2qE2UIa0GhWN0w5p3IK33BacEh35Ev2UTrUScggYLqU xR4YEoaK+sfIKTouRrYbg8nMaK4hwRS+qS5u/LO7EEwiMFE/3Gi3mV7WRKpxUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051919; a=rsa-sha256; cv=none; b=r/MS82nrg23khj9JtZwRX7SzpRahmIJma2bKE5YXCRceJYObenNq6Y4yDbH4rrlBWvQ1I8 vg16iZbyCkObZk6V5k4tF1G4CKy6FPcKa2oDHtjYZ3Eayoc2OqlVbB4JBoluhGtBs/93fR 8+7ogQucFTtCziARxZTHGxK9PXYxLCDqyQqv3hOVBjmSUwfWKilCwedDmtfCFGqNOGlx7H JZFAq1OEnop0WAjHiOLUVcheT6edkIcx+ggZCySZAjAUIlvvAWzy8U5lvmudy/WdlXa9Qg Qy2UvEcZwC7CAr3X/YolSnqTLZsmIs2kVbjiCOOZMenFd6YbhupKLPwSsme6Pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYV6mP3zqjn; Sun, 1 Dec 2024 11:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIcw2008072; Sun, 1 Dec 2024 11:18:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIcat008069; Sun, 1 Dec 2024 11:18:38 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:38 GMT Message-Id: <202412011118.4B1BIcat008069@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: fc4f83b1d007 - stable/14 - libcxx-compat: revert llvmorg-19-init-17853-g578c6191eff7: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fc4f83b1d0072a36c469684e9738a99735075c92 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=fc4f83b1d0072a36c469684e9738a99735075c92 commit fc4f83b1d0072a36c469684e9738a99735075c92 Author: Dimitry Andric AuthorDate: 2024-08-05 20:17:17 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:09 +0000 libcxx-compat: revert llvmorg-19-init-17853-g578c6191eff7: [libc++] Simplify std::is_void (#99033) PR: 280562 MFC after: 1 month (cherry picked from commit e8054e44f4caf9c3968dcbf2d16bba37e987237b) --- .../libcxx/include/__type_traits/is_void.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_void.h b/contrib/llvm-project/libcxx/include/__type_traits/is_void.h index 46316b0d3a53..4c27060530c8 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_void.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_void.h @@ -11,6 +11,8 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_same.h> +#include <__type_traits/remove_cv.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -18,14 +20,28 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_void) + template -struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_same(__remove_cv(_Tp), void)> {}; +struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_void(_Tp)> {}; # if _LIBCPP_STD_VER >= 17 template -inline constexpr bool is_void_v = __is_same(__remove_cv(_Tp), void); +inline constexpr bool is_void_v = __is_void(_Tp); # endif +#else + +template +struct _LIBCPP_TEMPLATE_VIS is_void : public is_same<__remove_cv_t<_Tp>, void> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_void_v = is_void<_Tp>::value; +# endif + +#endif // __has_builtin(__is_void) + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_VOID_H From nobody Sun Dec 1 11:18:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYX32dgz5fT69; Sun, 01 Dec 2024 11:18:40 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYX1LhTz42kP; Sun, 1 Dec 2024 11:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NCZhBbw38+bTJs+ulqkTLe0+TejpPTl0Nqg1tN4gr+4=; b=qGdyYWW/eZYj95aU2oOmjj5ctHNmEKN41g2/hJFZ84aMmTe4/soVSoB4yWlbN59ngipBwp FVjNN9rzbrJj14swA8NLgAexp9TiOq3ZeIMN8f3+ezjgiY2Os9qLsogkn7IVlVBfuTAC0h zFnBq+NcKQ4uI2aKj7/iTndCI/ml3iDflnl6Ae9cg+K7U7N4+WBoUTGuXdSgFwhfhze6LS TU5TnjyW8EIgQGmYavIEjOhvBBIUNodhqrnJlwwxQPM+1h1oSjqi+eI+4A5SVrre1PahNA i7JfX05BNa5Ppj8Rnpa8GvPhBxbr/ixVsFqfchczc8XONF7YZCyd/ZYSpc/j3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NCZhBbw38+bTJs+ulqkTLe0+TejpPTl0Nqg1tN4gr+4=; b=mQQFZV0O+iW8VCx5COf2mx1pfCRNWzKslOCur2FvC8zAsb3pNXn87no3VeHzb0CuJFdx7i puyqn8eNDtNcCZBHUwtbBDx4Mq4KJf+7UPIm+S1kn2A0xWB9tVL9rl3xWO0BOdB3siYTtc p17k0+LJecPNeDzI4NHu8ZscqkgJdU56JWi25TNk+DbCptXuCyr4UUbS7QAuV486EeO4fq kyIX3o6Q+reyYAucAyHG61q9U2Hf5JVq3Q8YB3NgVHmnWlaIzKv0AXMrqsqKJVj4RnXCUv 3/uB+ZPXSJiPWiwQW0UnWgwesjWI1vfw9yY3NWmWDhqKfGVHcyrtRIN1sVOIdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051920; a=rsa-sha256; cv=none; b=R0LAkJcIYJWETHd6Dhzn8w9+JYUjUw2iVPZMhIoCn6oAF63+ZzPsLkkHudbGjAxOwM85o0 5YznoCfgW51+lSnlPeiaQbFh27emdp135FDKOanh5D9QX4ayDUILPnmdjX3+FWgt09fEmN oGZfERuEmWAtut+NAMlBtuChcJno1e+Y6AAmU8WI4x2zAQ8VDcnBEKV73Bi2w8AcsmiSsG lqhm3UO5hNy06jSJdgi8ZE9iBy+YmXy/uQMOB/RPesO8uq8oSn6xxtBT3FM5wpLpO0fHFJ MoXS5ADPFYaFYHr1asIJ/0Lt5ZTl3u4kyNm0KxyTzG4Mai9gFpeGLsTpiNaFyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYX0RKtzr0P; Sun, 1 Dec 2024 11:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIeLY008109; Sun, 1 Dec 2024 11:18:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIdsi008106; Sun, 1 Dec 2024 11:18:39 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:39 GMT Message-Id: <202412011118.4B1BIdsi008106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 26b3990480bd - stable/14 - libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 26b3990480bdc602af856abdde139713a0ee1873 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=26b3990480bdc602af856abdde139713a0ee1873 commit 26b3990480bdc602af856abdde139713a0ee1873 Author: Dimitry Andric AuthorDate: 2024-08-05 20:17:59 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:09 +0000 libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d: [libc++] Simplify the implementation of is_null_pointer a bit (#98728) PR: 280562 MFC after: 1 month (cherry picked from commit 0bec0529b1d704f391ec499c39744f521e646a6d) --- .../libcxx/include/__type_traits/is_fundamental.h | 2 +- .../libcxx/include/__type_traits/is_null_pointer.h | 12 +++++++++--- .../llvm-project/libcxx/include/__type_traits/is_scalar.h | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h b/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h index 55f8e41f75f4..57206e0d9deb 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h @@ -34,7 +34,7 @@ inline constexpr bool is_fundamental_v = __is_fundamental(_Tp); template struct _LIBCPP_TEMPLATE_VIS is_fundamental - : public integral_constant::value || __is_null_pointer_v<_Tp> || is_arithmetic<_Tp>::value> {}; + : public integral_constant::value || __is_nullptr_t<_Tp>::value || is_arithmetic<_Tp>::value> {}; # if _LIBCPP_STD_VER >= 17 template diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h index 9f5697e23268..c666f5f24759 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h @@ -11,6 +11,7 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/remove_cv.h> #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -20,15 +21,20 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -inline const bool __is_null_pointer_v = __is_same(__remove_cv(_Tp), nullptr_t); +struct __is_nullptr_t_impl : public false_type {}; +template <> +struct __is_nullptr_t_impl : public true_type {}; + +template +struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; #if _LIBCPP_STD_VER >= 14 template -struct _LIBCPP_TEMPLATE_VIS is_null_pointer : integral_constant> {}; +struct _LIBCPP_TEMPLATE_VIS is_null_pointer : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; # if _LIBCPP_STD_VER >= 17 template -inline constexpr bool is_null_pointer_v = __is_null_pointer_v<_Tp>; +inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; # endif #endif // _LIBCPP_STD_VER >= 14 diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h b/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h index 455200de4720..15f1c71554f2 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h @@ -49,7 +49,7 @@ struct _LIBCPP_TEMPLATE_VIS is_scalar bool, is_arithmetic<_Tp>::value || is_member_pointer<_Tp>::value || is_pointer<_Tp>::value || - __is_null_pointer_v<_Tp> || + __is_nullptr_t<_Tp>::value || __is_block<_Tp>::value || is_enum<_Tp>::value> {}; // clang-format on From nobody Sun Dec 1 11:18:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYY6nHmz5fT6B; Sun, 01 Dec 2024 11:18:41 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYY2RfXz42kg; Sun, 1 Dec 2024 11:18:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x7YeORxQkRqOdZc5u4HVfMrSvPO538uKJXHePeODmZc=; b=WJVk+MoIvmlZ9XkSmLE0Auw34NPTJyU163jhZtYcXUeWaFn0mRbNxMpGae5t0Urk3Ioj6z hwCjYcL4jS2N0gcmIdELAjLbrFwipZUTl8t43POctACrMCyhrnFAdQ43MhPoAeGeZU12cc ZNK+tHTxqFXrlBAilBI6cPkzyTp/jdrdPCwacBPOQeM4w2X/QrnpUSifzechSdCH+T89Vu BRm3nhbKjGFI+23Ea4T7dUTagggD57WCfdpaL2fxD2ABsZRj8pF/TGrgdN/APdBtbO44H7 Xs4+xj32sCRiqHTcIgOxCRp8TDtB0D/DqDRhyJzzTJf1WQubwrmdzFGLL484xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x7YeORxQkRqOdZc5u4HVfMrSvPO538uKJXHePeODmZc=; b=akReji3SDdRtx4dcUB6H4EUUfdOhf7FMj5nBc1TqkFCtnKblwhMzFPFhVkcGNjkRCC/HyD 5n8ai/NwbYKPJSf+GZbGl7UUAKA9ORI2/d8iShVpHlzXQteQr3HSGjbgIFKXJk7bgAGrES jqZxK/+sSFewiDKbCl//mbnrsdsJAgLRqkLuGnGfbghsPbCeszkXxHBxACSqsOOSaWEScr 0S3BFj8ef7bawk9067x+nxHI1s/Q4y0/x8v7pc5TjXRd6WH/BEdO7dj79Ng9225MvNN0To PSvul559QcOT9TeX7yfZNIYQcDtcisrHstB7oXA2zYm5a1C2/nK/M0jjHfgSgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051921; a=rsa-sha256; cv=none; b=HRjFT9606nNJ8z/v8Fvl0ilIf1I1fL0H3d5TCxfn1hSGDhTRs01s4oqGH3+zVWL6eI8aoa LDfI0HL3/asyNmDlVEHA4j0MaYzBO1P8v8dmsBflTZrZlLMqY3xmAmmvDSoEIPFIUVIyqV QeKQXqIkUfK08bNuGTWqz9gNNbeBeTY7SBCFuUDIfoES+BTcpJ4xSGoRAhbTP5E3l2JwwL UpHA8A++/LQEZL8/mArHL8i0yThHACgyPISYUFmyRdDvnnUO+7Ar0t6v9RtS0aBPFsIin/ lHVueTCyPhUbtFhypf3XaGo4/24R3uwGqbMy4SuWr0k9rEIFtM6OA2AfU4e3zg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYY1LfQzr0Q; Sun, 1 Dec 2024 11:18:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIfmW008145; Sun, 1 Dec 2024 11:18:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIfBU008142; Sun, 1 Dec 2024 11:18:41 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:41 GMT Message-Id: <202412011118.4B1BIfBU008142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 16af0e750645 - stable/14 - libcxx-compat: revert llvmorg-19-init-17727-g0eebb48fcfbc: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 16af0e750645455db46d24a1ac77087230f6b708 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=16af0e750645455db46d24a1ac77087230f6b708 commit 16af0e750645455db46d24a1ac77087230f6b708 Author: Dimitry Andric AuthorDate: 2024-08-05 20:25:18 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:10 +0000 libcxx-compat: revert llvmorg-19-init-17727-g0eebb48fcfbc: [libc++] Merge is_member{,_object,_function}_pointer.h (#98727) The implementations for these traits have been simplified quite a bit, since we have builtins available for them now. PR: 280562 MFC after: 1 month (cherry picked from commit e8847079df1b7998ce84fd87c845d9eeef0567fb) --- .../libcxx/include/__type_traits/invoke.h | 3 ++- .../__type_traits/is_member_function_pointer.h | 31 ++++++++++++++++++++++ .../__type_traits/is_member_object_pointer.h | 31 ++++++++++++++++++++++ .../include/__type_traits/is_member_pointer.h | 12 --------- .../llvm-project/libcxx/include/module.modulemap | 2 ++ contrib/llvm-project/libcxx/include/type_traits | 2 ++ 6 files changed, 68 insertions(+), 13 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/invoke.h b/contrib/llvm-project/libcxx/include/__type_traits/invoke.h index 71db32ae6a3c..a0281f5b2006 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/invoke.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/invoke.h @@ -17,7 +17,8 @@ #include <__type_traits/integral_constant.h> #include <__type_traits/is_base_of.h> #include <__type_traits/is_core_convertible.h> -#include <__type_traits/is_member_pointer.h> +#include <__type_traits/is_member_function_pointer.h> +#include <__type_traits/is_member_object_pointer.h> #include <__type_traits/is_reference_wrapper.h> #include <__type_traits/is_same.h> #include <__type_traits/is_void.h> diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h new file mode 100644 index 000000000000..037d5ca04ab0 --- /dev/null +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H +#define _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H + +#include <__config> +#include <__type_traits/integral_constant.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template +struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer : _BoolConstant<__is_member_function_pointer(_Tp)> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp); +# endif + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h new file mode 100644 index 000000000000..555794bfe038 --- /dev/null +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_H +#define _LIBCPP___TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_H + +#include <__config> +#include <__type_traits/integral_constant.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template +struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer : _BoolConstant<__is_member_object_pointer(_Tp)> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp); +# endif + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h index cc125e318cf9..149634fde758 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h @@ -21,21 +21,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD template struct _LIBCPP_TEMPLATE_VIS is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> {}; -template -struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer : _BoolConstant<__is_member_object_pointer(_Tp)> {}; - -template -struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer : _BoolConstant<__is_member_function_pointer(_Tp)> {}; - # if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp); - -template -inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp); - -template -inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp); # endif _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/module.modulemap b/contrib/llvm-project/libcxx/include/module.modulemap index d76659664f75..8e0ba6eebac4 100644 --- a/contrib/llvm-project/libcxx/include/module.modulemap +++ b/contrib/llvm-project/libcxx/include/module.modulemap @@ -1976,6 +1976,8 @@ module std_private_type_traits_is_implicitly_default_constructible [system } module std_private_type_traits_is_integral [system] { header "__type_traits/is_integral.h" } module std_private_type_traits_is_literal_type [system] { header "__type_traits/is_literal_type.h" } +module std_private_type_traits_is_member_function_pointer [system] { header "__type_traits/is_member_function_pointer.h" } +module std_private_type_traits_is_member_object_pointer [system] { header "__type_traits/is_member_object_pointer.h" } module std_private_type_traits_is_member_pointer [system] { header "__type_traits/is_member_pointer.h" } module std_private_type_traits_is_nothrow_assignable [system] { header "__type_traits/is_nothrow_assignable.h" } module std_private_type_traits_is_nothrow_constructible [system] { diff --git a/contrib/llvm-project/libcxx/include/type_traits b/contrib/llvm-project/libcxx/include/type_traits index ffa137338b6a..08badb6aa06e 100644 --- a/contrib/llvm-project/libcxx/include/type_traits +++ b/contrib/llvm-project/libcxx/include/type_traits @@ -453,6 +453,8 @@ namespace std #include <__type_traits/is_fundamental.h> #include <__type_traits/is_integral.h> #include <__type_traits/is_literal_type.h> +#include <__type_traits/is_member_function_pointer.h> +#include <__type_traits/is_member_object_pointer.h> #include <__type_traits/is_member_pointer.h> #include <__type_traits/is_nothrow_assignable.h> #include <__type_traits/is_nothrow_constructible.h> From nobody Sun Dec 1 11:18:42 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYZ5NXGz5fTGQ; Sun, 01 Dec 2024 11:18:42 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYZ3YpLz42n3; Sun, 1 Dec 2024 11:18:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YqGcKroCSjnv/G4tMWN1/3e4tGOtrugYpSGuFJakUzA=; b=UtOtw5/RYlGTDhcvGiZU3IHhvmdSfhxqWs4iHviqkJd9R1/umkuxeQfza8+XL13YB8yJU2 eegk5O67lgBIlkuchf6Fu81Qv3HJANtWfobKeY5geDiFqlgi4tdrYXGFOhdvpQzcwEe+31 uYMdTyNV96w+KH+RnX+rK9T5AO8deX1vVNKc6A9TzVCugJJYj0dyrkcBS4z5bht3SYwVgD BXJl9M8+xioGisf21fs/bMqz0B2los8uzEb27QZ+/c/ZlC7i90AopGMgxoP0uJ4jgIWA1Q f8wwSR1jDtsvfpKGlGd9w5A6WawCmzmv+CNitPCNmZE2Fqypu3tDqiBdXl+PCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YqGcKroCSjnv/G4tMWN1/3e4tGOtrugYpSGuFJakUzA=; b=OYWzeXO3BAdX3rATzIKmQhof1OdLWez9Ar3rNTNrBOWd52W3OenIQxN5tZJiy8Bfm73nDC nU66j2bPS8iiU3OfLtWkYGU78CyfeOtgh/Nnv4jDnvvs7v0P03zqHhu52sGrtdfuUtyYp1 1t8Uwl82iinkrmw1RYp4wNCgNxv1NI2s0ZhV+gbEb2ug9dQ3QoIgI/beqtAMuxS1vEpaiO RvGEl917z0VgJ2dipR7E5tYTddFX7XnhTJw5SAqnU12UE0lFQktQAs7GOeZeZnuGFnW6Pf 0e0AAArrLKed5C3U0pfqFrLhB1gyD8fEFwpG/tjeDWa8//xs9pGJqkdDBzFLNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051922; a=rsa-sha256; cv=none; b=scT4eGRCMilEzi/dW5moJxvb8GM20jCW3+WT9eKM66+M7bhYoauKpRomrNmTDgaLtqZ70g eoucKt9mIPwlzOP3NyFVuGrmzwoax8BrI/l+QZvhvE2nR/DB5SqCyez9gJkDS2vw/JppOX kEZAOjLl4PrVebwmH6m4oBDsyFz5GxsnysL94pDCut9FFZQwzUMk3oBey3a3tlo3JRBa4i WbmvTmuoDup3p5OB09yPij+qHQzPgoSoTos9j5TKrbQ+dgyhE73hqyx5ov1AxMkjcJoxHB 5w57ljOQnImzNgMRihmU2OODuIDIIAtNnTlCxoFLg5I0thPZNOUD1iOT24prmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYZ1zc2zqWP; Sun, 1 Dec 2024 11:18:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIgVO008185; Sun, 1 Dec 2024 11:18:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIgg7008182; Sun, 1 Dec 2024 11:18:42 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:42 GMT Message-Id: <202412011118.4B1BIgg7008182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: d9a713d3aed2 - stable/14 - libcxx-compat: revert llvmorg-19-init-17473-g69fecaa1a455: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d9a713d3aed2fe83774de3b82a4cb88f8ca72ec9 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d9a713d3aed2fe83774de3b82a4cb88f8ca72ec9 commit d9a713d3aed2fe83774de3b82a4cb88f8ca72ec9 Author: Dimitry Andric AuthorDate: 2024-08-05 20:26:02 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:10 +0000 libcxx-compat: revert llvmorg-19-init-17473-g69fecaa1a455: [libc++] Clean up some now dead code with the upgrade to GCC 14 (#97746) PR: 280562 MFC after: 1 month (cherry picked from commit 2f2ebe758bea201830bd021525424813f7fc6c6b) --- contrib/llvm-project/libcxx/include/__config | 58 ++++++++++++++------ .../libcxx/include/__tuple/tuple_element.h | 26 +++++++++ .../libcxx/include/__type_traits/is_function.h | 14 ++++- .../__type_traits/is_member_function_pointer.h | 31 +++++++++++ .../__type_traits/is_member_object_pointer.h | 15 ++++++ .../include/__type_traits/is_member_pointer.h | 16 ++++++ .../__type_traits/is_nothrow_constructible.h | 61 ++++++++++++++++++++++ .../libcxx/include/__type_traits/is_object.h | 25 ++++++++- .../libcxx/include/__type_traits/is_reference.h | 29 ++++++---- .../libcxx/include/__type_traits/is_scoped_enum.h | 22 ++++++++ 10 files changed, 266 insertions(+), 31 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 2010e45ba13c..f44f18d52099 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -162,6 +162,16 @@ _LIBCPP_HARDENING_MODE_DEBUG # define _LIBCPP_CXX03_LANG # endif +// TODO: Remove once we switch to GCC 14 +# ifndef __has_extension +# define __has_extension(__x) 0 +# endif + +// TODO: Remove once we switch to GCC 14 +# ifndef __has_feature +# define __has_feature(__x) 0 +# endif + # ifndef __has_constexpr_builtin # define __has_constexpr_builtin(x) 0 # endif @@ -338,30 +348,44 @@ typedef __char32_t char32_t; # define _LIBCPP_PREFERRED_ALIGNOF(_Tp) __alignof(_Tp) +# if defined(_LIBCPP_COMPILER_CLANG_BASED) + // Objective-C++ features (opt-in) -# if __has_feature(objc_arc) -# define _LIBCPP_HAS_OBJC_ARC -# endif +# if __has_feature(objc_arc) +# define _LIBCPP_HAS_OBJC_ARC +# endif -# if __has_feature(objc_arc_weak) -# define _LIBCPP_HAS_OBJC_ARC_WEAK -# endif +# if __has_feature(objc_arc_weak) +# define _LIBCPP_HAS_OBJC_ARC_WEAK +# endif -# if __has_extension(blocks) -# define _LIBCPP_HAS_EXTENSION_BLOCKS -# endif +# if __has_extension(blocks) +# define _LIBCPP_HAS_EXTENSION_BLOCKS +# endif -# if defined(_LIBCPP_HAS_EXTENSION_BLOCKS) && defined(__APPLE__) -# define _LIBCPP_HAS_BLOCKS_RUNTIME -# endif +# if defined(_LIBCPP_HAS_EXTENSION_BLOCKS) && defined(__APPLE__) +# define _LIBCPP_HAS_BLOCKS_RUNTIME +# endif -# if !__has_feature(address_sanitizer) -# define _LIBCPP_HAS_NO_ASAN -# endif +# if !__has_feature(address_sanitizer) +# define _LIBCPP_HAS_NO_ASAN +# endif + +# define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__)) + +# define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__ + +# elif defined(_LIBCPP_COMPILER_GCC) + +# if !defined(__SANITIZE_ADDRESS__) +# define _LIBCPP_HAS_NO_ASAN +# endif + +# define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__)) -# define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__)) +# define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__ -# define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__ +# endif // _LIBCPP_COMPILER_[CLANG|GCC] # if defined(_LIBCPP_OBJECT_FORMAT_COFF) diff --git a/contrib/llvm-project/libcxx/include/__tuple/tuple_element.h b/contrib/llvm-project/libcxx/include/__tuple/tuple_element.h index 9127c47dc8f1..55b3b47619f6 100644 --- a/contrib/llvm-project/libcxx/include/__tuple/tuple_element.h +++ b/contrib/llvm-project/libcxx/include/__tuple/tuple_element.h @@ -40,6 +40,32 @@ struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp> { #ifndef _LIBCPP_CXX03_LANG +# if !__has_builtin(__type_pack_element) + +namespace __indexer_detail { + +template +struct __indexed { + using type _LIBCPP_NODEBUG = _Tp; +}; + +template +struct __indexer; + +template +struct __indexer<__tuple_types<_Types...>, __tuple_indices<_Idx...>> : __indexed<_Idx, _Types>... {}; + +template +__indexed<_Idx, _Tp> __at_index(__indexed<_Idx, _Tp> const&); + +} // namespace __indexer_detail + +template +using __type_pack_element _LIBCPP_NODEBUG = typename decltype(__indexer_detail::__at_index<_Idx>( + __indexer_detail::__indexer< __tuple_types<_Types...>, + typename __make_tuple_indices::type >{}))::type; +# endif + template struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...> > { static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range"); diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_function.h b/contrib/llvm-project/libcxx/include/__type_traits/is_function.h index 98fedd0ad96d..f09f19adf4aa 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_function.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_function.h @@ -11,6 +11,8 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_const.h> +#include <__type_traits/is_reference.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -18,12 +20,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_function) + template struct _LIBCPP_TEMPLATE_VIS is_function : integral_constant {}; +#else + +template +struct _LIBCPP_TEMPLATE_VIS is_function + : public integral_constant::value || is_const::value)> {}; + +#endif // __has_builtin(__is_function) + #if _LIBCPP_STD_VER >= 17 template -inline constexpr bool is_function_v = __is_function(_Tp); +inline constexpr bool is_function_v = is_function<_Tp>::value; #endif _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h index 037d5ca04ab0..11c8a00c9975 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h @@ -11,6 +11,9 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_function.h> +#include <__type_traits/remove_cv.h> +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -18,6 +21,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD +template +struct __libcpp_is_member_pointer { + enum { __is_member = false, __is_func = false, __is_obj = false }; +}; +template +struct __libcpp_is_member_pointer<_Tp _Up::*> { + enum { + __is_member = true, + __is_func = is_function<_Tp>::value, + __is_obj = !__is_func, + }; +}; + +#if __has_builtin(__is_member_function_pointer) + template struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer : _BoolConstant<__is_member_function_pointer(_Tp)> {}; @@ -26,6 +44,19 @@ template inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp); # endif +#else // __has_builtin(__is_member_function_pointer) + +template +struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer + : public _BoolConstant<__libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_func> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; +# endif + +#endif // __has_builtin(__is_member_function_pointer) + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h index 555794bfe038..9141f9da530f 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h @@ -18,6 +18,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_member_object_pointer) + template struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer : _BoolConstant<__is_member_object_pointer(_Tp)> {}; @@ -26,6 +28,19 @@ template inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp); # endif +#else // __has_builtin(__is_member_object_pointer) + +template +struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer + : public _BoolConstant<__libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_obj> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; +# endif + +#endif // __has_builtin(__is_member_object_pointer) + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h index 149634fde758..4ca01d1c2fc8 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h @@ -11,6 +11,7 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_member_function_pointer.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -18,6 +19,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_member_pointer) + template struct _LIBCPP_TEMPLATE_VIS is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> {}; @@ -26,6 +29,19 @@ template inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp); # endif +#else // __has_builtin(__is_member_pointer) + +template +struct _LIBCPP_TEMPLATE_VIS is_member_pointer + : public _BoolConstant<__libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_member> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; +# endif + +#endif // __has_builtin(__is_member_pointer) + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_nothrow_constructible.h b/contrib/llvm-project/libcxx/include/__type_traits/is_nothrow_constructible.h index 58d2b2475140..2f7ed8487e76 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_nothrow_constructible.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_nothrow_constructible.h @@ -13,6 +13,10 @@ #include <__type_traits/add_lvalue_reference.h> #include <__type_traits/add_rvalue_reference.h> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_constructible.h> +#include <__type_traits/is_reference.h> +#include <__utility/declval.h> +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -20,28 +24,85 @@ _LIBCPP_BEGIN_NAMESPACE_STD +// GCC is disabled due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 +#if __has_builtin(__is_nothrow_constructible) && !defined(_LIBCPP_COMPILER_GCC) + template < class _Tp, class... _Args> struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible : public integral_constant {}; +#else + +template +struct __libcpp_is_nothrow_constructible; + +template +struct __libcpp_is_nothrow_constructible + : public integral_constant()...))> {}; + +template +void __implicit_conversion_to(_Tp) noexcept {} + +template +struct __libcpp_is_nothrow_constructible + : public integral_constant(std::declval<_Arg>()))> {}; + +template +struct __libcpp_is_nothrow_constructible : public false_type { +}; + +template +struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible + : __libcpp_is_nothrow_constructible::value, + is_reference<_Tp>::value, + _Tp, + _Args...> {}; + +template +struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp[_Ns]> + : __libcpp_is_nothrow_constructible::value, is_reference<_Tp>::value, _Tp> {}; + +#endif // __has_builtin(__is_nothrow_constructible) #if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value; #endif +// TODO: remove this implementation once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 is fixed +#ifdef _LIBCPP_COMPILER_GCC + +template +struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible + : public is_nothrow_constructible<_Tp, __add_lvalue_reference_t > {}; + +#else // _LIBCPP_COMPILER_GCC + template struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible : public integral_constant< bool, __is_nothrow_constructible(_Tp, __add_lvalue_reference_t)> {}; +#endif // _LIBCPP_COMPILER_GCC + #if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value; #endif +// TODO: remove this implementation once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 is fixed +#ifndef _LIBCPP_COMPILER_GCC + template struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible : public integral_constant)> {}; +#else // _LIBCPP_COMPILER_GCC + +template +struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible + : public is_nothrow_constructible<_Tp, __add_rvalue_reference_t<_Tp> > {}; + +#endif // _LIBCPP_COMPILER_GCC + #if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value; diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_object.h b/contrib/llvm-project/libcxx/include/__type_traits/is_object.h index ec04508402ce..5ac1d854a695 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_object.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_object.h @@ -11,6 +11,10 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_array.h> +#include <__type_traits/is_class.h> +#include <__type_traits/is_scalar.h> +#include <__type_traits/is_union.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -18,13 +22,30 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_object) + template struct _LIBCPP_TEMPLATE_VIS is_object : _BoolConstant<__is_object(_Tp)> {}; -#if _LIBCPP_STD_VER >= 17 +# if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_object_v = __is_object(_Tp); -#endif +# endif + +#else // __has_builtin(__is_object) + +template +struct _LIBCPP_TEMPLATE_VIS is_object + : public integral_constant::value || is_array<_Tp>::value || is_union<_Tp>::value || + is_class<_Tp>::value > {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_object_v = is_object<_Tp>::value; +# endif + +#endif // __has_builtin(__is_object) _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_reference.h b/contrib/llvm-project/libcxx/include/__type_traits/is_reference.h index cc157a438e49..42853d479039 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_reference.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_reference.h @@ -18,15 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template -struct _LIBCPP_TEMPLATE_VIS is_reference : _BoolConstant<__is_reference(_Tp)> {}; - -#if _LIBCPP_STD_VER >= 17 -template -inline constexpr bool is_reference_v = __is_reference(_Tp); -#endif - -#if __has_builtin(__is_lvalue_reference) && __has_builtin(__is_rvalue_reference) +#if __has_builtin(__is_lvalue_reference) && __has_builtin(__is_rvalue_reference) && __has_builtin(__is_reference) template struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> {}; @@ -34,14 +26,19 @@ struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_refe template struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : _BoolConstant<__is_rvalue_reference(_Tp)> {}; +template +struct _LIBCPP_TEMPLATE_VIS is_reference : _BoolConstant<__is_reference(_Tp)> {}; + # if _LIBCPP_STD_VER >= 17 template +inline constexpr bool is_reference_v = __is_reference(_Tp); +template inline constexpr bool is_lvalue_reference_v = __is_lvalue_reference(_Tp); template inline constexpr bool is_rvalue_reference_v = __is_rvalue_reference(_Tp); # endif -#else // __has_builtin(__is_lvalue_reference) +#else // __has_builtin(__is_lvalue_reference) && etc... template struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : public false_type {}; @@ -53,7 +50,17 @@ struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : public false_type {}; template struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference<_Tp&&> : public true_type {}; +template +struct _LIBCPP_TEMPLATE_VIS is_reference : public false_type {}; +template +struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&> : public true_type {}; +template +struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&&> : public true_type {}; + # if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_reference_v = is_reference<_Tp>::value; + template inline constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value; @@ -61,7 +68,7 @@ template inline constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; # endif -#endif // __has_builtin(__is_lvalue_reference) +#endif // __has_builtin(__is_lvalue_reference) && etc... _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h b/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h index cb3e25cf5733..1db88e13356e 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h @@ -11,6 +11,9 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_convertible.h> +#include <__type_traits/is_enum.h> +#include <__type_traits/underlying_type.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -20,12 +23,31 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 23 +// TODO: GCC and Clang both have this builtin. Remove the false case once we've updated to GCC 14. +# if __has_builtin(__is_scoped_enum) + template struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {}; template inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp); +# else + +template > +struct __is_scoped_enum_helper : false_type {}; + +template +struct __is_scoped_enum_helper<_Tp, true> : public bool_constant > > {}; + +template +struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : public __is_scoped_enum_helper<_Tp> {}; + +template +inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value; + +# endif // __has_builtin(__is_scoped_enum) + #endif // _LIBCPP_STD_VER >= 23 _LIBCPP_END_NAMESPACE_STD From nobody Sun Dec 1 11:18:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYb6G3hz5fTL3; Sun, 01 Dec 2024 11:18:43 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYb45hwz42qL; Sun, 1 Dec 2024 11:18:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ceFmdIdmeFsicndKV9+1e9ZX97AnaW3PVUA6NecUB0M=; b=M/GVD6BkdUrY4/QW6IexK1N5GN0ElKIVjBsnFpHChfIOZNlVv2khlmds6qteBDJ5PmQF2X lhcjPlIctvifASA/ae0k7tlfCN0S4gP5euuVYWL4JTp21FZh8n/EjgHH+vZHVi/F5/zx7T 0SFMN2g394Hy1naLjJ8Co0LmvxtYVVlPejx5h3Qly8Wq4GQMmLxPEHdxTCsciSfWB3Fk1D B+hvIMLqhtsxSyjRmzuwgwDmQu8BO8kEGCZ02qh0WR3OjSsQhYRcSJERg7aWr6umVJgEMc tqUjanQSP+X5GfbcyHLVOuegP8+fZkoB/1m0MDYIAOH4tBx6iyt7NPSBxOUdKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ceFmdIdmeFsicndKV9+1e9ZX97AnaW3PVUA6NecUB0M=; b=m06aZCqMrDLddkfCmz3/btYbRPHQOPRyCtHcRqVImdJjbW6bxxI+WV4O2Sr7ne15siBCfa rXXOItvtcgI0slUjatIaMcZ33CTFPrF3vXMJdY8szg0njt4N0pVzHvKIV4lR4LYG2QAzJc oldq5MNKX9XLRXvS0sbUc/nF/gILJMUDZZ8VVaMiwEKWjmzNLmpyXPzz1da2+rIJ4yJW8Y 9SvBXLCCNdnUTkd+gXjFbyEv9ADc0oZ1EQf6Hj33rt/hWiAFYtf4b4h17Tfb49KI0Jo+/G /P7BWTVPkzoXpJGeec4URtQVK/iIkexUVE8c0H8wDYpERnaMb/BVMHJO/f4XoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051923; a=rsa-sha256; cv=none; b=P8eYpTXRrM82iVo65udqcbKNkKSVMqqjHONCbcvbNwWB9gqLaGwq4a9y31yIsoLntGD7Ng csh4RdfWGoyRRepFd22Jt7wiMEqHblVgwGcYPGFz96GoPAbMDzMKko74otlS5fOHhrKsZG V5Jjz58/PVTzZ5Gduqvm0WK4w+kD4jpgmu16fb4AE02GVz83XK9MYi+hxx1+/yHs9RG1od zbuA2fzOH2uypdUz27OLTxJY03B+4ecHz9y2DXRYIYfCdtyvMEHLS3Brv6omtkxpNQ27SA aP1XOfDC2m2Mo/WloViQtWHDtSjDMzpJRIbvG4NHnRrz0NwSRbzr8J1RUBfxiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYb2L5vzqB0; Sun, 1 Dec 2024 11:18:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIh3A008226; Sun, 1 Dec 2024 11:18:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIhdv008223; Sun, 1 Dec 2024 11:18:43 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:43 GMT Message-Id: <202412011118.4B1BIhdv008223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 800bd862562c - stable/14 - libcxx-compat: revert llvmorg-19-init-8667-g472b612ccbed: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 800bd862562c2da16b6e41fd4c08f279d5f9510a Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=800bd862562c2da16b6e41fd4c08f279d5f9510a commit 800bd862562c2da16b6e41fd4c08f279d5f9510a Author: Dimitry Andric AuthorDate: 2024-08-05 20:26:27 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:10 +0000 libcxx-compat: revert llvmorg-19-init-8667-g472b612ccbed: [libc++][NFC] Remove unused includes from <__type_traits/remove_cv.h> (#88752) PR: 280562 MFC after: 1 month (cherry picked from commit 1199d38d8ec764ce8545888b4c091d00441842bf) --- contrib/llvm-project/libcxx/include/__format/format_arg.h | 1 - contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__format/format_arg.h b/contrib/llvm-project/libcxx/include/__format/format_arg.h index aa02f81dc40e..4924e5fb3253 100644 --- a/contrib/llvm-project/libcxx/include/__format/format_arg.h +++ b/contrib/llvm-project/libcxx/include/__format/format_arg.h @@ -19,7 +19,6 @@ #include <__fwd/format.h> #include <__memory/addressof.h> #include <__type_traits/conditional.h> -#include <__type_traits/remove_const.h> #include <__utility/forward.h> #include <__utility/move.h> #include <__utility/unreachable.h> diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h index 2c4e9e419a1b..8e1c04336432 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h @@ -10,6 +10,8 @@ #define _LIBCPP___TYPE_TRAITS_REMOVE_CV_H #include <__config> +#include <__type_traits/remove_const.h> +#include <__type_traits/remove_volatile.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header From nobody Sun Dec 1 11:18:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYc72d7z5fTGZ; Sun, 01 Dec 2024 11:18:44 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYc53f6z434M; Sun, 1 Dec 2024 11:18:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qTfH4AYGKY7rsexS65As2QvLBlfQpf1I6O4YYs4A7bU=; b=Ey/YWkcGG9AzX0TP7HuBcT/I9owExrg8o5fKKNixJVbY8qqAzK4DQqdYiwRSC0LH4AldtY Z7WJle/zsA1iGy2S/B+ULUgRrdQ9QWM47oodcd9U6zka6nptg5zHuW4/+RALjm+mLfxDu4 7iwQVtm3MaNJQJp1PjFS99S8zNN46ZLcxO6Q8hoEeLQ9+CtfCmg2ZMniDtQMQb9KgrBEk9 WTfzUFVsZplC351Nv48EjE9+7P72dUuk9sWAgLFC6olBTB8BFVqvsDHlt3rIgzGfLqntxH I+m6kLxMPMuThjLaS571mvmDHpMcFjTGWgAsX1pWA1WOLiZRgi44JxmZ0X3l6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qTfH4AYGKY7rsexS65As2QvLBlfQpf1I6O4YYs4A7bU=; b=e99Jb+ovbeprTDvtTIJSmLtPpQY/sqc8+GrUYYYZPO4IjcCKOAYBmdwrJO3/BbY+yJexKq /pE3KCgpC3SK58WWgWXyUgcxc7SvqPVKrLwFZyvLMjqyWPwp/cHZUNadKNVIpX43NdumCn DB9z06tFC4oaXH9r7pI+WQhocywHtsG0ypgCUhIlkv7+G+0AGf4IxfXrMOSrEfJuik6hRA ZZ1P3gD5N7RK+aACIPu2oZUrsrnBnHnUCR294JjuhW/ADfMNxhOq7LEasYJIscTE3X3nI6 sHOLHZtkJhoYnVJ0L9opMLMiLoTqzJI8tQdhXvzuvBW/J8Ev3DimYHtMB8yiTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051924; a=rsa-sha256; cv=none; b=SQBWlPekmFbhLGMr8bQjI95Lk45ktZKO5P01AfCGP4tqRv63wS3+k9s6oAYPgP591z/ibU nudQksMl1c3pDSUu3cQEJhh7rAo3UBWlVNSW/cRNwkRoBoNjU1WeH6Tgz+l7I5fI68xeS3 AgGf3fbE1pJntRGi2vlJxG5CdwEJKJ+dYg4dCFaEcNowBjWbzej3rPGzyByXJld75CR3PH Jo3NGzVVg8h11UOin9ENi9/UAAR9hLVeviJwrwBiLVo/vhVtp7EP4WADyHJEDkLLIooRi+ 17mem4lf3YRxOXPhqhb7pVyubpAMwTWNONuLqbsl0s5QF4L/9nf2Bq8MzMe3ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYc3Hxqzqy3; Sun, 1 Dec 2024 11:18:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIiBI008262; Sun, 1 Dec 2024 11:18:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIijC008259; Sun, 1 Dec 2024 11:18:44 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:44 GMT Message-Id: <202412011118.4B1BIijC008259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 87d2d3765f94 - stable/14 - libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 87d2d3765f9481be9022e36121758937d864b7c4 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=87d2d3765f9481be9022e36121758937d864b7c4 commit 87d2d3765f9481be9022e36121758937d864b7c4 Author: Dimitry Andric AuthorDate: 2024-08-05 20:26:58 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:11 +0000 libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83: [libc++] Simplify the implementation of remove_reference (#85207) GCC 13 introduced the type trait `__remove_reference`. We can simplify the implementation of `remove_reference` a bit by using it. PR: 280562 MFC after: 1 month (cherry picked from commit a7b2d7f261b81d141195c4204fdc4a0dc97a146e) --- .../libcxx/include/__type_traits/remove_reference.h | 14 +++++++------- contrib/llvm-project/libcxx/include/cwchar | 4 ---- contrib/llvm-project/libcxx/include/execution | 4 ---- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h index ba67891758ad..fd66417bd84f 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h @@ -10,6 +10,7 @@ #define _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H #include <__config> +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -25,16 +26,15 @@ struct remove_reference { template using __libcpp_remove_reference_t = __remove_reference_t(_Tp); -#elif __has_builtin(__remove_reference) -template -struct remove_reference { - using type _LIBCPP_NODEBUG = __remove_reference(_Tp); -}; +#else +// clang-format off +template struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _LIBCPP_NODEBUG _Tp type;}; +template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG _Tp type;}; +template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG _Tp type;}; +// clang-format on template using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type; -#else -# error "remove_reference not implemented!" #endif // __has_builtin(__remove_reference_t) #if _LIBCPP_STD_VER >= 14 diff --git a/contrib/llvm-project/libcxx/include/cwchar b/contrib/llvm-project/libcxx/include/cwchar index dd16eaeaa07f..7abcc3440947 100644 --- a/contrib/llvm-project/libcxx/include/cwchar +++ b/contrib/llvm-project/libcxx/include/cwchar @@ -258,8 +258,4 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_wmemchr(_Tp _LIBCPP_END_NAMESPACE_STD -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -#endif - #endif // _LIBCPP_CWCHAR diff --git a/contrib/llvm-project/libcxx/include/execution b/contrib/llvm-project/libcxx/include/execution index 94d434b2e460..822ffa1fd3eb 100644 --- a/contrib/llvm-project/libcxx/include/execution +++ b/contrib/llvm-project/libcxx/include/execution @@ -142,8 +142,4 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -#endif - #endif // _LIBCPP_EXECUTION From nobody Sun Dec 1 11:18:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYf0S3Cz5fT6D; Sun, 01 Dec 2024 11:18:46 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYd6JFKz4300; Sun, 1 Dec 2024 11:18:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1E55OzNI4WgGgxwPLwIc4urfpfMF+fn7LeZ6IXjN/mg=; b=WsLrC5IcjPhWFWb8wz6Na0jmt6QUH/rt8L2gIcPAAaL3B0GrdMoV6QySeOJvJJOIIdJ+MO i/Rumkm/MO+4Z7OZs9ZIqBdJgtIbbi/T72TdurUeV6Mpqa4Vbd5RuTvmJtfeV57i945N7L PwK3FkC+RbQlQjaymOUhUZSYsm45aYJO8T/ARPGxxZCaDcfqVG0hP8Gf1cvN+W/B+SKmc1 C+vGp9xjZ1LPc+laO8p4rFjUwh0LQs4hK9RQWH+D0oVtoZD7t4FpUzLf/rh6EoknvPI6hg ytZKjrdfw5Z+NBWtVcAOZSO4MbTnlfEizQd4I6OrygFtWDcg4hRb1FvKZLt9eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1E55OzNI4WgGgxwPLwIc4urfpfMF+fn7LeZ6IXjN/mg=; b=nQDCETjQ98Q8OLw7yK1bmswSWeio7VvLsbGA4p0bs4sBTxGxMTS4M/DDsbr8bLmXTRn2oE YuA/H2I06UvilWKMcsl6NO82sKf9qaMN0lE6i/VrYo8jSB6uOtnjF4E9q02o8qCfhKtdYE hVLY9Xg6tK0BcgjgNF0cV6h4eGuJKB4ZQiKC7bk+1qDP7/irIs5PTTLewN6oVZPB/x5zDc uQghk+HUusgDh8lAqvInWQ9Esw6hxbHHzqKjW5r6nbCNxmFWBBp4xQATxDmSM1ogrehhRw 6/VlKtUsfLTmP53SBbxU3SoUfd5/3+vIxyVQLLuBq7vB22BXxeXuMrhB8DKhHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051925; a=rsa-sha256; cv=none; b=x3UNGvhQs2za3gN0t+cqkjFa7DDQU8XI8Z8QvhkSVb8N+7VQNb33w9sZmeADBXBJWMKIbc moLQe6DQHmkssZ8ICuSiDZFi/Uu5hLCWpUe8SUFbjlZ/xWYyqFiRuT6bKlbPGwOAKiVMMi AmI5Lqwa7eDlIM4xo1nZWjr/Q18fgn+6nPdf7QSazcuV7hdWsjzs+cnv/uQet3GidbKA/e zjZwOw+BazJC7fx81PquijT/dmUtcVFwsuzNi2/7MND4HR2bdDkHyXRmWjG7z8BNaUCl/i TLm1qOreS9cp5/oleZQ6FbbLVIQKA+jCO5GpsHT1fo18+/fNKOgv+Yj1dP1jKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYd4YHbzr9f; Sun, 1 Dec 2024 11:18:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIj6P008325; Sun, 1 Dec 2024 11:18:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIj2Y008322; Sun, 1 Dec 2024 11:18:45 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:45 GMT Message-Id: <202412011118.4B1BIj2Y008322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: ed51394a4910 - stable/14 - libcxx-compat: revert llvmorg-19-init-4504-g937a5396cf3e: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ed51394a49104e5423b6b6fc63f6e3fd1f256319 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ed51394a49104e5423b6b6fc63f6e3fd1f256319 commit ed51394a49104e5423b6b6fc63f6e3fd1f256319 Author: Dimitry Andric AuthorDate: 2024-08-05 20:27:22 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:11 +0000 libcxx-compat: revert llvmorg-19-init-4504-g937a5396cf3e: [libc++] Remove unused includes from __type_traits/is_convertible.h (#83747) PR: 280562 MFC after: 1 month (cherry picked from commit f3859a1a13a119548fd80ccdc85e35b4e5d61f62) --- contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h b/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h index baa6df94714f..b378a20cedeb 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h @@ -11,6 +11,12 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_array.h> +#include <__type_traits/is_function.h> +#include <__type_traits/is_void.h> +#include <__type_traits/remove_reference.h> +#include <__utility/declval.h> +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header From nobody Sun Dec 1 11:18:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYg35pfz5fTJ7; Sun, 01 Dec 2024 11:18:47 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYf689cz4307; Sun, 1 Dec 2024 11:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=la8Pp2wc9J2J3PEIsZ4t9GD8iId0GGC6XCW4LjVa8aQ=; b=pS+QV61sj1a5KCPrUBMLJ0fwi8oPVUIRTv8ZuBd3zuJ21eGVL7Y+12m38SfAhXxH0O3S1d 1Lk58nQq0fKHl9lC65dzpBArLaqxv8F9YZaHlTYuyzxbkn8TcPVw+pXzCQzdEudPyZAk5H sF/fad/jmuem4aRTv3jmnhlbJFOQORknvspm3gVnrRo9h5Qyl1nvSsMbqyA0VRnoFcalWv e9WMHUGfEl6B64hcLB5Dfny7Rzpc4eo14HNhQpLrJo7cJ0loKWW+hIQcpz8P6w3YDFFH7E JdYfDtcdnyhi1IQQKG/3kbMtQOIXX3FuwgQOx5h6i5R+u+Rd06JydnfNaZpTXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=la8Pp2wc9J2J3PEIsZ4t9GD8iId0GGC6XCW4LjVa8aQ=; b=EZnoXL4Z8V5bmDFyNL61ph2cc5FYZaZvqpVf+hVWwZMJhsu9+EmZw6nSb8LqLvY4PJ9+0i 3RZdEMIjjiQAZQvC7tKkSrofnrrcTI60YU/ICeCiv4pjHFcpn/qBfpg67rR1wmyzd8LGgl vcg/dLeI3EGXO8jEqZbbuySQre+SRjzJ+6/Q7k3Q0UqlQ1x8vNeQga34Ga52JSFKOCGAGK 8Rj3IxAqV+f671gZsmYPc+sbgAWwaMh1ur9oX/JAihHvcNqnoXuFGd/rs3zvVNeBw66Jju doLxoiAQ25OUjEBiWAFO1r1IA2tt0AkzqGXsuayJ9GlKtAr4q2qnzcB6gE9iRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051927; a=rsa-sha256; cv=none; b=u3E5gcYkewk3xLgeAMM6AjX8tJesD2/caTROpKTwPc4KIq7ZAe5d2phtLF5n7D9qjbHDlN qyHBx9d0/ucX5xatxCcL+x2koFExLD5cGlzS8cYhBYWVmx4jqgBx0+jnlLKA3bgizSgRen 8fZdYG+WpBbSMpG/vqQhFovF0ehL2CzH6zkGGLEGqOX4RmKe/8BRwobtmnv97vINVBisU6 GycsCi6gQuB9kV/F5S/82SAGLvSXbQ0HKgmB9R1+sKzn43v/p68hQpwqTyC6IHRKI+zLBl 8yHuzOHNctJ7Z13l0OBhYC0OKpPJnvc7aRgLACBepnMIc36/KcTUoj5SWX4S4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYf5Dv8zqng; Sun, 1 Dec 2024 11:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIkg9008361; Sun, 1 Dec 2024 11:18:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIkq9008358; Sun, 1 Dec 2024 11:18:46 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:46 GMT Message-Id: <202412011118.4B1BIkq9008358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 0b8644b07303 - stable/14 - libcxx-compat: revert llvmorg-19-init-4003-g55357160d0e1: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0b8644b0730322aac0f9cc465b7905841b0b6118 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0b8644b0730322aac0f9cc465b7905841b0b6118 commit 0b8644b0730322aac0f9cc465b7905841b0b6118 Author: Dimitry Andric AuthorDate: 2024-08-05 20:27:51 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:11 +0000 libcxx-compat: revert llvmorg-19-init-4003-g55357160d0e1: [libc++] Use GCC type traits builtins for remove_cv and remove_cvref (#81386) They have been added recently to GCC without support for mangling. This patch uses them in structs and adds aliases to these structs instead of the builtins directly. PR: 280562 MFC after: 1 month (cherry picked from commit 072b5fb698abd61ab30bea70135758336b0de999) --- .../llvm-project/libcxx/include/__type_traits/remove_cv.h | 11 ++++++++--- .../libcxx/include/__type_traits/remove_cvref.h | 15 +++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h index 8e1c04336432..c4bf612794bd 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h @@ -19,17 +19,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__remove_cv) && !defined(_LIBCPP_COMPILER_GCC) template struct remove_cv { using type _LIBCPP_NODEBUG = __remove_cv(_Tp); }; -#if defined(_LIBCPP_COMPILER_GCC) template -using __remove_cv_t = typename remove_cv<_Tp>::type; +using __remove_cv_t = __remove_cv(_Tp); #else template -using __remove_cv_t = __remove_cv(_Tp); +struct _LIBCPP_TEMPLATE_VIS remove_cv { + typedef __remove_volatile_t<__remove_const_t<_Tp> > type; +}; + +template +using __remove_cv_t = __remove_volatile_t<__remove_const_t<_Tp> >; #endif // __has_builtin(__remove_cv) #if _LIBCPP_STD_VER >= 14 diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h index 55f894dbd1d8..e8e8745ab096 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h @@ -20,26 +20,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if defined(_LIBCPP_COMPILER_GCC) +#if __has_builtin(__remove_cvref) && !defined(_LIBCPP_COMPILER_GCC) template -struct __remove_cvref_gcc { - using type = __remove_cvref(_Tp); -}; - -template -using __remove_cvref_t _LIBCPP_NODEBUG = typename __remove_cvref_gcc<_Tp>::type; +using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); #else template -using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); +using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >; #endif // __has_builtin(__remove_cvref) template -using __is_same_uncvref = _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> >; +struct __is_same_uncvref : _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> > {}; #if _LIBCPP_STD_VER >= 20 template struct remove_cvref { - using type _LIBCPP_NODEBUG = __remove_cvref(_Tp); + using type _LIBCPP_NODEBUG = __remove_cvref_t<_Tp>; }; template From nobody Sun Dec 1 11:18:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYh3PMnz5fTNP; Sun, 01 Dec 2024 11:18:48 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYh2Pskz430H; Sun, 1 Dec 2024 11:18:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aDdsxk5S05X53HBYStTbWBATRqwi+6qCVEDcw4PahC4=; b=oJbULj2gBTfg9dq4wyifi09wRBnQ9vIhArgHjLJMvGIsY69D96Om66+AzXye4PWl0v7q1U fG8po4+fvkhEhZ702blR/iLpW3fj2f3APh4nmnRIrmt9LYtnuH2smZhsIfz4ErtjwoV8CG CE+NnjQy7sNYZBR7KtI02G88FLiMBas8KqBbJNnkHVI+3Q/UGldC3J9dPl8zMKtnfkbR5w p2bY/Y4qSejFRwIAy8szow1kIS1hNnuk2rfsySgjneINqEr3IYGaEHv/AawX7o+b0CeoWs zsDWLAGOy2QznYFjDmzP32jaV2fCOKU39+qZCvwAF7c6CXjTWJPwG5izaXbSSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aDdsxk5S05X53HBYStTbWBATRqwi+6qCVEDcw4PahC4=; b=MWwb9wKVHstRQtU0XXvflwBFioZonnHPCsB944Hwpvlgf8Hds2w8oIYoH4DpX2/bZET4+q 3hCnG5lgpoQFrXeSGqd0Zp4mv8Y7UaqtZQiMGE/S4XHvIToOAYNRPi7lWMkQ/2CoJwlEJr yRYDLwrPAE57vy1ZZGADpDoYrc1kMTvABYm0hOd/8f+o97CavXx9+BF3e6fBWGbEnHLzGK u6W5RKalg21CbHnB1aF7tI1iBcLiz2P7P1OyaNM35idEhamwhblWlWHUVEDKjcydh8xPwH 90USbWkXVNy0uNi+1w/BQyZXJSeX6lnf5qgplNlKZopnamBqH6VFzNb9FVrwlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051928; a=rsa-sha256; cv=none; b=OK3ZoqqwsgEanYwRScBI0zbtjFam545VmeXaQfixMwsCRhTgokCDxkybIBVxAPockgA+NK 9n8l6mjdBZ41h1FkO7h0BHLVdD0DaQD68Y1uuyMTJwK3ZjvNtKjaV0ld21RrmKdzL7vpiy h0M06PMi9KpR3PRuuD98VhmInMLuS31jJ74rLo1YVJuq8pjkPqKpNEUxomjI93M+u6+kct jcnVS1Yp1NeB9lOTh6t0Tw4yEZ+2OnOtLQmD3tWMzSP3tWu9pKkhEBSf8MFmjImS8qE4vg J4Y1yJfnw/I5sHRMuW2FlirUeZbviMwRlI6Q7zxPanyX39ycDZ7jsiC8tmMjpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYg6cl0zqWQ; Sun, 1 Dec 2024 11:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIlVS008417; Sun, 1 Dec 2024 11:18:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIlCc008414; Sun, 1 Dec 2024 11:18:47 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:47 GMT Message-Id: <202412011118.4B1BIlCc008414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: c51597b87e37 - stable/14 - libcxx-compat: don't remove headers that were reintroduced by reverts List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c51597b87e37a04a0b1fb409e1be71a1c2acd37c Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=c51597b87e37a04a0b1fb409e1be71a1c2acd37c commit c51597b87e37a04a0b1fb409e1be71a1c2acd37c Author: Dimitry Andric AuthorDate: 2024-08-05 20:36:02 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:12 +0000 libcxx-compat: don't remove headers that were reintroduced by reverts PR: 280562 MFC after: 1 month (cherry picked from commit b60301d8b5949438150f7b8ff89cfc45acab34cf) --- ObsoleteFiles.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 3195b277ab5f..093fe4e91001 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -510,8 +510,6 @@ OLD_FILES+=usr/include/c++/v1/__type_traits/apply_cv.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_copy_assignable.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_copy_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_default_constructible.h -OLD_FILES+=usr/include/c++/v1/__type_traits/is_member_function_pointer.h -OLD_FILES+=usr/include/c++/v1/__type_traits/is_member_object_pointer.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_move_assignable.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_move_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_copy_assignable.h @@ -519,7 +517,6 @@ OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_copy_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_default_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_move_assignable.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_move_constructible.h -OLD_FILES+=usr/include/c++/v1/__type_traits/is_scoped_enum.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_trivially_copy_assignable.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_trivially_copy_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_trivially_default_constructible.h From nobody Sun Dec 1 11:18:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYj1qm8z5fTTL; Sun, 01 Dec 2024 11:18:49 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYj0ddzz42x4; Sun, 1 Dec 2024 11:18:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P6fTJp4vQu7IXb3+9f9+SSciMZg/xSeP08nPo0c52x8=; b=fTGEb7GiIxXOL68SCt9Kl6ojLsPkobw0I8JZ2xu0IsZApedEM6ZFfkIFS2016/z448jhns fLo83Y4N6UKHvUAGel6bcPC6bHvhcCiXxwfA0nVEYsNuAaWpieSFM3KzE3J9kdoHnfvIbC +07FIPTvM/oKONP/uXKjJb+zLxu9W5bkrnAjdwOX/mNtzRx0yvZBDS71p3mxvMzX30mLK/ 1XHEfTH6v+i05h9+gPyPH1WLAL1eCwQj+ihM4jJplzSmx44duS7Ou9fEbEkiN9JmCF+AZA FEV6M4Y9azQup0MgEwVAx464OD2JHjDWrH1cUPe7hJIrRcKt5vas07H2fVOIOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P6fTJp4vQu7IXb3+9f9+SSciMZg/xSeP08nPo0c52x8=; b=sxegu/ChzaslFc8a+Knsus4nrzgXKt1xncBSvLfhp0/ygZ6NqerIXVilnucf4rld5qF0W1 54kmuO1VlPQsyJPcNHIgSfURLtJkgTF0DcM4qKgjkBeEmwFpT8eMvGdYso42Dzd1HyUHft 1ZTqwil5P4BQjFTacLQHdO5U27FkkuM4UmjcBT1nyMg3JggL3HEWpHrF0z4YRq9vYx40hC YHTtC6RpmNUvuBlfVOth9iG3kIBdliLrEtqgPBDD8aXfjo8CLMuOho2sYZfOCElRpmqsis u/1VK3ljOkFNfLQfnFagHL7ekvIxMFAuY1SQ3+HN+FXIbgcBcCLKkeNVy6Fh+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051929; a=rsa-sha256; cv=none; b=WYy65h9xZp4R0dpoEvt4tA+uzvE8BJwcli7i/zqs52QJs+VAa5POA0bbIH7TS8UW/H93aj e+SKZxoQ6t5xs9+TlY62zHpwvPP8fqJa19AOaX285P0HOHtQOOXWH8k70YKpZdl0/r4/qb zt4Z1bh8s1kaTLMs4nH1lT8i6KJvKUFBDJSvpLbEbFUXmW0yx8lpe+zX2g+4xmkmVtdCi7 acaHCsL1LJ+WTydc3LbdAgLXCtAOWQH49vemtFTDJ5fjoYFiklLDkFs9cNTsxZyhpF7Kyj HFCjhkY0E5Yw6z8S/q/F4imPeYlpBx7UxDo3SEbShCsq6tUftvaVvsd/IMoPrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYj0DpFzqB1; Sun, 1 Dec 2024 11:18:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIm4S008474; Sun, 1 Dec 2024 11:18:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIm6U008471; Sun, 1 Dec 2024 11:18:48 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:48 GMT Message-Id: <202412011118.4B1BIm6U008471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 463b891cbe62 - stable/14 - libcxx-compat: install headers that were reintroduced by reverts List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 463b891cbe624d23038273c08146c151ed5b268c Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=463b891cbe624d23038273c08146c151ed5b268c commit 463b891cbe624d23038273c08146c151ed5b268c Author: Dimitry Andric AuthorDate: 2024-08-05 20:41:08 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:12 +0000 libcxx-compat: install headers that were reintroduced by reverts PR: 280562 MFC after: 1 month (cherry picked from commit 2e861daab905dcc0c2056e5712de5e1c0d1f865b) --- lib/libc++/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index af44d89c3cd5..c01b5eccde4b 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -1261,6 +1261,8 @@ TTR_HEADERS+= is_fundamental.h TTR_HEADERS+= is_implicitly_default_constructible.h TTR_HEADERS+= is_integral.h TTR_HEADERS+= is_literal_type.h +TTR_HEADERS+= is_member_function_pointer.h +TTR_HEADERS+= is_member_object_pointer.h TTR_HEADERS+= is_member_pointer.h TTR_HEADERS+= is_nothrow_assignable.h TTR_HEADERS+= is_nothrow_constructible.h @@ -1277,6 +1279,7 @@ TTR_HEADERS+= is_reference_wrapper.h TTR_HEADERS+= is_referenceable.h TTR_HEADERS+= is_same.h TTR_HEADERS+= is_scalar.h +TTR_HEADERS+= is_scoped_enum.h TTR_HEADERS+= is_signed.h TTR_HEADERS+= is_signed_integer.h TTR_HEADERS+= is_specialization.h From nobody Sun Dec 1 11:18:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYk5HGNz5fT6J; Sun, 01 Dec 2024 11:18:50 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYk1Y9vz434y; Sun, 1 Dec 2024 11:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e92Vh7e92lm0ljKQ+zxJYzYTr0j+apL1BcX8IYQzZ2M=; b=x3f1e8/U/R/APX8AxsoyYMI4vBx1eaAFf61DfbpWQ90mNzM3eD+eaQ6bnrZoISb7AmXVJ9 jm+MHqs226BqMPE9nm0122yP7nxCYAEWdNDLMxOwhyfbDFgchCabehkPuYhc1v2I9I2A2h iHm6ofshi12asAuWD7cIdhRdFgdUVzT964oXCxETEW4U6GWl+9jhVWgEq09NILYh0zG184 LWcpTXwoWHeAfw3Tu6fOmsuY6bF3Mpi1GJIV12phOM/WhOEYYKU6t2mlCFiqHEOTwki38v qM6ruAbcYDDSNZm4X8kbr15qO+wEndTcXYcQhqQQhsJ9Fv6xREJ5UDZAPe2Bkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e92Vh7e92lm0ljKQ+zxJYzYTr0j+apL1BcX8IYQzZ2M=; b=tSrb1gkRvjIlOCDo3mLoybucfCQORK6L5U9dA+ok3J/yhlffCmXSDy5WTYIZbNHcvHqUWI 50+vY4D7ITI11cvXSvrhIoRagA+tWOcQ/MmJZ8vcLOuIVpLnyo0ZtkSI3q6U2v53+3lkxS qpr0Ef90cOLkPiwxJ9R9UZY7HiZYAezTIz26lv+s+sXcd9IWeur6KP6GjeA4H6Kylwl0PB hbe31M9DScHjIyy1r6cxDZnd5DNrfpfDLCdbK8+BTeKHoSLXhBnVArhKZw/k5z0KcbQpyD vmoiFnXKi+d2FoTLvMk8et9i8zF8y6m/3supAkR+UOIjdMUUAnwzTkJzkNXr4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051930; a=rsa-sha256; cv=none; b=VSpGzAsAJcB+ZJI6cHAuZDmR5L/DkZllGEVNQYj5WlrjNWOkRP94V19E8i8R0FlkArPkc3 UHFtN7WSc9bTBHZAYT9P79GR3UqJMTm6/wli7/3YDGCrLFE/J91eWOn1nZWuMEfyLKMhVi 1g0PBSkk2ooRSzZhhXxa+j6u9ZZuyuKSYlyf6YFJAIWAv84OEXuVeWNOcaRiONkHbDeb2v GBazzYkLSmfJlkGQ3R7JzFggu0tcMtA11b6KAfIQgNn+xON3C/g8NIC6sMwOlwU9thX+Jl Ug5EhXa2ifHZs4Fbei1jHL+TgzBQ6mPHEGgRSpBKeczKrS7Hm0IemGT7AB08mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYk19TNzr0R; Sun, 1 Dec 2024 11:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIoYY008536; Sun, 1 Dec 2024 11:18:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIocC008533; Sun, 1 Dec 2024 11:18:50 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:50 GMT Message-Id: <202412011118.4B1BIocC008533@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 50bf3a98c316 - stable/14 - libcxx-compat: update libcxx.imp for headers that were reintroduced by reverts List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 50bf3a98c3161ebc612c7f434b5149772ffbde94 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=50bf3a98c3161ebc612c7f434b5149772ffbde94 commit 50bf3a98c3161ebc612c7f434b5149772ffbde94 Author: Dimitry Andric AuthorDate: 2024-08-06 08:47:32 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:12 +0000 libcxx-compat: update libcxx.imp for headers that were reintroduced by reverts PR: 280562 MFC after: 1 month (cherry picked from commit ff6c8447844b0f48bf507b2af4a0b8870e34e09e) --- lib/libc++/libcxx.imp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libc++/libcxx.imp b/lib/libc++/libcxx.imp index 214c12cd40ed..73c9d62df329 100644 --- a/lib/libc++/libcxx.imp +++ b/lib/libc++/libcxx.imp @@ -774,6 +774,8 @@ { include: [ "<__type_traits/is_implicitly_default_constructible.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_integral.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_literal_type.h>", "private", "", "public" ] }, + { include: [ "<__type_traits/is_member_function_pointer.h>", "private", "", "public" ] }, + { include: [ "<__type_traits/is_member_object_pointer.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_member_pointer.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_nothrow_assignable.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_nothrow_constructible.h>", "private", "", "public" ] }, @@ -790,6 +792,7 @@ { include: [ "<__type_traits/is_referenceable.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_same.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_scalar.h>", "private", "", "public" ] }, + { include: [ "<__type_traits/is_scoped_enum.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_signed.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_signed_integer.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_specialization.h>", "private", "", "public" ] }, From nobody Sun Dec 1 11:18:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYl5Bnqz5fTLB; Sun, 01 Dec 2024 11:18:51 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYl3r0bz42vR; Sun, 1 Dec 2024 11:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0bhWvqKF9da5AwUWz3c55sp1A7adreZBzkCH7HNjPSI=; b=yioIgDi0XWuybjwW0BXBrmwOXUy8n3klAoIUyckLsVjhHgwV7FatX42OnG/9dhBX0q6AUh PINK0ixGwHCu+iN+TVuqV0cV+JpNUkRFHqTSTODxvfiOLMyhHbtDwyQq/hvO6tCdNyTJQK lhp5Ija2rJjZBbx232DeVi997zZQxGHsyXvLBnQP6nsvtYDGVPEsgJVuYnXPL+peYs6n4n HUgZ/zFIqL7w+5pxZU1qMML1EL4cknfZDznRAB7kGaIvx2xK0FvZ7zCrOEHZVXYKOuyX2Q pS21t2f71Lqha6O7uGjGrWImTgOY7nRZXXDaqa7dcZH1BoJYupxiN0CZDVgSeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0bhWvqKF9da5AwUWz3c55sp1A7adreZBzkCH7HNjPSI=; b=rgW3j5BI2sK4BfnocCLZVKJxfnHW73pV9eFPq52cjlPlI643eHHukEFNq/ns1b8yqKyuZW 5J/+JBk0IdoWsmiJ3ZYTEehQd5hqT19yvy189Cs0w2MVqCqV4bJBA/hEaTODD0GC8nnDne 3qlxRUz7FpTNm75egOksFFOFoYsQBk4IFqIh/H0Rl8fCLdecVtMyy+kxcvY5D51lAGEOpw vn+AejHtzqzXiJVOetglKAx4Ea4lrt+hWYtkTqgwFsNMepyCD/9gxDJbW81bgX9l2Dk4NZ v0y4z7FstdyjGFTp2r4qqzSRFO26qRjWFqJwoX2XpwXlR33elv/Rp76zwwRPuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051931; a=rsa-sha256; cv=none; b=kJbaz2eh4+OjqREQlKnRE2Iwo38sz1qEo63NKoKvpgvMVWznT0rSOqmiQQ3Nt+2nxwCdN8 PqK0VRrgP+ifREACSvA2fBMhFWulD64vF+pOCux3KWZXrbTBE2DQ0TnZMJemsmUUjPM3to XdkHr3bIzjH+yz4KYAzBxQ3Tz9O6yEn7tnDx0DuJXo5pxQizy+Kt1+5TJNuEczYe255l2R cn5allG3BILZIAtixaGAT44q1UlYS1lt1OPlIXOU81t49RC9zium34Ckv1UOYOqH9OGoqJ aB+PluHZbHe4ECCPVNuOPJTy28EqKNP2MnOGH5RNThA5GMqvzdIgMQgUww24xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYl2lFMzqjp; Sun, 1 Dec 2024 11:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIpDX008575; Sun, 1 Dec 2024 11:18:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIpKS008572; Sun, 1 Dec 2024 11:18:51 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:51 GMT Message-Id: <202412011118.4B1BIpKS008572@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: bbe070a078a2 - stable/14 - Merge llvm-project release/19.x llvmorg-19.1.0-rc2-0-gd033ae172d1c List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bbe070a078a23706d1f0ca728ce9c0d7c726c8ab Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=bbe070a078a23706d1f0ca728ce9c0d7c726c8ab commit bbe070a078a23706d1f0ca728ce9c0d7c726c8ab Author: Dimitry Andric AuthorDate: 2024-08-06 13:37:26 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:12 +0000 Merge llvm-project release/19.x llvmorg-19.1.0-rc2-0-gd033ae172d1c This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-rc2-0-gd033ae172d1c. PR: 280562 MFC after: 1 month (cherry picked from commit 52418fc2be8efa5172b90a3a9e617017173612c4) --- .../llvm-project/clang/include/clang/AST/DeclCXX.h | 7 + .../llvm-project/clang/include/clang/Basic/Attr.td | 9 + .../clang/include/clang/Basic/AttrDocs.td | 10 + .../include/clang/Basic/DiagnosticFrontendKinds.td | 3 + .../include/clang/Basic/DiagnosticSemaKinds.td | 5 +- contrib/llvm-project/clang/lib/AST/DeclCXX.cpp | 36 +++ .../clang/lib/CodeGen/CodeGenFunction.cpp | 3 + .../clang/lib/CodeGen/Targets/AArch64.cpp | 6 +- .../clang/lib/Driver/ToolChains/Clang.cpp | 3 + .../clang/lib/Format/TokenAnnotator.cpp | 61 ++--- .../clang/lib/Sema/CheckExprLifetime.cpp | 9 + .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 74 ++--- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 29 +- .../llvm-project/clang/lib/Sema/SemaDeclAttr.cpp | 10 +- .../Checkers/BlockInCriticalSectionChecker.cpp | 16 +- .../clang/lib/StaticAnalyzer/Core/Store.cpp | 12 +- .../compiler-rt/lib/builtins/riscv/feature_bits.c | 298 --------------------- .../lib/interception/interception_linux.h | 16 +- .../compiler-rt/lib/nsan/nsan_interceptors.cpp | 10 - .../compiler-rt/lib/rtsan/rtsan_interceptors.cpp | 12 + .../lib/sanitizer_common/sanitizer_linux.cpp | 2 +- .../sanitizer_stacktrace_sparc.cpp | 11 +- .../libcxx/include/__atomic/atomic_ref.h | 32 ++- contrib/llvm-project/libcxx/include/typeinfo | 9 +- contrib/llvm-project/libcxx/include/version | 4 +- .../libcxx/src/include/overridable_function.h | 6 +- .../llvm-project/libunwind/src/UnwindCursor.hpp | 3 +- contrib/llvm-project/lld/ELF/Arch/LoongArch.cpp | 10 + contrib/llvm-project/lld/ELF/DWARF.cpp | 3 +- contrib/llvm-project/lld/ELF/ICF.cpp | 26 +- contrib/llvm-project/lld/ELF/InputFiles.cpp | 1 + contrib/llvm-project/lld/ELF/InputFiles.h | 1 + contrib/llvm-project/lld/ELF/InputSection.cpp | 75 ++++-- contrib/llvm-project/lld/ELF/InputSection.h | 27 +- contrib/llvm-project/lld/ELF/LinkerScript.cpp | 2 + contrib/llvm-project/lld/ELF/MarkLive.cpp | 12 +- contrib/llvm-project/lld/ELF/OutputSections.cpp | 132 ++++++++- contrib/llvm-project/lld/ELF/OutputSections.h | 6 + contrib/llvm-project/lld/ELF/Relocations.cpp | 57 ++-- contrib/llvm-project/lld/ELF/Relocations.h | 102 ++++++- contrib/llvm-project/lld/ELF/ScriptLexer.cpp | 5 - contrib/llvm-project/lld/ELF/SyntheticSections.cpp | 18 +- contrib/llvm-project/lld/ELF/SyntheticSections.h | 5 +- contrib/llvm-project/lld/ELF/Writer.cpp | 13 +- contrib/llvm-project/lld/docs/ReleaseNotes.rst | 8 +- .../llvm-project/llvm/include/llvm/ADT/STLExtras.h | 6 + .../include/llvm/CodeGen/TargetFrameLowering.h | 7 + .../llvm/include/llvm/IR/IntrinsicInst.h | 4 + .../llvm/include/llvm/IR/VectorBuilder.h | 5 +- .../llvm/include/llvm/MC/MCAsmBackend.h | 5 +- .../llvm/include/llvm/MC/MCAssembler.h | 4 +- .../llvm-project/llvm/include/llvm/MC/MCSection.h | 5 + .../llvm/include/llvm/Transforms/Utils/LoopUtils.h | 4 + .../llvm/lib/CodeGen/RegisterCoalescer.cpp | 7 + .../lib/CodeGen/StackFrameLayoutAnalysisPass.cpp | 72 +++-- .../llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp | 14 + contrib/llvm-project/llvm/lib/IR/IntrinsicInst.cpp | 19 ++ contrib/llvm-project/llvm/lib/IR/Metadata.cpp | 5 +- contrib/llvm-project/llvm/lib/IR/VectorBuilder.cpp | 57 +--- contrib/llvm-project/llvm/lib/MC/MCAssembler.cpp | 77 +++--- contrib/llvm-project/llvm/lib/MC/MCSection.cpp | 4 +- .../llvm/lib/Support/Windows/Process.inc | 3 +- .../llvm/lib/Support/Windows/Signals.inc | 38 +-- .../Target/AArch64/AArch64Arm64ECCallLowering.cpp | 5 + .../lib/Target/AArch64/AArch64FrameLowering.cpp | 35 +++ .../llvm/lib/Target/AArch64/AArch64FrameLowering.h | 2 + .../AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h | 1 + .../llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 6 +- .../Hexagon/MCTargetDesc/HexagonAsmBackend.cpp | 4 +- .../LoongArch/AsmParser/LoongArchAsmParser.cpp | 24 ++ .../lib/Target/LoongArch/LoongArchInstrInfo.td | 6 +- .../LoongArch/MCTargetDesc/LoongArchFixupKinds.h | 8 + .../MCTargetDesc/LoongArchMCCodeEmitter.cpp | 12 + .../LoongArch/MCTargetDesc/LoongArchMCExpr.cpp | 15 ++ .../LoongArch/MCTargetDesc/LoongArchMCExpr.h | 4 + .../llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp | 5 +- .../llvm/lib/Target/PowerPC/PPCRegisterInfo.td | 35 ++- .../llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 4 + .../llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp | 10 +- .../lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp | 26 +- .../lib/Transforms/Scalar/InferAddressSpaces.cpp | 2 +- .../llvm/lib/Transforms/Utils/LoopUtils.cpp | 44 ++- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 4 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 4 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 89 files changed, 1106 insertions(+), 701 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/AST/DeclCXX.h b/contrib/llvm-project/clang/include/clang/AST/DeclCXX.h index fb52ac804849..0923736a95f9 100644 --- a/contrib/llvm-project/clang/include/clang/AST/DeclCXX.h +++ b/contrib/llvm-project/clang/include/clang/AST/DeclCXX.h @@ -1210,6 +1210,13 @@ public: return D.HasPublicFields || D.HasProtectedFields || D.HasPrivateFields; } + /// If this is a standard-layout class or union, any and all data members will + /// be declared in the same type. + /// + /// This retrieves the type where any fields are declared, + /// or the current class if there is no class with fields. + const CXXRecordDecl *getStandardLayoutBaseWithFields() const; + /// Whether this class is polymorphic (C++ [class.virtual]), /// which means that the class contains or inherits a virtual function. bool isPolymorphic() const { return data().Polymorphic; } diff --git a/contrib/llvm-project/clang/include/clang/Basic/Attr.td b/contrib/llvm-project/clang/include/clang/Basic/Attr.td index 4825979a974d..46d0a66d59c3 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/Attr.td +++ b/contrib/llvm-project/clang/include/clang/Basic/Attr.td @@ -477,6 +477,9 @@ def TargetELF : TargetSpec { def TargetELFOrMachO : TargetSpec { let ObjectFormats = ["ELF", "MachO"]; } +def TargetWindowsArm64EC : TargetSpec { + let CustomCode = [{ Target.getTriple().isWindowsArm64EC() }]; +} def TargetSupportsInitPriority : TargetSpec { let CustomCode = [{ !Target.getTriple().isOSzOS() }]; @@ -4027,6 +4030,12 @@ def SelectAny : InheritableAttr { let SimpleHandler = 1; } +def HybridPatchable : InheritableAttr, TargetSpecificAttr { + let Spellings = [Declspec<"hybrid_patchable">, Clang<"hybrid_patchable">]; + let Subjects = SubjectList<[Function]>; + let Documentation = [HybridPatchableDocs]; +} + def Thread : Attr { let Spellings = [Declspec<"thread">]; let LangOpts = [MicrosoftExt]; diff --git a/contrib/llvm-project/clang/include/clang/Basic/AttrDocs.td b/contrib/llvm-project/clang/include/clang/Basic/AttrDocs.td index 99738812c815..b5d468eb5ec9 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/AttrDocs.td +++ b/contrib/llvm-project/clang/include/clang/Basic/AttrDocs.td @@ -5985,6 +5985,16 @@ For more information see or `msvc documentation `_. }]; } +def HybridPatchableDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``hybrid_patchable`` attribute declares an ARM64EC function with an additional +x86-64 thunk, which may be patched at runtime. + +For more information see +`ARM64EC ABI documentation `_. +}]; } + def WebAssemblyExportNameDocs : Documentation { let Category = DocCatFunction; let Content = [{ diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticFrontendKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticFrontendKinds.td index 12a4617c64d8..8a1462c670d6 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticFrontendKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticFrontendKinds.td @@ -288,6 +288,9 @@ def err_function_needs_feature : Error< let CategoryName = "Codegen ABI Check" in { def err_function_always_inline_attribute_mismatch : Error< "always_inline function %1 and its caller %0 have mismatching %2 attributes">; +def warn_function_always_inline_attribute_mismatch : Warning< + "always_inline function %1 and its caller %0 have mismatching %2 attributes, " + "inlining may change runtime behaviour">, InGroup; def err_function_always_inline_new_za : Error< "always_inline function %0 has new za state">; diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td index 3669b8b48e53..5490a38afa53 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -3677,6 +3677,9 @@ def err_attribute_weak_static : Error< "weak declaration cannot have internal linkage">; def err_attribute_selectany_non_extern_data : Error< "'selectany' can only be applied to data items with external linkage">; +def warn_attribute_hybrid_patchable_non_extern : Warning< + "'hybrid_patchable' is ignored on functions without external linkage">, + InGroup; def err_declspec_thread_on_thread_variable : Error< "'__declspec(thread)' applied to variable that already has a " "thread-local storage specifier">; @@ -3808,8 +3811,6 @@ def warn_sme_locally_streaming_has_vl_args_returns : Warning< InGroup, DefaultIgnore; def err_conflicting_attributes_arm_state : Error< "conflicting attributes for state '%0'">; -def err_sme_streaming_cannot_be_multiversioned : Error< - "streaming function cannot be multi-versioned">; def err_unknown_arm_state : Error< "unknown state '%0'">; def err_missing_arm_state : Error< diff --git a/contrib/llvm-project/clang/lib/AST/DeclCXX.cpp b/contrib/llvm-project/clang/lib/AST/DeclCXX.cpp index b573c2713a3a..9a3ede426e91 100644 --- a/contrib/llvm-project/clang/lib/AST/DeclCXX.cpp +++ b/contrib/llvm-project/clang/lib/AST/DeclCXX.cpp @@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl *Subobj) { data().StructuralIfLiteral = false; } +const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const { + assert( + isStandardLayout() && + "getStandardLayoutBaseWithFields called on a non-standard-layout type"); +#ifdef EXPENSIVE_CHECKS + { + unsigned NumberOfBasesWithFields = 0; + if (!field_empty()) + ++NumberOfBasesWithFields; + llvm::SmallPtrSet UniqueBases; + forallBases([&](const CXXRecordDecl *Base) -> bool { + if (!Base->field_empty()) + ++NumberOfBasesWithFields; + assert( + UniqueBases.insert(Base->getCanonicalDecl()).second && + "Standard layout struct has multiple base classes of the same type"); + return true; + }); + assert(NumberOfBasesWithFields <= 1 && + "Standard layout struct has fields declared in more than one class"); + } +#endif + if (!field_empty()) + return this; + const CXXRecordDecl *Result = this; + forallBases([&](const CXXRecordDecl *Base) -> bool { + if (!Base->field_empty()) { + // This is the base where the fields are declared; return early + Result = Base; + return false; + } + return true; + }); + return Result; +} + bool CXXRecordDecl::hasConstexprDestructor() const { auto *Dtor = getDestructor(); return Dtor ? Dtor->isConstexpr() : defaultedDestructorIsConstexpr(); diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp index d6078696a7d9..af201554898f 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp @@ -991,6 +991,9 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, if (D && D->hasAttr()) Fn->addFnAttr(llvm::Attribute::NoProfile); + if (D && D->hasAttr()) + Fn->addFnAttr(llvm::Attribute::HybridPatchable); + if (D) { // Function attributes take precedence over command line flags. if (auto *A = D->getAttr()) { diff --git a/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp b/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp index b9df54b0c67c..1dec3cd40ebd 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp @@ -883,8 +883,10 @@ void AArch64TargetCodeGenInfo::checkFunctionCallABIStreaming( if (!CalleeIsStreamingCompatible && (CallerIsStreaming != CalleeIsStreaming || CallerIsStreamingCompatible)) - CGM.getDiags().Report(CallLoc, - diag::err_function_always_inline_attribute_mismatch) + CGM.getDiags().Report( + CallLoc, CalleeIsStreaming + ? diag::err_function_always_inline_attribute_mismatch + : diag::warn_function_always_inline_attribute_mismatch) << Caller->getDeclName() << Callee->getDeclName() << "streaming"; if (auto *NewAttr = Callee->getAttr()) if (NewAttr->isNewZA()) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp index 5de29f1eca61..366b147a052b 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp @@ -1847,6 +1847,9 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args, Args.addOptInFlag( CmdArgs, options::OPT_fptrauth_vtable_pointer_type_discrimination, options::OPT_fno_ptrauth_vtable_pointer_type_discrimination); + Args.addOptInFlag( + CmdArgs, options::OPT_fptrauth_type_info_vtable_pointer_discrimination, + options::OPT_fno_ptrauth_type_info_vtable_pointer_discrimination); Args.addOptInFlag(CmdArgs, options::OPT_fptrauth_init_fini, options::OPT_fno_ptrauth_init_fini); Args.addOptInFlag( diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 21924a8fe17d..63c8699fd62d 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -154,8 +154,8 @@ private: if (NonTemplateLess.count(CurrentToken->Previous) > 0) return false; - const FormatToken &Previous = *CurrentToken->Previous; // The '<'. - if (Previous.Previous) { + if (const auto &Previous = *CurrentToken->Previous; // The '<'. + Previous.Previous) { if (Previous.Previous->Tok.isLiteral()) return false; if (Previous.Previous->is(tok::r_brace)) @@ -175,11 +175,13 @@ private: FormatToken *Left = CurrentToken->Previous; Left->ParentBracket = Contexts.back().ContextKind; ScopedContextCreator ContextCreator(*this, tok::less, 12); - Contexts.back().IsExpression = false; + + const auto *BeforeLess = Left->Previous; + // If there's a template keyword before the opening angle bracket, this is a // template parameter, not an argument. - if (Left->Previous && Left->Previous->isNot(tok::kw_template)) + if (BeforeLess && BeforeLess->isNot(tok::kw_template)) Contexts.back().ContextType = Context::TemplateArgument; if (Style.Language == FormatStyle::LK_Java && @@ -187,19 +189,24 @@ private: next(); } - while (CurrentToken) { + for (bool SeenTernaryOperator = false; CurrentToken;) { + const bool InExpr = Contexts[Contexts.size() - 2].IsExpression; if (CurrentToken->is(tok::greater)) { + const auto *Next = CurrentToken->Next; // Try to do a better job at looking for ">>" within the condition of // a statement. Conservatively insert spaces between consecutive ">" // tokens to prevent splitting right bitshift operators and potentially // altering program semantics. This check is overly conservative and // will prevent spaces from being inserted in select nested template // parameter cases, but should not alter program semantics. - if (CurrentToken->Next && CurrentToken->Next->is(tok::greater) && + if (Next && Next->is(tok::greater) && Left->ParentBracket != tok::less && CurrentToken->getStartOfNonWhitespace() == - CurrentToken->Next->getStartOfNonWhitespace().getLocWithOffset( - -1)) { + Next->getStartOfNonWhitespace().getLocWithOffset(-1)) { + return false; + } + if (InExpr && SeenTernaryOperator && + (!Next || !Next->isOneOf(tok::l_paren, tok::l_brace))) { return false; } Left->MatchingParen = CurrentToken; @@ -210,14 +217,14 @@ private: // msg: < item: data > // In TT_TextProto, map does not occur. if (Style.Language == FormatStyle::LK_TextProto || - (Style.Language == FormatStyle::LK_Proto && Left->Previous && - Left->Previous->isOneOf(TT_SelectorName, TT_DictLiteral))) { + (Style.Language == FormatStyle::LK_Proto && BeforeLess && + BeforeLess->isOneOf(TT_SelectorName, TT_DictLiteral))) { CurrentToken->setType(TT_DictLiteral); } else { CurrentToken->setType(TT_TemplateCloser); CurrentToken->Tok.setLength(1); } - if (CurrentToken->Next && CurrentToken->Next->Tok.isLiteral()) + if (Next && Next->Tok.isLiteral()) return false; next(); return true; @@ -229,18 +236,21 @@ private: } if (CurrentToken->isOneOf(tok::r_paren, tok::r_square, tok::r_brace)) return false; + const auto &Prev = *CurrentToken->Previous; // If a && or || is found and interpreted as a binary operator, this set // of angles is likely part of something like "a < b && c > d". If the // angles are inside an expression, the ||/&& might also be a binary // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (CurrentToken->Previous->isOneOf(tok::pipepipe, tok::ampamp) && - CurrentToken->Previous->is(TT_BinaryOperator) && - Contexts[Contexts.size() - 2].IsExpression && - !Line.startsWith(tok::kw_template)) { - return false; + if (InExpr && !Line.startsWith(tok::kw_template) && + Prev.is(TT_BinaryOperator)) { + const auto Precedence = Prev.getPrecedence(); + if (Precedence > prec::Conditional && Precedence < prec::Relational) + return false; } + if (Prev.is(TT_ConditionalExpr)) + SeenTernaryOperator = true; updateParameterCount(Left, CurrentToken); if (Style.Language == FormatStyle::LK_Proto) { if (FormatToken *Previous = CurrentToken->getPreviousNonComment()) { @@ -372,6 +382,10 @@ private: OpeningParen.Previous->is(tok::kw__Generic)) { Contexts.back().ContextType = Context::C11GenericSelection; Contexts.back().IsExpression = true; + } else if (Line.InPPDirective && + (!OpeningParen.Previous || + OpeningParen.Previous->isNot(tok::identifier))) { + Contexts.back().IsExpression = true; } else if (Contexts[Contexts.size() - 2].CaretFound) { // This is the parameter list of an ObjC block. Contexts.back().IsExpression = false; @@ -384,20 +398,7 @@ private: OpeningParen.Previous->MatchingParen->isOneOf( TT_ObjCBlockLParen, TT_FunctionTypeLParen)) { Contexts.back().IsExpression = false; - } else if (Line.InPPDirective) { - auto IsExpr = [&OpeningParen] { - const auto *Tok = OpeningParen.Previous; - if (!Tok || Tok->isNot(tok::identifier)) - return true; - Tok = Tok->Previous; - while (Tok && Tok->endsSequence(tok::coloncolon, tok::identifier)) { - assert(Tok->Previous); - Tok = Tok->Previous->Previous; - } - return !Tok || !Tok->Tok.getIdentifierInfo(); - }; - Contexts.back().IsExpression = IsExpr(); - } else if (!Line.MustBeDeclaration) { + } else if (!Line.MustBeDeclaration && !Line.InPPDirective) { bool IsForOrCatch = OpeningParen.Previous && OpeningParen.Previous->isOneOf(tok::kw_for, tok::kw_catch); diff --git a/contrib/llvm-project/clang/lib/Sema/CheckExprLifetime.cpp b/contrib/llvm-project/clang/lib/Sema/CheckExprLifetime.cpp index 5c8ef564f30a..112cf3d08182 100644 --- a/contrib/llvm-project/clang/lib/Sema/CheckExprLifetime.cpp +++ b/contrib/llvm-project/clang/lib/Sema/CheckExprLifetime.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "CheckExprLifetime.h" +#include "clang/AST/Decl.h" #include "clang/AST/Expr.h" #include "clang/Basic/DiagnosticSema.h" #include "clang/Sema/Initialization.h" @@ -548,6 +549,14 @@ static void visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path, EnableLifetimeWarnings); } + if (auto *M = dyn_cast(Init)) { + // Lifetime of a non-reference type field is same as base object. + if (auto *F = dyn_cast(M->getMemberDecl()); + F && !F->getType()->isReferenceType()) + visitLocalsRetainedByInitializer(Path, M->getBase(), Visit, true, + EnableLifetimeWarnings); + } + if (isa(Init)) { if (EnableLifetimeWarnings) handleGslAnnotatedTypes(Path, Init, Visit); diff --git a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp index cf1196ad23c2..9088b5e285bf 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp @@ -13664,10 +13664,11 @@ void Sema::DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr, //===--- Layout compatibility ----------------------------------------------// -static bool isLayoutCompatible(ASTContext &C, QualType T1, QualType T2); +static bool isLayoutCompatible(const ASTContext &C, QualType T1, QualType T2); /// Check if two enumeration types are layout-compatible. -static bool isLayoutCompatible(ASTContext &C, EnumDecl *ED1, EnumDecl *ED2) { +static bool isLayoutCompatible(const ASTContext &C, const EnumDecl *ED1, + const EnumDecl *ED2) { // C++11 [dcl.enum] p8: // Two enumeration types are layout-compatible if they have the same // underlying type. @@ -13678,8 +13679,8 @@ static bool isLayoutCompatible(ASTContext &C, EnumDecl *ED1, EnumDecl *ED2) { /// Check if two fields are layout-compatible. /// Can be used on union members, which are exempt from alignment requirement /// of common initial sequence. -static bool isLayoutCompatible(ASTContext &C, FieldDecl *Field1, - FieldDecl *Field2, +static bool isLayoutCompatible(const ASTContext &C, const FieldDecl *Field1, + const FieldDecl *Field2, bool AreUnionMembers = false) { [[maybe_unused]] const Type *Field1Parent = Field1->getParent()->getTypeForDecl(); @@ -13722,60 +13723,33 @@ static bool isLayoutCompatible(ASTContext &C, FieldDecl *Field1, /// Check if two standard-layout structs are layout-compatible. /// (C++11 [class.mem] p17) -static bool isLayoutCompatibleStruct(ASTContext &C, RecordDecl *RD1, - RecordDecl *RD2) { - // If both records are C++ classes, check that base classes match. - if (const CXXRecordDecl *D1CXX = dyn_cast(RD1)) { - // If one of records is a CXXRecordDecl we are in C++ mode, - // thus the other one is a CXXRecordDecl, too. - const CXXRecordDecl *D2CXX = cast(RD2); - // Check number of base classes. - if (D1CXX->getNumBases() != D2CXX->getNumBases()) - return false; +static bool isLayoutCompatibleStruct(const ASTContext &C, const RecordDecl *RD1, + const RecordDecl *RD2) { + // Get to the class where the fields are declared + if (const CXXRecordDecl *D1CXX = dyn_cast(RD1)) + RD1 = D1CXX->getStandardLayoutBaseWithFields(); - // Check the base classes. - for (CXXRecordDecl::base_class_const_iterator - Base1 = D1CXX->bases_begin(), - BaseEnd1 = D1CXX->bases_end(), - Base2 = D2CXX->bases_begin(); - Base1 != BaseEnd1; - ++Base1, ++Base2) { - if (!isLayoutCompatible(C, Base1->getType(), Base2->getType())) - return false; - } - } else if (const CXXRecordDecl *D2CXX = dyn_cast(RD2)) { - // If only RD2 is a C++ class, it should have zero base classes. - if (D2CXX->getNumBases() > 0) - return false; - } + if (const CXXRecordDecl *D2CXX = dyn_cast(RD2)) + RD2 = D2CXX->getStandardLayoutBaseWithFields(); // Check the fields. - RecordDecl::field_iterator Field2 = RD2->field_begin(), - Field2End = RD2->field_end(), - Field1 = RD1->field_begin(), - Field1End = RD1->field_end(); - for ( ; Field1 != Field1End && Field2 != Field2End; ++Field1, ++Field2) { - if (!isLayoutCompatible(C, *Field1, *Field2)) - return false; - } - if (Field1 != Field1End || Field2 != Field2End) - return false; - - return true; + return llvm::equal(RD1->fields(), RD2->fields(), + [&C](const FieldDecl *F1, const FieldDecl *F2) -> bool { + return isLayoutCompatible(C, F1, F2); + }); } /// Check if two standard-layout unions are layout-compatible. /// (C++11 [class.mem] p18) -static bool isLayoutCompatibleUnion(ASTContext &C, RecordDecl *RD1, - RecordDecl *RD2) { - llvm::SmallPtrSet UnmatchedFields; +static bool isLayoutCompatibleUnion(const ASTContext &C, const RecordDecl *RD1, + const RecordDecl *RD2) { + llvm::SmallPtrSet UnmatchedFields; for (auto *Field2 : RD2->fields()) UnmatchedFields.insert(Field2); for (auto *Field1 : RD1->fields()) { - llvm::SmallPtrSet::iterator - I = UnmatchedFields.begin(), - E = UnmatchedFields.end(); + auto I = UnmatchedFields.begin(); + auto E = UnmatchedFields.end(); for ( ; I != E; ++I) { if (isLayoutCompatible(C, Field1, *I, /*IsUnionMember=*/true)) { @@ -13792,8 +13766,8 @@ static bool isLayoutCompatibleUnion(ASTContext &C, RecordDecl *RD1, return UnmatchedFields.empty(); } -static bool isLayoutCompatible(ASTContext &C, RecordDecl *RD1, - RecordDecl *RD2) { +static bool isLayoutCompatible(const ASTContext &C, const RecordDecl *RD1, + const RecordDecl *RD2) { if (RD1->isUnion() != RD2->isUnion()) return false; @@ -13804,7 +13778,7 @@ static bool isLayoutCompatible(ASTContext &C, RecordDecl *RD1, } /// Check if two types are layout-compatible in C++11 sense. -static bool isLayoutCompatible(ASTContext &C, QualType T1, QualType T2) { +static bool isLayoutCompatible(const ASTContext &C, QualType T1, QualType T2) { if (T1.isNull() || T2.isNull()) return false; diff --git a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp index bb25a0b3a45a..01231f8e385e 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp @@ -6890,6 +6890,11 @@ static void checkAttributesAfterMerging(Sema &S, NamedDecl &ND) { } } + if (HybridPatchableAttr *Attr = ND.getAttr()) { + if (!ND.isExternallyVisible()) + S.Diag(Attr->getLocation(), + diag::warn_attribute_hybrid_patchable_non_extern); + } if (const InheritableAttr *Attr = getDLLAttr(&ND)) { auto *VD = dyn_cast(&ND); bool IsAnonymousNS = false; @@ -11009,6 +11014,9 @@ static bool AttrCompatibleWithMultiVersion(attr::Kind Kind, switch (Kind) { default: return false; + case attr::ArmLocallyStreaming: + return MVKind == MultiVersionKind::TargetVersion || + MVKind == MultiVersionKind::TargetClones; case attr::Used: return MVKind == MultiVersionKind::Target; case attr::NonNull: @@ -11145,7 +11153,21 @@ bool Sema::areMultiversionVariantFunctionsCompatible( FunctionType::ExtInfo OldTypeInfo = OldType->getExtInfo(); FunctionType::ExtInfo NewTypeInfo = NewType->getExtInfo(); - if (OldTypeInfo.getCC() != NewTypeInfo.getCC()) + const auto *OldFPT = OldFD->getType()->getAs(); + const auto *NewFPT = NewFD->getType()->getAs(); + + bool ArmStreamingCCMismatched = false; + if (OldFPT && NewFPT) { + unsigned Diff = + OldFPT->getAArch64SMEAttributes() ^ NewFPT->getAArch64SMEAttributes(); + // Arm-streaming, arm-streaming-compatible and non-streaming versions + // cannot be mixed. + if (Diff & (FunctionType::SME_PStateSMEnabledMask | + FunctionType::SME_PStateSMCompatibleMask)) + ArmStreamingCCMismatched = true; + } + + if (OldTypeInfo.getCC() != NewTypeInfo.getCC() || ArmStreamingCCMismatched) return Diag(DiffDiagIDAt.first, DiffDiagIDAt.second) << CallingConv; QualType OldReturnType = OldType->getReturnType(); @@ -11165,9 +11187,8 @@ bool Sema::areMultiversionVariantFunctionsCompatible( if (!CLinkageMayDiffer && OldFD->isExternC() != NewFD->isExternC()) return Diag(DiffDiagIDAt.first, DiffDiagIDAt.second) << LanguageLinkage; - if (CheckEquivalentExceptionSpec( - OldFD->getType()->getAs(), OldFD->getLocation(), - NewFD->getType()->getAs(), NewFD->getLocation())) + if (CheckEquivalentExceptionSpec(OldFPT, OldFD->getLocation(), NewFPT, + NewFD->getLocation())) return true; } return false; diff --git a/contrib/llvm-project/clang/lib/Sema/SemaDeclAttr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaDeclAttr.cpp index 5fd8622c90dd..e2eada24f9fc 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaDeclAttr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaDeclAttr.cpp @@ -3024,9 +3024,6 @@ bool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, Decl *D, return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unsupported << None << CurFeature << TargetVersion; } - if (IsArmStreamingFunction(cast(D), - /*IncludeLocallyStreaming=*/false)) - return Diag(LiteralLoc, diag::err_sme_streaming_cannot_be_multiversioned); return false; } @@ -3123,10 +3120,6 @@ bool Sema::checkTargetClonesAttrString( HasNotDefault = true; } } - if (IsArmStreamingFunction(cast(D), - /*IncludeLocallyStreaming=*/false)) - return Diag(LiteralLoc, - diag::err_sme_streaming_cannot_be_multiversioned); } else { // Other targets ( currently X86 ) if (Cur.starts_with("arch=")) { @@ -6868,6 +6861,9 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, case ParsedAttr::AT_MSConstexpr: handleMSConstexprAttr(S, D, AL); break; + case ParsedAttr::AT_HybridPatchable: + handleSimpleAttribute(S, D, AL); + break; // HLSL attributes: case ParsedAttr::AT_HLSLNumThreads: diff --git a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp index 40f7e9cede1f..4cd2f2802f30 100644 --- a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp +++ b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp @@ -147,10 +147,18 @@ using MutexDescriptor = class BlockInCriticalSectionChecker : public Checker { private: const std::array MutexDescriptors{ - MemberMutexDescriptor({/*MatchAs=*/CDM::CXXMethod, - /*QualifiedName=*/{"std", "mutex", "lock"}, - /*RequiredArgs=*/0}, - {CDM::CXXMethod, {"std", "mutex", "unlock"}, 0}), + // NOTE: There are standard library implementations where some methods + // of `std::mutex` are inherited from an implementation detail base + // class, and those aren't matched by the name specification {"std", + // "mutex", "lock"}. + // As a workaround here we omit the class name and only require the + // presence of the name parts "std" and "lock"/"unlock". + // TODO: Ensure that CallDescription understands inherited methods. + MemberMutexDescriptor( + {/*MatchAs=*/CDM::CXXMethod, + /*QualifiedName=*/{"std", /*"mutex",*/ "lock"}, + /*RequiredArgs=*/0}, + {CDM::CXXMethod, {"std", /*"mutex",*/ "unlock"}, 0}), FirstArgMutexDescriptor({CDM::CLibrary, {"pthread_mutex_lock"}, 1}, {CDM::CLibrary, {"pthread_mutex_unlock"}, 1}), FirstArgMutexDescriptor({CDM::CLibrary, {"mtx_lock"}, 1}, diff --git a/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/Store.cpp b/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/Store.cpp index 67ca61bb56ba..b436dd746d21 100644 --- a/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/Store.cpp +++ b/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/Store.cpp @@ -472,7 +472,17 @@ SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, const auto *ElemR = dyn_cast(BaseRegion); // Convert the offset to the appropriate size and signedness. - Offset = svalBuilder.convertToArrayIndex(Offset).castAs(); + auto Off = svalBuilder.convertToArrayIndex(Offset).getAs(); + if (!Off) { + // Handle cases when LazyCompoundVal is used for an array index. + // Such case is possible if code does: + // char b[4]; + // a[__builtin_bitcast(int, b)]; + // Return UnknownVal, since we cannot model it. + return UnknownVal(); + } + + Offset = Off.value(); if (!ElemR) { // If the base region is not an ElementRegion, create one. diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/riscv/feature_bits.c b/contrib/llvm-project/compiler-rt/lib/builtins/riscv/feature_bits.c deleted file mode 100644 index 77422935bd2d..000000000000 --- a/contrib/llvm-project/compiler-rt/lib/builtins/riscv/feature_bits.c +++ /dev/null @@ -1,298 +0,0 @@ -//=== feature_bits.c - Update RISC-V Feature Bits Structure -*- C -*-=========// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#define RISCV_FEATURE_BITS_LENGTH 1 -struct { - unsigned length; - unsigned long long features[RISCV_FEATURE_BITS_LENGTH]; -} __riscv_feature_bits __attribute__((visibility("hidden"), nocommon)); - -#define RISCV_VENDOR_FEATURE_BITS_LENGTH 1 -struct { - unsigned vendorID; - unsigned length; - unsigned long long features[RISCV_VENDOR_FEATURE_BITS_LENGTH]; -} __riscv_vendor_feature_bits __attribute__((visibility("hidden"), nocommon)); - -// NOTE: Should sync-up with RISCVFeatures.td -// TODO: Maybe generate a header from tablegen then include it. -#define A_GROUPID 0 -#define A_BITMASK (1ULL << 0) -#define C_GROUPID 0 -#define C_BITMASK (1ULL << 2) -#define D_GROUPID 0 -#define D_BITMASK (1ULL << 3) -#define F_GROUPID 0 -#define F_BITMASK (1ULL << 5) -#define I_GROUPID 0 -#define I_BITMASK (1ULL << 8) -#define M_GROUPID 0 -#define M_BITMASK (1ULL << 12) -#define V_GROUPID 0 -#define V_BITMASK (1ULL << 21) -#define ZACAS_GROUPID 0 -#define ZACAS_BITMASK (1ULL << 26) -#define ZBA_GROUPID 0 -#define ZBA_BITMASK (1ULL << 27) -#define ZBB_GROUPID 0 -#define ZBB_BITMASK (1ULL << 28) -#define ZBC_GROUPID 0 -#define ZBC_BITMASK (1ULL << 29) -#define ZBKB_GROUPID 0 -#define ZBKB_BITMASK (1ULL << 30) -#define ZBKC_GROUPID 0 -#define ZBKC_BITMASK (1ULL << 31) -#define ZBKX_GROUPID 0 -#define ZBKX_BITMASK (1ULL << 32) -#define ZBS_GROUPID 0 -#define ZBS_BITMASK (1ULL << 33) -#define ZFA_GROUPID 0 -#define ZFA_BITMASK (1ULL << 34) -#define ZFH_GROUPID 0 -#define ZFH_BITMASK (1ULL << 35) -#define ZFHMIN_GROUPID 0 -#define ZFHMIN_BITMASK (1ULL << 36) -#define ZICBOZ_GROUPID 0 -#define ZICBOZ_BITMASK (1ULL << 37) -#define ZICOND_GROUPID 0 -#define ZICOND_BITMASK (1ULL << 38) -#define ZIHINTNTL_GROUPID 0 -#define ZIHINTNTL_BITMASK (1ULL << 39) -#define ZIHINTPAUSE_GROUPID 0 -#define ZIHINTPAUSE_BITMASK (1ULL << 40) -#define ZKND_GROUPID 0 -#define ZKND_BITMASK (1ULL << 41) -#define ZKNE_GROUPID 0 -#define ZKNE_BITMASK (1ULL << 42) -#define ZKNH_GROUPID 0 -#define ZKNH_BITMASK (1ULL << 43) -#define ZKSED_GROUPID 0 -#define ZKSED_BITMASK (1ULL << 44) -#define ZKSH_GROUPID 0 -#define ZKSH_BITMASK (1ULL << 45) -#define ZKT_GROUPID 0 -#define ZKT_BITMASK (1ULL << 46) -#define ZTSO_GROUPID 0 -#define ZTSO_BITMASK (1ULL << 47) -#define ZVBB_GROUPID 0 -#define ZVBB_BITMASK (1ULL << 48) -#define ZVBC_GROUPID 0 -#define ZVBC_BITMASK (1ULL << 49) -#define ZVFH_GROUPID 0 -#define ZVFH_BITMASK (1ULL << 50) -#define ZVFHMIN_GROUPID 0 -#define ZVFHMIN_BITMASK (1ULL << 51) -#define ZVKB_GROUPID 0 -#define ZVKB_BITMASK (1ULL << 52) -#define ZVKG_GROUPID 0 -#define ZVKG_BITMASK (1ULL << 53) -#define ZVKNED_GROUPID 0 -#define ZVKNED_BITMASK (1ULL << 54) -#define ZVKNHA_GROUPID 0 -#define ZVKNHA_BITMASK (1ULL << 55) -#define ZVKNHB_GROUPID 0 -#define ZVKNHB_BITMASK (1ULL << 56) -#define ZVKSED_GROUPID 0 -#define ZVKSED_BITMASK (1ULL << 57) -#define ZVKSH_GROUPID 0 -#define ZVKSH_BITMASK (1ULL << 58) -#define ZVKT_GROUPID 0 -#define ZVKT_BITMASK (1ULL << 59) - -#if defined(__linux__) - -static long syscall_impl_5_args(long number, long arg1, long arg2, long arg3, - long arg4, long arg5) { - register long a7 __asm__("a7") = number; - register long a0 __asm__("a0") = arg1; - register long a1 __asm__("a1") = arg2; - register long a2 __asm__("a2") = arg3; - register long a3 __asm__("a3") = arg4; - register long a4 __asm__("a4") = arg5; - __asm__ __volatile__("ecall\n\t" - : "=r"(a0) - : "r"(a7), "r"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4) - : "memory"); - return a0; -} - -#define RISCV_HWPROBE_KEY_MVENDORID 0 -#define RISCV_HWPROBE_KEY_MARCHID 1 -#define RISCV_HWPROBE_KEY_MIMPID 2 -#define RISCV_HWPROBE_KEY_BASE_BEHAVIOR 3 -#define RISCV_HWPROBE_BASE_BEHAVIOR_IMA (1ULL << 0) -#define RISCV_HWPROBE_KEY_IMA_EXT_0 4 -#define RISCV_HWPROBE_IMA_FD (1ULL << 0) -#define RISCV_HWPROBE_IMA_C (1ULL << 1) -#define RISCV_HWPROBE_IMA_V (1ULL << 2) -#define RISCV_HWPROBE_EXT_ZBA (1ULL << 3) -#define RISCV_HWPROBE_EXT_ZBB (1ULL << 4) -#define RISCV_HWPROBE_EXT_ZBS (1ULL << 5) -#define RISCV_HWPROBE_EXT_ZICBOZ (1ULL << 6) -#define RISCV_HWPROBE_EXT_ZBC (1ULL << 7) -#define RISCV_HWPROBE_EXT_ZBKB (1ULL << 8) -#define RISCV_HWPROBE_EXT_ZBKC (1ULL << 9) -#define RISCV_HWPROBE_EXT_ZBKX (1ULL << 10) -#define RISCV_HWPROBE_EXT_ZKND (1ULL << 11) -#define RISCV_HWPROBE_EXT_ZKNE (1ULL << 12) -#define RISCV_HWPROBE_EXT_ZKNH (1ULL << 13) -#define RISCV_HWPROBE_EXT_ZKSED (1ULL << 14) -#define RISCV_HWPROBE_EXT_ZKSH (1ULL << 15) -#define RISCV_HWPROBE_EXT_ZKT (1ULL << 16) -#define RISCV_HWPROBE_EXT_ZVBB (1ULL << 17) -#define RISCV_HWPROBE_EXT_ZVBC (1ULL << 18) -#define RISCV_HWPROBE_EXT_ZVKB (1ULL << 19) -#define RISCV_HWPROBE_EXT_ZVKG (1ULL << 20) -#define RISCV_HWPROBE_EXT_ZVKNED (1ULL << 21) -#define RISCV_HWPROBE_EXT_ZVKNHA (1ULL << 22) -#define RISCV_HWPROBE_EXT_ZVKNHB (1ULL << 23) -#define RISCV_HWPROBE_EXT_ZVKSED (1ULL << 24) -#define RISCV_HWPROBE_EXT_ZVKSH (1ULL << 25) -#define RISCV_HWPROBE_EXT_ZVKT (1ULL << 26) -#define RISCV_HWPROBE_EXT_ZFH (1ULL << 27) -#define RISCV_HWPROBE_EXT_ZFHMIN (1ULL << 28) -#define RISCV_HWPROBE_EXT_ZIHINTNTL (1ULL << 29) -#define RISCV_HWPROBE_EXT_ZVFH (1ULL << 30) -#define RISCV_HWPROBE_EXT_ZVFHMIN (1ULL << 31) -#define RISCV_HWPROBE_EXT_ZFA (1ULL << 32) -#define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33) -#define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34) -#define RISCV_HWPROBE_EXT_ZICOND (1ULL << 35) -#define RISCV_HWPROBE_EXT_ZIHINTPAUSE (1ULL << 36) -#define RISCV_HWPROBE_KEY_CPUPERF_0 5 -#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) -#define RISCV_HWPROBE_MISALIGNED_EMULATED (1ULL << 0) -#define RISCV_HWPROBE_MISALIGNED_SLOW (2 << 0) -#define RISCV_HWPROBE_MISALIGNED_FAST (3 << 0) -#define RISCV_HWPROBE_MISALIGNED_UNSUPPORTED (4 << 0) -#define RISCV_HWPROBE_MISALIGNED_MASK (7 << 0) -#define RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE 6 -/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */ - -struct riscv_hwprobe { - long long key; - unsigned long long value; -}; - -#define __NR_riscv_hwprobe 258 -static long initHwProbe(struct riscv_hwprobe *Hwprobes, int len) { - return syscall_impl_5_args(__NR_riscv_hwprobe, (long)Hwprobes, len, 0, 0, 0); -} - -#define SET_RISCV_HWPROBE_EXT_SINGLE_RISCV_FEATURE(EXTNAME) \ - SET_SINGLE_IMAEXT_RISCV_FEATURE(RISCV_HWPROBE_EXT_##EXTNAME, EXTNAME) - -#define SET_SINGLE_IMAEXT_RISCV_FEATURE(HWPROBE_BITMASK, EXT) \ - SET_SINGLE_RISCV_FEATURE(IMAEXT0Value &HWPROBE_BITMASK, EXT) - -#define SET_SINGLE_RISCV_FEATURE(COND, EXT) \ - if (COND) { \ - SET_RISCV_FEATURE(EXT); \ - } - -#define SET_RISCV_FEATURE(EXT) features[EXT##_GROUPID] |= EXT##_BITMASK - -static void initRISCVFeature(struct riscv_hwprobe Hwprobes[]) { - - // Note: If a hwprobe key is unknown to the kernel, its key field - // will be cleared to -1, and its value set to 0. - // This unsets all extension bitmask bits. - - // Init vendor extension - __riscv_vendor_feature_bits.length = 0; - __riscv_vendor_feature_bits.vendorID = Hwprobes[2].value; - - // Init standard extension - // TODO: Maybe Extension implied generate from tablegen? - __riscv_feature_bits.length = RISCV_FEATURE_BITS_LENGTH; - - unsigned long long features[RISCV_FEATURE_BITS_LENGTH]; - int i; - - for (i = 0; i < RISCV_FEATURE_BITS_LENGTH; i++) - features[i] = 0; - - // Check RISCV_HWPROBE_KEY_BASE_BEHAVIOR - unsigned long long BaseValue = Hwprobes[0].value; - if (BaseValue & RISCV_HWPROBE_BASE_BEHAVIOR_IMA) { - SET_RISCV_FEATURE(I); - SET_RISCV_FEATURE(M); - SET_RISCV_FEATURE(A); - } - - // Check RISCV_HWPROBE_KEY_IMA_EXT_0 - unsigned long long IMAEXT0Value = Hwprobes[1].value; - if (IMAEXT0Value & RISCV_HWPROBE_IMA_FD) { - SET_RISCV_FEATURE(F); - SET_RISCV_FEATURE(D); - } - - SET_SINGLE_IMAEXT_RISCV_FEATURE(RISCV_HWPROBE_IMA_C, C); - SET_SINGLE_IMAEXT_RISCV_FEATURE(RISCV_HWPROBE_IMA_V, V); - SET_RISCV_HWPROBE_EXT_SINGLE_RISCV_FEATURE(ZBA); *** 2681 LINES SKIPPED *** From nobody Sun Dec 1 11:18:52 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYn0fVKz5fT6Q; Sun, 01 Dec 2024 11:18:53 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYm5f8Tz436x; Sun, 1 Dec 2024 11:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OoU05jnI0VZ5fQHxGta7FgBKR4v1c4gcgERMy5fzFjM=; b=wgdMLauHfYFVrevQzYfdb2sLoEPrPeC8dOLLU0mGz/MfNTQWRG1mdb+4RXm+Q9XmS1YUIz hCr6RwELEy7/f+zbw0xKkgKBHwtDHbXBqCsMlz5XTANPK6dekXbJweUZBQLyALWMMXOrz9 WFn5tpzRrrfqAd57sCASmx3qU6qaqEh1X8UZJgNhXU+vFg+xampdMN09F7PnIQBp6IpCy5 RCAXp5oOEDW2iNwUsWNDCsGoFpHcZoYtsp/vNFnnlJ2TiBxFrcydkrG7NCFisUW5n4iXz2 LmZLctb2IbxgHapN+Cv+8Pwb6YkviNLZPGQbXgD5fQqmkxhp5H1LRrTAqtQ3rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OoU05jnI0VZ5fQHxGta7FgBKR4v1c4gcgERMy5fzFjM=; b=uakJ6Ss1MjgLo7r63cYmMLLom6TmpzI1KrioUy9Dje6PnozURwJhXyErYGw5OE2gNYK6t8 k7WBszDluFYDrLvhScr1ptVnWMB5CaNhfRdYvQvxNmgi/MBnNwcRBWovNt+OiDeWRpi7O0 yAGHCqrl6qlhPFFlV1zr1qN9CWo+/N4E3i2jwaQvstdgo35NyfI6Jsp3tGSMi+34QiUOfn kObokO9FX5ATrlgOY8PG9wQwGsuyLpBJK187zwdwshU9HMPQ4yK/T9D3yGUFnDxXnfLnaE ScLzW+zwQHNd9zrNC+/qXspnpOm+HtGCf+bHsjJcKFh3ugcUrN73Hm1BQlbDKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051932; a=rsa-sha256; cv=none; b=pcAFbg6n95+5WN4GG9ZZNpJUUQOplPqkbURW/fpYKJTP3KyV/MxV7B9BAXIp5JdiD69oDg ua5/trr/7aMxHyr5wnU6ZOymM+Kl6OwPnWky9LdhXiRpNLgQqinAC+F0Lxy+wHRFzdJi0V pbK6rh+Xv3LJ+7sO/Kwi6SYDa3uL8n3UY036iuh+MyZLP2ianS/of/Q+ANq+I2tbboVq8j xG+EIheZhg4zycwnhx5ZoqBL+2miJnQBjArqJGDp6u1OOAPnVd6hraPs8BLIRlpt4g+t43 +Qd40dJgY7zu8Lr7SSFj/Acim8I+DRBoCmo8PAZmFqthMkh6gomkmROWBIzw7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYm4Tyszr0S; Sun, 1 Dec 2024 11:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIqsL008621; Sun, 1 Dec 2024 11:18:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIq9q008618; Sun, 1 Dec 2024 11:18:52 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:52 GMT Message-Id: <202412011118.4B1BIq9q008618@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 33d8457b6138 - stable/14 - Merge llvm-project release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 33d8457b61389fe59f5d879b08be70f76ad03dfc Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=33d8457b61389fe59f5d879b08be70f76ad03dfc commit 33d8457b61389fe59f5d879b08be70f76ad03dfc Author: Dimitry Andric AuthorDate: 2024-08-25 11:12:58 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:13 +0000 Merge llvm-project release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8. PR: 280562 MFC after: 1 month (cherry picked from commit 62987288060ff68c817b7056815aa9fb8ba8ecd7) --- .../clang/include/clang/AST/DeclBase.h | 7 + .../llvm-project/clang/include/clang/AST/ExprCXX.h | 7 +- .../include/clang/Basic/DiagnosticParseKinds.td | 3 - .../clang/include/clang/Basic/PointerAuthOptions.h | 6 + .../clang/include/clang/Basic/arm_sve.td | 26 ++- .../clang/include/clang/Driver/Options.td | 21 +-- .../clang/include/clang/Lex/PreprocessorOptions.h | 5 - .../clang/include/clang/Parse/Parser.h | 1 - .../include/clang/Serialization/ASTBitCodes.h | 3 + .../clang/include/clang/Serialization/ASTReader.h | 6 + .../clang/include/clang/Serialization/ASTWriter.h | 7 + contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 3 +- contrib/llvm-project/clang/lib/AST/ASTImporter.cpp | 6 +- contrib/llvm-project/clang/lib/AST/DeclBase.cpp | 34 +++- contrib/llvm-project/clang/lib/AST/ExprCXX.cpp | 19 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 2 +- .../llvm-project/clang/lib/CodeGen/CGVTables.cpp | 56 +++--- .../clang/lib/CodeGen/CodeGenFunction.cpp | 4 + .../clang/lib/CodeGen/ItaniumCXXABI.cpp | 3 + .../llvm-project/clang/lib/CodeGen/TargetInfo.cpp | 32 +++- .../llvm-project/clang/lib/CodeGen/TargetInfo.h | 7 +- .../clang/lib/CodeGen/Targets/AArch64.cpp | 14 +- .../clang/lib/Driver/ToolChains/AIX.cpp | 6 - .../clang/lib/Driver/ToolChains/Cuda.cpp | 4 + .../clang/lib/Driver/ToolChains/Darwin.cpp | 37 +++- .../clang/lib/Driver/ToolChains/Gnu.cpp | 3 +- contrib/llvm-project/clang/lib/Driver/Types.cpp | 4 +- .../clang/lib/Format/TokenAnnotator.cpp | 11 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 3 + .../clang/lib/Frontend/CompilerInvocation.cpp | 5 +- .../clang/lib/Frontend/InitPreprocessor.cpp | 1 + contrib/llvm-project/clang/lib/Headers/ptrauth.h | 6 + .../llvm-project/clang/lib/Parse/ParsePragma.cpp | 25 --- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 4 + .../llvm-project/clang/lib/Sema/SemaCoroutine.cpp | 3 +- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 11 +- .../llvm-project/clang/lib/Sema/SemaDeclCXX.cpp | 50 ++++- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 2 +- .../llvm-project/clang/lib/Sema/SemaExprMember.cpp | 3 +- contrib/llvm-project/clang/lib/Sema/SemaInit.cpp | 4 +- contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp | 6 +- .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 6 +- .../llvm-project/clang/lib/Sema/SemaTemplate.cpp | 3 +- .../llvm-project/clang/lib/Sema/TreeTransform.h | 8 +- .../clang/lib/Serialization/ASTReader.cpp | 11 ++ .../clang/lib/Serialization/ASTReaderDecl.cpp | 72 ++++++-- .../clang/lib/Serialization/ASTWriter.cpp | 33 +++- .../clang/lib/Serialization/ASTWriterDecl.cpp | 6 + .../clang/tools/clang-format/ClangFormat.cpp | 12 +- .../lib/builtins/aarch64/sme-libc-mem-routines.S | 10 +- .../lib/sanitizer_common/sanitizer_linux.cpp | 47 ++++- contrib/llvm-project/libcxx/include/__bit/rotate.h | 37 ++-- contrib/llvm-project/libcxx/include/__math/hypot.h | 66 ++----- .../libcxx/include/__memory/inout_ptr.h | 10 +- .../llvm-project/libcxx/include/__memory/out_ptr.h | 8 +- contrib/llvm-project/libcxx/include/complex | 9 +- contrib/llvm-project/libcxx/include/optional | 9 +- contrib/llvm-project/libcxx/include/span | 2 +- contrib/llvm-project/libunwind/src/Registers.hpp | 7 + .../llvm-project/libunwind/src/UnwindCursor.hpp | 6 +- contrib/llvm-project/libunwind/src/UnwindLevel1.c | 31 +++- .../libunwind/src/UnwindRegistersRestore.S | 14 ++ contrib/llvm-project/libunwind/src/assembly.h | 25 ++- contrib/llvm-project/libunwind/src/cet_unwind.h | 22 +++ contrib/llvm-project/lld/ELF/Arch/ARM.cpp | 21 ++- contrib/llvm-project/lld/ELF/Config.h | 3 +- contrib/llvm-project/lld/ELF/Driver.cpp | 9 + contrib/llvm-project/lld/ELF/InputFiles.cpp | 6 +- contrib/llvm-project/lld/ELF/Relocations.cpp | 8 +- .../lldb/include/lldb/API/SBSaveCoreOptions.h | 2 +- .../lldb/include/lldb/Utility/AddressableBits.h | 2 + .../lldb/source/API/SBSaveCoreOptions.cpp | 2 + .../SymbolFile/DWARF/DWARFASTParserClang.cpp | 11 +- .../llvm/include/llvm/ADT/SmallVector.h | 1 + .../include/llvm/Analysis/LoopAccessAnalysis.h | 23 +-- .../include/llvm/CodeGen/TargetFrameLowering.h | 6 + .../llvm/include/llvm/CodeGenData/CodeGenData.h | 204 --------------------- .../llvm/include/llvm/CodeGenData/CodeGenData.inc | 46 ----- .../include/llvm/CodeGenData/CodeGenDataReader.h | 154 ---------------- .../include/llvm/CodeGenData/CodeGenDataWriter.h | 68 ------- .../llvm-project/llvm/include/llvm/IR/Metadata.h | 6 +- .../llvm/lib/Analysis/LoopAccessAnalysis.cpp | 121 ++++++------ .../llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp | 8 +- .../llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 1 + .../llvm/lib/CodeGen/PrologEpilogInserter.cpp | 3 + .../llvm/lib/CodeGenData/CodeGenData.cpp | 196 -------------------- .../llvm/lib/CodeGenData/CodeGenDataReader.cpp | 175 ------------------ .../llvm/lib/CodeGenData/CodeGenDataWriter.cpp | 162 ---------------- .../llvm-project/llvm/lib/IR/LegacyPassManager.cpp | 4 +- .../llvm/lib/Passes/StandardInstrumentations.cpp | 9 +- contrib/llvm-project/llvm/lib/Support/regcomp.c | 8 +- .../llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp | 7 + .../AArch64/AArch64DeadRegisterDefinitionsPass.cpp | 4 + .../llvm/lib/Target/AArch64/AArch64Features.td | 28 ++- .../lib/Target/AArch64/AArch64FrameLowering.cpp | 204 ++++++++++++++++++++- .../llvm/lib/Target/AArch64/AArch64FrameLowering.h | 6 +- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 3 + .../llvm/lib/Target/AArch64/AArch64Processors.td | 46 ++++- .../Target/AArch64/AArch64TargetTransformInfo.cpp | 40 +++- .../Target/AArch64/AArch64TargetTransformInfo.h | 2 +- .../llvm/lib/Target/AMDGPU/SIFoldOperands.cpp | 13 +- .../llvm/lib/Target/ARM/ARMCallLowering.cpp | 9 + .../llvm/lib/Target/ARM/ARMCallLowering.h | 2 + .../lib/Target/Hexagon/HexagonConstExtenders.cpp | 4 + .../llvm/lib/Target/Mips/MipsFastISel.cpp | 4 +- .../llvm/lib/Target/PowerPC/PPCFrameLowering.cpp | 14 +- .../llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp | 19 +- .../Transforms/InstCombine/InstCombineCalls.cpp | 2 +- .../llvm/utils/TableGen/ARMTargetDefEmitter.cpp | 32 +++- .../llvm-project/openmp/runtime/src/z_Linux_asm.S | 53 ++++++ lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 4 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 4 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 117 files changed, 1235 insertions(+), 1454 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/AST/DeclBase.h b/contrib/llvm-project/clang/include/clang/AST/DeclBase.h index 40f01abf384e..2a4bd0f9c2fd 100644 --- a/contrib/llvm-project/clang/include/clang/AST/DeclBase.h +++ b/contrib/llvm-project/clang/include/clang/AST/DeclBase.h @@ -670,6 +670,13 @@ public: /// Whether this declaration comes from another module unit. bool isInAnotherModuleUnit() const; + /// Whether this declaration comes from the same module unit being compiled. + bool isInCurrentModuleUnit() const; + + /// Whether the definition of the declaration should be emitted in external + /// sources. + bool shouldEmitInExternalSource() const; + /// Whether this declaration comes from explicit global module. bool isFromExplicitGlobalModule() const; diff --git a/contrib/llvm-project/clang/include/clang/AST/ExprCXX.h b/contrib/llvm-project/clang/include/clang/AST/ExprCXX.h index c2feac525c1e..45cfd7bfb7f9 100644 --- a/contrib/llvm-project/clang/include/clang/AST/ExprCXX.h +++ b/contrib/llvm-project/clang/include/clang/AST/ExprCXX.h @@ -3229,7 +3229,7 @@ class UnresolvedLookupExpr final const DeclarationNameInfo &NameInfo, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End, - bool KnownDependent); + bool KnownDependent, bool KnownInstantiationDependent); UnresolvedLookupExpr(EmptyShell Empty, unsigned NumResults, bool HasTemplateKWAndArgsInfo); @@ -3248,7 +3248,7 @@ public: NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, UnresolvedSetIterator Begin, UnresolvedSetIterator End, - bool KnownDependent); + bool KnownDependent, bool KnownInstantiationDependent); // After canonicalization, there may be dependent template arguments in // CanonicalConverted But none of Args is dependent. When any of @@ -3258,7 +3258,8 @@ public: NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, const TemplateArgumentListInfo *Args, UnresolvedSetIterator Begin, - UnresolvedSetIterator End, bool KnownDependent); + UnresolvedSetIterator End, bool KnownDependent, + bool KnownInstantiationDependent); static UnresolvedLookupExpr *CreateEmpty(const ASTContext &Context, unsigned NumResults, diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td index f8d50d12bb93..12aab09f2855 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td @@ -1260,9 +1260,6 @@ def warn_pragma_intrinsic_builtin : Warning< def warn_pragma_unused_expected_var : Warning< "expected '#pragma unused' argument to be a variable name">, InGroup; -// - #pragma mc_func -def err_pragma_mc_func_not_supported : - Error<"#pragma mc_func is not supported">; // - #pragma init_seg def warn_pragma_init_seg_unsupported_target : Warning< "'#pragma init_seg' is only supported when targeting a " diff --git a/contrib/llvm-project/clang/include/clang/Basic/PointerAuthOptions.h b/contrib/llvm-project/clang/include/clang/Basic/PointerAuthOptions.h index 417b4b00648c..a26af69e1fa2 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/PointerAuthOptions.h +++ b/contrib/llvm-project/clang/include/clang/Basic/PointerAuthOptions.h @@ -159,6 +159,12 @@ public: }; struct PointerAuthOptions { + /// Should return addresses be authenticated? + bool ReturnAddresses = false; + + /// Do authentication failures cause a trap? + bool AuthTraps = false; + /// Do indirect goto label addresses need to be authenticated? bool IndirectGotos = false; diff --git a/contrib/llvm-project/clang/include/clang/Basic/arm_sve.td b/contrib/llvm-project/clang/include/clang/Basic/arm_sve.td index 94c093d89115..fb11d743fd64 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/arm_sve.td +++ b/contrib/llvm-project/clang/include/clang/Basic/arm_sve.td @@ -2116,7 +2116,7 @@ def SVFCLAMP_BF : SInst<"svclamp[_{d}]", "dddd", "b", MergeNone, "aarch64_sve_ multiclass MinMaxIntr { def SVS # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "csil", MergeNone, "aarch64_sve_s" # i # zm # "_" # mul, [IsStreaming], []>; def SVU # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "UcUsUiUl", MergeNone, "aarch64_sve_u" # i # zm # "_" # mul, [IsStreaming], []>; - def SVF # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "bhfd", MergeNone, "aarch64_sve_f" # i # zm # "_" # mul, [IsStreaming], []>; + def SVF # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "hfd", MergeNone, "aarch64_sve_f" # i # zm # "_" # mul, [IsStreaming], []>; } let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2" in { @@ -2134,11 +2134,11 @@ let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2" in { } multiclass SInstMinMaxByVector { - def NAME # _SINGLE_X2 : SInst<"sv" # name # "nm[_single_{d}_x2]", "22d", "bhfd", MergeNone, "aarch64_sve_f" # name # "nm_single_x2", [IsStreaming], []>; - def NAME # _SINGLE_X4 : SInst<"sv" # name # "nm[_single_{d}_x4]", "44d", "bhfd", MergeNone, "aarch64_sve_f" # name # "nm_single_x4", [IsStreaming], []>; + def NAME # _SINGLE_X2 : SInst<"sv" # name # "nm[_single_{d}_x2]", "22d", "hfd", MergeNone, "aarch64_sve_f" # name # "nm_single_x2", [IsStreaming], []>; + def NAME # _SINGLE_X4 : SInst<"sv" # name # "nm[_single_{d}_x4]", "44d", "hfd", MergeNone, "aarch64_sve_f" # name # "nm_single_x4", [IsStreaming], []>; - def NAME # _X2 : SInst<"sv" # name # "nm[_{d}_x2]", "222", "bhfd", MergeNone, "aarch64_sve_f" # name # "nm_x2", [IsStreaming], []>; - def NAME # _X4 : SInst<"sv" # name # "nm[_{d}_x4]", "444", "bhfd", MergeNone, "aarch64_sve_f" # name # "nm_x4", [IsStreaming], []>; + def NAME # _X2 : SInst<"sv" # name # "nm[_{d}_x2]", "222", "hfd", MergeNone, "aarch64_sve_f" # name # "nm_x2", [IsStreaming], []>; + def NAME # _X4 : SInst<"sv" # name # "nm[_{d}_x4]", "444", "hfd", MergeNone, "aarch64_sve_f" # name # "nm_x4", [IsStreaming], []>; } let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2" in { @@ -2172,9 +2172,25 @@ let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2" in { def SVFCLAMP_X4 : SInst<"svclamp[_single_{d}_x4]", "44dd", "hfd", MergeNone, "aarch64_sve_fclamp_single_x4", [IsStreaming], []>; } +multiclass BfSingleMultiVector { + def NAME # _SINGLE_X2 : SInst<"sv" # name # "[_single_{d}_x2]", "22d", "b", MergeNone, "aarch64_sve_f" # name # "_single_x2", [IsStreaming], []>; + def NAME # _SINGLE_X4 : SInst<"sv" # name # "[_single_{d}_x4]", "44d", "b", MergeNone, "aarch64_sve_f" # name # "_single_x4", [IsStreaming], []>; + + def NAME # _X2 : SInst<"sv" # name # "[_{d}_x2]", "222", "b", MergeNone, "aarch64_sve_f" # name # "_x2", [IsStreaming], []>; + def NAME # _X4 : SInst<"sv" # name # "[_{d}_x4]", "444", "b", MergeNone, "aarch64_sve_f" # name # "_x4", [IsStreaming], []>; +} + let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2,b16b16"in { def SVBFCLAMP_X2 : SInst<"svclamp[_single_{d}_x2]", "22dd", "b", MergeNone, "aarch64_sve_bfclamp_single_x2", [IsStreaming], []>; def SVBFCLAMP_X4 : SInst<"svclamp[_single_{d}_x4]", "44dd", "b", MergeNone, "aarch64_sve_bfclamp_single_x4", [IsStreaming], []>; + + // bfmin, bfmax (single, multi) + defm SVBFMIN : BfSingleMultiVector<"min">; + defm SVBFMAX : BfSingleMultiVector<"max">; + + // bfminnm, bfmaxnm (single, multi) + defm SVBFMINNM : BfSingleMultiVector<"minnm">; + defm SVBFMAXNM : BfSingleMultiVector<"maxnm">; } let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2" in { diff --git a/contrib/llvm-project/clang/include/clang/Driver/Options.td b/contrib/llvm-project/clang/include/clang/Driver/Options.td index 359a698ea87d..15f9ee75492e 100644 --- a/contrib/llvm-project/clang/include/clang/Driver/Options.td +++ b/contrib/llvm-project/clang/include/clang/Driver/Options.td @@ -932,8 +932,9 @@ def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>, Alias, AliasArgs<["1"]>; def Ofast : Joined<["-"], "Ofast">, Group, Visibility<[ClangOption, CC1Option, FlangOption]>, - HelpText<"Deprecated; use '-O3 -ffast-math' for the same behavior," - " or '-O3' to enable only conforming optimizations">; + HelpTextForVariants<[ClangOption, CC1Option], + "Deprecated; use '-O3 -ffast-math' for the same behavior," + " or '-O3' to enable only conforming optimizations">; def P : Flag<["-"], "P">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, Group, @@ -3106,7 +3107,7 @@ def fmodules_user_build_path : Separate<["-"], "fmodules-user-build-path">, Grou HelpText<"Specify the module user build path">, MarshallingInfoString>; def fprebuilt_module_path : Joined<["-"], "fprebuilt-module-path=">, Group, - Flags<[]>, Visibility<[ClangOption, CC1Option]>, + Flags<[]>, Visibility<[ClangOption, CLOption, CC1Option]>, MetaVarName<"">, HelpText<"Specify the prebuilt module path">; defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules", @@ -3115,11 +3116,11 @@ defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules", NegFlag, BothFlags<[], [ClangOption, CC1Option]>>; def fmodule_output_EQ : Joined<["-"], "fmodule-output=">, - Flags<[NoXarchOption]>, Visibility<[ClangOption, CC1Option]>, + Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, CC1Option]>, MarshallingInfoString>, HelpText<"Save intermediate module file results when compiling a standard C++ module unit.">; def fmodule_output : Flag<["-"], "fmodule-output">, Flags<[NoXarchOption]>, - Visibility<[ClangOption, CC1Option]>, + Visibility<[ClangOption, CLOption, CC1Option]>, HelpText<"Save intermediate module file results when compiling a standard C++ module unit.">; defm skip_odr_check_in_gmf : BoolOption<"f", "skip-odr-check-in-gmf", @@ -3299,8 +3300,10 @@ def fretain_comments_from_system_headers : Flag<["-"], "fretain-comments-from-sy Visibility<[ClangOption, CC1Option]>, MarshallingInfoFlag>; def fmodule_header : Flag <["-"], "fmodule-header">, Group, + Visibility<[ClangOption, CLOption]>, HelpText<"Build a C++20 Header Unit from a header">; def fmodule_header_EQ : Joined<["-"], "fmodule-header=">, Group, + Visibility<[ClangOption, CLOption]>, MetaVarName<"">, HelpText<"Build a C++20 Header Unit from a header that should be found in the user (fmodule-header=user) or system (fmodule-header=system) search path.">; @@ -5945,6 +5948,7 @@ def _output : Separate<["--"], "output">, Alias; def _param : Separate<["--"], "param">, Group; def _param_EQ : Joined<["--"], "param=">, Alias<_param>; def _precompile : Flag<["--"], "precompile">, Flags<[NoXarchOption]>, + Visibility<[ClangOption, CLOption]>, Group, HelpText<"Only precompile the input">; def _prefix_EQ : Joined<["--"], "prefix=">, Alias; def _prefix : Separate<["--"], "prefix">, Alias; @@ -8086,13 +8090,6 @@ def source_date_epoch : Separate<["-"], "source-date-epoch">, } // let Visibility = [CC1Option] -defm err_pragma_mc_func_aix : BoolFOption<"err-pragma-mc-func-aix", - PreprocessorOpts<"ErrorOnPragmaMcfuncOnAIX">, DefaultFalse, - PosFlag, - NegFlag>; - //===----------------------------------------------------------------------===// // CUDA Options //===----------------------------------------------------------------------===// diff --git a/contrib/llvm-project/clang/include/clang/Lex/PreprocessorOptions.h b/contrib/llvm-project/clang/include/clang/Lex/PreprocessorOptions.h index 3f7dd9db18ba..c2e3d6833302 100644 --- a/contrib/llvm-project/clang/include/clang/Lex/PreprocessorOptions.h +++ b/contrib/llvm-project/clang/include/clang/Lex/PreprocessorOptions.h @@ -211,10 +211,6 @@ public: /// If set, the UNIX timestamp specified by SOURCE_DATE_EPOCH. std::optional SourceDateEpoch; - /// If set, the preprocessor reports an error when processing #pragma mc_func - /// on AIX. - bool ErrorOnPragmaMcfuncOnAIX = false; - public: PreprocessorOptions() : PrecompiledPreambleBytes(0, false) {} @@ -252,7 +248,6 @@ public: PrecompiledPreambleBytes.first = 0; PrecompiledPreambleBytes.second = false; RetainExcludedConditionalBlocks = false; - ErrorOnPragmaMcfuncOnAIX = false; } }; diff --git a/contrib/llvm-project/clang/include/clang/Parse/Parser.h b/contrib/llvm-project/clang/include/clang/Parse/Parser.h index 35bb1a19d40f..f256d603ae62 100644 --- a/contrib/llvm-project/clang/include/clang/Parse/Parser.h +++ b/contrib/llvm-project/clang/include/clang/Parse/Parser.h @@ -221,7 +221,6 @@ class Parser : public CodeCompletionHandler { std::unique_ptr MaxTokensHerePragmaHandler; std::unique_ptr MaxTokensTotalPragmaHandler; std::unique_ptr RISCVPragmaHandler; - std::unique_ptr MCFuncPragmaHandler; std::unique_ptr CommentSemaHandler; diff --git a/contrib/llvm-project/clang/include/clang/Serialization/ASTBitCodes.h b/contrib/llvm-project/clang/include/clang/Serialization/ASTBitCodes.h index 5dd0ba33f8a9..9b7e3af0e449 100644 --- a/contrib/llvm-project/clang/include/clang/Serialization/ASTBitCodes.h +++ b/contrib/llvm-project/clang/include/clang/Serialization/ASTBitCodes.h @@ -721,6 +721,9 @@ enum ASTRecordTypes { /// Record code for \#pragma clang unsafe_buffer_usage begin/end PP_UNSAFE_BUFFER_USAGE = 69, + + /// Record code for vtables to emit. + VTABLES_TO_EMIT = 70, }; /// Record types used within a source manager block. diff --git a/contrib/llvm-project/clang/include/clang/Serialization/ASTReader.h b/contrib/llvm-project/clang/include/clang/Serialization/ASTReader.h index 76e51ac7ab97..671520a3602b 100644 --- a/contrib/llvm-project/clang/include/clang/Serialization/ASTReader.h +++ b/contrib/llvm-project/clang/include/clang/Serialization/ASTReader.h @@ -790,6 +790,11 @@ private: /// the consumer eagerly. SmallVector EagerlyDeserializedDecls; + /// The IDs of all vtables to emit. The referenced declarations are passed + /// to the consumers' HandleVTable eagerly after passing + /// EagerlyDeserializedDecls. + SmallVector VTablesToEmit; + /// The IDs of all tentative definitions stored in the chain. /// /// Sema keeps track of all tentative definitions in a TU because it has to @@ -1500,6 +1505,7 @@ private: bool isConsumerInterestedIn(Decl *D); void PassInterestingDeclsToConsumer(); void PassInterestingDeclToConsumer(Decl *D); + void PassVTableToConsumer(CXXRecordDecl *RD); void finishPendingActions(); void diagnoseOdrViolations(); diff --git a/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h b/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h index a0e475ec9f86..71a7c28047e3 100644 --- a/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h +++ b/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h @@ -500,6 +500,10 @@ private: std::vector NonAffectingRanges; std::vector NonAffectingOffsetAdjustments; + /// A list of classes which need to emit the VTable in the corresponding + /// object file. + llvm::SmallVector PendingEmittingVTables; + /// Computes input files that didn't affect compilation of the current module, /// and initializes data structures necessary for leaving those files out /// during \c SourceManager serialization. @@ -857,6 +861,8 @@ public: return PredefinedDecls.count(D); } + void handleVTable(CXXRecordDecl *RD); + private: // ASTDeserializationListener implementation void ReaderInitialized(ASTReader *Reader) override; @@ -951,6 +957,7 @@ public: void InitializeSema(Sema &S) override { SemaPtr = &S; } void HandleTranslationUnit(ASTContext &Ctx) override; + void HandleVTable(CXXRecordDecl *RD) override { Writer.handleVTable(RD); } ASTMutationListener *GetASTMutationListener() override; ASTDeserializationListener *GetASTDeserializationListener() override; bool hasEmittedPCH() const { return Buffer->IsComplete; } diff --git a/contrib/llvm-project/clang/lib/AST/ASTContext.cpp b/contrib/llvm-project/clang/lib/AST/ASTContext.cpp index 7af9ea7105bb..3da5e888f251 100644 --- a/contrib/llvm-project/clang/lib/AST/ASTContext.cpp +++ b/contrib/llvm-project/clang/lib/AST/ASTContext.cpp @@ -12405,8 +12405,7 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) { !isMSStaticDataMemberInlineDefinition(VD)) return false; - // Variables in other module units shouldn't be forced to be emitted. - if (VD->isInAnotherModuleUnit()) + if (VD->shouldEmitInExternalSource()) return false; // Variables that can be needed in other TUs are required. diff --git a/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp b/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp index 08ef09d353af..e95992b99f7e 100644 --- a/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp +++ b/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp @@ -8578,13 +8578,15 @@ ASTNodeImporter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) { return UnresolvedLookupExpr::Create( Importer.getToContext(), *ToNamingClassOrErr, *ToQualifierLocOrErr, *ToTemplateKeywordLocOrErr, ToNameInfo, E->requiresADL(), &ToTAInfo, - ToDecls.begin(), ToDecls.end(), KnownDependent); + ToDecls.begin(), ToDecls.end(), KnownDependent, + /*KnownInstantiationDependent=*/E->isInstantiationDependent()); } return UnresolvedLookupExpr::Create( Importer.getToContext(), *ToNamingClassOrErr, *ToQualifierLocOrErr, ToNameInfo, E->requiresADL(), ToDecls.begin(), ToDecls.end(), - /*KnownDependent=*/E->isTypeDependent()); + /*KnownDependent=*/E->isTypeDependent(), + /*KnownInstantiationDependent=*/E->isInstantiationDependent()); } ExpectedStmt diff --git a/contrib/llvm-project/clang/lib/AST/DeclBase.cpp b/contrib/llvm-project/clang/lib/AST/DeclBase.cpp index bc5a9206c0db..b59f118380ca 100644 --- a/contrib/llvm-project/clang/lib/AST/DeclBase.cpp +++ b/contrib/llvm-project/clang/lib/AST/DeclBase.cpp @@ -1125,20 +1125,36 @@ bool Decl::isInAnotherModuleUnit() const { if (!M) return false; + // FIXME or NOTE: maybe we need to be clear about the semantics + // of clang header modules. e.g., if this lives in a clang header + // module included by the current unit, should we return false + // here? + // + // This is clear for header units as the specification says the + // header units live in a synthesised translation unit. So we + // can return false here. M = M->getTopLevelModule(); - // FIXME: It is problematic if the header module lives in another module - // unit. Consider to fix this by techniques like - // ExternalASTSource::hasExternalDefinitions. - if (M->isHeaderLikeModule()) + if (!M->isNamedModule()) return false; - // A global module without parent implies that we're parsing the global - // module. So it can't be in another module unit. - if (M->isGlobalModule()) + return M != getASTContext().getCurrentNamedModule(); +} + +bool Decl::isInCurrentModuleUnit() const { + auto *M = getOwningModule(); + + if (!M || !M->isNamedModule()) return false; - assert(M->isNamedModule() && "New module kind?"); - return M != getASTContext().getCurrentNamedModule(); + return M == getASTContext().getCurrentNamedModule(); +} + +bool Decl::shouldEmitInExternalSource() const { + ExternalASTSource *Source = getASTContext().getExternalSource(); + if (!Source) + return false; + + return Source->hasExternalDefinitions(this) == ExternalASTSource::EK_Always; } bool Decl::isFromExplicitGlobalModule() const { diff --git a/contrib/llvm-project/clang/lib/AST/ExprCXX.cpp b/contrib/llvm-project/clang/lib/AST/ExprCXX.cpp index 8d2a1b5611cc..45e2badf2ddd 100644 --- a/contrib/llvm-project/clang/lib/AST/ExprCXX.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprCXX.cpp @@ -402,10 +402,11 @@ UnresolvedLookupExpr::UnresolvedLookupExpr( NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, - UnresolvedSetIterator End, bool KnownDependent) + UnresolvedSetIterator End, bool KnownDependent, + bool KnownInstantiationDependent) : OverloadExpr(UnresolvedLookupExprClass, Context, QualifierLoc, TemplateKWLoc, NameInfo, TemplateArgs, Begin, End, - KnownDependent, false, false), + KnownDependent, KnownInstantiationDependent, false), NamingClass(NamingClass) { UnresolvedLookupExprBits.RequiresADL = RequiresADL; } @@ -420,7 +421,7 @@ UnresolvedLookupExpr *UnresolvedLookupExpr::Create( const ASTContext &Context, CXXRecordDecl *NamingClass, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, UnresolvedSetIterator Begin, UnresolvedSetIterator End, - bool KnownDependent) { + bool KnownDependent, bool KnownInstantiationDependent) { unsigned NumResults = End - Begin; unsigned Size = totalSizeToAlloc(NumResults, 0, 0); @@ -428,7 +429,8 @@ UnresolvedLookupExpr *UnresolvedLookupExpr::Create( return new (Mem) UnresolvedLookupExpr( Context, NamingClass, QualifierLoc, /*TemplateKWLoc=*/SourceLocation(), NameInfo, RequiresADL, - /*TemplateArgs=*/nullptr, Begin, End, KnownDependent); + /*TemplateArgs=*/nullptr, Begin, End, KnownDependent, + KnownInstantiationDependent); } UnresolvedLookupExpr *UnresolvedLookupExpr::Create( @@ -436,7 +438,8 @@ UnresolvedLookupExpr *UnresolvedLookupExpr::Create( NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, const TemplateArgumentListInfo *Args, UnresolvedSetIterator Begin, - UnresolvedSetIterator End, bool KnownDependent) { + UnresolvedSetIterator End, bool KnownDependent, + bool KnownInstantiationDependent) { unsigned NumResults = End - Begin; bool HasTemplateKWAndArgsInfo = Args || TemplateKWLoc.isValid(); unsigned NumTemplateArgs = Args ? Args->size() : 0; @@ -444,9 +447,9 @@ UnresolvedLookupExpr *UnresolvedLookupExpr::Create( TemplateArgumentLoc>( NumResults, HasTemplateKWAndArgsInfo, NumTemplateArgs); void *Mem = Context.Allocate(Size, alignof(UnresolvedLookupExpr)); - return new (Mem) UnresolvedLookupExpr(Context, NamingClass, QualifierLoc, - TemplateKWLoc, NameInfo, RequiresADL, - Args, Begin, End, KnownDependent); + return new (Mem) UnresolvedLookupExpr( + Context, NamingClass, QualifierLoc, TemplateKWLoc, NameInfo, RequiresADL, + Args, Begin, End, KnownDependent, KnownInstantiationDependent); } UnresolvedLookupExpr *UnresolvedLookupExpr::CreateEmpty( diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp index 234a9c16e39d..6e69e84a2344 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp @@ -2032,7 +2032,7 @@ static void getTrivialDefaultFunctionAttributes( } TargetInfo::BranchProtectionInfo BPI(LangOpts); - TargetCodeGenInfo::setBranchProtectionFnAttributes(BPI, FuncAttrs); + TargetCodeGenInfo::initBranchProtectionFnAttributes(BPI, FuncAttrs); } /// Merges `target-features` from \TargetOpts and \F, and sets the result in diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp index 7f729d359b82..267bdf098297 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp @@ -1078,29 +1078,41 @@ llvm::GlobalVariable::LinkageTypes CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { if (!RD->isExternallyVisible()) return llvm::GlobalVariable::InternalLinkage; - - // We're at the end of the translation unit, so the current key - // function is fully correct. - const CXXMethodDecl *keyFunction = Context.getCurrentKeyFunction(RD); - if (keyFunction && !RD->hasAttr()) { + + // In windows, the linkage of vtable is not related to modules. + bool IsInNamedModule = !getTarget().getCXXABI().isMicrosoft() && + RD->isInNamedModule(); + // If the CXXRecordDecl is not in a module unit, we need to get + // its key function. We're at the end of the translation unit, so the current + // key function is fully correct. + const CXXMethodDecl *keyFunction = + IsInNamedModule ? nullptr : Context.getCurrentKeyFunction(RD); + if (IsInNamedModule || (keyFunction && !RD->hasAttr())) { // If this class has a key function, use that to determine the // linkage of the vtable. const FunctionDecl *def = nullptr; - if (keyFunction->hasBody(def)) + if (keyFunction && keyFunction->hasBody(def)) keyFunction = cast(def); - switch (keyFunction->getTemplateSpecializationKind()) { - case TSK_Undeclared: - case TSK_ExplicitSpecialization: + bool IsExternalDefinition = + IsInNamedModule ? RD->shouldEmitInExternalSource() : !def; + + TemplateSpecializationKind Kind = + IsInNamedModule ? RD->getTemplateSpecializationKind() + : keyFunction->getTemplateSpecializationKind(); + + switch (Kind) { + case TSK_Undeclared: + case TSK_ExplicitSpecialization: assert( - (def || CodeGenOpts.OptimizationLevel > 0 || + (IsInNamedModule || def || CodeGenOpts.OptimizationLevel > 0 || CodeGenOpts.getDebugInfo() != llvm::codegenoptions::NoDebugInfo) && - "Shouldn't query vtable linkage without key function, " - "optimizations, or debug info"); - if (!def && CodeGenOpts.OptimizationLevel > 0) + "Shouldn't query vtable linkage without the class in module units, " + "key function, optimizations, or debug info"); + if (IsExternalDefinition && CodeGenOpts.OptimizationLevel > 0) return llvm::GlobalVariable::AvailableExternallyLinkage; - if (keyFunction->isInlined()) + if (keyFunction && keyFunction->isInlined()) return !Context.getLangOpts().AppleKext ? llvm::GlobalVariable::LinkOnceODRLinkage : llvm::Function::InternalLinkage; @@ -1119,7 +1131,7 @@ CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { case TSK_ExplicitInstantiationDeclaration: llvm_unreachable("Should not have been asked to emit this"); - } + } } // -fapple-kext mode does not support weak linkage, so we must use @@ -1213,22 +1225,20 @@ bool CodeGenVTables::isVTableExternal(const CXXRecordDecl *RD) { TSK == TSK_ExplicitInstantiationDefinition) return false; + // Otherwise, if the class is attached to a module, the tables are uniquely + // emitted in the object for the module unit in which it is defined. + if (RD->isInNamedModule()) + return RD->shouldEmitInExternalSource(); + // Otherwise, if the class doesn't have a key function (possibly // anymore), the vtable must be defined here. const CXXMethodDecl *keyFunction = CGM.getContext().getCurrentKeyFunction(RD); if (!keyFunction) return false; - const FunctionDecl *Def; // Otherwise, if we don't have a definition of the key function, the // vtable must be defined somewhere else. - if (!keyFunction->hasBody(Def)) - return true; - - assert(Def && "The body of the key function is not assigned to Def?"); - // If the non-inline key function comes from another module unit, the vtable - // must be defined there. - return Def->isInAnotherModuleUnit() && !Def->isInlineSpecified(); + return !keyFunction->hasBody(); } /// Given that we're currently at the end of the translation unit, and diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp index af201554898f..2b2e23f1e5d7 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp @@ -880,8 +880,12 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, // Add pointer authentication attributes. const CodeGenOptions &CodeGenOpts = CGM.getCodeGenOpts(); + if (CodeGenOpts.PointerAuth.ReturnAddresses) + Fn->addFnAttr("ptrauth-returns"); if (CodeGenOpts.PointerAuth.FunctionPointers) Fn->addFnAttr("ptrauth-calls"); + if (CodeGenOpts.PointerAuth.AuthTraps) + Fn->addFnAttr("ptrauth-auth-traps"); if (CodeGenOpts.PointerAuth.IndirectGotos) Fn->addFnAttr("ptrauth-indirect-gotos"); diff --git a/contrib/llvm-project/clang/lib/CodeGen/ItaniumCXXABI.cpp b/contrib/llvm-project/clang/lib/CodeGen/ItaniumCXXABI.cpp index cd76f8406e7b..0be92fb2e275 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -2315,6 +2315,9 @@ bool ItaniumCXXABI::canSpeculativelyEmitVTable(const CXXRecordDecl *RD) const { if (!canSpeculativelyEmitVTableAsBaseClass(RD)) return false; + if (RD->shouldEmitInExternalSource()) + return false; + // For a complete-object vtable (or more specifically, for the VTT), we need // to be able to speculatively emit the vtables of all dynamic virtual bases. for (const auto &B : RD->vbases()) { diff --git a/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp b/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp index 38faa50cf19c..64a9a5554caf 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp @@ -209,13 +209,37 @@ llvm::Value *TargetCodeGenInfo::createEnqueuedBlockKernel( void TargetCodeGenInfo::setBranchProtectionFnAttributes( const TargetInfo::BranchProtectionInfo &BPI, llvm::Function &F) { - llvm::AttrBuilder FuncAttrs(F.getContext()); - setBranchProtectionFnAttributes(BPI, FuncAttrs); - F.addFnAttrs(FuncAttrs); + // Called on already created and initialized function where attributes already + // set from command line attributes but some might need to be removed as the + // actual BPI is different. + if (BPI.SignReturnAddr != LangOptions::SignReturnAddressScopeKind::None) { + F.addFnAttr("sign-return-address", BPI.getSignReturnAddrStr()); + F.addFnAttr("sign-return-address-key", BPI.getSignKeyStr()); + } else { + if (F.hasFnAttribute("sign-return-address")) + F.removeFnAttr("sign-return-address"); + if (F.hasFnAttribute("sign-return-address-key")) + F.removeFnAttr("sign-return-address-key"); + } + + auto AddRemoveAttributeAsSet = [&](bool Set, const StringRef &ModAttr) { + if (Set) + F.addFnAttr(ModAttr); + else if (F.hasFnAttribute(ModAttr)) + F.removeFnAttr(ModAttr); + }; + + AddRemoveAttributeAsSet(BPI.BranchTargetEnforcement, + "branch-target-enforcement"); + AddRemoveAttributeAsSet(BPI.BranchProtectionPAuthLR, + "branch-protection-pauth-lr"); + AddRemoveAttributeAsSet(BPI.GuardedControlStack, "guarded-control-stack"); } -void TargetCodeGenInfo::setBranchProtectionFnAttributes( +void TargetCodeGenInfo::initBranchProtectionFnAttributes( const TargetInfo::BranchProtectionInfo &BPI, llvm::AttrBuilder &FuncAttrs) { + // Only used for initializing attributes in the AttrBuilder, which will not + // contain any of these attributes so no need to remove anything. if (BPI.SignReturnAddr != LangOptions::SignReturnAddressScopeKind::None) { FuncAttrs.addAttribute("sign-return-address", BPI.getSignReturnAddrStr()); FuncAttrs.addAttribute("sign-return-address-key", BPI.getSignKeyStr()); diff --git a/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.h b/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.h index 2f2138582ba1..156b4ff4353b 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.h +++ b/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.h @@ -414,13 +414,16 @@ public: return nullptr; } + // Set the Branch Protection Attributes of the Function accordingly to the + // BPI. Remove attributes that contradict with current BPI. static void setBranchProtectionFnAttributes(const TargetInfo::BranchProtectionInfo &BPI, llvm::Function &F); + // Add the Branch Protection Attributes of the FuncAttrs. static void - setBranchProtectionFnAttributes(const TargetInfo::BranchProtectionInfo &BPI, - llvm::AttrBuilder &FuncAttrs); + initBranchProtectionFnAttributes(const TargetInfo::BranchProtectionInfo &BPI, + llvm::AttrBuilder &FuncAttrs); protected: static std::string qualifyWindowsLibrary(StringRef Lib); diff --git a/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp b/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp index 1dec3cd40ebd..97381f673c28 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp @@ -840,12 +840,13 @@ static bool isStreamingCompatible(const FunctionDecl *F) { static void diagnoseIfNeedsFPReg(DiagnosticsEngine &Diags, const StringRef ABIName, const AArch64ABIInfo &ABIInfo, - const QualType &Ty, const NamedDecl *D) { + const QualType &Ty, const NamedDecl *D, + SourceLocation loc) { const Type *HABase = nullptr; uint64_t HAMembers = 0; if (Ty->isFloatingType() || Ty->isVectorType() || ABIInfo.isHomogeneousAggregate(Ty, HABase, HAMembers)) { - Diags.Report(D->getLocation(), diag::err_target_unsupported_type_for_abi) + Diags.Report(loc, diag::err_target_unsupported_type_for_abi) << D->getDeclName() << Ty << ABIName; } } @@ -860,10 +861,11 @@ void AArch64TargetCodeGenInfo::checkFunctionABI( if (!TI.hasFeature("fp") && !ABIInfo.isSoftFloat()) { diagnoseIfNeedsFPReg(CGM.getDiags(), TI.getABI(), ABIInfo, - FuncDecl->getReturnType(), FuncDecl); + FuncDecl->getReturnType(), FuncDecl, + FuncDecl->getLocation()); for (ParmVarDecl *PVD : FuncDecl->parameters()) { diagnoseIfNeedsFPReg(CGM.getDiags(), TI.getABI(), ABIInfo, PVD->getType(), - PVD); + PVD, FuncDecl->getLocation()); } } } @@ -908,11 +910,11 @@ void AArch64TargetCodeGenInfo::checkFunctionCallABISoftFloat( return; diagnoseIfNeedsFPReg(CGM.getDiags(), TI.getABI(), ABIInfo, ReturnType, - Caller); + Callee ? Callee : Caller, CallLoc); for (const CallArg &Arg : Args) diagnoseIfNeedsFPReg(CGM.getDiags(), TI.getABI(), ABIInfo, Arg.getType(), - Caller); + Callee ? Callee : Caller, CallLoc); } void AArch64TargetCodeGenInfo::checkFunctionCallABI(CodeGenModule &CGM, diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/AIX.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/AIX.cpp index fb780fb75651..b04502a57a9f 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/AIX.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/AIX.cpp @@ -557,12 +557,6 @@ void AIX::addClangTargetOptions( if (!Args.getLastArgNoClaim(options::OPT_fsized_deallocation, options::OPT_fno_sized_deallocation)) CC1Args.push_back("-fno-sized-deallocation"); - - if (Args.hasFlag(options::OPT_ferr_pragma_mc_func_aix, - options::OPT_fno_err_pragma_mc_func_aix, false)) - CC1Args.push_back("-ferr-pragma-mc-func-aix"); - else - CC1Args.push_back("-fno-err-pragma-mc-func-aix"); } void AIX::addProfileRTLibs(const llvm::opt::ArgList &Args, diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp index 59453c484ae4..61d12b10dfb6 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp @@ -609,6 +609,10 @@ void NVPTX::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(Args.MakeArgString( "--pxtas-path=" + Args.getLastArgValue(options::OPT_ptxas_path_EQ))); + if (Args.hasArg(options::OPT_cuda_path_EQ)) + CmdArgs.push_back(Args.MakeArgString( + "--cuda-path=" + Args.getLastArgValue(options::OPT_cuda_path_EQ))); + // Add paths specified in LIBRARY_PATH environment variable as -L options. addDirectoryList(Args, CmdArgs, "-L", "LIBRARY_PATH"); diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp index c6f9d7beffb1..17d57b2f7eed 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp @@ -2923,22 +2923,45 @@ bool Darwin::isAlignedAllocationUnavailable() const { return TargetVersion < alignedAllocMinVersion(OS); } -static bool sdkSupportsBuiltinModules(const Darwin::DarwinPlatformKind &TargetPlatform, const std::optional &SDKInfo) { +static bool sdkSupportsBuiltinModules( + const Darwin::DarwinPlatformKind &TargetPlatform, + const Darwin::DarwinEnvironmentKind &TargetEnvironment, + const std::optional &SDKInfo) { + if (TargetEnvironment == Darwin::NativeEnvironment || + TargetEnvironment == Darwin::Simulator || + TargetEnvironment == Darwin::MacCatalyst) { + // Standard xnu/Mach/Darwin based environments + // depend on the SDK version. + } else { + // All other environments support builtin modules from the start. + return true; + } + if (!SDKInfo) + // If there is no SDK info, assume this is building against a + // pre-SDK version of macOS (i.e. before Mac OS X 10.4). Those + // don't support modules anyway, but the headers definitely + // don't support builtin modules either. It might also be some + // kind of degenerate build environment, err on the side of + // the old behavior which is to not use builtin modules. return false; VersionTuple SDKVersion = SDKInfo->getVersion(); switch (TargetPlatform) { + // Existing SDKs added support for builtin modules in the fall + // 2024 major releases. case Darwin::MacOS: - return SDKVersion >= VersionTuple(99U); + return SDKVersion >= VersionTuple(15U); case Darwin::IPhoneOS: - return SDKVersion >= VersionTuple(99U); + return SDKVersion >= VersionTuple(18U); case Darwin::TvOS: - return SDKVersion >= VersionTuple(99U); + return SDKVersion >= VersionTuple(18U); case Darwin::WatchOS: - return SDKVersion >= VersionTuple(99U); + return SDKVersion >= VersionTuple(11U); case Darwin::XROS: - return SDKVersion >= VersionTuple(99U); + return SDKVersion >= VersionTuple(2U); + + // New SDKs support builtin modules from the start. default: return true; } @@ -3030,7 +3053,7 @@ void Darwin::addClangTargetOptions( // i.e. when the builtin stdint.h is in the Darwin module too, the cycle // goes away. Note that -fbuiltin-headers-in-system-modules does nothing // to fix the same problem with C++ headers, and is generally fragile. - if (!sdkSupportsBuiltinModules(TargetPlatform, SDKInfo)) + if (!sdkSupportsBuiltinModules(TargetPlatform, TargetEnvironment, SDKInfo)) CC1Args.push_back("-fbuiltin-headers-in-system-modules"); if (!DriverArgs.hasArgNoClaim(options::OPT_fdefine_target_os_macros, diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp index 52c2ee90b1b2..543f3965dfd4 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2463,7 +2463,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( // lists should shrink over time. Please don't add more elements to *Triples. static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; static const char *const AArch64Triples[] = { - "aarch64-none-linux-gnu", "aarch64-redhat-linux", "aarch64-suse-linux"}; + "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux", + "aarch64-suse-linux"}; static const char *const AArch64beLibDirs[] = {"/lib"}; static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu"}; diff --git a/contrib/llvm-project/clang/lib/Driver/Types.cpp b/contrib/llvm-project/clang/lib/Driver/Types.cpp index a7b6b9000e1d..2b9b391c19c9 100644 --- a/contrib/llvm-project/clang/lib/Driver/Types.cpp +++ b/contrib/llvm-project/clang/lib/Driver/Types.cpp @@ -242,7 +242,9 @@ bool types::isCXX(ID Id) { case TY_CXXHUHeader: case TY_PP_CXXHeaderUnit: case TY_ObjCXXHeader: case TY_PP_ObjCXXHeader: - case TY_CXXModule: case TY_PP_CXXModule: + case TY_CXXModule: + case TY_PP_CXXModule: + case TY_ModuleFile: case TY_PP_CLCXX: case TY_CUDA: case TY_PP_CUDA: case TY_CUDA_DEVICE: case TY_HIP: diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 63c8699fd62d..6b9253613788 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp *** 4224 LINES SKIPPED *** From nobody Sun Dec 1 11:18:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYp5HKtz5fTVy; Sun, 01 Dec 2024 11:18:54 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYp1M6bz439V; Sun, 1 Dec 2024 11:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lFA92f0lKju2KIOESR1JVjkDHt3M3RdZ6bw2SPPdo5E=; b=RN30wSKttzrIfGQXZNUP42BKs3LLJnx5dJxktaz4XCoROfDRkxBAJ0oKXZaD1k/9QBEt2U 2BPFvZG+SKKWazdc4yHZJiVls3n6U6a7bMisS8FlN46mfzIvKLTN9vjJ9WNYcpUZWrzrhs yLb4y3KXxvAD2uuwHuxjpVl7wWR5A5BZyh3z1DBWNBCL3fRWZj8vHuY04IU2uDXM+C6Q5Y 1hFMxyFRhaBaia0jpeRxyP5pv4nioNJQBiIpgKSNc/8cLeu9JxAHRsUMuDa0fWHsY8rzFf 4iN8IeEpdER6oku8DwmTIoDneP9Vi4eD3iZbNCvVQZbXiwQVwQ7U8Q8kdATsyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lFA92f0lKju2KIOESR1JVjkDHt3M3RdZ6bw2SPPdo5E=; b=NLBy6xG0imtQH/tU52JzLixnFNRSvNN6QbL+vyfYwNtihBh1cLS7LlOaEaRpkVSBZf5o0Y q/kXmyzpWSdZyrlGtCPc4b1B+tEPXmixh6EZevqPfxihkwiczK9Q8jgp8w9rrFubbX8XJD E+sHTwYxleeAVeDk2GOsLI96gbK2jY8KASx/iyffvow3A+pu++66IXtOXoQamiVYnlQTpk xVhk9al0yVJbNx2UfFJrNnF82/dMQfAXy7YARvIcw2+RKEEivmvT5qM3L/P6RHTj6XnQCf QveX/IFGHGeqyAWh6/9K7zo2V89BRSpICcAd0j0nFN9gtcRvj3LUQU9EGEbvnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051934; a=rsa-sha256; cv=none; b=pbvbMMpzUxnOymwOnodvKJKzTb6L7lQT7yKnnHKvPuWFz3EJ4Q+APGOanWGN+RH1quhQqr Llytk5IDnol5TnPB1rmR7J44NyPPYb4da+Q7arjCHwxfaF5Mk2D/cH+cqDZjdVoDDDTMQs iAr5a7xBec5H2V28JYjmkGeS5w0poTcqE5y90CfEP3mngmCcK8G3kZtSvlO0Ud31SLSoAF WEj25VQ/iihnzmDABgpkyXiYNlrsdjnO5nnLhZtrrBK4pUXAnzBJ0+siN0tgBFQ3StPUP4 l4jnGJBZpeI8dJOTLJwCY1QjA2ZYwaCF/rx7xJLgApx0CrK+KeORLWecvCElMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYn6sG2zqGW; Sun, 1 Dec 2024 11:18:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIrOK008668; Sun, 1 Dec 2024 11:18:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIrnk008662; Sun, 1 Dec 2024 11:18:53 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:53 GMT Message-Id: <202412011118.4B1BIrnk008662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 67b657ee90c3 - stable/14 - Merge llvm-project release/19.x llvmorg-19.1.0-rc4-0-g0c641568515a List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 67b657ee90c3ee59f1a7b54a9c8e911e9014423e Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=67b657ee90c3ee59f1a7b54a9c8e911e9014423e commit 67b657ee90c3ee59f1a7b54a9c8e911e9014423e Author: Dimitry Andric AuthorDate: 2024-09-04 14:31:28 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:14 +0000 Merge llvm-project release/19.x llvmorg-19.1.0-rc4-0-g0c641568515a This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-rc4-0-g0c641568515a. PR: 280562 MFC after: 1 month (cherry picked from commit 6c4b055cfb6bf549e9145dde6454cc6b178c35e4) --- .../clang/include/clang/AST/ASTContext.h | 7 - .../clang/include/clang/AST/TemplateName.h | 4 +- .../llvm-project/clang/include/clang/AST/Type.h | 11 +- .../clang/include/clang/Serialization/ASTWriter.h | 4 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.def | 5 + contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 25 +- .../llvm-project/clang/lib/AST/TemplateName.cpp | 9 + .../clang/lib/Basic/Targets/AArch64.cpp | 40 +- .../llvm-project/clang/lib/Basic/Targets/AArch64.h | 3 + .../clang/lib/Driver/ToolChains/Darwin.cpp | 10 +- .../clang/lib/Format/ContinuationIndenter.cpp | 10 +- .../llvm-project/clang/lib/Format/FormatToken.h | 3 +- .../clang/lib/Format/TokenAnnotator.cpp | 53 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 15 +- .../clang/lib/Format/WhitespaceManager.cpp | 4 +- contrib/llvm-project/clang/lib/Headers/emmintrin.h | 2 +- contrib/llvm-project/clang/lib/Headers/xmmintrin.h | 2 +- .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 73 +- .../clang/lib/Serialization/ASTWriter.cpp | 3 + .../clang/lib/StaticAnalyzer/Checkers/Taint.cpp | 7 + .../lib/sanitizer_common/sanitizer_internal_defs.h | 9 + .../lib/sanitizer_common/sanitizer_linux.cpp | 2 +- .../lib/sanitizer_common/sanitizer_unwind_win.cpp | 7 + .../lib/sanitizer_common/sanitizer_win.cpp | 5 + .../include/__algorithm/three_way_comp_ref_type.h | 1 + contrib/llvm-project/libcxx/include/format | 12 +- .../mach-o/compact_unwind_encoding.modulemap | 4 - contrib/llvm-project/lld/MachO/ObjC.cpp | 10 +- .../llvm/include/llvm/IR/IntrinsicsBPF.td | 6 +- .../llvm/lib/CodeGen/DwarfEHPrepare.cpp | 7 + .../llvm/lib/CodeGen/MachinePipeliner.cpp | 12 +- .../llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 22 +- .../llvm/lib/CodeGen/WindowScheduler.cpp | 29 +- contrib/llvm-project/llvm/lib/IR/BasicBlock.cpp | 24 +- .../llvm/lib/IR/DebugProgramInstruction.cpp | 5 +- contrib/llvm-project/llvm/lib/IR/TypeFinder.cpp | 14 + contrib/llvm-project/llvm/lib/Support/Z3Solver.cpp | 1 + .../llvm/lib/Target/AArch64/AArch64Processors.td | 7 +- .../llvm-project/llvm/lib/Target/AMDGPU/AMDGPU.td | 23 +- .../llvm/lib/Target/AMDGPU/GCNSubtarget.h | 9 + .../llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 9 +- .../llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | 4 + .../llvm/lib/Target/AMDGPU/SIInstrInfo.h | 8 + .../llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp | 15 +- .../lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp | 12 +- .../llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 14 +- .../llvm/lib/Target/PowerPC/PPCInstr64Bit.td | 4 +- .../llvm/lib/Target/PowerPC/PPCInstrInfo.td | 12 +- .../llvm/lib/Target/Sparc/SparcAsmPrinter.cpp | 51 - .../llvm/lib/Target/X86/X86SchedIceLake.td | 2 + .../llvm/lib/Target/X86/X86SchedSkylakeServer.td | 2 + .../Instrumentation/PGOInstrumentation.cpp | 14 +- .../Transforms/Scalar/ConstraintElimination.cpp | 2 +- .../llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | 28 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 4 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 4 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/clang/liblldb/LLDBWrapLua.cpp | 1904 ++++++++++---------- 62 files changed, 1392 insertions(+), 1212 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/AST/ASTContext.h b/contrib/llvm-project/clang/include/clang/AST/ASTContext.h index 6d1c8ca8a2f9..16a19645d7f3 100644 --- a/contrib/llvm-project/clang/include/clang/AST/ASTContext.h +++ b/contrib/llvm-project/clang/include/clang/AST/ASTContext.h @@ -1805,13 +1805,6 @@ public: QualType DeducedType, bool IsDependent) const; -private: - QualType getDeducedTemplateSpecializationTypeInternal(TemplateName Template, - QualType DeducedType, - bool IsDependent, - QualType Canon) const; - -public: /// Return the unique reference to the type for the specified TagDecl /// (struct/union/class/enum) decl. QualType getTagDeclType(const TagDecl *Decl) const; diff --git a/contrib/llvm-project/clang/include/clang/AST/TemplateName.h b/contrib/llvm-project/clang/include/clang/AST/TemplateName.h index e3b7dd261535..e7313dee0128 100644 --- a/contrib/llvm-project/clang/include/clang/AST/TemplateName.h +++ b/contrib/llvm-project/clang/include/clang/AST/TemplateName.h @@ -347,9 +347,7 @@ public: /// error. void dump() const; - void Profile(llvm::FoldingSetNodeID &ID) { - ID.AddPointer(Storage.getOpaqueValue()); - } + void Profile(llvm::FoldingSetNodeID &ID); /// Retrieve the template name as a void pointer. void *getAsVoidPointer() const { return Storage.getOpaqueValue(); } diff --git a/contrib/llvm-project/clang/include/clang/AST/Type.h b/contrib/llvm-project/clang/include/clang/AST/Type.h index 25defea58c2d..9a711030cff9 100644 --- a/contrib/llvm-project/clang/include/clang/AST/Type.h +++ b/contrib/llvm-project/clang/include/clang/AST/Type.h @@ -6421,27 +6421,30 @@ class DeducedTemplateSpecializationType : public DeducedType, DeducedTemplateSpecializationType(TemplateName Template, QualType DeducedAsType, - bool IsDeducedAsDependent, QualType Canon) + bool IsDeducedAsDependent) : DeducedType(DeducedTemplateSpecialization, DeducedAsType, toTypeDependence(Template.getDependence()) | (IsDeducedAsDependent ? TypeDependence::DependentInstantiation : TypeDependence::None), - Canon), + DeducedAsType.isNull() ? QualType(this, 0) + : DeducedAsType.getCanonicalType()), Template(Template) {} public: /// Retrieve the name of the template that we are deducing. TemplateName getTemplateName() const { return Template;} - void Profile(llvm::FoldingSetNodeID &ID) const { + void Profile(llvm::FoldingSetNodeID &ID) { Profile(ID, getTemplateName(), getDeducedType(), isDependentType()); } static void Profile(llvm::FoldingSetNodeID &ID, TemplateName Template, QualType Deduced, bool IsDependent) { Template.Profile(ID); - Deduced.Profile(ID); + QualType CanonicalType = + Deduced.isNull() ? Deduced : Deduced.getCanonicalType(); + ID.AddPointer(CanonicalType.getAsOpaquePtr()); ID.AddBoolean(IsDependent || Template.isDependent()); } diff --git a/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h b/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h index 71a7c28047e3..700f0ad00111 100644 --- a/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h +++ b/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h @@ -500,8 +500,8 @@ private: std::vector NonAffectingRanges; std::vector NonAffectingOffsetAdjustments; - /// A list of classes which need to emit the VTable in the corresponding - /// object file. + /// A list of classes in named modules which need to emit the VTable in + /// the corresponding object file. llvm::SmallVector PendingEmittingVTables; /// Computes input files that didn't affect compilation of the current module, diff --git a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def index 29aa6a3b8a16..737bc8e86cfb 100644 --- a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def +++ b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def @@ -407,6 +407,11 @@ ANALYZER_OPTION( ANALYZER_OPTION(unsigned, MaxSymbolComplexity, "max-symbol-complexity", "The maximum complexity of symbolic constraint.", 35) +// HACK:https://discourse.llvm.org/t/rfc-make-istainted-and-complex-symbols-friends/79570 +// Ideally, we should get rid of this option soon. +ANALYZER_OPTION(unsigned, MaxTaintedSymbolComplexity, "max-tainted-symbol-complexity", + "[DEPRECATED] The maximum complexity of a symbol to carry taint", 9) + ANALYZER_OPTION(unsigned, MaxTimesInlineLarge, "max-times-inline-large", "The maximum times a large function could be inlined.", 32) diff --git a/contrib/llvm-project/clang/lib/AST/ASTContext.cpp b/contrib/llvm-project/clang/lib/AST/ASTContext.cpp index 3da5e888f251..1064507f3461 100644 --- a/contrib/llvm-project/clang/lib/AST/ASTContext.cpp +++ b/contrib/llvm-project/clang/lib/AST/ASTContext.cpp @@ -6269,9 +6269,11 @@ QualType ASTContext::getUnconstrainedType(QualType T) const { return T; } -QualType ASTContext::getDeducedTemplateSpecializationTypeInternal( - TemplateName Template, QualType DeducedType, bool IsDependent, - QualType Canon) const { +/// Return the uniqued reference to the deduced template specialization type +/// which has been deduced to the given type, or to the canonical undeduced +/// such type, or the canonical deduced-but-dependent such type. +QualType ASTContext::getDeducedTemplateSpecializationType( + TemplateName Template, QualType DeducedType, bool IsDependent) const { // Look in the folding set for an existing type. void *InsertPos = nullptr; llvm::FoldingSetNodeID ID; @@ -6282,8 +6284,7 @@ QualType ASTContext::getDeducedTemplateSpecializationTypeInternal( return QualType(DTST, 0); auto *DTST = new (*this, alignof(DeducedTemplateSpecializationType)) - DeducedTemplateSpecializationType(Template, DeducedType, IsDependent, - Canon); + DeducedTemplateSpecializationType(Template, DeducedType, IsDependent); llvm::FoldingSetNodeID TempID; DTST->Profile(TempID); assert(ID == TempID && "ID does not match"); @@ -6292,20 +6293,6 @@ QualType ASTContext::getDeducedTemplateSpecializationTypeInternal( return QualType(DTST, 0); } -/// Return the uniqued reference to the deduced template specialization type -/// which has been deduced to the given type, or to the canonical undeduced -/// such type, or the canonical deduced-but-dependent such type. -QualType ASTContext::getDeducedTemplateSpecializationType( - TemplateName Template, QualType DeducedType, bool IsDependent) const { - QualType Canon = DeducedType.isNull() - ? getDeducedTemplateSpecializationTypeInternal( - getCanonicalTemplateName(Template), QualType(), - IsDependent, QualType()) - : DeducedType.getCanonicalType(); - return getDeducedTemplateSpecializationTypeInternal(Template, DeducedType, - IsDependent, Canon); -} - /// getAtomicType - Return the uniqued reference to the atomic type for /// the given value type. QualType ASTContext::getAtomicType(QualType T) const { diff --git a/contrib/llvm-project/clang/lib/AST/TemplateName.cpp b/contrib/llvm-project/clang/lib/AST/TemplateName.cpp index d4e8a8971a97..11544dbb56e3 100644 --- a/contrib/llvm-project/clang/lib/AST/TemplateName.cpp +++ b/contrib/llvm-project/clang/lib/AST/TemplateName.cpp @@ -264,6 +264,15 @@ bool TemplateName::containsUnexpandedParameterPack() const { return getDependence() & TemplateNameDependence::UnexpandedPack; } +void TemplateName::Profile(llvm::FoldingSetNodeID &ID) { + if (const auto* USD = getAsUsingShadowDecl()) + ID.AddPointer(USD->getCanonicalDecl()); + else if (const auto *TD = getAsTemplateDecl()) + ID.AddPointer(TD->getCanonicalDecl()); + else + ID.AddPointer(Storage.getOpaqueValue()); +} + void TemplateName::print(raw_ostream &OS, const PrintingPolicy &Policy, Qualified Qual) const { auto handleAnonymousTTP = [](TemplateDecl *TD, raw_ostream &OS) { diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp index 6ba31cc05a0d..63fc15f916c5 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp @@ -471,23 +471,25 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts, if (HasSVE2 && HasSVE2SM4) Builder.defineMacro("__ARM_FEATURE_SVE2_SM4", "1"); + if (HasSVEB16B16) + Builder.defineMacro("__ARM_FEATURE_SVE_B16B16", "1"); + if (HasSME) { Builder.defineMacro("__ARM_FEATURE_SME"); Builder.defineMacro("__ARM_FEATURE_LOCALLY_STREAMING", "1"); } - if (HasSME2) { - Builder.defineMacro("__ARM_FEATURE_SME", "1"); + if (HasSME2) Builder.defineMacro("__ARM_FEATURE_SME2", "1"); - Builder.defineMacro("__ARM_FEATURE_LOCALLY_STREAMING", "1"); - } - if (HasSME2p1) { - Builder.defineMacro("__ARM_FEATURE_SME", "1"); - Builder.defineMacro("__ARM_FEATURE_SME2", "1"); + if (HasSME2p1) Builder.defineMacro("__ARM_FEATURE_SME2p1", "1"); - Builder.defineMacro("__ARM_FEATURE_LOCALLY_STREAMING", "1"); - } + + if (HasSMEF16F16) + Builder.defineMacro("__ARM_FEATURE_SME_F16F16", "1"); + + if (HasSMEB16B16) + Builder.defineMacro("__ARM_FEATURE_SME_B16B16", "1"); if (HasCRC) Builder.defineMacro("__ARM_FEATURE_CRC32", "1"); @@ -749,6 +751,7 @@ bool AArch64TargetInfo::hasFeature(StringRef Feature) const { .Case("sve", FPU & SveMode) .Case("sve-bf16", FPU & SveMode && HasBFloat16) .Case("sve-i8mm", FPU & SveMode && HasMatMul) + .Case("sve-b16b16", HasSVEB16B16) .Case("f32mm", FPU & SveMode && HasMatmulFP32) .Case("f64mm", FPU & SveMode && HasMatmulFP64) .Case("sve2", FPU & SveMode && HasSVE2) @@ -763,6 +766,8 @@ bool AArch64TargetInfo::hasFeature(StringRef Feature) const { .Case("sme-f64f64", HasSMEF64F64) .Case("sme-i16i64", HasSMEI16I64) .Case("sme-fa64", HasSMEFA64) + .Case("sme-f16f16", HasSMEF16F16) + .Case("sme-b16b16", HasSMEB16B16) .Cases("memtag", "memtag2", HasMTE) .Case("sb", HasSB) .Case("predres", HasPredRes) @@ -863,6 +868,8 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector &Features, HasSVE2 = true; HasSVE2SM4 = true; } + if (Feature == "+sve-b16b16") + HasSVEB16B16 = true; if (Feature == "+sve2-bitperm") { FPU |= NeonMode; FPU |= SveMode; @@ -919,6 +926,21 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector &Features, HasSVE2 = true; HasSMEFA64 = true; } + if (Feature == "+sme-f16f16") { + HasSME = true; + HasSME2 = true; + HasBFloat16 = true; + HasFullFP16 = true; + HasSMEF16F16 = true; + } + if (Feature == "+sme-b16b16") { + HasSME = true; + HasSME2 = true; + HasBFloat16 = true; + HasFullFP16 = true; + HasSVEB16B16 = true; + HasSMEB16B16 = true; + } if (Feature == "+sb") HasSB = true; if (Feature == "+predres") diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.h b/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.h index 7bdf5a2b4106..526f7f30a386 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.h @@ -53,6 +53,7 @@ class LLVM_LIBRARY_VISIBILITY AArch64TargetInfo : public TargetInfo { bool HasSVE2AES = false; bool HasSVE2SHA3 = false; bool HasSVE2SM4 = false; + bool HasSVEB16B16 = false; bool HasSVE2BitPerm = false; bool HasMatmulFP64 = false; bool HasMatmulFP32 = false; @@ -71,6 +72,8 @@ class LLVM_LIBRARY_VISIBILITY AArch64TargetInfo : public TargetInfo { bool HasSME2 = false; bool HasSMEF64F64 = false; bool HasSMEI16I64 = false; + bool HasSMEF16F16 = false; + bool HasSMEB16B16 = false; bool HasSME2p1 = false; bool HasSB = false; bool HasPredRes = false; diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp index 17d57b2f7eed..e576efaf5ca8 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp @@ -2953,7 +2953,15 @@ static bool sdkSupportsBuiltinModules( case Darwin::MacOS: return SDKVersion >= VersionTuple(15U); case Darwin::IPhoneOS: - return SDKVersion >= VersionTuple(18U); + switch (TargetEnvironment) { + case Darwin::MacCatalyst: + // Mac Catalyst uses `-target arm64-apple-ios18.0-macabi` so the platform + // is iOS, but it builds with the macOS SDK, so it's the macOS SDK version + // that's relevant. + return SDKVersion >= VersionTuple(15U); + default: + return SDKVersion >= VersionTuple(18U); + } case Darwin::TvOS: return SDKVersion >= VersionTuple(18U); case Darwin::WatchOS: diff --git a/contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp b/contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp index b07360425ca6..7d89f0e63dd2 100644 --- a/contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp +++ b/contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp @@ -842,10 +842,8 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, CurrentState.ContainsUnwrappedBuilder = true; } - if (Current.is(TT_TrailingReturnArrow) && - Style.Language == FormatStyle::LK_Java) { + if (Current.is(TT_LambdaArrow) && Style.Language == FormatStyle::LK_Java) CurrentState.NoLineBreak = true; - } if (Current.isMemberAccess() && Previous.is(tok::r_paren) && (Previous.MatchingParen && (Previous.TotalLength - Previous.MatchingParen->TotalLength > 10))) { @@ -1000,7 +998,7 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State, // // is common and should be formatted like a free-standing function. The same // goes for wrapping before the lambda return type arrow. - if (Current.isNot(TT_TrailingReturnArrow) && + if (Current.isNot(TT_LambdaArrow) && (!Style.isJavaScript() || Current.NestingLevel != 0 || !PreviousNonComment || PreviousNonComment->isNot(tok::equal) || !Current.isOneOf(Keywords.kw_async, Keywords.kw_function))) { @@ -1257,7 +1255,7 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) { } return CurrentState.Indent; } - if (Current.is(TT_TrailingReturnArrow) && + if (Current.is(TT_LambdaArrow) && Previous.isOneOf(tok::kw_noexcept, tok::kw_mutable, tok::kw_constexpr, tok::kw_consteval, tok::kw_static, TT_AttributeSquare)) { return ContinuationIndent; @@ -1590,7 +1588,7 @@ unsigned ContinuationIndenter::moveStateToNextToken(LineState &State, } if (Current.isOneOf(TT_BinaryOperator, TT_ConditionalExpr) && Newline) CurrentState.NestedBlockIndent = State.Column + Current.ColumnWidth + 1; - if (Current.isOneOf(TT_LambdaLSquare, TT_TrailingReturnArrow)) + if (Current.isOneOf(TT_LambdaLSquare, TT_LambdaArrow)) CurrentState.LastSpace = State.Column; if (Current.is(TT_RequiresExpression) && Style.RequiresExpressionIndentation == FormatStyle::REI_Keyword) { diff --git a/contrib/llvm-project/clang/lib/Format/FormatToken.h b/contrib/llvm-project/clang/lib/Format/FormatToken.h index cc45d5a8c5c1..9bfeb2052164 100644 --- a/contrib/llvm-project/clang/lib/Format/FormatToken.h +++ b/contrib/llvm-project/clang/lib/Format/FormatToken.h @@ -102,6 +102,7 @@ namespace format { TYPE(JsTypeColon) \ TYPE(JsTypeOperator) \ TYPE(JsTypeOptionalQuestion) \ + TYPE(LambdaArrow) \ TYPE(LambdaLBrace) \ TYPE(LambdaLSquare) \ TYPE(LeadingJavaAnnotation) \ @@ -725,7 +726,7 @@ public: bool isMemberAccess() const { return isOneOf(tok::arrow, tok::period, tok::arrowstar) && !isOneOf(TT_DesignatedInitializerPeriod, TT_TrailingReturnArrow, - TT_LeadingJavaAnnotation); + TT_LambdaArrow, TT_LeadingJavaAnnotation); } bool isPointerOrReference() const { diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 6b9253613788..3f00a28e6298 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -249,7 +249,7 @@ private: if (Precedence > prec::Conditional && Precedence < prec::Relational) return false; } - if (Prev.is(TT_ConditionalExpr)) + if (Prev.isOneOf(tok::question, tok::colon) && !Style.isProto()) SeenTernaryOperator = true; updateParameterCount(Left, CurrentToken); if (Style.Language == FormatStyle::LK_Proto) { @@ -831,7 +831,7 @@ private: } // An arrow after an ObjC method expression is not a lambda arrow. if (CurrentToken->is(TT_ObjCMethodExpr) && CurrentToken->Next && - CurrentToken->Next->is(TT_TrailingReturnArrow)) { + CurrentToken->Next->is(TT_LambdaArrow)) { CurrentToken->Next->overwriteFixedType(TT_Unknown); } Left->MatchingParen = CurrentToken; @@ -1769,8 +1769,10 @@ private: } break; case tok::arrow: - if (Tok->Previous && Tok->Previous->is(tok::kw_noexcept)) + if (Tok->isNot(TT_LambdaArrow) && Tok->Previous && + Tok->Previous->is(tok::kw_noexcept)) { Tok->setType(TT_TrailingReturnArrow); + } break; case tok::equal: // In TableGen, there must be a value after "="; @@ -2056,11 +2058,11 @@ private: TT_LambdaLSquare, TT_LambdaLBrace, TT_AttributeMacro, TT_IfMacro, TT_ForEachMacro, TT_TypenameMacro, TT_FunctionLBrace, TT_ImplicitStringLiteral, TT_InlineASMBrace, TT_FatArrow, - TT_NamespaceMacro, TT_OverloadedOperator, TT_RegexLiteral, - TT_TemplateString, TT_ObjCStringLiteral, TT_UntouchableMacroFunc, - TT_StatementAttributeLikeMacro, TT_FunctionLikeOrFreestandingMacro, - TT_ClassLBrace, TT_EnumLBrace, TT_RecordLBrace, TT_StructLBrace, - TT_UnionLBrace, TT_RequiresClause, + TT_LambdaArrow, TT_NamespaceMacro, TT_OverloadedOperator, + TT_RegexLiteral, TT_TemplateString, TT_ObjCStringLiteral, + TT_UntouchableMacroFunc, TT_StatementAttributeLikeMacro, + TT_FunctionLikeOrFreestandingMacro, TT_ClassLBrace, TT_EnumLBrace, + TT_RecordLBrace, TT_StructLBrace, TT_UnionLBrace, TT_RequiresClause, TT_RequiresClauseInARequiresExpression, TT_RequiresExpression, TT_RequiresExpressionLParen, TT_RequiresExpressionLBrace, TT_BracedListLBrace)) { @@ -2246,7 +2248,7 @@ private: Contexts.back().IsExpression = true; } else if (Current.is(TT_TrailingReturnArrow)) { Contexts.back().IsExpression = false; - } else if (Current.is(Keywords.kw_assert)) { + } else if (Current.isOneOf(TT_LambdaArrow, Keywords.kw_assert)) { Contexts.back().IsExpression = Style.Language == FormatStyle::LK_Java; } else if (Current.Previous && Current.Previous->is(TT_CtorInitializerColon)) { @@ -2381,7 +2383,7 @@ private: AutoFound = true; } else if (Current.is(tok::arrow) && Style.Language == FormatStyle::LK_Java) { - Current.setType(TT_TrailingReturnArrow); + Current.setType(TT_LambdaArrow); } else if (Current.is(tok::arrow) && Style.isVerilog()) { // The implication operator. Current.setType(TT_BinaryOperator); @@ -2874,6 +2876,8 @@ private: // Search for unexpected tokens. for (auto *Prev = BeforeRParen; Prev != LParen; Prev = Prev->Previous) { if (Prev->is(tok::r_paren)) { + if (Prev->is(TT_CastRParen)) + return false; Prev = Prev->MatchingParen; if (!Prev) return false; @@ -3276,7 +3280,7 @@ private: } if (Current->is(TT_JsComputedPropertyName)) return prec::Assignment; - if (Current->is(TT_TrailingReturnArrow)) + if (Current->is(TT_LambdaArrow)) return prec::Comma; if (Current->is(TT_FatArrow)) return prec::Assignment; @@ -4200,7 +4204,7 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line, } if (Right.is(TT_PointerOrReference)) return 190; - if (Right.is(TT_TrailingReturnArrow)) + if (Right.is(TT_LambdaArrow)) return 110; if (Left.is(tok::equal) && Right.is(tok::l_brace)) return 160; @@ -4467,10 +4471,8 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, } if (Left.is(tok::colon)) return Left.isNot(TT_ObjCMethodExpr); - if (Left.is(tok::coloncolon)) { - return Right.is(tok::star) && Right.is(TT_PointerOrReference) && - Style.PointerAlignment != FormatStyle::PAS_Left; - } + if (Left.is(tok::coloncolon)) + return false; if (Left.is(tok::less) || Right.isOneOf(tok::greater, tok::less)) { if (Style.Language == FormatStyle::LK_TextProto || (Style.Language == FormatStyle::LK_Proto && @@ -4580,8 +4582,14 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (!BeforeLeft) return false; if (BeforeLeft->is(tok::coloncolon)) { - return Left.is(tok::star) && - Style.PointerAlignment != FormatStyle::PAS_Right; + if (Left.isNot(tok::star)) + return false; + assert(Style.PointerAlignment != FormatStyle::PAS_Right); + if (!Right.startsSequence(tok::identifier, tok::r_paren)) + return true; + assert(Right.Next); + const auto *LParen = Right.Next->MatchingParen; + return !LParen || LParen->isNot(TT_FunctionTypeLParen); } return !BeforeLeft->isOneOf(tok::l_paren, tok::l_square); } @@ -5274,9 +5282,10 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, return false; } - if (Right.is(TT_TrailingReturnArrow) || Left.is(TT_TrailingReturnArrow)) + if (Right.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow) || + Left.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow)) { return true; - + } if (Left.is(tok::comma) && Right.isNot(TT_OverloadedOperatorLParen) && // In an unexpanded macro call we only find the parentheses and commas // in a line; the commas and closing parenthesis do not require a space. @@ -6294,8 +6303,8 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line, return Left.isOneOf(tok::comma, tok::coloncolon, tok::semi, tok::l_brace, tok::kw_class, tok::kw_struct, tok::comment) || Right.isMemberAccess() || - Right.isOneOf(TT_TrailingReturnArrow, tok::lessless, tok::colon, - tok::l_square, tok::at) || + Right.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow, tok::lessless, + tok::colon, tok::l_square, tok::at) || (Left.is(tok::r_paren) && Right.isOneOf(tok::identifier, tok::kw_const)) || (Left.is(tok::l_paren) && Right.isNot(tok::r_paren)) || diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp index 688c7c5b1e97..60e65aaa83e9 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp @@ -609,9 +609,8 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { ProbablyBracedList = NextTok->isNot(tok::l_square); } - // Cpp macro definition body that is a nonempty braced list or block: + // Cpp macro definition body containing nonempty braced list or block: if (IsCpp && Line->InMacroBody && PrevTok != FormatTok && - !FormatTok->Previous && NextTok->is(tok::eof) && // A statement can end with only `;` (simple statement), a block // closing brace (compound statement), or `:` (label statement). // If PrevTok is a block opening brace, Tok ends an empty block. @@ -2322,7 +2321,7 @@ bool UnwrappedLineParser::tryToParseLambda() { // This might or might not actually be a lambda arrow (this could be an // ObjC method invocation followed by a dereferencing arrow). We might // reset this back to TT_Unknown in TokenAnnotator. - FormatTok->setFinalizedType(TT_TrailingReturnArrow); + FormatTok->setFinalizedType(TT_LambdaArrow); SeenArrow = true; nextToken(); break; @@ -2668,6 +2667,7 @@ void UnwrappedLineParser::parseSquare(bool LambdaIntroducer) { break; } case tok::at: + case tok::colon: nextToken(); if (FormatTok->is(tok::l_brace)) { nextToken(); @@ -3978,6 +3978,9 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { auto IsNonMacroIdentifier = [](const FormatToken *Tok) { return Tok->is(tok::identifier) && Tok->TokenText != Tok->TokenText.upper(); }; + // JavaScript/TypeScript supports anonymous classes like: + // a = class extends foo { } + bool JSPastExtendsOrImplements = false; // The actual identifier can be a nested name specifier, and in macros // it is often token-pasted. // An [[attribute]] can be before the identifier. @@ -3988,6 +3991,7 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { FormatTok->isOneOf(tok::period, tok::comma))) { if (Style.isJavaScript() && FormatTok->isOneOf(Keywords.kw_extends, Keywords.kw_implements)) { + JSPastExtendsOrImplements = true; // JavaScript/TypeScript supports inline object types in // extends/implements positions: // class Foo implements {bar: number} { } @@ -4011,10 +4015,11 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { } break; case tok::coloncolon: + case tok::hashhash: break; default: - if (!ClassName && Previous->is(tok::identifier) && - Previous->isNot(TT_AttributeMacro)) { + if (!JSPastExtendsOrImplements && !ClassName && + Previous->is(tok::identifier) && Previous->isNot(TT_AttributeMacro)) { ClassName = Previous; } } diff --git a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp index a31874a7c319..fd4a40a86082 100644 --- a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp +++ b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp @@ -469,7 +469,9 @@ AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsigned End, // except if the token is equal, then a space is needed. if ((Style.PointerAlignment == FormatStyle::PAS_Right || Style.ReferenceAlignment == FormatStyle::RAS_Right) && - CurrentChange.Spaces != 0 && CurrentChange.Tok->isNot(tok::equal)) { + CurrentChange.Spaces != 0 && + !CurrentChange.Tok->isOneOf(tok::equal, tok::r_paren, + TT_TemplateCloser)) { const bool ReferenceNotRightAligned = Style.ReferenceAlignment != FormatStyle::RAS_Right && Style.ReferenceAlignment != FormatStyle::RAS_Pointer; diff --git a/contrib/llvm-project/clang/lib/Headers/emmintrin.h b/contrib/llvm-project/clang/lib/Headers/emmintrin.h index e85bfc47aa5c..4dff6421350c 100644 --- a/contrib/llvm-project/clang/lib/Headers/emmintrin.h +++ b/contrib/llvm-project/clang/lib/Headers/emmintrin.h @@ -1771,7 +1771,7 @@ static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_undefined_pd(void) { /// lower 64 bits contain the value of the parameter. The upper 64 bits are /// set to zero. static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_set_sd(double __w) { - return __extension__(__m128d){__w, 0}; + return __extension__(__m128d){__w, 0.0}; } /// Constructs a 128-bit floating-point vector of [2 x double], with each diff --git a/contrib/llvm-project/clang/lib/Headers/xmmintrin.h b/contrib/llvm-project/clang/lib/Headers/xmmintrin.h index 1ef89de9c9f5..6fb27297af92 100644 --- a/contrib/llvm-project/clang/lib/Headers/xmmintrin.h +++ b/contrib/llvm-project/clang/lib/Headers/xmmintrin.h @@ -1910,7 +1910,7 @@ _mm_undefined_ps(void) static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_set_ss(float __w) { - return __extension__ (__m128){ __w, 0, 0, 0 }; + return __extension__ (__m128){ __w, 0.0f, 0.0f, 0.0f }; } /// Constructs a 128-bit floating-point vector of [4 x float], with each diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp index 8995d461362d..a09e3be83c45 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -20,6 +20,7 @@ #include "clang/AST/Expr.h" #include "clang/AST/ExprConcepts.h" #include "clang/AST/PrettyDeclStackTrace.h" +#include "clang/AST/RecursiveASTVisitor.h" #include "clang/AST/Type.h" #include "clang/AST/TypeLoc.h" #include "clang/AST/TypeVisitor.h" @@ -87,12 +88,19 @@ struct Response { // than lambda classes. const FunctionDecl * getPrimaryTemplateOfGenericLambda(const FunctionDecl *LambdaCallOperator) { + if (!isLambdaCallOperator(LambdaCallOperator)) + return LambdaCallOperator; while (true) { if (auto *FTD = dyn_cast_if_present( LambdaCallOperator->getDescribedTemplate()); FTD && FTD->getInstantiatedFromMemberTemplate()) { LambdaCallOperator = FTD->getInstantiatedFromMemberTemplate()->getTemplatedDecl(); + } else if (LambdaCallOperator->getPrimaryTemplate()) { + // Cases where the lambda operator is instantiated in + // TemplateDeclInstantiator::VisitCXXMethodDecl. + LambdaCallOperator = + LambdaCallOperator->getPrimaryTemplate()->getTemplatedDecl(); } else if (auto *Prev = cast(LambdaCallOperator) ->getInstantiatedFromMemberFunction()) LambdaCallOperator = Prev; @@ -138,22 +146,28 @@ getEnclosingTypeAliasTemplateDecl(Sema &SemaRef) { // Check if we are currently inside of a lambda expression that is // surrounded by a using alias declaration. e.g. // template using type = decltype([](auto) { ^ }()); -// By checking if: -// 1. The lambda expression and the using alias declaration share the -// same declaration context. -// 2. They have the same template depth. // We have to do so since a TypeAliasTemplateDecl (or a TypeAliasDecl) is never // a DeclContext, nor does it have an associated specialization Decl from which // we could collect these template arguments. bool isLambdaEnclosedByTypeAliasDecl( - const FunctionDecl *PrimaryLambdaCallOperator, + const FunctionDecl *LambdaCallOperator, const TypeAliasTemplateDecl *PrimaryTypeAliasDecl) { - return cast(PrimaryLambdaCallOperator->getDeclContext()) - ->getTemplateDepth() == - PrimaryTypeAliasDecl->getTemplateDepth() && - getLambdaAwareParentOfDeclContext( - const_cast(PrimaryLambdaCallOperator)) == - PrimaryTypeAliasDecl->getDeclContext(); + struct Visitor : RecursiveASTVisitor { + Visitor(const FunctionDecl *CallOperator) : CallOperator(CallOperator) {} + bool VisitLambdaExpr(const LambdaExpr *LE) { + // Return true to bail out of the traversal, implying the Decl contains + // the lambda. + return getPrimaryTemplateOfGenericLambda(LE->getCallOperator()) != + CallOperator; + } + const FunctionDecl *CallOperator; + }; + + QualType Underlying = + PrimaryTypeAliasDecl->getTemplatedDecl()->getUnderlyingType(); + + return !Visitor(getPrimaryTemplateOfGenericLambda(LambdaCallOperator)) + .TraverseType(Underlying); } // Add template arguments from a variable template instantiation. @@ -290,23 +304,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, // If this function is a generic lambda specialization, we are done. if (!ForConstraintInstantiation && - isGenericLambdaCallOperatorOrStaticInvokerSpecialization(Function)) { - // TypeAliasTemplateDecls should be taken into account, e.g. - // when we're deducing the return type of a lambda. - // - // template int Value = 0; - // template - // using T = decltype([]() { return Value; }()); - // - if (auto TypeAlias = getEnclosingTypeAliasTemplateDecl(SemaRef)) { - if (isLambdaEnclosedByTypeAliasDecl( - /*PrimaryLambdaCallOperator=*/getPrimaryTemplateOfGenericLambda( - Function), - /*PrimaryTypeAliasDecl=*/TypeAlias.PrimaryTypeAliasDecl)) - return Response::UseNextDecl(Function); - } + isGenericLambdaCallOperatorOrStaticInvokerSpecialization(Function)) return Response::Done(); - } } else if (Function->getDescribedFunctionTemplate()) { assert( @@ -418,10 +417,9 @@ Response HandleRecordDecl(Sema &SemaRef, const CXXRecordDecl *Rec, // Retrieve the template arguments for a using alias declaration. // This is necessary for constraint checking, since we always keep // constraints relative to the primary template. - if (auto TypeAlias = getEnclosingTypeAliasTemplateDecl(SemaRef)) { - const FunctionDecl *PrimaryLambdaCallOperator = - getPrimaryTemplateOfGenericLambda(Rec->getLambdaCallOperator()); - if (isLambdaEnclosedByTypeAliasDecl(PrimaryLambdaCallOperator, + if (auto TypeAlias = getEnclosingTypeAliasTemplateDecl(SemaRef); + ForConstraintInstantiation && TypeAlias) { + if (isLambdaEnclosedByTypeAliasDecl(Rec->getLambdaCallOperator(), TypeAlias.PrimaryTypeAliasDecl)) { Result.addOuterTemplateArguments(TypeAlias.Template, TypeAlias.AssociatedTemplateArguments, @@ -1642,12 +1640,17 @@ namespace { CXXRecordDecl::LambdaDependencyKind ComputeLambdaDependency(LambdaScopeInfo *LSI) { - auto &CCS = SemaRef.CodeSynthesisContexts.back(); - if (CCS.Kind == - Sema::CodeSynthesisContext::TypeAliasTemplateInstantiation) { - unsigned TypeAliasDeclDepth = CCS.Entity->getTemplateDepth(); + if (auto TypeAlias = + TemplateInstArgsHelpers::getEnclosingTypeAliasTemplateDecl( + getSema()); + TypeAlias && TemplateInstArgsHelpers::isLambdaEnclosedByTypeAliasDecl( + LSI->CallOperator, TypeAlias.PrimaryTypeAliasDecl)) { + unsigned TypeAliasDeclDepth = TypeAlias.Template->getTemplateDepth(); if (TypeAliasDeclDepth >= TemplateArgs.getNumSubstitutedLevels()) return CXXRecordDecl::LambdaDependencyKind::LDK_AlwaysDependent; + for (const TemplateArgument &TA : TypeAlias.AssociatedTemplateArguments) + if (TA.isDependent()) + return CXXRecordDecl::LambdaDependencyKind::LDK_AlwaysDependent; } return inherited::ComputeLambdaDependency(LSI); } diff --git a/contrib/llvm-project/clang/lib/Serialization/ASTWriter.cpp b/contrib/llvm-project/clang/lib/Serialization/ASTWriter.cpp index 7c0636962459..cb63dec92e33 100644 --- a/contrib/llvm-project/clang/lib/Serialization/ASTWriter.cpp +++ b/contrib/llvm-project/clang/lib/Serialization/ASTWriter.cpp @@ -3963,6 +3963,9 @@ void ASTWriter::WriteIdentifierTable(Preprocessor &PP, } void ASTWriter::handleVTable(CXXRecordDecl *RD) { + if (!RD->isInNamedModule()) + return; + PendingEmittingVTables.push_back(RD); } diff --git a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp index 6362c82b009d..0bb5739db4b7 100644 --- a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp +++ b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp @@ -12,6 +12,7 @@ #include "clang/StaticAnalyzer/Checkers/Taint.h" #include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h" #include @@ -256,6 +257,12 @@ std::vector taint::getTaintedSymbolsImpl(ProgramStateRef State, if (!Sym) return TaintedSymbols; + // HACK:https://discourse.llvm.org/t/rfc-make-istainted-and-complex-symbols-friends/79570 + if (const auto &Opts = State->getAnalysisManager().getAnalyzerOptions(); + Sym->computeComplexity() > Opts.MaxTaintedSymbolComplexity) { + return {}; + } + // Traverse all the symbols this symbol depends on to see if any are tainted. for (SymbolRef SubSym : Sym->symbols()) { if (!isa(SubSym)) diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h index 294e330c4d56..eebfb00aad7a 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h @@ -194,7 +194,16 @@ typedef u64 OFF64_T; #ifdef __SIZE_TYPE__ typedef __SIZE_TYPE__ usize; #else +// Since we use this for operator new, usize must match the real size_t, but on +// 32-bit Windows the definition of uptr does not actually match uintptr_t or +// size_t because we are working around typedef mismatches for the (S)SIZE_T +// types used in interception.h. +// Until the definition of uptr has been fixed we have to special case Win32. +# if SANITIZER_WINDOWS && SANITIZER_WORDSIZE == 32 +typedef unsigned int usize; +# else typedef uptr usize; +# endif #endif typedef u64 tid_t; diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp index 8d375ffcd079..648df0c4e5a7 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp @@ -35,7 +35,7 @@ // access stat from asm/stat.h, without conflicting with definition in // sys/stat.h, we use this trick. sparc64 is similar, using // syscall(__NR_stat64) and struct kernel_stat64. -# if SANITIZER_MIPS64 || SANITIZER_SPARC64 +# if SANITIZER_LINUX && (SANITIZER_MIPS64 || SANITIZER_SPARC64) # include # include # define stat kernel_stat diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cpp index afcd01dae0b7..6fc18396ca63 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cpp +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cpp @@ -70,10 +70,17 @@ void BufferedStackTrace::UnwindSlow(uptr pc, void *context, u32 max_depth) { stack_frame.AddrStack.Offset = ctx.Rsp; # endif # else +# if SANITIZER_ARM + int machine_type = IMAGE_FILE_MACHINE_ARM; + stack_frame.AddrPC.Offset = ctx.Pc; + stack_frame.AddrFrame.Offset = ctx.R11; + stack_frame.AddrStack.Offset = ctx.Sp; +# else int machine_type = IMAGE_FILE_MACHINE_I386; stack_frame.AddrPC.Offset = ctx.Eip; stack_frame.AddrFrame.Offset = ctx.Ebp; stack_frame.AddrStack.Offset = ctx.Esp; +# endif # endif stack_frame.AddrPC.Mode = AddrModeFlat; stack_frame.AddrFrame.Mode = AddrModeFlat; diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp index 995f00eddc38..8a80d5475136 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp @@ -992,8 +992,13 @@ void SignalContext::InitPcSpBp() { sp = (uptr)context_record->Rsp; # endif # else +# if SANITIZER_ARM + bp = (uptr)context_record->R11; + sp = (uptr)context_record->Sp; +# else bp = (uptr)context_record->Ebp; sp = (uptr)context_record->Esp; +# endif # endif } diff --git a/contrib/llvm-project/libcxx/include/__algorithm/three_way_comp_ref_type.h b/contrib/llvm-project/libcxx/include/__algorithm/three_way_comp_ref_type.h index 70c5818976f0..5702a1fee082 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/three_way_comp_ref_type.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/three_way_comp_ref_type.h @@ -9,6 +9,7 @@ #ifndef _LIBCPP___ALGORITHM_THREE_WAY_COMP_REF_TYPE_H #define _LIBCPP___ALGORITHM_THREE_WAY_COMP_REF_TYPE_H +#include <__assert> #include <__compare/ordering.h> #include <__config> #include <__utility/declval.h> diff --git a/contrib/llvm-project/libcxx/include/format b/contrib/llvm-project/libcxx/include/format index c3f2b45f0f73..a88b3ef8528e 100644 --- a/contrib/llvm-project/libcxx/include/format +++ b/contrib/llvm-project/libcxx/include/format @@ -237,21 +237,21 @@ namespace std { # include # include # include -# include # include # include +# include # include # include +# include +# include # include # include # include # include -#endif -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 *** 3011 LINES SKIPPED *** From nobody Sun Dec 1 11:18:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYq3VBYz5fTWV; Sun, 01 Dec 2024 11:18:55 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYq21c9z433X; Sun, 1 Dec 2024 11:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c3jZhqsNKWgfbaGeEB3ZROHc3Pqtei0r25CQqzjatUY=; b=m5MEzJ8SWVAy4B9LpMfOfWBsbAn+ZeK2km8iExYypGCwE98LnhRmZsuvQRQy542BhPVhvg uRjxEON/VD4x+lx9fEFuucq17we3h8w8rAu0KCbcxGLL0/kH4YiJKynb79lk+2r+QUeqoa Mk36WR1uQ+T1gtgu0P4uUjzjVYmbDAtwkaqZlVdH83UUp41y/e1ioAmDIzW7Q+7aufad4N X2wGMD6LjE4J2nWygy/YomJB+1hZ+SrfuIngJEqqIVSN3p09ycDJkjPbz4Mj18z5R3yPmf qKreskQygIHeGZqqoTMn5/eDKkLzpqBzR2e7NoPwhnMCzvrQU2F8Z9da45Ihtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c3jZhqsNKWgfbaGeEB3ZROHc3Pqtei0r25CQqzjatUY=; b=RQC+cqz2CsHe+U4bnsPfX9ghz26FIdj+v7Lz/nFhdQM5suQji35SVa/K/0VGosR3145p/2 WLO4yWJLHSK47oCvIBd8gX2XQVdjirtHzEm1muKJ/cIfBxXjHca1SnlQnM4VsMD/0DCHNW 5nZ+wSUa3ZbIN0u1c4qSrA2t8SwtYRlSDi3kkMQZMWgAOd9SVWS5xxIuLypZBvpHmD3XRS 2w6kjbh6XJihfrw4XTlLlwvW3HZv6YAxIE7SWsXXFeB24ip9vIeIHtDK8K+mxSgYVkxFj9 JRf1v898rInLwYX6T8OgUcl+0ldQK6g/9mtqftQdgQzkd6atPz/PAnuvtVkPUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051935; a=rsa-sha256; cv=none; b=A5aIdEqFGb0S99HLcal6KTffq9lUIMQ7kEcTb0soKTrLHHZiYN8wm+ovrQg310EPkob2Nm ePoKHl/7/41S1800BDLnYxqJFLIUfOX4CxvphW7bWCPx5XL3NSGhw+Bhf9Nktib70cskzt SF3Zy7ULW8FPVG3Q4LoYpKxvWyszOL58z5Yza1WjQcdxFrIr9ay9RH413se2lhJ8lrMOZg PZKIzpBgqlLeps8sBj18DEXF/f2qW4I8yaL8ZyRXZQ7NQlfxgazNvA6s524K5/vbM01Hg7 MGJQ4sbiABSw920genhGapx+bHhriqm16/O2KOZbiYXTuWppGSSA5yO21gWUOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYq0MM5zqGX; Sun, 1 Dec 2024 11:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIs6q008736; Sun, 1 Dec 2024 11:18:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIsC2008733; Sun, 1 Dec 2024 11:18:54 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:54 GMT Message-Id: <202412011118.4B1BIsC2008733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: ab462c8c5a53 - stable/14 - Merge commit 6dbdb8430b49 from llvm git (by Nikolas Klauser): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ab462c8c5a53d4d71327ad009b3582d87f41b24e Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ab462c8c5a53d4d71327ad009b3582d87f41b24e commit ab462c8c5a53d4d71327ad009b3582d87f41b24e Author: Dimitry Andric AuthorDate: 2024-09-11 10:17:00 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:14 +0000 Merge commit 6dbdb8430b49 from llvm git (by Nikolas Klauser): [Clang] Fix crash due to invalid source location in __is_trivially_equality_comparable (#107815) Fixes #107777 This fixes an assertion failure building www/qt5-webengine: Assertion failed: (Loc.isValid() && "point of instantiation must be valid!"), function setPointOfInstantiation, file contrib/llvm-project/clang/include/clang/AST/DeclTemplate.h, line 1938. PR: 280562 MFC after: 1 month (cherry picked from commit 835c3a3e69af562ec6d4ec3639938c96dad1697e) --- contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp index 14d1f395af90..de50786f4d6c 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp @@ -5140,7 +5140,8 @@ static bool HasNonDeletedDefaultedEqualityComparison(Sema &S, // const ClassT& obj; OpaqueValueExpr Operand( - {}, Decl->getTypeForDecl()->getCanonicalTypeUnqualified().withConst(), + KeyLoc, + Decl->getTypeForDecl()->getCanonicalTypeUnqualified().withConst(), ExprValueKind::VK_LValue); UnresolvedSet<16> Functions; // obj == obj; From nobody Sun Dec 1 11:18:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYr3MJvz5fTCx; Sun, 01 Dec 2024 11:18:56 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYr1T23z433k; Sun, 1 Dec 2024 11:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r/KJlth7vwP8G+kNwozz8tMjSS35Yv+BCCWuwhh92rs=; b=EQ5QvE9MVd0/Bcx7L2eF2rUBrXMsKNQZYqoDCfbqOYZnk/lmsI4W6QxYED+wNn5YOS4y2t r6TsfWRRXMR1Ruv1sqQdp2zljK0T1137263nX2T18CtjNH3n1aYbVRnPs41q8DZ1uEIKVq P+ignXgxXUkoMegi3/Q3rnoVl4uq18JPiePNOWCbG05Mo6iPQ4GrPp/KJ7KTGuzGDSZyPk rYmBPkIB/Zl7k+D69UBJEJ4lCjDhA/t/EfJ0ybbqH5w1W//XBufJ70MbRNMQDOHPn4Yo5d MWP0/J29ICQOzmZWdEfDM2Lzy8t7ffJM+j1kjM8kgNbqaxTWo4S+dhGROFB+Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r/KJlth7vwP8G+kNwozz8tMjSS35Yv+BCCWuwhh92rs=; b=A869/kmxdANe5tDpYLVHtcUWsqB/IGBpxEV+k8eMEqINtTlEbLJWM9DPgkSjHz4gh9u6PS Ozb6EWc5rxjwEqyTfe0x399N28U+0APXDHktOvCB9Ho3QdKZ7ju6XNTYOwZj2AFS4SN64V dkjQCxNZ20CZKqCmPESomrTKP7LNxtBnAuKIau6PNAaZqDZCWUZ+Eq0N2cEwajiqf1F4Q5 pbM3PAXcIuU1hLBlw8PwNfxQxQOBxYJMFUU9p0o+yW0X41NvrYSRiNpXvkF0Cr/l2vlqTu dewOxkm+c6QyEkTPB1uXCORdZSCAcsYl7HjZtqNoBGmG85Uvwj7jl8G5dnCTfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051936; a=rsa-sha256; cv=none; b=WPGP4h3XwGTa5jRPL2PHNNEWfWCEN2UPHkgi1TX2x0p/DXicRNlgPufkufaHUkQ7EoVhM3 ALLlXVoWY+bGAl/OGt+EKlSy4JidAQOYqFxRZ0LYcpcueODjr+qHWmy8QnuEienUubxk+K GvN8XGM7p9k2cHjvbOgUrxTiMWuZ0xVqH7/QbhpZXWeys9yTGKv7yZhWDqOwP8+wbvmPWK tzyZo2JMHFeM4ZWZLj8zFEvs63K58JW2KYmU5i4ur0Pf7LxBEUZD22oZHcnk0jqTUaa9u8 CqJ5DT1/TSHUFEjCegSUoudozcOfJECTLxxTJnE2N9FBMBjN7Bv1JGacrZIvHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYr11rBzqB2; Sun, 1 Dec 2024 11:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIuv5008775; Sun, 1 Dec 2024 11:18:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIu6x008772; Sun, 1 Dec 2024 11:18:56 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:56 GMT Message-Id: <202412011118.4B1BIu6x008772@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 340cad008ec3 - stable/14 - Merge llvm-project release/19.x llvmorg-19.1.0-0-ga4bf6cd7cfb1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 340cad008ec35ee8c2af35911168be86e5625a0b Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=340cad008ec35ee8c2af35911168be86e5625a0b commit 340cad008ec35ee8c2af35911168be86e5625a0b Author: Dimitry Andric AuthorDate: 2024-09-22 09:48:03 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:14 +0000 Merge llvm-project release/19.x llvmorg-19.1.0-0-ga4bf6cd7cfb1 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-0-ga4bf6cd7cfb1, a.k.a. 19.1.0 release. PR: 280562 MFC after: 1 month (cherry picked from commit c80e69b00d976a5a3b3e84527f270fa7e72a8205) --- .../llvm-project/clang/lib/Basic/Targets/X86.cpp | 4 + contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 146 +++++++++------------ .../llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 23 ++-- contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp | 2 +- .../clang/lib/CodeGen/CodeGenFunction.h | 7 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 6 +- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 21 ++- contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp | 1 - contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp | 2 +- .../clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 5 +- .../compiler-rt/lib/builtins/cpu_model/x86.c | 20 +++ .../llvm-project/compiler-rt/lib/builtins/divtc3.c | 2 +- .../llvm-project/compiler-rt/lib/builtins/multc3.c | 2 +- contrib/llvm-project/libcxx/include/chrono | 2 +- contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp | 8 +- .../include/llvm/TargetParser/X86TargetParser.def | 3 + .../include/llvm/TargetParser/X86TargetParser.h | 1 + .../llvm/lib/CodeGen/ModuloSchedule.cpp | 3 + .../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 4 + contrib/llvm-project/llvm/lib/IR/BasicBlock.cpp | 12 +- .../lib/Target/AArch64/AArch64FrameLowering.cpp | 33 ----- .../llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 4 - .../llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | 30 +++-- .../llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 9 +- .../llvm/lib/Target/RISCV/RISCVInstrInfo.cpp | 2 +- contrib/llvm-project/llvm/lib/Target/X86/X86.td | 15 +++ .../llvm/lib/Target/X86/X86PfmCounters.td | 1 + .../llvm-project/llvm/lib/TargetParser/Host.cpp | 19 +++ .../llvm/lib/TargetParser/X86TargetParser.cpp | 5 + .../lib/Transforms/Vectorize/SLPVectorizer.cpp | 8 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 4 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 4 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 37 files changed, 237 insertions(+), 187 deletions(-) diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp index 18e6dbf03e00..072c97e6c8c6 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp @@ -723,6 +723,9 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, case CK_ZNVER4: defineCPUMacros(Builder, "znver4"); break; + case CK_ZNVER5: + defineCPUMacros(Builder, "znver5"); + break; case CK_Geode: defineCPUMacros(Builder, "geode"); break; @@ -1613,6 +1616,7 @@ std::optional X86TargetInfo::getCPUCacheLineSize() const { case CK_ZNVER2: case CK_ZNVER3: case CK_ZNVER4: + case CK_ZNVER5: // Deprecated case CK_x86_64: case CK_x86_64_v2: diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp index 6e69e84a2344..d7ebffa8c5e4 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp @@ -1336,75 +1336,50 @@ static llvm::Value *CreateCoercedLoad(Address Src, llvm::Type *Ty, return CGF.Builder.CreateLoad(Tmp); } -// Function to store a first-class aggregate into memory. We prefer to -// store the elements rather than the aggregate to be more friendly to -// fast-isel. -// FIXME: Do we need to recurse here? -void CodeGenFunction::EmitAggregateStore(llvm::Value *Val, Address Dest, - bool DestIsVolatile) { - // Prefer scalar stores to first-class aggregate stores. - if (llvm::StructType *STy = dyn_cast(Val->getType())) { - for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { - Address EltPtr = Builder.CreateStructGEP(Dest, i); - llvm::Value *Elt = Builder.CreateExtractValue(Val, i); - Builder.CreateStore(Elt, EltPtr, DestIsVolatile); - } - } else { - Builder.CreateStore(Val, Dest, DestIsVolatile); - } -} - -/// CreateCoercedStore - Create a store to \arg DstPtr from \arg Src, -/// where the source and destination may have different types. The -/// destination is known to be aligned to \arg DstAlign bytes. -/// -/// This safely handles the case when the src type is larger than the -/// destination type; the upper bits of the src will be lost. -static void CreateCoercedStore(llvm::Value *Src, - Address Dst, - bool DstIsVolatile, - CodeGenFunction &CGF) { - llvm::Type *SrcTy = Src->getType(); - llvm::Type *DstTy = Dst.getElementType(); - if (SrcTy == DstTy) { - CGF.Builder.CreateStore(Src, Dst, DstIsVolatile); - return; - } - - llvm::TypeSize SrcSize = CGF.CGM.getDataLayout().getTypeAllocSize(SrcTy); - - if (llvm::StructType *DstSTy = dyn_cast(DstTy)) { - Dst = EnterStructPointerForCoercedAccess(Dst, DstSTy, - SrcSize.getFixedValue(), CGF); - DstTy = Dst.getElementType(); - } - - llvm::PointerType *SrcPtrTy = llvm::dyn_cast(SrcTy); - llvm::PointerType *DstPtrTy = llvm::dyn_cast(DstTy); - if (SrcPtrTy && DstPtrTy && - SrcPtrTy->getAddressSpace() != DstPtrTy->getAddressSpace()) { - Src = CGF.Builder.CreateAddrSpaceCast(Src, DstTy); - CGF.Builder.CreateStore(Src, Dst, DstIsVolatile); +void CodeGenFunction::CreateCoercedStore(llvm::Value *Src, Address Dst, + llvm::TypeSize DstSize, + bool DstIsVolatile) { + if (!DstSize) return; - } - // If the source and destination are integer or pointer types, just do an - // extension or truncation to the desired type. - if ((isa(SrcTy) || isa(SrcTy)) && - (isa(DstTy) || isa(DstTy))) { - Src = CoerceIntOrPtrToIntOrPtr(Src, DstTy, CGF); - CGF.Builder.CreateStore(Src, Dst, DstIsVolatile); - return; + llvm::Type *SrcTy = Src->getType(); + llvm::TypeSize SrcSize = CGM.getDataLayout().getTypeAllocSize(SrcTy); + + // GEP into structs to try to make types match. + // FIXME: This isn't really that useful with opaque types, but it impacts a + // lot of regression tests. + if (SrcTy != Dst.getElementType()) { + if (llvm::StructType *DstSTy = + dyn_cast(Dst.getElementType())) { + assert(!SrcSize.isScalable()); + Dst = EnterStructPointerForCoercedAccess(Dst, DstSTy, + SrcSize.getFixedValue(), *this); + } } - llvm::TypeSize DstSize = CGF.CGM.getDataLayout().getTypeAllocSize(DstTy); - - // If store is legal, just bitcast the src pointer. - if (isa(SrcTy) || - isa(DstTy) || - SrcSize.getFixedValue() <= DstSize.getFixedValue()) { - Dst = Dst.withElementType(SrcTy); - CGF.EmitAggregateStore(Src, Dst, DstIsVolatile); + if (SrcSize.isScalable() || SrcSize <= DstSize) { + if (SrcTy->isIntegerTy() && Dst.getElementType()->isPointerTy() && + SrcSize == CGM.getDataLayout().getTypeAllocSize(Dst.getElementType())) { + // If the value is supposed to be a pointer, convert it before storing it. + Src = CoerceIntOrPtrToIntOrPtr(Src, Dst.getElementType(), *this); + Builder.CreateStore(Src, Dst, DstIsVolatile); + } else if (llvm::StructType *STy = + dyn_cast(Src->getType())) { + // Prefer scalar stores to first-class aggregate stores. + Dst = Dst.withElementType(SrcTy); + for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { + Address EltPtr = Builder.CreateStructGEP(Dst, i); + llvm::Value *Elt = Builder.CreateExtractValue(Src, i); + Builder.CreateStore(Elt, EltPtr, DstIsVolatile); + } + } else { + Builder.CreateStore(Src, Dst.withElementType(SrcTy), DstIsVolatile); + } + } else if (SrcTy->isIntegerTy()) { + // If the source is a simple integer, coerce it directly. + llvm::Type *DstIntTy = Builder.getIntNTy(DstSize.getFixedValue() * 8); + Src = CoerceIntOrPtrToIntOrPtr(Src, DstIntTy, *this); + Builder.CreateStore(Src, Dst.withElementType(DstIntTy), DstIsVolatile); } else { // Otherwise do coercion through memory. This is stupid, but // simple. @@ -1416,12 +1391,12 @@ static void CreateCoercedStore(llvm::Value *Src, // FIXME: Assert that we aren't truncating non-padding bits when have access // to that information. RawAddress Tmp = - CreateTempAllocaForCoercion(CGF, SrcTy, Dst.getAlignment()); - CGF.Builder.CreateStore(Src, Tmp); - CGF.Builder.CreateMemCpy( - Dst.emitRawPointer(CGF), Dst.getAlignment().getAsAlign(), - Tmp.getPointer(), Tmp.getAlignment().getAsAlign(), - llvm::ConstantInt::get(CGF.IntPtrTy, DstSize.getFixedValue())); + CreateTempAllocaForCoercion(*this, SrcTy, Dst.getAlignment()); + Builder.CreateStore(Src, Tmp); + Builder.CreateMemCpy(Dst.emitRawPointer(*this), + Dst.getAlignment().getAsAlign(), Tmp.getPointer(), + Tmp.getAlignment().getAsAlign(), + Builder.CreateTypeSize(IntPtrTy, DstSize)); } } @@ -3309,7 +3284,12 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, assert(NumIRArgs == 1); auto AI = Fn->getArg(FirstIRArg); AI->setName(Arg->getName() + ".coerce"); - CreateCoercedStore(AI, Ptr, /*DstIsVolatile=*/false, *this); + CreateCoercedStore( + AI, Ptr, + llvm::TypeSize::getFixed( + getContext().getTypeSizeInChars(Ty).getQuantity() - + ArgI.getDirectOffset()), + /*DstIsVolatile=*/false); } // Match to what EmitParmDecl is expecting for this type. @@ -5939,17 +5919,8 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, llvm::Value *Imag = Builder.CreateExtractValue(CI, 1); return RValue::getComplex(std::make_pair(Real, Imag)); } - case TEK_Aggregate: { - Address DestPtr = ReturnValue.getAddress(); - bool DestIsVolatile = ReturnValue.isVolatile(); - - if (!DestPtr.isValid()) { - DestPtr = CreateMemTemp(RetTy, "agg.tmp"); - DestIsVolatile = false; - } - EmitAggregateStore(CI, DestPtr, DestIsVolatile); - return RValue::getAggregate(DestPtr); - } + case TEK_Aggregate: + break; case TEK_Scalar: { // If the argument doesn't match, perform a bitcast to coerce it. // This can happen due to trivial type mismatches. @@ -5959,7 +5930,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, return RValue::get(V); } } - llvm_unreachable("bad evaluation kind"); } // If coercing a fixed vector from a scalable vector for ABI @@ -5981,10 +5951,13 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, Address DestPtr = ReturnValue.getValue(); bool DestIsVolatile = ReturnValue.isVolatile(); + uint64_t DestSize = + getContext().getTypeInfoDataSizeInChars(RetTy).Width.getQuantity(); if (!DestPtr.isValid()) { DestPtr = CreateMemTemp(RetTy, "coerce"); DestIsVolatile = false; + DestSize = getContext().getTypeSizeInChars(RetTy).getQuantity(); } // An empty record can overlap other data (if declared with @@ -5993,7 +5966,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, if (!isEmptyRecord(getContext(), RetTy, true)) { // If the value is offset in memory, apply the offset now. Address StorePtr = emitAddressAtOffset(*this, DestPtr, RetAI); - CreateCoercedStore(CI, StorePtr, DestIsVolatile, *this); + CreateCoercedStore( + CI, StorePtr, + llvm::TypeSize::getFixed(DestSize - RetAI.getDirectOffset()), + DestIsVolatile); } return convertTempToRValue(DestPtr, RetTy, SourceLocation()); diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp index c3c10e73ff05..d9f44f4be617 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp @@ -131,15 +131,12 @@ public: EnsureDest(E->getType()); if (llvm::Value *Result = ConstantEmitter(CGF).tryEmitConstantExpr(E)) { - Address StoreDest = Dest.getAddress(); - // The emitted value is guaranteed to have the same size as the - // destination but can have a different type. Just do a bitcast in this - // case to avoid incorrect GEPs. - if (Result->getType() != StoreDest.getType()) - StoreDest = StoreDest.withElementType(Result->getType()); - - CGF.EmitAggregateStore(Result, StoreDest, - E->getType().isVolatileQualified()); + CGF.CreateCoercedStore( + Result, Dest.getAddress(), + llvm::TypeSize::getFixed( + Dest.getPreferredSize(CGF.getContext(), E->getType()) + .getQuantity()), + E->getType().isVolatileQualified()); return; } return Visit(E->getSubExpr()); @@ -2050,6 +2047,10 @@ CodeGenFunction::getOverlapForFieldInit(const FieldDecl *FD) { if (!FD->hasAttr() || !FD->getType()->isRecordType()) return AggValueSlot::DoesNotOverlap; + // Empty fields can overlap earlier fields. + if (FD->getType()->getAsCXXRecordDecl()->isEmpty()) + return AggValueSlot::MayOverlap; + // If the field lies entirely within the enclosing class's nvsize, its tail // padding cannot overlap any already-initialized object. (The only subobjects // with greater addresses that might already be initialized are vbases.) @@ -2072,6 +2073,10 @@ AggValueSlot::Overlap_t CodeGenFunction::getOverlapForBaseInit( if (IsVirtual) return AggValueSlot::MayOverlap; + // Empty bases can overlap earlier bases. + if (BaseRD->isEmpty()) + return AggValueSlot::MayOverlap; + // If the base class is laid out entirely within the nvsize of the derived // class, its tail padding cannot yet be initialized, so we can issue // stores at the full width of the base class. diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp index aa97f685ac7a..2f466602d2f6 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp @@ -745,7 +745,7 @@ void CodeGenFunction::EmitAttributedStmt(const AttributedStmt &S) { } break; case attr::CXXAssume: { const Expr *Assumption = cast(A)->getAssumption(); - if (getLangOpts().CXXAssumptions && + if (getLangOpts().CXXAssumptions && Builder.GetInsertBlock() && !Assumption->HasSideEffects(getContext())) { llvm::Value *AssumptionVal = EvaluateExprAsBool(Assumption); Builder.CreateAssumption(AssumptionVal); diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h index ba7b565d9755..60e6841e1b3d 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h @@ -4838,9 +4838,10 @@ public: void EmitAggFinalDestCopy(QualType Type, AggValueSlot Dest, const LValue &Src, ExprValueKind SrcKind); - /// Build all the stores needed to initialize an aggregate at Dest with the - /// value Val. - void EmitAggregateStore(llvm::Value *Val, Address Dest, bool DestIsVolatile); + /// Create a store to \arg DstPtr from \arg Src, truncating the stored value + /// to at most \arg DstSize bytes. + void CreateCoercedStore(llvm::Value *Src, Address Dst, llvm::TypeSize DstSize, + bool DstIsVolatile); /// EmitExtendGCLifetime - Given a pointer to an Objective-C object, /// make sure it survives garbage collection until this point. diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp index 60e65aaa83e9..7813d86ff0ea 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp @@ -570,7 +570,8 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { NextTok->isOneOf(Keywords.kw_of, Keywords.kw_in, Keywords.kw_as)); ProbablyBracedList = - ProbablyBracedList || (IsCpp && NextTok->is(tok::l_paren)); + ProbablyBracedList || (IsCpp && (PrevTok->Tok.isLiteral() || + NextTok->is(tok::l_paren))); // If there is a comma, semicolon or right paren after the closing // brace, we assume this is a braced initializer list. @@ -609,8 +610,9 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { ProbablyBracedList = NextTok->isNot(tok::l_square); } - // Cpp macro definition body containing nonempty braced list or block: + // Cpp macro definition body that is a nonempty braced list or block: if (IsCpp && Line->InMacroBody && PrevTok != FormatTok && + !FormatTok->Previous && NextTok->is(tok::eof) && // A statement can end with only `;` (simple statement), a block // closing brace (compound statement), or `:` (label statement). // If PrevTok is a block opening brace, Tok ends an empty block. diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp index edb8b79a2220..f56ca398cda8 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp @@ -5430,11 +5430,24 @@ struct EnsureImmediateInvocationInDefaultArgs // Rewrite to source location to refer to the context in which they are used. ExprResult TransformSourceLocExpr(SourceLocExpr *E) { - if (E->getParentContext() == SemaRef.CurContext) + DeclContext *DC = E->getParentContext(); + if (DC == SemaRef.CurContext) return E; - return getDerived().RebuildSourceLocExpr(E->getIdentKind(), E->getType(), - E->getBeginLoc(), E->getEndLoc(), - SemaRef.CurContext); + + // FIXME: During instantiation, because the rebuild of defaults arguments + // is not always done in the context of the template instantiator, + // we run the risk of producing a dependent source location + // that would never be rebuilt. + // This usually happens during overload resolution, or in contexts + // where the value of the source location does not matter. + // However, we should find a better way to deal with source location + // of function templates. + if (!SemaRef.CurrentInstantiationScope || + !SemaRef.CurContext->isDependentContext() || DC->isDependentContext()) + DC = SemaRef.CurContext; + + return getDerived().RebuildSourceLocExpr( + E->getIdentKind(), E->getType(), E->getBeginLoc(), E->getEndLoc(), DC); } }; diff --git a/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp b/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp index 601077e9f333..809b94bb7412 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp @@ -1318,7 +1318,6 @@ void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, if (C->Init.isUsable()) { addInitCapture(LSI, cast(Var), C->Kind == LCK_ByRef); - PushOnScopeChains(Var, CurScope, false); } else { TryCaptureKind Kind = C->Kind == LCK_ByRef ? TryCapture_ExplicitByRef : TryCapture_ExplicitByVal; diff --git a/contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp b/contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp index 7a6a64529f52..d3d4bf27ae72 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp @@ -570,7 +570,7 @@ void LookupResult::resolveKind() { // For non-type declarations, check for a prior lookup result naming this // canonical declaration. - if (!D->isPlaceholderVar(getSema().getLangOpts()) && !ExistingI) { + if (!ExistingI) { auto UniqueResult = Unique.insert(std::make_pair(D, I)); if (!UniqueResult.second) { // We've seen this entity before. diff --git a/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index 62a240ecbc60..c11468a08ae5 100644 --- a/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -1928,6 +1928,7 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, case Stmt::CXXRewrittenBinaryOperatorClass: case Stmt::RequiresExprClass: case Expr::CXXParenListInitExprClass: + case Stmt::EmbedExprClass: // Fall through. // Cases we intentionally don't evaluate, since they don't need @@ -2430,10 +2431,6 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, Bldr.addNodes(Dst); break; } - - case Stmt::EmbedExprClass: - llvm::report_fatal_error("Support for EmbedExpr is not implemented."); - break; } } diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model/x86.c b/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model/x86.c index 867ed97e57bf..b1c4abd9d11d 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model/x86.c +++ b/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model/x86.c @@ -59,6 +59,7 @@ enum ProcessorTypes { INTEL_SIERRAFOREST, INTEL_GRANDRIDGE, INTEL_CLEARWATERFOREST, + AMDFAM1AH, CPU_TYPE_MAX }; @@ -97,6 +98,7 @@ enum ProcessorSubtypes { INTEL_COREI7_ARROWLAKE, INTEL_COREI7_ARROWLAKE_S, INTEL_COREI7_PANTHERLAKE, + AMDFAM1AH_ZNVER5, CPU_SUBTYPE_MAX }; @@ -803,6 +805,24 @@ static const char *getAMDProcessorTypeAndSubtype(unsigned Family, break; // "znver4" } break; // family 19h + case 26: + CPU = "znver5"; + *Type = AMDFAM1AH; + if (Model <= 0x77) { + // Models 00h-0Fh (Breithorn). + // Models 10h-1Fh (Breithorn-Dense). + // Models 20h-2Fh (Strix 1). + // Models 30h-37h (Strix 2). + // Models 38h-3Fh (Strix 3). + // Models 40h-4Fh (Granite Ridge). + // Models 50h-5Fh (Weisshorn). + // Models 60h-6Fh (Krackan1). + // Models 70h-77h (Sarlak). + CPU = "znver5"; + *Subtype = AMDFAM1AH_ZNVER5; + break; // "znver5" + } + break; default: break; // Unknown AMD CPU. } diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/divtc3.c b/contrib/llvm-project/compiler-rt/lib/builtins/divtc3.c index 099de5802daf..c393de815337 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/divtc3.c +++ b/contrib/llvm-project/compiler-rt/lib/builtins/divtc3.c @@ -13,7 +13,7 @@ #define QUAD_PRECISION #include "fp_lib.h" -#if defined(CRT_HAS_F128) +#if defined(CRT_HAS_128BIT) && defined(CRT_HAS_F128) // Returns: the quotient of (a + ib) / (c + id) diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/multc3.c b/contrib/llvm-project/compiler-rt/lib/builtins/multc3.c index 61a3f45e4727..a89832f0e883 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/multc3.c +++ b/contrib/llvm-project/compiler-rt/lib/builtins/multc3.c @@ -15,7 +15,7 @@ #include "int_lib.h" #include "int_math.h" -#if defined(CRT_HAS_F128) +#if defined(CRT_HAS_128BIT) && defined(CRT_HAS_F128) // Returns: the product of a + ib and c + id diff --git a/contrib/llvm-project/libcxx/include/chrono b/contrib/llvm-project/libcxx/include/chrono index 990c415ec2e9..7bec5e5a26ef 100644 --- a/contrib/llvm-project/libcxx/include/chrono +++ b/contrib/llvm-project/libcxx/include/chrono @@ -1015,8 +1015,8 @@ constexpr chrono::year operator ""y(unsigned lo # include # if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include +# include # endif -# include #endif #endif // _LIBCPP_CHRONO diff --git a/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp b/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp index 54821c299bde..abde3cd96491 100644 --- a/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp +++ b/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp @@ -60,17 +60,15 @@ Hexagon::Hexagon() { } uint32_t Hexagon::calcEFlags() const { - assert(!ctx.objectFiles.empty()); - // The architecture revision must always be equal to or greater than // greatest revision in the list of inputs. - uint32_t ret = 0; + std::optional ret; for (InputFile *f : ctx.objectFiles) { uint32_t eflags = cast>(f)->getObj().getHeader().e_flags; - if (eflags > ret) + if (!ret || eflags > *ret) ret = eflags; } - return ret; + return ret.value_or(/* Default Arch Rev: */ 0x60); } static uint32_t applyMask(uint32_t mask, uint32_t data) { diff --git a/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.def b/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.def index 92798cbe4b4c..008cf5381c12 100644 --- a/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.def +++ b/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.def @@ -49,11 +49,13 @@ X86_CPU_TYPE(ZHAOXIN_FAM7H, "zhaoxin_fam7h") X86_CPU_TYPE(INTEL_SIERRAFOREST, "sierraforest") X86_CPU_TYPE(INTEL_GRANDRIDGE, "grandridge") X86_CPU_TYPE(INTEL_CLEARWATERFOREST, "clearwaterforest") +X86_CPU_TYPE(AMDFAM1AH, "amdfam1ah") // Alternate names supported by __builtin_cpu_is and target multiversioning. X86_CPU_TYPE_ALIAS(INTEL_BONNELL, "atom") X86_CPU_TYPE_ALIAS(AMDFAM10H, "amdfam10") X86_CPU_TYPE_ALIAS(AMDFAM15H, "amdfam15") +X86_CPU_TYPE_ALIAS(AMDFAM1AH, "amdfam1a") X86_CPU_TYPE_ALIAS(INTEL_SILVERMONT, "slm") #undef X86_CPU_TYPE_ALIAS @@ -104,6 +106,7 @@ X86_CPU_SUBTYPE(INTEL_COREI7_GRANITERAPIDS_D,"graniterapids-d") X86_CPU_SUBTYPE(INTEL_COREI7_ARROWLAKE, "arrowlake") X86_CPU_SUBTYPE(INTEL_COREI7_ARROWLAKE_S, "arrowlake-s") X86_CPU_SUBTYPE(INTEL_COREI7_PANTHERLAKE, "pantherlake") +X86_CPU_SUBTYPE(AMDFAM1AH_ZNVER5, "znver5") // Alternate names supported by __builtin_cpu_is and target multiversioning. X86_CPU_SUBTYPE_ALIAS(INTEL_COREI7_ALDERLAKE, "raptorlake") diff --git a/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.h b/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.h index 2083e585af4a..5468aaa81edb 100644 --- a/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.h +++ b/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.h @@ -147,6 +147,7 @@ enum CPUKind { CK_x86_64_v3, CK_x86_64_v4, CK_Geode, + CK_ZNVER5, }; /// Parse \p CPU string into a CPUKind. Will only accept 64-bit capable CPUs if diff --git a/contrib/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp b/contrib/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp index 0f29ebe3ee79..b1a2bfaf7895 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp @@ -130,6 +130,7 @@ void ModuloScheduleExpander::generatePipelinedLoop() { // Generate the prolog instructions that set up the pipeline. generateProlog(MaxStageCount, KernelBB, VRMap, PrologBBs); MF.insert(BB->getIterator(), KernelBB); + LIS.insertMBBInMaps(KernelBB); // Rearrange the instructions to generate the new, pipelined loop, // and update register names as needed. @@ -210,6 +211,7 @@ void ModuloScheduleExpander::generateProlog(unsigned LastStage, NewBB->transferSuccessors(PredBB); PredBB->addSuccessor(NewBB); PredBB = NewBB; + LIS.insertMBBInMaps(NewBB); // Generate instructions for each appropriate stage. Process instructions // in original program order. @@ -283,6 +285,7 @@ void ModuloScheduleExpander::generateEpilog( PredBB->replaceSuccessor(LoopExitBB, NewBB); NewBB->addSuccessor(LoopExitBB); + LIS.insertMBBInMaps(NewBB); if (EpilogStart == LoopExitBB) EpilogStart = NewBB; diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index df3d207d85d3..b961d3bb1fec 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -1453,6 +1453,10 @@ void SelectionDAGISel::reportIPToStateForBlocks(MachineFunction *MF) { if (BB->getFirstMayFaultInst()) { // Report IP range only for blocks with Faulty inst auto MBBb = MBB.getFirstNonPHI(); + + if (MBBb == MBB.end()) + continue; + MachineInstr *MIb = &*MBBb; if (MIb->isTerminator()) continue; diff --git a/contrib/llvm-project/llvm/lib/IR/BasicBlock.cpp b/contrib/llvm-project/llvm/lib/IR/BasicBlock.cpp index 0a9498f051cb..46896d3cdf7d 100644 --- a/contrib/llvm-project/llvm/lib/IR/BasicBlock.cpp +++ b/contrib/llvm-project/llvm/lib/IR/BasicBlock.cpp @@ -975,8 +975,16 @@ void BasicBlock::spliceDebugInfoImpl(BasicBlock::iterator Dest, BasicBlock *Src, if (ReadFromTail && Src->getMarker(Last)) { DbgMarker *FromLast = Src->getMarker(Last); if (LastIsEnd) { - Dest->adoptDbgRecords(Src, Last, true); - // adoptDbgRecords will release any trailers. + if (Dest == end()) { + // Abosrb the trailing markers from Src. + assert(FromLast == Src->getTrailingDbgRecords()); + createMarker(Dest)->absorbDebugValues(*FromLast, true); + FromLast->eraseFromParent(); + Src->deleteTrailingDbgRecords(); + } else { + // adoptDbgRecords will release any trailers. + Dest->adoptDbgRecords(Src, Last, true); + } assert(!Src->getTrailingDbgRecords()); } else { // FIXME: can we use adoptDbgRecords here to reduce allocations? diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp index ba46ededc63a..87e057a468af 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp @@ -2931,16 +2931,6 @@ struct RegPairInfo { } // end anonymous namespace -unsigned findFreePredicateReg(BitVector &SavedRegs) { - for (unsigned PReg = AArch64::P8; PReg <= AArch64::P15; ++PReg) { - if (SavedRegs.test(PReg)) { - unsigned PNReg = PReg - AArch64::P0 + AArch64::PN0; - return PNReg; - } - } - return AArch64::NoRegister; -} - static void computeCalleeSaveRegisterPairs( MachineFunction &MF, ArrayRef CSI, const TargetRegisterInfo *TRI, SmallVectorImpl &RegPairs, @@ -3645,7 +3635,6 @@ void AArch64FrameLowering::determineCalleeSaves(MachineFunction &MF, unsigned ExtraCSSpill = 0; bool HasUnpairedGPR64 = false; - bool HasPairZReg = false; // Figure out which callee-saved registers to save/restore. for (unsigned i = 0; CSRegs[i]; ++i) { const unsigned Reg = CSRegs[i]; @@ -3699,28 +3688,6 @@ void AArch64FrameLowering::determineCalleeSaves(MachineFunction &MF, !RegInfo->isReservedReg(MF, PairedReg)) ExtraCSSpill = PairedReg; } - // Check if there is a pair of ZRegs, so it can select PReg for spill/fill - HasPairZReg |= (AArch64::ZPRRegClass.contains(Reg, CSRegs[i ^ 1]) && - SavedRegs.test(CSRegs[i ^ 1])); - } - - if (HasPairZReg && (Subtarget.hasSVE2p1() || Subtarget.hasSME2())) { - AArch64FunctionInfo *AFI = MF.getInfo(); - // Find a suitable predicate register for the multi-vector spill/fill - // instructions. - unsigned PnReg = findFreePredicateReg(SavedRegs); - if (PnReg != AArch64::NoRegister) - AFI->setPredicateRegForFillSpill(PnReg); - // If no free callee-save has been found assign one. - if (!AFI->getPredicateRegForFillSpill() && - MF.getFunction().getCallingConv() == - CallingConv::AArch64_SVE_VectorCall) { - SavedRegs.set(AArch64::P8); - AFI->setPredicateRegForFillSpill(AArch64::PN8); - } - - assert(!RegInfo->isReservedReg(MF, AFI->getPredicateRegForFillSpill()) && - "Predicate cannot be a reserved register"); } if (MF.getFunction().getCallingConv() == CallingConv::Win64 && diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index 377bcd5868fb..805684ef69a5 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -5144,10 +5144,6 @@ void AArch64InstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, if (PNRReg.isValid() && !PNRReg.isVirtual()) MI.addDef(PNRReg, RegState::Implicit); MI.addMemOperand(MMO); - - if (PNRReg.isValid() && PNRReg.isVirtual()) - BuildMI(MBB, MBBI, DebugLoc(), get(TargetOpcode::COPY), PNRReg) - .addReg(DestReg); } bool llvm::isNZCVTouchedInInstructionRange(const MachineInstr &DefMI, diff --git a/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp index 39ae7c96cf77..a71c9453d968 100644 --- a/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp @@ -4349,6 +4349,7 @@ AMDGPUTargetLowering::performMulLoHiCombine(SDNode *N, SelectionDAG &DAG = DCI.DAG; SDLoc DL(N); + bool Signed = N->getOpcode() == ISD::SMUL_LOHI; SDValue N0 = N->getOperand(0); SDValue N1 = N->getOperand(1); @@ -4363,20 +4364,25 @@ AMDGPUTargetLowering::performMulLoHiCombine(SDNode *N, // Try to use two fast 24-bit multiplies (one for each half of the result) // instead of one slow extending multiply. - unsigned LoOpcode, HiOpcode; - if (Subtarget->hasMulU24() && isU24(N0, DAG) && isU24(N1, DAG)) { - N0 = DAG.getZExtOrTrunc(N0, DL, MVT::i32); - N1 = DAG.getZExtOrTrunc(N1, DL, MVT::i32); - LoOpcode = AMDGPUISD::MUL_U24; - HiOpcode = AMDGPUISD::MULHI_U24; - } else if (Subtarget->hasMulI24() && isI24(N0, DAG) && isI24(N1, DAG)) { - N0 = DAG.getSExtOrTrunc(N0, DL, MVT::i32); - N1 = DAG.getSExtOrTrunc(N1, DL, MVT::i32); - LoOpcode = AMDGPUISD::MUL_I24; - HiOpcode = AMDGPUISD::MULHI_I24; + unsigned LoOpcode = 0; + unsigned HiOpcode = 0; + if (Signed) { + if (Subtarget->hasMulI24() && isI24(N0, DAG) && isI24(N1, DAG)) { + N0 = DAG.getSExtOrTrunc(N0, DL, MVT::i32); + N1 = DAG.getSExtOrTrunc(N1, DL, MVT::i32); + LoOpcode = AMDGPUISD::MUL_I24; + HiOpcode = AMDGPUISD::MULHI_I24; + } } else { - return SDValue(); + if (Subtarget->hasMulU24() && isU24(N0, DAG) && isU24(N1, DAG)) { + N0 = DAG.getZExtOrTrunc(N0, DL, MVT::i32); + N1 = DAG.getZExtOrTrunc(N1, DL, MVT::i32); + LoOpcode = AMDGPUISD::MUL_U24; + HiOpcode = AMDGPUISD::MULHI_U24; + } } + if (!LoOpcode) + return SDValue(); SDValue Lo = DAG.getNode(LoOpcode, DL, MVT::i32, N0, N1); SDValue Hi = DAG.getNode(HiOpcode, DL, MVT::i32, N0, N1); diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 21cf4d9eeac1..758de9d732fa 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -9338,12 +9338,13 @@ SDValue PPCTargetLowering::LowerBITCAST(SDValue Op, SelectionDAG &DAG) const { SDLoc dl(Op); SDValue Op0 = Op->getOperand(0); + if (!Subtarget.isPPC64() || (Op0.getOpcode() != ISD::BUILD_PAIR) || + (Op.getValueType() != MVT::f128)) + return SDValue(); + SDValue Lo = Op0.getOperand(0); SDValue Hi = Op0.getOperand(1); - - if ((Op.getValueType() != MVT::f128) || - (Op0.getOpcode() != ISD::BUILD_PAIR) || (Lo.getValueType() != MVT::i64) || - (Hi.getValueType() != MVT::i64) || !Subtarget.isPPC64()) + if ((Lo.getValueType() != MVT::i64) || (Hi.getValueType() != MVT::i64)) return SDValue(); if (!Subtarget.isLittleEndian()) diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp index ba3b4bd701d6..6c0cbeadebf4 100644 --- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp @@ -2902,7 +2902,7 @@ RISCVInstrInfo::getOutliningTypeImpl(MachineBasicBlock::iterator &MBBI, // if any possible. if (MO.getTargetFlags() == RISCVII::MO_PCREL_LO && (MI.getMF()->getTarget().getFunctionSections() || F.hasComdat() || - F.hasSection())) + F.hasSection() || F.getSectionPrefix())) return outliner::InstrType::Illegal; } diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86.td b/contrib/llvm-project/llvm/lib/Target/X86/X86.td index 9dafd5e628ca..e82e624f7099 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86.td +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86.td @@ -1543,6 +1543,19 @@ def ProcessorFeatures { FeatureVPOPCNTDQ]; list ZN4Features = !listconcat(ZN3Features, ZN4AdditionalFeatures); + + + list ZN5Tuning = ZN4Tuning; + list ZN5AdditionalFeatures = [FeatureVNNI, + FeatureMOVDIRI, + FeatureMOVDIR64B, + FeatureVP2INTERSECT, + FeaturePREFETCHI, + FeatureAVXVNNI + ]; + list ZN5Features = + !listconcat(ZN4Features, ZN5AdditionalFeatures); + } //===----------------------------------------------------------------------===// @@ -1892,6 +1905,8 @@ def : ProcModel<"znver3", Znver3Model, ProcessorFeatures.ZN3Features, ProcessorFeatures.ZN3Tuning>; def : ProcModel<"znver4", Znver4Model, ProcessorFeatures.ZN4Features, ProcessorFeatures.ZN4Tuning>; +def : ProcModel<"znver5", Znver4Model, ProcessorFeatures.ZN5Features, + ProcessorFeatures.ZN5Tuning>; def : Proc<"geode", [FeatureX87, FeatureCX8, FeatureMMX, FeaturePRFCHW], [TuningSlowUAMem16, TuningInsertVZEROUPPER]>; diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86PfmCounters.td b/contrib/llvm-project/llvm/lib/Target/X86/X86PfmCounters.td index 2b1dac411c99..c30e989cdc2a 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86PfmCounters.td +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86PfmCounters.td @@ -350,3 +350,4 @@ def ZnVer4PfmCounters : ProcPfmCounters { let ValidationCounters = DefaultAMDPfmValidationCounters; } def : PfmCountersBinding<"znver4", ZnVer4PfmCounters>; +def : PfmCountersBinding<"znver5", ZnVer4PfmCounters>; diff --git a/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp b/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp index 7e637cba4cfb..865b6a44adbb 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp @@ -1213,6 +1213,25 @@ static const char *getAMDProcessorTypeAndSubtype(unsigned Family, break; // "znver4" } break; // family 19h + case 26: + CPU = "znver5"; + *Type = X86::AMDFAM1AH; + if (Model <= 0x77) { + // Models 00h-0Fh (Breithorn). + // Models 10h-1Fh (Breithorn-Dense). + // Models 20h-2Fh (Strix 1). + // Models 30h-37h (Strix 2). + // Models 38h-3Fh (Strix 3). + // Models 40h-4Fh (Granite Ridge). + // Models 50h-5Fh (Weisshorn). + // Models 60h-6Fh (Krackan1). + // Models 70h-77h (Sarlak). + CPU = "znver5"; + *Subtype = X86::AMDFAM1AH_ZNVER5; + break; // "znver5" + } + break; + default: break; // Unknown AMD CPU. } diff --git a/contrib/llvm-project/llvm/lib/TargetParser/X86TargetParser.cpp b/contrib/llvm-project/llvm/lib/TargetParser/X86TargetParser.cpp index dcf9130052ac..a6f3b5ba5d33 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/X86TargetParser.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/X86TargetParser.cpp @@ -238,6 +238,10 @@ static constexpr FeatureBitset FeaturesZNVER4 = FeatureAVX512BITALG | FeatureAVX512VPOPCNTDQ | FeatureAVX512BF16 | FeatureGFNI | FeatureSHSTK; +static constexpr FeatureBitset FeaturesZNVER5 = + FeaturesZNVER4 | FeatureAVXVNNI | FeatureMOVDIRI | FeatureMOVDIR64B | + FeatureAVX512VP2INTERSECT | FeaturePREFETCHI | FeatureAVXVNNI; + // D151696 tranplanted Mangling and OnlyForCPUDispatchSpecific from // X86TargetParser.def to here. They are assigned by following ways: // 1. Copy the mangling from the original CPU_SPEICIFC MACROs. If no, assign @@ -417,6 +421,7 @@ constexpr ProcInfo Processors[] = { { {"znver2"}, CK_ZNVER2, FEATURE_AVX2, FeaturesZNVER2, '\0', false }, { {"znver3"}, CK_ZNVER3, FEATURE_AVX2, FeaturesZNVER3, '\0', false }, { {"znver4"}, CK_ZNVER4, FEATURE_AVX512VBMI2, FeaturesZNVER4, '\0', false }, + { {"znver5"}, CK_ZNVER5, FEATURE_AVX512VP2INTERSECT, FeaturesZNVER5, '\0', false }, // Generic 64-bit processor. { {"x86-64"}, CK_x86_64, FEATURE_SSE2 , FeaturesX86_64, '\0', false }, { {"x86-64-v2"}, CK_x86_64_v2, FEATURE_SSE4_2 , FeaturesX86_64_V2, '\0', false }, diff --git a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index cca9eeebaa53..ab2b96cdc42d 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -15211,7 +15211,8 @@ bool BoUpSLP::collectValuesToDemote( if (any_of(E.Scalars, [&](Value *V) { return !all_of(V->users(), [=](User *U) { return getTreeEntry(U) || - (UserIgnoreList && UserIgnoreList->contains(U)) || + (E.Idx == 0 && UserIgnoreList && + UserIgnoreList->contains(U)) || (!isa(U) && U->getType()->isSized() && !U->getType()->isScalableTy() && DL->getTypeSizeInBits(U->getType()) <= BitWidth); @@ -15539,6 +15540,11 @@ void BoUpSLP::computeMinimumValueSizes() { const TreeEntry *UserTE = E.UserTreeIndices.back().UserTE; if (TE == UserTE || !TE) return false; + if (!isa(U) || + !isa(UserTE->getMainOp())) + return true; unsigned UserTESz = DL->getTypeSizeInBits( UserTE->Scalars.front()->getType()); auto It = MinBWs.find(TE); diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index 5c86affe3309..cac840266348 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-19.1.0-rc4-0-g0c641568515a" +#define LLVM_REVISION "llvmorg-19.1.0-0-ga4bf6cd7cfb1" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-19.1.0-rc4-0-g0c641568515a" +#define CLANG_REVISION "llvmorg-19.1.0-0-ga4bf6cd7cfb1" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-19.1.0-rc4-0-g0c641568515a" +#define LLDB_REVISION "llvmorg-19.1.0-0-ga4bf6cd7cfb1" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index 834f0b9f93fb..f5e540cec4fd 100644 --- a/lib/clang/include/clang/Basic/Version.inc *** 69 LINES SKIPPED *** From nobody Sun Dec 1 11:18:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYs4T0Bz5fT6S; Sun, 01 Dec 2024 11:18:57 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYs34FZz43GQ; Sun, 1 Dec 2024 11:18:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=POAvZaripklR4JmHxkKG3wMqaqId3N55Wa+efOEO2gw=; b=Eboytj/Xn2AaW1hpUslX6b098vGia4kzK+kgClS0Ipi5oB02Kg35jwYBQ7E0RUiJOnCyCX sJyg1VcN4tPRB0esyQku/ephscchGgD9uVu141lHlzPq2/0FvPGdp6WuExw0X585TjCZaI o+bErGUVqwKzWBd5qhHTq0vMvw1mq05lt0Xlk2yLcFfBts50K9V4xc8x3HVJ6VMqEbFbse sBZOw2ZGEMPVW5wlSTkQZnOOfHmy3tCP3N1db2AIDgibzHOFqjZvOOWXq6u/v6CRRXgB+e fI7nDwXYTLMt8ZNJGe/xHokr5fRq7hGNPTtUQkJGW1zXFM19aynRsxuwWqKl6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=POAvZaripklR4JmHxkKG3wMqaqId3N55Wa+efOEO2gw=; b=exCBMTZEPxQepMG+y3fBz1kba+T9Lv62ZitHRYjzTt33CcprwzbLMImicCC3EMp9DFDQ/f Rn740J6uedKVwBhTdRBj9GnF1eAXWlKn3yX92EoePVCIvAIs03khACW1+SldIDxPZti3Ay 1o5x4eH+hsejC+0FTJITm8USeVKqhfqAdQVEbdW0UnGNlRVmSb3F1/Wu3T7J+IfgLnigWI tfYEkejwZQiBbraDdQFNXWFGSVY82VJ++nSnRiIMhfjSIvoeJoPKSwy5n8UAxnzAMgLcbC ENntMSUDKP3DXHp/5I2apl0mUZ8HZcBIUBd8LoAAUJiJSkwFleJjaPS7CIFYUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051937; a=rsa-sha256; cv=none; b=LXHfg9ZSY53WsXhzU28VOm4NCXXLIN1T8hlzA9HMBQXK8a+B6xsqlUhcqrKoawKgz311W3 5rq9l3QTYAnaNd/KjPKjKq+SQXsvvegw3AMS8dtTg9D/HpQmpiskgOKOjx8NqoWAU2DSwN 41mLjoFvvMF156mTSk6/2VhfIRgnzvixZskgOfrqU8B8azCQdE5l3qBy0tqTHgAVTQwP1+ L9OX82Pd8VJhTfyhBfpqSNf7tW/MV5A91JxEAoOoiRwTzHYiZGU8gxhsndAXZM0t+RMBU+ rhzgRzutTKl8Qlqg7yIb7ttsTEVZpVbio6RL8JlBuhD7wpOTEjADp7z3b5m6xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYs2cGWzqjq; Sun, 1 Dec 2024 11:18:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIvMD008838; Sun, 1 Dec 2024 11:18:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIv0f008835; Sun, 1 Dec 2024 11:18:57 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:57 GMT Message-Id: <202412011118.4B1BIv0f008835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4d2780d6b0a7 - stable/14 - Merge llvm-project release/19.x llvmorg-19.1.1-0-gd401987fe349 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4d2780d6b0a7a328eaea5cb16f2f82069b34083a Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4d2780d6b0a7a328eaea5cb16f2f82069b34083a commit 4d2780d6b0a7a328eaea5cb16f2f82069b34083a Author: Dimitry Andric AuthorDate: 2024-10-08 17:05:26 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:15 +0000 Merge llvm-project release/19.x llvmorg-19.1.1-0-gd401987fe349 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.1-0-gd401987fe349, a.k.a. 19.1.1 release. PR: 280562 MFC after: 1 month (cherry picked from commit 6e516c87b6d779911edde7481d8aef165b837a03) --- .../clang/include/clang/AST/DeclBase.h | 3 + .../include/clang/Tooling/CompilationDatabase.h | 6 ++ contrib/llvm-project/clang/lib/AST/DeclBase.cpp | 4 ++ .../clang/lib/CodeGen/CGExprScalar.cpp | 26 ++++--- .../clang/lib/Driver/ToolChains/Clang.cpp | 26 +++++++ .../clang/lib/Format/FormatTokenLexer.cpp | 7 ++ .../clang/lib/Format/TokenAnnotator.cpp | 5 -- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 26 ++++++- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 3 +- .../lib/Tooling/LocateToolCompilationDatabase.cpp | 71 ++++++++++++++++++ .../lib/sanitizer_common/sanitizer_linux.cpp | 12 ++++ contrib/llvm-project/libcxx/include/__config | 2 +- .../vendor/llvm/default_assertion_handler.in | 3 +- contrib/llvm-project/lld/ELF/ICF.cpp | 4 +- contrib/llvm-project/lld/ELF/InputSection.cpp | 6 +- contrib/llvm-project/lld/ELF/InputSection.h | 4 ++ .../llvm/include/llvm/Analysis/AliasAnalysis.h | 2 +- .../llvm/lib/Analysis/AliasAnalysis.cpp | 2 + .../llvm-project/llvm/lib/CodeGen/InitUndef.cpp | 1 + .../llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 83 +++++++++++++--------- .../llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 3 +- .../llvm/lib/ExecutionEngine/Orc/Core.cpp | 15 ++++ .../llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp | 6 +- .../llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp | 9 ++- .../lib/Target/LoongArch/LoongArchISelLowering.cpp | 6 +- .../lib/Target/LoongArch/LoongArchInstrInfo.td | 5 +- .../lib/Target/LoongArch/LoongArchLASXInstrInfo.td | 6 ++ .../lib/Target/LoongArch/LoongArchOptWInstrs.cpp | 15 ++++ .../llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp | 3 +- .../llvm/lib/Target/X86/X86ISelLowering.cpp | 2 +- .../llvm/lib/Target/X86/X86InstrAVX512.td | 4 +- .../llvm/lib/Transforms/Utils/InlineFunction.cpp | 20 ++++-- .../llvm/lib/Transforms/Utils/LoopPeel.cpp | 2 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 40 files changed, 330 insertions(+), 92 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/AST/DeclBase.h b/contrib/llvm-project/clang/include/clang/AST/DeclBase.h index 2a4bd0f9c2fd..04dbd1db6cba 100644 --- a/contrib/llvm-project/clang/include/clang/AST/DeclBase.h +++ b/contrib/llvm-project/clang/include/clang/AST/DeclBase.h @@ -680,6 +680,9 @@ public: /// Whether this declaration comes from explicit global module. bool isFromExplicitGlobalModule() const; + /// Whether this declaration comes from global module. + bool isFromGlobalModule() const; + /// Whether this declaration comes from a named module. bool isInNamedModule() const; diff --git a/contrib/llvm-project/clang/include/clang/Tooling/CompilationDatabase.h b/contrib/llvm-project/clang/include/clang/Tooling/CompilationDatabase.h index fee584acb486..36fe0812ebe9 100644 --- a/contrib/llvm-project/clang/include/clang/Tooling/CompilationDatabase.h +++ b/contrib/llvm-project/clang/include/clang/Tooling/CompilationDatabase.h @@ -234,6 +234,12 @@ std::unique_ptr std::unique_ptr inferTargetAndDriverMode(std::unique_ptr Base); +/// Returns a wrapped CompilationDatabase that will transform argv[0] to an +/// absolute path, if it currently is a plain tool name, looking it up in +/// PATH. +std::unique_ptr +inferToolLocation(std::unique_ptr Base); + /// Returns a wrapped CompilationDatabase that will expand all rsp(response) /// files on commandline returned by underlying database. std::unique_ptr diff --git a/contrib/llvm-project/clang/lib/AST/DeclBase.cpp b/contrib/llvm-project/clang/lib/AST/DeclBase.cpp index b59f118380ca..c4e948a38e26 100644 --- a/contrib/llvm-project/clang/lib/AST/DeclBase.cpp +++ b/contrib/llvm-project/clang/lib/AST/DeclBase.cpp @@ -1161,6 +1161,10 @@ bool Decl::isFromExplicitGlobalModule() const { return getOwningModule() && getOwningModule()->isExplicitGlobalModule(); } +bool Decl::isFromGlobalModule() const { + return getOwningModule() && getOwningModule()->isGlobalModule(); +} + bool Decl::isInNamedModule() const { return getOwningModule() && getOwningModule()->isNamedModule(); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp index a17d68424bbc..6e212e74676e 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp @@ -2833,18 +2833,22 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV, llvm::AtomicOrdering::SequentiallyConsistent); return isPre ? Builder.CreateBinOp(op, old, amt) : old; } - // Special case for atomic increment/decrement on floats + // Special case for atomic increment/decrement on floats. + // Bail out non-power-of-2-sized floating point types (e.g., x86_fp80). if (type->isFloatingType()) { - llvm::AtomicRMWInst::BinOp aop = - isInc ? llvm::AtomicRMWInst::FAdd : llvm::AtomicRMWInst::FSub; - llvm::Instruction::BinaryOps op = - isInc ? llvm::Instruction::FAdd : llvm::Instruction::FSub; - llvm::Value *amt = llvm::ConstantFP::get( - VMContext, llvm::APFloat(static_cast(1.0))); - llvm::Value *old = - Builder.CreateAtomicRMW(aop, LV.getAddress(), amt, - llvm::AtomicOrdering::SequentiallyConsistent); - return isPre ? Builder.CreateBinOp(op, old, amt) : old; + llvm::Type *Ty = ConvertType(type); + if (llvm::has_single_bit(Ty->getScalarSizeInBits())) { + llvm::AtomicRMWInst::BinOp aop = + isInc ? llvm::AtomicRMWInst::FAdd : llvm::AtomicRMWInst::FSub; + llvm::Instruction::BinaryOps op = + isInc ? llvm::Instruction::FAdd : llvm::Instruction::FSub; + llvm::Value *amt = llvm::ConstantFP::get(Ty, 1.0); + llvm::AtomicRMWInst *old = Builder.CreateAtomicRMW( + aop, LV.getAddress(), amt, + llvm::AtomicOrdering::SequentiallyConsistent); + + return isPre ? Builder.CreateBinOp(op, old, amt) : old; + } } value = EmitLoadOfLValue(LV, E->getExprLoc()); input = value; diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp index 366b147a052b..8858c318aba7 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp @@ -8561,6 +8561,32 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA, WantDebug = !A->getOption().matches(options::OPT_g0) && !A->getOption().matches(options::OPT_ggdb0); + // If a -gdwarf argument appeared, remember it. + bool EmitDwarf = false; + if (const Arg *A = getDwarfNArg(Args)) + EmitDwarf = checkDebugInfoOption(A, Args, D, getToolChain()); + + bool EmitCodeView = false; + if (const Arg *A = Args.getLastArg(options::OPT_gcodeview)) + EmitCodeView = checkDebugInfoOption(A, Args, D, getToolChain()); + + // If the user asked for debug info but did not explicitly specify -gcodeview + // or -gdwarf, ask the toolchain for the default format. + if (!EmitCodeView && !EmitDwarf && WantDebug) { + switch (getToolChain().getDefaultDebugFormat()) { + case llvm::codegenoptions::DIF_CodeView: + EmitCodeView = true; + break; + case llvm::codegenoptions::DIF_DWARF: + EmitDwarf = true; + break; + } + } + + // If the arguments don't imply DWARF, don't emit any debug info here. + if (!EmitDwarf) + WantDebug = false; + llvm::codegenoptions::DebugInfoKind DebugInfoKind = llvm::codegenoptions::NoDebugInfo; diff --git a/contrib/llvm-project/clang/lib/Format/FormatTokenLexer.cpp b/contrib/llvm-project/clang/lib/Format/FormatTokenLexer.cpp index e21b5a882b77..63949b2e26bd 100644 --- a/contrib/llvm-project/clang/lib/Format/FormatTokenLexer.cpp +++ b/contrib/llvm-project/clang/lib/Format/FormatTokenLexer.cpp @@ -100,6 +100,13 @@ ArrayRef FormatTokenLexer::lex() { if (Tokens.back()->NewlinesBefore > 0 || Tokens.back()->IsMultiline) FirstInLineIndex = Tokens.size() - 1; } while (Tokens.back()->isNot(tok::eof)); + if (Style.InsertNewlineAtEOF) { + auto &TokEOF = *Tokens.back(); + if (TokEOF.NewlinesBefore == 0) { + TokEOF.NewlinesBefore = 1; + TokEOF.OriginalColumn = 0; + } + } return Tokens; } diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 3f00a28e6298..4512e539cc79 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -3680,11 +3680,6 @@ void TokenAnnotator::annotate(AnnotatedLine &Line) { auto *First = Line.First; First->SpacesRequiredBefore = 1; First->CanBreakBefore = First->MustBreakBefore; - - if (First->is(tok::eof) && First->NewlinesBefore == 0 && - Style.InsertNewlineAtEOF) { - First->NewlinesBefore = 1; - } } // This function heuristically determines whether 'Current' starts the name of a diff --git a/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp b/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp index c34d32002b5a..244f6ef2f53f 100755 --- a/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp @@ -969,8 +969,30 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( // equivalence. LocalInstantiationScope ScopeForParameters(S); if (auto *FD = DeclInfo.getDecl()->getAsFunction()) - for (auto *PVD : FD->parameters()) - ScopeForParameters.InstantiatedLocal(PVD, PVD); + for (auto *PVD : FD->parameters()) { + if (!PVD->isParameterPack()) { + ScopeForParameters.InstantiatedLocal(PVD, PVD); + continue; + } + // This is hacky: we're mapping the parameter pack to a size-of-1 argument + // to avoid building SubstTemplateTypeParmPackTypes for + // PackExpansionTypes. The SubstTemplateTypeParmPackType node would + // otherwise reference the AssociatedDecl of the template arguments, which + // is, in this case, the template declaration. + // + // However, as we are in the process of comparing potential + // re-declarations, the canonical declaration is the declaration itself at + // this point. So if we didn't expand these packs, we would end up with an + // incorrect profile difference because we will be profiling the + // canonical types! + // + // FIXME: Improve the "no-transform" machinery in FindInstantiatedDecl so + // that we can eliminate the Scope in the cases where the declarations are + // not necessarily instantiated. It would also benefit the noexcept + // specifier comparison. + ScopeForParameters.MakeInstantiatedLocalArgPack(PVD); + ScopeForParameters.InstantiatedLocalPackArg(PVD, PVD); + } std::optional ThisScope; diff --git a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp index d608dd92a4b4..717ddb833958 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp @@ -9732,8 +9732,9 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, // the function decl is created above). // FIXME: We need a better way to separate C++ standard and clang modules. bool ImplicitInlineCXX20 = !getLangOpts().CPlusPlusModules || + NewFD->isConstexpr() || NewFD->isConsteval() || !NewFD->getOwningModule() || - NewFD->isFromExplicitGlobalModule() || + NewFD->isFromGlobalModule() || NewFD->getOwningModule()->isHeaderLikeModule(); bool isInline = D.getDeclSpec().isInlineSpecified(); bool isVirtual = D.getDeclSpec().isVirtualSpecified(); diff --git a/contrib/llvm-project/clang/lib/Tooling/LocateToolCompilationDatabase.cpp b/contrib/llvm-project/clang/lib/Tooling/LocateToolCompilationDatabase.cpp new file mode 100644 index 000000000000..033f69f3760c --- /dev/null +++ b/contrib/llvm-project/clang/lib/Tooling/LocateToolCompilationDatabase.cpp @@ -0,0 +1,71 @@ +//===- GuessTargetAndModeCompilationDatabase.cpp --------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "clang/Tooling/CompilationDatabase.h" +#include "clang/Tooling/Tooling.h" +#include "llvm/Support/Path.h" +#include "llvm/Support/Program.h" +#include + +namespace clang { +namespace tooling { + +namespace { +class LocationAdderDatabase : public CompilationDatabase { +public: + LocationAdderDatabase(std::unique_ptr Base) + : Base(std::move(Base)) { + assert(this->Base != nullptr); + } + + std::vector getAllFiles() const override { + return Base->getAllFiles(); + } + + std::vector getAllCompileCommands() const override { + return addLocation(Base->getAllCompileCommands()); + } + + std::vector + getCompileCommands(StringRef FilePath) const override { + return addLocation(Base->getCompileCommands(FilePath)); + } + +private: + std::vector + addLocation(std::vector Cmds) const { + for (auto &Cmd : Cmds) { + if (Cmd.CommandLine.empty()) + continue; + std::string &Driver = Cmd.CommandLine.front(); + // If the driver name already is absolute, we don't need to do anything. + if (llvm::sys::path::is_absolute(Driver)) + continue; + // If the name is a relative path, like bin/clang, we assume it's + // possible to resolve it and don't do anything about it either. + if (llvm::any_of(Driver, + [](char C) { return llvm::sys::path::is_separator(C); })) + continue; + auto Absolute = llvm::sys::findProgramByName(Driver); + // If we found it in path, update the entry in Cmd.CommandLine + if (Absolute && llvm::sys::path::is_absolute(*Absolute)) + Driver = std::move(*Absolute); + } + return Cmds; + } + std::unique_ptr Base; +}; +} // namespace + +std::unique_ptr +inferToolLocation(std::unique_ptr Base) { + return std::make_unique(std::move(Base)); +} + +} // namespace tooling +} // namespace clang diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp index 648df0c4e5a7..b9b1f496df7c 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp @@ -2014,6 +2014,18 @@ SignalContext::WriteFlag SignalContext::GetWriteFlag() const { return Unknown; return esr & ESR_ELx_WNR ? Write : Read; # elif defined(__loongarch__) + // In the musl environment, the Linux kernel uapi sigcontext.h is not + // included in signal.h. To avoid missing the SC_ADDRERR_{RD,WR} macros, + // copy them here. The LoongArch Linux kernel uapi is already stable, + // so there's no need to worry about the value changing. +# ifndef SC_ADDRERR_RD + // Address error was due to memory load +# define SC_ADDRERR_RD (1 << 30) +# endif +# ifndef SC_ADDRERR_WR + // Address error was due to memory store +# define SC_ADDRERR_WR (1 << 31) +# endif u32 flags = ucontext->uc_mcontext.__flags; if (flags & SC_ADDRERR_RD) return SignalContext::Read; diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index f44f18d52099..8301fec2b3d7 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -27,7 +27,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 190100 +# define _LIBCPP_VERSION 190101 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/libcxx/vendor/llvm/default_assertion_handler.in b/contrib/llvm-project/libcxx/vendor/llvm/default_assertion_handler.in index 3b6d6b2cca53..e12ccccdaff3 100644 --- a/contrib/llvm-project/libcxx/vendor/llvm/default_assertion_handler.in +++ b/contrib/llvm-project/libcxx/vendor/llvm/default_assertion_handler.in @@ -26,7 +26,8 @@ # if __has_builtin(__builtin_verbose_trap) // AppleClang shipped a slightly different version of __builtin_verbose_trap from the upstream // version before upstream Clang actually got the builtin. -# if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 17000 +// TODO: Remove once AppleClang supports the two-arguments version of the builtin. +# if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1700 # define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap(message) # else # define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap("libc++", message) diff --git a/contrib/llvm-project/lld/ELF/ICF.cpp b/contrib/llvm-project/lld/ELF/ICF.cpp index 44e8a71cc628..5591c5e71e0b 100644 --- a/contrib/llvm-project/lld/ELF/ICF.cpp +++ b/contrib/llvm-project/lld/ELF/ICF.cpp @@ -324,7 +324,7 @@ bool ICF::equalsConstant(const InputSection *a, const InputSection *b) { const RelsOrRelas ra = a->template relsOrRelas(); const RelsOrRelas rb = b->template relsOrRelas(); - if (ra.areRelocsCrel()) + if (ra.areRelocsCrel() || rb.areRelocsCrel()) return constantEq(a, ra.crels, b, rb.crels); return ra.areRelocsRel() || rb.areRelocsRel() ? constantEq(a, ra.rels, b, rb.rels) @@ -376,7 +376,7 @@ template bool ICF::equalsVariable(const InputSection *a, const InputSection *b) { const RelsOrRelas ra = a->template relsOrRelas(); const RelsOrRelas rb = b->template relsOrRelas(); - if (ra.areRelocsCrel()) + if (ra.areRelocsCrel() || rb.areRelocsCrel()) return variableEq(a, ra.crels, b, rb.crels); return ra.areRelocsRel() || rb.areRelocsRel() ? variableEq(a, ra.rels, b, rb.rels) diff --git a/contrib/llvm-project/lld/ELF/InputSection.cpp b/contrib/llvm-project/lld/ELF/InputSection.cpp index 570e485455ba..a165c813d425 100644 --- a/contrib/llvm-project/lld/ELF/InputSection.cpp +++ b/contrib/llvm-project/lld/ELF/InputSection.cpp @@ -150,12 +150,12 @@ RelsOrRelas InputSectionBase::relsOrRelas(bool supportsCrel) const { InputSectionBase *const &relSec = f->getSections()[relSecIdx]; // Otherwise, allocate a buffer to hold the decoded RELA relocations. When // called for the first time, relSec is null (without --emit-relocs) or an - // InputSection with zero eqClass[0]. - if (!relSec || !cast(relSec)->eqClass[0]) { + // InputSection with false decodedCrel. + if (!relSec || !cast(relSec)->decodedCrel) { auto *sec = makeThreadLocal(*f, shdr, name); f->cacheDecodedCrel(relSecIdx, sec); sec->type = SHT_RELA; - sec->eqClass[0] = SHT_RELA; + sec->decodedCrel = true; RelocsCrel entries(sec->content_); sec->size = entries.size() * sizeof(typename ELFT::Rela); diff --git a/contrib/llvm-project/lld/ELF/InputSection.h b/contrib/llvm-project/lld/ELF/InputSection.h index 6659530a9c9c..afa6ee5bd082 100644 --- a/contrib/llvm-project/lld/ELF/InputSection.h +++ b/contrib/llvm-project/lld/ELF/InputSection.h @@ -176,6 +176,10 @@ public: mutable bool compressed = false; + // Whether this section is SHT_CREL and has been decoded to RELA by + // relsOrRelas. + bool decodedCrel = false; + // Whether the section needs to be padded with a NOP filler due to // deleteFallThruJmpInsn. bool nopFiller = false; diff --git a/contrib/llvm-project/llvm/include/llvm/Analysis/AliasAnalysis.h b/contrib/llvm-project/llvm/include/llvm/Analysis/AliasAnalysis.h index 4140387a1f34..1b5a6ee24b86 100644 --- a/contrib/llvm-project/llvm/include/llvm/Analysis/AliasAnalysis.h +++ b/contrib/llvm-project/llvm/include/llvm/Analysis/AliasAnalysis.h @@ -320,7 +320,7 @@ class AAResults { public: // Make these results default constructable and movable. We have to spell // these out because MSVC won't synthesize them. - AAResults(const TargetLibraryInfo &TLI) : TLI(TLI) {} + AAResults(const TargetLibraryInfo &TLI); AAResults(AAResults &&Arg); ~AAResults(); diff --git a/contrib/llvm-project/llvm/lib/Analysis/AliasAnalysis.cpp b/contrib/llvm-project/llvm/lib/Analysis/AliasAnalysis.cpp index 6eaaad5f332e..9cdb315b6088 100644 --- a/contrib/llvm-project/llvm/lib/Analysis/AliasAnalysis.cpp +++ b/contrib/llvm-project/llvm/lib/Analysis/AliasAnalysis.cpp @@ -73,6 +73,8 @@ static cl::opt EnableAATrace("aa-trace", cl::Hidden, cl::init(false)); static const bool EnableAATrace = false; #endif +AAResults::AAResults(const TargetLibraryInfo &TLI) : TLI(TLI) {} + AAResults::AAResults(AAResults &&Arg) : TLI(Arg.TLI), AAs(std::move(Arg.AAs)), AADeps(std::move(Arg.AADeps)) {} diff --git a/contrib/llvm-project/llvm/lib/CodeGen/InitUndef.cpp b/contrib/llvm-project/llvm/lib/CodeGen/InitUndef.cpp index 51c50ff872ef..8f25ede0eb2b 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/InitUndef.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/InitUndef.cpp @@ -272,6 +272,7 @@ bool InitUndef::runOnMachineFunction(MachineFunction &MF) { for (auto *DeadMI : DeadInsts) DeadMI->eraseFromParent(); DeadInsts.clear(); + NewRegs.clear(); return Changed; } diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 71cdec91e5f6..7b1f1dc40211 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -191,6 +191,11 @@ namespace { // AA - Used for DAG load/store alias analysis. AliasAnalysis *AA; + /// This caches all chains that have already been processed in + /// DAGCombiner::getStoreMergeCandidates() and found to have no mergeable + /// stores candidates. + SmallPtrSet ChainsWithoutMergeableStores; + /// When an instruction is simplified, add all users of the instruction to /// the work lists because they might get more simplified now. void AddUsersToWorklist(SDNode *N) { @@ -776,11 +781,10 @@ namespace { bool UseTrunc); /// This is a helper function for mergeConsecutiveStores. Stores that - /// potentially may be merged with St are placed in StoreNodes. RootNode is - /// a chain predecessor to all store candidates. - void getStoreMergeCandidates(StoreSDNode *St, - SmallVectorImpl &StoreNodes, - SDNode *&Root); + /// potentially may be merged with St are placed in StoreNodes. On success, + /// returns a chain predecessor to all store candidates. + SDNode *getStoreMergeCandidates(StoreSDNode *St, + SmallVectorImpl &StoreNodes); /// Helper function for mergeConsecutiveStores. Checks if candidate stores /// have indirect dependency through their operands. RootNode is the @@ -1782,6 +1786,9 @@ void DAGCombiner::Run(CombineLevel AtLevel) { ++NodesCombined; + // Invalidate cached info. + ChainsWithoutMergeableStores.clear(); + // If we get back the same node we passed in, rather than a new node or // zero, we know that the node must have defined multiple values and // CombineTo was used. Since CombineTo takes care of the worklist @@ -20372,15 +20379,15 @@ bool DAGCombiner::mergeStoresOfConstantsOrVecElts( return true; } -void DAGCombiner::getStoreMergeCandidates( - StoreSDNode *St, SmallVectorImpl &StoreNodes, - SDNode *&RootNode) { +SDNode * +DAGCombiner::getStoreMergeCandidates(StoreSDNode *St, + SmallVectorImpl &StoreNodes) { // This holds the base pointer, index, and the offset in bytes from the base // pointer. We must have a base and an offset. Do not handle stores to undef // base pointers. BaseIndexOffset BasePtr = BaseIndexOffset::match(St, DAG); if (!BasePtr.getBase().getNode() || BasePtr.getBase().isUndef()) - return; + return nullptr; SDValue Val = peekThroughBitcasts(St->getValue()); StoreSource StoreSrc = getStoreSource(Val); @@ -20396,14 +20403,14 @@ void DAGCombiner::getStoreMergeCandidates( LoadVT = Ld->getMemoryVT(); // Load and store should be the same type. if (MemVT != LoadVT) - return; + return nullptr; // Loads must only have one use. if (!Ld->hasNUsesOfValue(1, 0)) - return; + return nullptr; // The memory operands must not be volatile/indexed/atomic. // TODO: May be able to relax for unordered atomics (see D66309) if (!Ld->isSimple() || Ld->isIndexed()) - return; + return nullptr; } auto CandidateMatch = [&](StoreSDNode *Other, BaseIndexOffset &Ptr, int64_t &Offset) -> bool { @@ -20471,6 +20478,27 @@ void DAGCombiner::getStoreMergeCandidates( return (BasePtr.equalBaseIndex(Ptr, DAG, Offset)); }; + // We are looking for a root node which is an ancestor to all mergable + // stores. We search up through a load, to our root and then down + // through all children. For instance we will find Store{1,2,3} if + // St is Store1, Store2. or Store3 where the root is not a load + // which always true for nonvolatile ops. TODO: Expand + // the search to find all valid candidates through multiple layers of loads. + // + // Root + // |-------|-------| + // Load Load Store3 + // | | + // Store1 Store2 + // + // FIXME: We should be able to climb and + // descend TokenFactors to find candidates as well. + + SDNode *RootNode = St->getChain().getNode(); + // Bail out if we already analyzed this root node and found nothing. + if (ChainsWithoutMergeableStores.contains(RootNode)) + return nullptr; + // Check if the pair of StoreNode and the RootNode already bail out many // times which is over the limit in dependence check. auto OverLimitInDependenceCheck = [&](SDNode *StoreNode, @@ -20494,28 +20522,13 @@ void DAGCombiner::getStoreMergeCandidates( } }; - // We looking for a root node which is an ancestor to all mergable - // stores. We search up through a load, to our root and then down - // through all children. For instance we will find Store{1,2,3} if - // St is Store1, Store2. or Store3 where the root is not a load - // which always true for nonvolatile ops. TODO: Expand - // the search to find all valid candidates through multiple layers of loads. - // - // Root - // |-------|-------| - // Load Load Store3 - // | | - // Store1 Store2 - // - // FIXME: We should be able to climb and - // descend TokenFactors to find candidates as well. - - RootNode = St->getChain().getNode(); - unsigned NumNodesExplored = 0; const unsigned MaxSearchNodes = 1024; if (auto *Ldn = dyn_cast(RootNode)) { RootNode = Ldn->getChain().getNode(); + // Bail out if we already analyzed this root node and found nothing. + if (ChainsWithoutMergeableStores.contains(RootNode)) + return nullptr; for (auto I = RootNode->use_begin(), E = RootNode->use_end(); I != E && NumNodesExplored < MaxSearchNodes; ++I, ++NumNodesExplored) { if (I.getOperandNo() == 0 && isa(*I)) { // walk down chain @@ -20532,6 +20545,8 @@ void DAGCombiner::getStoreMergeCandidates( I != E && NumNodesExplored < MaxSearchNodes; ++I, ++NumNodesExplored) TryToAddCandidate(I); } + + return RootNode; } // We need to check that merging these stores does not cause a loop in the @@ -21162,9 +21177,8 @@ bool DAGCombiner::mergeConsecutiveStores(StoreSDNode *St) { return false; SmallVector StoreNodes; - SDNode *RootNode; // Find potential store merge candidates by searching through chain sub-DAG - getStoreMergeCandidates(St, StoreNodes, RootNode); + SDNode *RootNode = getStoreMergeCandidates(St, StoreNodes); // Check if there is anything to merge. if (StoreNodes.size() < 2) @@ -21220,6 +21234,11 @@ bool DAGCombiner::mergeConsecutiveStores(StoreSDNode *St) { llvm_unreachable("Unhandled store source type"); } } + + // Remember if we failed to optimize, to save compile time. + if (!MadeChange) + ChainsWithoutMergeableStores.insert(RootNode); + return MadeChange; } diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 7f5b46af01c6..4b25f553ffae 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -2190,7 +2190,8 @@ void SelectionDAGLegalize::ExpandFPLibCall(SDNode* Node, Results.push_back(Tmp.first); Results.push_back(Tmp.second); } else { - SDValue Tmp = ExpandLibCall(LC, Node, false).first; + bool IsSignedArgument = Node->getOpcode() == ISD::FLDEXP; + SDValue Tmp = ExpandLibCall(LC, Node, IsSignedArgument).first; Results.push_back(Tmp); } } diff --git a/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/Core.cpp b/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/Core.cpp index 3e6de62c8b7d..f70c2890521d 100644 --- a/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/Core.cpp +++ b/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/Core.cpp @@ -3592,6 +3592,21 @@ ExecutionSession::IL_failSymbols(JITDylib &JD, assert(MI.DefiningEDU->Symbols.count(NonOwningSymbolStringPtr(Name)) && "Symbol does not appear in its DefiningEDU"); MI.DefiningEDU->Symbols.erase(NonOwningSymbolStringPtr(Name)); + + // Remove this EDU from the dependants lists of its dependencies. + for (auto &[DepJD, DepSyms] : MI.DefiningEDU->Dependencies) { + for (auto DepSym : DepSyms) { + assert(DepJD->Symbols.count(SymbolStringPtr(DepSym)) && + "DepSym not in DepJD"); + assert(DepJD->MaterializingInfos.count(SymbolStringPtr(DepSym)) && + "DepSym has not MaterializingInfo"); + auto &SymMI = DepJD->MaterializingInfos[SymbolStringPtr(DepSym)]; + assert(SymMI.DependantEDUs.count(MI.DefiningEDU.get()) && + "DefiningEDU missing from DependantEDUs list of dependency"); + SymMI.DependantEDUs.erase(MI.DefiningEDU.get()); + } + } + MI.DefiningEDU = nullptr; } else { // Otherwise if there are any EDUs waiting on this symbol then move diff --git a/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp b/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp index b7471bab1285..7b786ee26417 100644 --- a/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp @@ -1911,7 +1911,7 @@ bool AMDGPUDAGToDAGISel::SelectScratchSAddr(SDNode *Parent, SDValue Addr, 0); } - Offset = CurDAG->getTargetConstant(COffsetVal, DL, MVT::i16); + Offset = CurDAG->getTargetConstant(COffsetVal, DL, MVT::i32); return true; } @@ -1967,7 +1967,7 @@ bool AMDGPUDAGToDAGISel::SelectScratchSVAddr(SDNode *N, SDValue Addr, return false; if (checkFlatScratchSVSSwizzleBug(VAddr, SAddr, SplitImmOffset)) return false; - Offset = CurDAG->getTargetConstant(SplitImmOffset, SDLoc(), MVT::i16); + Offset = CurDAG->getTargetConstant(SplitImmOffset, SDLoc(), MVT::i32); return true; } } @@ -2000,7 +2000,7 @@ bool AMDGPUDAGToDAGISel::SelectScratchSVAddr(SDNode *N, SDValue Addr, if (checkFlatScratchSVSSwizzleBug(VAddr, SAddr, ImmOffset)) return false; SAddr = SelectSAddrFI(CurDAG, SAddr); - Offset = CurDAG->getTargetConstant(ImmOffset, SDLoc(), MVT::i16); + Offset = CurDAG->getTargetConstant(ImmOffset, SDLoc(), MVT::i32); return true; } diff --git a/contrib/llvm-project/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp b/contrib/llvm-project/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp index 77db876d47e4..a8927d834630 100644 --- a/contrib/llvm-project/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp @@ -122,8 +122,13 @@ bool AVRDAGToDAGISel::SelectAddr(SDNode *Op, SDValue N, SDValue &Base, // offset allowed. MVT VT = cast(Op)->getMemoryVT().getSimpleVT(); - // We only accept offsets that fit in 6 bits (unsigned). - if (isUInt<6>(RHSC) && (VT == MVT::i8 || VT == MVT::i16)) { + // We only accept offsets that fit in 6 bits (unsigned), with the exception + // of 16-bit loads - those can only go up to 62, because we desugar them + // into a pair of 8-bit loads like `ldd rx, RHSC` + `ldd ry, RHSC + 1`. + bool OkI8 = VT == MVT::i8 && RHSC <= 63; + bool OkI16 = VT == MVT::i16 && RHSC <= 62; + + if (OkI8 || OkI16) { Base = N.getOperand(0); Disp = CurDAG->getTargetConstant(RHSC, dl, MVT::i8); diff --git a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp index d80509cf3984..082b42398c6a 100644 --- a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp @@ -295,6 +295,7 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM, setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Custom); setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Custom); setOperationAction(ISD::BUILD_VECTOR, VT, Custom); + setOperationAction(ISD::CONCAT_VECTORS, VT, Legal); setOperationAction(ISD::SETCC, VT, Legal); setOperationAction(ISD::VSELECT, VT, Legal); @@ -5600,8 +5601,9 @@ bool LoongArchTargetLowering::shouldInsertFencesForAtomic( // On LA64, atomic store operations with IntegerBitWidth of 32 and 64 do not // require fences beacuse we can use amswap_db.[w/d]. - if (isa(I)) { - unsigned Size = I->getOperand(0)->getType()->getIntegerBitWidth(); + Type *Ty = I->getOperand(0)->getType(); + if (isa(I) && Ty->isIntegerTy()) { + unsigned Size = Ty->getIntegerBitWidth(); return (Size == 8 || Size == 16); } diff --git a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchInstrInfo.td b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchInstrInfo.td index ef647a427787..339d50bd8192 100644 --- a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchInstrInfo.td +++ b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchInstrInfo.td @@ -1065,10 +1065,13 @@ def RDTIME_D : RDTIME_2R<0x00006800>; /// Generic pattern classes +def assertsexti32 : PatFrag<(ops node:$src), (assertsext node:$src), [{ + return cast(N->getOperand(1))->getVT().bitsLE(MVT::i32); +}]>; class PatGprGpr : Pat<(OpNode GPR:$rj, GPR:$rk), (Inst GPR:$rj, GPR:$rk)>; class PatGprGpr_32 - : Pat<(sext_inreg (OpNode GPR:$rj, GPR:$rk), i32), (Inst GPR:$rj, GPR:$rk)>; + : Pat<(sext_inreg (OpNode (assertsexti32 GPR:$rj), (assertsexti32 GPR:$rk)), i32), (Inst GPR:$rj, GPR:$rk)>; class PatGpr : Pat<(OpNode GPR:$rj), (Inst GPR:$rj)>; diff --git a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td index 6f1969bf8cae..0a220a0319bc 100644 --- a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td +++ b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td @@ -1789,6 +1789,12 @@ def : Pat<(v4i32 (fp_to_uint (v4f64 LASX256:$vj))), v4f64:$vj)), sub_128)>; +// XVPERMI_Q +foreach vt = [v32i8, v16i16, v8i32, v4i64, v8f32, v4f64] in +def : Pat<(vt (concat_vectors LSX128:$vd, LSX128:$vj)), + (XVPERMI_Q (SUBREG_TO_REG (i64 0), LSX128:$vd, sub_128), + (SUBREG_TO_REG (i64 0), LSX128:$vj, sub_128), 2)>; + } // Predicates = [HasExtLASX] /// Intrinsic pattern diff --git a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp index abac69054f3b..ab90409fdf47 100644 --- a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp +++ b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp @@ -637,6 +637,19 @@ static bool isSignExtendedW(Register SrcReg, const LoongArchSubtarget &ST, break; } return false; + // If all incoming values are sign-extended and all users only use + // the lower 32 bits, then convert them to W versions. + case LoongArch::DIV_D: { + if (!AddRegToWorkList(MI->getOperand(1).getReg())) + return false; + if (!AddRegToWorkList(MI->getOperand(2).getReg())) + return false; + if (hasAllWUsers(*MI, ST, MRI)) { + FixableDef.insert(MI); + break; + } + return false; + } } } @@ -651,6 +664,8 @@ static unsigned getWOp(unsigned Opcode) { return LoongArch::ADDI_W; case LoongArch::ADD_D: return LoongArch::ADD_W; + case LoongArch::DIV_D: + return LoongArch::DIV_W; case LoongArch::LD_D: case LoongArch::LD_WU: return LoongArch::LD_W; diff --git a/contrib/llvm-project/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp b/contrib/llvm-project/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp index c7f88fed9b12..efbcb57add98 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/contrib/llvm-project/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -2707,7 +2707,8 @@ bool X86AsmParser::parseIntelOperand(OperandVector &Operands, StringRef Name) { bool MaybeDirectBranchDest = true; if (Parser.isParsingMasm()) { - if (is64BitMode() && SM.getElementSize() > 0) { + if (is64BitMode() && + ((PtrInOperand && !IndexReg) || SM.getElementSize() > 0)) { DefaultBaseReg = X86::RIP; } if (IsUnconditionalBranch) { diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp index 5a9d679d7002..45989bcd07d3 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -3415,7 +3415,7 @@ unsigned X86TargetLowering::preferedOpcodeForCmpEqPiecesOfOperand( // We prefer rotate for vectors of if we won't get a zext mask with SRL // (PreferRotate will be set in the latter case). - if (PreferRotate || VT.isVector()) + if (PreferRotate || !MayTransformRotate || VT.isVector()) return ShiftOpc; // Non-vector type and we have a zext mask with SRL. diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td b/contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td index da690aea43f5..cc1f9090c11a 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td @@ -2625,11 +2625,11 @@ multiclass avx512_mask_mov opc_kk, bits<8> opc_km, bits<8> opc_mk, def km#Suffix : I, - Sched<[WriteLoad]>; + Sched<[WriteLoad]>, NoCD8; def mk#Suffix : I, - Sched<[WriteStore]>; + Sched<[WriteStore]>, NoCD8; } multiclass avx512_mask_mov_gpr opc_kr, bits<8> opc_rk, diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp index 9c9fc7a49a9d..68696789530f 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1349,7 +1349,8 @@ static bool MayContainThrowingOrExitingCallAfterCB(CallBase *Begin, // Add attributes from CB params and Fn attributes that can always be propagated // to the corresponding argument / inner callbases. static void AddParamAndFnBasicAttributes(const CallBase &CB, - ValueToValueMapTy &VMap) { + ValueToValueMapTy &VMap, + ClonedCodeInfo &InlinedFunctionInfo) { auto *CalledFunction = CB.getCalledFunction(); auto &Context = CalledFunction->getContext(); @@ -1380,6 +1381,11 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, auto *NewInnerCB = dyn_cast_or_null(VMap.lookup(InnerCB)); if (!NewInnerCB) continue; + // The InnerCB might have be simplified during the inlining + // process which can make propagation incorrect. + if (InlinedFunctionInfo.isSimplified(InnerCB, NewInnerCB)) + continue; + AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { // Check if the underlying value for the parameter is an argument. @@ -1455,7 +1461,8 @@ static AttrBuilder IdentifyValidPoisonGeneratingAttributes(CallBase &CB) { return Valid; } -static void AddReturnAttributes(CallBase &CB, ValueToValueMapTy &VMap) { +static void AddReturnAttributes(CallBase &CB, ValueToValueMapTy &VMap, + ClonedCodeInfo &InlinedFunctionInfo) { AttrBuilder ValidUB = IdentifyValidUBGeneratingAttributes(CB); AttrBuilder ValidPG = IdentifyValidPoisonGeneratingAttributes(CB); if (!ValidUB.hasAttributes() && !ValidPG.hasAttributes()) @@ -1474,6 +1481,11 @@ static void AddReturnAttributes(CallBase &CB, ValueToValueMapTy &VMap) { auto *NewRetVal = dyn_cast_or_null(VMap.lookup(RetVal)); if (!NewRetVal) continue; + + // The RetVal might have be simplified during the inlining + // process which can make propagation incorrect. + if (InlinedFunctionInfo.isSimplified(RetVal, NewRetVal)) + continue; // Backward propagation of attributes to the returned value may be incorrect // if it is control flow dependent. // Consider: @@ -2456,11 +2468,11 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI, // Clone return attributes on the callsite into the calls within the inlined // function which feed into its return value. - AddReturnAttributes(CB, VMap); + AddReturnAttributes(CB, VMap, InlinedFunctionInfo); // Clone attributes on the params of the callsite to calls within the // inlined function which use the same param. - AddParamAndFnBasicAttributes(CB, VMap); + AddParamAndFnBasicAttributes(CB, VMap, InlinedFunctionInfo); propagateMemProfMetadata(CalledFunc, CB, InlinedFunctionInfo.ContainsMemProfMetadata, VMap); diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/LoopPeel.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/LoopPeel.cpp index 5d7c0d947fac..760f1619e030 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/LoopPeel.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/LoopPeel.cpp @@ -859,7 +859,7 @@ static void cloneLoopBlocks( if (LatchInst && L->contains(LatchInst)) LatchVal = VMap[LatchVal]; PHI.addIncoming(LatchVal, cast(VMap[Edge.first])); - SE.forgetValue(&PHI); + SE.forgetLcssaPhiWithNewPredecessor(L, &PHI); } // LastValueMap is updated with the values for the current loop diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index cac840266348..776ac0ea1544 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-19.1.0-0-ga4bf6cd7cfb1" +#define LLVM_REVISION "llvmorg-19.1.1-0-gd401987fe349" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-19.1.0-0-ga4bf6cd7cfb1" +#define CLANG_REVISION "llvmorg-19.1.1-0-gd401987fe349" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-19.1.0-0-ga4bf6cd7cfb1" +#define LLDB_REVISION "llvmorg-19.1.1-0-gd401987fe349" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index f5e540cec4fd..d383f17c1532 100644 *** 80 LINES SKIPPED *** From nobody Sun Dec 1 11:18:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYt5lbpz5fTWt; Sun, 01 Dec 2024 11:18:58 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYt4nkNz436C; Sun, 1 Dec 2024 11:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ev54gGXmVF0C0K69uDv7HkGWlaI0dtrtrCgC82Sv34=; b=vNLAti9/xnnYqftRNF+XbeEqBgQ8hRFbqDb9ZmdIR5pBAJT0Ex89Fd0uK2i03Jv/LCV6IE wujG255AjgjjGNdewKdKnvpdsL25b/+tnuh8pu+yiivHdCgscOeLEOt9/3qrBFzwtyRn+k DNgDaAwpolF2nAC+QCp8JIDRXsJUSiQwiXCjA2JhLjWZZwcIIJLZpNUC33TXlyngwPseRl NB7xY+LJJtPCz6npzv4V4uRm8PdN8biPp36rgKTkyU1g038ZpIgEwSzoOYvR7kUL3FWnGh nTqZVvRrP0QnM+9/IaRh9D5StS8rrjFNIehUzto+OEnGmgVrSKP11P+xb3AwAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ev54gGXmVF0C0K69uDv7HkGWlaI0dtrtrCgC82Sv34=; b=Ggl8quAowuPh4Uq7OfzYq6Mg7R/jARNEQZez3i98RWG5WXL2iTkity2EPW683BR4XemTqg j3i6qxJ9XWuWzE5NIF05ZmsLdEm6ph4x5pGvQcnK2Oi+/JOIXtBZ/PQyJp7jsTKTGoIx3P gE6xOT0Nv1Gkf+IEYsWjelXSVEqP+At2WGEH0WoH2a9yET3KPKsN06Na/EPKl6mZcaJZK1 4SigS25t9LsskoY4jU72gBAUXHuhm+JVrvDdcrv8bC9SHEdp4Np4FbtHkoyx9PVj6kWWQm YNo6XCs7qGPqWBSQPk7uVRwjFdD/+3adxV5cCmoBtYzj/yxEqwX2a0cTlInS1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051938; a=rsa-sha256; cv=none; b=SHN8JKCKiUD+u/Dh3H5kxMhYHSGFGQ5RPCSp3qiBal4s/gHhYl3kqxiAE3IovI6OV0w4Zd d2FXAeWYcdB75uP3MeOCPmp3SepGPRcHbXWhHP6BZSSRNb0IRAdONbUknHQ/67tfacJrGM 6w4eW8SmtUctNSg/S+mfAj2b5yo6LrhYo15Vl7LtEhW/ubcazL3n2+3A3B+ohzx485eg5D Lrauhu8p6qS6/3jWvnbm/c9WXdQImQx701qQLnQQuUBn51m0H5zS8ojsec6MxVBI1SNQQ7 w/LvYh5V+jwC1mbyTlCreONs9aQygSkoZDRUlE9OEqqkaEiPWNYMS7vfQcJByw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYt43dpzqjr; Sun, 1 Dec 2024 11:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIwjw008877; Sun, 1 Dec 2024 11:18:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIw6L008874; Sun, 1 Dec 2024 11:18:58 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:58 GMT Message-Id: <202412011118.4B1BIw6L008874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f61db8646f1f - stable/14 - Merge llvm-project release/19.x llvmorg-19.1.2-0-g7ba7d8e2f7b6 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f61db8646f1fa701ac281cb8093c3f695817e735 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f61db8646f1fa701ac281cb8093c3f695817e735 commit f61db8646f1fa701ac281cb8093c3f695817e735 Author: Dimitry Andric AuthorDate: 2024-10-21 12:59:26 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:15 +0000 Merge llvm-project release/19.x llvmorg-19.1.2-0-g7ba7d8e2f7b6 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.2-0-g7ba7d8e2f7b6, a.k.a. 19.1.2 release. PR: 280562 MFC after: 1 month (cherry picked from commit 5deeebd8c6ca991269e72902a7a62cada57947f6) --- .../clang/include/clang/Basic/TokenKinds.def | 5 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 31 ++++++------ contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp | 2 +- contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp | 16 +++--- .../clang/lib/CodeGen/CodeGenModule.cpp | 15 +++--- .../llvm-project/clang/lib/CodeGen/CodeGenModule.h | 5 +- .../llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp | 13 +++-- .../llvm-project/clang/lib/CodeGen/CodeGenTBAA.h | 5 +- .../clang/lib/CodeGen/CodeGenTypes.cpp | 7 +-- .../llvm-project/clang/lib/CodeGen/CodeGenTypes.h | 8 +-- .../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 2 +- .../clang/lib/Format/TokenAnnotator.cpp | 42 ++++++++------- .../clang/lib/Format/UnwrappedLineParser.cpp | 17 +++++-- contrib/llvm-project/clang/lib/Headers/intrin0.h | 2 +- contrib/llvm-project/clang/lib/Headers/vecintrin.h | 28 ++++++++-- .../clang/lib/Lex/PPMacroExpansion.cpp | 52 ++++++++++++------- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 3 +- .../llvm-project/clang/lib/Sema/TreeTransform.h | 2 +- .../compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp | 5 ++ contrib/llvm-project/libcxx/include/__config | 2 +- contrib/llvm-project/libcxx/include/version | 7 ++- contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp | 20 ++++++-- .../llvm/include/llvm/CodeGen/FastISel.h | 3 ++ .../llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 12 +++-- .../llvm/lib/Target/X86/X86FastISel.cpp | 4 +- .../llvm/lib/Target/X86/X86ISelLowering.cpp | 13 +++-- .../Transforms/InstCombine/InstCombineAndOrXor.cpp | 18 +++++-- .../lib/Transforms/Vectorize/VectorCombine.cpp | 59 ++++++++++++---------- lib/clang/include/VCSVersion.inc | 6 +-- lib/clang/include/clang/Basic/Version.inc | 6 +-- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +-- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 35 files changed, 260 insertions(+), 168 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def b/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def index 8c54661e65cf..0526fbf51bd9 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def +++ b/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def @@ -64,6 +64,10 @@ #ifndef EXPRESSION_TRAIT #define EXPRESSION_TRAIT(I,E,K) KEYWORD(I,K) #endif +#ifndef TRANSFORM_TYPE_TRAIT_DEF +#define TRANSFORM_TYPE_TRAIT_DEF(K, Trait) KEYWORD(__##Trait, KEYCXX) +#endif + #ifndef ALIAS #define ALIAS(X,Y,Z) #endif @@ -534,7 +538,6 @@ TYPE_TRAIT_1(__has_unique_object_representations, TYPE_TRAIT_2(__is_layout_compatible, IsLayoutCompatible, KEYCXX) TYPE_TRAIT_2(__is_pointer_interconvertible_base_of, IsPointerInterconvertibleBaseOf, KEYCXX) -#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait) KEYWORD(__##Trait, KEYCXX) #include "clang/Basic/TransformTypeTraits.def" // Clang-only C++ Type Traits diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp index d7ebffa8c5e4..0416fa03d749 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp @@ -314,7 +314,8 @@ CodeGenTypes::arrangeCXXMethodDeclaration(const CXXMethodDecl *MD) { if (MD->isImplicitObjectMemberFunction()) { // The abstract case is perfectly fine. - const CXXRecordDecl *ThisType = TheCXXABI.getThisArgumentTypeForMethod(MD); + const CXXRecordDecl *ThisType = + getCXXABI().getThisArgumentTypeForMethod(MD); return arrangeCXXMethodType(ThisType, prototype.getTypePtr(), MD); } @@ -337,7 +338,7 @@ CodeGenTypes::arrangeCXXStructorDeclaration(GlobalDecl GD) { SmallVector argTypes; SmallVector paramInfos; - const CXXRecordDecl *ThisType = TheCXXABI.getThisArgumentTypeForMethod(GD); + const CXXRecordDecl *ThisType = getCXXABI().getThisArgumentTypeForMethod(GD); argTypes.push_back(DeriveThisType(ThisType, MD)); bool PassParams = true; @@ -356,7 +357,7 @@ CodeGenTypes::arrangeCXXStructorDeclaration(GlobalDecl GD) { appendParameterTypes(*this, argTypes, paramInfos, FTP); CGCXXABI::AddedStructorArgCounts AddedArgs = - TheCXXABI.buildStructorSignature(GD, argTypes); + getCXXABI().buildStructorSignature(GD, argTypes); if (!paramInfos.empty()) { // Note: prefix implies after the first param. if (AddedArgs.Prefix) @@ -372,11 +373,10 @@ CodeGenTypes::arrangeCXXStructorDeclaration(GlobalDecl GD) { : RequiredArgs::All); FunctionType::ExtInfo extInfo = FTP->getExtInfo(); - CanQualType resultType = TheCXXABI.HasThisReturn(GD) - ? argTypes.front() - : TheCXXABI.hasMostDerivedReturn(GD) - ? CGM.getContext().VoidPtrTy - : Context.VoidTy; + CanQualType resultType = getCXXABI().HasThisReturn(GD) ? argTypes.front() + : getCXXABI().hasMostDerivedReturn(GD) + ? CGM.getContext().VoidPtrTy + : Context.VoidTy; return arrangeLLVMFunctionInfo(resultType, FnInfoOpts::IsInstanceMethod, argTypes, extInfo, paramInfos, required); } @@ -437,11 +437,10 @@ CodeGenTypes::arrangeCXXConstructorCall(const CallArgList &args, : RequiredArgs::All; GlobalDecl GD(D, CtorKind); - CanQualType ResultType = TheCXXABI.HasThisReturn(GD) - ? ArgTypes.front() - : TheCXXABI.hasMostDerivedReturn(GD) - ? CGM.getContext().VoidPtrTy - : Context.VoidTy; + CanQualType ResultType = getCXXABI().HasThisReturn(GD) ? ArgTypes.front() + : getCXXABI().hasMostDerivedReturn(GD) + ? CGM.getContext().VoidPtrTy + : Context.VoidTy; FunctionType::ExtInfo Info = FPT->getExtInfo(); llvm::SmallVector ParamInfos; @@ -806,7 +805,7 @@ const CGFunctionInfo &CodeGenTypes::arrangeLLVMFunctionInfo( } else if (info.getCC() == CC_Swift || info.getCC() == CC_SwiftAsync) { swiftcall::computeABIInfo(CGM, *FI); } else { - getABIInfo().computeInfo(*FI); + CGM.getABIInfo().computeInfo(*FI); } // Loop over all of the computed argument and return value info. If any of @@ -6022,6 +6021,6 @@ RValue CodeGenFunction::EmitVAArg(VAArgExpr *VE, Address &VAListAddr, : EmitVAListRef(VE->getSubExpr()); QualType Ty = VE->getType(); if (VE->isMicrosoftABI()) - return CGM.getTypes().getABIInfo().EmitMSVAArg(*this, VAListAddr, Ty, Slot); - return CGM.getTypes().getABIInfo().EmitVAArg(*this, VAListAddr, Ty, Slot); + return CGM.getABIInfo().EmitMSVAArg(*this, VAListAddr, Ty, Slot); + return CGM.getABIInfo().EmitVAArg(*this, VAListAddr, Ty, Slot); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp index 667e260f2228..e5ba50de3462 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp @@ -209,7 +209,7 @@ CodeGenModule::GetNonVirtualBaseClassOffset(const CXXRecordDecl *ClassDecl, return nullptr; llvm::Type *PtrDiffTy = - Types.ConvertType(getContext().getPointerDiffType()); + getTypes().ConvertType(getContext().getPointerDiffType()); return llvm::ConstantInt::get(PtrDiffTy, Offset.getQuantity()); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp index 5f58a64d8386..3ef22b17f769 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp @@ -1052,6 +1052,8 @@ public: return Visit(E->getBase()); } const Expr *VisitCastExpr(const CastExpr *E) { + if (E->getCastKind() == CK_LValueToRValue) + return IsExpectedRecordDecl(E) ? E : nullptr; return Visit(E->getSubExpr()); } const Expr *VisitParenExpr(const ParenExpr *E) { @@ -1119,19 +1121,15 @@ llvm::Value *CodeGenFunction::EmitCountedByFieldExpr( return nullptr; llvm::Value *Res = nullptr; - if (const auto *DRE = dyn_cast(StructBase)) { - Res = EmitDeclRefLValue(DRE).getPointer(*this); - Res = Builder.CreateAlignedLoad(ConvertType(DRE->getType()), Res, - getPointerAlign(), "dre.load"); - } else if (const MemberExpr *ME = dyn_cast(StructBase)) { - LValue LV = EmitMemberExpr(ME); - Address Addr = LV.getAddress(); - Res = Addr.emitRawPointer(*this); - } else if (StructBase->getType()->isPointerType()) { + if (StructBase->getType()->isPointerType()) { LValueBaseInfo BaseInfo; TBAAAccessInfo TBAAInfo; Address Addr = EmitPointerWithAlignment(StructBase, &BaseInfo, &TBAAInfo); Res = Addr.emitRawPointer(*this); + } else if (StructBase->isLValue()) { + LValue LV = EmitLValue(StructBase); + Address Addr = LV.getAddress(); + Res = Addr.emitRawPointer(*this); } else { return nullptr; } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp index 63ed5b4dd0c3..cf5e29e5a3db 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp @@ -343,10 +343,11 @@ CodeGenModule::CodeGenModule(ASTContext &C, : Context(C), LangOpts(C.getLangOpts()), FS(FS), HeaderSearchOpts(HSO), PreprocessorOpts(PPO), CodeGenOpts(CGO), TheModule(M), Diags(diags), Target(C.getTargetInfo()), ABI(createCXXABI(*this)), - VMContext(M.getContext()), Types(*this), VTables(*this), + VMContext(M.getContext()), VTables(*this), SanitizerMD(new SanitizerMetadata(*this)) { // Initialize the type cache. + Types.reset(new CodeGenTypes(*this)); llvm::LLVMContext &LLVMContext = M.getContext(); VoidTy = llvm::Type::getVoidTy(LLVMContext); Int8Ty = llvm::Type::getInt8Ty(LLVMContext); @@ -405,7 +406,7 @@ CodeGenModule::CodeGenModule(ASTContext &C, if (LangOpts.Sanitize.has(SanitizerKind::Thread) || (!CodeGenOpts.RelaxedAliasing && CodeGenOpts.OptimizationLevel > 0)) TBAA.reset(new CodeGenTBAA(Context, getTypes(), TheModule, CodeGenOpts, - getLangOpts(), getCXXABI().getMangleContext())); + getLangOpts())); // If debug info or coverage generation is enabled, create the CGDebugInfo // object. @@ -1452,12 +1453,12 @@ void CodeGenModule::EmitBackendOptionsMetadata( void CodeGenModule::UpdateCompletedType(const TagDecl *TD) { // Make sure that this type is translated. - Types.UpdateCompletedType(TD); + getTypes().UpdateCompletedType(TD); } void CodeGenModule::RefreshTypeCacheForClass(const CXXRecordDecl *RD) { // Make sure that this type is translated. - Types.RefreshTypeCacheForClass(RD); + getTypes().RefreshTypeCacheForClass(RD); } llvm::MDNode *CodeGenModule::getTBAATypeInfo(QualType QTy) { @@ -5376,6 +5377,10 @@ void CodeGenModule::maybeSetTrivialComdat(const Decl &D, GO.setComdat(TheModule.getOrInsertComdat(GO.getName())); } +const ABIInfo &CodeGenModule::getABIInfo() { + return getTargetCodeGenInfo().getABIInfo(); +} + /// Pass IsTentative as true if you want to create a tentative definition. void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, bool IsTentative) { @@ -7784,7 +7789,5 @@ void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) { NewBuilder->WeakRefReferences = std::move(WeakRefReferences); - NewBuilder->TBAA = std::move(TBAA); - NewBuilder->ABI->MangleCtx = std::move(ABI->MangleCtx); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h index 284bba823bae..c58bb88035ca 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h @@ -320,7 +320,7 @@ private: // This should not be moved earlier, since its initialization depends on some // of the previous reference members being already initialized and also checks // if TheTargetCodeGenInfo is NULL - CodeGenTypes Types; + std::unique_ptr Types; /// Holds information about C++ vtables. CodeGenVTables VTables; @@ -776,6 +776,7 @@ public: bool supportsCOMDAT() const; void maybeSetTrivialComdat(const Decl &D, llvm::GlobalObject &GO); + const ABIInfo &getABIInfo(); CGCXXABI &getCXXABI() const { return *ABI; } llvm::LLVMContext &getLLVMContext() { return VMContext; } @@ -783,7 +784,7 @@ public: const TargetCodeGenInfo &getTargetCodeGenInfo(); - CodeGenTypes &getTypes() { return Types; } + CodeGenTypes &getTypes() { return *Types; } CodeGenVTables &getVTables() { return VTables; } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp index b66b6234c9d3..2ce558d4bdf3 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp @@ -16,6 +16,7 @@ #include "CodeGenTBAA.h" #include "ABIInfoImpl.h" +#include "CGCXXABI.h" #include "CGRecordLayout.h" #include "CodeGenTypes.h" #include "clang/AST/ASTContext.h" @@ -36,10 +37,10 @@ using namespace CodeGen; CodeGenTBAA::CodeGenTBAA(ASTContext &Ctx, CodeGenTypes &CGTypes, llvm::Module &M, const CodeGenOptions &CGO, - const LangOptions &Features, MangleContext &MContext) + const LangOptions &Features) : Context(Ctx), CGTypes(CGTypes), Module(M), CodeGenOpts(CGO), - Features(Features), MContext(MContext), MDHelper(M.getContext()), - Root(nullptr), Char(nullptr) {} + Features(Features), MDHelper(M.getContext()), Root(nullptr), + Char(nullptr) {} CodeGenTBAA::~CodeGenTBAA() { } @@ -256,7 +257,8 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { SmallString<256> OutName; llvm::raw_svector_ostream Out(OutName); - MContext.mangleCanonicalTypeName(QualType(ETy, 0), Out); + CGTypes.getCXXABI().getMangleContext().mangleCanonicalTypeName( + QualType(ETy, 0), Out); return createScalarTypeNode(OutName, getChar(), Size); } @@ -481,7 +483,8 @@ llvm::MDNode *CodeGenTBAA::getBaseTypeInfoHelper(const Type *Ty) { if (Features.CPlusPlus) { // Don't use the mangler for C code. llvm::raw_svector_ostream Out(OutName); - MContext.mangleCanonicalTypeName(QualType(Ty, 0), Out); + CGTypes.getCXXABI().getMangleContext().mangleCanonicalTypeName( + QualType(Ty, 0), Out); } else { OutName = RD->getName(); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.h b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.h index 5d9ecec3ff0f..ba74a39a4d25 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.h +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.h @@ -24,7 +24,6 @@ namespace clang { class ASTContext; class CodeGenOptions; class LangOptions; - class MangleContext; class QualType; class Type; @@ -120,7 +119,6 @@ class CodeGenTBAA { llvm::Module &Module; const CodeGenOptions &CodeGenOpts; const LangOptions &Features; - MangleContext &MContext; // MDHelper - Helper for creating metadata. llvm::MDBuilder MDHelper; @@ -174,8 +172,7 @@ class CodeGenTBAA { public: CodeGenTBAA(ASTContext &Ctx, CodeGenTypes &CGTypes, llvm::Module &M, - const CodeGenOptions &CGO, const LangOptions &Features, - MangleContext &MContext); + const CodeGenOptions &CGO, const LangOptions &Features); ~CodeGenTBAA(); /// getTypeInfo - Get metadata used to describe accesses to objects of the diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.cpp index e0f567c5da34..f5deccdc1ba7 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.cpp @@ -30,9 +30,8 @@ using namespace clang; using namespace CodeGen; CodeGenTypes::CodeGenTypes(CodeGenModule &cgm) - : CGM(cgm), Context(cgm.getContext()), TheModule(cgm.getModule()), - Target(cgm.getTarget()), TheCXXABI(cgm.getCXXABI()), - TheABIInfo(cgm.getTargetCodeGenInfo().getABIInfo()) { + : CGM(cgm), Context(cgm.getContext()), TheModule(cgm.getModule()), + Target(cgm.getTarget()) { SkippedLayout = false; LongDoubleReferenced = false; } @@ -43,6 +42,8 @@ CodeGenTypes::~CodeGenTypes() { delete &*I++; } +CGCXXABI &CodeGenTypes::getCXXABI() const { return getCGM().getCXXABI(); } + const CodeGenOptions &CodeGenTypes::getCodeGenOpts() const { return CGM.getCodeGenOpts(); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.h b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.h index cbda2628e914..5aebf9a21223 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.h +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.h @@ -57,11 +57,6 @@ class CodeGenTypes { ASTContext &Context; llvm::Module &TheModule; const TargetInfo &Target; - CGCXXABI &TheCXXABI; - - // This should not be moved earlier, since its initialization depends on some - // of the previous reference members being already initialized - const ABIInfo &TheABIInfo; /// The opaque type map for Objective-C interfaces. All direct /// manipulation is done by the runtime interfaces, which are @@ -106,9 +101,8 @@ public: } CodeGenModule &getCGM() const { return CGM; } ASTContext &getContext() const { return Context; } - const ABIInfo &getABIInfo() const { return TheABIInfo; } const TargetInfo &getTarget() const { return Target; } - CGCXXABI &getCXXABI() const { return TheCXXABI; } + CGCXXABI &getCXXABI() const; llvm::LLVMContext &getLLVMContext() { return TheModule.getContext(); } const CodeGenOptions &getCodeGenOpts() const; diff --git a/contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp index cc6740edabcd..76d0191a7e63 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp @@ -1111,7 +1111,7 @@ static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, const Type *Base = nullptr; uint64_t NumElts = 0; if (CGM.getTarget().getTriple().isAArch64() && - CGM.getTypes().getABIInfo().isHomogeneousAggregate(Ty, Base, NumElts) && + CGM.getABIInfo().isHomogeneousAggregate(Ty, Base, NumElts) && isa(Base)) { return true; } diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 4512e539cc79..ad9ed7b47d00 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -189,25 +189,29 @@ private: next(); } - for (bool SeenTernaryOperator = false; CurrentToken;) { + for (bool SeenTernaryOperator = false, MaybeAngles = true; CurrentToken;) { const bool InExpr = Contexts[Contexts.size() - 2].IsExpression; if (CurrentToken->is(tok::greater)) { const auto *Next = CurrentToken->Next; - // Try to do a better job at looking for ">>" within the condition of - // a statement. Conservatively insert spaces between consecutive ">" - // tokens to prevent splitting right bitshift operators and potentially - // altering program semantics. This check is overly conservative and - // will prevent spaces from being inserted in select nested template - // parameter cases, but should not alter program semantics. - if (Next && Next->is(tok::greater) && - Left->ParentBracket != tok::less && - CurrentToken->getStartOfNonWhitespace() == - Next->getStartOfNonWhitespace().getLocWithOffset(-1)) { - return false; - } - if (InExpr && SeenTernaryOperator && - (!Next || !Next->isOneOf(tok::l_paren, tok::l_brace))) { - return false; + if (CurrentToken->isNot(TT_TemplateCloser)) { + // Try to do a better job at looking for ">>" within the condition of + // a statement. Conservatively insert spaces between consecutive ">" + // tokens to prevent splitting right shift operators and potentially + // altering program semantics. This check is overly conservative and + // will prevent spaces from being inserted in select nested template + // parameter cases, but should not alter program semantics. + if (Next && Next->is(tok::greater) && + Left->ParentBracket != tok::less && + CurrentToken->getStartOfNonWhitespace() == + Next->getStartOfNonWhitespace().getLocWithOffset(-1)) { + return false; + } + if (InExpr && SeenTernaryOperator && + (!Next || !Next->isOneOf(tok::l_paren, tok::l_brace))) { + return false; + } + if (!MaybeAngles) + return false; } Left->MatchingParen = CurrentToken; CurrentToken->MatchingParen = Left; @@ -243,11 +247,11 @@ private: // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if (MaybeAngles && InExpr && !Line.startsWith(tok::kw_template) && Prev.is(TT_BinaryOperator)) { const auto Precedence = Prev.getPrecedence(); if (Precedence > prec::Conditional && Precedence < prec::Relational) - return false; + MaybeAngles = false; } if (Prev.isOneOf(tok::question, tok::colon) && !Style.isProto()) SeenTernaryOperator = true; @@ -1615,7 +1619,7 @@ private: return false; break; case tok::greater: - if (Style.Language != FormatStyle::LK_TextProto) + if (Style.Language != FormatStyle::LK_TextProto && Tok->is(TT_Unknown)) Tok->setType(TT_BinaryOperator); if (Tok->Previous && Tok->Previous->is(TT_TemplateCloser)) Tok->SpacesRequiredBefore = 1; diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp index 7813d86ff0ea..631c7c62baac 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp @@ -2131,6 +2131,11 @@ void UnwrappedLineParser::parseStructuralElement( return; } break; + case tok::greater: + nextToken(); + if (FormatTok->is(tok::l_brace)) + FormatTok->Previous->setFinalizedType(TT_TemplateCloser); + break; default: nextToken(); break; @@ -2551,7 +2556,7 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType) { parseChildBlock(); break; case tok::r_paren: { - const auto *Prev = LeftParen->Previous; + auto *Prev = LeftParen->Previous; if (!MightBeStmtExpr && !MightBeFoldExpr && !Line->InMacroBody && Style.RemoveParentheses > FormatStyle::RPS_Leave) { const auto *Next = Tokens->peekNextToken(); @@ -2575,9 +2580,13 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType) { FormatTok->Optional = true; } } - if (Prev && Prev->is(TT_TypenameMacro)) { - LeftParen->setFinalizedType(TT_TypeDeclarationParen); - FormatTok->setFinalizedType(TT_TypeDeclarationParen); + if (Prev) { + if (Prev->is(TT_TypenameMacro)) { + LeftParen->setFinalizedType(TT_TypeDeclarationParen); + FormatTok->setFinalizedType(TT_TypeDeclarationParen); + } else if (Prev->is(tok::greater) && FormatTok->Previous == LeftParen) { + Prev->setFinalizedType(TT_TemplateCloser); + } } nextToken(); return SeenEqual; diff --git a/contrib/llvm-project/clang/lib/Headers/intrin0.h b/contrib/llvm-project/clang/lib/Headers/intrin0.h index 866c8896617d..6b01f3808652 100644 --- a/contrib/llvm-project/clang/lib/Headers/intrin0.h +++ b/contrib/llvm-project/clang/lib/Headers/intrin0.h @@ -44,7 +44,7 @@ unsigned char _InterlockedCompareExchange128_rel(__int64 volatile *_Destination, __int64 *_ComparandResult); #endif -#ifdef __x86_64__ && !defined(__arm64ec__) +#if defined(__x86_64__) && !defined(__arm64ec__) unsigned __int64 _umul128(unsigned __int64, unsigned __int64, unsigned __int64 *); unsigned __int64 __shiftleft128(unsigned __int64 _LowPart, diff --git a/contrib/llvm-project/clang/lib/Headers/vecintrin.h b/contrib/llvm-project/clang/lib/Headers/vecintrin.h index 1f51e32c0d13..609c7cf0b7a6 100644 --- a/contrib/llvm-project/clang/lib/Headers/vecintrin.h +++ b/contrib/llvm-project/clang/lib/Headers/vecintrin.h @@ -8359,7 +8359,9 @@ vec_min(__vector double __a, __vector double __b) { static inline __ATTRS_ai __vector unsigned char vec_add_u128(__vector unsigned char __a, __vector unsigned char __b) { - return (__vector unsigned char)((__int128)__a + (__int128)__b); + return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) + ((__int128)__a + (__int128)__b); } /*-- vec_addc ---------------------------------------------------------------*/ @@ -8389,6 +8391,7 @@ vec_addc(__vector unsigned long long __a, __vector unsigned long long __b) { static inline __ATTRS_ai __vector unsigned char vec_addc_u128(__vector unsigned char __a, __vector unsigned char __b) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vaccq((unsigned __int128)__a, (unsigned __int128)__b); } @@ -8398,6 +8401,7 @@ static inline __ATTRS_ai __vector unsigned char vec_adde_u128(__vector unsigned char __a, __vector unsigned char __b, __vector unsigned char __c) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vacq((unsigned __int128)__a, (unsigned __int128)__b, (unsigned __int128)__c); } @@ -8408,6 +8412,7 @@ static inline __ATTRS_ai __vector unsigned char vec_addec_u128(__vector unsigned char __a, __vector unsigned char __b, __vector unsigned char __c) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vacccq((unsigned __int128)__a, (unsigned __int128)__b, (unsigned __int128)__c); } @@ -8483,7 +8488,9 @@ vec_gfmsum(__vector unsigned int __a, __vector unsigned int __b) { static inline __ATTRS_o_ai __vector unsigned char vec_gfmsum_128(__vector unsigned long long __a, __vector unsigned long long __b) { - return (__vector unsigned char)__builtin_s390_vgfmg(__a, __b); + return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) + __builtin_s390_vgfmg(__a, __b); } /*-- vec_gfmsum_accum -------------------------------------------------------*/ @@ -8513,6 +8520,7 @@ vec_gfmsum_accum_128(__vector unsigned long long __a, __vector unsigned long long __b, __vector unsigned char __c) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vgfmag(__a, __b, (unsigned __int128)__c); } @@ -8810,6 +8818,7 @@ vec_msum_u128(__vector unsigned long long __a, __vector unsigned long long __b, #define vec_msum_u128(X, Y, Z, W) \ ((__typeof__((vec_msum_u128)((X), (Y), (Z), (W)))) \ + (unsigned __int128 __attribute__((__vector_size__(16)))) \ __builtin_s390_vmslg((X), (Y), (unsigned __int128)(Z), (W))) #endif @@ -8817,7 +8826,9 @@ vec_msum_u128(__vector unsigned long long __a, __vector unsigned long long __b, static inline __ATTRS_ai __vector unsigned char vec_sub_u128(__vector unsigned char __a, __vector unsigned char __b) { - return (__vector unsigned char)((__int128)__a - (__int128)__b); + return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) + ((__int128)__a - (__int128)__b); } /*-- vec_subc ---------------------------------------------------------------*/ @@ -8847,6 +8858,7 @@ vec_subc(__vector unsigned long long __a, __vector unsigned long long __b) { static inline __ATTRS_ai __vector unsigned char vec_subc_u128(__vector unsigned char __a, __vector unsigned char __b) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vscbiq((unsigned __int128)__a, (unsigned __int128)__b); } @@ -8856,6 +8868,7 @@ static inline __ATTRS_ai __vector unsigned char vec_sube_u128(__vector unsigned char __a, __vector unsigned char __b, __vector unsigned char __c) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vsbiq((unsigned __int128)__a, (unsigned __int128)__b, (unsigned __int128)__c); } @@ -8866,6 +8879,7 @@ static inline __ATTRS_ai __vector unsigned char vec_subec_u128(__vector unsigned char __a, __vector unsigned char __b, __vector unsigned char __c) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vsbcbiq((unsigned __int128)__a, (unsigned __int128)__b, (unsigned __int128)__c); } @@ -8886,12 +8900,16 @@ vec_sum2(__vector unsigned int __a, __vector unsigned int __b) { static inline __ATTRS_o_ai __vector unsigned char vec_sum_u128(__vector unsigned int __a, __vector unsigned int __b) { - return (__vector unsigned char)__builtin_s390_vsumqf(__a, __b); + return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) + __builtin_s390_vsumqf(__a, __b); } static inline __ATTRS_o_ai __vector unsigned char vec_sum_u128(__vector unsigned long long __a, __vector unsigned long long __b) { - return (__vector unsigned char)__builtin_s390_vsumqg(__a, __b); + return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) + __builtin_s390_vsumqg(__a, __b); } /*-- vec_sum4 ---------------------------------------------------------------*/ diff --git a/contrib/llvm-project/clang/lib/Lex/PPMacroExpansion.cpp b/contrib/llvm-project/clang/lib/Lex/PPMacroExpansion.cpp index 3913ff08c2eb..fb88ec2bf603 100644 --- a/contrib/llvm-project/clang/lib/Lex/PPMacroExpansion.cpp +++ b/contrib/llvm-project/clang/lib/Lex/PPMacroExpansion.cpp @@ -1602,6 +1602,34 @@ static bool isTargetVariantEnvironment(const TargetInfo &TI, return false; } +static bool IsBuiltinTrait(Token &Tok) { + +#define TYPE_TRAIT_1(Spelling, Name, Key) \ + case tok::kw_##Spelling: \ + return true; +#define TYPE_TRAIT_2(Spelling, Name, Key) \ + case tok::kw_##Spelling: \ + return true; +#define TYPE_TRAIT_N(Spelling, Name, Key) \ + case tok::kw_##Spelling: \ + return true; +#define ARRAY_TYPE_TRAIT(Spelling, Name, Key) \ + case tok::kw_##Spelling: \ + return true; +#define EXPRESSION_TRAIT(Spelling, Name, Key) \ + case tok::kw_##Spelling: \ + return true; +#define TRANSFORM_TYPE_TRAIT_DEF(K, Spelling) \ + case tok::kw___##Spelling: \ + return true; + + switch (Tok.getKind()) { + default: + return false; +#include "clang/Basic/TokenKinds.def" + } +} + /// ExpandBuiltinMacro - If an identifier token is read that is to be expanded /// as a builtin macro, handle it and return the next token as 'Tok'. void Preprocessor::ExpandBuiltinMacro(Token &Tok) { @@ -1798,25 +1826,11 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { getTargetInfo().getTargetOpts().FeatureMap); } return true; - } else if (II->getTokenID() != tok::identifier || - II->hasRevertedTokenIDToIdentifier()) { - // Treat all keywords that introduce a custom syntax of the form - // - // '__some_keyword' '(' [...] ')' - // - // as being "builtin functions", even if the syntax isn't a valid - // function call (for example, because the builtin takes a type - // argument). - if (II->getName().starts_with("__builtin_") || - II->getName().starts_with("__is_") || - II->getName().starts_with("__has_")) - return true; - return llvm::StringSwitch(II->getName()) - .Case("__array_rank", true) - .Case("__array_extent", true) -#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait) .Case("__" #Trait, true) -#include "clang/Basic/TransformTypeTraits.def" - .Default(false); + } else if (IsBuiltinTrait(Tok)) { + return true; + } else if (II->getTokenID() != tok::identifier && + II->getName().starts_with("__builtin_")) { + return true; } else { return llvm::StringSwitch(II->getName()) // Report builtin templates as being builtins. diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp index f56ca398cda8..687b1be94592 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp @@ -6922,8 +6922,7 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, } if (CXXMethodDecl *Method = dyn_cast_or_null(FDecl)) - if (!isa(CurContext) && - Method->isImplicitObjectMemberFunction()) + if (Method->isImplicitObjectMemberFunction()) return ExprError(Diag(LParenLoc, diag::err_member_call_without_object) << Fn->getSourceRange() << 0); diff --git a/contrib/llvm-project/clang/lib/Sema/TreeTransform.h b/contrib/llvm-project/clang/lib/Sema/TreeTransform.h index 51e6a4845bf6..0ae393524fe0 100644 --- a/contrib/llvm-project/clang/lib/Sema/TreeTransform.h +++ b/contrib/llvm-project/clang/lib/Sema/TreeTransform.h @@ -13608,7 +13608,7 @@ bool TreeTransform::TransformOverloadExprDecls(OverloadExpr *Old, } AllEmptyPacks &= Decls.empty(); - }; + } // C++ [temp.res]/8.4.2: // The program is ill-formed, no diagnostic required, if [...] lookup for diff --git a/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp b/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp index db80eb383885..73eea07cf869 100644 --- a/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp +++ b/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp @@ -239,6 +239,10 @@ size_t PageSize() { } void SetThreadName(std::thread &thread, const std::string &name) { +#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) || \ + defined(_GLIBCXX_GCC_GTHR_POSIX_H) + (void)pthread_setname_np(thread.native_handle(), name.c_str()); +#else typedef HRESULT(WINAPI * proc)(HANDLE, PCWSTR); HMODULE kbase = GetModuleHandleA("KernelBase.dll"); proc ThreadNameProc = @@ -253,6 +257,7 @@ void SetThreadName(std::thread &thread, const std::string &name) { } } } +#endif } } // namespace fuzzer diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 8301fec2b3d7..87b6d9d19e83 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -27,7 +27,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 190101 +# define _LIBCPP_VERSION 190102 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/libcxx/include/version b/contrib/llvm-project/libcxx/include/version index fe64343eafbc..76ab6bedafdd 100644 --- a/contrib/llvm-project/libcxx/include/version +++ b/contrib/llvm-project/libcxx/include/version @@ -182,8 +182,9 @@ __cpp_lib_philox_engine 202406L __cpp_lib_polymorphic_allocator 201902L __cpp_lib_print 202207L __cpp_lib_quoted_string_io 201304L -__cpp_lib_ranges 202207L +__cpp_lib_ranges 202211L + 202110L // C++20 __cpp_lib_ranges_as_const 202207L __cpp_lib_ranges_as_rvalue 202207L __cpp_lib_ranges_chunk 202202L @@ -428,7 +429,7 @@ __cpp_lib_void_t 201411L # if _LIBCPP_AVAILABILITY_HAS_PMR # define __cpp_lib_polymorphic_allocator 201902L # endif -# define __cpp_lib_ranges 202207L +# define __cpp_lib_ranges 202110L # define __cpp_lib_remove_cvref 201711L # if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC # define __cpp_lib_semaphore 201907L @@ -480,6 +481,8 @@ __cpp_lib_void_t 201411L # define __cpp_lib_optional 202110L # define __cpp_lib_out_ptr 202106L # define __cpp_lib_print 202207L +# undef __cpp_lib_ranges +# define __cpp_lib_ranges 202211L // # define __cpp_lib_ranges_as_const 202207L # define __cpp_lib_ranges_as_rvalue 202207L // # define __cpp_lib_ranges_chunk 202202L diff --git a/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp b/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp index abde3cd96491..56cf96fd1770 100644 --- a/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp +++ b/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp @@ -181,11 +181,13 @@ static const InstructionMask r6[] = { {0xd7000000, 0x006020e0}, {0xd8000000, 0x006020e0}, {0xdb000000, 0x006020e0}, {0xdf000000, 0x006020e0}}; +constexpr uint32_t instParsePacketEnd = 0x0000c000; + static bool isDuplex(uint32_t insn) { // Duplex forms have a fixed mask and parse bits 15:14 are always // zero. Non-duplex insns will always have at least one bit set in the // parse field. - return (0xC000 & insn) == 0; + return (instParsePacketEnd & insn) == 0; } static uint32_t findMaskR6(uint32_t insn) { @@ -216,6 +218,12 @@ static uint32_t findMaskR11(uint32_t insn) { } static uint32_t findMaskR16(uint32_t insn) { + if (isDuplex(insn)) + return 0x03f00000; + + // Clear the end-packet-parse bits: + insn = insn & ~instParsePacketEnd; + if ((0xff000000 & insn) == 0x48000000) return 0x061f20ff; if ((0xff000000 & insn) == 0x49000000) @@ -225,8 +233,14 @@ static uint32_t findMaskR16(uint32_t insn) { if ((0xff000000 & insn) == 0xb0000000) return 0x0fe03fe0; - if (isDuplex(insn)) - return 0x03f00000; + if ((0xff802000 & insn) == 0x74000000) + return 0x00001fe0; + if ((0xff802000 & insn) == 0x74002000) + return 0x00001fe0; + if ((0xff802000 & insn) == 0x74800000) + return 0x00001fe0; + if ((0xff802000 & insn) == 0x74802000) + return 0x00001fe0; for (InstructionMask i : r6) if ((0xff000000 & insn) == i.cmpMask) diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h index 3cbc35400181..95e8004cc09c 100644 --- a/contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h +++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h @@ -275,6 +275,9 @@ public: /// This is a wrapper around getRegForValue that also takes care of /// truncating or sign-extending the given getelementptr index value. + Register getRegForGEPIndex(MVT PtrVT, const Value *Idx); + + /// Retained for ABI compatibility in release branch. Register getRegForGEPIndex(const Value *Idx); /// We're checking to see if we can fold \p LI into \p FoldInst. Note diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index ef9f78335519..398381a8164b 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -380,14 +380,13 @@ void FastISel::updateValueMap(const Value *I, Register Reg, unsigned NumRegs) { } } -Register FastISel::getRegForGEPIndex(const Value *Idx) { +Register FastISel::getRegForGEPIndex(MVT PtrVT, const Value *Idx) { Register IdxN = getRegForValue(Idx); if (!IdxN) // Unhandled operand. Halt "fast" selection and bail. return Register(); // If the index is smaller or larger than intptr_t, truncate or extend it. - MVT PtrVT = TLI.getPointerTy(DL); EVT IdxVT = EVT::getEVT(Idx->getType(), /*HandleUnknown=*/false); if (IdxVT.bitsLT(PtrVT)) { IdxN = fastEmit_r(IdxVT.getSimpleVT(), PtrVT, ISD::SIGN_EXTEND, IdxN); @@ -398,6 +397,10 @@ Register FastISel::getRegForGEPIndex(const Value *Idx) { return IdxN; } +Register FastISel::getRegForGEPIndex(const Value *Idx) { + return getRegForGEPIndex(TLI.getPointerTy(DL), Idx); +} + void FastISel::recomputeInsertPt() { if (getLastLocalValue()) { FuncInfo.InsertPt = getLastLocalValue(); @@ -543,7 +546,8 @@ bool FastISel::selectGetElementPtr(const User *I) { uint64_t TotalOffs = 0; // FIXME: What's a good SWAG number for MaxOffs? uint64_t MaxOffs = 2048; - MVT VT = TLI.getPointerTy(DL); + MVT VT = TLI.getValueType(DL, I->getType()).getSimpleVT(); + for (gep_type_iterator GTI = gep_type_begin(I), E = gep_type_end(I); GTI != E; ++GTI) { const Value *Idx = GTI.getOperand(); @@ -584,7 +588,7 @@ bool FastISel::selectGetElementPtr(const User *I) { // N = N + Idx * ElementSize; uint64_t ElementSize = GTI.getSequentialElementStride(DL); - Register IdxN = getRegForGEPIndex(Idx); + Register IdxN = getRegForGEPIndex(VT, Idx); if (!IdxN) // Unhandled operand. Halt "fast" selection and bail. return false; diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86FastISel.cpp b/contrib/llvm-project/llvm/lib/Target/X86/X86FastISel.cpp index 2eae15595636..5d594bd54fbf 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86FastISel.cpp +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86FastISel.cpp @@ -902,6 +902,8 @@ redo_gep: uint64_t Disp = (int32_t)AM.Disp; unsigned IndexReg = AM.IndexReg; unsigned Scale = AM.Scale; + MVT PtrVT = TLI.getValueType(DL, U->getType()).getSimpleVT(); + gep_type_iterator GTI = gep_type_begin(U); // Iterate through the indices, folding what we can. Constants can be // folded, and one dynamic index can be handled, if the scale is supported. @@ -937,7 +939,7 @@ redo_gep: *** 273 LINES SKIPPED *** From nobody Sun Dec 1 11:18:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYv6m44z5fTWw; Sun, 01 Dec 2024 11:18:59 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYv5qkvz43H4; Sun, 1 Dec 2024 11:18:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aQAAP2/OMTzMtWz1jz0CjI5UvK58Pt71C/Jz14gJB1M=; b=ch/2YOEcKj0/zBIhPEmQTb3LvBoCs1GEayVP3DyxmRC0wIp4/E5MTppqx55wZNfOOPSZZX 3WOofIQzbywWibmRcAcwCd6uZZ9Gl1NB1yARqsY/xVeBROG8x2W0fblvt9Y45Hd+h0wkNn PcIJsapvXm6ONt+/aKvxvrfZdBAVtlcOkWlFzyefT+KOqSxwMWEL5Wb5G3jOeZguMQk+2h /rTLda74ImbS92Pl7+DG+32MuOyEvDNvvCnaUypLEih0h7ZBXpHm5FDPPNRaNwZTsBm6RH k5kGmwbLXL3pWVJEHHMDC7IvJu128swZ3Fi1Rft3GZ5+5OLXV98LfB5lVPSqjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aQAAP2/OMTzMtWz1jz0CjI5UvK58Pt71C/Jz14gJB1M=; b=CXWdpQ20woVMad1yHdqwGBVEAnws1gUZI0iu5P/HCF2FGjBV/7UdYxV2HyZYLLa2gJfUE2 aSPqz3mxaJ8ZaX+8m8XcFZsnAWq4igRPE88wBED6szLjEQUCYcMorKcr0+Jmq0/fXYeKMh /oLqTLnUz3UQYC+VpFp6d4KFXVTFc11t823ym7iNO9J6izoCLlBeDANSXjwzWzXRVXfiRB 7ML6qsZrGIYRMC3LwGmZ91G6aEBib+vNKzNMaZBe14oUyKhEp9LL3w9WLXnFwuXRSI4oAT kM6AErdqzX00trIRyUI+2aYyn4HT1MEJ0yA093SWg2W11jrt2+f7+NCCJhmmDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051939; a=rsa-sha256; cv=none; b=xDr9Zmkaa5rM10DyF2LeF2bOoas5lewJ06ilhzsbJqhxrz/ZR3EkG4hfCHR95GQJ1LBRzW n/ZLLnKHxcv9IODQqFwCdtHlcHhbRP/59JpFI17tYQ9e+4RJueDtm4GK8LBHQIEnWFBfun +j0HbZsJD5i9yHcOcixagKZ75cC+CDLMgr/tQx65BspoS62zWEAewdvKej00ukNIKPR6kp VPjDAz727DRIy5mjXGyhJzVEBwOWhPkmdMxWO7XH8QyTHmpHFCPuVA7MvnTlGPZWbNPwZ+ ANXDZTOdyg5mnfdH/1boAK7EpVFjZpv9l2wxQyiJhlAFTl0meizUAoCWJpjaKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYv5Czczqy4; Sun, 1 Dec 2024 11:18:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BIxfY008930; Sun, 1 Dec 2024 11:18:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIxTr008927; Sun, 1 Dec 2024 11:18:59 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:59 GMT Message-Id: <202412011118.4B1BIxTr008927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 24f861874c99 - stable/14 - Apply workaround for building llvm-project with WITHOUT_LLVM_ASSERTIONS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 24f861874c99ba7347ddd8170a6af174bd391756 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=24f861874c99ba7347ddd8170a6af174bd391756 commit 24f861874c99ba7347ddd8170a6af174bd391756 Author: Dimitry Andric AuthorDate: 2024-10-24 07:02:54 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:16 +0000 Apply workaround for building llvm-project with WITHOUT_LLVM_ASSERTIONS Some internal checking functions should only be declared when both NDEBUG and LLVM_ENABLE_ABI_BREAKING_CHECKS are undefined, otherwise you would get compile errors similar to: /usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:921:13: error: no member named 'VerifyDAGDivergence' in 'llvm::SelectionDAG' 921 | CurDAG->VerifyDAGDivergence(); | ~~~~~~ ^ Adjust the conditions for declaring and using these functions. This has also been reported upstream. Reported by: cy PR: 280562 MFC after: 1 month (cherry picked from commit a5b1eecbed07519c637095e3291b9cbd9748e823) --- .../llvm/include/llvm/CodeGen/SelectionDAG.h | 2 +- .../llvm/include/llvm/CodeGen/SelectionDAGISel.h | 2 +- .../llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 +- .../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h index 16ec65f2e7da..9c0220055f38 100644 --- a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h +++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h @@ -582,7 +582,7 @@ public: return Root; } -#ifndef NDEBUG +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS void VerifyDAGDivergence(); #endif diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h index aa0efa5d9bf5..0c23e80a0ac5 100644 --- a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h +++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h @@ -55,7 +55,7 @@ public: AssumptionCache *AC = nullptr; GCFunctionInfo *GFI = nullptr; SSPLayoutInfo *SP = nullptr; -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS TargetTransformInfo *TTI = nullptr; #endif CodeGenOptLevel OptLevel; diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 02d44cd36ae5..63213e276d22 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -11623,7 +11623,7 @@ void SelectionDAG::CreateTopologicalOrder(std::vector &Order) { } } -#ifndef NDEBUG +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS void SelectionDAG::VerifyDAGDivergence() { std::vector TopoOrder; CreateTopologicalOrder(TopoOrder); diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index b961d3bb1fec..74bd1fdb887c 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -916,7 +916,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -936,7 +936,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -958,7 +958,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -982,7 +982,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1000,7 +1000,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1016,7 +1016,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1036,7 +1036,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1056,7 +1056,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1076,7 +1076,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif From nobody Sun Dec 1 11:19:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYx1rPxz5fTQv; Sun, 01 Dec 2024 11:19:01 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYx0CMmz43HR; Sun, 1 Dec 2024 11:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZKYxvhTsTLOTXSkhjP+Mu9/EFYBJIj8/4LmUxP8SOyg=; b=bNG7nyhmpIIxAu4ors2wtak2kKnx6gWKUee1BLRDCRhwpSqPq/242yM3vLnxb8XIOOXYzi 5XsGygPS68sO/z0IwyXDegceY+OH48r94CJ2y0+XGzCEbWYbo2w88TCjPmoaT8prKrelrc VZXwRylUjmU9Rbsy688ncXms7fy+W5yWfsWOV4cu67o4WouXnL1zOYLlTw+QYiDl1B/XpU fhImEo7H3QD3gd0yJDs2YRNMqhfWDJnDyQFgqZdnwS3vhA0zS2Pww9psJGQPSNkxJXFOR1 SmoKtMYT+57SHDKbPSeFUhGyWHwAZ/kQyyFatsjEtvDf6nFsg/+79sY8qSDBwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZKYxvhTsTLOTXSkhjP+Mu9/EFYBJIj8/4LmUxP8SOyg=; b=DEc8dwH0xxJ/Gg/y+sCQwAg+FWuhyqmqImUIKJ6Bh9ANYXVAXJnvzxAIK1W8yMmJ+8tiog tkDAoQnaxIPIfaRGOoF6cdQ2R3R7TDirC0IhPvY9kn8CgKY96FvNRMoUMwu4QAiNqmZA5Y Yqdgr+e8Q3aQJW8ZrAWxF4uZDXqZ7NeqCSU9sUvuNRyYfBfw07nwq46tGfa1oRTcZ6U9Tz 4Bhh55P8+El0Qsv3LqMWtAyDwugZUZosGNQIpsnAv1V4JUagY4l83UegGN/RFDj5qD+WG+ uMjLrYsNSARPYA2A04M+eJ0IVnNarCqc9JJXFUuATxUkiSDRszVty/xOUhP41Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051941; a=rsa-sha256; cv=none; b=Pg/+peKrxMJWJCKHy2Ckv00SrcOL09x+X7dfs8ynMIWBPmrS2IgjVbcxs/NKT74b5oBRVl CNgUWKsiFCt4fAv8WINkQnrV9yZxKzlToKbXGqS0kVwsgLYW/kpTNx/plQp/fOTdj5D01z AUnns9ntlNKGh5/fVKr0tY1+G6Ez2FucHyhIm9TLyKTLFUaA5nMbRW136gBCbfr9Ni+q5U KvoAKmOEsrCTIQ4G1d5dszvs7ZaTptmDc3gJqHsQjtLkoBsvjLOcPoyiUIQRsmqkCGd1/K NMDr9eI5t3KEsW5804KDe3ojpzSvuhIju2CJGCnTCZeLF/1Ziw1tgBUgfkHCXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYw62Zzzqjs; Sun, 1 Dec 2024 11:19:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BJ06U008987; Sun, 1 Dec 2024 11:19:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BJ05t008984; Sun, 1 Dec 2024 11:19:00 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:19:00 GMT Message-Id: <202412011119.4B1BJ05t008984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 86de9cd1f1b5 - stable/14 - Adjust LLVM_ENABLE_ABI_BREAKING_CHECKS depending on NDEBUG List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 86de9cd1f1b5815d3ba8923ba83053541de1bcdd Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=86de9cd1f1b5815d3ba8923ba83053541de1bcdd commit 86de9cd1f1b5815d3ba8923ba83053541de1bcdd Author: Dimitry Andric AuthorDate: 2024-10-24 09:53:19 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:16 +0000 Adjust LLVM_ENABLE_ABI_BREAKING_CHECKS depending on NDEBUG When assertions are disabled, the upstream build system disables LLVM_ENABLE_ABI_BREAKING_CHECKS by default. Though the upstream build system allows it to be force-enabled, it looks like that is not a well-tested build-time configuration. Therefore, always disable LLVM_ENABLE_ABI_BREAKING_CHECKS when assertions are disabled, which will also save some more runtime cost when people use WITHOUT_LLVM_ASSERTIONS. PR: 280562 MFC after: 1 month (cherry picked from commit 1c83996beda7b6a382857c318f46daefcb6bd84c) --- lib/clang/include/llvm/Config/abi-breaking.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/clang/include/llvm/Config/abi-breaking.h b/lib/clang/include/llvm/Config/abi-breaking.h index eb90be1fe37b..55e67e2ebad7 100644 --- a/lib/clang/include/llvm/Config/abi-breaking.h +++ b/lib/clang/include/llvm/Config/abi-breaking.h @@ -13,7 +13,11 @@ #define LLVM_ABI_BREAKING_CHECKS_H /* Define to enable checks that alter the LLVM C++ ABI */ +#ifdef NDEBUG +#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0 +#else #define LLVM_ENABLE_ABI_BREAKING_CHECKS 1 +#endif /* Define to enable reverse iteration of unordered llvm containers */ #define LLVM_ENABLE_REVERSE_ITERATION 0 From nobody Sun Dec 1 11:19:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYy3NxWz5fTD2; Sun, 01 Dec 2024 11:19:02 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYy1rn0z43Hm; Sun, 1 Dec 2024 11:19:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uoGN4+JcIZj+u15KLQDmoB84GDjHh55X/HpW5R4YSc8=; b=x109UGdLsgNZh091mLDly53wa2+cb79iXkF4m6uWKni9CKhA9nsACvAGMnbDMdT28r1PoS Pa3GtPf1Wioky4kmnjh1wVgjmsAzgbB4+ns4K1wXWpNZxjKGFElTu3xgel9Y/fBuB69rvp Ep429hL32bGtk/j63QKNKJAJKwwvk8a8EejwTD+yQ+TyEznY/ufQGZ2dDE9X8V6usY2ag8 lFbuGam5rYHYd1273qCl+3JEGPdK22oEQXx5ht/PGl/i/HwxjQX6Wbz4dVBIFdcbtwnkkz oweIg4eISqP3KUhrjcNJRwT1bdmKTsMC0eNzX8jEzjGLyBZGNLJ5sga6+jv7Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uoGN4+JcIZj+u15KLQDmoB84GDjHh55X/HpW5R4YSc8=; b=w4780ETSvZDM2beL0r369ZnJP9NtBwfGBYnAd2Ts63os3nRUmIJD4drBLP/lZkBxJuw0hv oOLK4BpVGeO+bgqBdROqq1pRLMvSu/V9vHJ+0B0k8z4V3J6NaxsErx/WSE1iz/nyEGXNux j5VrGX/HYEdvDrRKMaMCguT/mlh/kCgzoceKSCfwVVKVBa71KbOucBBMhNcsMPDbH+C3T6 YUJll9lK45iYI6G4Y4Mh7LsqFTCr87k0SnZx9nh3owCWwwOr2CiIgTBl24oBDT8B+uuIIo BtqHv0t60vtpXJp3gZjD0exw7wl8vHaAvYci7rKtbg7M60QApk74tnl5m1+0rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051942; a=rsa-sha256; cv=none; b=Wr9O3K5W/kDbIn/9nW9PJcHv6KWQsw2Ca4Mx05sqFTCKTwMbcr9PapOPSQbpJVsy3NS/gY Avo/7fO3EpzK2NbG/OrUCZ84O236Tf3mhw42zHrPMOisU6XJ+yxDuqlBxnZgpiy+YojBjv IzRT96+cwdO+HtSPj6shjKomh43eUM67eF8SNuTFWUXVqCyW8JB5P6SimZFWgktmf3a4/8 bbSvP2E8R7MxS0FlpbsHjhBqUXqv9JgK2PPVg6nQoRFYnR+kWWVQhy+lw5O3Li70MapoHF iAQwKgd+AgGrIJ17f07fcuuReUESihiiMpgF37uHm1pTn4hdIFDZbnlT6ixEcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYx73qwzqGY; Sun, 1 Dec 2024 11:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BJ18d009041; Sun, 1 Dec 2024 11:19:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BJ1Wq009038; Sun, 1 Dec 2024 11:19:01 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:19:01 GMT Message-Id: <202412011119.4B1BJ1Wq009038@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4ec4206356c0 - stable/14 - Fix buildworld with gcc 12 after llvm-19 import List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4ec4206356c060c4dfab6ef13c248f00023b94ba Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4ec4206356c060c4dfab6ef13c248f00023b94ba commit 4ec4206356c060c4dfab6ef13c248f00023b94ba Author: Dimitry Andric AuthorDate: 2024-10-25 16:07:59 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:16 +0000 Fix buildworld with gcc 12 after llvm-19 import Unfortunately gcc 12's is not yet capable of compiling all of libc++ 19's C++23 code, which results in errors similar to: /usr/src/freebsd/src/contrib/llvm-project/libcxx/include/__algorithm/ranges_contains.h:41:3: error: 'static constexpr bool std::__1::ranges::__contains::__fn::operator()(_Iter, _Sent, const _Type&, _Proj)' must be a non-static member function 41 | operator()(_Iter __first, _Sent __last, const _Type& __value, _Proj __proj = {}) { | ^~~~~~~~ /usr/src/freebsd/src/contrib/llvm-project/libcxx/include/__algorithm/ranges_contains.h:48:3: error: 'static constexpr bool std::__1::ranges::__contains::__fn::operator()(_Range&&, const _Type&, _Proj)' must be a non-static member function 48 | operator()(_Range&& __range, const _Type& __value, _Proj __proj = {}) { | ^~~~~~~~ Until we can get rid of gcc 12, work around this by making it compile libc++ in C++20 mode instead. NOTE: The resulting libc++ library will not be C++23 compatible! Please try to avoid shipping it, and use gcc 13 instead, if you must use gcc. PR: 280562 MFC after: 3 days (cherry picked from commit bc9e19dce0abee80750e6fa04aaf979873bfe0d2) --- contrib/llvm-project/libcxx/src/expected.cpp | 2 ++ lib/libc++/Makefile | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/contrib/llvm-project/libcxx/src/expected.cpp b/contrib/llvm-project/libcxx/src/expected.cpp index f30efb516479..ed3bf9e37e35 100644 --- a/contrib/llvm-project/libcxx/src/expected.cpp +++ b/contrib/llvm-project/libcxx/src/expected.cpp @@ -9,5 +9,7 @@ #include _LIBCPP_BEGIN_NAMESPACE_STD +#if _LIBCPP_STD_VER >= 23 const char* bad_expected_access::what() const noexcept { return "bad access to std::expected"; } +#endif _LIBCPP_END_NAMESPACE_STD diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index c01b5eccde4b..95b1bc298c98 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -105,7 +105,15 @@ CFLAGS+= -ffunction-sections CFLAGS+= -fno-semantic-interposition CFLAGS+= -fvisibility-inlines-hidden CFLAGS+= -fvisibility=hidden + +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 130000 +# NOTE: gcc 12 cannot correctly compile all libc++'s C++23 code. To temporarily +# support gcc 12, compile libc++ in C++20 mode, but this will leave out any +# C++23 features. +CXXSTD?= c++20 +.else CXXSTD?= c++23 +.endif LIBADD+= cxxrt From nobody Sun Dec 1 11:19:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PYz3S2Vz5fTWB; Sun, 01 Dec 2024 11:19:03 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYz1fD2z43Ms; Sun, 1 Dec 2024 11:19:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c98mYda9UsoWTMKmPcl5rRGbKcY+ZlOQfzkiV9NWc+s=; b=mE9ufqLm2Knt0VbXvBJLX248iuFUImznD7oMIEbNMLLzbfL6suZ1FgqzDTOu2VLc3g2YJ4 hRzljFuTrUiK3exO5ErwvCca70imxpEfgpOcKHo9UYfwvp87sUV9Pc2tttbYir4/2+dYht /l1MtAjEVrRse0XjxhdduutFRFXwMSnfF6usF4POGIQ/a17hOE9OA0212FLMO/CxLoUocV WaQs0mWYXWK1bHZJjZ6Kn8MbwTebS2722wcBlgF0Dd/W2vu19jgA35Q88WmWCekg/uE9qp LixY9M4Kx31CvyuYbcUdZ5s25R91WXMlrlrGsPcK2E6aDPj3FF2V6O8FBdjNNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c98mYda9UsoWTMKmPcl5rRGbKcY+ZlOQfzkiV9NWc+s=; b=TB6gy+0TGIep9ENIOltd4hsnJsDsH4Q3PKUtyvkQbvoDUvjelWR/1uUHkdhRu9VZD4hyRN ZJvaYz0wg+X+HuMyiZxdHO+cX+uPhllxbvCa+rq4LAXxMQ4kLysZgKwGujcZDHOH+uyWgI eHk97BRZF1n2eQt8tz6oOCQTaSmQPMYh9oxVZJR8hI6E5RAEYNMyeC3/m1IbZ/BZOJZX2h I92gmp5ynr1BhQO7zBA3gHwWEQ0ktxcYL16pfXl+BzK/hzP20DX4DdMANtmcnDu5T1aUeg 4aJvWFRfKG/loMluwOfCe8iNgCHfN3KVpxoxEqoBq6Tj05I1bchGhNZp4m9INg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051943; a=rsa-sha256; cv=none; b=mHKelk+wx97vC7HMr6ZN/kCo0LiuvgpDwtrwlJaf/lqkO/oJFJqqxK1nSRg5xkaP9nCqVH HXZIAkJPmxarDS7GD5txkXWPe3h4LPFRsn72nvCeiPvug1z5JhCmdQqJs0CXtQuyg3kNry UipowkyWmR6pM9F+ARqAibT7EyLANCGyKfOfQ51quy/7MAuEn33bj3bBvUFoHf87rvZqWM vJIIg2eNdzxl+L68T5iEq6eS6YhDHAb37f6CZpYWq4C/l9JwtmnIxUzQlXJurtE2Wyc625 n7QnDNufie1uiIVLG4idjf8yZqn52jR8asophuOc7IyGUFSGaOvFP/fLy1GP5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PYz1DQrzr9g; Sun, 1 Dec 2024 11:19:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BJ3GQ009089; Sun, 1 Dec 2024 11:19:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BJ3K7009086; Sun, 1 Dec 2024 11:19:03 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:19:03 GMT Message-Id: <202412011119.4B1BJ3K7009086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2105db3863ae - stable/14 - Merge llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2105db3863aeda2fb21155a561175e0ea8124683 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2105db3863aeda2fb21155a561175e0ea8124683 commit 2105db3863aeda2fb21155a561175e0ea8124683 Author: Dimitry Andric AuthorDate: 2024-11-08 11:32:34 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:17 +0000 Merge llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5, a.k.a. 19.1.3 release. PR: 280562 MFC after: 1 month (cherry picked from commit d686ce931cab72612a9e1ada9fe99d65e11a32a3) --- .../clang/include/clang/AST/ExternalASTSource.h | 48 ++++++++++++++++------ .../llvm-project/clang/lib/Basic/Targets/ARM.cpp | 2 + .../clang/lib/Basic/Targets/OSTargets.h | 4 ++ .../llvm-project/clang/lib/CodeGen/CGBuiltin.cpp | 45 +++++++++----------- .../clang/lib/CodeGen/CodeGenModule.cpp | 10 +++-- .../llvm-project/clang/lib/CodeGen/Targets/ARM.cpp | 3 ++ contrib/llvm-project/clang/lib/Driver/Driver.cpp | 5 ++- .../clang/lib/Driver/ToolChains/Arch/ARM.cpp | 7 ++++ .../clang/lib/Driver/ToolChains/Gnu.cpp | 2 + .../clang/lib/Driver/ToolChains/Linux.cpp | 1 + .../clang/lib/Format/UnwrappedLineParser.cpp | 5 +++ contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp | 11 +++-- .../clang/lib/Sema/SemaTemplateDeductionGuide.cpp | 21 ++++++++-- .../clang/lib/Serialization/ASTReaderDecl.cpp | 3 +- .../clang/lib/Serialization/ASTWriterDecl.cpp | 5 ++- .../sanitizer_procmaps_solaris.cpp | 4 ++ contrib/llvm-project/libcxx/include/__config | 2 +- .../llvm/include/llvm/TargetParser/Triple.h | 35 +++++++++++++--- .../llvm/lib/Analysis/ConstantFolding.cpp | 4 +- .../llvm/lib/Target/ARM/ARMSubtarget.h | 4 +- .../llvm/lib/Target/ARM/ARMTargetMachine.cpp | 2 + .../llvm/lib/Target/ARM/ARMTargetMachine.h | 1 + .../lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp | 6 +-- .../WebAssembly/WebAssemblyTargetMachine.cpp | 12 ++---- .../llvm/lib/TargetParser/ARMTargetParser.cpp | 3 ++ .../llvm-project/llvm/lib/TargetParser/Triple.cpp | 6 +++ .../llvm/lib/Transforms/Utils/InlineFunction.cpp | 2 +- .../llvm/lib/Transforms/Utils/ModuleUtils.cpp | 12 +++--- lib/clang/include/VCSVersion.inc | 6 +-- lib/clang/include/clang/Basic/Version.inc | 6 +-- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +-- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/libc++/__assertion_handler | 3 +- lib/libomp/kmp_config.h | 2 +- 37 files changed, 203 insertions(+), 97 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/AST/ExternalASTSource.h b/contrib/llvm-project/clang/include/clang/AST/ExternalASTSource.h index 385c32edbae0..582ed7c65f58 100644 --- a/contrib/llvm-project/clang/include/clang/AST/ExternalASTSource.h +++ b/contrib/llvm-project/clang/include/clang/AST/ExternalASTSource.h @@ -25,10 +25,12 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/iterator.h" #include "llvm/Support/PointerLikeTypeTraits.h" +#include #include #include #include #include +#include #include #include @@ -326,29 +328,49 @@ struct LazyOffsetPtr { /// /// If the low bit is clear, a pointer to the AST node. If the low /// bit is set, the upper 63 bits are the offset. - mutable uint64_t Ptr = 0; + static constexpr size_t DataSize = std::max(sizeof(uint64_t), sizeof(T *)); + alignas(uint64_t) alignas(T *) mutable unsigned char Data[DataSize] = {}; + + unsigned char GetLSB() const { + return Data[llvm::sys::IsBigEndianHost ? DataSize - 1 : 0]; + } + + template U &As(bool New) const { + unsigned char *Obj = + Data + (llvm::sys::IsBigEndianHost ? DataSize - sizeof(U) : 0); + if (New) + return *new (Obj) U; + return *std::launder(reinterpret_cast(Obj)); + } + + T *&GetPtr() const { return As(false); } + uint64_t &GetU64() const { return As(false); } + void SetPtr(T *Ptr) const { As(true) = Ptr; } + void SetU64(uint64_t U64) const { As(true) = U64; } public: LazyOffsetPtr() = default; - explicit LazyOffsetPtr(T *Ptr) : Ptr(reinterpret_cast(Ptr)) {} + explicit LazyOffsetPtr(T *Ptr) : Data() { SetPtr(Ptr); } - explicit LazyOffsetPtr(uint64_t Offset) : Ptr((Offset << 1) | 0x01) { + explicit LazyOffsetPtr(uint64_t Offset) : Data() { assert((Offset << 1 >> 1) == Offset && "Offsets must require < 63 bits"); if (Offset == 0) - Ptr = 0; + SetPtr(nullptr); + else + SetU64((Offset << 1) | 0x01); } LazyOffsetPtr &operator=(T *Ptr) { - this->Ptr = reinterpret_cast(Ptr); + SetPtr(Ptr); return *this; } LazyOffsetPtr &operator=(uint64_t Offset) { assert((Offset << 1 >> 1) == Offset && "Offsets must require < 63 bits"); if (Offset == 0) - Ptr = 0; + SetPtr(nullptr); else - Ptr = (Offset << 1) | 0x01; + SetU64((Offset << 1) | 0x01); return *this; } @@ -356,15 +378,15 @@ public: /// Whether this pointer is non-NULL. /// /// This operation does not require the AST node to be deserialized. - explicit operator bool() const { return Ptr != 0; } + explicit operator bool() const { return isOffset() || GetPtr() != nullptr; } /// Whether this pointer is non-NULL. /// /// This operation does not require the AST node to be deserialized. - bool isValid() const { return Ptr != 0; } + bool isValid() const { return isOffset() || GetPtr() != nullptr; } /// Whether this pointer is currently stored as an offset. - bool isOffset() const { return Ptr & 0x01; } + bool isOffset() const { return GetLSB() & 0x01; } /// Retrieve the pointer to the AST node that this lazy pointer points to. /// @@ -375,9 +397,9 @@ public: if (isOffset()) { assert(Source && "Cannot deserialize a lazy pointer without an AST source"); - Ptr = reinterpret_cast((Source->*Get)(OffsT(Ptr >> 1))); + SetPtr((Source->*Get)(OffsT(GetU64() >> 1))); } - return reinterpret_cast(Ptr); + return GetPtr(); } /// Retrieve the address of the AST node pointer. Deserializes the pointee if @@ -385,7 +407,7 @@ public: T **getAddressOfPointer(ExternalASTSource *Source) const { // Ensure the integer is in pointer form. (void)get(Source); - return reinterpret_cast(&Ptr); + return &GetPtr(); } }; diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp index 7423626d7c3c..e55feedbd5c6 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp @@ -311,7 +311,9 @@ ARMTargetInfo::ARMTargetInfo(const llvm::Triple &Triple, switch (Triple.getEnvironment()) { case llvm::Triple::Android: case llvm::Triple::GNUEABI: + case llvm::Triple::GNUEABIT64: case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABIHFT64: case llvm::Triple::MuslEABI: case llvm::Triple::MuslEABIHF: case llvm::Triple::OpenHOS: diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h b/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h index 5f27c3469f86..357c1965057c 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h @@ -337,6 +337,10 @@ protected: Builder.defineMacro("_GNU_SOURCE"); if (this->HasFloat128) Builder.defineMacro("__FLOAT128__"); + if (Triple.isTime64ABI()) { + Builder.defineMacro("_FILE_OFFSET_BITS", "64"); + Builder.defineMacro("_TIME_BITS", "64"); + } } public: diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp index 5639239359ab..86d47054615e 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp @@ -1001,6 +1001,24 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, // Can't find the field referenced by the "counted_by" attribute. return nullptr; + if (isa(Base)) + // The whole struct is specificed in the __bdos. The calculation of the + // whole size of the structure can be done in two ways: + // + // 1) sizeof(struct S) + count * sizeof(typeof(fam)) + // 2) offsetof(struct S, fam) + count * sizeof(typeof(fam)) + // + // The first will add additional padding after the end of the array, + // allocation while the second method is more precise, but not quite + // expected from programmers. See + // https://lore.kernel.org/lkml/ZvV6X5FPBBW7CO1f@archlinux/ for a + // discussion of the topic. + // + // GCC isn't (currently) able to calculate __bdos on a pointer to the whole + // structure. Therefore, because of the above issue, we'll choose to match + // what GCC does for consistency's sake. + return nullptr; + // Build a load of the counted_by field. bool IsSigned = CountedByFD->getType()->isSignedIntegerType(); Value *CountedByInst = EmitCountedByFieldExpr(Base, FAMDecl, CountedByFD); @@ -1031,32 +1049,9 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, CharUnits Size = Ctx.getTypeSizeInChars(ArrayTy->getElementType()); llvm::Constant *ElemSize = llvm::ConstantInt::get(ResType, Size.getQuantity(), IsSigned); - Value *FAMSize = + Value *Res = Builder.CreateMul(CountedByInst, ElemSize, "", !IsSigned, IsSigned); - FAMSize = Builder.CreateIntCast(FAMSize, ResType, IsSigned); - Value *Res = FAMSize; - - if (isa(Base)) { - // The whole struct is specificed in the __bdos. - const ASTRecordLayout &Layout = Ctx.getASTRecordLayout(OuterRD); - - // Get the offset of the FAM. - llvm::Constant *FAMOffset = ConstantInt::get(ResType, Offset, IsSigned); - Value *OffsetAndFAMSize = - Builder.CreateAdd(FAMOffset, Res, "", !IsSigned, IsSigned); - - // Get the full size of the struct. - llvm::Constant *SizeofStruct = - ConstantInt::get(ResType, Layout.getSize().getQuantity(), IsSigned); - - // max(sizeof(struct s), - // offsetof(struct s, array) + p->count * sizeof(*p->array)) - Res = IsSigned - ? Builder.CreateBinaryIntrinsic(llvm::Intrinsic::smax, - OffsetAndFAMSize, SizeofStruct) - : Builder.CreateBinaryIntrinsic(llvm::Intrinsic::umax, - OffsetAndFAMSize, SizeofStruct); - } + Res = Builder.CreateIntCast(Res, ResType, IsSigned); // A negative \p IdxInst or \p CountedByInst means that the index lands // outside of the flexible array member. If that's the case, we want to diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp index cf5e29e5a3db..151505baf38d 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp @@ -177,10 +177,7 @@ createTargetCodeGenInfo(CodeGenModule &CGM) { else if (ABIStr == "aapcs16") Kind = ARMABIKind::AAPCS16_VFP; else if (CodeGenOpts.FloatABI == "hard" || - (CodeGenOpts.FloatABI != "soft" && - (Triple.getEnvironment() == llvm::Triple::GNUEABIHF || - Triple.getEnvironment() == llvm::Triple::MuslEABIHF || - Triple.getEnvironment() == llvm::Triple::EABIHF))) + (CodeGenOpts.FloatABI != "soft" && Triple.isHardFloatABI())) Kind = ARMABIKind::AAPCS_VFP; return createARMTargetCodeGenInfo(CGM, Kind); @@ -1137,6 +1134,11 @@ void CodeGenModule::Release() { CodeGenOpts.SanitizeCfiCanonicalJumpTables); } + if (CodeGenOpts.SanitizeCfiICallNormalizeIntegers) { + getModule().addModuleFlag(llvm::Module::Override, "cfi-normalize-integers", + 1); + } + if (LangOpts.Sanitize.has(SanitizerKind::KCFI)) { getModule().addModuleFlag(llvm::Module::Override, "kcfi", 1); // KCFI assumes patchable-function-prefix is the same for all indirectly diff --git a/contrib/llvm-project/clang/lib/CodeGen/Targets/ARM.cpp b/contrib/llvm-project/clang/lib/CodeGen/Targets/ARM.cpp index d032b88d7683..457d761039a0 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/Targets/ARM.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/Targets/ARM.cpp @@ -35,7 +35,9 @@ public: case llvm::Triple::EABI: case llvm::Triple::EABIHF: case llvm::Triple::GNUEABI: + case llvm::Triple::GNUEABIT64: case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABIHFT64: case llvm::Triple::MuslEABI: case llvm::Triple::MuslEABIHF: return true; @@ -48,6 +50,7 @@ public: switch (getTarget().getTriple().getEnvironment()) { case llvm::Triple::EABIHF: case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABIHFT64: case llvm::Triple::MuslEABIHF: return true; default: diff --git a/contrib/llvm-project/clang/lib/Driver/Driver.cpp b/contrib/llvm-project/clang/lib/Driver/Driver.cpp index 8e44d5afa40e..ecae475f75da 100644 --- a/contrib/llvm-project/clang/lib/Driver/Driver.cpp +++ b/contrib/llvm-project/clang/lib/Driver/Driver.cpp @@ -602,7 +602,8 @@ static llvm::Triple computeTargetTriple(const Driver &D, if (A->getOption().matches(options::OPT_m64) || A->getOption().matches(options::OPT_maix64)) { AT = Target.get64BitArchVariant().getArch(); - if (Target.getEnvironment() == llvm::Triple::GNUX32) + if (Target.getEnvironment() == llvm::Triple::GNUX32 || + Target.getEnvironment() == llvm::Triple::GNUT64) Target.setEnvironment(llvm::Triple::GNU); else if (Target.getEnvironment() == llvm::Triple::MuslX32) Target.setEnvironment(llvm::Triple::Musl); @@ -665,11 +666,13 @@ static llvm::Triple computeTargetTriple(const Driver &D, } else if (ABIName == "n32") { Target = Target.get64BitArchVariant(); if (Target.getEnvironment() == llvm::Triple::GNU || + Target.getEnvironment() == llvm::Triple::GNUT64 || Target.getEnvironment() == llvm::Triple::GNUABI64) Target.setEnvironment(llvm::Triple::GNUABIN32); } else if (ABIName == "64") { Target = Target.get64BitArchVariant(); if (Target.getEnvironment() == llvm::Triple::GNU || + Target.getEnvironment() == llvm::Triple::GNUT64 || Target.getEnvironment() == llvm::Triple::GNUABIN32) Target.setEnvironment(llvm::Triple::GNUABI64); } diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/ARM.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/ARM.cpp index a6041b809b80..0489911ecd9d 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/ARM.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/ARM.cpp @@ -327,6 +327,11 @@ void arm::setFloatABIInTriple(const Driver &D, const ArgList &Args, Triple.setEnvironment(isHardFloat ? llvm::Triple::GNUEABIHF : llvm::Triple::GNUEABI); break; + case llvm::Triple::GNUEABIT64: + case llvm::Triple::GNUEABIHFT64: + Triple.setEnvironment(isHardFloat ? llvm::Triple::GNUEABIHFT64 + : llvm::Triple::GNUEABIT64); + break; case llvm::Triple::EABI: case llvm::Triple::EABIHF: Triple.setEnvironment(isHardFloat ? llvm::Triple::EABIHF @@ -414,10 +419,12 @@ arm::FloatABI arm::getDefaultFloatABI(const llvm::Triple &Triple) { return FloatABI::Soft; switch (Triple.getEnvironment()) { case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABIHFT64: case llvm::Triple::MuslEABIHF: case llvm::Triple::EABIHF: return FloatABI::Hard; case llvm::Triple::GNUEABI: + case llvm::Triple::GNUEABIT64: case llvm::Triple::MuslEABI: case llvm::Triple::EABI: // EABI is always AAPCS, and if it was not marked 'hard', it's softfp diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp index 543f3965dfd4..5e9a655eaf82 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2694,6 +2694,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( case llvm::Triple::thumb: LibDirs.append(begin(ARMLibDirs), end(ARMLibDirs)); if (TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHF || + TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHFT64 || TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF || TargetTriple.getEnvironment() == llvm::Triple::EABIHF) { TripleAliases.append(begin(ARMHFTriples), end(ARMHFTriples)); @@ -2705,6 +2706,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( case llvm::Triple::thumbeb: LibDirs.append(begin(ARMebLibDirs), end(ARMebLibDirs)); if (TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHF || + TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHFT64 || TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF || TargetTriple.getEnvironment() == llvm::Triple::EABIHF) { TripleAliases.append(begin(ARMebHFTriples), end(ARMebHFTriples)); diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp index 2265138edbff..35bf39069605 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp @@ -508,6 +508,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { case llvm::Triple::thumbeb: { const bool HF = Triple.getEnvironment() == llvm::Triple::GNUEABIHF || + Triple.getEnvironment() == llvm::Triple::GNUEABIHFT64 || tools::arm::getARMFloatABI(*this, Args) == tools::arm::FloatABI::Hard; LibDir = "lib"; diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp index 631c7c62baac..a5268e153bcc 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp @@ -2500,6 +2500,11 @@ bool UnwrappedLineParser::parseBracedList(bool IsAngleBracket, bool IsEnum) { // Assume there are no blocks inside a braced init list apart // from the ones we explicitly parse out (like lambdas). FormatTok->setBlockKind(BK_BracedInit); + if (!IsAngleBracket) { + auto *Prev = FormatTok->Previous; + if (Prev && Prev->is(tok::greater)) + Prev->setFinalizedType(TT_TemplateCloser); + } nextToken(); parseBracedList(); break; diff --git a/contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp b/contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp index 22d38adc28eb..3ac1f0fa27f8 100644 --- a/contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp +++ b/contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp @@ -1508,10 +1508,13 @@ StmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) { SourceLocation ConstevalLoc; if (Tok.is(tok::kw_constexpr)) { - Diag(Tok, getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_constexpr_if - : diag::ext_constexpr_if); - IsConstexpr = true; - ConsumeToken(); + // C23 supports constexpr keyword, but only for object definitions. + if (getLangOpts().CPlusPlus) { + Diag(Tok, getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_constexpr_if + : diag::ext_constexpr_if); + IsConstexpr = true; + ConsumeToken(); + } } else { if (Tok.is(tok::exclaim)) { NotLocation = ConsumeToken(); diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateDeductionGuide.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateDeductionGuide.cpp index 0602d07c6b9b..1bf82b31def9 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateDeductionGuide.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateDeductionGuide.cpp @@ -69,8 +69,8 @@ public: ExtractTypeForDeductionGuide( Sema &SemaRef, llvm::SmallVectorImpl &MaterializedTypedefs, - ClassTemplateDecl *NestedPattern, - const MultiLevelTemplateArgumentList *OuterInstantiationArgs) + ClassTemplateDecl *NestedPattern = nullptr, + const MultiLevelTemplateArgumentList *OuterInstantiationArgs = nullptr) : Base(SemaRef), MaterializedTypedefs(MaterializedTypedefs), NestedPattern(NestedPattern), OuterInstantiationArgs(OuterInstantiationArgs) { @@ -1263,10 +1263,25 @@ FunctionTemplateDecl *DeclareAggregateDeductionGuideForTypeAlias( getRHSTemplateDeclAndArgs(SemaRef, AliasTemplate).first; if (!RHSTemplate) return nullptr; + + llvm::SmallVector TypedefDecls; + llvm::SmallVector NewParamTypes; + ExtractTypeForDeductionGuide TypeAliasTransformer(SemaRef, TypedefDecls); + for (QualType P : ParamTypes) { + QualType Type = TypeAliasTransformer.TransformType(P); + if (Type.isNull()) + return nullptr; + NewParamTypes.push_back(Type); + } + auto *RHSDeductionGuide = SemaRef.DeclareAggregateDeductionGuideFromInitList( - RHSTemplate, ParamTypes, Loc); + RHSTemplate, NewParamTypes, Loc); if (!RHSDeductionGuide) return nullptr; + + for (TypedefNameDecl *TD : TypedefDecls) + TD->setDeclContext(RHSDeductionGuide->getTemplatedDecl()); + return BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, RHSDeductionGuide, Loc); } diff --git a/contrib/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp b/contrib/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp index c118f3818467..154acdfbe032 100644 --- a/contrib/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/contrib/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp @@ -2665,7 +2665,8 @@ void ASTDeclReader::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { D->setDeclaredWithTypename(Record.readInt()); - if (D->hasTypeConstraint()) { + const bool TypeConstraintInitialized = Record.readBool(); + if (TypeConstraintInitialized && D->hasTypeConstraint()) { ConceptReference *CR = nullptr; if (Record.readBool()) CR = Record.readConceptReference(); diff --git a/contrib/llvm-project/clang/lib/Serialization/ASTWriterDecl.cpp b/contrib/llvm-project/clang/lib/Serialization/ASTWriterDecl.cpp index 8a4ca54349e3..ff1334340874 100644 --- a/contrib/llvm-project/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/contrib/llvm-project/clang/lib/Serialization/ASTWriterDecl.cpp @@ -1880,7 +1880,7 @@ void ASTDeclWriter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { Record.push_back(D->wasDeclaredWithTypename()); const TypeConstraint *TC = D->getTypeConstraint(); - assert((bool)TC == D->hasTypeConstraint()); + Record.push_back(/*TypeConstraintInitialized=*/TC != nullptr); if (TC) { auto *CR = TC->getConceptReference(); Record.push_back(CR != nullptr); @@ -1898,7 +1898,7 @@ void ASTDeclWriter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { if (OwnsDefaultArg) Record.AddTemplateArgumentLoc(D->getDefaultArgument()); - if (!TC && !OwnsDefaultArg && + if (!D->hasTypeConstraint() && !OwnsDefaultArg && D->getDeclContext() == D->getLexicalDeclContext() && !D->isInvalidDecl() && !D->hasAttrs() && !D->isTopLevelDeclInObjCContainer() && !D->isImplicit() && @@ -2561,6 +2561,7 @@ void ASTWriter::WriteDeclAbbrevs() { // TemplateTypeParmDecl Abv->Add( BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // wasDeclaredWithTypename + Abv->Add(BitCodeAbbrevOp(0)); // TypeConstraintInitialized Abv->Add(BitCodeAbbrevOp(0)); // OwnsDefaultArg DeclTemplateTypeParmAbbrev = Stream.EmitAbbrev(std::move(Abv)); diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp index eeb49e2afe34..80b8158f43db 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp @@ -11,6 +11,10 @@ // Before Solaris 11.4, doesn't work in a largefile environment. #undef _FILE_OFFSET_BITS + +// Avoid conflict between `_TIME_BITS` defined vs. `_FILE_OFFSET_BITS` +// undefined in some Linux configurations. +#undef _TIME_BITS #include "sanitizer_platform.h" #if SANITIZER_SOLARIS # include diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 87b6d9d19e83..7d735e5b6601 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -27,7 +27,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 190102 +# define _LIBCPP_VERSION 190103 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h b/contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h index ebd92f264d90..d2126a03db90 100644 --- a/contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h +++ b/contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h @@ -294,7 +294,11 @@ public: PAuthTest, - LastEnvironmentType = PAuthTest + GNUT64, + GNUEABIT64, + GNUEABIHFT64, + + LastEnvironmentType = GNUEABIHFT64 }; enum ObjectFormatType { UnknownObjectFormat, @@ -605,11 +609,12 @@ public: bool isGNUEnvironment() const { EnvironmentType Env = getEnvironment(); - return Env == Triple::GNU || Env == Triple::GNUABIN32 || - Env == Triple::GNUABI64 || Env == Triple::GNUEABI || - Env == Triple::GNUEABIHF || Env == Triple::GNUF32 || - Env == Triple::GNUF64 || Env == Triple::GNUSF || - Env == Triple::GNUX32; + return Env == Triple::GNU || Env == Triple::GNUT64 || + Env == Triple::GNUABIN32 || Env == Triple::GNUABI64 || + Env == Triple::GNUEABI || Env == Triple::GNUEABIT64 || + Env == Triple::GNUEABIHF || Env == Triple::GNUEABIHFT64 || + Env == Triple::GNUF32 || Env == Triple::GNUF64 || + Env == Triple::GNUSF || Env == Triple::GNUX32; } /// Tests whether the OS is Haiku. @@ -866,9 +871,11 @@ public: return (isARM() || isThumb()) && (getEnvironment() == Triple::EABI || getEnvironment() == Triple::GNUEABI || + getEnvironment() == Triple::GNUEABIT64 || getEnvironment() == Triple::MuslEABI || getEnvironment() == Triple::EABIHF || getEnvironment() == Triple::GNUEABIHF || + getEnvironment() == Triple::GNUEABIHFT64 || getEnvironment() == Triple::OpenHOS || getEnvironment() == Triple::MuslEABIHF || isAndroid()) && isOSBinFormatELF(); @@ -1046,6 +1053,22 @@ public: return getArch() == Triple::bpfel || getArch() == Triple::bpfeb; } + /// Tests if the target forces 64-bit time_t on a 32-bit architecture. + bool isTime64ABI() const { + EnvironmentType Env = getEnvironment(); + return Env == Triple::GNUT64 || Env == Triple::GNUEABIT64 || + Env == Triple::GNUEABIHFT64; + } + + /// Tests if the target forces hardfloat. + bool isHardFloatABI() const { + EnvironmentType Env = getEnvironment(); + return Env == llvm::Triple::GNUEABIHF || + Env == llvm::Triple::GNUEABIHFT64 || + Env == llvm::Triple::MuslEABIHF || + Env == llvm::Triple::EABIHF; + } + /// Tests whether the target supports comdat bool supportsCOMDAT() const { return !(isOSBinFormatMachO() || isOSBinFormatXCOFF() || diff --git a/contrib/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp b/contrib/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp index df75745645e0..ff30fece5fce 100644 --- a/contrib/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp +++ b/contrib/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp @@ -1784,8 +1784,8 @@ Constant *ConstantFoldFP(double (*NativeFP)(double), const APFloat &V, } #if defined(HAS_IEE754_FLOAT128) && defined(HAS_LOGF128) -Constant *ConstantFoldFP128(long double (*NativeFP)(long double), - const APFloat &V, Type *Ty) { +Constant *ConstantFoldFP128(float128 (*NativeFP)(float128), const APFloat &V, + Type *Ty) { llvm_fenv_clearexcept(); float128 Result = NativeFP(V.convertToQuad()); if (llvm_fenv_testexcept()) { diff --git a/contrib/llvm-project/llvm/lib/Target/ARM/ARMSubtarget.h b/contrib/llvm-project/llvm/lib/Target/ARM/ARMSubtarget.h index 00239ff94b7b..6d301efd5618 100644 --- a/contrib/llvm-project/llvm/lib/Target/ARM/ARMSubtarget.h +++ b/contrib/llvm-project/llvm/lib/Target/ARM/ARMSubtarget.h @@ -325,7 +325,9 @@ public: } bool isTargetGNUAEABI() const { return (TargetTriple.getEnvironment() == Triple::GNUEABI || - TargetTriple.getEnvironment() == Triple::GNUEABIHF) && + TargetTriple.getEnvironment() == Triple::GNUEABIT64 || + TargetTriple.getEnvironment() == Triple::GNUEABIHF || + TargetTriple.getEnvironment() == Triple::GNUEABIHFT64) && !isTargetDarwin() && !isTargetWindows(); } bool isTargetMuslAEABI() const { diff --git a/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.cpp index 7553778c5740..a58c63dcf762 100644 --- a/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.cpp +++ b/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.cpp @@ -241,7 +241,9 @@ ARMBaseTargetMachine::ARMBaseTargetMachine(const Target &T, const Triple &TT, Options.EABIVersion == EABI::Unknown) { // musl is compatible with glibc with regard to EABI version if ((TargetTriple.getEnvironment() == Triple::GNUEABI || + TargetTriple.getEnvironment() == Triple::GNUEABIT64 || TargetTriple.getEnvironment() == Triple::GNUEABIHF || + TargetTriple.getEnvironment() == Triple::GNUEABIHFT64 || TargetTriple.getEnvironment() == Triple::MuslEABI || TargetTriple.getEnvironment() == Triple::MuslEABIHF || TargetTriple.getEnvironment() == Triple::OpenHOS) && diff --git a/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.h b/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.h index 69d8fa8ada64..75ee50f0e93c 100644 --- a/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.h +++ b/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.h @@ -64,6 +64,7 @@ public: bool isTargetHardFloat() const { return TargetTriple.getEnvironment() == Triple::GNUEABIHF || + TargetTriple.getEnvironment() == Triple::GNUEABIHFT64 || TargetTriple.getEnvironment() == Triple::MuslEABIHF || TargetTriple.getEnvironment() == Triple::EABIHF || (TargetTriple.isOSBinFormatMachO() && diff --git a/contrib/llvm-project/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp b/contrib/llvm-project/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp index 388d58a82214..c0bc1276967b 100644 --- a/contrib/llvm-project/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp @@ -88,15 +88,15 @@ static void adjustBranch(unsigned Size, const MCFixup &Fixup, uint64_t &Value, /// Adjusts the value of a relative branch target before fixup application. static void adjustRelativeBranch(unsigned Size, const MCFixup &Fixup, uint64_t &Value, MCContext *Ctx = nullptr) { + // Jumps are relative to the current instruction. + Value -= 2; + // We have one extra bit of precision because the value is rightshifted by // one. signed_width(Size + 1, Value, std::string("branch target"), Fixup, Ctx); // Rightshifts the value by one. AVR::fixups::adjustBranchTarget(Value); - - // Jumps are relative to the current instruction. - Value -= 1; } /// 22-bit absolute fixup. diff --git a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp index 23539a5f4b26..ac9e6d5a90cb 100644 --- a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp +++ b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp @@ -202,8 +202,7 @@ public: bool runOnModule(Module &M) override { FeatureBitset Features = coalesceFeatures(M); - std::string FeatureStr = - getFeatureString(Features, WasmTM->getTargetFeatureString()); + std::string FeatureStr = getFeatureString(Features); WasmTM->setTargetFeatureString(FeatureStr); for (auto &F : M) replaceFeatures(F, FeatureStr); @@ -241,17 +240,14 @@ private: return Features; } - static std::string getFeatureString(const FeatureBitset &Features, - StringRef TargetFS) { + static std::string getFeatureString(const FeatureBitset &Features) { std::string Ret; for (const SubtargetFeatureKV &KV : WebAssemblyFeatureKV) { if (Features[KV.Value]) Ret += (StringRef("+") + KV.Key + ",").str(); + else + Ret += (StringRef("-") + KV.Key + ",").str(); } - SubtargetFeatures TF{TargetFS}; - for (std::string const &F : TF.getFeatures()) - if (!SubtargetFeatures::isEnabled(F)) - Ret += F + ","; return Ret; } diff --git a/contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParser.cpp b/contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParser.cpp index 9d9917d86a36..5e9dd94b84b2 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParser.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParser.cpp @@ -554,7 +554,9 @@ StringRef ARM::computeDefaultTargetABI(const Triple &TT, StringRef CPU) { switch (TT.getEnvironment()) { case Triple::Android: case Triple::GNUEABI: + case Triple::GNUEABIT64: case Triple::GNUEABIHF: + case Triple::GNUEABIHFT64: case Triple::MuslEABI: case Triple::MuslEABIHF: case Triple::OpenHOS: @@ -635,6 +637,7 @@ StringRef ARM::getARMCPUForArch(const llvm::Triple &Triple, StringRef MArch) { switch (Triple.getEnvironment()) { case llvm::Triple::EABIHF: case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABIHFT64: case llvm::Triple::MuslEABIHF: return "arm1176jzf-s"; default: diff --git a/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp b/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp index bf89aace65e5..21d6c74b5956 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp @@ -317,10 +317,13 @@ StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) { case EABI: return "eabi"; case EABIHF: return "eabihf"; case GNU: return "gnu"; + case GNUT64: return "gnut64"; case GNUABI64: return "gnuabi64"; case GNUABIN32: return "gnuabin32"; case GNUEABI: return "gnueabi"; + case GNUEABIT64: return "gnueabit64"; case GNUEABIHF: return "gnueabihf"; + case GNUEABIHFT64: return "gnueabihft64"; case GNUF32: return "gnuf32"; case GNUF64: return "gnuf64"; case GNUSF: return "gnusf"; @@ -693,7 +696,9 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) { .StartsWith("eabi", Triple::EABI) .StartsWith("gnuabin32", Triple::GNUABIN32) .StartsWith("gnuabi64", Triple::GNUABI64) + .StartsWith("gnueabihft64", Triple::GNUEABIHFT64) .StartsWith("gnueabihf", Triple::GNUEABIHF) + .StartsWith("gnueabit64", Triple::GNUEABIT64) .StartsWith("gnueabi", Triple::GNUEABI) .StartsWith("gnuf32", Triple::GNUF32) .StartsWith("gnuf64", Triple::GNUF64) @@ -701,6 +706,7 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) { .StartsWith("gnux32", Triple::GNUX32) .StartsWith("gnu_ilp32", Triple::GNUILP32) .StartsWith("code16", Triple::CODE16) + .StartsWith("gnut64", Triple::GNUT64) .StartsWith("gnu", Triple::GNU) .StartsWith("android", Triple::Android) .StartsWith("musleabihf", Triple::MuslEABIHF) diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp index 68696789530f..fda1c22cc1fb 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1395,7 +1395,7 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, if (!Arg) continue; - if (AL.hasParamAttr(I, Attribute::ByVal)) + if (NewInnerCB->paramHasAttr(I, Attribute::ByVal)) // It's unsound to propagate memory attributes to byval arguments. // Even if CalledFunction doesn't e.g. write to the argument, // the call to NewInnerCB may write to its by-value copy. diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp index 122279160cc7..95bf9f06bc33 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp @@ -161,11 +161,13 @@ void llvm::setKCFIType(Module &M, Function &F, StringRef MangledType) { // Matches CodeGenModule::CreateKCFITypeId in Clang. LLVMContext &Ctx = M.getContext(); MDBuilder MDB(Ctx); - F.setMetadata( - LLVMContext::MD_kcfi_type, - MDNode::get(Ctx, MDB.createConstant(ConstantInt::get( - Type::getInt32Ty(Ctx), - static_cast(xxHash64(MangledType)))))); + std::string Type = MangledType.str(); + if (M.getModuleFlag("cfi-normalize-integers")) + Type += ".normalized"; + F.setMetadata(LLVMContext::MD_kcfi_type, + MDNode::get(Ctx, MDB.createConstant(ConstantInt::get( + Type::getInt32Ty(Ctx), + static_cast(xxHash64(Type)))))); // If the module was compiled with -fpatchable-function-entry, ensure // we use the same patchable-function-prefix. if (auto *MD = mdconst::extract_or_null( diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index 5b4ac649986a..b514dee27f3a 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-19.1.2-0-g7ba7d8e2f7b6" +#define LLVM_REVISION "llvmorg-19.1.3-0-gab51eccf88f5" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-19.1.2-0-g7ba7d8e2f7b6" +#define CLANG_REVISION "llvmorg-19.1.3-0-gab51eccf88f5" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-19.1.2-0-g7ba7d8e2f7b6" +#define LLDB_REVISION "llvmorg-19.1.3-0-gab51eccf88f5" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index 163d9b601b93..2795c08bec37 100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@ -1,8 +1,8 @@ -#define CLANG_VERSION 19.1.2 -#define CLANG_VERSION_STRING "19.1.2" +#define CLANG_VERSION 19.1.3 +#define CLANG_VERSION_STRING "19.1.3" #define CLANG_VERSION_MAJOR 19 #define CLANG_VERSION_MAJOR_STRING "19" #define CLANG_VERSION_MINOR 1 -#define CLANG_VERSION_PATCHLEVEL 2 +#define CLANG_VERSION_PATCHLEVEL 3 #define CLANG_VENDOR "FreeBSD " diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index f207be812952..834cd39007ca 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1400007 -#define LLD_VERSION_STRING "19.1.2 (FreeBSD llvmorg-19.1.2-0-g7ba7d8e2f7b6-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "19.1.3 (FreeBSD llvmorg-19.1.3-0-gab51eccf88f5-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc index be36ec215810..1e614fc8a0cc 100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@ -1,6 +1,6 @@ -#define LLDB_VERSION 19.1.2 -#define LLDB_VERSION_STRING "19.1.2" +#define LLDB_VERSION 19.1.3 +#define LLDB_VERSION_STRING "19.1.3" #define LLDB_VERSION_MAJOR 19 #define LLDB_VERSION_MINOR 1 -#define LLDB_VERSION_PATCH 2 +#define LLDB_VERSION_PATCH 3 /* #undef LLDB_FULL_VERSION_STRING */ diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h index 2ad54b836743..972b3c894dac 100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@ -338,10 +338,10 @@ #define PACKAGE_NAME "LLVM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "LLVM 19.1.2" +#define PACKAGE_STRING "LLVM 19.1.3" /* Define to the version of this package. */ -#define PACKAGE_VERSION "19.1.2" +#define PACKAGE_VERSION "19.1.3" /* Define to the vendor of this package. */ /* #undef PACKAGE_VENDOR */ diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h index 0d8253e78646..c3a1df747ff6 100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@ -176,10 +176,10 @@ #define LLVM_VERSION_MINOR 1 /* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 2 +#define LLVM_VERSION_PATCH 3 /* LLVM version string */ -#define LLVM_VERSION_STRING "19.1.2" +#define LLVM_VERSION_STRING "19.1.3" /* Whether LLVM records statistics for use with GetStatistics(), * PrintStatistics() or PrintStatisticsJSON() diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index a9cdf75b6b13..361bd66edf2f 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,2 +1,2 @@ -#define LLVM_REVISION "llvmorg-19.1.2-0-g7ba7d8e2f7b6" +#define LLVM_REVISION "llvmorg-19.1.3-0-gab51eccf88f5" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/libc++/__assertion_handler b/lib/libc++/__assertion_handler index 3b6d6b2cca53..e12ccccdaff3 100644 --- a/lib/libc++/__assertion_handler +++ b/lib/libc++/__assertion_handler @@ -26,7 +26,8 @@ # if __has_builtin(__builtin_verbose_trap) // AppleClang shipped a slightly different version of __builtin_verbose_trap from the upstream // version before upstream Clang actually got the builtin. -# if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 17000 +// TODO: Remove once AppleClang supports the two-arguments version of the builtin. +# if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1700 # define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap(message) # else # define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap("libc++", message) diff --git a/lib/libomp/kmp_config.h b/lib/libomp/kmp_config.h index 3a8f726353bf..9caf4b8cdf44 100644 --- a/lib/libomp/kmp_config.h +++ b/lib/libomp/kmp_config.h @@ -148,7 +148,7 @@ #define ENABLE_LIBOMPTARGET OPENMP_ENABLE_LIBOMPTARGET // Configured cache line based on architecture -#if KMP_ARCH_PPC64 +#if KMP_ARCH_PPC64 || KMP_ARCH_PPC # define CACHE_LINE 128 #elif KMP_ARCH_AARCH64_A64FX # define CACHE_LINE 256 From nobody Sun Dec 1 11:19:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PZ058FGz5fTLN; Sun, 01 Dec 2024 11:19:04 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PZ02s0Tz43N2; Sun, 1 Dec 2024 11:19:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYpU56g/b0FbDWvlmOImS4Bs7uDPC0rk7tr9QDGI24c=; b=uB+Q7TkYkoKwNQ6vAgPekw5VUfW6VgjM+dkYmkHeLAKfeSyvQ3FGzXPKklA0JQZ9V9Aoma 9WdbUQoFkFi1hjl4safIpAP2RtWq9hJZquuhVJVq03SA+uMjH6uGNDJd72afIKkj/CT1FN 9WuRTS/mtSXLPFBLIkZAfhtAiMdJebt13uZTjanySO6TtfUeTiU4vSr05EwLsnzEoSTsHr PKAbcNkPLnoyhdB7L8w5l2lXMsiT1EbcP5rk9P8Drt5Y6xuReSdzIts/AOvEPYxRLTt5po yVFUBItZN0ifn6uG7lw0jXIv/b/2rhfvFH8lqFX72Sgi6KS7BpCD10ndUAQ6Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYpU56g/b0FbDWvlmOImS4Bs7uDPC0rk7tr9QDGI24c=; b=R7UxtIYMeB30LQtxc3ZSxiuRgfPIhsW5beTRtb9tVuJW/gCffkeBrphxKi2T5RzxYLX3HI Vw/wp75roVe6Pka6O0bvS1dGY+AIMfP+SvoT96xBBPTzQtfh2//J6+6TtfrQ3wkZWKv8kK 0p9y6/ClBepACJbRpcCOgIaiQkpJZ0gbWLBPEeTko3/4Jckdw+ImRoSReeYYcrC1llyzc9 uvYW1uVAe6Ohe3O7UlHIE6LudbxFdBou6G/EPNgEEZdOTKLsM4/V7vMDO6l0Ko7dr7kPs4 299+K+oRofLMDBFf3dEoFsGE646dQ7cZV4VDyTcJ3yxrCVIN1SNgwy2IUxUCUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051944; a=rsa-sha256; cv=none; b=HTXRkoQrpPURxyD7ixSwPY8t5yhQJznBLomclmp4UioduAsPPRWXAgFrmK3ryqWg/RpNhp c9LgiOITsMmjG54A1nLGNF994OwM5X2RHgqge24mbsLE4heKH14m97uGKjmsFEJbSvvWh1 g3ZL+O/FcVWWRRSsR5KEZFMH+MflmE/iiBy9mVDmK1kSM8DlzrQ+dHNxlJ/FoCPpm/M2/a fcFVU6ibZMY9VhO1SNBoGGG1CPpzoeJk9XRY038gPGS4XaSsLY7htpANqJ7r4T6mu9kGu7 MJS0UonCUAp0tAiZo3V9mK9VPex6j/gisnF3WIK6Mhg3LoZGI810k/RZn44lyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PZ02Svhzqjt; Sun, 1 Dec 2024 11:19:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BJ40d009128; Sun, 1 Dec 2024 11:19:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BJ4hv009125; Sun, 1 Dec 2024 11:19:04 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:19:04 GMT Message-Id: <202412011119.4B1BJ4hv009125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f7fa6bf9e73e - stable/14 - Merge llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76e List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f7fa6bf9e73e3fbcbd36239aed032a0429940ba5 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f7fa6bf9e73e3fbcbd36239aed032a0429940ba5 commit f7fa6bf9e73e3fbcbd36239aed032a0429940ba5 Author: Dimitry Andric AuthorDate: 2024-11-21 13:03:43 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:17 +0000 Merge llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76e This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76e, a.k.a. 19.1.4 release. PR: 280562 MFC after: 1 month (cherry picked from commit 415efcecd8b80f68e76376ef2b854cb6f5c84b5a) --- .../include/clang/Basic/BuiltinsLoongArchLASX.def | 146 ++++++++++----------- .../include/clang/Basic/BuiltinsLoongArchLSX.def | 132 +++++++++---------- contrib/llvm-project/clang/lib/AST/Decl.cpp | 10 +- .../llvm-project/clang/lib/AST/Interp/Interp.cpp | 8 ++ .../clang/lib/CodeGen/CodeGenModule.cpp | 4 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 8 +- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 2 +- .../compiler-rt/lib/builtins/int_math.h | 13 +- .../compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp | 9 +- .../lib/sanitizer_common/sanitizer_linux.cpp | 55 +++++--- contrib/llvm-project/libcxx/include/__config | 2 +- .../llvm/include/llvm/Demangle/Demangle.h | 4 + .../llvm/include/llvm/Demangle/MicrosoftDemangle.h | 4 + .../llvm-project/llvm/include/llvm/IR/Mangler.h | 6 + .../llvm/include/llvm/Target/TargetSelectionDAG.td | 6 +- .../CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 6 +- .../llvm/lib/Demangle/MicrosoftDemangle.cpp | 19 +++ contrib/llvm-project/llvm/lib/IR/Mangler.cpp | 36 +++-- .../llvm/lib/Target/AArch64/AArch64InstrInfo.td | 2 +- .../RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp | 7 +- .../lib/Target/SystemZ/SystemZISelLowering.cpp | 3 +- .../Target/WebAssembly/WebAssemblyCFGStackify.cpp | 53 ++------ .../Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp | 13 ++ .../Target/WebAssembly/WebAssemblyInstrControl.td | 9 +- .../WebAssembly/WebAssemblyLateEHPrepare.cpp | 34 ++++- .../llvm/lib/Target/X86/X86InstrCompiler.td | 3 +- .../Transforms/InstCombine/InstCombineNegator.cpp | 11 ++ .../lib/Transforms/InstCombine/InstCombinePHI.cpp | 3 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 35 files changed, 370 insertions(+), 268 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLASX.def b/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLASX.def index 4cf51cc000f6..f644b820a618 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLASX.def +++ b/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLASX.def @@ -12,29 +12,29 @@ // //===----------------------------------------------------------------------===// -TARGET_BUILTIN(__builtin_lasx_xvadd_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvadd_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvadd_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvadd_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvadd_d, "V4LLiV4LLiV4LLi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvadd_q, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsub_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsub_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsub_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsub_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsub_d, "V4LLiV4LLiV4LLi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsub_q, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvaddi_bu, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvaddi_bu, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddi_hu, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddi_wu, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddi_du, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsubi_bu, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsubi_bu, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubi_hu, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubi_wu, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubi_du, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvneg_b, "V32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvneg_b, "V32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvneg_h, "V16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvneg_w, "V8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvneg_d, "V4LLiV4LLi", "nc", "lasx") @@ -79,22 +79,22 @@ TARGET_BUILTIN(__builtin_lasx_xvhsubw_wu_hu, "V8UiV16UsV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvhsubw_du_wu, "V4ULLiV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvhsubw_qu_du, "V4ULLiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvaddwev_h_b, "V16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvaddwev_h_b, "V16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwev_w_h, "V8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwev_d_w, "V4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwev_q_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvaddwod_h_b, "V16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvaddwod_h_b, "V16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwod_w_h, "V8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwod_d_w, "V4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwod_q_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsubwev_h_b, "V16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsubwev_h_b, "V16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwev_w_h, "V8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwev_d_w, "V4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwev_q_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsubwod_h_b, "V16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsubwod_h_b, "V16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwod_w_h, "V8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwod_d_w, "V4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwod_q_d, "V4LLiV4LLiV4LLi", "nc", "lasx") @@ -119,12 +119,12 @@ TARGET_BUILTIN(__builtin_lasx_xvsubwod_w_hu, "V8SiV16UsV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwod_d_wu, "V4LLiV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwod_q_du, "V4LLiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvaddwev_h_bu_b, "V16sV32UcV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvaddwev_h_bu_b, "V16sV32UcV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwev_w_hu_h, "V8SiV16UsV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwev_d_wu_w, "V4LLiV8UiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwev_q_du_d, "V4LLiV4ULLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvaddwod_h_bu_b, "V16sV32UcV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvaddwod_h_bu_b, "V16sV32UcV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwod_w_hu_h, "V8SiV16UsV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwod_d_wu_w, "V4LLiV8UiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwod_q_du_d, "V4LLiV4ULLiV4LLi", "nc", "lasx") @@ -209,7 +209,7 @@ TARGET_BUILTIN(__builtin_lasx_xvmul_h, "V16SsV16SsV16Ss", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmul_w, "V8SiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmul_d, "V4SLLiV4SLLiV4SLLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmuh_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmuh_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmuh_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmuh_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmuh_d, "V4LLiV4LLiV4LLi", "nc", "lasx") @@ -219,12 +219,12 @@ TARGET_BUILTIN(__builtin_lasx_xvmuh_hu, "V16UsV16UsV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmuh_wu, "V8UiV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmuh_du, "V4ULLiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmulwev_h_b, "V16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmulwev_h_b, "V16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwev_w_h, "V8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwev_d_w, "V4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwev_q_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmulwod_h_b, "V16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmulwod_h_b, "V16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_w_h, "V8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_d_w, "V4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_q_d, "V4LLiV4LLiV4LLi", "nc", "lasx") @@ -239,12 +239,12 @@ TARGET_BUILTIN(__builtin_lasx_xvmulwod_w_hu, "V8SiV16UsV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_d_wu, "V4LLiV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_q_du, "V4LLiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmulwev_h_bu_b, "V16sV32UcV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmulwev_h_bu_b, "V16sV32UcV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwev_w_hu_h, "V8SiV16UsV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwev_d_wu_w, "V4LLiV8UiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwev_q_du_d, "V4LLiV4ULLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmulwod_h_bu_b, "V16sV32UcV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmulwod_h_bu_b, "V16sV32UcV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_w_hu_h, "V8SiV16UsV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_d_wu_w, "V4LLiV8UiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_q_du_d, "V4LLiV4ULLiV4LLi", "nc", "lasx") @@ -259,12 +259,12 @@ TARGET_BUILTIN(__builtin_lasx_xvmsub_h, "V16SsV16SsV16SsV16Ss", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmsub_w, "V8SiV8SiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmsub_d, "V4SLLiV4SLLiV4SLLiV4SLLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmaddwev_h_b, "V16sV16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmaddwev_h_b, "V16sV16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwev_w_h, "V8SiV8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwev_d_w, "V4LLiV4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwev_q_d, "V4LLiV4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmaddwod_h_b, "V16sV16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmaddwod_h_b, "V16sV16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_w_h, "V8SiV8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_d_w, "V4LLiV4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_q_d, "V4LLiV4LLiV4LLiV4LLi", "nc", "lasx") @@ -279,12 +279,12 @@ TARGET_BUILTIN(__builtin_lasx_xvmaddwod_w_hu, "V8UiV8UiV16UsV16Us", "nc", "lasx" TARGET_BUILTIN(__builtin_lasx_xvmaddwod_d_wu, "V4ULLiV4ULLiV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_q_du, "V4ULLiV4ULLiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmaddwev_h_bu_b, "V16sV16sV32UcV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmaddwev_h_bu_b, "V16sV16sV32UcV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwev_w_hu_h, "V8SiV8SiV16UsV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwev_d_wu_w, "V4LLiV4LLiV8UiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwev_q_du_d, "V4LLiV4LLiV4ULLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmaddwod_h_bu_b, "V16sV16sV32UcV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmaddwod_h_bu_b, "V16sV16sV32UcV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_w_hu_h, "V8SiV8SiV16UsV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_d_wu_w, "V4LLiV4LLiV8UiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_q_du_d, "V4LLiV4LLiV4ULLiV4LLi", "nc", "lasx") @@ -320,7 +320,7 @@ TARGET_BUILTIN(__builtin_lasx_xvsat_hu, "V16UsV16UsIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsat_wu, "V8UiV8UiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsat_du, "V4ULLiV4ULLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvexth_h_b, "V16sV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvexth_h_b, "V16sV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvexth_w_h, "V8SiV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvexth_d_w, "V4LLiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvexth_q_d, "V4LLiV4LLi", "nc", "lasx") @@ -330,17 +330,17 @@ TARGET_BUILTIN(__builtin_lasx_xvexth_wu_hu, "V8UiV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvexth_du_wu, "V4ULLiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvexth_qu_du, "V4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_vext2xv_h_b, "V16sV32c", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_vext2xv_w_b, "V8SiV32c", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_vext2xv_d_b, "V4LLiV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_vext2xv_h_b, "V16sV32Sc", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_vext2xv_w_b, "V8SiV32Sc", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_vext2xv_d_b, "V4LLiV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_vext2xv_w_h, "V8SiV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_vext2xv_d_h, "V4LLiV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_vext2xv_d_w, "V4LLiV8Si", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_vext2xv_hu_bu, "V16sV32c", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_vext2xv_wu_bu, "V8SiV32c", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_vext2xv_du_bu, "V4LLiV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_vext2xv_hu_bu, "V16sV32Sc", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_vext2xv_wu_bu, "V8SiV32Sc", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_vext2xv_du_bu, "V4LLiV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_vext2xv_wu_hu, "V8SiV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_vext2xv_du_hu, "V4LLiV16s", "nc", "lasx") @@ -351,16 +351,16 @@ TARGET_BUILTIN(__builtin_lasx_xvsigncov_h, "V16SsV16SsV16Ss", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsigncov_w, "V8SiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsigncov_d, "V4SLLiV4SLLiV4SLLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmskltz_b, "V32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmskltz_b, "V32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmskltz_h, "V16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmskltz_w, "V8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmskltz_d, "V4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmskgez_b, "V32cV32c", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmsknz_b, "V16sV16s", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmskgez_b, "V32ScV32Sc", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmsknz_b, "V32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvldi, "V4LLiIi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvrepli_b, "V32cIi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvrepli_b, "V32ScIi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrepli_h, "V16sIi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrepli_w, "V8iIi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrepli_d, "V4LLiIi", "nc", "lasx") @@ -368,7 +368,7 @@ TARGET_BUILTIN(__builtin_lasx_xvrepli_d, "V4LLiIi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvand_v, "V32UcV32UcV32Uc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvor_v, "V32UcV32UcV32Uc", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvxor_v, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvxor_v, "V32UcV32UcV32Uc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvnor_v, "V32UcV32UcV32Uc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvandn_v, "V32UcV32UcV32Uc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvorn_v, "V32ScV32ScV32Sc", "nc", "lasx") @@ -378,47 +378,47 @@ TARGET_BUILTIN(__builtin_lasx_xvori_b, "V32UcV32UcIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvxori_b, "V32UcV32UcIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvnori_b, "V32UcV32UcIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsll_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsll_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsll_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsll_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsll_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvslli_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvslli_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvslli_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvslli_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvslli_d, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrl_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrl_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrl_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrl_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrl_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrli_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrli_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrli_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrli_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrli_d, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsra_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsra_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsra_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsra_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsra_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrai_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrai_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrai_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrai_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrai_d, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvrotr_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvrotr_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrotr_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrotr_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrotr_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvrotri_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvrotri_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrotri_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrotri_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrotri_d, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsllwil_h_b, "V16sV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsllwil_h_b, "V16sV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsllwil_w_h, "V8SiV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsllwil_d_w, "V4LLiV8SiIUi", "nc", "lasx") @@ -430,22 +430,22 @@ TARGET_BUILTIN(__builtin_lasx_xvsllwil_du_wu, "V4ULLiV8UiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvextl_qu_du, "V4LLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrlr_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrlr_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlr_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlr_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlr_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrlri_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrlri_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlri_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlri_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlri_d, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrar_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrar_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrar_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrar_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrar_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrari_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrari_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrari_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrari_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrari_d, "V4LLiV4LLiIUi", "nc", "lasx") @@ -458,12 +458,12 @@ TARGET_BUILTIN(__builtin_lasx_xvsran_b_h, "V32ScV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsran_h_w, "V16sV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsran_w_d, "V8SiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrlni_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrlni_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlni_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlni_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlni_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrani_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrani_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrani_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrani_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrani_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") @@ -476,12 +476,12 @@ TARGET_BUILTIN(__builtin_lasx_xvsrarn_b_h, "V32ScV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrarn_h_w, "V16sV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrarn_w_d, "V8SiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrlrni_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrlrni_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlrni_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlrni_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlrni_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrarni_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrarni_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrarni_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrarni_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrarni_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") @@ -502,22 +502,22 @@ TARGET_BUILTIN(__builtin_lasx_xvssran_bu_h, "V32UcV16UsV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssran_hu_w, "V16UsV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssran_wu_d, "V8UiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrlni_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrlni_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlni_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlni_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlni_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrani_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrani_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrani_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrani_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrani_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrlrni_bu_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrlrni_bu_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlrni_hu_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlrni_wu_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlrni_du_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrani_bu_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrani_bu_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrani_hu_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrani_wu_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrani_du_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") @@ -538,22 +538,22 @@ TARGET_BUILTIN(__builtin_lasx_xvssrarn_bu_h, "V32UcV16UsV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarn_hu_w, "V16UsV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarn_wu_d, "V8UiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrlrni_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrlrni_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlrni_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlrni_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlrni_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrarni_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrarni_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarni_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarni_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarni_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrlni_bu_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrlni_bu_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlni_hu_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlni_wu_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlni_du_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrarni_bu_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrarni_bu_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarni_hu_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarni_wu_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarni_du_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") @@ -606,7 +606,7 @@ TARGET_BUILTIN(__builtin_lasx_xvbitrevi_d, "V4ULLiV4ULLiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvfrstp_b, "V32ScV32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvfrstp_h, "V16SsV16SsV16SsV16Ss", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvfrstpi_b, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvfrstpi_b, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvfrstpi_h, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvfadd_s, "V8fV8fV8f", "nc", "lasx") @@ -877,12 +877,12 @@ TARGET_BUILTIN(__builtin_lasx_xvpickve2gr_d, "LLiV4SLLiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickve2gr_wu, "iV8UiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickve2gr_du, "LLiV4ULLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvreplve_b, "V32cV32cUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvreplve_b, "V32ScV32ScUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvreplve_h, "V16sV16sUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvreplve_w, "V8iV8iUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvreplve_d, "V4LLiV4LLiUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvrepl128vei_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvrepl128vei_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrepl128vei_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrepl128vei_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrepl128vei_d, "V4LLiV4LLiIUi", "nc", "lasx") @@ -902,40 +902,40 @@ TARGET_BUILTIN(__builtin_lasx_xvpickve_d, "V4LLiV4LLiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickve_w_f, "V8fV8fIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickve_d_f, "V4dV4dIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvbsll_v, "V32cV32cIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvbsrl_v, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvbsll_v, "V32ScV32ScIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvbsrl_v, "V32ScV32ScIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvpackev_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvpackev_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpackev_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpackev_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpackev_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvpackod_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvpackod_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpackod_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpackod_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpackod_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvpickev_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvpickev_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickev_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickev_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickev_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvpickod_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvpickod_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickod_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickod_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickod_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvilvl_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvilvl_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvilvl_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvilvl_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvilvl_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvilvh_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvilvh_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvilvh_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvilvh_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvilvh_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvshuf_b, "V32UcV32UcV32UcV32Uc", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvshuf_b, "V32ScV32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvshuf_h, "V16sV16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvshuf_w, "V8iV8iV8iV8i", "nc", "lasx") @@ -943,16 +943,16 @@ TARGET_BUILTIN(__builtin_lasx_xvshuf_d, "V4LLiV4LLiV4LLiV4LLi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvperm_w, "V8iV8iV8i", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvshuf4i_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvshuf4i_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvshuf4i_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvshuf4i_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvshuf4i_d, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpermi_w, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpermi_d, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvpermi_q, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvpermi_q, "V32ScV32ScV32ScIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvextrins_b, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvextrins_b, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvextrins_h, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvextrins_w, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvextrins_d, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") @@ -963,7 +963,7 @@ TARGET_BUILTIN(__builtin_lasx_xvst, "vV32Scv*Ii", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvldx, "V32ScvC*LLi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvstx, "vV32Scv*LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvldrepl_b, "V32cvC*Ii", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvldrepl_b, "V32ScvC*Ii", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvldrepl_h, "V16svC*Ii", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvldrepl_w, "V8ivC*Ii", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvldrepl_d, "V4LLivC*Ii", "nc", "lasx") diff --git a/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLSX.def b/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLSX.def index c90f4dc5458f..b3056971986d 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLSX.def +++ b/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLSX.def @@ -12,29 +12,29 @@ // //===----------------------------------------------------------------------===// -TARGET_BUILTIN(__builtin_lsx_vadd_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vadd_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vadd_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vadd_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vadd_d, "V2LLiV2LLiV2LLi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vadd_q, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsub_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsub_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsub_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsub_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsub_d, "V2LLiV2LLiV2LLi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsub_q, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vaddi_bu, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vaddi_bu, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddi_hu, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddi_wu, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddi_du, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsubi_bu, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsubi_bu, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubi_hu, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubi_wu, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubi_du, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vneg_b, "V16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vneg_b, "V16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vneg_h, "V8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vneg_w, "V4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vneg_d, "V2LLiV2LLi", "nc", "lsx") @@ -79,22 +79,22 @@ TARGET_BUILTIN(__builtin_lsx_vhsubw_wu_hu, "V4UiV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vhsubw_du_wu, "V2ULLiV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vhsubw_qu_du, "V2ULLiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vaddwev_h_b, "V8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vaddwev_h_b, "V8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwev_w_h, "V4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwev_d_w, "V2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwev_q_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vaddwod_h_b, "V8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vaddwod_h_b, "V8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwod_w_h, "V4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwod_d_w, "V2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwod_q_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsubwev_h_b, "V8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsubwev_h_b, "V8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwev_w_h, "V4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwev_d_w, "V2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwev_q_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsubwod_h_b, "V8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsubwod_h_b, "V8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwod_w_h, "V4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwod_d_w, "V2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwod_q_d, "V2LLiV2LLiV2LLi", "nc", "lsx") @@ -119,12 +119,12 @@ TARGET_BUILTIN(__builtin_lsx_vsubwod_w_hu, "V4SiV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwod_d_wu, "V2LLiV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwod_q_du, "V2LLiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vaddwev_h_bu_b, "V8sV16UcV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vaddwev_h_bu_b, "V8sV16UcV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwev_w_hu_h, "V4SiV8UsV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwev_d_wu_w, "V2LLiV4UiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwev_q_du_d, "V2LLiV2ULLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vaddwod_h_bu_b, "V8sV16UcV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vaddwod_h_bu_b, "V8sV16UcV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwod_w_hu_h, "V4SiV8UsV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwod_d_wu_w, "V2LLiV4UiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwod_q_du_d, "V2LLiV2ULLiV2LLi", "nc", "lsx") @@ -209,7 +209,7 @@ TARGET_BUILTIN(__builtin_lsx_vmul_h, "V8SsV8SsV8Ss", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmul_w, "V4SiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmul_d, "V2SLLiV2SLLiV2SLLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmuh_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmuh_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmuh_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmuh_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmuh_d, "V2LLiV2LLiV2LLi", "nc", "lsx") @@ -219,12 +219,12 @@ TARGET_BUILTIN(__builtin_lsx_vmuh_hu, "V8UsV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmuh_wu, "V4UiV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmuh_du, "V2ULLiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmulwev_h_b, "V8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmulwev_h_b, "V8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwev_w_h, "V4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwev_d_w, "V2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwev_q_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmulwod_h_b, "V8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmulwod_h_b, "V8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_w_h, "V4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_d_w, "V2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_q_d, "V2LLiV2LLiV2LLi", "nc", "lsx") @@ -239,12 +239,12 @@ TARGET_BUILTIN(__builtin_lsx_vmulwod_w_hu, "V4SiV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_d_wu, "V2LLiV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_q_du, "V2LLiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmulwev_h_bu_b, "V8sV16UcV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmulwev_h_bu_b, "V8sV16UcV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwev_w_hu_h, "V4SiV8UsV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwev_d_wu_w, "V2LLiV4UiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwev_q_du_d, "V2LLiV2ULLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmulwod_h_bu_b, "V8sV16UcV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmulwod_h_bu_b, "V8sV16UcV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_w_hu_h, "V4SiV8UsV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_d_wu_w, "V2LLiV4UiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_q_du_d, "V2LLiV2ULLiV2LLi", "nc", "lsx") @@ -259,12 +259,12 @@ TARGET_BUILTIN(__builtin_lsx_vmsub_h, "V8SsV8SsV8SsV8Ss", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmsub_w, "V4SiV4SiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmsub_d, "V2SLLiV2SLLiV2SLLiV2SLLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmaddwev_h_b, "V8sV8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmaddwev_h_b, "V8sV8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwev_w_h, "V4SiV4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwev_d_w, "V2LLiV2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwev_q_d, "V2LLiV2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmaddwod_h_b, "V8sV8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmaddwod_h_b, "V8sV8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_w_h, "V4SiV4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_d_w, "V2LLiV2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_q_d, "V2LLiV2LLiV2LLiV2LLi", "nc", "lsx") @@ -279,12 +279,12 @@ TARGET_BUILTIN(__builtin_lsx_vmaddwod_w_hu, "V4UiV4UiV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_d_wu, "V2ULLiV2ULLiV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_q_du, "V2ULLiV2ULLiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmaddwev_h_bu_b, "V8sV8sV16UcV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmaddwev_h_bu_b, "V8sV8sV16UcV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwev_w_hu_h, "V4SiV4SiV8UsV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwev_d_wu_w, "V2LLiV2LLiV4UiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwev_q_du_d, "V2LLiV2LLiV2ULLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmaddwod_h_bu_b, "V8sV8sV16UcV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmaddwod_h_bu_b, "V8sV8sV16UcV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_w_hu_h, "V4SiV4SiV8UsV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_d_wu_w, "V2LLiV2LLiV4UiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_q_du_d, "V2LLiV2LLiV2ULLiV2LLi", "nc", "lsx") @@ -320,7 +320,7 @@ TARGET_BUILTIN(__builtin_lsx_vsat_hu, "V8UsV8UsIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsat_wu, "V4UiV4UiIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsat_du, "V2ULLiV2ULLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vexth_h_b, "V8sV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vexth_h_b, "V8sV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vexth_w_h, "V4SiV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vexth_d_w, "V2LLiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vexth_q_d, "V2LLiV2LLi", "nc", "lsx") @@ -335,16 +335,16 @@ TARGET_BUILTIN(__builtin_lsx_vsigncov_h, "V8SsV8SsV8Ss", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsigncov_w, "V4SiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsigncov_d, "V2SLLiV2SLLiV2SLLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmskltz_b, "V16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmskltz_b, "V16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmskltz_h, "V8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmskltz_w, "V4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmskltz_d, "V2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmskgez_b, "V16cV16c", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmsknz_b, "V8sV8s", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmskgez_b, "V16ScV16Sc", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmsknz_b, "V16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vldi, "V2LLiIi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vrepli_b, "V16cIi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vrepli_b, "V16ScIi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrepli_h, "V8sIi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrepli_w, "V4iIi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrepli_d, "V2LLiIi", "nc", "lsx") @@ -352,7 +352,7 @@ TARGET_BUILTIN(__builtin_lsx_vrepli_d, "V2LLiIi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vand_v, "V16UcV16UcV16Uc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vor_v, "V16UcV16UcV16Uc", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vxor_v, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vxor_v, "V16UcV16UcV16Uc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vnor_v, "V16UcV16UcV16Uc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vandn_v, "V16UcV16UcV16Uc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vorn_v, "V16ScV16ScV16Sc", "nc", "lsx") @@ -362,47 +362,47 @@ TARGET_BUILTIN(__builtin_lsx_vori_b, "V16UcV16UcIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vxori_b, "V16UcV16UcIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vnori_b, "V16UcV16UcIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsll_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsll_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsll_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsll_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsll_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vslli_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vslli_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vslli_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vslli_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vslli_d, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrl_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrl_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrl_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrl_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrl_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrli_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrli_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrli_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrli_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrli_d, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsra_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsra_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsra_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsra_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsra_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrai_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrai_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrai_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrai_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrai_d, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vrotr_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vrotr_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrotr_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrotr_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrotr_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vrotri_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vrotri_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrotri_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrotri_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrotri_d, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsllwil_h_b, "V8sV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsllwil_h_b, "V8sV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsllwil_w_h, "V4SiV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsllwil_d_w, "V2LLiV4SiIUi", "nc", "lsx") @@ -414,22 +414,22 @@ TARGET_BUILTIN(__builtin_lsx_vsllwil_du_wu, "V2ULLiV4UiIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vextl_qu_du, "V2LLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrlr_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrlr_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlr_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlr_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlr_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrlri_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrlri_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlri_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlri_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlri_d, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrar_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrar_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrar_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrar_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrar_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrari_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrari_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrari_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrari_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrari_d, "V2LLiV2LLiIUi", "nc", "lsx") @@ -442,12 +442,12 @@ TARGET_BUILTIN(__builtin_lsx_vsran_b_h, "V16ScV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsran_h_w, "V8sV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsran_w_d, "V4SiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrlni_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrlni_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlni_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlni_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlni_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrani_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrani_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrani_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrani_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrani_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") @@ -460,12 +460,12 @@ TARGET_BUILTIN(__builtin_lsx_vsrarn_b_h, "V16ScV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrarn_h_w, "V8sV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrarn_w_d, "V4SiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrlrni_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrlrni_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlrni_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlrni_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlrni_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrarni_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrarni_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrarni_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrarni_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrarni_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") @@ -486,22 +486,22 @@ TARGET_BUILTIN(__builtin_lsx_vssran_bu_h, "V16UcV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssran_hu_w, "V8UsV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssran_wu_d, "V4UiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrlni_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrlni_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlni_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlni_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlni_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrani_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrani_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrani_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrani_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrani_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrlrni_bu_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrlrni_bu_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlrni_hu_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlrni_wu_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlrni_du_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrani_bu_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrani_bu_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrani_hu_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrani_wu_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrani_du_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") @@ -522,22 +522,22 @@ TARGET_BUILTIN(__builtin_lsx_vssrarn_bu_h, "V16UcV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarn_hu_w, "V8UsV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarn_wu_d, "V4UiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrlrni_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrlrni_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlrni_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlrni_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlrni_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrarni_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrarni_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarni_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarni_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarni_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrlni_bu_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrlni_bu_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlni_hu_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlni_wu_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlni_du_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrarni_bu_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrarni_bu_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarni_hu_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarni_wu_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarni_du_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") @@ -590,7 +590,7 @@ TARGET_BUILTIN(__builtin_lsx_vbitrevi_d, "V2ULLiV2ULLiIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vfrstp_b, "V16ScV16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vfrstp_h, "V8SsV8SsV8SsV8Ss", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vfrstpi_b, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vfrstpi_b, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vfrstpi_h, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vfadd_s, "V4fV4fV4f", "nc", "lsx") @@ -867,63 +867,63 @@ TARGET_BUILTIN(__builtin_lsx_vpickve2gr_hu, "iV8UsIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickve2gr_wu, "iV4UiIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickve2gr_du, "LLiV2ULLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vreplve_b, "V16cV16cUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vreplve_b, "V16ScV16ScUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vreplve_h, "V8sV8sUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vreplve_w, "V4iV4iUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vreplve_d, "V2LLiV2LLiUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vreplvei_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vreplvei_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vreplvei_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vreplvei_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vreplvei_d, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vbsll_v, "V16cV16cIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vbsrl_v, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vbsll_v, "V16ScV16ScIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vbsrl_v, "V16ScV16ScIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vpackev_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vpackev_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpackev_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpackev_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpackev_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vpackod_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vpackod_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpackod_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpackod_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpackod_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vpickev_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vpickev_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickev_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickev_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickev_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vpickod_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vpickod_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickod_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickod_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickod_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vilvl_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vilvl_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vilvl_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vilvl_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vilvl_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vilvh_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vilvh_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vilvh_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vilvh_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vilvh_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vshuf_b, "V16UcV16UcV16UcV16Uc", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vshuf_b, "V16ScV16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vshuf_h, "V8sV8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vshuf_w, "V4iV4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vshuf_d, "V2LLiV2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vshuf4i_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vshuf4i_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vshuf4i_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vshuf4i_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vshuf4i_d, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpermi_w, "V4iV4iV4iIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vextrins_b, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vextrins_b, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vextrins_h, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vextrins_w, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vextrins_d, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") @@ -934,7 +934,7 @@ TARGET_BUILTIN(__builtin_lsx_vst, "vV16Scv*Ii", "nc", "lsx") *** 858 LINES SKIPPED *** From nobody Sun Dec 1 11:19:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1PZ16HkMz5fTSH; Sun, 01 Dec 2024 11:19:05 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PZ13rrgz43Sq; Sun, 1 Dec 2024 11:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fCsuxA7BZpYzofKHTqNlRN+u7yLLmlx+JMjzbuiqyk8=; b=tLYRRoZzvi1xwkJVX0umIggNHX5NZqRdFqpnlivzoLrJUZMcuWKVRrq1CsRGcnJeyA12Qb lVkNQrhRtJBhthlOaom3GQh5f7eN4gvFBrqywIVl+RTS5D5yKjWsyYtpGaNvznX8feKVLN 2M57uICtpOeLM0bsT6JXAlMs57ismyR+X2+PRJg3jqFZODjHVo7DWuHXKFvUBpRPBCpTDw 0NpEjaA4p5OLgQI4L2X6CgeiojigkzN4pO4DbGBEb8qlz2uGnxNOeXSsKD++4OKazvwh2a dzdYqUUHnQX8tcUIofm2pQxDTdxJq95LfwtY1fY6R55xRIByiDL7cuWpyfnUuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fCsuxA7BZpYzofKHTqNlRN+u7yLLmlx+JMjzbuiqyk8=; b=vSyx36t7LUvqHjsZxbwhm6a50urBc/zYXMBmHZkSWDsy8d9PBXRuXw2v2cPeZpeOONTGGj kRhRSaVKKGcCEd657DVdY4BMyfOxu5cdwHFdSwGMbQ6+2E88m5zq6COwO9EY0f+rDMlf2v Ar+zWxhLUfDCCX/PuyeS7hksdB/U0v9s9PxkNxFKonZ59QBa/EnOs4D8DrLVtExggz6aW4 2xgSMLFX9OH0wH2oQS8zS0d89XMqsFOra0cAs3ZsISjF3ebFlMAtMav9zLOhHYXu0hzK9g QLiOToWrpsbYF4hox7X0I1W181ajFq4ZvXXV36ud1jVkHgbWSe+9iMxtH7IULg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051945; a=rsa-sha256; cv=none; b=wRfY4SMcTPTH1YTKMuGAvtWAYaXqcEpKaas03UhioJ5dfWe86BB5O37bh4shjBnermKiio PPc04/uOwrrfyNJR0VXJ6CnRxkQ9Ogiv8nXu5KsHqgKgLCUyIrM9FuWtDw1fjTYaKOIy06 QPtcqMTov6IrWdt5PXGF5AECQ63zDDhUvIhGmiFep9fWxmG8ZGJ9a1HjQOkAvzMF97+eJb Cx9ftt1J69vTbYLgGKGDKY9glf3smNWRB483AvU1Yp7sFDZFPMtvnyu1D+D3IQawiARQ9M bFtt7ameQ/UA/30S5ELUBZWcYun+qhMeOO4rs9cnj+thS1XtWF9d60mxH3NQTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1PZ13Sr2zr0T; Sun, 1 Dec 2024 11:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1BJ5kA009181; Sun, 1 Dec 2024 11:19:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BJ5tN009178; Sun, 1 Dec 2024 11:19:05 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:19:05 GMT Message-Id: <202412011119.4B1BJ5tN009178@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 35d2f335e855 - stable/14 - Bump __FreeBSD_version for llvm 19.1.2 merge List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 35d2f335e855af816d0a7fe5baf6a3facba84562 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=35d2f335e855af816d0a7fe5baf6a3facba84562 commit 35d2f335e855af816d0a7fe5baf6a3facba84562 Author: Dimitry Andric AuthorDate: 2024-10-23 16:49:02 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:37 +0000 Bump __FreeBSD_version for llvm 19.1.2 merge PR: 280562 MFC after: 1 month (cherry picked from commit f3dbef108212460489ae68b4c47e20b73984f433) --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 926485f34572..3103da173f47 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -75,7 +75,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1402500 +#define __FreeBSD_version 1402501 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Sun Dec 1 12:53:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1RgY6P1yz5fb5G; Sun, 01 Dec 2024 12:54:01 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1RgY67Xhz4Ntd; Sun, 1 Dec 2024 12:54:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Cpxt7LC28SnS9dzy0mgD3J8ZXAOrfsabl0k6PG0wGY=; b=EfyBQLDeu5kfE5CcLoglc7bvcB9Ec0odRzZq5V7LA6kC40M6nt8UvF7AJtJC+/UbGk/xYj JuhyQFfjGOKLQeGtoJcfdjGmYBVdilS6KylHB9luqlr6oDnGzCgg9Wnk2IMXA2YeaOkSvK MoJZjl1s7B1fnq80ISkoSg1S74ZY+lnkHTZ6DmQz6xplIn/8jLc53KcuxXLRhSXx54b3OO INJi5nZdptZJ7UGutMzF1Oy/LqseuYMuhGtbw/Uk9XdyxxuiDN5OoHAP96Kce6PZTzygP1 0NYaO8lbWbNd96PITtSn+DvyI48w7dOZ2iPFKLsNP/Fwf2J7RPqXL5TmdANUDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Cpxt7LC28SnS9dzy0mgD3J8ZXAOrfsabl0k6PG0wGY=; b=OmgFiHiAEIn0bMhCkaDUf6XHinV2b7LFxjUhmpN05+TQawtpgZOHn+fpj8dOStlTy8Piu5 sZx1zTk3K1J/hhD9p9jIo940VuGPcVNsA/K/kDOyLL36Jei9op6YssbziFh8NXKwNHPPYe 93nLET3P7bHUiaN/qAeSmnFd4vz2ZVxd/P94fRrLDQQSOHPrTSdH4IEpnFuL6UgZ0Pd+Om 2LOQtmAEJsuOLti4PKA1JSZ8Yx+Pk6VcnoFHCJKMkukBVLrNudhV7Es9qpNBO7ZFtifYIN eYsA6V0nXcqKs29pSQ2eEqQWHk3gitqbGyOxS4/46SIlGgyq6L4ETDipAPLuYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057641; a=rsa-sha256; cv=none; b=Mzixu8NhHvumk0wGvTby/zix180Hxl0lCo1wr5NkSV/aG5WKuCAnf55huiI7UZVZxeK6ar f9vdnYuoPpkTP58oP6WELBrIpgtVIQEwHtTjkCO3pyihVLNSstFvgm/BCeCB26IcYmGO9h 115sAzM4an0ayT9hq4ScsTXnJcAgE9i8eI40otKBPp7K60005ffL96X56jTBxnXZRnEmOl GBMD+EHjYWSmyvD21W5eTpNiU1f4/udxAo7jrhAJ24F54FoDeLg8EYeIJZP3ULwnYsO00j bHs83r94JAskdV8eO/NrVfJjV5iJt11FrYbUpLxBxZR6gHxj9g45/R82ndNOUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1RgY5jrfztkp; Sun, 1 Dec 2024 12:54:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1Cs15A093161; Sun, 1 Dec 2024 12:54:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1Crm3Q093125; Sun, 1 Dec 2024 12:53:48 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:53:48 GMT Message-Id: <202412011253.4B1Crm3Q093125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: fbc266465ed3 - stable/13 - Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fbc266465ed3585efdbd8e9ebf71e97ce7e8b464 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=fbc266465ed3585efdbd8e9ebf71e97ce7e8b464 commit fbc266465ed3585efdbd8e9ebf71e97ce7e8b464 Author: Dimitry Andric AuthorDate: 2024-07-27 23:34:35 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:12 +0000 Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-19-init-18630-gf2ccf80136a0, the last commit before the upstream release/19.x branch was created. PR: 280562 MFC after: 1 month (cherry picked from commit 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583) --- ObsoleteFiles.inc | 477 + contrib/llvm-project/FREEBSD-Xlist | 56 +- contrib/llvm-project/clang/include/clang-c/Index.h | 85 +- .../clang/include/clang/APINotes/APINotesManager.h | 2 +- .../clang/include/clang/APINotes/APINotesReader.h | 25 +- .../clang/include/clang/APINotes/APINotesWriter.h | 29 +- .../clang/include/clang/APINotes/Types.h | 77 +- .../clang/include/clang/AST/ASTConcept.h | 11 +- .../clang/include/clang/AST/ASTConsumer.h | 3 +- .../clang/include/clang/AST/ASTContext.h | 134 +- .../clang/include/clang/AST/ASTMutationListener.h | 27 + .../clang/include/clang/AST/ASTNodeTraverser.h | 130 +- .../clang/include/clang/AST/ASTUnresolvedSet.h | 9 +- .../clang/include/clang/AST/AbstractBasicReader.h | 13 +- .../clang/include/clang/AST/AbstractBasicWriter.h | 12 +- .../clang/include/clang/AST/Availability.h | 63 + .../clang/include/clang/AST/BuiltinTypes.def | 5 +- .../clang/include/clang/AST/CommentCommandTraits.h | 22 + .../clang/include/clang/AST/CommentCommands.td | 9 +- .../clang/include/clang/AST/CommentParser.h | 9 +- .../clang/include/clang/AST/ComparisonCategories.h | 2 +- .../clang/include/clang/AST/ComputeDependence.h | 6 +- .../llvm-project/clang/include/clang/AST/Decl.h | 286 +- .../clang/include/clang/AST/DeclAccessPair.h | 37 +- .../clang/include/clang/AST/DeclBase.h | 72 +- .../llvm-project/clang/include/clang/AST/DeclCXX.h | 63 +- .../clang/include/clang/AST/DeclContextInternals.h | 41 +- .../clang/include/clang/AST/DeclFriend.h | 2 +- .../llvm-project/clang/include/clang/AST/DeclID.h | 274 + .../clang/include/clang/AST/DeclObjC.h | 119 +- .../clang/include/clang/AST/DeclOpenMP.h | 19 +- .../clang/include/clang/AST/DeclTemplate.h | 395 +- .../llvm-project/clang/include/clang/AST/Expr.h | 577 +- .../llvm-project/clang/include/clang/AST/ExprCXX.h | 199 +- .../clang/include/clang/AST/ExprOpenMP.h | 124 - .../clang/include/clang/AST/ExternalASTSource.h | 8 +- .../clang/include/clang/AST/FormatString.h | 13 + .../clang/include/clang/AST/GlobalDecl.h | 4 + .../clang/include/clang/AST/JSONNodeDumper.h | 5 + .../llvm-project/clang/include/clang/AST/Mangle.h | 11 +- .../clang/include/clang/AST/NestedNameSpecifier.h | 8 +- .../clang/include/clang/AST/OpenACCClause.h | 917 + .../clang/include/clang/AST/OpenMPClause.h | 40 + .../clang/include/clang/AST/OperationKinds.def | 6 + .../clang/include/clang/AST/ParentMapContext.h | 2 +- .../clang/include/clang/AST/PrettyPrinter.h | 7 +- .../clang/include/clang/AST/PropertiesBase.td | 3 + .../clang/include/clang/AST/RawCommentList.h | 15 +- .../clang/include/clang/AST/RecursiveASTVisitor.h | 170 +- .../clang/include/clang/AST/Redeclarable.h | 4 +- .../llvm-project/clang/include/clang/AST/Stmt.h | 31 +- .../clang/include/clang/AST/StmtObjC.h | 3 +- .../clang/include/clang/AST/StmtOpenACC.h | 256 + .../clang/include/clang/AST/StmtOpenMP.h | 157 +- .../clang/include/clang/AST/StmtVisitor.h | 3 +- .../clang/include/clang/AST/TemplateBase.h | 2 +- .../clang/include/clang/AST/TemplateName.h | 37 +- .../clang/include/clang/AST/TextNodeDumper.h | 17 + .../llvm-project/clang/include/clang/AST/Type.h | 1137 +- .../llvm-project/clang/include/clang/AST/TypeLoc.h | 71 +- .../clang/include/clang/AST/TypeProperties.td | 51 + .../clang/include/clang/AST/UnresolvedSet.h | 1 + .../clang/include/clang/AST/VTTBuilder.h | 6 +- .../clang/include/clang/AST/VTableBuilder.h | 29 + .../clang/include/clang/ASTMatchers/ASTMatchers.h | 148 +- .../clang/ASTMatchers/ASTMatchersInternal.h | 50 +- .../clang/Analysis/Analyses/ExprMutationAnalyzer.h | 136 +- .../clang/Analysis/Analyses/PostOrderCFGView.h | 36 +- .../clang/Analysis/Analyses/ThreadSafetyCommon.h | 6 +- .../clang/Analysis/Analyses/UnsafeBufferUsage.h | 58 +- .../Analysis/Analyses/UnsafeBufferUsageGadgets.def | 12 +- .../clang/include/clang/Analysis/CFG.h | 3 + .../include/clang/Analysis/FlowSensitive/ASTOps.h | 156 + .../clang/Analysis/FlowSensitive/AdornedCFG.h | 96 + .../clang/Analysis/FlowSensitive/CNFFormula.h | 179 + .../Analysis/FlowSensitive/ControlFlowContext.h | 79 - .../Analysis/FlowSensitive/DataflowAnalysis.h | 200 +- .../FlowSensitive/DataflowAnalysisContext.h | 75 +- .../Analysis/FlowSensitive/DataflowEnvironment.h | 323 +- .../clang/Analysis/FlowSensitive/DataflowLattice.h | 8 +- .../clang/Analysis/FlowSensitive/DataflowValues.h | 12 +- .../include/clang/Analysis/FlowSensitive/Logger.h | 6 +- .../clang/Analysis/FlowSensitive/RecordOps.h | 6 +- .../include/clang/Analysis/FlowSensitive/Solver.h | 3 + .../clang/Analysis/FlowSensitive/Transfer.h | 9 +- .../FlowSensitive/TypeErasedDataflowAnalysis.h | 25 +- .../include/clang/Analysis/FlowSensitive/Value.h | 41 - .../Analysis/FlowSensitive/WatchedLiteralsSolver.h | 10 +- .../clang/include/clang/Analysis/PathDiagnostic.h | 8 +- .../clang/include/clang/Analysis/SelectorExtras.h | 4 +- .../clang/include/clang/Basic/AMDGPUTypes.def | 21 + .../include/clang/Basic/ASTSourceDescriptor.h | 52 + .../clang/include/clang/Basic/AllDiagnostics.h | 1 + .../llvm-project/clang/include/clang/Basic/Attr.td | 508 +- .../clang/include/clang/Basic/AttrDocs.td | 449 +- .../include/clang/Basic/AttributeCommonInfo.h | 6 +- .../clang/include/clang/Basic/Builtins.def | 1705 +- .../clang/include/clang/Basic/Builtins.h | 7 +- .../clang/include/clang/Basic/Builtins.td | 4770 ++++ .../clang/include/clang/Basic/BuiltinsAArch64.def | 15 +- .../clang/include/clang/Basic/BuiltinsAMDGPU.def | 82 +- .../clang/include/clang/Basic/BuiltinsBPF.def | 33 - .../clang/include/clang/Basic/BuiltinsBPF.td | 37 + .../clang/include/clang/Basic/BuiltinsBase.td | 127 + .../clang/include/clang/Basic/BuiltinsNVPTX.def | 20 +- .../clang/include/clang/Basic/BuiltinsRISCV.def | 93 - .../clang/include/clang/Basic/BuiltinsRISCV.td | 148 + .../include/clang/Basic/BuiltinsWebAssembly.def | 12 + .../clang/include/clang/Basic/BuiltinsX86.def | 66 +- .../clang/include/clang/Basic/CharInfo.h | 36 +- .../clang/include/clang/Basic/CodeGenOptions.def | 12 +- .../clang/include/clang/Basic/CodeGenOptions.h | 19 +- .../llvm-project/clang/include/clang/Basic/Cuda.h | 51 +- .../include/clang/Basic/CustomizableOptional.h | 8 - .../clang/include/clang/Basic/DarwinSDKInfo.h | 24 + .../clang/include/clang/Basic/DebugOptions.def | 5 + .../clang/include/clang/Basic/DeclNodes.td | 2 +- .../clang/include/clang/Basic/Diagnostic.td | 1 + .../include/clang/Basic/DiagnosticASTKinds.td | 2 + .../include/clang/Basic/DiagnosticCommonKinds.td | 25 +- .../include/clang/Basic/DiagnosticDriverKinds.td | 93 +- .../include/clang/Basic/DiagnosticFrontendKinds.td | 49 +- .../clang/include/clang/Basic/DiagnosticGroups.td | 131 +- .../clang/include/clang/Basic/DiagnosticIDs.h | 9 +- .../include/clang/Basic/DiagnosticInstallAPI.h | 26 + .../clang/Basic/DiagnosticInstallAPIKinds.td | 77 + .../include/clang/Basic/DiagnosticLexKinds.td | 45 +- .../clang/include/clang/Basic/DiagnosticOptions.h | 2 +- .../include/clang/Basic/DiagnosticParseKinds.td | 64 +- .../include/clang/Basic/DiagnosticSemaKinds.td | 669 +- .../clang/Basic/DiagnosticSerializationKinds.td | 5 + .../clang/include/clang/Basic/DirectoryEntry.h | 7 - .../clang/include/clang/Basic/Features.def | 18 +- .../clang/include/clang/Basic/FileEntry.h | 10 - .../clang/include/clang/Basic/FileManager.h | 29 +- .../clang/include/clang/Basic/IdentifierTable.h | 164 +- .../clang/include/clang/Basic/LangOptions.def | 36 +- .../clang/include/clang/Basic/LangOptions.h | 114 +- .../clang/include/clang/Basic/LangStandard.h | 41 +- .../clang/include/clang/Basic/LangStandards.def | 9 + .../clang/include/clang/Basic/MSP430Target.def | 583 +- .../clang/include/clang/Basic/Module.h | 50 +- .../clang/include/clang/Basic/OpenACCClauses.def | 58 + .../clang/include/clang/Basic/OpenACCKinds.h | 166 +- .../include/clang/Basic/OpenCLExtensionTypes.def | 2 +- .../clang/include/clang/Basic/OpenMPKinds.h | 14 + .../clang/include/clang/Basic/PointerAuthOptions.h | 193 + .../clang/include/clang/Basic/RISCVVTypes.def | 8 +- .../clang/include/clang/Basic/Sanitizers.def | 23 +- .../clang/include/clang/Basic/SourceLocation.h | 1 + .../clang/include/clang/Basic/SourceManager.h | 56 +- .../clang/include/clang/Basic/Specifiers.h | 54 +- .../clang/include/clang/Basic/StmtNodes.td | 13 +- .../clang/include/clang/Basic/SyncScope.h | 3 +- .../clang/include/clang/Basic/TargetBuiltins.h | 4 +- .../clang/include/clang/Basic/TargetCXXABI.h | 2 +- .../clang/include/clang/Basic/TargetInfo.h | 124 +- .../clang/include/clang/Basic/TargetOSMacros.def | 5 +- .../llvm-project/clang/include/clang/Basic/Thunk.h | 15 +- .../clang/include/clang/Basic/TokenKinds.def | 95 +- .../clang/include/clang/Basic/TokenKinds.h | 10 +- .../clang/include/clang/Basic/TypeNodes.td | 4 + .../clang/include/clang/Basic/Visibility.h | 3 + .../clang/include/clang/Basic/arm_fp16.td | 2 +- .../clang/include/clang/Basic/arm_neon.td | 125 +- .../clang/include/clang/Basic/arm_neon_incl.td | 4 +- .../clang/include/clang/Basic/arm_sme.td | 210 +- .../clang/include/clang/Basic/arm_sve.td | 1787 +- .../clang/include/clang/Basic/arm_sve_sme_incl.td | 7 +- .../include/clang/Basic/riscv_sifive_vector.td | 29 +- .../clang/include/clang/Basic/riscv_vector.td | 145 +- .../include/clang/CIR/Dialect/IR/CIRDialect.h | 16 + .../include/clang/CIR/Dialect/IR/CIRDialect.td | 44 + .../clang/include/clang/CIR/Dialect/IR/CIROps.td | 19 + .../clang/include/clang/CodeGen/CGFunctionInfo.h | 11 + .../clang/include/clang/CodeGen/CodeGenABITypes.h | 8 + .../clang/include/clang/CodeGen/CodeGenAction.h | 2 + .../include/clang/CodeGen/ConstantInitBuilder.h | 10 +- .../clang/include/clang/CodeGen/ModuleBuilder.h | 4 + .../clang/include/clang/Driver/ClangOptionDocs.td | 3 +- .../clang/include/clang/Driver/Distro.h | 3 +- .../clang/include/clang/Driver/Driver.h | 54 +- .../clang/include/clang/Driver/OffloadBundler.h | 23 +- .../clang/include/clang/Driver/Options.td | 671 +- .../clang/include/clang/Driver/SanitizerArgs.h | 3 + .../clang/include/clang/Driver/ToolChain.h | 20 +- .../clang/include/clang/Driver/Types.def | 1 + .../clang/Driver/aarch64-mlr-for-calls-only.c | 3 + .../clang/include/clang/ExtractAPI/API.h | 1629 +- .../clang/include/clang/ExtractAPI/APIRecords.inc | 115 + .../include/clang/ExtractAPI/AvailabilityInfo.h | 76 - .../clang/ExtractAPI/DeclarationFragments.h | 118 +- .../clang/ExtractAPI/ExtractAPIActionBase.h | 8 +- .../include/clang/ExtractAPI/ExtractAPIVisitor.h | 789 +- .../include/clang/ExtractAPI/FrontendActions.h | 6 - .../clang/ExtractAPI/Serialization/APISetVisitor.h | 172 + .../ExtractAPI/Serialization/SerializerBase.h | 314 - .../Serialization/SymbolGraphSerializer.h | 258 +- .../clang/include/clang/Format/Format.h | 415 +- .../clang/include/clang/Frontend/ASTUnit.h | 25 +- .../include/clang/Frontend/CompilerInstance.h | 42 + .../include/clang/Frontend/CompilerInvocation.h | 15 + .../clang/include/clang/Frontend/FrontendActions.h | 23 +- .../clang/include/clang/Frontend/FrontendOptions.h | 58 +- .../include/clang/Frontend/MultiplexConsumer.h | 6 +- .../include/clang/Frontend/PrecompiledPreamble.h | 4 +- .../clang/Frontend/PreprocessorOutputOptions.h | 3 + .../clang/Frontend/SerializedDiagnosticReader.h | 7 +- .../clang/include/clang/Frontend/TextDiagnostic.h | 18 +- .../clang/include/clang/InstallAPI/Context.h | 103 + .../include/clang/InstallAPI/DirectoryScanner.h | 81 + .../clang/include/clang/InstallAPI/DylibVerifier.h | 228 + .../clang/include/clang/InstallAPI/FileList.h | 43 + .../clang/include/clang/InstallAPI/Frontend.h | 50 + .../include/clang/InstallAPI/FrontendRecords.h | 113 + .../clang/include/clang/InstallAPI/HeaderFile.h | 167 + .../clang/InstallAPI/InstallAPIDiagnostic.h | 14 + .../clang/include/clang/InstallAPI/Library.h | 65 + .../clang/include/clang/InstallAPI/MachO.h | 54 + .../clang/include/clang/InstallAPI/Visitor.h | 89 + .../clang/include/clang/Interpreter/Interpreter.h | 53 +- .../clang/include/clang/Interpreter/Value.h | 1 + .../include/clang/Lex/ExternalPreprocessorSource.h | 59 +- .../clang/include/clang/Lex/HeaderSearch.h | 79 +- .../clang/include/clang/Lex/HeaderSearchOptions.h | 23 +- .../clang/include/clang/Lex/LiteralSupport.h | 13 +- .../clang/include/clang/Lex/MacroInfo.h | 8 +- .../clang/include/clang/Lex/ModuleMap.h | 15 +- .../clang/include/clang/Lex/PPCallbacks.h | 70 +- .../clang/include/clang/Lex/PPDirectiveParameter.h | 33 + .../clang/include/clang/Lex/PPEmbedParameters.h | 93 + .../clang/include/clang/Lex/PreprocessingRecord.h | 3 +- .../clang/include/clang/Lex/Preprocessor.h | 151 +- .../clang/include/clang/Lex/PreprocessorOptions.h | 30 +- .../llvm-project/clang/include/clang/Lex/Token.h | 5 +- .../clang/include/clang/Parse/Parser.h | 358 +- .../include/clang/Parse/RAIIObjectsForParser.h | 2 +- .../clang/include/clang/Rewrite/Core/HTMLRewrite.h | 15 +- .../include/clang/Sema/AnalysisBasedWarnings.h | 4 + .../llvm-project/clang/include/clang/Sema/Attr.h | 192 + .../include/clang/Sema/CodeCompleteConsumer.h | 10 +- .../clang/include/clang/Sema/CodeCompleteOptions.h | 9 + .../clang/include/clang/Sema/DeclSpec.h | 156 +- .../clang/include/clang/Sema/DelayedDiagnostic.h | 2 + .../include/clang/Sema/HLSLExternalSemaSource.h | 1 - .../clang/include/clang/Sema/Initialization.h | 4 +- .../llvm-project/clang/include/clang/Sema/Lookup.h | 47 +- .../clang/Sema/MultiplexExternalSemaSource.h | 2 +- .../clang/include/clang/Sema/Overload.h | 60 +- .../clang/include/clang/Sema/ParsedAttr.h | 66 +- .../clang/include/clang/Sema/ParsedTemplate.h | 7 +- .../clang/include/clang/Sema/Redeclaration.h | 31 + .../llvm-project/clang/include/clang/Sema/Scope.h | 59 + .../clang/include/clang/Sema/ScopeInfo.h | 37 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 25015 ++++++++++--------- .../clang/include/clang/Sema/SemaAMDGPU.h | 68 + .../clang/include/clang/Sema/SemaARM.h | 77 + .../clang/include/clang/Sema/SemaAVR.h | 32 + .../clang/include/clang/Sema/SemaBPF.h | 35 + .../clang/include/clang/Sema/SemaBase.h | 227 + .../clang/include/clang/Sema/SemaCUDA.h | 304 + .../clang/include/clang/Sema/SemaCodeCompletion.h | 237 + .../clang/include/clang/Sema/SemaConcept.h | 193 +- .../clang/include/clang/Sema/SemaHLSL.h | 68 + .../clang/include/clang/Sema/SemaHexagon.h | 29 + .../clang/include/clang/Sema/SemaInternal.h | 4 - .../clang/include/clang/Sema/SemaLoongArch.h | 30 + .../clang/include/clang/Sema/SemaM68k.h | 30 + .../clang/include/clang/Sema/SemaMIPS.h | 37 + .../clang/include/clang/Sema/SemaMSP430.h | 30 + .../clang/include/clang/Sema/SemaNVPTX.h | 30 + .../clang/include/clang/Sema/SemaObjC.h | 1085 + .../clang/include/clang/Sema/SemaOpenACC.h | 463 + .../clang/include/clang/Sema/SemaOpenCL.h | 107 + .../clang/include/clang/Sema/SemaOpenMP.h | 1457 ++ .../clang/include/clang/Sema/SemaPPC.h | 58 + .../clang/include/clang/Sema/SemaPseudoObject.h | 40 + .../clang/include/clang/Sema/SemaRISCV.h | 57 + .../clang/include/clang/Sema/SemaSYCL.h | 69 + .../clang/include/clang/Sema/SemaSwift.h | 59 + .../clang/include/clang/Sema/SemaSystemZ.h | 28 + .../clang/include/clang/Sema/SemaWasm.h | 52 + .../clang/include/clang/Sema/SemaX86.h | 44 + .../clang/include/clang/Sema/Template.h | 1 + .../clang/include/clang/Sema/TemplateDeduction.h | 5 + .../include/clang/Serialization/ASTBitCodes.h | 352 +- .../Serialization/ASTDeserializationListener.h | 4 +- .../clang/include/clang/Serialization/ASTReader.h | 300 +- .../include/clang/Serialization/ASTRecordReader.h | 31 +- .../include/clang/Serialization/ASTRecordWriter.h | 17 + .../clang/include/clang/Serialization/ASTWriter.h | 183 +- .../clang/include/clang/Serialization/ModuleFile.h | 45 +- .../clang/Serialization/ModuleFileExtension.h | 1 - .../include/clang/Serialization/ModuleManager.h | 3 +- .../clang/Serialization/PCHContainerOperations.h | 4 +- .../clang/Serialization/SourceLocationEncoding.h | 91 +- .../include/clang/Serialization/TypeBitCodes.def | 3 + .../clang/StaticAnalyzer/Checkers/Checkers.td | 129 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.def | 52 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.h | 9 +- .../StaticAnalyzer/Core/BugReporter/BugReporter.h | 12 + .../Core/BugReporter/BugReporterVisitors.h | 26 +- .../Core/BugReporter/BugSuppression.h | 5 + .../Core/BugReporter/Z3CrosscheckVisitor.h | 92 + .../clang/StaticAnalyzer/Core/CheckerManager.h | 2 +- .../StaticAnalyzer/Core/PathDiagnosticConsumers.h | 2 +- .../Core/PathSensitive/CallDescription.h | 84 +- .../StaticAnalyzer/Core/PathSensitive/CallEvent.h | 72 + .../Core/PathSensitive/CheckerContext.h | 24 +- .../Core/PathSensitive/CheckerHelpers.h | 4 + .../StaticAnalyzer/Core/PathSensitive/CoreEngine.h | 18 +- .../StaticAnalyzer/Core/PathSensitive/ExprEngine.h | 14 +- .../StaticAnalyzer/Core/PathSensitive/MemRegion.h | 9 +- .../Core/PathSensitive/ProgramState.h | 16 +- .../Core/PathSensitive/SMTConstraintManager.h | 5 +- .../Core/PathSensitive/SValBuilder.h | 12 +- .../StaticAnalyzer/Core/PathSensitive/SVals.h | 8 - .../StaticAnalyzer/Core/PathSensitive/Store.h | 14 +- .../include/clang/Support/RISCVVIntrinsicUtils.h | 9 +- .../clang/include/clang/Testing/CommandLineArgs.h | 1 + .../clang/include/clang/Testing/TestAST.h | 4 + .../clang/include/clang/Testing/TestClangConfig.h | 16 +- .../include/clang/Tooling/CommonOptionsParser.h | 15 +- .../DependencyScanningFilesystem.h | 105 +- .../DependencyScanning/DependencyScanningService.h | 14 +- .../DependencyScanning/ModuleDepCollector.h | 18 +- .../clang/Tooling/Inclusions/IncludeStyle.h | 23 + .../include/clang/Tooling/NodeIntrospection.h | 101 - .../clang/include/clang/Tooling/Syntax/Tokens.h | 4 +- .../clang/Tooling/Transformer/RangeSelector.h | 5 + .../llvm-project/clang/include/module.modulemap | 20 +- .../clang/lib/APINotes/APINotesFormat.h | 107 +- .../clang/lib/APINotes/APINotesManager.cpp | 8 +- .../clang/lib/APINotes/APINotesReader.cpp | 426 +- .../clang/lib/APINotes/APINotesTypes.cpp | 2 +- .../clang/lib/APINotes/APINotesWriter.cpp | 199 +- .../clang/lib/APINotes/APINotesYAMLCompiler.cpp | 173 +- .../llvm-project/clang/lib/ARCMigrate/ARCMT.cpp | 3 +- .../llvm-project/clang/lib/ARCMigrate/ObjCMT.cpp | 12 +- .../clang/lib/ARCMigrate/TransAPIUses.cpp | 2 +- .../clang/lib/ARCMigrate/TransGCAttrs.cpp | 2 +- .../clang/lib/ARCMigrate/TransUnbridgedCasts.cpp | 2 +- .../clang/lib/ARCMigrate/Transforms.cpp | 5 +- contrib/llvm-project/clang/lib/AST/APValue.cpp | 8 +- contrib/llvm-project/clang/lib/AST/ASTConcept.cpp | 36 +- contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 984 +- .../llvm-project/clang/lib/AST/ASTDiagnostic.cpp | 111 +- contrib/llvm-project/clang/lib/AST/ASTDumper.cpp | 51 +- contrib/llvm-project/clang/lib/AST/ASTImporter.cpp | 398 +- .../clang/lib/AST/ASTStructuralEquivalence.cpp | 45 +- .../llvm-project/clang/lib/AST/ASTTypeTraits.cpp | 2 + .../llvm-project/clang/lib/AST/AttrDocTable.cpp | 2 +- .../AvailabilityInfo.cpp => AST/Availability.cpp} | 27 +- .../llvm-project/clang/lib/AST/CommentParser.cpp | 171 + .../clang/lib/AST/ComparisonCategories.cpp | 16 +- .../clang/lib/AST/ComputeDependence.cpp | 43 +- contrib/llvm-project/clang/lib/AST/Decl.cpp | 294 +- contrib/llvm-project/clang/lib/AST/DeclBase.cpp | 98 +- contrib/llvm-project/clang/lib/AST/DeclCXX.cpp | 215 +- contrib/llvm-project/clang/lib/AST/DeclFriend.cpp | 2 +- contrib/llvm-project/clang/lib/AST/DeclObjC.cpp | 123 +- contrib/llvm-project/clang/lib/AST/DeclOpenMP.cpp | 14 +- contrib/llvm-project/clang/lib/AST/DeclPrinter.cpp | 281 +- .../llvm-project/clang/lib/AST/DeclTemplate.cpp | 393 +- contrib/llvm-project/clang/lib/AST/Expr.cpp | 237 +- contrib/llvm-project/clang/lib/AST/ExprCXX.cpp | 118 +- .../clang/lib/AST/ExprClassification.cpp | 15 +- .../llvm-project/clang/lib/AST/ExprConstShared.h | 10 + .../llvm-project/clang/lib/AST/ExprConstant.cpp | 926 +- .../clang/lib/AST/ExternalASTSource.cpp | 6 +- .../llvm-project/clang/lib/AST/FormatString.cpp | 54 +- .../llvm-project/clang/lib/AST/Interp/Boolean.h | 15 +- .../clang/lib/AST/Interp/ByteCodeEmitter.cpp | 111 +- .../clang/lib/AST/Interp/ByteCodeEmitter.h | 9 +- .../clang/lib/AST/Interp/ByteCodeExprGen.cpp | 3088 --- .../clang/lib/AST/Interp/ByteCodeGenError.h | 46 - .../clang/lib/AST/Interp/ByteCodeStmtGen.cpp | 680 - .../clang/lib/AST/Interp/ByteCodeStmtGen.h | 91 - .../llvm-project/clang/lib/AST/Interp/Compiler.cpp | 5599 +++++ .../AST/Interp/{ByteCodeExprGen.h => Compiler.h} | 408 +- .../llvm-project/clang/lib/AST/Interp/Context.cpp | 169 +- .../llvm-project/clang/lib/AST/Interp/Context.h | 26 +- .../clang/lib/AST/Interp/Descriptor.cpp | 164 +- .../llvm-project/clang/lib/AST/Interp/Descriptor.h | 66 +- .../llvm-project/clang/lib/AST/Interp/Disasm.cpp | 315 +- .../clang/lib/AST/Interp/DynamicAllocator.cpp | 118 + .../clang/lib/AST/Interp/DynamicAllocator.h | 102 + .../clang/lib/AST/Interp/EvalEmitter.cpp | 126 +- .../clang/lib/AST/Interp/EvalEmitter.h | 31 +- .../clang/lib/AST/Interp/EvaluationResult.cpp | 152 +- .../clang/lib/AST/Interp/EvaluationResult.h | 22 +- .../llvm-project/clang/lib/AST/Interp/Floating.h | 2 +- .../llvm-project/clang/lib/AST/Interp/Function.cpp | 3 +- .../llvm-project/clang/lib/AST/Interp/Function.h | 21 +- .../clang/lib/AST/Interp/FunctionPointer.h | 36 +- .../llvm-project/clang/lib/AST/Interp/Integral.h | 10 +- .../llvm-project/clang/lib/AST/Interp/IntegralAP.h | 39 +- .../llvm-project/clang/lib/AST/Interp/Interp.cpp | 563 +- contrib/llvm-project/clang/lib/AST/Interp/Interp.h | 1279 +- .../clang/lib/AST/Interp/InterpBlock.cpp | 11 +- .../clang/lib/AST/Interp/InterpBlock.h | 50 +- .../clang/lib/AST/Interp/InterpBuiltin.cpp | 933 +- .../clang/lib/AST/Interp/InterpFrame.cpp | 62 +- .../clang/lib/AST/Interp/InterpFrame.h | 16 +- .../clang/lib/AST/Interp/InterpShared.cpp | 42 + .../clang/lib/AST/Interp/InterpShared.h | 26 + .../clang/lib/AST/Interp/InterpStack.cpp | 1 + .../clang/lib/AST/Interp/InterpStack.h | 4 +- .../clang/lib/AST/Interp/InterpState.cpp | 33 +- .../clang/lib/AST/Interp/InterpState.h | 29 +- .../clang/lib/AST/Interp/MemberPointer.cpp | 76 + .../clang/lib/AST/Interp/MemberPointer.h | 112 + .../llvm-project/clang/lib/AST/Interp/Opcodes.td | 216 +- .../llvm-project/clang/lib/AST/Interp/Pointer.cpp | 404 +- .../llvm-project/clang/lib/AST/Interp/Pointer.h | 456 +- .../llvm-project/clang/lib/AST/Interp/PrimType.cpp | 1 + .../llvm-project/clang/lib/AST/Interp/PrimType.h | 62 +- .../llvm-project/clang/lib/AST/Interp/Program.cpp | 165 +- .../llvm-project/clang/lib/AST/Interp/Program.h | 12 +- .../llvm-project/clang/lib/AST/Interp/Record.cpp | 21 +- contrib/llvm-project/clang/lib/AST/Interp/Record.h | 21 +- .../llvm-project/clang/lib/AST/Interp/Source.cpp | 2 +- .../llvm-project/clang/lib/AST/Interp/State.cpp | 5 +- .../llvm-project/clang/lib/AST/ItaniumMangle.cpp | 144 +- .../llvm-project/clang/lib/AST/JSONNodeDumper.cpp | 71 +- contrib/llvm-project/clang/lib/AST/Linkage.h | 3 + contrib/llvm-project/clang/lib/AST/Mangle.cpp | 28 +- .../llvm-project/clang/lib/AST/MicrosoftMangle.cpp | 263 +- contrib/llvm-project/clang/lib/AST/NSAPI.cpp | 109 +- .../clang/lib/AST/NestedNameSpecifier.cpp | 18 +- .../llvm-project/clang/lib/AST/ODRDiagsEmitter.cpp | 19 +- contrib/llvm-project/clang/lib/AST/ODRHash.cpp | 25 +- .../llvm-project/clang/lib/AST/OpenACCClause.cpp | 552 + .../llvm-project/clang/lib/AST/OpenMPClause.cpp | 2 + contrib/llvm-project/clang/lib/AST/ParentMap.cpp | 7 +- .../clang/lib/AST/ParentMapContext.cpp | 25 +- .../clang/lib/AST/PrintfFormatString.cpp | 95 +- .../llvm-project/clang/lib/AST/QualTypeNames.cpp | 9 +- .../clang/lib/AST/RecordLayoutBuilder.cpp | 12 + .../clang/lib/AST/ScanfFormatString.cpp | 4 +- .../clang/lib/AST/SelectorLocationsKind.cpp | 4 +- contrib/llvm-project/clang/lib/AST/Stmt.cpp | 1 + contrib/llvm-project/clang/lib/AST/StmtOpenACC.cpp | 125 + contrib/llvm-project/clang/lib/AST/StmtOpenMP.cpp | 43 +- contrib/llvm-project/clang/lib/AST/StmtPrinter.cpp | 66 +- contrib/llvm-project/clang/lib/AST/StmtProfile.cpp | 210 +- .../llvm-project/clang/lib/AST/TemplateBase.cpp | 21 +- .../llvm-project/clang/lib/AST/TemplateName.cpp | 115 +- .../llvm-project/clang/lib/AST/TextNodeDumper.cpp | 321 +- contrib/llvm-project/clang/lib/AST/Type.cpp | 664 +- contrib/llvm-project/clang/lib/AST/TypeLoc.cpp | 18 +- contrib/llvm-project/clang/lib/AST/TypePrinter.cpp | 179 +- contrib/llvm-project/clang/lib/AST/VTTBuilder.cpp | 2 +- .../llvm-project/clang/lib/AST/VTableBuilder.cpp | 105 +- .../clang/lib/ASTMatchers/Dynamic/Marshallers.cpp | 4 +- .../clang/lib/ASTMatchers/Dynamic/Marshallers.h | 4 +- .../clang/lib/ASTMatchers/Dynamic/Registry.cpp | 1 + contrib/llvm-project/clang/lib/Analysis/CFG.cpp | 9 +- .../clang/lib/Analysis/CalledOnceCheck.cpp | 5 +- .../clang/lib/Analysis/ExprMutationAnalyzer.cpp | 168 +- .../clang/lib/Analysis/FlowSensitive/ASTOps.cpp | 287 + .../lib/Analysis/FlowSensitive/AdornedCFG.cpp | 183 + .../lib/Analysis/FlowSensitive/CNFFormula.cpp | 303 + .../Analysis/FlowSensitive/ControlFlowContext.cpp | 121 - .../FlowSensitive/DataflowAnalysisContext.cpp | 73 +- .../Analysis/FlowSensitive/DataflowEnvironment.cpp | 991 +- .../lib/Analysis/FlowSensitive/DebugSupport.cpp | 2 - .../lib/Analysis/FlowSensitive/HTMLLogger.cpp | 129 +- .../lib/Analysis/FlowSensitive/HTMLLogger.css | 10 + .../lib/Analysis/FlowSensitive/HTMLLogger.html | 1 + .../clang/lib/Analysis/FlowSensitive/Logger.cpp | 8 +- .../Models/UncheckedOptionalAccessModel.cpp | 279 +- .../clang/lib/Analysis/FlowSensitive/RecordOps.cpp | 97 +- .../clang/lib/Analysis/FlowSensitive/Transfer.cpp | 361 +- .../FlowSensitive/TypeErasedDataflowAnalysis.cpp | 261 +- .../clang/lib/Analysis/FlowSensitive/Value.cpp | 2 - .../FlowSensitive/WatchedLiteralsSolver.cpp | 482 +- .../clang/lib/Analysis/MacroExpansionContext.cpp | 2 +- .../clang/lib/Analysis/ObjCNoReturn.cpp | 5 +- .../clang/lib/Analysis/PathDiagnostic.cpp | 7 +- .../clang/lib/Analysis/ReachableCode.cpp | 51 +- .../clang/lib/Analysis/ThreadSafetyCommon.cpp | 8 +- .../clang/lib/Analysis/UninitializedValues.cpp | 2 +- .../clang/lib/Analysis/UnsafeBufferUsage.cpp | 1173 +- .../clang/lib/Basic/ASTSourceDescriptor.cpp | 33 + .../llvm-project/clang/lib/Basic/Attributes.cpp | 8 +- contrib/llvm-project/clang/lib/Basic/Builtins.cpp | 7 +- contrib/llvm-project/clang/lib/Basic/CharInfo.cpp | 20 +- contrib/llvm-project/clang/lib/Basic/Cuda.cpp | 111 +- .../llvm-project/clang/lib/Basic/Diagnostic.cpp | 8 +- .../llvm-project/clang/lib/Basic/DiagnosticIDs.cpp | 27 +- .../llvm-project/clang/lib/Basic/FileManager.cpp | 104 +- .../clang/lib/Basic/IdentifierTable.cpp | 39 +- .../llvm-project/clang/lib/Basic/LangOptions.cpp | 4 +- .../llvm-project/clang/lib/Basic/LangStandards.cpp | 13 + contrib/llvm-project/clang/lib/Basic/Module.cpp | 41 +- .../llvm-project/clang/lib/Basic/OpenMPKinds.cpp | 379 +- contrib/llvm-project/clang/lib/Basic/Sarif.cpp | 3 +- .../llvm-project/clang/lib/Basic/SourceManager.cpp | 45 +- .../llvm-project/clang/lib/Basic/TargetInfo.cpp | 15 + contrib/llvm-project/clang/lib/Basic/Targets.cpp | 7 +- .../clang/lib/Basic/Targets/AArch64.cpp | 262 +- .../llvm-project/clang/lib/Basic/Targets/AArch64.h | 21 +- .../clang/lib/Basic/Targets/AMDGPU.cpp | 75 +- .../llvm-project/clang/lib/Basic/Targets/AMDGPU.h | 14 +- .../llvm-project/clang/lib/Basic/Targets/ARM.cpp | 11 +- contrib/llvm-project/clang/lib/Basic/Targets/ARM.h | 21 +- contrib/llvm-project/clang/lib/Basic/Targets/AVR.h | 4 + .../llvm-project/clang/lib/Basic/Targets/BPF.cpp | 6 +- contrib/llvm-project/clang/lib/Basic/Targets/BPF.h | 4 + .../llvm-project/clang/lib/Basic/Targets/CSKY.cpp | 3 +- .../llvm-project/clang/lib/Basic/Targets/CSKY.h | 2 +- .../llvm-project/clang/lib/Basic/Targets/DirectX.h | 1 - .../clang/lib/Basic/Targets/Hexagon.cpp | 12 + .../llvm-project/clang/lib/Basic/Targets/Hexagon.h | 10 + .../clang/lib/Basic/Targets/LoongArch.cpp | 33 +- .../clang/lib/Basic/Targets/LoongArch.h | 5 +- .../llvm-project/clang/lib/Basic/Targets/M68k.cpp | 11 +- .../llvm-project/clang/lib/Basic/Targets/M68k.h | 5 + .../llvm-project/clang/lib/Basic/Targets/Mips.cpp | 28 + .../llvm-project/clang/lib/Basic/Targets/Mips.h | 42 +- .../llvm-project/clang/lib/Basic/Targets/NVPTX.cpp | 163 +- .../llvm-project/clang/lib/Basic/Targets/NVPTX.h | 25 +- .../clang/lib/Basic/Targets/OSTargets.h | 1 + .../llvm-project/clang/lib/Basic/Targets/PPC.cpp | 106 +- contrib/llvm-project/clang/lib/Basic/Targets/PPC.h | 40 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.cpp | 23 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.h | 10 +- .../llvm-project/clang/lib/Basic/Targets/SPIR.cpp | 75 + .../llvm-project/clang/lib/Basic/Targets/SPIR.h | 66 +- .../llvm-project/clang/lib/Basic/Targets/Sparc.h | 4 + .../clang/lib/Basic/Targets/SystemZ.cpp | 10 + .../llvm-project/clang/lib/Basic/Targets/SystemZ.h | 16 +- contrib/llvm-project/clang/lib/Basic/Targets/VE.h | 1 + .../clang/lib/Basic/Targets/WebAssembly.cpp | 197 +- .../clang/lib/Basic/Targets/WebAssembly.h | 21 +- .../llvm-project/clang/lib/Basic/Targets/X86.cpp | 122 +- contrib/llvm-project/clang/lib/Basic/Targets/X86.h | 40 +- .../llvm-project/clang/lib/Basic/TypeTraits.cpp | 10 + .../clang/lib/CIR/Dialect/IR/CIRDialect.cpp | 13 + contrib/llvm-project/clang/lib/CodeGen/ABIInfo.cpp | 62 +- contrib/llvm-project/clang/lib/CodeGen/ABIInfo.h | 24 +- .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp | 76 +- .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.h | 23 +- contrib/llvm-project/clang/lib/CodeGen/Address.h | 229 +- .../clang/lib/CodeGen/BackendConsumer.h | 17 +- .../llvm-project/clang/lib/CodeGen/BackendUtil.cpp | 113 +- .../llvm-project/clang/lib/CodeGen/CGAtomic.cpp | 499 +- .../llvm-project/clang/lib/CodeGen/CGBlocks.cpp | 78 +- contrib/llvm-project/clang/lib/CodeGen/CGBlocks.h | 3 +- contrib/llvm-project/clang/lib/CodeGen/CGBuilder.h | 247 +- .../llvm-project/clang/lib/CodeGen/CGBuiltin.cpp | 1575 +- .../llvm-project/clang/lib/CodeGen/CGCUDANV.cpp | 110 +- .../llvm-project/clang/lib/CodeGen/CGCUDARuntime.h | 5 + contrib/llvm-project/clang/lib/CodeGen/CGCXX.cpp | 11 +- .../llvm-project/clang/lib/CodeGen/CGCXXABI.cpp | 21 +- contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.h | 31 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 671 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.h | 28 +- contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp | 135 +- .../llvm-project/clang/lib/CodeGen/CGCleanup.cpp | 186 +- contrib/llvm-project/clang/lib/CodeGen/CGCleanup.h | 72 +- .../llvm-project/clang/lib/CodeGen/CGCoroutine.cpp | 166 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp | 371 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.h | 39 +- contrib/llvm-project/clang/lib/CodeGen/CGDecl.cpp | 182 +- .../llvm-project/clang/lib/CodeGen/CGDeclCXX.cpp | 25 +- .../llvm-project/clang/lib/CodeGen/CGException.cpp | 23 +- contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp | 691 +- .../llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 332 +- .../llvm-project/clang/lib/CodeGen/CGExprCXX.cpp | 228 +- .../clang/lib/CodeGen/CGExprComplex.cpp | 161 +- .../clang/lib/CodeGen/CGExprConstant.cpp | 492 +- .../clang/lib/CodeGen/CGExprScalar.cpp | 591 +- .../clang/lib/CodeGen/CGGPUBuiltin.cpp | 7 +- .../clang/lib/CodeGen/CGHLSLRuntime.cpp | 23 +- .../llvm-project/clang/lib/CodeGen/CGHLSLRuntime.h | 35 + .../llvm-project/clang/lib/CodeGen/CGLoopInfo.cpp | 15 +- .../llvm-project/clang/lib/CodeGen/CGLoopInfo.h | 7 +- .../clang/lib/CodeGen/CGNonTrivialStruct.cpp | 26 +- contrib/llvm-project/clang/lib/CodeGen/CGObjC.cpp | 92 +- .../llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp | 55 +- .../llvm-project/clang/lib/CodeGen/CGObjCMac.cpp | 142 +- .../clang/lib/CodeGen/CGObjCRuntime.cpp | 6 +- .../clang/lib/CodeGen/CGOpenMPRuntime.cpp | 495 +- .../clang/lib/CodeGen/CGOpenMPRuntime.h | 25 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 1574 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.h | 3 - .../clang/lib/CodeGen/CGPointerAuth.cpp | 621 + .../clang/lib/CodeGen/CGPointerAuthInfo.h | 99 + .../clang/lib/CodeGen/CGRecordLayout.h | 5 + .../clang/lib/CodeGen/CGRecordLayoutBuilder.cpp | 513 +- contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp | 332 +- .../clang/lib/CodeGen/CGStmtOpenMP.cpp | 498 +- contrib/llvm-project/clang/lib/CodeGen/CGVTT.cpp | 35 +- .../llvm-project/clang/lib/CodeGen/CGVTables.cpp | 63 +- contrib/llvm-project/clang/lib/CodeGen/CGVTables.h | 6 +- contrib/llvm-project/clang/lib/CodeGen/CGValue.h | 272 +- .../clang/lib/CodeGen/CodeGenAction.cpp | 168 +- .../clang/lib/CodeGen/CodeGenFunction.cpp | 264 +- .../clang/lib/CodeGen/CodeGenFunction.h | 569 +- .../clang/lib/CodeGen/CodeGenModule.cpp | 750 +- .../llvm-project/clang/lib/CodeGen/CodeGenModule.h | 105 +- .../llvm-project/clang/lib/CodeGen/CodeGenPGO.cpp | 266 +- .../llvm-project/clang/lib/CodeGen/CodeGenPGO.h | 20 +- .../llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp | 142 +- .../llvm-project/clang/lib/CodeGen/CodeGenTBAA.h | 16 +- .../clang/lib/CodeGen/CodeGenTypeCache.h | 2 +- .../clang/lib/CodeGen/CodeGenTypes.cpp | 78 +- .../llvm-project/clang/lib/CodeGen/CodeGenTypes.h | 25 +- .../clang/lib/CodeGen/ConstantEmitter.h | 12 +- .../clang/lib/CodeGen/ConstantInitBuilder.cpp | 18 + .../clang/lib/CodeGen/CoverageMappingGen.cpp | 626 +- .../clang/lib/CodeGen/CoverageMappingGen.h | 19 +- .../clang/lib/CodeGen/ItaniumCXXABI.cpp | 525 +- .../clang/lib/CodeGen/LinkInModulesPass.cpp | 16 +- .../clang/lib/CodeGen/LinkInModulesPass.h | 3 +- contrib/llvm-project/clang/lib/CodeGen/MCDCState.h | 49 + .../clang/lib/CodeGen/MacroPPCallbacks.cpp | 4 +- .../clang/lib/CodeGen/MacroPPCallbacks.h | 3 +- .../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 106 +- .../clang/lib/CodeGen/ModuleBuilder.cpp | 18 +- .../clang/lib/CodeGen/SwiftCallingConv.cpp | 2 +- .../llvm-project/clang/lib/CodeGen/TargetInfo.cpp | 22 + .../llvm-project/clang/lib/CodeGen/TargetInfo.h | 26 +- .../clang/lib/CodeGen/Targets/AArch64.cpp | 295 +- .../clang/lib/CodeGen/Targets/AMDGPU.cpp | 56 +- .../llvm-project/clang/lib/CodeGen/Targets/ARC.cpp | 10 +- .../llvm-project/clang/lib/CodeGen/Targets/ARM.cpp | 40 +- .../clang/lib/CodeGen/Targets/CSKY.cpp | 16 +- .../clang/lib/CodeGen/Targets/Hexagon.cpp | 15 +- .../clang/lib/CodeGen/Targets/LoongArch.cpp | 15 +- .../clang/lib/CodeGen/Targets/MSP430.cpp | 9 +- .../clang/lib/CodeGen/Targets/Mips.cpp | 29 +- .../clang/lib/CodeGen/Targets/NVPTX.cpp | 40 +- .../clang/lib/CodeGen/Targets/PNaCl.cpp | 13 +- .../llvm-project/clang/lib/CodeGen/Targets/PPC.cpp | 115 +- .../clang/lib/CodeGen/Targets/RISCV.cpp | 42 +- .../clang/lib/CodeGen/Targets/Sparc.cpp | 21 +- .../clang/lib/CodeGen/Targets/SystemZ.cpp | 26 +- .../clang/lib/CodeGen/Targets/WebAssembly.cpp | 10 +- .../llvm-project/clang/lib/CodeGen/Targets/X86.cpp | 97 +- .../clang/lib/CodeGen/Targets/XCore.cpp | 12 +- .../linux/DirectoryWatcher-linux.cpp | 9 +- contrib/llvm-project/clang/lib/Driver/Distro.cpp | 1 + contrib/llvm-project/clang/lib/Driver/Driver.cpp | 406 +- .../clang/lib/Driver/OffloadBundler.cpp | 237 +- .../clang/lib/Driver/SanitizerArgs.cpp | 36 +- .../llvm-project/clang/lib/Driver/ToolChain.cpp | 129 +- .../clang/lib/Driver/ToolChains/AIX.cpp | 124 +- .../llvm-project/clang/lib/Driver/ToolChains/AIX.h | 2 + .../clang/lib/Driver/ToolChains/AMDGPU.cpp | 46 +- .../clang/lib/Driver/ToolChains/AMDGPU.h | 6 + .../clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp | 10 +- .../clang/lib/Driver/ToolChains/Arch/AArch64.cpp | 50 +- .../clang/lib/Driver/ToolChains/Arch/AArch64.h | 3 + .../clang/lib/Driver/ToolChains/Arch/ARM.cpp | 53 +- .../clang/lib/Driver/ToolChains/Arch/LoongArch.cpp | 68 +- .../clang/lib/Driver/ToolChains/Arch/Mips.cpp | 19 + .../clang/lib/Driver/ToolChains/Arch/Mips.h | 2 +- .../clang/lib/Driver/ToolChains/Arch/PPC.cpp | 20 + .../clang/lib/Driver/ToolChains/Arch/RISCV.cpp | 77 +- .../clang/lib/Driver/ToolChains/Arch/RISCV.h | 4 +- .../clang/lib/Driver/ToolChains/Arch/Sparc.h | 2 +- .../clang/lib/Driver/ToolChains/Arch/SystemZ.cpp | 8 + .../clang/lib/Driver/ToolChains/Arch/X86.cpp | 26 +- .../clang/lib/Driver/ToolChains/BareMetal.cpp | 90 +- .../clang/lib/Driver/ToolChains/Clang.cpp | 941 +- .../clang/lib/Driver/ToolChains/Clang.h | 15 + .../clang/lib/Driver/ToolChains/CommonArgs.cpp | 500 +- .../clang/lib/Driver/ToolChains/CommonArgs.h | 19 +- .../clang/lib/Driver/ToolChains/Cuda.cpp | 228 +- .../clang/lib/Driver/ToolChains/Cuda.h | 17 +- .../clang/lib/Driver/ToolChains/Darwin.cpp | 188 +- .../clang/lib/Driver/ToolChains/Darwin.h | 19 +- .../clang/lib/Driver/ToolChains/DragonFly.cpp | 9 +- .../clang/lib/Driver/ToolChains/Flang.cpp | 121 +- .../clang/lib/Driver/ToolChains/Flang.h | 7 + .../clang/lib/Driver/ToolChains/FreeBSD.cpp | 17 +- .../clang/lib/Driver/ToolChains/Fuchsia.cpp | 23 +- .../clang/lib/Driver/ToolChains/Gnu.cpp | 90 +- .../clang/lib/Driver/ToolChains/HIPAMD.cpp | 51 +- .../clang/lib/Driver/ToolChains/HIPAMD.h | 4 + .../clang/lib/Driver/ToolChains/HIPSPV.cpp | 2 +- .../clang/lib/Driver/ToolChains/HIPUtility.cpp | 265 +- .../clang/lib/Driver/ToolChains/HLSL.cpp | 66 +- .../clang/lib/Driver/ToolChains/HLSL.h | 3 + .../clang/lib/Driver/ToolChains/Haiku.cpp | 11 +- .../clang/lib/Driver/ToolChains/Hexagon.cpp | 39 +- .../clang/lib/Driver/ToolChains/Linux.cpp | 57 +- .../clang/lib/Driver/ToolChains/Linux.h | 4 - .../clang/lib/Driver/ToolChains/MSVC.cpp | 25 +- .../clang/lib/Driver/ToolChains/MSVC.h | 5 +- .../clang/lib/Driver/ToolChains/MinGW.cpp | 38 +- .../clang/lib/Driver/ToolChains/MipsLinux.cpp | 7 +- .../clang/lib/Driver/ToolChains/NetBSD.cpp | 9 +- .../clang/lib/Driver/ToolChains/OHOS.cpp | 2 +- .../clang/lib/Driver/ToolChains/OpenBSD.cpp | 12 +- .../clang/lib/Driver/ToolChains/PS4CPU.cpp | 182 +- .../clang/lib/Driver/ToolChains/PS4CPU.h | 27 +- .../clang/lib/Driver/ToolChains/RISCVToolchain.cpp | 8 + .../clang/lib/Driver/ToolChains/RISCVToolchain.h | 2 + .../clang/lib/Driver/ToolChains/SPIRV.cpp | 12 +- .../clang/lib/Driver/ToolChains/Solaris.cpp | 6 +- .../clang/lib/Driver/ToolChains/WebAssembly.cpp | 108 +- .../clang/lib/Driver/ToolChains/ZOS.cpp | 9 +- .../clang/lib/Edit/RewriteObjCFoundationAPI.cpp | 11 +- contrib/llvm-project/clang/lib/ExtractAPI/API.cpp | 551 +- .../clang/lib/ExtractAPI/DeclarationFragments.cpp | 398 +- .../clang/lib/ExtractAPI/ExtractAPIConsumer.cpp | 119 +- .../Serialization/SymbolGraphSerializer.cpp | 988 +- .../ExtractAPI/TypedefUnderlyingTypeResolver.cpp | 6 +- .../clang/lib/Format/BreakableToken.cpp | 4 +- .../llvm-project/clang/lib/Format/BreakableToken.h | 3 - .../clang/lib/Format/ContinuationIndenter.cpp | 79 +- .../clang/lib/Format/ContinuationIndenter.h | 7 +- contrib/llvm-project/clang/lib/Format/Encoding.h | 1 - contrib/llvm-project/clang/lib/Format/Format.cpp | 317 +- .../llvm-project/clang/lib/Format/FormatInternal.h | 4 +- .../llvm-project/clang/lib/Format/FormatToken.cpp | 54 +- .../llvm-project/clang/lib/Format/FormatToken.h | 89 +- .../clang/lib/Format/FormatTokenLexer.cpp | 52 +- .../clang/lib/Format/FormatTokenLexer.h | 5 - .../clang/lib/Format/FormatTokenSource.h | 14 +- .../clang/lib/Format/MacroCallReconstructor.cpp | 68 +- .../clang/lib/Format/MacroExpander.cpp | 12 +- contrib/llvm-project/clang/lib/Format/Macros.h | 40 +- .../clang/lib/Format/QualifierAlignmentFixer.cpp | 29 +- .../clang/lib/Format/QualifierAlignmentFixer.h | 18 +- .../clang/lib/Format/SortJavaScriptImports.cpp | 18 +- .../clang/lib/Format/SortJavaScriptImports.h | 3 - .../clang/lib/Format/TokenAnalyzer.cpp | 4 +- .../llvm-project/clang/lib/Format/TokenAnalyzer.h | 12 +- .../clang/lib/Format/TokenAnnotator.cpp | 934 +- .../llvm-project/clang/lib/Format/TokenAnnotator.h | 13 +- .../clang/lib/Format/UnwrappedLineFormatter.cpp | 65 +- .../clang/lib/Format/UnwrappedLineFormatter.h | 2 - .../clang/lib/Format/UnwrappedLineParser.cpp | 365 +- .../clang/lib/Format/UnwrappedLineParser.h | 18 +- .../clang/lib/Format/WhitespaceManager.cpp | 136 +- .../clang/lib/Format/WhitespaceManager.h | 21 +- .../llvm-project/clang/lib/Frontend/ASTUnit.cpp | 31 +- .../clang/lib/Frontend/CompilerInstance.cpp | 148 +- .../clang/lib/Frontend/CompilerInvocation.cpp | 280 +- .../clang/lib/Frontend/DependencyFile.cpp | 28 +- .../clang/lib/Frontend/DependencyGraph.cpp | 31 +- .../clang/lib/Frontend/FrontendAction.cpp | 27 +- .../clang/lib/Frontend/FrontendActions.cpp | 62 +- .../clang/lib/Frontend/FrontendOptions.cpp | 1 + .../clang/lib/Frontend/InitPreprocessor.cpp | 268 +- .../Frontend/InterfaceStubFunctionsConsumer.cpp | 5 +- .../lib/Frontend/ModuleDependencyCollector.cpp | 5 +- .../clang/lib/Frontend/MultiplexConsumer.cpp | 37 +- .../clang/lib/Frontend/PrecompiledPreamble.cpp | 7 +- .../clang/lib/Frontend/PrintPreprocessedOutput.cpp | 133 +- .../lib/Frontend/Rewrite/InclusionRewriter.cpp | 10 +- .../lib/Frontend/Rewrite/RewriteModernObjC.cpp | 46 +- .../lib/Frontend/SerializedDiagnosticPrinter.cpp | 2 +- .../clang/lib/Frontend/TextDiagnostic.cpp | 213 +- .../clang/lib/Frontend/TextDiagnosticPrinter.cpp | 2 +- .../lib/Frontend/VerifyDiagnosticConsumer.cpp | 16 +- .../lib/FrontendTool/ExecuteCompilerInvocation.cpp | 14 +- .../clang/lib/Headers/__clang_cuda_intrinsics.h | 4 +- .../clang/lib/Headers/__stdarg_header_macro.h | 12 + .../clang/lib/Headers/__stddef_header_macro.h | 12 + contrib/llvm-project/clang/lib/Headers/arm_acle.h | 36 +- .../clang/lib/Headers/avx512erintrin.h | 271 - .../clang/lib/Headers/avx512fp16intrin.h | 76 +- .../clang/lib/Headers/avx512pfintrin.h | 92 - contrib/llvm-project/clang/lib/Headers/avxintrin.h | 102 +- contrib/llvm-project/clang/lib/Headers/bmiintrin.h | 6 +- contrib/llvm-project/clang/lib/Headers/builtins.h | 3 + contrib/llvm-project/clang/lib/Headers/cpuid.h | 26 +- .../clang/lib/Headers/cuda_wrappers/algorithm | 2 +- contrib/llvm-project/clang/lib/Headers/emmintrin.h | 469 +- contrib/llvm-project/clang/lib/Headers/float.h | 28 + contrib/llvm-project/clang/lib/Headers/fmaintrin.h | 48 +- .../clang/lib/Headers/hlsl/hlsl_basic_types.h | 13 +- .../clang/lib/Headers/hlsl/hlsl_intrinsics.h | 1341 +- .../llvm-project/clang/lib/Headers/ia32intrin.h | 72 +- contrib/llvm-project/clang/lib/Headers/immintrin.h | 244 +- contrib/llvm-project/clang/lib/Headers/intrin.h | 272 +- contrib/llvm-project/clang/lib/Headers/intrin0.h | 247 + contrib/llvm-project/clang/lib/Headers/inttypes.h | 4 + contrib/llvm-project/clang/lib/Headers/iso646.h | 4 + .../clang/lib/Headers/keylockerintrin.h | 13 +- contrib/llvm-project/clang/lib/Headers/limits.h | 5 + .../clang/lib/Headers/llvm_libc_wrappers/assert.h | 2 +- contrib/llvm-project/clang/lib/Headers/mm3dnow.h | 147 +- contrib/llvm-project/clang/lib/Headers/mmintrin.h | 160 +- .../clang/lib/Headers/module.modulemap | 15 +- .../llvm-project/clang/lib/Headers/opencl-c-base.h | 4 + contrib/llvm-project/clang/lib/Headers/opencl-c.h | 15 + .../llvm-project/clang/lib/Headers/prfchwintrin.h | 18 +- contrib/llvm-project/clang/lib/Headers/ptrauth.h | 305 + .../llvm-project/clang/lib/Headers/sifive_vector.h | 102 + contrib/llvm-project/clang/lib/Headers/smmintrin.h | 24 +- contrib/llvm-project/clang/lib/Headers/stdalign.h | 5 + contrib/llvm-project/clang/lib/Headers/stdarg.h | 34 +- contrib/llvm-project/clang/lib/Headers/stdatomic.h | 8 +- contrib/llvm-project/clang/lib/Headers/stdbool.h | 5 + contrib/llvm-project/clang/lib/Headers/stddef.h | 43 +- contrib/llvm-project/clang/lib/Headers/stdint.h | 5 + .../llvm-project/clang/lib/Headers/stdnoreturn.h | 6 + contrib/llvm-project/clang/lib/Headers/tmmintrin.h | 36 +- contrib/llvm-project/clang/lib/Headers/varargs.h | 6 +- .../llvm-project/clang/lib/Headers/x86gprintrin.h | 21 +- contrib/llvm-project/clang/lib/Headers/x86intrin.h | 32 +- contrib/llvm-project/clang/lib/Headers/xmmintrin.h | 382 +- .../llvm-project/clang/lib/Headers/yvals_core.h | 25 + .../clang/lib/Headers/zos_wrappers/builtins.h | 18 + .../llvm-project/clang/lib/Index/CommentToXML.cpp | 40 +- contrib/llvm-project/clang/lib/Index/IndexBody.cpp | 2 +- contrib/llvm-project/clang/lib/Index/IndexDecl.cpp | 15 +- .../llvm-project/clang/lib/Index/IndexSymbol.cpp | 3 +- .../clang/lib/Index/IndexingAction.cpp | 2 +- .../llvm-project/clang/lib/Index/USRGeneration.cpp | 32 +- .../lib/InstallAPI/DiagnosticBuilderWrappers.cpp | 110 + .../lib/InstallAPI/DiagnosticBuilderWrappers.h | 49 + .../clang/lib/InstallAPI/DirectoryScanner.cpp | 300 + .../clang/lib/InstallAPI/DylibVerifier.cpp | 1005 + .../llvm-project/clang/lib/InstallAPI/FileList.cpp | 192 + .../llvm-project/clang/lib/InstallAPI/Frontend.cpp | 220 + .../clang/lib/InstallAPI/HeaderFile.cpp | 88 + .../llvm-project/clang/lib/InstallAPI/Library.cpp | 40 + .../llvm-project/clang/lib/InstallAPI/Visitor.cpp | 728 + .../clang/lib/Interpreter/CodeCompletion.cpp | 3 +- .../clang/lib/Interpreter/DeviceOffload.cpp | 1 + .../clang/lib/Interpreter/IncrementalExecutor.cpp | 35 +- .../clang/lib/Interpreter/IncrementalExecutor.h | 20 +- .../clang/lib/Interpreter/IncrementalParser.cpp | 34 +- .../clang/lib/Interpreter/Interpreter.cpp | 522 +- .../clang/lib/Interpreter/InterpreterUtils.cpp | 2 +- .../llvm-project/clang/lib/Interpreter/Value.cpp | 10 +- .../llvm-project/clang/lib/Interpreter/Wasm.cpp | 114 + contrib/llvm-project/clang/lib/Interpreter/Wasm.h | 37 + .../clang/lib/Lex/DependencyDirectivesScanner.cpp | 31 +- .../llvm-project/clang/lib/Lex/HeaderSearch.cpp | 347 +- contrib/llvm-project/clang/lib/Lex/Lexer.cpp | 68 +- .../llvm-project/clang/lib/Lex/LiteralSupport.cpp | 68 +- contrib/llvm-project/clang/lib/Lex/MacroInfo.cpp | 2 +- contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp | 66 +- .../llvm-project/clang/lib/Lex/PPDirectives.cpp | 552 +- .../llvm-project/clang/lib/Lex/PPExpressions.cpp | 57 +- .../llvm-project/clang/lib/Lex/PPLexerChange.cpp | 9 +- .../clang/lib/Lex/PPMacroExpansion.cpp | 140 +- contrib/llvm-project/clang/lib/Lex/Pragma.cpp | 3 +- .../clang/lib/Lex/PreprocessingRecord.cpp | 11 +- .../llvm-project/clang/lib/Lex/Preprocessor.cpp | 138 +- .../clang/lib/Lex/TokenConcatenation.cpp | 5 +- contrib/llvm-project/clang/lib/Parse/ParseAST.cpp | 10 +- .../clang/lib/Parse/ParseCXXInlineMethods.cpp | 86 +- contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp | 760 +- .../llvm-project/clang/lib/Parse/ParseDeclCXX.cpp | 490 +- contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp | 339 +- .../llvm-project/clang/lib/Parse/ParseExprCXX.cpp | 193 +- contrib/llvm-project/clang/lib/Parse/ParseHLSL.cpp | 125 +- contrib/llvm-project/clang/lib/Parse/ParseInit.cpp | 49 +- contrib/llvm-project/clang/lib/Parse/ParseObjc.cpp | 438 +- .../llvm-project/clang/lib/Parse/ParseOpenACC.cpp | 742 +- .../llvm-project/clang/lib/Parse/ParseOpenMP.cpp | 932 +- .../llvm-project/clang/lib/Parse/ParsePragma.cpp | 56 +- contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp | 72 +- .../llvm-project/clang/lib/Parse/ParseTemplate.cpp | 244 +- .../clang/lib/Parse/ParseTentative.cpp | 35 +- contrib/llvm-project/clang/lib/Parse/Parser.cpp | 123 +- .../llvm-project/clang/lib/Rewrite/HTMLRewrite.cpp | 135 +- .../clang/lib/Sema/AnalysisBasedWarnings.cpp | 60 +- .../clang/lib/Sema/CheckExprLifetime.cpp | 1321 + .../clang/lib/Sema/CheckExprLifetime.h | 39 + .../clang/lib/Sema/CodeCompleteConsumer.cpp | 3 +- contrib/llvm-project/clang/lib/Sema/DeclSpec.cpp | 60 +- .../clang/lib/Sema/HLSLExternalSemaSource.cpp | 84 +- .../clang/lib/Sema/JumpDiagnostics.cpp | 28 +- .../clang/lib/Sema/MultiplexExternalSemaSource.cpp | 2 +- .../llvm-project/clang/lib/Sema/OpenCLBuiltins.td | 26 +- contrib/llvm-project/clang/lib/Sema/ParsedAttr.cpp | 8 +- contrib/llvm-project/clang/lib/Sema/Scope.cpp | 9 + contrib/llvm-project/clang/lib/Sema/ScopeInfo.cpp | 1 + contrib/llvm-project/clang/lib/Sema/Sema.cpp | 503 +- contrib/llvm-project/clang/lib/Sema/SemaAMDGPU.cpp | 311 + .../llvm-project/clang/lib/Sema/SemaAPINotes.cpp | 1036 + contrib/llvm-project/clang/lib/Sema/SemaARM.cpp | 1340 + contrib/llvm-project/clang/lib/Sema/SemaAVR.cpp | 49 + contrib/llvm-project/clang/lib/Sema/SemaAccess.cpp | 83 +- contrib/llvm-project/clang/lib/Sema/SemaAttr.cpp | 44 +- .../clang/lib/Sema/SemaAvailability.cpp | 202 +- contrib/llvm-project/clang/lib/Sema/SemaBPF.cpp | 194 + contrib/llvm-project/clang/lib/Sema/SemaBase.cpp | 90 + .../clang/lib/Sema/SemaBoundsSafety.cpp | 193 + contrib/llvm-project/clang/lib/Sema/SemaCUDA.cpp | 439 +- .../clang/lib/Sema/SemaCXXScopeSpec.cpp | 115 +- contrib/llvm-project/clang/lib/Sema/SemaCast.cpp | 120 +- .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 24572 +++++++----------- .../clang/lib/Sema/SemaCodeComplete.cpp | 1479 +- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 734 +- .../llvm-project/clang/lib/Sema/SemaCoroutine.cpp | 103 +- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 2648 +- .../llvm-project/clang/lib/Sema/SemaDeclAttr.cpp | 4156 +-- .../llvm-project/clang/lib/Sema/SemaDeclCXX.cpp | 1920 +- .../llvm-project/clang/lib/Sema/SemaDeclObjC.cpp | 1463 +- .../clang/lib/Sema/SemaExceptionSpec.cpp | 69 +- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 2586 +- .../llvm-project/clang/lib/Sema/SemaExprCXX.cpp | 924 +- .../llvm-project/clang/lib/Sema/SemaExprMember.cpp | 383 +- .../llvm-project/clang/lib/Sema/SemaExprObjC.cpp | 1398 +- contrib/llvm-project/clang/lib/Sema/SemaHLSL.cpp | 1103 +- .../llvm-project/clang/lib/Sema/SemaHexagon.cpp | 290 + contrib/llvm-project/clang/lib/Sema/SemaInit.cpp | 1813 +- contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp | 159 +- contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp | 503 +- .../llvm-project/clang/lib/Sema/SemaLoongArch.cpp | 515 + contrib/llvm-project/clang/lib/Sema/SemaM68k.cpp | 56 + contrib/llvm-project/clang/lib/Sema/SemaMIPS.cpp | 300 + contrib/llvm-project/clang/lib/Sema/SemaMSP430.cpp | 78 + contrib/llvm-project/clang/lib/Sema/SemaModule.cpp | 169 +- contrib/llvm-project/clang/lib/Sema/SemaNVPTX.cpp | 35 + contrib/llvm-project/clang/lib/Sema/SemaObjC.cpp | 2408 ++ .../clang/lib/Sema/SemaObjCProperty.cpp | 297 +- .../llvm-project/clang/lib/Sema/SemaOpenACC.cpp | 1710 ++ contrib/llvm-project/clang/lib/Sema/SemaOpenCL.cpp | 578 + contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp | 8531 +++---- .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 1807 +- contrib/llvm-project/clang/lib/Sema/SemaPPC.cpp | 439 + .../clang/lib/Sema/SemaPseudoObject.cpp | 309 +- contrib/llvm-project/clang/lib/Sema/SemaRISCV.cpp | 1491 ++ .../clang/lib/Sema/SemaRISCVVectorLookup.cpp | 497 - contrib/llvm-project/clang/lib/Sema/SemaSYCL.cpp | 95 +- contrib/llvm-project/clang/lib/Sema/SemaStmt.cpp | 509 +- .../llvm-project/clang/lib/Sema/SemaStmtAsm.cpp | 2 +- .../llvm-project/clang/lib/Sema/SemaStmtAttr.cpp | 121 +- contrib/llvm-project/clang/lib/Sema/SemaSwift.cpp | 765 + .../llvm-project/clang/lib/Sema/SemaSystemZ.cpp | 94 + .../llvm-project/clang/lib/Sema/SemaTemplate.cpp | 1848 +- .../clang/lib/Sema/SemaTemplateDeduction.cpp | 1727 +- .../clang/lib/Sema/SemaTemplateDeductionGuide.cpp | 1435 ++ .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 542 +- .../clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 559 +- .../clang/lib/Sema/SemaTemplateVariadic.cpp | 106 +- contrib/llvm-project/clang/lib/Sema/SemaType.cpp | 1069 +- contrib/llvm-project/clang/lib/Sema/SemaWasm.cpp | 341 + contrib/llvm-project/clang/lib/Sema/SemaX86.cpp | 972 + .../llvm-project/clang/lib/Sema/TreeTransform.h | 2073 +- .../clang/lib/Serialization/ASTCommon.cpp | 18 +- .../clang/lib/Serialization/ASTCommon.h | 24 - .../clang/lib/Serialization/ASTReader.cpp | 1215 +- .../clang/lib/Serialization/ASTReaderDecl.cpp | 346 +- .../clang/lib/Serialization/ASTReaderInternals.h | 10 +- .../clang/lib/Serialization/ASTReaderStmt.cpp | 180 +- .../clang/lib/Serialization/ASTWriter.cpp | 1914 +- .../clang/lib/Serialization/ASTWriterDecl.cpp | 179 +- .../clang/lib/Serialization/ASTWriterStmt.cpp | 117 +- .../clang/lib/Serialization/GeneratePCH.cpp | 87 +- .../clang/lib/Serialization/GlobalModuleIndex.cpp | 14 +- .../clang/lib/Serialization/ModuleFile.cpp | 6 +- .../lib/Serialization/ModuleFileExtension.cpp | 2 +- .../clang/lib/Serialization/MultiOnDiskHashTable.h | 4 +- .../lib/Serialization/PCHContainerOperations.cpp | 2 - .../Checkers/ArrayBoundCheckerV2.cpp | 488 +- .../Checkers/BasicObjCFoundationChecks.cpp | 12 +- .../Checkers/BlockInCriticalSectionChecker.cpp | 383 +- .../Checkers/BoolAssignmentChecker.cpp | 55 +- .../Checkers/BuiltinFunctionChecker.cpp | 66 +- .../lib/StaticAnalyzer/Checkers/CStringChecker.cpp | 321 +- .../StaticAnalyzer/Checkers/CXXDeleteChecker.cpp | 4 +- *** 1060364 LINES SKIPPED *** From nobody Sun Dec 1 12:54:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgb1TDqz5fbKh; Sun, 01 Dec 2024 12:54:03 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgb1CYfz4Ntf; Sun, 1 Dec 2024 12:54:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6HQBupVStleoycI3Z5UaMdGzlLcZZCrDpHh7U+un6QY=; b=F5sr9Gf2+a6C+idaVTfG9w4u0yMHvlBCfV9z6BknAbZgNPvd7BwWkVv/7CaHhKdDeH3f0V L1T7QCBUpNe3vbMQrp2aW+aOvue6TgSbeTaUYijU1tcNpt2Zvey5W8mZWAXiCWbp11CUjf SAdNQWD5+e11Lk5gudVOcix8qeZR6c3fO3tJoE6TwMOyZnZqAboDtzr1T13+2fZDobkOAk oFxD06dvHf4b3/rpf7LgY7owepd6g3CC5UKLZZGNuIGD+O5eSVDY0rpHGh7LXE18GMCBk4 7zLbY3GFzyBkzcU5svss3uHQ46vCDFfLsm5e07ooAs5uxaCHJHZiIwy5gT6MaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6HQBupVStleoycI3Z5UaMdGzlLcZZCrDpHh7U+un6QY=; b=ZsJi5K/x64myKoKhINEZNIx/9f6RbpxG2V2TYua+1e27od7HvR1CKK6x9Iv+W4Tv8CwYxc VfXJ6JXLPsbBXzTYWLhiwv3GR1Hr1tmmoeshXk56o9qQGBuUDDrc0rf1TYIAO1GlVfm/SZ rLSG8qx+axUqU2v+54iyopJJvuPtmrIbUt/IZqNgMHPpDOUiZFYlvuvvi4HZz7ZluKzEp6 dH5C6SHygvUGDFoW/MWf6lP3gNw5Xrb31Z9JvylRQSd18qLWYjMzmLpFG17mvlqWvys3Fn AUI/oliN2t801qDFoZn/A0FD7IUKvuHqk6uBFs7NvZOrH6e4nI9sPJ9KDeG0ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057643; a=rsa-sha256; cv=none; b=smKGfUnzgpYk/V9a7mDQn8WV5GlPMjZauasR0ucUOyuA0yk0OPNaodNJWofr+Fquza73xu /FkS4bFVhgJLLF2WUUq1j3R07Ka+cPq8uLmsf6Uz/PKf+tMHixwrEugm2K0+mJLaohWYNP p9kFwMJgCfi/yhSSNNoon5OLwguVQvi4wwCT6qcthwdpCqgI063K9SENFgslu92+3ds0vA aBC+NcvWpPHa5ZCW+aGJ63Y5lQW24T9yux1jHRVFBzUhEVi+h2ZaBWd3ZcwwHKJsUPB00i 32EUUrdZfDROJbifKpXUPGjchhfc336kYyq+SumwSCm4Kvsmz171CYdMTJQNlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgb0pz6ztjn; Sun, 1 Dec 2024 12:54:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1Cs36E093200; Sun, 1 Dec 2024 12:54:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1Cs2ao093197; Sun, 1 Dec 2024 12:54:02 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:02 GMT Message-Id: <202412011254.4B1Cs2ao093197@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 03ebe7c3bd5d - stable/13 - Merge llvm-project release/19.x llvmorg-19.1.0-rc1-0-ga4902a36d5c2 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 03ebe7c3bd5db159d69254a8f6aff4c8d9fbe2f4 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=03ebe7c3bd5db159d69254a8f6aff4c8d9fbe2f4 commit 03ebe7c3bd5db159d69254a8f6aff4c8d9fbe2f4 Author: Dimitry Andric AuthorDate: 2024-07-30 14:27:43 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:37 +0000 Merge llvm-project release/19.x llvmorg-19.1.0-rc1-0-ga4902a36d5c2 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-rc1-0-ga4902a36d5c2. PR: 280562 MFC after: 1 month (cherry picked from commit 36b606ae6aa4b24061096ba18582e0a08ccd5dba) --- ObsoleteFiles.inc | 1 - .../include/clang/Basic/DiagnosticSemaKinds.td | 3 + .../clang/include/clang/Basic/TokenKinds.def | 2 + .../clang/include/clang/Driver/Options.td | 10 +- .../clang/include/clang/Parse/Parser.h | 2 + .../clang/include/clang/Sema/Overload.h | 4 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 2 + .../llvm-project/clang/lib/AST/ExprConstant.cpp | 32 +- contrib/llvm-project/clang/lib/AST/Interp/Interp.h | 22 +- .../llvm-project/clang/lib/AST/ItaniumMangle.cpp | 8 + .../llvm-project/clang/lib/Basic/Targets/PPC.cpp | 39 +- contrib/llvm-project/clang/lib/Basic/Targets/PPC.h | 19 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 3 +- .../clang/lib/Driver/ToolChains/Arch/PPC.cpp | 3 + .../clang/lib/Driver/ToolChains/Clang.cpp | 4 + contrib/llvm-project/clang/lib/Headers/ptrauth.h | 19 + contrib/llvm-project/clang/lib/Headers/stdarg.h | 4 +- contrib/llvm-project/clang/lib/Headers/stdatomic.h | 4 + contrib/llvm-project/clang/lib/Headers/stddef.h | 21 +- contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp | 27 +- .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 10 +- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 23 +- .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 20 +- .../compiler-rt/lib/builtins/README.txt | 5 + .../compiler-rt/lib/builtins/aarch64/sme-abi-vg.c | 28 - .../compiler-rt/lib/builtins/aarch64/sme-abi.S | 44 + .../compiler-rt/lib/builtins/trampoline_setup.c | 42 + .../lib/sanitizer_common/sanitizer_ptrauth.h | 46 +- .../lib/ubsan/ubsan_type_hash_itanium.cpp | 2 +- .../llvm-project/libcxx/include/__bit_reference | 14 + contrib/llvm-project/libcxx/include/__config | 2 +- .../libcxx/include/__iterator/bounded_iter.h | 24 + .../libcxx/include/__iterator/wrap_iter.h | 23 + contrib/llvm-project/libcxx/include/__math/hypot.h | 89 + contrib/llvm-project/libcxx/include/cmath | 25 +- contrib/llvm-project/libcxx/include/deque | 29 +- contrib/llvm-project/libcxx/include/locale | 4 + contrib/llvm-project/libcxx/include/string | 17 +- .../llvm/include/llvm/Analysis/AliasAnalysis.h | 17 +- .../llvm/include/llvm/Analysis/SimplifyQuery.h | 6 + .../llvm/include/llvm/CodeGen/MachineFrameInfo.h | 14 +- .../include/llvm/CodeGen/TargetFrameLowering.h | 4 +- .../llvm/include/llvm/MC/MCAsmBackend.h | 2 +- .../llvm-project/llvm/include/llvm/MC/MCDwarf.h | 44 +- .../include/llvm/TargetParser/PPCTargetParser.def | 3 + .../llvm/lib/Analysis/BasicAliasAnalysis.cpp | 28 +- .../llvm/lib/Analysis/ValueTracking.cpp | 22 +- .../llvm/lib/CodeGen/CFIInstrInserter.cpp | 10 +- .../llvm/lib/CodeGen/MachineFrameInfo.cpp | 2 +- .../llvm/lib/CodeGen/PrologEpilogInserter.cpp | 4 +- contrib/llvm-project/llvm/lib/MC/MCDwarf.cpp | 6 +- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 58 + .../llvm/lib/Target/AArch64/AArch64ISelLowering.h | 2 + .../llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 7 +- .../Target/AArch64/AArch64MachineFunctionInfo.cpp | 4 + .../llvm/lib/Target/AArch64/AArch64PointerAuth.cpp | 3 +- .../llvm/lib/Target/AArch64/AArch64Subtarget.cpp | 9 +- .../llvm/lib/Target/AArch64/AArch64Subtarget.h | 3 +- .../AArch64/MCTargetDesc/AArch64AsmBackend.cpp | 8 +- .../llvm/lib/Target/ARM/ARMFrameLowering.cpp | 4 +- .../lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 2 +- .../Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h | 2 +- .../lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp | 8 +- .../lib/Target/Hexagon/HexagonFrameLowering.cpp | 4 +- .../lib/Target/LoongArch/LoongArchInstrInfo.td | 1 - .../llvm/lib/Target/MSP430/MSP430FrameLowering.cpp | 2 +- .../llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp | 5 +- .../llvm-project/llvm/lib/Target/PowerPC/PPC.td | 20 +- .../llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 3 + .../llvm/lib/Target/PowerPC/PPCInstrInfo.cpp | 1 + .../llvm/lib/Target/PowerPC/PPCSubtarget.h | 1 + .../lib/Target/PowerPC/PPCTargetTransformInfo.cpp | 4 +- .../llvm/lib/Target/RISCV/RISCVInstrInfoC.td | 8 +- .../lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp | 12 +- .../llvm/lib/Target/X86/X86FrameLowering.cpp | 4 +- .../llvm-project/llvm/lib/TargetParser/Host.cpp | 7 + .../llvm/lib/Transforms/Scalar/LICM.cpp | 62 - .../lib/Transforms/Scalar/LoopStrengthReduce.cpp | 6 +- .../lib/Transforms/Vectorize/LoopVectorize.cpp | 2 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/clang/libclang/Makefile | 5 + lib/clang/libllvm/Makefile | 1 + lib/libc++/Makefile | 4 +- lib/libc++/module.modulemap | 2136 -------------------- 90 files changed, 790 insertions(+), 2476 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 7ab26fca5493..da9b537e4599 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -954,7 +954,6 @@ OLD_FILES+=usr/include/c++/v1/__pstl/internal/parallel_backend_utils.h OLD_FILES+=usr/include/c++/v1/__pstl/internal/unseq_backend_simd.h OLD_FILES+=usr/include/c++/v1/__pstl/internal/utils.h OLD_DIRS+=usr/include/c++/v1/__pstl/internal -OLD_DIRS+=usr/include/c++/v1/__pstl OLD_FILES+=usr/include/c++/v1/__pstl_algorithm OLD_FILES+=usr/include/c++/v1/__pstl_memory OLD_FILES+=usr/include/c++/v1/__pstl_numeric diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td index 9fcb1d165e8b..3669b8b48e53 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -942,6 +942,9 @@ def warn_ptrauth_auth_null_pointer : InGroup; def err_ptrauth_string_not_literal : Error< "argument must be a string literal%select{| of char type}0">; +def err_ptrauth_type_disc_undiscriminated : Error< + "cannot pass undiscriminated type %0 to " + "'__builtin_ptrauth_type_discriminator'">; def note_ptrauth_virtual_function_pointer_incomplete_arg_ret : Note<"cannot take an address of a virtual member function if its return or " diff --git a/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def b/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def index 7f4912b9bcd9..8c54661e65cf 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def +++ b/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def @@ -596,6 +596,8 @@ ALIAS("__is_same_as", __is_same, KEYCXX) KEYWORD(__private_extern__ , KEYALL) KEYWORD(__module_private__ , KEYALL) +UNARY_EXPR_OR_TYPE_TRAIT(__builtin_ptrauth_type_discriminator, PtrAuthTypeDiscriminator, KEYALL) + // Extension that will be enabled for Microsoft, Borland and PS4, but can be // disabled via '-fno-declspec'. KEYWORD(__declspec , 0) diff --git a/contrib/llvm-project/clang/include/clang/Driver/Options.td b/contrib/llvm-project/clang/include/clang/Driver/Options.td index 69269cf7537b..359a698ea87d 100644 --- a/contrib/llvm-project/clang/include/clang/Driver/Options.td +++ b/contrib/llvm-project/clang/include/clang/Driver/Options.td @@ -1165,19 +1165,19 @@ def client__name : JoinedOrSeparate<["-"], "client_name">; def combine : Flag<["-", "--"], "combine">, Flags<[NoXarchOption, Unsupported]>; def compatibility__version : JoinedOrSeparate<["-"], "compatibility_version">; def config : Joined<["--"], "config=">, Flags<[NoXarchOption]>, - Visibility<[ClangOption, CLOption, DXCOption]>, MetaVarName<"">, + Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, MetaVarName<"">, HelpText<"Specify configuration file">; -def : Separate<["--"], "config">, Alias; +def : Separate<["--"], "config">, Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, Alias; def no_default_config : Flag<["--"], "no-default-config">, - Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, DXCOption]>, + Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, HelpText<"Disable loading default configuration files">; def config_system_dir_EQ : Joined<["--"], "config-system-dir=">, Flags<[NoXarchOption, HelpHidden]>, - Visibility<[ClangOption, CLOption, DXCOption]>, + Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, HelpText<"System directory for configuration files">; def config_user_dir_EQ : Joined<["--"], "config-user-dir=">, Flags<[NoXarchOption, HelpHidden]>, - Visibility<[ClangOption, CLOption, DXCOption]>, + Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, HelpText<"User directory for configuration files">; def coverage : Flag<["-", "--"], "coverage">, Group, Visibility<[ClangOption, CLOption]>; diff --git a/contrib/llvm-project/clang/include/clang/Parse/Parser.h b/contrib/llvm-project/clang/include/clang/Parse/Parser.h index 613bab9120df..35bb1a19d40f 100644 --- a/contrib/llvm-project/clang/include/clang/Parse/Parser.h +++ b/contrib/llvm-project/clang/include/clang/Parse/Parser.h @@ -3890,6 +3890,8 @@ private: ExprResult ParseArrayTypeTrait(); ExprResult ParseExpressionTrait(); + ExprResult ParseBuiltinPtrauthTypeDiscriminator(); + //===--------------------------------------------------------------------===// // Preprocessor code-completion pass-through void CodeCompleteDirective(bool InConditional) override; diff --git a/contrib/llvm-project/clang/include/clang/Sema/Overload.h b/contrib/llvm-project/clang/include/clang/Sema/Overload.h index 9d8b797af666..26ffe057c74a 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Overload.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Overload.h @@ -998,7 +998,9 @@ class Sema; private: friend class OverloadCandidateSet; OverloadCandidate() - : IsSurrogate(false), IsADLCandidate(CallExpr::NotADL), RewriteKind(CRK_None) {} + : IsSurrogate(false), IgnoreObjectArgument(false), + TookAddressOfOverload(false), IsADLCandidate(CallExpr::NotADL), + RewriteKind(CRK_None) {} }; /// OverloadCandidateSet - A set of overload candidates, used in C++ diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index d638d31e050d..7bfdaaae45a9 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -3456,6 +3456,8 @@ public: TemplateIdAnnotation *TemplateId, bool IsMemberSpecialization); + bool checkPointerAuthEnabled(SourceLocation Loc, SourceRange Range); + bool checkConstantPointerAuthKey(Expr *keyExpr, unsigned &key); /// Diagnose function specifiers on a declaration of an identifier that diff --git a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp index fcb382474ea6..5e57b5e8bc8f 100644 --- a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp @@ -2839,6 +2839,8 @@ static bool handleIntIntBinOp(EvalInfo &Info, const BinaryOperator *E, // During constant-folding, a negative shift is an opposite shift. Such // a shift is not a constant expression. Info.CCEDiag(E, diag::note_constexpr_negative_shift) << RHS; + if (!Info.noteUndefinedBehavior()) + return false; RHS = -RHS; goto shift_right; } @@ -2849,19 +2851,23 @@ static bool handleIntIntBinOp(EvalInfo &Info, const BinaryOperator *E, if (SA != RHS) { Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth(); + if (!Info.noteUndefinedBehavior()) + return false; } else if (LHS.isSigned() && !Info.getLangOpts().CPlusPlus20) { // C++11 [expr.shift]p2: A signed left shift must have a non-negative // operand, and must not overflow the corresponding unsigned type. // C++2a [expr.shift]p2: E1 << E2 is the unique value congruent to // E1 x 2^E2 module 2^N. - if (LHS.isNegative()) + if (LHS.isNegative()) { Info.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS; - else if (LHS.countl_zero() < SA) + if (!Info.noteUndefinedBehavior()) + return false; + } else if (LHS.countl_zero() < SA) { Info.CCEDiag(E, diag::note_constexpr_lshift_discards); + if (!Info.noteUndefinedBehavior()) + return false; + } } - if (Info.EvalStatus.Diag && !Info.EvalStatus.Diag->empty() && - Info.getLangOpts().CPlusPlus11) - return false; Result = LHS << SA; return true; } @@ -2875,6 +2881,8 @@ static bool handleIntIntBinOp(EvalInfo &Info, const BinaryOperator *E, // During constant-folding, a negative shift is an opposite shift. Such a // shift is not a constant expression. Info.CCEDiag(E, diag::note_constexpr_negative_shift) << RHS; + if (!Info.noteUndefinedBehavior()) + return false; RHS = -RHS; goto shift_left; } @@ -2882,13 +2890,13 @@ static bool handleIntIntBinOp(EvalInfo &Info, const BinaryOperator *E, // C++11 [expr.shift]p1: Shift width must be less than the bit width of the // shifted type. unsigned SA = (unsigned) RHS.getLimitedValue(LHS.getBitWidth()-1); - if (SA != RHS) + if (SA != RHS) { Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth(); + if (!Info.noteUndefinedBehavior()) + return false; + } - if (Info.EvalStatus.Diag && !Info.EvalStatus.Diag->empty() && - Info.getLangOpts().CPlusPlus11) - return false; Result = LHS >> SA; return true; } @@ -14054,6 +14062,12 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr( E); } + case UETT_PtrAuthTypeDiscriminator: { + if (E->getArgumentType()->isDependentType()) + return false; + return Success( + Info.Ctx.getPointerAuthTypeDiscriminator(E->getArgumentType()), E); + } case UETT_VecStep: { QualType Ty = E->getTypeOfArgument(); diff --git a/contrib/llvm-project/clang/lib/AST/Interp/Interp.h b/contrib/llvm-project/clang/lib/AST/Interp/Interp.h index 8e96f78d9056..253a433e7340 100644 --- a/contrib/llvm-project/clang/lib/AST/Interp/Interp.h +++ b/contrib/llvm-project/clang/lib/AST/Interp/Interp.h @@ -153,7 +153,8 @@ bool CheckShift(InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS, if (RHS.isNegative()) { const SourceInfo &Loc = S.Current->getSource(OpPC); S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt(); - return false; + if (!S.noteUndefinedBehavior()) + return false; } // C++11 [expr.shift]p1: Shift width must be less than the bit width of @@ -163,17 +164,24 @@ bool CheckShift(InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS, const APSInt Val = RHS.toAPSInt(); QualType Ty = E->getType(); S.CCEDiag(E, diag::note_constexpr_large_shift) << Val << Ty << Bits; - return !(S.getEvalStatus().Diag && !S.getEvalStatus().Diag->empty() && S.getLangOpts().CPlusPlus11); + if (!S.noteUndefinedBehavior()) + return false; } if (LHS.isSigned() && !S.getLangOpts().CPlusPlus20) { const Expr *E = S.Current->getExpr(OpPC); // C++11 [expr.shift]p2: A signed left shift must have a non-negative // operand, and must not overflow the corresponding unsigned type. - if (LHS.isNegative()) + if (LHS.isNegative()) { S.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt(); - else if (LHS.toUnsigned().countLeadingZeros() < static_cast(RHS)) + if (!S.noteUndefinedBehavior()) + return false; + } else if (LHS.toUnsigned().countLeadingZeros() < + static_cast(RHS)) { S.CCEDiag(E, diag::note_constexpr_lshift_discards); + if (!S.noteUndefinedBehavior()) + return false; + } } // C++2a [expr.shift]p2: [P0907R4]: @@ -2269,8 +2277,7 @@ inline bool DoShift(InterpState &S, CodePtr OpPC, LT &LHS, RT &RHS) { // shift is not a constant expression. const SourceInfo &Loc = S.Current->getSource(OpPC); S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt(); - if (S.getLangOpts().CPlusPlus11 && S.getEvalStatus().Diag && - !S.getEvalStatus().Diag->empty()) + if (!S.noteUndefinedBehavior()) return false; RHS = -RHS; return DoShift < LT, RT, @@ -2286,8 +2293,7 @@ inline bool DoShift(InterpState &S, CodePtr OpPC, LT &LHS, RT &RHS) { // E1 x 2^E2 module 2^N. const SourceInfo &Loc = S.Current->getSource(OpPC); S.CCEDiag(Loc, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt(); - if (S.getLangOpts().CPlusPlus11 && S.getEvalStatus().Diag && - !S.getEvalStatus().Diag->empty()) + if (!S.noteUndefinedBehavior()) return false; } } diff --git a/contrib/llvm-project/clang/lib/AST/ItaniumMangle.cpp b/contrib/llvm-project/clang/lib/AST/ItaniumMangle.cpp index 40ef82785f45..d46d621d4c7d 100644 --- a/contrib/llvm-project/clang/lib/AST/ItaniumMangle.cpp +++ b/contrib/llvm-project/clang/lib/AST/ItaniumMangle.cpp @@ -5179,6 +5179,14 @@ recurse: Diags.Report(DiagID); return; } + case UETT_PtrAuthTypeDiscriminator: { + DiagnosticsEngine &Diags = Context.getDiags(); + unsigned DiagID = Diags.getCustomDiagID( + DiagnosticsEngine::Error, + "cannot yet mangle __builtin_ptrauth_type_discriminator expression"); + Diags.Report(E->getExprLoc(), DiagID); + return; + } case UETT_VecStep: { DiagnosticsEngine &Diags = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error, diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp index 4ba4a49311d3..9ff54083c923 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp @@ -385,6 +385,8 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("_ARCH_PWR9"); if (ArchDefs & ArchDefinePwr10) Builder.defineMacro("_ARCH_PWR10"); + if (ArchDefs & ArchDefinePwr11) + Builder.defineMacro("_ARCH_PWR11"); if (ArchDefs & ArchDefineA2) Builder.defineMacro("_ARCH_A2"); if (ArchDefs & ArchDefineE500) @@ -622,10 +624,17 @@ bool PPCTargetInfo::initFeatureMap( addP10SpecificFeatures(Features); } - // Future CPU should include all of the features of Power 10 as well as any + // Power11 includes all the same features as Power10 plus any features + // specific to the Power11 core. + if (CPU == "pwr11" || CPU == "power11") { + initFeatureMap(Features, Diags, "pwr10", FeaturesVec); + addP11SpecificFeatures(Features); + } + + // Future CPU should include all of the features of Power 11 as well as any // additional features (yet to be determined) specific to it. if (CPU == "future") { - initFeatureMap(Features, Diags, "pwr10", FeaturesVec); + initFeatureMap(Features, Diags, "pwr11", FeaturesVec); addFutureSpecificFeatures(Features); } @@ -696,6 +705,10 @@ void PPCTargetInfo::addP10SpecificFeatures( Features["isa-v31-instructions"] = true; } +// Add any Power11 specific features. +void PPCTargetInfo::addP11SpecificFeatures( + llvm::StringMap &Features) const {} + // Add features specific to the "Future" CPU. void PPCTargetInfo::addFutureSpecificFeatures( llvm::StringMap &Features) const {} @@ -870,17 +883,17 @@ ArrayRef PPCTargetInfo::getGCCAddlRegNames() const { } static constexpr llvm::StringLiteral ValidCPUNames[] = { - {"generic"}, {"440"}, {"450"}, {"601"}, {"602"}, - {"603"}, {"603e"}, {"603ev"}, {"604"}, {"604e"}, - {"620"}, {"630"}, {"g3"}, {"7400"}, {"g4"}, - {"7450"}, {"g4+"}, {"750"}, {"8548"}, {"970"}, - {"g5"}, {"a2"}, {"e500"}, {"e500mc"}, {"e5500"}, - {"power3"}, {"pwr3"}, {"power4"}, {"pwr4"}, {"power5"}, - {"pwr5"}, {"power5x"}, {"pwr5x"}, {"power6"}, {"pwr6"}, - {"power6x"}, {"pwr6x"}, {"power7"}, {"pwr7"}, {"power8"}, - {"pwr8"}, {"power9"}, {"pwr9"}, {"power10"}, {"pwr10"}, - {"powerpc"}, {"ppc"}, {"ppc32"}, {"powerpc64"}, {"ppc64"}, - {"powerpc64le"}, {"ppc64le"}, {"future"}}; + {"generic"}, {"440"}, {"450"}, {"601"}, {"602"}, + {"603"}, {"603e"}, {"603ev"}, {"604"}, {"604e"}, + {"620"}, {"630"}, {"g3"}, {"7400"}, {"g4"}, + {"7450"}, {"g4+"}, {"750"}, {"8548"}, {"970"}, + {"g5"}, {"a2"}, {"e500"}, {"e500mc"}, {"e5500"}, + {"power3"}, {"pwr3"}, {"power4"}, {"pwr4"}, {"power5"}, + {"pwr5"}, {"power5x"}, {"pwr5x"}, {"power6"}, {"pwr6"}, + {"power6x"}, {"pwr6x"}, {"power7"}, {"pwr7"}, {"power8"}, + {"pwr8"}, {"power9"}, {"pwr9"}, {"power10"}, {"pwr10"}, + {"power11"}, {"pwr11"}, {"powerpc"}, {"ppc"}, {"ppc32"}, + {"powerpc64"}, {"ppc64"}, {"powerpc64le"}, {"ppc64le"}, {"future"}}; bool PPCTargetInfo::isValidCPUName(StringRef Name) const { return llvm::is_contained(ValidCPUNames, Name); diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h index b15ab6fbcf49..6d5d8dd54d01 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h @@ -44,8 +44,9 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { ArchDefinePwr8 = 1 << 12, ArchDefinePwr9 = 1 << 13, ArchDefinePwr10 = 1 << 14, - ArchDefineFuture = 1 << 15, - ArchDefineA2 = 1 << 16, + ArchDefinePwr11 = 1 << 15, + ArchDefineFuture = 1 << 16, + ArchDefineA2 = 1 << 17, ArchDefineE500 = 1 << 18 } ArchDefineTypes; @@ -166,11 +167,16 @@ public: ArchDefinePwr7 | ArchDefinePwr6 | ArchDefinePwr5x | ArchDefinePwr5 | ArchDefinePwr4 | ArchDefinePpcgr | ArchDefinePpcsq) + .Cases("power11", "pwr11", + ArchDefinePwr11 | ArchDefinePwr10 | ArchDefinePwr9 | + ArchDefinePwr8 | ArchDefinePwr7 | ArchDefinePwr6 | + ArchDefinePwr5x | ArchDefinePwr5 | ArchDefinePwr4 | + ArchDefinePpcgr | ArchDefinePpcsq) .Case("future", - ArchDefineFuture | ArchDefinePwr10 | ArchDefinePwr9 | - ArchDefinePwr8 | ArchDefinePwr7 | ArchDefinePwr6 | - ArchDefinePwr5x | ArchDefinePwr5 | ArchDefinePwr4 | - ArchDefinePpcgr | ArchDefinePpcsq) + ArchDefineFuture | ArchDefinePwr11 | ArchDefinePwr10 | + ArchDefinePwr9 | ArchDefinePwr8 | ArchDefinePwr7 | + ArchDefinePwr6 | ArchDefinePwr5x | ArchDefinePwr5 | + ArchDefinePwr4 | ArchDefinePpcgr | ArchDefinePpcsq) .Cases("8548", "e500", ArchDefineE500) .Default(ArchDefineNone); } @@ -192,6 +198,7 @@ public: const std::vector &FeaturesVec) const override; void addP10SpecificFeatures(llvm::StringMap &Features) const; + void addP11SpecificFeatures(llvm::StringMap &Features) const; void addFutureSpecificFeatures(llvm::StringMap &Features) const; bool handleTargetFeatures(std::vector &Features, diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp index f5bd4a141cc2..8965a14d88a6 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp @@ -1695,7 +1695,8 @@ void CGOpenMPRuntimeGPU::emitReduction( CGF.AllocaInsertPt->getIterator()); InsertPointTy CodeGenIP(CGF.Builder.GetInsertBlock(), CGF.Builder.GetInsertPoint()); - llvm::OpenMPIRBuilder::LocationDescription OmpLoc(CodeGenIP); + llvm::OpenMPIRBuilder::LocationDescription OmpLoc( + CodeGenIP, CGF.SourceLocToDebugLoc(Loc)); llvm::SmallVector ReductionInfos; CodeGenFunction::OMPPrivateScope Scope(CGF); diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp index 634c09652331..acd5757d6ea9 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp @@ -70,6 +70,7 @@ static std::string normalizeCPUName(StringRef CPUName, const llvm::Triple &T) { .Case("power8", "pwr8") .Case("power9", "pwr9") .Case("power10", "pwr10") + .Case("power11", "pwr11") .Case("future", "future") .Case("powerpc", "ppc") .Case("powerpc64", "ppc64") @@ -103,6 +104,8 @@ const char *ppc::getPPCAsmModeForCPU(StringRef Name) { .Case("power9", "-mpower9") .Case("pwr10", "-mpower10") .Case("power10", "-mpower10") + .Case("pwr11", "-mpower11") + .Case("power11", "-mpower11") .Default("-many"); } diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp index 78936fd634f3..5de29f1eca61 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp @@ -1516,6 +1516,10 @@ static void handlePAuthABI(const ArgList &DriverArgs, ArgStringList &CC1Args) { options::OPT_fno_ptrauth_vtable_pointer_type_discrimination)) CC1Args.push_back("-fptrauth-vtable-pointer-type-discrimination"); + if (!DriverArgs.hasArg(options::OPT_fptrauth_indirect_gotos, + options::OPT_fno_ptrauth_indirect_gotos)) + CC1Args.push_back("-fptrauth-indirect-gotos"); + if (!DriverArgs.hasArg(options::OPT_fptrauth_init_fini, options::OPT_fno_ptrauth_init_fini)) CC1Args.push_back("-fptrauth-init-fini"); diff --git a/contrib/llvm-project/clang/lib/Headers/ptrauth.h b/contrib/llvm-project/clang/lib/Headers/ptrauth.h index e0bc8c4f9acf..4724155b0dc7 100644 --- a/contrib/llvm-project/clang/lib/Headers/ptrauth.h +++ b/contrib/llvm-project/clang/lib/Headers/ptrauth.h @@ -202,6 +202,23 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t; #define ptrauth_string_discriminator(__string) \ __builtin_ptrauth_string_discriminator(__string) +/* Compute a constant discriminator from the given type. + + The result can be used as the second argument to + ptrauth_blend_discriminator or the third argument to the + __ptrauth qualifier. It has type size_t. + + If the type is a C++ member function pointer type, the result is + the discriminator used to signed member function pointers of that + type. If the type is a function, function pointer, or function + reference type, the result is the discriminator used to sign + functions of that type. It is ill-formed to use this macro with any + other type. + + A call to this function is an integer constant expression. */ +#define ptrauth_type_discriminator(__type) \ + __builtin_ptrauth_type_discriminator(__type) + /* Compute a signature for the given pair of pointer-sized values. The order of the arguments is significant. @@ -289,6 +306,8 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t; ((ptrauth_extra_data_t)0); \ }) +#define ptrauth_type_discriminator(__type) ((ptrauth_extra_data_t)0) + #define ptrauth_sign_generic_data(__value, __data) \ ({ \ (void)__value; \ diff --git a/contrib/llvm-project/clang/lib/Headers/stdarg.h b/contrib/llvm-project/clang/lib/Headers/stdarg.h index 8292ab907bec..6203d7a600a2 100644 --- a/contrib/llvm-project/clang/lib/Headers/stdarg.h +++ b/contrib/llvm-project/clang/lib/Headers/stdarg.h @@ -20,19 +20,18 @@ * modules. */ #if defined(__MVS__) && __has_include_next() -#include <__stdarg_header_macro.h> #undef __need___va_list #undef __need_va_list #undef __need_va_arg #undef __need___va_copy #undef __need_va_copy +#include <__stdarg_header_macro.h> #include_next #else #if !defined(__need___va_list) && !defined(__need_va_list) && \ !defined(__need_va_arg) && !defined(__need___va_copy) && \ !defined(__need_va_copy) -#include <__stdarg_header_macro.h> #define __need___va_list #define __need_va_list #define __need_va_arg @@ -45,6 +44,7 @@ !defined(__STRICT_ANSI__) #define __need_va_copy #endif +#include <__stdarg_header_macro.h> #endif #ifdef __need___va_list diff --git a/contrib/llvm-project/clang/lib/Headers/stdatomic.h b/contrib/llvm-project/clang/lib/Headers/stdatomic.h index 2027055f3879..1991351f9e9e 100644 --- a/contrib/llvm-project/clang/lib/Headers/stdatomic.h +++ b/contrib/llvm-project/clang/lib/Headers/stdatomic.h @@ -172,7 +172,11 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t; typedef struct atomic_flag { atomic_bool _Value; } atomic_flag; +#ifdef __cplusplus +#define ATOMIC_FLAG_INIT {false} +#else #define ATOMIC_FLAG_INIT { 0 } +#endif /* These should be provided by the libc implementation. */ #ifdef __cplusplus diff --git a/contrib/llvm-project/clang/lib/Headers/stddef.h b/contrib/llvm-project/clang/lib/Headers/stddef.h index 8985c526e8fc..99b275aebf5a 100644 --- a/contrib/llvm-project/clang/lib/Headers/stddef.h +++ b/contrib/llvm-project/clang/lib/Headers/stddef.h @@ -20,7 +20,6 @@ * modules. */ #if defined(__MVS__) && __has_include_next() -#include <__stddef_header_macro.h> #undef __need_ptrdiff_t #undef __need_size_t #undef __need_rsize_t @@ -31,6 +30,7 @@ #undef __need_max_align_t #undef __need_offsetof #undef __need_wint_t +#include <__stddef_header_macro.h> #include_next #else @@ -40,7 +40,6 @@ !defined(__need_NULL) && !defined(__need_nullptr_t) && \ !defined(__need_unreachable) && !defined(__need_max_align_t) && \ !defined(__need_offsetof) && !defined(__need_wint_t) -#include <__stddef_header_macro.h> #define __need_ptrdiff_t #define __need_size_t /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is @@ -49,7 +48,24 @@ #define __need_rsize_t #endif #define __need_wchar_t +#if !defined(__STDDEF_H) || __has_feature(modules) +/* + * __stddef_null.h is special when building without modules: if __need_NULL is + * set, then it will unconditionally redefine NULL. To avoid stepping on client + * definitions of NULL, __need_NULL should only be set the first time this + * header is included, that is when __STDDEF_H is not defined. However, when + * building with modules, this header is a textual header and needs to + * unconditionally include __stdef_null.h to support multiple submodules + * exporting _Builtin_stddef.null. Take module SM with submodules A and B, whose + * headers both include stddef.h When SM.A builds, __STDDEF_H will be defined. + * When SM.B builds, the definition from SM.A will leak when building without + * local submodule visibility. stddef.h wouldn't include __stddef_null.h, and + * SM.B wouldn't import _Builtin_stddef.null, and SM.B's `export *` wouldn't + * export NULL as expected. When building with modules, always include + * __stddef_null.h so that everything works as expected. + */ #define __need_NULL +#endif #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \ defined(__cplusplus) #define __need_nullptr_t @@ -65,6 +81,7 @@ /* wint_t is provided by and not . It's here * for compatibility, but must be explicitly requested. Therefore * __need_wint_t is intentionally not defined here. */ +#include <__stddef_header_macro.h> #endif #if defined(__need_ptrdiff_t) diff --git a/contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp b/contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp index a12c375c8d48..e82b56527283 100644 --- a/contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp +++ b/contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp @@ -763,6 +763,9 @@ class CastExpressionIdValidator final : public CorrectionCandidateCallback { bool Parser::isRevertibleTypeTrait(const IdentifierInfo *II, tok::TokenKind *Kind) { if (RevertibleTypeTraits.empty()) { +// Revertible type trait is a feature for backwards compatibility with older +// standard libraries that declare their own structs with the same name as +// the builtins listed below. New builtins should NOT be added to this list. #define RTT_JOIN(X, Y) X##Y #define REVERTIBLE_TYPE_TRAIT(Name) \ RevertibleTypeTraits[PP.getIdentifierInfo(#Name)] = RTT_JOIN(tok::kw_, Name) @@ -790,7 +793,6 @@ bool Parser::isRevertibleTypeTrait(const IdentifierInfo *II, REVERTIBLE_TYPE_TRAIT(__is_fundamental); REVERTIBLE_TYPE_TRAIT(__is_integral); REVERTIBLE_TYPE_TRAIT(__is_interface_class); - REVERTIBLE_TYPE_TRAIT(__is_layout_compatible); REVERTIBLE_TYPE_TRAIT(__is_literal); REVERTIBLE_TYPE_TRAIT(__is_lvalue_expr); REVERTIBLE_TYPE_TRAIT(__is_lvalue_reference); @@ -841,6 +843,26 @@ bool Parser::isRevertibleTypeTrait(const IdentifierInfo *II, return false; } +ExprResult Parser::ParseBuiltinPtrauthTypeDiscriminator() { + SourceLocation Loc = ConsumeToken(); + + BalancedDelimiterTracker T(*this, tok::l_paren); + if (T.expectAndConsume()) + return ExprError(); + + TypeResult Ty = ParseTypeName(); + if (Ty.isInvalid()) { + SkipUntil(tok::r_paren, StopAtSemi); + return ExprError(); + } + + SourceLocation EndLoc = Tok.getLocation(); + T.consumeClose(); + return Actions.ActOnUnaryExprOrTypeTraitExpr( + Loc, UETT_PtrAuthTypeDiscriminator, + /*isType=*/true, Ty.get().getAsOpaquePtr(), SourceRange(Loc, EndLoc)); +} + /// Parse a cast-expression, or, if \pisUnaryExpression is true, parse /// a unary-expression. /// @@ -1806,6 +1828,9 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind, Res = ParseArrayTypeTrait(); break; + case tok::kw___builtin_ptrauth_type_discriminator: + return ParseBuiltinPtrauthTypeDiscriminator(); + case tok::kw___is_lvalue_expr: case tok::kw___is_rvalue_expr: if (NotPrimaryExpression) diff --git a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp index 45b9bbb23dbf..cf1196ad23c2 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp @@ -1489,14 +1489,18 @@ enum PointerAuthOpKind { }; } -static bool checkPointerAuthEnabled(Sema &S, Expr *E) { - if (S.getLangOpts().PointerAuthIntrinsics) +bool Sema::checkPointerAuthEnabled(SourceLocation Loc, SourceRange Range) { + if (getLangOpts().PointerAuthIntrinsics) return false; - S.Diag(E->getExprLoc(), diag::err_ptrauth_disabled) << E->getSourceRange(); + Diag(Loc, diag::err_ptrauth_disabled) << Range; return true; } +static bool checkPointerAuthEnabled(Sema &S, Expr *E) { + return S.checkPointerAuthEnabled(E->getExprLoc(), E->getSourceRange()); +} + static bool checkPointerAuthKey(Sema &S, Expr *&Arg) { // Convert it to type 'int'. if (convertArgumentToType(S, Arg, S.Context.IntTy)) diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp index 439db55668cc..74c0e0170590 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp @@ -4117,6 +4117,21 @@ static bool CheckVectorElementsTraitOperandType(Sema &S, QualType T, return false; } +static bool checkPtrAuthTypeDiscriminatorOperandType(Sema &S, QualType T, + SourceLocation Loc, + SourceRange ArgRange) { + if (S.checkPointerAuthEnabled(Loc, ArgRange)) + return true; + + if (!T->isFunctionType() && !T->isFunctionPointerType() && + !T->isFunctionReferenceType() && !T->isMemberFunctionPointerType()) { + S.Diag(Loc, diag::err_ptrauth_type_disc_undiscriminated) << T << ArgRange; + return true; + } + + return false; +} + static bool CheckExtensionTraitOperandType(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, @@ -4511,6 +4526,10 @@ bool Sema::CheckUnaryExprOrTypeTraitOperand(QualType ExprType, return CheckVectorElementsTraitOperandType(*this, ExprType, OpLoc, ExprRange); + if (ExprKind == UETT_PtrAuthTypeDiscriminator) + return checkPtrAuthTypeDiscriminatorOperandType(*this, ExprType, OpLoc, + ExprRange); + // Explicitly list some types as extensions. if (!CheckExtensionTraitOperandType(*this, ExprType, OpLoc, ExprRange, ExprKind)) @@ -5711,7 +5730,6 @@ static bool isParenthetizedAndQualifiedAddressOfExpr(Expr *Fn) { if (!UO || UO->getOpcode() != clang::UO_AddrOf) return false; if (auto *DRE = dyn_cast(UO->getSubExpr()->IgnoreParens())) { - assert(isa(DRE->getDecl()) && "expected a function"); return DRE->hasQualifier(); } if (auto *OVL = dyn_cast(UO->getSubExpr()->IgnoreParens())) @@ -17027,7 +17045,8 @@ Sema::VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, // not a constant expression as a side-effect. bool Folded = E->EvaluateAsRValue(EvalResult, Context, /*isConstantContext*/ true) && - EvalResult.Val.isInt() && !EvalResult.HasSideEffects; + EvalResult.Val.isInt() && !EvalResult.HasSideEffects && + (!getLangOpts().CPlusPlus || !EvalResult.HasUndefinedBehavior); if (!isa(E)) E = ConstantExpr::Create(Context, E, EvalResult.Val); diff --git a/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp b/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp index a8d250fbabfe..554a2df14bea 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp @@ -6857,10 +6857,7 @@ void Sema::AddOverloadCandidate( Candidate.Viable = true; Candidate.RewriteKind = CandidateSet.getRewriteInfo().getRewriteKind(Function, PO); - Candidate.IsSurrogate = false; Candidate.IsADLCandidate = IsADLCandidate; - Candidate.IgnoreObjectArgument = false; - Candidate.TookAddressOfOverload = false; Candidate.ExplicitCallArguments = Args.size(); // Explicit functions are not actually candidates at all if we're not @@ -7422,8 +7419,6 @@ Sema::AddMethodCandidate(CXXMethodDecl *Method, DeclAccessPair FoundDecl, Candidate.Function = Method; Candidate.RewriteKind = CandidateSet.getRewriteInfo().getRewriteKind(Method, PO); - Candidate.IsSurrogate = false; - Candidate.IgnoreObjectArgument = false; Candidate.TookAddressOfOverload = CandidateSet.getKind() == OverloadCandidateSet::CSK_AddressOfOverloadSet; Candidate.ExplicitCallArguments = Args.size(); @@ -7617,7 +7612,6 @@ void Sema::AddMethodTemplateCandidate( Candidate.IgnoreObjectArgument = cast(Candidate.Function)->isStatic() || ObjectType.isNull(); - Candidate.TookAddressOfOverload = false; Candidate.ExplicitCallArguments = Args.size(); if (Result == TemplateDeductionResult::NonDependentConversionFailure) Candidate.FailureKind = ovl_fail_bad_conversion; @@ -7705,7 +7699,6 @@ void Sema::AddTemplateOverloadCandidate( Candidate.IgnoreObjectArgument = isa(Candidate.Function) && !isa(Candidate.Function); - Candidate.TookAddressOfOverload = false; Candidate.ExplicitCallArguments = Args.size(); if (Result == TemplateDeductionResult::NonDependentConversionFailure) Candidate.FailureKind = ovl_fail_bad_conversion; @@ -7886,9 +7879,6 @@ void Sema::AddConversionCandidate( OverloadCandidate &Candidate = CandidateSet.addCandidate(1); Candidate.FoundDecl = FoundDecl; Candidate.Function = Conversion; - Candidate.IsSurrogate = false; - Candidate.IgnoreObjectArgument = false; - Candidate.TookAddressOfOverload = false; Candidate.FinalConversion.setAsIdentityConversion(); Candidate.FinalConversion.setFromType(ConvType); Candidate.FinalConversion.setAllToTypes(ToType); @@ -8084,9 +8074,6 @@ void Sema::AddTemplateConversionCandidate( Candidate.Function = FunctionTemplate->getTemplatedDecl(); Candidate.Viable = false; Candidate.FailureKind = ovl_fail_bad_deduction; - Candidate.IsSurrogate = false; - Candidate.IgnoreObjectArgument = false; - Candidate.TookAddressOfOverload = false; Candidate.ExplicitCallArguments = 1; Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result, Info); @@ -8119,10 +8106,8 @@ void Sema::AddSurrogateCandidate(CXXConversionDecl *Conversion, Candidate.FoundDecl = FoundDecl; Candidate.Function = nullptr; Candidate.Surrogate = Conversion; - Candidate.Viable = true; Candidate.IsSurrogate = true; - Candidate.IgnoreObjectArgument = false; - Candidate.TookAddressOfOverload = false; + Candidate.Viable = true; Candidate.ExplicitCallArguments = Args.size(); // Determine the implicit conversion sequence for the implicit @@ -8328,9 +8313,6 @@ void Sema::AddBuiltinCandidate(QualType *ParamTys, ArrayRef Args, OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size()); Candidate.FoundDecl = DeclAccessPair::make(nullptr, AS_none); Candidate.Function = nullptr; - Candidate.IsSurrogate = false; - Candidate.IgnoreObjectArgument = false; - Candidate.TookAddressOfOverload = false; std::copy(ParamTys, ParamTys + Args.size(), Candidate.BuiltinParamTypes); // Determine the implicit conversion sequences for each of the diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/README.txt b/contrib/llvm-project/compiler-rt/lib/builtins/README.txt index 2d213d95f333..19f26c92a0f9 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/README.txt +++ b/contrib/llvm-project/compiler-rt/lib/builtins/README.txt @@ -272,6 +272,11 @@ switch32 switch8 switchu8 +// This function generates a custom trampoline function with the specific +// realFunc and localsPtr values. +void __trampoline_setup(uint32_t* trampOnStack, int trampSizeAllocated, + const void* realFunc, void* localsPtr); + // There is no C interface to the *_vfp_d8_d15_regs functions. There are // called in the prolog and epilog of Thumb1 functions. When the C++ ABI use // SJLJ for exceptions, each function with a catch clause or destructors needs diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c b/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c index 062cf80fc684..20061012e16c 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c +++ b/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c @@ -10,15 +10,6 @@ struct FEATURES { extern struct FEATURES __aarch64_cpu_features; -struct SME_STATE { - long PSTATE; - long TPIDR2_EL0; -}; - -extern struct SME_STATE __arm_sme_state(void) __arm_streaming_compatible; - -extern bool __aarch64_has_sme_and_tpidr2_el0; - #if __GNUC__ >= 9 #pragma GCC diagnostic ignored "-Wprio-ctor-dtor" #endif @@ -28,22 +19,3 @@ __attribute__((constructor(90))) static void get_aarch64_cpu_features(void) { __init_cpu_features(); } - -__attribute__((target("sve"))) long -__arm_get_current_vg(void) __arm_streaming_compatible { - struct SME_STATE State = __arm_sme_state(); - unsigned long long features = - __atomic_load_n(&__aarch64_cpu_features.features, __ATOMIC_RELAXED); - bool HasSVE = features & (1ULL << FEAT_SVE); - - if (!HasSVE && !__aarch64_has_sme_and_tpidr2_el0) - return 0; - - if (HasSVE || (State.PSTATE & 1)) { - long vl; - __asm__ __volatile__("cntd %0" : "=r"(vl)); - return vl; - } - - return 0; -} diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi.S b/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi.S index 4c0ff66931db..cd8153f60670 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi.S +++ b/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/sme-abi.S @@ -12,11 +12,15 @@ #if !defined(__APPLE__) *** 4259 LINES SKIPPED *** From nobody Sun Dec 1 12:54:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgc2hlDz5fb34; Sun, 01 Dec 2024 12:54:04 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgc1tYwz4P48; Sun, 1 Dec 2024 12:54:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5fWGEKwYg+4p3alqYxqcaCiGpTIEYnkY07agFQfp1Mc=; b=Xxn4rf4zFajAjJdTTlGwS5fWPUN6rHWOEvHxTtG/7yfKfNY/bOuZknK5zNRkfoHwUgidZo hEkMVdO6Ar8IqrsvfNlYjWBq1z4tqLoheluiSXPoEM8kqJrEmSDoQcSDgRigfxz6I+5c9U KzwKG9XB/CvRIF+dBfrWf3cieGio/rWzlYHbWGsd/cEl0HwP9kSbAlFXEFJriQOXu1yVQ6 GRrFnbnCHKhUIwngoiNEiF0vnQHeSIfn6LSc9AYOFn3EQbZlGwlFGcUKr+8pns1wIva2PO YsWQfTOJfh0q3k9wow80ZKjZ1j2w4MCel3QIEYuPRR4ERVfGLAXb8NBqOrcnlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5fWGEKwYg+4p3alqYxqcaCiGpTIEYnkY07agFQfp1Mc=; b=CFjWhcz9QtMi0XP5GH1rYWV0o66nnqAamcJiMnO7OXPFTXzftGjcSj8XAYY0dcVIBDnLJ0 2pDkZTPPvaUN6pThM/0hw2M8zGrdWAudZjQsLArDpxhYcpUJaJi9qcer8iQkn1739vJZCf ns6kLqCcghbfkyZJS8P7mCRPGdeKvG7ZCGoGF+FHbEvZUpSgLaxQmY/aKMFnglM73aRKFr K/3I50uqOnofr5oN809R3bU7hW/KqBBTT9Rwaz0YEkK9FJaUWnwvAu5xvVeM0lQdImuqwE geKButLgbDRAiiQKw73nQ8ATRT/ARgAnqPsk6HFDj6xOqIm3ZqxvmU+6u9X20Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057644; a=rsa-sha256; cv=none; b=I9EJ2LPR9hpI+KmEvQFBsCKqJInvCT+vHiQKOdyaBHqlfpSEYVrJe7pA27lPcrPm+7kAEn LuVe4ykv/VyDYSFHq65OjNA61oOCXdcoESjX/0COq3JQz2F3Pk5AHawZug9SLmhu6yBRjP O+x7rXf2C5hzVvoEjLKmDQjEBCX5NhnVrpL/RGw8T7R2asO1vPSM4j48yYTVE+xqXv5h1o fnM8tbsSDF31lFM2exVzd3QDTpn9u9DZ/hxFouG1zGKrcs4T3OgwaWmm0rAi+Pyv07ApKV 5cZzN0KmcZluJ9mfmahsE+bCvAx8jaG5CiLWBhPhep0/4WUx/mzIFN9Jy0j7Tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgc1V1FztNM; Sun, 1 Dec 2024 12:54:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1Cs4YL093236; Sun, 1 Dec 2024 12:54:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1Cs4sJ093233; Sun, 1 Dec 2024 12:54:04 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:04 GMT Message-Id: <202412011254.4B1Cs4sJ093233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f32d16872271 - stable/13 - Tentatively apply https://github.com/llvm/llvm-project/pull/101403 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f32d1687227199657c25748c9a2e692dcda9a505 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f32d1687227199657c25748c9a2e692dcda9a505 commit f32d1687227199657c25748c9a2e692dcda9a505 Author: Dimitry Andric AuthorDate: 2024-07-31 20:16:45 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:37 +0000 Tentatively apply https://github.com/llvm/llvm-project/pull/101403 PR: 280562 MFC after: 1 month (cherry picked from commit 3f157662c0ef9298725340be1f40cbf307bd154e) --- .../source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h | 2 +- .../Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h | 2 +- .../Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h index 89ffa617294a..b9537e6952f6 100644 --- a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h +++ b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h @@ -30,7 +30,7 @@ class NativeProcessFreeBSD; class NativeRegisterContextFreeBSD_arm : public NativeRegisterContextFreeBSD { public: NativeRegisterContextFreeBSD_arm(const ArchSpec &target_arch, - NativeThreadProtocol &native_thread); + NativeThreadFreeBSD &native_thread); uint32_t GetRegisterSetCount() const override; diff --git a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h index 0b4a508a7d5d..286b4fd8d8b9 100644 --- a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h +++ b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h @@ -31,7 +31,7 @@ class NativeRegisterContextFreeBSD_mips64 : public NativeRegisterContextFreeBSD { public: NativeRegisterContextFreeBSD_mips64(const ArchSpec &target_arch, - NativeThreadProtocol &native_thread); + NativeThreadFreeBSD &native_thread); uint32_t GetRegisterSetCount() const override; diff --git a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h index 3df371036f91..420db822acc0 100644 --- a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h +++ b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h @@ -31,7 +31,7 @@ class NativeRegisterContextFreeBSD_powerpc : public NativeRegisterContextFreeBSD { public: NativeRegisterContextFreeBSD_powerpc(const ArchSpec &target_arch, - NativeThreadProtocol &native_thread); + NativeThreadFreeBSD &native_thread); uint32_t GetRegisterSetCount() const override; From nobody Sun Dec 1 12:54:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgd5qJ5z5fb36; Sun, 01 Dec 2024 12:54:05 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgd36P5z4Njb; Sun, 1 Dec 2024 12:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tz1koFJ/6wEkObkWE3b6Zw8Lc4bGmY2r8uNrNfU4T8k=; b=HTuvik/KtjYeBo/WvopEd7MyTGMkVdoytG3hh7CgavfX8Wm5/ZnDgwTeXpP/G35rRIInu0 8VSInh2ta5caf4Q1QOyipwhUfVYQVjyJR5MYrPdCSc43Q3SUKsqwCoRbeck0Gd9vha7xTQ Idhu25/tFmSlzJXjZ9xxB0KwTsbHpCqvLevbZhmF/YbpR/Ctvkq0UNr923J5mDO1R79x9m bxKjqe9wvj5Ry9XhT+CgbTpZ/dSO0VlP9Zv1BKifNkdZx6tTrH8bk5eSYG/Rwn0t6I9u4l yy2Kk+ydX1vvzb74cVv2redX8YuzYQ6zmKBGxHB2L7YXhHynbNEYiSJ5QePsEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tz1koFJ/6wEkObkWE3b6Zw8Lc4bGmY2r8uNrNfU4T8k=; b=O73soFO8hIrVAafD/hT8Ngos/8oSPmU8DL9T9PRI+xMoKdk8Ra2ifX+c8jIkDgNNWVSyna fCGDORslvVAS8FVtA53GTJwT6IMFrUzAyeJsXKtML/pIWp4M0y7cl82xEsNg4/cBogzZGE HSMNWKrKfQiLBoQr/JnV666rHRU60wIun8WThgrLWPcRXwnr8Heuo8b7ovaVzOxtlhYD9U NZ1PLQerQcYKVxiN7dgEXjtbFzGXorUBsuBB95P1OyDAcBxWWY9/s1hpB2i4dgKKoLOKtw 9rJ6TVSQs+rIXgTNTE9qdZKsI0fx0P/4JqoOGs5s6txhMzJDaAEsvGdI6mPXCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057645; a=rsa-sha256; cv=none; b=twZZiUTCM0x3f/cvqDscsfj7QgtojTLMvoc2g3XJF80lvZvbfdr3xrcw0a9VwwA8rE0LOO 7djnWcSclN14pWM7+KWK8wZuYnRM/PF3umZIW5MO5W1zJPW+0zuqgxewLnmtBpxDLlbZQ1 yanVDHHtKh0WHPMudDpMXxTJ3HPF7FTUM5O32wEv9xxXC728caQXlKHORyBZ6j8XYgPhep xyxcypMoJeGlZNtX7N38il5iSBEWwovyjHLrBwj8nn0Yn4tasVLJDj6svfjB+NveiKmDm+ enRcEIPTriPWE3SbZ5PH8EBHzLflkr26f9h1UhBh6t9A0Hhv6+7e0tM4ldoLOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgd2Rs0zt54; Sun, 1 Dec 2024 12:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1Cs5gD093320; Sun, 1 Dec 2024 12:54:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1Cs5Ua093317; Sun, 1 Dec 2024 12:54:05 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:05 GMT Message-Id: <202412011254.4B1Cs5Ua093317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 37fd93d0c2df - stable/13 - libcxx simd_utils.h: only enable _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS for clang >= 15, since older versions do not support the required builtins. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 37fd93d0c2df56b709ca49b21036f5070417502a Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=37fd93d0c2df56b709ca49b21036f5070417502a commit 37fd93d0c2df56b709ca49b21036f5070417502a Author: Dimitry Andric AuthorDate: 2024-08-05 20:05:46 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:38 +0000 libcxx simd_utils.h: only enable _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS for clang >= 15, since older versions do not support the required builtins. PR: 280562 MFC after: 1 month (cherry picked from commit 6846ab2fb6630ca91ab0a71350d77358e521c1c7) --- contrib/llvm-project/libcxx/include/__algorithm/simd_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__algorithm/simd_utils.h b/contrib/llvm-project/libcxx/include/__algorithm/simd_utils.h index 549197be8018..cb5c93675cad 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/simd_utils.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/simd_utils.h @@ -28,7 +28,7 @@ _LIBCPP_PUSH_MACROS #include <__undef_macros> // TODO: Find out how altivec changes things and allow vectorizations there too. -#if _LIBCPP_STD_VER >= 14 && defined(_LIBCPP_CLANG_VER) && !defined(__ALTIVEC__) +#if _LIBCPP_STD_VER >= 14 && (defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1500) && !defined(__ALTIVEC__) # define _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS 1 #else # define _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS 0 From nobody Sun Dec 1 12:54:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgf5LbHz5fb0w; Sun, 01 Dec 2024 12:54:06 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgf42n4z4NrT; Sun, 1 Dec 2024 12:54:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VfG+aPOEKgW5xAZs+YLW09YqZ0ZiAkp10Q1f9fnLY+8=; b=SpJe3WFMcdK6MJel6xl4s51UN4xvo6JKPNYA99OtjUeHON8b7Ap+ZueQL8CifCNveYl/24 8q9j0VEdif7WSsIXcPJEeaxJNl245r9mpkg3huAtMfP28hHQegxWvAyBvQkFR1f0P7Ay3s EEPCbfifZGrDB9uS3Cw8dv6WZPHIOJuy0BCdB0Bcua1AScYIoH4Fmp2BvJeB5bFZDy26IK JGMpV/L5fVfOECBmAtrQnrfN5IcwaU1c7/5KukDAkl1HEDvPT3ntGInEEE3WPKyfQzrgPE D9fWykDVE2SJbS9vJuaIbtd6129kMimuNpj4lq9njmq6SG7BOcFPvv+eOpOWCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VfG+aPOEKgW5xAZs+YLW09YqZ0ZiAkp10Q1f9fnLY+8=; b=WrseL+e7gZA+hRte9FQJd9Pq0sZv1h/At9mbelsv0ER5ZyQRjtHC+AV5WUquVdbtQ0/4wK ZAReovcXqdoK9d+6MRthZcv094FWAD1CaZZgpfAl6EyfTBI6rviELNfGpWIzmTds/YD83F +lQkFt6yd9l6wuWHWBKtniaPJhKSbBFcsykXJ9NkLprSAcHLDXatt0NfsOfMZ/0Xl6Q/ko cj3NSzbeeEgpgNThzvPS2Knl9Vi4w3r6DqQQOKY9s2hTdAN73nKa6XpYECZvnJCRtBVGmw 2XCrRnMg7TLbmmoVCFWStzF+DXAOTroqJY/93/oxQQQXTMiiUMOcPIL+l7h/Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057646; a=rsa-sha256; cv=none; b=kXBs6mO58/SyN0ca1RFhZ+biNxLhgpzotxd9U7y8YFuTxFXBOYvI1zw+j3gRVMGzS2/uw5 77qNeU8QD7vnBwpkxzWyA2IP35EdTIcLo+qoTy1V2g3vQWUxSw8EKahvViUXpZs2wVgdga 53tWuURjRZhOxcEsUAgHdvcW5ahJqIvWz3Jo1MwqQf5xNCc2GciL1rplYOGleZWPKMWYqs qQz669LPhgsnQmkrSgdl0LUakOn6BkTvuARqQbqTczXingYeIApjW0Y3g5RDG7fBYalRzY 2HYQhmfpB1cR+Q8FC+2Ksa+buXuzLlS2ib1pfu0Tw8PNjKbbr360bHZqw15qHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgf3bBXztKt; Sun, 1 Dec 2024 12:54:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1Cs6Ca093415; Sun, 1 Dec 2024 12:54:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1Cs6IO093412; Sun, 1 Dec 2024 12:54:06 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:06 GMT Message-Id: <202412011254.4B1Cs6IO093412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 6a42a876ddcf - stable/13 - libcxx atomic_ref.h: add typename keyword for difference_type declarations, otherwise older clang versions cannot compile this header. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6a42a876ddcf7e86fd756e85d5d0fcae53921007 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=6a42a876ddcf7e86fd756e85d5d0fcae53921007 commit 6a42a876ddcf7e86fd756e85d5d0fcae53921007 Author: Dimitry Andric AuthorDate: 2024-08-05 20:07:28 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:38 +0000 libcxx atomic_ref.h: add typename keyword for difference_type declarations, otherwise older clang versions cannot compile this header. PR: 280562 MFC after: 1 month (cherry picked from commit 81e300df5e654eee3835ec2c6a2ae34cf317df72) --- contrib/llvm-project/libcxx/include/__atomic/atomic_ref.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__atomic/atomic_ref.h b/contrib/llvm-project/libcxx/include/__atomic/atomic_ref.h index 156f1961151c..f5ab6ffc9e77 100644 --- a/contrib/llvm-project/libcxx/include/__atomic/atomic_ref.h +++ b/contrib/llvm-project/libcxx/include/__atomic/atomic_ref.h @@ -241,7 +241,7 @@ template struct atomic_ref<_Tp> : public __atomic_ref_base<_Tp> { using __base = __atomic_ref_base<_Tp>; - using difference_type = __base::value_type; + using difference_type = typename __base::value_type; _LIBCPP_HIDE_FROM_ABI explicit atomic_ref(_Tp& __obj) : __base(__obj) { _LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN( @@ -287,7 +287,7 @@ template struct atomic_ref<_Tp> : public __atomic_ref_base<_Tp> { using __base = __atomic_ref_base<_Tp>; - using difference_type = __base::value_type; + using difference_type = typename __base::value_type; _LIBCPP_HIDE_FROM_ABI explicit atomic_ref(_Tp& __obj) : __base(__obj) { _LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN( From nobody Sun Dec 1 12:54:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgg73xzz5fZsT; Sun, 01 Dec 2024 12:54:07 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgg5G0Hz4P4h; Sun, 1 Dec 2024 12:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BdSds2PMKCVrYhxl17e1uLdRcDQf1vxm2uXfTFmhKz4=; b=Y4iR0jwENV4qXV6YXwbV7fzAs4K9TudMgb8AVLNdnmto1xiLNivwHB0qhoAn+0sfigyk/e Pb6Fx+KadsbOOjsabh92XcsWXM5j+X6Gvj+u/h8wK11zASij7Y4klPqHDEg0a9YjarULmq O+3lldSR+ezrGn45MIDo/IsFy5OniXK1+pZ8Au/LYl/B7NRkoBHs1djbhUudQra47eno6q qV+JNPylxuPwx8CbH3QDiSFWNX+g6Xw03b8s3okHUz63H8kiYG6ZnAbUOgzl/QwdhLOR2Z h2gbMVv29O0RwGr3waogL3cXFEwQ+tbT9U9PPS5JIVqjDVqtKEKgIoLtBkdANA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BdSds2PMKCVrYhxl17e1uLdRcDQf1vxm2uXfTFmhKz4=; b=sTT/FYw9l31YDCR4kb5Zf9BLoZZAzKBGfPvttymP03o29Jk76FAQP+s1wCKkUCk+uFyBJL Xw+N7t0nXzsmcvmcmAkSZVpABFGV7Ei88u1ut/48wly8yr1D5Co+pv6tK9AaPpQurfjKwN 35Mt8/oWxocBlQEnfZE7g1y6N9MBqS4Vno6GE6WRrP+9LpnSPYilSdfSVtWLT9RZTgkmUH hXaNCD+dgbUAixsgOzxhlSbFVNwNYJ0uUpTTyAPIOvuBkhkFwnGBlvbrJ+R/dENsJh+i++ kM4+XioSUuQiPmtJXDdnyWOZAzfCcF33Uqau1iq63FcMzDPAoOdkg7MB/QBNCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057647; a=rsa-sha256; cv=none; b=ItpkIafa/f1ZSem5JsK5P0GcIkx4MP6UG5OttUrShDTtCNrB4++lAVIQbyxQxEGRANeuB3 26xtTv5nAYHSr9p30bAbop8z7g1+JqOO9/o16QJ4oJ5bGTsX+OEFnBQsIOe4P+qLIiTXZ+ y2k2gFSmQ5EhRftkJD8sSXlcSVrODU74FdCX/UDR6qrXEAFyCZVlTuxFMWU9oTUCeNxAPe TYCicPA0zVe8L+rNlCrie+Sqa5RlMSsiK02spWjD6VNkQ5hUjYDyd8JC5eM94S1N1W8+5x qq/QCIqmvepzxQaac9YA32sFk+YlbpTkxq8FAB1ZzMOZxXYpkstxGUEh1HVuKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgg4kLwztNN; Sun, 1 Dec 2024 12:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1Cs7SO093512; Sun, 1 Dec 2024 12:54:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1Cs7Oa093509; Sun, 1 Dec 2024 12:54:07 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:07 GMT Message-Id: <202412011254.4B1Cs7Oa093509@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 1a8adfae6409 - stable/13 - libcxx cstdlib, cwchar: avoid using long long functions if not supported, even for older compilers that do not support the using_if_exists attribute. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1a8adfae64097d9fce7dab18ccaebd4b19effae3 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1a8adfae64097d9fce7dab18ccaebd4b19effae3 commit 1a8adfae64097d9fce7dab18ccaebd4b19effae3 Author: Dimitry Andric AuthorDate: 2024-08-05 20:08:49 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:38 +0000 libcxx cstdlib, cwchar: avoid using long long functions if not supported, even for older compilers that do not support the using_if_exists attribute. PR: 280562 MFC after: 1 month (cherry picked from commit 6b4981df6008fb59a5b4c1f0b79f0a0b21ac232e) --- contrib/llvm-project/libcxx/include/cstdlib | 12 ++++++++++++ contrib/llvm-project/libcxx/include/cwchar | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/contrib/llvm-project/libcxx/include/cstdlib b/contrib/llvm-project/libcxx/include/cstdlib index c817fd8f4acc..d9e17ee65c56 100644 --- a/contrib/llvm-project/libcxx/include/cstdlib +++ b/contrib/llvm-project/libcxx/include/cstdlib @@ -102,18 +102,26 @@ _LIBCPP_BEGIN_NAMESPACE_STD using ::size_t _LIBCPP_USING_IF_EXISTS; using ::div_t _LIBCPP_USING_IF_EXISTS; using ::ldiv_t _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::lldiv_t _LIBCPP_USING_IF_EXISTS; +#endif using ::atof _LIBCPP_USING_IF_EXISTS; using ::atoi _LIBCPP_USING_IF_EXISTS; using ::atol _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::atoll _LIBCPP_USING_IF_EXISTS; +#endif using ::strtod _LIBCPP_USING_IF_EXISTS; using ::strtof _LIBCPP_USING_IF_EXISTS; using ::strtold _LIBCPP_USING_IF_EXISTS; using ::strtol _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::strtoll _LIBCPP_USING_IF_EXISTS; +#endif using ::strtoul _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::strtoull _LIBCPP_USING_IF_EXISTS; +#endif using ::rand _LIBCPP_USING_IF_EXISTS; using ::srand _LIBCPP_USING_IF_EXISTS; using ::calloc _LIBCPP_USING_IF_EXISTS; @@ -130,10 +138,14 @@ using ::bsearch _LIBCPP_USING_IF_EXISTS; using ::qsort _LIBCPP_USING_IF_EXISTS; using ::abs _LIBCPP_USING_IF_EXISTS; using ::labs _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::llabs _LIBCPP_USING_IF_EXISTS; +#endif using ::div _LIBCPP_USING_IF_EXISTS; using ::ldiv _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::lldiv _LIBCPP_USING_IF_EXISTS; +#endif using ::mblen _LIBCPP_USING_IF_EXISTS; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS using ::mbtowc _LIBCPP_USING_IF_EXISTS; diff --git a/contrib/llvm-project/libcxx/include/cwchar b/contrib/llvm-project/libcxx/include/cwchar index 08cfac58c846..dd16eaeaa07f 100644 --- a/contrib/llvm-project/libcxx/include/cwchar +++ b/contrib/llvm-project/libcxx/include/cwchar @@ -151,9 +151,13 @@ using ::wcstod _LIBCPP_USING_IF_EXISTS; using ::wcstof _LIBCPP_USING_IF_EXISTS; using ::wcstold _LIBCPP_USING_IF_EXISTS; using ::wcstol _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::wcstoll _LIBCPP_USING_IF_EXISTS; +#endif using ::wcstoul _LIBCPP_USING_IF_EXISTS; +#if defined(__FreeBSD__) && defined(__LONG_LONG_SUPPORTED) using ::wcstoull _LIBCPP_USING_IF_EXISTS; +#endif using ::wcscpy _LIBCPP_USING_IF_EXISTS; using ::wcsncpy _LIBCPP_USING_IF_EXISTS; using ::wcscat _LIBCPP_USING_IF_EXISTS; From nobody Sun Dec 1 12:54:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgj10Bmz5fZvT; Sun, 01 Dec 2024 12:54:09 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgh6P2qz4P4m; Sun, 1 Dec 2024 12:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KsQTYZqs082jrCMI2oDA1a4JgpQB9ghWgxwSCmDpub4=; b=HJGL8DzinItin31RFMZ7Nnl+yoUm7WePPbwOC8rKk29nRiq4Dg8OcJ6hEgxQPOFWwT/LwK oly0jVbYt26uNAIfRUb/UO2y9jVjg9p89tr+CqFhFTYGwUMlGA+mpajuIFJT4gxNw9wBRP ZwNTq7Gg/acKlAgTtbd3sA4Gsv4RCcd751dB/7UIas2s2cSf31LRCQ2idrySchYY/jEa6V 3dQIWYb1SiThCSiIMfU/USXBTus94HaYrzlqW2R4/A7p/TwrHGLIFUEHrCovwbQym69CWq IIkbAM4rO3dQ0GY9viQOmn20OcaYDnhLNAxMYauw62ew2Afr8DBplOWjJuxAcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KsQTYZqs082jrCMI2oDA1a4JgpQB9ghWgxwSCmDpub4=; b=QROras5axgTaU6YnoTK2vraaO/eSa7REUR0hFGMaO/pVQwNhblebSDQ/ntoS8RhPKhe7HA kcHIm5Mwep4rygWfinRejxc03Y0BxZPD7OvaLjCk3aMceAbfjzIM6HUjU/3UQCd9Ebi1uP FQQHqe/Nc4gSGCZnor63Y2sIN30ttdBuadaQQ+Veh6ZCCd54Grv053+GoLw8zmyADw6rLH qiVLzq8ttfQsx+xzdMeBBHCKPqNnIvE71OVMp9s4bVLij5juatlNsQthvhxLsg/sgu9xwb LHvRfcp7BE1wsGXawCSw8Z059vItQfky55laOC7H2VE7zC4ziIFPMF5R94Sx6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057648; a=rsa-sha256; cv=none; b=Ei+SwV6mrg7X5hshQQ4IvGrvvXNKaUc0s1UwjKQ8KCTYhkd9fNMxHaF6jF6+/TChwQHsp/ ZmMNwM55qXiNcFko+lqS6iMAIzFsEwYTiz0fqtv+JEEtRlGzB+vLlHIXslnq2CS26KM4Os Qtpe/W7AJNjYotx+fnRyOxtzRUwC2XMtG7SVLkiLI76HMNIY/mZhV/caaidwemOMZ73S3M Em0YxDvIriBxIjr0BH2WTvjuNAWoVG3jpm9IlY/A8J0xwNSnsVQNbGIMZmNSJK/s4A7iyE qIdRmhdQ8NIgO/1q6wLsrakhaqHsTvwHx6lIndLDiYXMyLxeyigFCWK2VksSSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgh5hbTztn5; Sun, 1 Dec 2024 12:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1Cs8eH093585; Sun, 1 Dec 2024 12:54:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1Cs8OA093582; Sun, 1 Dec 2024 12:54:08 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:08 GMT Message-Id: <202412011254.4B1Cs8OA093582@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: cd0dbb0458c9 - stable/13 - libcxx-compat: revert llvmorg-19-init-18063-g561246e90282: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cd0dbb0458c954aa0dd69efbdb85cca1a4b82352 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cd0dbb0458c954aa0dd69efbdb85cca1a4b82352 commit cd0dbb0458c954aa0dd69efbdb85cca1a4b82352 Author: Dimitry Andric AuthorDate: 2024-08-05 20:13:12 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:39 +0000 libcxx-compat: revert llvmorg-19-init-18063-g561246e90282: [libc++][NFC] Remove wrong #endif comment PR: 280562 MFC after: 1 month (cherry picked from commit 2f6d6eaf2d511b212eab8ed002f3152c96deca3c) --- contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h index 50e9f3e8aa78..2c4e9e419a1b 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h @@ -28,7 +28,7 @@ using __remove_cv_t = typename remove_cv<_Tp>::type; #else template using __remove_cv_t = __remove_cv(_Tp); -#endif +#endif // __has_builtin(__remove_cv) #if _LIBCPP_STD_VER >= 14 template From nobody Sun Dec 1 12:54:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgk1L9Kz5fZsZ; Sun, 01 Dec 2024 12:54:10 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgk00b7z4P1C; Sun, 1 Dec 2024 12:54:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b+u1q9GDdl23yN4RJs4DjbK3aVwNzyGiQ6knHttBtoE=; b=b9zLy0eGPsEn5bWPzo6cMaZbZYLS0zkXhJWMMTaKmQ2VN5xkwPj9JRV5pEOIYZaoU6Aqrg f4tDEiMnf1hgmaPVmGBhq0WmfyR8Sa3gd7Uo8WOATKanHiDS7XcnZCoKzqvwLPEloPDTVN 40ila1bm92gKZcfCBlXI9DjvyZhZ2DStbjBpbG3ICjWUT1LY60JKJWBp6q0XZi9xbgM4nW HqsxJxKkZNyw7kVvB9zo/wXEdj0GBGoQpkNrcDwI97laOog+ynPQCZW/O6TmCD4cd9sbvL lileEq1JJgZsg2hg5OzKPl8mCDlrI9uf7pZYe8Fs7jI1ZFixrDkp18YIlAD11w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b+u1q9GDdl23yN4RJs4DjbK3aVwNzyGiQ6knHttBtoE=; b=srgSBt347NZJmqoueaRWLtnICBKzzym6tfyD9moUJR0+oH6T8k5XrbzrHw1Wa4YwnfXKWi xzBMHmPtJBiAmZDtpubmTqGpip8aWG1AIrkW7v10b9ilfxKO5Wr6G9J8QB6Oc39aCgfDQa 3T+7h2irFkVfCOzHpN/eFrOcBflhXva3z2dO98HJzmvQG4KSwGn1YpskYeDC3YGslczlFD NAxeuGn9WubZEaOt6ZgnmLIT8x7Ba9uw4rEU/CfTSXAeOVQguAa2/KnqMvIsP8rfaTC3+q vMZPFIeqHZzyaUfyCGuRBo7GcvdMiPVbVA3SY+2CzYV6yELkWI3OOLlPNnqCjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057650; a=rsa-sha256; cv=none; b=S1IpDV/2/bmhQaNwTq5tOM8qsremZIy4rYsHP59ViDq/7HzcWDuaGFVZYVC1/yo8XkBl22 fH4P3PWSt0eYQ3WTtmgHwvr8dKWQoZVbKAsXxhOnsTpVJ+V168G+5Ecs2lCBe7YB/UVcz1 2FWNgUhJELklxhxpJ6UJEmutFPnZ4HmHo/aoIsMnmx7zsOEqn8JcEfEG+2HOEEC87qgsPD QD9aKcAwC1Bq3DaX1cvo2dAsy1k8n6ajkD+sfLJlyRtX5PXsyQ4OOINKROgm1z7J+2esWV I5yl9b4kv7bj4ORUxrFTeTRMrIDK5dbaA5kHGqKssB8BFzzTQDXO7mpArULcmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgj6P9nztQ7; Sun, 1 Dec 2024 12:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1Cs91t093622; Sun, 1 Dec 2024 12:54:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1Cs9Kt093619; Sun, 1 Dec 2024 12:54:09 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:09 GMT Message-Id: <202412011254.4B1Cs9Kt093619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: b7cf9cba27f3 - stable/13 - libcxx-compat: revert llvmorg-19-init-18062-g4dfa75c663e5: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b7cf9cba27f3ca39182a809124220cd5ea48d251 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b7cf9cba27f3ca39182a809124220cd5ea48d251 commit b7cf9cba27f3ca39182a809124220cd5ea48d251 Author: Dimitry Andric AuthorDate: 2024-08-05 20:16:04 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:39 +0000 libcxx-compat: revert llvmorg-19-init-18062-g4dfa75c663e5: [libc++] Merge is_scoped_enum.h into is_enum.h (#99458) PR: 280562 MFC after: 1 month (cherry picked from commit 04f5b79cfa4972b371e7751dee5bbfaa91f2f2fc) --- .../libcxx/include/__type_traits/is_enum.h | 10 ------- .../libcxx/include/__type_traits/is_scoped_enum.h | 33 ++++++++++++++++++++++ .../llvm-project/libcxx/include/module.modulemap | 1 + contrib/llvm-project/libcxx/include/type_traits | 4 +++ 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_enum.h b/contrib/llvm-project/libcxx/include/__type_traits/is_enum.h index 2fab6db2c8d5..77ca3ea10874 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_enum.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_enum.h @@ -26,16 +26,6 @@ template inline constexpr bool is_enum_v = __is_enum(_Tp); #endif -#if _LIBCPP_STD_VER >= 23 - -template -struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {}; - -template -inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp); - -#endif // _LIBCPP_STD_VER >= 23 - _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_ENUM_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h b/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h new file mode 100644 index 000000000000..cb3e25cf5733 --- /dev/null +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H +#define _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H + +#include <__config> +#include <__type_traits/integral_constant.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +#if _LIBCPP_STD_VER >= 23 + +template +struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {}; + +template +inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp); + +#endif // _LIBCPP_STD_VER >= 23 + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H diff --git a/contrib/llvm-project/libcxx/include/module.modulemap b/contrib/llvm-project/libcxx/include/module.modulemap index 13d0dce34d97..d76659664f75 100644 --- a/contrib/llvm-project/libcxx/include/module.modulemap +++ b/contrib/llvm-project/libcxx/include/module.modulemap @@ -2013,6 +2013,7 @@ module std_private_type_traits_is_scalar [system header "__type_traits/is_scalar.h" export std_private_type_traits_is_null_pointer } +module std_private_type_traits_is_scoped_enum [system] { header "__type_traits/is_scoped_enum.h" } module std_private_type_traits_is_signed [system] { header "__type_traits/is_signed.h" } module std_private_type_traits_is_signed_integer [system] { header "__type_traits/is_signed_integer.h" } module std_private_type_traits_is_specialization [system] { header "__type_traits/is_specialization.h" } diff --git a/contrib/llvm-project/libcxx/include/type_traits b/contrib/llvm-project/libcxx/include/type_traits index 7f231cd09df5..ffa137338b6a 100644 --- a/contrib/llvm-project/libcxx/include/type_traits +++ b/contrib/llvm-project/libcxx/include/type_traits @@ -514,6 +514,10 @@ namespace std # include <__type_traits/unwrap_ref.h> #endif +#if _LIBCPP_STD_VER >= 23 +# include <__type_traits/is_scoped_enum.h> +#endif + #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) From nobody Sun Dec 1 12:54:10 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgl5YFJz5fZvZ; Sun, 01 Dec 2024 12:54:11 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgl14Zcz4P8L; Sun, 1 Dec 2024 12:54:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I2pucoWsLcbfpkD8GGYkh7QEce8F7WCzVqrBW+sbrqA=; b=TVaFG90FovwY62GqYe/5tOBFnPpuWuHYIgJCD6JIoTRAAiRSaNpotOxht53eBE8z+8C2Xg eaFp4+dHmzCc3cDXTiGwJtxcJonOCS3H/Yi5RVzZTQASJoc+HaUKu0AvI9OdNLksDpEtrB BjVqBENcd+iQ3Nhytutn8gESHwk5MsbaAgYMDm8xxseVTA/N22uIsPzutw6oYjKJgU7WD8 vShzqapxjd6Fz54htsyHJNDu8LtCl7PJI+UbWWNTgfDl9LRVpYx9lUpI6BKC5FfzpUhwOV 9Oa2+fmLOHBV5ZEzSF2dh0huLFXK+UD+/P5YIe5v7aQhBB70fKsvMBfnvhaGxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I2pucoWsLcbfpkD8GGYkh7QEce8F7WCzVqrBW+sbrqA=; b=XcSTOFErQE4feQ+p44gBl7NX9YM0nFUxqiE+kQQ8QwCIEM3Ojh6tsY7w1Lj4Y+sAAedcMG bfsTSNchWHST4SPbIU+0WMBJnHv1j/I8UaN9JTqwiaQDRVJSZoRj9fsTH+zFCrLMQLfb/0 cktzlsdoyOMiHOeBoDtqqF1IxBsgF+BmotlVKkz451K90LVEbcc+in7BwbFvkqHuI8Q2xl xLRM65gtKScK5g16VuZiTdJN9h3AByIbwDTQH8ky/HsaqjSJapGxN7XoqCBpXLsMNhkFt2 fOgBUjFihyJxcrNBalJDipeaircfetbzKBnDAzC5RzWEHnpsyXWLyH81ADkwmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057651; a=rsa-sha256; cv=none; b=cPNfm0dfN6iZ+PlnXRwUngg0tB7tTFYn0S7K1IX1m0K1/Q9ZbD7xEDAGTXHF4h71ZXVqmP rXawSAhameEZ/CscpuJJL2OgwUwDNwLAbX+wXoEjbZ8Ezep+tPcMh4V9xn6xfgYWuQd89I oyGk+fXSs3yncyYooGdwJFGtTOYHP1H30c3gtTxe6NJHA+i3He7l+cjh/UXsvJDsj4H6gq 6hOn5D5XEg1vxwpYP2phJXW2Dy03FTi+rqVsNK47VXBV36rFm2E0ztxosMJvIGmkpv25Fb uF+tqSspveXTnBSP651QBZY2JiH9LMAT6nKpQPHeLh14OjdgEZ2/gtLLLZJcBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgl0ZHVztn6; Sun, 1 Dec 2024 12:54:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsAUW093669; Sun, 1 Dec 2024 12:54:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsAjA093666; Sun, 1 Dec 2024 12:54:10 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:10 GMT Message-Id: <202412011254.4B1CsAjA093666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 6a3478b85758 - stable/13 - libcxx-compat: revert llvmorg-19-init-17853-g578c6191eff7: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6a3478b857586892c38db0d0f423f6a8964e837c Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=6a3478b857586892c38db0d0f423f6a8964e837c commit 6a3478b857586892c38db0d0f423f6a8964e837c Author: Dimitry Andric AuthorDate: 2024-08-05 20:17:17 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:39 +0000 libcxx-compat: revert llvmorg-19-init-17853-g578c6191eff7: [libc++] Simplify std::is_void (#99033) PR: 280562 MFC after: 1 month (cherry picked from commit e8054e44f4caf9c3968dcbf2d16bba37e987237b) --- .../libcxx/include/__type_traits/is_void.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_void.h b/contrib/llvm-project/libcxx/include/__type_traits/is_void.h index 46316b0d3a53..4c27060530c8 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_void.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_void.h @@ -11,6 +11,8 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_same.h> +#include <__type_traits/remove_cv.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -18,14 +20,28 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_void) + template -struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_same(__remove_cv(_Tp), void)> {}; +struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_void(_Tp)> {}; # if _LIBCPP_STD_VER >= 17 template -inline constexpr bool is_void_v = __is_same(__remove_cv(_Tp), void); +inline constexpr bool is_void_v = __is_void(_Tp); # endif +#else + +template +struct _LIBCPP_TEMPLATE_VIS is_void : public is_same<__remove_cv_t<_Tp>, void> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_void_v = is_void<_Tp>::value; +# endif + +#endif // __has_builtin(__is_void) + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_VOID_H From nobody Sun Dec 1 12:54:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgm5HL7z5fb5S; Sun, 01 Dec 2024 12:54:12 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgm2TkLz4PB8; Sun, 1 Dec 2024 12:54:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p2K6hJwzZ9CaNzicEFjBanHpVvx5SjBWAdNwDBjZZf8=; b=QgV8HJhrePvJR2rLnonBGcDQGeuq/pzD8sSnC6A8neu7KwW6nRLoL/FdATS9AmeeYr/fdp H3pxNXJSp64BBcV/Nw8G7CCCEu2t8hYE5/X911zNrPvpFeNhak2n5Uk1WJb8ND3ll3VrRu 6+7yYwrfHktl9m65p0EbP61LR3hPmiJdvC4UcmAtPZ42x/lk20tJAOuBjztmxehy3UGrMr m/O4y5unr3FKZfBIYWylr2GyJTl2++N4Uzd6BOONuCYbhtZgD2L7CheflY6Bl6mUpmN8KK SkA95+Ngl+3KgdOMhSZj0by53Gi4iiAU/g6ye4MvF6PWb2NwhKjan7Av2cSjhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p2K6hJwzZ9CaNzicEFjBanHpVvx5SjBWAdNwDBjZZf8=; b=mLDQ+47Ye53jCaFAqAqZY4lb2R4eS2WOQ1ipuWVha5QSbNuYQI4QSft9hxpOCNoVki5pGl mFff3J8MqUIoYLRZwpCEnf8hsPDSNfSzvGxw/GNYBMP31Vyy0TSwWYuvvmo7teZlC/J6nh HwdyZdHO3lSDn63G69mPql+fdzPiQYkbqzSz3msZ7w7FNzyDXgH/5lkKFkyysle9BwwG5o 720lUt9tEIUx0SQ5toN1AMYliZvTtWaxstWicebuTn/DZt25On4t7j13RHoqvlTByiALJN +goVSu/ijzFPsKEceMUrzz+CNmhy8HEfT8dI2Vih9np/SkGl571uvKbQoIQ5KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057652; a=rsa-sha256; cv=none; b=kyS2yMB82muNHvcJop3FtplAjhH4C5+W6IJQIQMlA9+GDuxNWm2h60KxJeJ5WKa3TFIP+t gFmyDL6uss7P/K7wodiWi5pXqJHalBg7tapbxB1j8dxn2rXq1a/OGFwadNCIVhjHO0D/tQ yN+CGjWSSiJCXQNWnk5QnzIkXKIgmOI4BRi1y0qBoHSHRus69XncbxkeBdem5hLahkxpIh f8WXFPirGetNu81JcznIjC7gCGH4oN7Og9Pib2bw33YU4phx+hA5ZAgk8oqPYa1/B7rsR9 FfjT1tc9XLjXVLNUjPkofD0aosVH/kbKfcHZ1Y4tocRntxo1teHoiXj+qPdMkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgm1YLGztQ8; Sun, 1 Dec 2024 12:54:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsCu2093721; Sun, 1 Dec 2024 12:54:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsCiv093718; Sun, 1 Dec 2024 12:54:12 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:12 GMT Message-Id: <202412011254.4B1CsCiv093718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: a8c253ec6520 - stable/13 - libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a8c253ec65209bdab2bde9205026d711ce1497bc Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a8c253ec65209bdab2bde9205026d711ce1497bc commit a8c253ec65209bdab2bde9205026d711ce1497bc Author: Dimitry Andric AuthorDate: 2024-08-05 20:17:59 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:39 +0000 libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d: [libc++] Simplify the implementation of is_null_pointer a bit (#98728) PR: 280562 MFC after: 1 month (cherry picked from commit 0bec0529b1d704f391ec499c39744f521e646a6d) --- .../libcxx/include/__type_traits/is_fundamental.h | 2 +- .../libcxx/include/__type_traits/is_null_pointer.h | 12 +++++++++--- .../llvm-project/libcxx/include/__type_traits/is_scalar.h | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h b/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h index 55f8e41f75f4..57206e0d9deb 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h @@ -34,7 +34,7 @@ inline constexpr bool is_fundamental_v = __is_fundamental(_Tp); template struct _LIBCPP_TEMPLATE_VIS is_fundamental - : public integral_constant::value || __is_null_pointer_v<_Tp> || is_arithmetic<_Tp>::value> {}; + : public integral_constant::value || __is_nullptr_t<_Tp>::value || is_arithmetic<_Tp>::value> {}; # if _LIBCPP_STD_VER >= 17 template diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h index 9f5697e23268..c666f5f24759 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h @@ -11,6 +11,7 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/remove_cv.h> #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -20,15 +21,20 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -inline const bool __is_null_pointer_v = __is_same(__remove_cv(_Tp), nullptr_t); +struct __is_nullptr_t_impl : public false_type {}; +template <> +struct __is_nullptr_t_impl : public true_type {}; + +template +struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; #if _LIBCPP_STD_VER >= 14 template -struct _LIBCPP_TEMPLATE_VIS is_null_pointer : integral_constant> {}; +struct _LIBCPP_TEMPLATE_VIS is_null_pointer : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; # if _LIBCPP_STD_VER >= 17 template -inline constexpr bool is_null_pointer_v = __is_null_pointer_v<_Tp>; +inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; # endif #endif // _LIBCPP_STD_VER >= 14 diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h b/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h index 455200de4720..15f1c71554f2 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h @@ -49,7 +49,7 @@ struct _LIBCPP_TEMPLATE_VIS is_scalar bool, is_arithmetic<_Tp>::value || is_member_pointer<_Tp>::value || is_pointer<_Tp>::value || - __is_null_pointer_v<_Tp> || + __is_nullptr_t<_Tp>::value || __is_block<_Tp>::value || is_enum<_Tp>::value> {}; // clang-format on From nobody Sun Dec 1 12:54:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgn4Bdrz5fZy4; Sun, 01 Dec 2024 12:54:13 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgn2tX1z4PDp; Sun, 1 Dec 2024 12:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fokni4qWz49qWuB8j4XcQkjQ57THy0fLy5l87GVYO64=; b=QfF/mN1X+msIgZwJim07nLP2SZkxYc50JE5O4SOi1VvH+QO1H5Q6HbXRjoJ4eFpokpdyGB 8w2Na20Z7xKugQpfb52XGXYg/772X/jLCq9nuigFADcJK6kmCBZKPnFud8T0p7VszspawI FHFfBRRp1pXzHxMjPD8M1eibz8wUiJ7VJyv+WhJOXFdhXHB9HRmX6OdEeHE4WqT46ONa6T iHrabZhNd+NL8jGBzg5F1YspzK+4n7jfqoN+pXEOIP72KFmozEDE83+Rn+73Q3/8dZjfBU v4kowxv852WrlSHmEuUBPqITXfDMa3X+/4LWa3fiTJ/ltJyGCIqwM2YLtvjf9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fokni4qWz49qWuB8j4XcQkjQ57THy0fLy5l87GVYO64=; b=BGSNh+eF0YHu2jUP4YZLbZ/76X6VagBU91l6w4FpoRWrXdVn7K4FppjxYglHSP1kLMNbWf dvstlVdVgEClmYq0LnSwk5TYeL5nt8fpfflRLxp1M9sgtVcYJP/o/chjioSEJCndmiKhk6 r3N3Bw/g8/E5uI8QnOuKcnI4ztmPBpBap/A+sBTW5K9j20LgqlNWagC/en4Xsw2Zvh8PH6 LbdAGVnAsWpGe3sZDDcU3mW8V0PQcgnDf6KZmLaw1Ch0XmTgkj5wJIzNIC3Xbrb12bDsgg hY2J9tJe/rJ9cWYBVUS9ZFjAghUtMFkEfwdaMbg+P73r8vlVpPrRLl/DNmXqTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057653; a=rsa-sha256; cv=none; b=tVRC3iBmj3mUmIDyC9YxTl2956rZ1sICZqFsYdZmWpYvf1vRoQWRZUSbhu9YmQkqVFSDSe +Ixjp9zdIbkhgMJNGzDTl6N61IqQhyMmC5/qOb1y67+W0mK6dHi8sHP5muPDY4FafXEUP3 yJTgN51lkHElsRk5x2uXeDXcN1r7JHCBMWGJdN2MrqkQe8wHTPa0Q2pAmghI+xxFLRLcUw wwfhziygpIWY48BJw7bS9TqXx0cKXMVpE2hvW7gtmMeoLBjHjv4EA1IidFEp+R6X0+HHiH 0mDqIAbPhnB1/d6TwHoOKqFxfhzU4A5QG3Fs6ET7IBd2eC/nAC/WgIP3uH0MEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgn2Vxpztn7; Sun, 1 Dec 2024 12:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsDIe093762; Sun, 1 Dec 2024 12:54:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsDG1093759; Sun, 1 Dec 2024 12:54:13 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:13 GMT Message-Id: <202412011254.4B1CsDG1093759@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: ea1948d2e49c - stable/13 - libcxx-compat: revert llvmorg-19-init-17727-g0eebb48fcfbc: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ea1948d2e49c6dd43f88204122ddc55834850790 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ea1948d2e49c6dd43f88204122ddc55834850790 commit ea1948d2e49c6dd43f88204122ddc55834850790 Author: Dimitry Andric AuthorDate: 2024-08-05 20:25:18 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:40 +0000 libcxx-compat: revert llvmorg-19-init-17727-g0eebb48fcfbc: [libc++] Merge is_member{,_object,_function}_pointer.h (#98727) The implementations for these traits have been simplified quite a bit, since we have builtins available for them now. PR: 280562 MFC after: 1 month (cherry picked from commit e8847079df1b7998ce84fd87c845d9eeef0567fb) --- .../libcxx/include/__type_traits/invoke.h | 3 ++- .../__type_traits/is_member_function_pointer.h | 31 ++++++++++++++++++++++ .../__type_traits/is_member_object_pointer.h | 31 ++++++++++++++++++++++ .../include/__type_traits/is_member_pointer.h | 12 --------- .../llvm-project/libcxx/include/module.modulemap | 2 ++ contrib/llvm-project/libcxx/include/type_traits | 2 ++ 6 files changed, 68 insertions(+), 13 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/invoke.h b/contrib/llvm-project/libcxx/include/__type_traits/invoke.h index 71db32ae6a3c..a0281f5b2006 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/invoke.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/invoke.h @@ -17,7 +17,8 @@ #include <__type_traits/integral_constant.h> #include <__type_traits/is_base_of.h> #include <__type_traits/is_core_convertible.h> -#include <__type_traits/is_member_pointer.h> +#include <__type_traits/is_member_function_pointer.h> +#include <__type_traits/is_member_object_pointer.h> #include <__type_traits/is_reference_wrapper.h> #include <__type_traits/is_same.h> #include <__type_traits/is_void.h> diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h new file mode 100644 index 000000000000..037d5ca04ab0 --- /dev/null +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H +#define _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H + +#include <__config> +#include <__type_traits/integral_constant.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template +struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer : _BoolConstant<__is_member_function_pointer(_Tp)> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp); +# endif + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h new file mode 100644 index 000000000000..555794bfe038 --- /dev/null +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_H +#define _LIBCPP___TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_H + +#include <__config> +#include <__type_traits/integral_constant.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template +struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer : _BoolConstant<__is_member_object_pointer(_Tp)> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp); +# endif + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h index cc125e318cf9..149634fde758 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h @@ -21,21 +21,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD template struct _LIBCPP_TEMPLATE_VIS is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> {}; -template -struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer : _BoolConstant<__is_member_object_pointer(_Tp)> {}; - -template -struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer : _BoolConstant<__is_member_function_pointer(_Tp)> {}; - # if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp); - -template -inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp); - -template -inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp); # endif _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/module.modulemap b/contrib/llvm-project/libcxx/include/module.modulemap index d76659664f75..8e0ba6eebac4 100644 --- a/contrib/llvm-project/libcxx/include/module.modulemap +++ b/contrib/llvm-project/libcxx/include/module.modulemap @@ -1976,6 +1976,8 @@ module std_private_type_traits_is_implicitly_default_constructible [system } module std_private_type_traits_is_integral [system] { header "__type_traits/is_integral.h" } module std_private_type_traits_is_literal_type [system] { header "__type_traits/is_literal_type.h" } +module std_private_type_traits_is_member_function_pointer [system] { header "__type_traits/is_member_function_pointer.h" } +module std_private_type_traits_is_member_object_pointer [system] { header "__type_traits/is_member_object_pointer.h" } module std_private_type_traits_is_member_pointer [system] { header "__type_traits/is_member_pointer.h" } module std_private_type_traits_is_nothrow_assignable [system] { header "__type_traits/is_nothrow_assignable.h" } module std_private_type_traits_is_nothrow_constructible [system] { diff --git a/contrib/llvm-project/libcxx/include/type_traits b/contrib/llvm-project/libcxx/include/type_traits index ffa137338b6a..08badb6aa06e 100644 --- a/contrib/llvm-project/libcxx/include/type_traits +++ b/contrib/llvm-project/libcxx/include/type_traits @@ -453,6 +453,8 @@ namespace std #include <__type_traits/is_fundamental.h> #include <__type_traits/is_integral.h> #include <__type_traits/is_literal_type.h> +#include <__type_traits/is_member_function_pointer.h> +#include <__type_traits/is_member_object_pointer.h> #include <__type_traits/is_member_pointer.h> #include <__type_traits/is_nothrow_assignable.h> #include <__type_traits/is_nothrow_constructible.h> From nobody Sun Dec 1 12:54:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgp4qSHz5fb3C; Sun, 01 Dec 2024 12:54:14 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgp424mz4PH7; Sun, 1 Dec 2024 12:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7dgeMkHgN4CwyyJc/mrcUNcg/tRXyNczcVKruj2lD1E=; b=RIi97iRwxVAamlMzPKq2VTZVFr4UW2lPz37c4Gczrzf0p702fZfGIZtRB3qY9qYhBwfe0U 3urWBwOL+ZIaZ2b2io5wIDRR+9PmY+cTjMAiWS2RWy7Zi1+NqqQlilWm8k69CK73Bd0A9g iGrHCwtCUdJP2GPY9cpozbbrrnEFnA93tjCNMhhBz2j1ws8RjkS9pThnIcXe1dJ0BlWeCF Ck9fw1DwZh+DaUhR5Baa161D/rKDW5NNHivF3w/Y7AUrUqQmwjGB1tVvOTm9l6+xJw4dvF WWQ7G3AWNLa25Mh00LVrNyzqyTHiVBZXx94f+KYwG3k4r65kI8NdRQ/NEXIjUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7dgeMkHgN4CwyyJc/mrcUNcg/tRXyNczcVKruj2lD1E=; b=A9b86tGyZZnwyJ5QBrv8w3Ln69vVBrhVfjqm7VTjWTG/URxqskwoaEt7uDsZ4fOM45/bil NGdCQBVvy3UyPVvIsAyfBTda1mEVmN57mKCQI07nECbbGSS61pht07hiGCnz1nYD7h1Ttr G7rqQHFs+O1zwJnpYU6BiBE4NfV9Kpyq1UyCn5ixQXlzAsoI8Kba59R6t8u4DGXsOyo7n7 wCwWCsesI2pONe9irmY1srHP6PdckmGmp6x5EYWbx+wlAG7DrdJV1mKUCUmDH28X3wYyQE ZR2ohopzqD5F46AFKiMw3CBY2hUplKCja2hTxuGKNertFl+dh6a1FyQWWoq9lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057654; a=rsa-sha256; cv=none; b=h4jtX1xL2kbrZnOR0LA53zg+5JfT4E8jVWSnt77YPvT82K8QUdncJFWmszDwgPDZSWAIhW 3p7wYp1zVr6TOqiq51EhxNBne+2fer439RVuaEQSB37TIVQxUcphAAdOdjAPN5WZ0Fr4qU IqJHybHfRuh0VM/iAosngsOs4zGcyWp8yZ6qy0Zfnu1WPu8hPJCkgBA/PJKb1qVxdgT8pW qE96S4qV3f/UlZgMOR+nu+GtyfbpPR6Y/LVw6UsjomWCKNW2Z27c2eimQuDWbmzf/yjgvy y9KUT3vbTOcCUaRR2ezTk0hY9RUIe2ULHTEImH1ih8Jl0QV72eTO0ZfuaBA4pw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgp35C9ztKv; Sun, 1 Dec 2024 12:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsEP2093798; Sun, 1 Dec 2024 12:54:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsECS093795; Sun, 1 Dec 2024 12:54:14 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:14 GMT Message-Id: <202412011254.4B1CsECS093795@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 3cbe40853904 - stable/13 - libcxx-compat: revert llvmorg-19-init-17473-g69fecaa1a455: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3cbe408539049bb30ea9816fb9cb996734c0eb5a Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3cbe408539049bb30ea9816fb9cb996734c0eb5a commit 3cbe408539049bb30ea9816fb9cb996734c0eb5a Author: Dimitry Andric AuthorDate: 2024-08-05 20:26:02 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:40 +0000 libcxx-compat: revert llvmorg-19-init-17473-g69fecaa1a455: [libc++] Clean up some now dead code with the upgrade to GCC 14 (#97746) PR: 280562 MFC after: 1 month (cherry picked from commit 2f2ebe758bea201830bd021525424813f7fc6c6b) --- contrib/llvm-project/libcxx/include/__config | 58 ++++++++++++++------ .../libcxx/include/__tuple/tuple_element.h | 26 +++++++++ .../libcxx/include/__type_traits/is_function.h | 14 ++++- .../__type_traits/is_member_function_pointer.h | 31 +++++++++++ .../__type_traits/is_member_object_pointer.h | 15 ++++++ .../include/__type_traits/is_member_pointer.h | 16 ++++++ .../__type_traits/is_nothrow_constructible.h | 61 ++++++++++++++++++++++ .../libcxx/include/__type_traits/is_object.h | 25 ++++++++- .../libcxx/include/__type_traits/is_reference.h | 29 ++++++---- .../libcxx/include/__type_traits/is_scoped_enum.h | 22 ++++++++ 10 files changed, 266 insertions(+), 31 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 2010e45ba13c..f44f18d52099 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -162,6 +162,16 @@ _LIBCPP_HARDENING_MODE_DEBUG # define _LIBCPP_CXX03_LANG # endif +// TODO: Remove once we switch to GCC 14 +# ifndef __has_extension +# define __has_extension(__x) 0 +# endif + +// TODO: Remove once we switch to GCC 14 +# ifndef __has_feature +# define __has_feature(__x) 0 +# endif + # ifndef __has_constexpr_builtin # define __has_constexpr_builtin(x) 0 # endif @@ -338,30 +348,44 @@ typedef __char32_t char32_t; # define _LIBCPP_PREFERRED_ALIGNOF(_Tp) __alignof(_Tp) +# if defined(_LIBCPP_COMPILER_CLANG_BASED) + // Objective-C++ features (opt-in) -# if __has_feature(objc_arc) -# define _LIBCPP_HAS_OBJC_ARC -# endif +# if __has_feature(objc_arc) +# define _LIBCPP_HAS_OBJC_ARC +# endif -# if __has_feature(objc_arc_weak) -# define _LIBCPP_HAS_OBJC_ARC_WEAK -# endif +# if __has_feature(objc_arc_weak) +# define _LIBCPP_HAS_OBJC_ARC_WEAK +# endif -# if __has_extension(blocks) -# define _LIBCPP_HAS_EXTENSION_BLOCKS -# endif +# if __has_extension(blocks) +# define _LIBCPP_HAS_EXTENSION_BLOCKS +# endif -# if defined(_LIBCPP_HAS_EXTENSION_BLOCKS) && defined(__APPLE__) -# define _LIBCPP_HAS_BLOCKS_RUNTIME -# endif +# if defined(_LIBCPP_HAS_EXTENSION_BLOCKS) && defined(__APPLE__) +# define _LIBCPP_HAS_BLOCKS_RUNTIME +# endif -# if !__has_feature(address_sanitizer) -# define _LIBCPP_HAS_NO_ASAN -# endif +# if !__has_feature(address_sanitizer) +# define _LIBCPP_HAS_NO_ASAN +# endif + +# define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__)) + +# define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__ + +# elif defined(_LIBCPP_COMPILER_GCC) + +# if !defined(__SANITIZE_ADDRESS__) +# define _LIBCPP_HAS_NO_ASAN +# endif + +# define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__)) -# define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__)) +# define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__ -# define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__ +# endif // _LIBCPP_COMPILER_[CLANG|GCC] # if defined(_LIBCPP_OBJECT_FORMAT_COFF) diff --git a/contrib/llvm-project/libcxx/include/__tuple/tuple_element.h b/contrib/llvm-project/libcxx/include/__tuple/tuple_element.h index 9127c47dc8f1..55b3b47619f6 100644 --- a/contrib/llvm-project/libcxx/include/__tuple/tuple_element.h +++ b/contrib/llvm-project/libcxx/include/__tuple/tuple_element.h @@ -40,6 +40,32 @@ struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp> { #ifndef _LIBCPP_CXX03_LANG +# if !__has_builtin(__type_pack_element) + +namespace __indexer_detail { + +template +struct __indexed { + using type _LIBCPP_NODEBUG = _Tp; +}; + +template +struct __indexer; + +template +struct __indexer<__tuple_types<_Types...>, __tuple_indices<_Idx...>> : __indexed<_Idx, _Types>... {}; + +template +__indexed<_Idx, _Tp> __at_index(__indexed<_Idx, _Tp> const&); + +} // namespace __indexer_detail + +template +using __type_pack_element _LIBCPP_NODEBUG = typename decltype(__indexer_detail::__at_index<_Idx>( + __indexer_detail::__indexer< __tuple_types<_Types...>, + typename __make_tuple_indices::type >{}))::type; +# endif + template struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...> > { static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range"); diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_function.h b/contrib/llvm-project/libcxx/include/__type_traits/is_function.h index 98fedd0ad96d..f09f19adf4aa 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_function.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_function.h @@ -11,6 +11,8 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_const.h> +#include <__type_traits/is_reference.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -18,12 +20,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_function) + template struct _LIBCPP_TEMPLATE_VIS is_function : integral_constant {}; +#else + +template +struct _LIBCPP_TEMPLATE_VIS is_function + : public integral_constant::value || is_const::value)> {}; + +#endif // __has_builtin(__is_function) + #if _LIBCPP_STD_VER >= 17 template -inline constexpr bool is_function_v = __is_function(_Tp); +inline constexpr bool is_function_v = is_function<_Tp>::value; #endif _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h index 037d5ca04ab0..11c8a00c9975 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_function_pointer.h @@ -11,6 +11,9 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_function.h> +#include <__type_traits/remove_cv.h> +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -18,6 +21,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD +template +struct __libcpp_is_member_pointer { + enum { __is_member = false, __is_func = false, __is_obj = false }; +}; +template +struct __libcpp_is_member_pointer<_Tp _Up::*> { + enum { + __is_member = true, + __is_func = is_function<_Tp>::value, + __is_obj = !__is_func, + }; +}; + +#if __has_builtin(__is_member_function_pointer) + template struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer : _BoolConstant<__is_member_function_pointer(_Tp)> {}; @@ -26,6 +44,19 @@ template inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp); # endif +#else // __has_builtin(__is_member_function_pointer) + +template +struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer + : public _BoolConstant<__libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_func> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; +# endif + +#endif // __has_builtin(__is_member_function_pointer) + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h index 555794bfe038..9141f9da530f 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_object_pointer.h @@ -18,6 +18,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_member_object_pointer) + template struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer : _BoolConstant<__is_member_object_pointer(_Tp)> {}; @@ -26,6 +28,19 @@ template inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp); # endif +#else // __has_builtin(__is_member_object_pointer) + +template +struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer + : public _BoolConstant<__libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_obj> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; +# endif + +#endif // __has_builtin(__is_member_object_pointer) + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h index 149634fde758..4ca01d1c2fc8 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_member_pointer.h @@ -11,6 +11,7 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_member_function_pointer.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -18,6 +19,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_member_pointer) + template struct _LIBCPP_TEMPLATE_VIS is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> {}; @@ -26,6 +29,19 @@ template inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp); # endif +#else // __has_builtin(__is_member_pointer) + +template +struct _LIBCPP_TEMPLATE_VIS is_member_pointer + : public _BoolConstant<__libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_member> {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; +# endif + +#endif // __has_builtin(__is_member_pointer) + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_nothrow_constructible.h b/contrib/llvm-project/libcxx/include/__type_traits/is_nothrow_constructible.h index 58d2b2475140..2f7ed8487e76 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_nothrow_constructible.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_nothrow_constructible.h @@ -13,6 +13,10 @@ #include <__type_traits/add_lvalue_reference.h> #include <__type_traits/add_rvalue_reference.h> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_constructible.h> +#include <__type_traits/is_reference.h> +#include <__utility/declval.h> +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -20,28 +24,85 @@ _LIBCPP_BEGIN_NAMESPACE_STD +// GCC is disabled due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 +#if __has_builtin(__is_nothrow_constructible) && !defined(_LIBCPP_COMPILER_GCC) + template < class _Tp, class... _Args> struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible : public integral_constant {}; +#else + +template +struct __libcpp_is_nothrow_constructible; + +template +struct __libcpp_is_nothrow_constructible + : public integral_constant()...))> {}; + +template +void __implicit_conversion_to(_Tp) noexcept {} + +template +struct __libcpp_is_nothrow_constructible + : public integral_constant(std::declval<_Arg>()))> {}; + +template +struct __libcpp_is_nothrow_constructible : public false_type { +}; + +template +struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible + : __libcpp_is_nothrow_constructible::value, + is_reference<_Tp>::value, + _Tp, + _Args...> {}; + +template +struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp[_Ns]> + : __libcpp_is_nothrow_constructible::value, is_reference<_Tp>::value, _Tp> {}; + +#endif // __has_builtin(__is_nothrow_constructible) #if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value; #endif +// TODO: remove this implementation once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 is fixed +#ifdef _LIBCPP_COMPILER_GCC + +template +struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible + : public is_nothrow_constructible<_Tp, __add_lvalue_reference_t > {}; + +#else // _LIBCPP_COMPILER_GCC + template struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible : public integral_constant< bool, __is_nothrow_constructible(_Tp, __add_lvalue_reference_t)> {}; +#endif // _LIBCPP_COMPILER_GCC + #if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value; #endif +// TODO: remove this implementation once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 is fixed +#ifndef _LIBCPP_COMPILER_GCC + template struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible : public integral_constant)> {}; +#else // _LIBCPP_COMPILER_GCC + +template +struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible + : public is_nothrow_constructible<_Tp, __add_rvalue_reference_t<_Tp> > {}; + +#endif // _LIBCPP_COMPILER_GCC + #if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value; diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_object.h b/contrib/llvm-project/libcxx/include/__type_traits/is_object.h index ec04508402ce..5ac1d854a695 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_object.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_object.h @@ -11,6 +11,10 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_array.h> +#include <__type_traits/is_class.h> +#include <__type_traits/is_scalar.h> +#include <__type_traits/is_union.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -18,13 +22,30 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__is_object) + template struct _LIBCPP_TEMPLATE_VIS is_object : _BoolConstant<__is_object(_Tp)> {}; -#if _LIBCPP_STD_VER >= 17 +# if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_object_v = __is_object(_Tp); -#endif +# endif + +#else // __has_builtin(__is_object) + +template +struct _LIBCPP_TEMPLATE_VIS is_object + : public integral_constant::value || is_array<_Tp>::value || is_union<_Tp>::value || + is_class<_Tp>::value > {}; + +# if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_object_v = is_object<_Tp>::value; +# endif + +#endif // __has_builtin(__is_object) _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_reference.h b/contrib/llvm-project/libcxx/include/__type_traits/is_reference.h index cc157a438e49..42853d479039 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_reference.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_reference.h @@ -18,15 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template -struct _LIBCPP_TEMPLATE_VIS is_reference : _BoolConstant<__is_reference(_Tp)> {}; - -#if _LIBCPP_STD_VER >= 17 -template -inline constexpr bool is_reference_v = __is_reference(_Tp); -#endif - -#if __has_builtin(__is_lvalue_reference) && __has_builtin(__is_rvalue_reference) +#if __has_builtin(__is_lvalue_reference) && __has_builtin(__is_rvalue_reference) && __has_builtin(__is_reference) template struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> {}; @@ -34,14 +26,19 @@ struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_refe template struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : _BoolConstant<__is_rvalue_reference(_Tp)> {}; +template +struct _LIBCPP_TEMPLATE_VIS is_reference : _BoolConstant<__is_reference(_Tp)> {}; + # if _LIBCPP_STD_VER >= 17 template +inline constexpr bool is_reference_v = __is_reference(_Tp); +template inline constexpr bool is_lvalue_reference_v = __is_lvalue_reference(_Tp); template inline constexpr bool is_rvalue_reference_v = __is_rvalue_reference(_Tp); # endif -#else // __has_builtin(__is_lvalue_reference) +#else // __has_builtin(__is_lvalue_reference) && etc... template struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : public false_type {}; @@ -53,7 +50,17 @@ struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : public false_type {}; template struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference<_Tp&&> : public true_type {}; +template +struct _LIBCPP_TEMPLATE_VIS is_reference : public false_type {}; +template +struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&> : public true_type {}; +template +struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&&> : public true_type {}; + # if _LIBCPP_STD_VER >= 17 +template +inline constexpr bool is_reference_v = is_reference<_Tp>::value; + template inline constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value; @@ -61,7 +68,7 @@ template inline constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; # endif -#endif // __has_builtin(__is_lvalue_reference) +#endif // __has_builtin(__is_lvalue_reference) && etc... _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h b/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h index cb3e25cf5733..1db88e13356e 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_scoped_enum.h @@ -11,6 +11,9 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_convertible.h> +#include <__type_traits/is_enum.h> +#include <__type_traits/underlying_type.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -20,12 +23,31 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 23 +// TODO: GCC and Clang both have this builtin. Remove the false case once we've updated to GCC 14. +# if __has_builtin(__is_scoped_enum) + template struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {}; template inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp); +# else + +template > +struct __is_scoped_enum_helper : false_type {}; + +template +struct __is_scoped_enum_helper<_Tp, true> : public bool_constant > > {}; + +template +struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : public __is_scoped_enum_helper<_Tp> {}; + +template +inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value; + +# endif // __has_builtin(__is_scoped_enum) + #endif // _LIBCPP_STD_VER >= 23 _LIBCPP_END_NAMESPACE_STD From nobody Sun Dec 1 12:54:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgr01fYz5fb5Z; Sun, 01 Dec 2024 12:54:16 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgq5ZcDz4PHH; Sun, 1 Dec 2024 12:54:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PFmRSQ9MmplrnPqPIw8EzSp8MQG9oTnEEXqwfXg7iRc=; b=Cj+JlSAILLlvyD3kERREKoRkUSYWSwRfqNyAWb9kN38WW/76Ccc62u9E3qTuRyglM+cPBr lGbBxWg1/uzoeLOHwdibTWJk3FJPYiU21JE5w7J9GZvHuVyP1vnwV8J76FWe120fMO6hAA ZiJNugs15X7HZKb5hN5uZFN+iaw6dzdGTDWCYWUcAvjtTsDBC3K5fp4wHctgWFXdqe/4/v PMnNjfbj5O4xz8Tox1o95oWmiOig0+9fsSf5sBmcouonbwr560W12dDhnEwsQL0631vh0v T/QdkgrxORvZzSdgiaEeWXjur1+WYJiBZivc3BXv0UJwBLL03Gz05KWFFymKtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PFmRSQ9MmplrnPqPIw8EzSp8MQG9oTnEEXqwfXg7iRc=; b=qDULPFiXUrf8YCbpQBMff6W+23StpybRb9ad0Y599rbXBieXlrEOwQ2F0KYu6jT4fwa6xh Fx5uKI28b+jKL6ficTy2mj4SAFO/eUMiZ+s8GUX24MmW5PSvneitfr7BKPusoUYgKDWSRD DgWEcCZRBsG/7xdl5E+XZQPWjwjrHbtAVsw8jnvt7IKxSDHm5G3eU6F9zgbGwyfm3j7iRS jFCpde6FOguc5iwC1IPtly29SyQMF9jQ1FF24984SarNRKlqpOisgS7gFIIIGqsPRSjfPx Rn9UkVsfpNHnD+fI5a2XMADbivq3Q7OFpOLCKTJrDpQf0vFgQuvo4vtE+xYXeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057655; a=rsa-sha256; cv=none; b=szZItVZUSj8PQzPwDMTwFSI2O1pG68n84n2QzOskQpBtZ+h1y66tZXplz8eS1qWuVZ5IN8 pAOGM+1E2LJzY79lMO+WECSlxJDFdMvVJv81zMkaIEssWDD0aeYB5u+CH6yLhU3P3OHzVW ULqbAbBc83w3szhaCzjcCBWDzhURIlyLB5C6IYMtDaFaKDbjnrOe+8Ce/wG0oY+DupKdw5 6Oo+RdPT4BQsXJtLhgaiI/dP5sr496Rb99kpjRJQLHLcoC1uVcSM1EoACg7tn97zCMdmXm iivPXw5fSu0PZ5HfDJT0XlrOs/F3MIH7thgGRGEBi8yUWXea0k5xm04+jHOKGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgq44Wtztkq; Sun, 1 Dec 2024 12:54:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsFKR093839; Sun, 1 Dec 2024 12:54:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsFeK093836; Sun, 1 Dec 2024 12:54:15 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:15 GMT Message-Id: <202412011254.4B1CsFeK093836@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 46400d102766 - stable/13 - libcxx-compat: revert llvmorg-19-init-8667-g472b612ccbed: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 46400d102766893ea63ef29bb547d95923af0c58 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=46400d102766893ea63ef29bb547d95923af0c58 commit 46400d102766893ea63ef29bb547d95923af0c58 Author: Dimitry Andric AuthorDate: 2024-08-05 20:26:27 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:40 +0000 libcxx-compat: revert llvmorg-19-init-8667-g472b612ccbed: [libc++][NFC] Remove unused includes from <__type_traits/remove_cv.h> (#88752) PR: 280562 MFC after: 1 month (cherry picked from commit 1199d38d8ec764ce8545888b4c091d00441842bf) --- contrib/llvm-project/libcxx/include/__format/format_arg.h | 1 - contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__format/format_arg.h b/contrib/llvm-project/libcxx/include/__format/format_arg.h index aa02f81dc40e..4924e5fb3253 100644 --- a/contrib/llvm-project/libcxx/include/__format/format_arg.h +++ b/contrib/llvm-project/libcxx/include/__format/format_arg.h @@ -19,7 +19,6 @@ #include <__fwd/format.h> #include <__memory/addressof.h> #include <__type_traits/conditional.h> -#include <__type_traits/remove_const.h> #include <__utility/forward.h> #include <__utility/move.h> #include <__utility/unreachable.h> diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h index 2c4e9e419a1b..8e1c04336432 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h @@ -10,6 +10,8 @@ #define _LIBCPP___TYPE_TRAITS_REMOVE_CV_H #include <__config> +#include <__type_traits/remove_const.h> +#include <__type_traits/remove_volatile.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header From nobody Sun Dec 1 12:54:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgs0gZ2z5fb5d; Sun, 01 Dec 2024 12:54:17 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgr5749z4PQQ; Sun, 1 Dec 2024 12:54:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AeURAXjz9UDObFb+r1xl/mkt9IfjUnzDBqbHZYm37kU=; b=goXIDH/2bP0wnDEr123Qx/CoDbk68yFg6pr5cn0xPE+P9ZJwfyvvudskKnyi6fkO09TTdP VVHx4Pfh/7sT+31QAblAwiWeM8zJwuzSUqDoUWMC10sipRYJygmHt6Lq350DOeVB4aiuVc FTEeMdGioKVvEzmheAPiXyvMq2GRlSuEDgF9FQDVpcAY1BCh8ruW4uHuzBV4vzNnDafIAf mlEYkfLFqANhfm1rPiIIMXvb4D2M9w9UNSwBfMhZipbgEXhuQbTokFEasFA0MxrbFakUq/ VbjumEHBnVGbatjKoIqOm7uq0Gpz7uQrwsQT5r+fh0VJTKPz0oRTDSQxrA1RCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AeURAXjz9UDObFb+r1xl/mkt9IfjUnzDBqbHZYm37kU=; b=fx8atITERytu48Du7zFjeWZGT9Q9KQ7VrcD7HCn9DXQZr9RlgMUoDCceVdDtXLhHEtMKnO 5ICsGa74uywVWWtGX2mjMNtUc4hZEUPC5plbglMbZ+K15KCgQFpwHV+kaz3TW7X8hsynet loL0A6186ar7pMselAF2WvGh4JqzSeidontA4lgZedLEgjSNw/cMSRY2GShN4kIGP9uHlT YZd+XTgODM/Zh4kVOqOZwT2tYle1iY3aH/OSsa6C5z9knSUUWpn2bmWe6PmhQ3t4MLIPq5 CcRWVmnRcS4wiqf82aybXY/xOrbVS8VZc7nwKNxMti2rsJ1l7CIfqe135pNkHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057656; a=rsa-sha256; cv=none; b=tGs9ANOu4qG7Kr/JcJaEdQbTDJivA/Wti0x4/3J8CTOwtxDz9fn8nR/AQx5pEUgTIeShuQ 0+oH53OWOth/OWqllDpVaVzDLdXQ4wUK287WWQXFy+/dRj+MyFzcFws8fi0HPoZAbLFTF5 wmH4ax02v0d9wAQBSQMEn4QYlk9pxMQRoQhB/nxficbLWIqUfbfuV6cnBoFt3T2GF1Ipcv fao04wkGJT5sm6FSUat0EelhsP/49Ldbiubz4jJmqfvqPb8XlkS3fC2pR3Ywv/zkdK1cFW gMtmienp2MKmD/RAKjjGbwyZ+ksZS8/d9IcdohA+atZXn3me1TpckDQVQ8PAwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgr4jhPztKw; Sun, 1 Dec 2024 12:54:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsG5x093875; Sun, 1 Dec 2024 12:54:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsGft093872; Sun, 1 Dec 2024 12:54:16 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:16 GMT Message-Id: <202412011254.4B1CsGft093872@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 816fc3e8b8b7 - stable/13 - libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 816fc3e8b8b73a92c908875c5b8b2924d1d2ec58 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=816fc3e8b8b73a92c908875c5b8b2924d1d2ec58 commit 816fc3e8b8b73a92c908875c5b8b2924d1d2ec58 Author: Dimitry Andric AuthorDate: 2024-08-05 20:26:58 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:41 +0000 libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83: [libc++] Simplify the implementation of remove_reference (#85207) GCC 13 introduced the type trait `__remove_reference`. We can simplify the implementation of `remove_reference` a bit by using it. PR: 280562 MFC after: 1 month (cherry picked from commit a7b2d7f261b81d141195c4204fdc4a0dc97a146e) --- .../libcxx/include/__type_traits/remove_reference.h | 14 +++++++------- contrib/llvm-project/libcxx/include/cwchar | 4 ---- contrib/llvm-project/libcxx/include/execution | 4 ---- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h index ba67891758ad..fd66417bd84f 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h @@ -10,6 +10,7 @@ #define _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H #include <__config> +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -25,16 +26,15 @@ struct remove_reference { template using __libcpp_remove_reference_t = __remove_reference_t(_Tp); -#elif __has_builtin(__remove_reference) -template -struct remove_reference { - using type _LIBCPP_NODEBUG = __remove_reference(_Tp); -}; +#else +// clang-format off +template struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _LIBCPP_NODEBUG _Tp type;}; +template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG _Tp type;}; +template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG _Tp type;}; +// clang-format on template using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type; -#else -# error "remove_reference not implemented!" #endif // __has_builtin(__remove_reference_t) #if _LIBCPP_STD_VER >= 14 diff --git a/contrib/llvm-project/libcxx/include/cwchar b/contrib/llvm-project/libcxx/include/cwchar index dd16eaeaa07f..7abcc3440947 100644 --- a/contrib/llvm-project/libcxx/include/cwchar +++ b/contrib/llvm-project/libcxx/include/cwchar @@ -258,8 +258,4 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_wmemchr(_Tp _LIBCPP_END_NAMESPACE_STD -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -#endif - #endif // _LIBCPP_CWCHAR diff --git a/contrib/llvm-project/libcxx/include/execution b/contrib/llvm-project/libcxx/include/execution index 94d434b2e460..822ffa1fd3eb 100644 --- a/contrib/llvm-project/libcxx/include/execution +++ b/contrib/llvm-project/libcxx/include/execution @@ -142,8 +142,4 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -#endif - #endif // _LIBCPP_EXECUTION From nobody Sun Dec 1 12:54:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgt0fysz5fZvj; Sun, 01 Dec 2024 12:54:18 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgs6Qj5z4PHf; Sun, 1 Dec 2024 12:54:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TMnDwLhM3lmgC+Jf2nM7NCL23ZtxMV6xEdRTvyyWWZI=; b=OZnnioHN9FPu6TqJXr7ft7B2qOpV/DwMgDXbcebOpmFALNEXRD26qtNJnn73wfimJ6XWFb 8gBfGxytXfWLZZBDwbJYscjYAlKd6/wbkL109vMlBBg4PJEqKVswn2P1icn6tYo0Zpx+sA H0RITKvLQbT2OZvxVScDOxLuucSi104QzYA42QXL4meIYXhOGF8/6ORhwCMLLyuEr7bKhM CwA/rffs2m67StoqwpRxMAmoV1H7jzbaRL85APHyjdozdHcqsgQs+NPFBHmTT+CNvMJv4V nsN0v4PpidpZVtXZjqsvtnsbNPxm59KF81/2YdEUCSm8RoOiB6TsG5FoNZVPUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TMnDwLhM3lmgC+Jf2nM7NCL23ZtxMV6xEdRTvyyWWZI=; b=MmeD0cTKiKrjrgYC5kaiFMr7L4jfWCq6mnxDz0+IXuuqt5o/vQo0vF5rT2eZ0irTqwpLB0 rhxTv3qrh9BKAveJ9atSmoaXvrbOBC8/CxutKKVOddMUjiYGgGMnmPkCLo1+8IttqaTHLm y+7o/s5MRHrlvnRH3iHx6L0IK1p5nIcyc9aH4J3lCdJlrp+G1kg9xIkWeOLfqkptTj/AkD g+ls8dBV6y8pmDwj12bHzdLNLs3eFa57FhgM2h73uLca9KcpM3U2Fu5NFCthp8rocatp3M pM9na5iPla0D9eU/kveQ429fpEFhq1G788k44xzn0v1R2I9YXZV2j6qR6eK1jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057657; a=rsa-sha256; cv=none; b=SyB8uy7U1lNqB8XX9JY5gtRwKHXJLgHhHG6UaQw8XotSQYXG78wFyVA0u7fMPzSHIMrl/I apS4A0coMEw9xztGjzUIMXkkJSBzUNA8cNSptgTwmXhI6UL5/yNW87RnaTh6xwmQyb6yic 8wtOdGzg5vf2b5uaLQ1gqTFLko4BRFJ1kjwsP9IMXTjW9YVyzEuFlKGSFn1EoYyCo1Heln JNH5byUP7pwk8Eo33iTCOhq43KZdV+8/Lstd4rBBr9pZrTSxcrLAKegjFZIzDbjOqA3f+5 qTk56TZZyMM7U1DCm711Wc2VmznwyZmFJdXN6kuwOxi/pOTbw3PnNSS+cTu0fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgs61GMzt55; Sun, 1 Dec 2024 12:54:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsHKB093912; Sun, 1 Dec 2024 12:54:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsHtw093909; Sun, 1 Dec 2024 12:54:17 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:17 GMT Message-Id: <202412011254.4B1CsHtw093909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 1e188e55f0da - stable/13 - libcxx-compat: revert llvmorg-19-init-4504-g937a5396cf3e: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1e188e55f0da21563f233146ab905493d0ee3f28 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1e188e55f0da21563f233146ab905493d0ee3f28 commit 1e188e55f0da21563f233146ab905493d0ee3f28 Author: Dimitry Andric AuthorDate: 2024-08-05 20:27:22 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:41 +0000 libcxx-compat: revert llvmorg-19-init-4504-g937a5396cf3e: [libc++] Remove unused includes from __type_traits/is_convertible.h (#83747) PR: 280562 MFC after: 1 month (cherry picked from commit f3859a1a13a119548fd80ccdc85e35b4e5d61f62) --- contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h b/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h index baa6df94714f..b378a20cedeb 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h @@ -11,6 +11,12 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_array.h> +#include <__type_traits/is_function.h> +#include <__type_traits/is_void.h> +#include <__type_traits/remove_reference.h> +#include <__utility/declval.h> +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header From nobody Sun Dec 1 12:54:18 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgv2phZz5fZvn; Sun, 01 Dec 2024 12:54:19 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgv0xTVz4PBm; Sun, 1 Dec 2024 12:54:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mIf9OHus0UQspuh0g2FQ8bRdXbbjwPTDup+fl3OFkyE=; b=U5svyr5Dr8BAnqjvQiEoWnOWTelIaiSVgasrHebTqD+xdq+a9H4fYdf3hKcMw4TLZBHRES 7BpPYQ+VIWE5gZ0EQ0//M/qvK8BkYJNqGsPxvcds/CMo5Ho9jIKI0L8HWSjChuaHcHbRVP 2NZIQ+apftrbxnT4jOXZOLU0PstIyvvHrUsHniznV1mmkV7dy0a0JuxbayOmeOwnfIJPcc KiCKHYto0NzLFA8qXymMscnur5cqU3Phyzen+t8WzIqaX+MZdVsNCVlww9KZSctMd6jE5+ 8wJ+nSmRHZUPJwVTEDWWJ7PGEdCjzFCPGj12UYifXr/s6W04U54wUXwKjVJHeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mIf9OHus0UQspuh0g2FQ8bRdXbbjwPTDup+fl3OFkyE=; b=JP1EiAa621w8kN9+3qK7IVbmDGzdsgFHx5Fp+4yq1jqnRC4eIKK1qkK9UUdF0aDlelJ3wp MLLu2fluo7dcdxIHiC3o6VB88CxRfoBuYChftJ6QE9hYGBIMoBj6Z02qy1tft4WxPxWhMm JIzfTeHMqod0KBV5qPEdTyYkg1pWc0sKEKEox3uwiqc6PQuTHhPXPtl+WVB4D2fP50c5G7 CSE9IWI6bRdDPc6WsRPezwq/9+w/7M/fzYeKZEZWr93K1lL/QZ0tTnURX5lDdfpcFPVjxW 8kMHwCkyPWHHCHUf55zwxOaVYjeKbIPC2OI/PVydwxkgGdrHPHvDSZEwabX+9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057659; a=rsa-sha256; cv=none; b=GiAx4z8xc0Lzz/LtD9/S4S8nrjuUqNKTNEM6wiNDrCdkPOnJXuyW14RgmngbEy/eTDuNMj r19CRKaPw46gOz5rdXxNgWr9uduILGet1WpOAmAJLdJdjgs/HKSCtSQ+Tu5YcoPxeYN8d2 HdxxbckCXrLETCO8K1G4yJl2VqZ1er6Z9YZ0XMqTL7uZ8c/ohMFJJbwRC0ZtwMbii/DRem ZKJUtQcOIabcUP/3G3K8OSH6olWVwbmk/OSFYHrAJF3zqPGrDt+6nUx+aykqpETYxNfTgS fU9xaU3XF3XQPzqwUGVDr0S4UqPCmlVrnpB9m9iXVBrIXEMTA8sovsoajqZ5qA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgt6zyhztNP; Sun, 1 Dec 2024 12:54:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsIV1093953; Sun, 1 Dec 2024 12:54:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsIVA093950; Sun, 1 Dec 2024 12:54:18 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:18 GMT Message-Id: <202412011254.4B1CsIVA093950@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 718c82d22a1f - stable/13 - libcxx-compat: revert llvmorg-19-init-4003-g55357160d0e1: List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 718c82d22a1ff385b3f1ea3aa13f692125613d6d Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=718c82d22a1ff385b3f1ea3aa13f692125613d6d commit 718c82d22a1ff385b3f1ea3aa13f692125613d6d Author: Dimitry Andric AuthorDate: 2024-08-05 20:27:51 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:41 +0000 libcxx-compat: revert llvmorg-19-init-4003-g55357160d0e1: [libc++] Use GCC type traits builtins for remove_cv and remove_cvref (#81386) They have been added recently to GCC without support for mangling. This patch uses them in structs and adds aliases to these structs instead of the builtins directly. PR: 280562 MFC after: 1 month (cherry picked from commit 072b5fb698abd61ab30bea70135758336b0de999) --- .../llvm-project/libcxx/include/__type_traits/remove_cv.h | 11 ++++++++--- .../libcxx/include/__type_traits/remove_cvref.h | 15 +++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h index 8e1c04336432..c4bf612794bd 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h @@ -19,17 +19,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__remove_cv) && !defined(_LIBCPP_COMPILER_GCC) template struct remove_cv { using type _LIBCPP_NODEBUG = __remove_cv(_Tp); }; -#if defined(_LIBCPP_COMPILER_GCC) template -using __remove_cv_t = typename remove_cv<_Tp>::type; +using __remove_cv_t = __remove_cv(_Tp); #else template -using __remove_cv_t = __remove_cv(_Tp); +struct _LIBCPP_TEMPLATE_VIS remove_cv { + typedef __remove_volatile_t<__remove_const_t<_Tp> > type; +}; + +template +using __remove_cv_t = __remove_volatile_t<__remove_const_t<_Tp> >; #endif // __has_builtin(__remove_cv) #if _LIBCPP_STD_VER >= 14 diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h index 55f894dbd1d8..e8e8745ab096 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h @@ -20,26 +20,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if defined(_LIBCPP_COMPILER_GCC) +#if __has_builtin(__remove_cvref) && !defined(_LIBCPP_COMPILER_GCC) template -struct __remove_cvref_gcc { - using type = __remove_cvref(_Tp); -}; - -template -using __remove_cvref_t _LIBCPP_NODEBUG = typename __remove_cvref_gcc<_Tp>::type; +using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); #else template -using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); +using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >; #endif // __has_builtin(__remove_cvref) template -using __is_same_uncvref = _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> >; +struct __is_same_uncvref : _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> > {}; #if _LIBCPP_STD_VER >= 20 template struct remove_cvref { - using type _LIBCPP_NODEBUG = __remove_cvref(_Tp); + using type _LIBCPP_NODEBUG = __remove_cvref_t<_Tp>; }; template From nobody Sun Dec 1 12:54:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgw30CDz5fb1G; Sun, 01 Dec 2024 12:54:20 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgw24Bvz4PBy; Sun, 1 Dec 2024 12:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oJY4VNBAkA2ru3JHI6LfnkFhgO5Wgbt8Mb0UNyP45E4=; b=Yh4uFtaXyV8FnBJGFrZIK5wnz80exGQj+zolmBUNPRxuFt901d3Gee2ZJIMrMSJWQZUC6y YJpaVikVBP5YL7cdTe/rciXECfri2dYSIgrtC5ciVNmXgi1k0JDbFNlzcRWC4no4fIP71h e+aPq6+675PcrP/8uVEUhUIld4WdquTb+DjFztOInr4yU3jCJOuOKJ2XWoEaOBjJ1jjN2Y OlqRA6PW3I3GmDZijMmKGqmWA7JhgXbQk6s+N86qRiYq7HLJJ3cXNxsxgSNN3yEAkWncvJ UCE8lGoJ0bIeFvXovGL3L53ajxpjxem6ZFyYFBjv2+E2ZrB7IGDP7WuglTDdiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oJY4VNBAkA2ru3JHI6LfnkFhgO5Wgbt8Mb0UNyP45E4=; b=yW6ZRSv5yKeEvTbBS5gdqHtmoCZHhJi674BrqLxM7PCm3RzrBDKX2p9cil2wf42j6g0hIF viV+nR8NfghDgPOZ6+mVqjQQd5asgVhYyCwhhG4nfZt5B907yGEVFqlNNrb/9WeQvIy6R9 UMmu1kGzA/3BAAwRdsJvfj2Yn2x9pUKRWtgcG/yDvob9oweJIBVHGm8mHYRItUyErfLDRp CbwJocLfnfe8eTI7d7bIXXGES4egofNAByPImNCpIWoNRF7mZnNbHVw9mZGpWU7Eg0uMcv vBPKFU7zNg5/0bjd61fid2Hc2yFRShk+4qW+lydLvYkKPklCf/oeF4rLLW0y3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057660; a=rsa-sha256; cv=none; b=MLz4AmeJ35rek4sxnp43T9C23NWqbUXDNKJRDbvkeXy5sdTyeM649YtB0LoFSMmdS0Vpzn 1Qk9LcM8BVC3zujv0UDNE5qQ5lh/ya7BPVQxDdsLycn/xuA858RsFU9GaUmRCCn4IPut7y DE7JLHWj0IeYpAoP4yVN6v/1njY+AJjhqM+fDIyWLGaBufL9sBNUJrKplrCaBrgF9Lqzob qujmUy4VrTOJ+TFtmV/Gq551vujY6ZAT/mQbk4xsDpANoPXb1WIvbEICGQLowHKg/EzT3P i0j9B5I4gjFqWmGueALGbyUvHHVPnot13dr8Em6ZqASYkUumCFnLTk5f61hyaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgw0lFMztNQ; Sun, 1 Dec 2024 12:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsKN0094009; Sun, 1 Dec 2024 12:54:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsJW9094006; Sun, 1 Dec 2024 12:54:19 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:19 GMT Message-Id: <202412011254.4B1CsJW9094006@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 3315b7e218b0 - stable/13 - libcxx-compat: don't remove headers that were reintroduced by reverts List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3315b7e218b08c017b9e665fefb0ee524eee7b68 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3315b7e218b08c017b9e665fefb0ee524eee7b68 commit 3315b7e218b08c017b9e665fefb0ee524eee7b68 Author: Dimitry Andric AuthorDate: 2024-08-05 20:36:02 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:42 +0000 libcxx-compat: don't remove headers that were reintroduced by reverts PR: 280562 MFC after: 1 month (cherry picked from commit b60301d8b5949438150f7b8ff89cfc45acab34cf) --- ObsoleteFiles.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index da9b537e4599..2d18851051d8 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -510,8 +510,6 @@ OLD_FILES+=usr/include/c++/v1/__type_traits/apply_cv.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_copy_assignable.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_copy_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_default_constructible.h -OLD_FILES+=usr/include/c++/v1/__type_traits/is_member_function_pointer.h -OLD_FILES+=usr/include/c++/v1/__type_traits/is_member_object_pointer.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_move_assignable.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_move_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_copy_assignable.h @@ -519,7 +517,6 @@ OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_copy_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_default_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_move_assignable.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_nothrow_move_constructible.h -OLD_FILES+=usr/include/c++/v1/__type_traits/is_scoped_enum.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_trivially_copy_assignable.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_trivially_copy_constructible.h OLD_FILES+=usr/include/c++/v1/__type_traits/is_trivially_default_constructible.h From nobody Sun Dec 1 12:54:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgx4vcLz5fbL9; Sun, 01 Dec 2024 12:54:21 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgx2hSHz4PCH; Sun, 1 Dec 2024 12:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M2HeDNtLLvvm2qfeDo5uhRxe+7Cgz9dcZEZW/RzTxkw=; b=AJGwwdSnPgZaXw6AwG5mcp4hUk5kBFECH4fjSX1V9CAA2GPXdihIUAoPNLYc7FfuWn1HlH LifhiaWlEBujwbKc+dto7h5d0fGf7kRRFqIQeYYIdfou4EPuvsrbQ6eHn5HaK38SKKE3/7 XLX27u23ZYAUZlhHZ0IeGyvS/9o9yx8JkK72tTmaGa1Behea9XAJzj+95+jDy9qUI8+t8F AwnzHU2KGyttDQM0fVjEOQZdedT9Y8vttJkLdflcE6CgM52Xyl6GEZDIO68eFiki43uYis xotWpGo+APdhrdjHzDv22XHujRoKBn6RwIAYbX+vAMnrSh58M7q4tzEdSu8Qpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M2HeDNtLLvvm2qfeDo5uhRxe+7Cgz9dcZEZW/RzTxkw=; b=YQV0G8uq0dcrjk99RFPblLAINHrFz/yqMxhVX/7HNws0U7Sc6FtmZ/T0eFHlq/Yf33lV66 9VfGQFpRqOnphfgblGVslpOXXZDTMaJzh95BCTWcWde2g4GhvDjnOkVlfh9w6Wua+igkXn o3gVnC2DdTngwqCWi92LLjQ7vX77h7REJGXcG9le8uou1OI8q5gjxdG4lOic0TNVHXLZPT KwApmhqq9ZID45KlPMqQwEwJl7pLbpocRgR8O5G6+93VkQ/MaQlagSzYFvYXNXMYpLGgI8 i5YbqtUhxZVgocnLx3lXqjqFNLT1RCV+SSZ1XNBxROGZ8VZy+toqwrGOGxUQOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057661; a=rsa-sha256; cv=none; b=GUMSDQfjw5ZPWfGJ4MAV5lPcmS6iqsV07Nhd2lT/fyDEV5rGa5Gydg0DX/e5D82v5V7KXM vqrNNTyj33qL0xpnrAnl6slvyg2qRPq6+MwK8roECpcbR1Yp3A7fEgH9Mwg3RvmSb3GIDi oXBk+hwFFqxUN9ZPSiHUTnyElrDBoqZmw6FqH1mZmGSPMhQJgnbPsubQta8ad/chtbAlp2 2ulRvOO8RDWBeErKSPiL+zQbCLTTSftf0jb/se4JY9LVfhCeTetMvzp67temgfQMLzHJhQ S83+mdDW6tAYPS5O5g/oaZ7rtBiehDoVDA+Iq2jthLvrV9GHU9PsiK0G2jweQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgx1m7xzt56; Sun, 1 Dec 2024 12:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsLvA094070; Sun, 1 Dec 2024 12:54:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsLwI094067; Sun, 1 Dec 2024 12:54:21 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:21 GMT Message-Id: <202412011254.4B1CsLwI094067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 320a4f33f713 - stable/13 - libcxx-compat: install headers that were reintroduced by reverts List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 320a4f33f7130d6296f8afcda52fec7348313b39 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=320a4f33f7130d6296f8afcda52fec7348313b39 commit 320a4f33f7130d6296f8afcda52fec7348313b39 Author: Dimitry Andric AuthorDate: 2024-08-05 20:41:08 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:42 +0000 libcxx-compat: install headers that were reintroduced by reverts PR: 280562 MFC after: 1 month (cherry picked from commit 2e861daab905dcc0c2056e5712de5e1c0d1f865b) --- lib/libc++/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index 700d74244d57..048a84ba6bf4 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -1259,6 +1259,8 @@ TTR_HEADERS+= is_fundamental.h TTR_HEADERS+= is_implicitly_default_constructible.h TTR_HEADERS+= is_integral.h TTR_HEADERS+= is_literal_type.h +TTR_HEADERS+= is_member_function_pointer.h +TTR_HEADERS+= is_member_object_pointer.h TTR_HEADERS+= is_member_pointer.h TTR_HEADERS+= is_nothrow_assignable.h TTR_HEADERS+= is_nothrow_constructible.h @@ -1275,6 +1277,7 @@ TTR_HEADERS+= is_reference_wrapper.h TTR_HEADERS+= is_referenceable.h TTR_HEADERS+= is_same.h TTR_HEADERS+= is_scalar.h +TTR_HEADERS+= is_scoped_enum.h TTR_HEADERS+= is_signed.h TTR_HEADERS+= is_signed_integer.h TTR_HEADERS+= is_specialization.h From nobody Sun Dec 1 12:54:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rgy5D77z5fbNP; Sun, 01 Dec 2024 12:54:22 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgy3ctxz4PWc; Sun, 1 Dec 2024 12:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OsrmsWL8tPOiJ+jcTflYD7P9ObdGOwv1ic6Gm7luu4o=; b=oEIMOKG3AT3bC+uZSg4pu9URxHGAgMejLKjmoCL0NufAc23MS6DAo/8GNgzOlEZ4NTUSuP Ljcanxt6UxNq4Oj1Y8EXwwx1dA9P3rXIJUmpFFWLOYm0GNsEs6RrG5sJkMbbESB1+7bk1s pYz656F6yDJb9udEBk8HB9NlEFYLkPA5qE7pb833sMGOo1Z0K06TlS0nnzxuTw/xuEymI2 l2n/cv6Pxvlr6iC+jKtvlTNNdTDCP022uq/CNjFs8kKgl6JbMMiHpre+guv/2CaBzkQzNb iRXxl10CoaY2EMj92XjKEGVXdv/XGXtB7NYo9TPM6F5sIynd6P/dL6sgxgEkfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OsrmsWL8tPOiJ+jcTflYD7P9ObdGOwv1ic6Gm7luu4o=; b=tuv2RgRTXMye9AXfLvYs9FUy9as1+bCkSlilPBbVo6FSm63Wwn66Dvn5hQK/Kv9/yzOMN+ L+MsKGNHTnqIxTzLhKpfaOWoByjJlzYORNxBBbTfN0ewTkSXsHNEFbUnizMC4owZdmduKV SLHoM7A/XNxvErk0Y9hqvMtXm7vJIdY3M7SqmPlYbhEtR8pELy06v9ZE5Jt1yzTlNUh5c4 mNnH8/+QpQ2QoDxt0xAurQSzTqeO7bKuleOOQhoTjiIIPSmDnm25E25yZf41fVEUW8QllX Bp0pVmIDtFuyzORp67N7VZ6A8fqza3aeLNZeEgt4MxZM+miKJXxf7JtfXyXzEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057662; a=rsa-sha256; cv=none; b=V1lRKyNqsD8C+g+v54uGQio5zFpqYWDnramuYbqzarqxtjfDhH/t+vh7Ua+HdwMySdNZ6x LGuW7uSpsFdCe4xF1YWDYhLfd7zMfmnvhW7q13fDRFvY49Y1lakubLj8tSSVVn56cNzs3n k16DKBdy2nKdZ3F9dCXII+8b0H6UKbGCizes1goriZ2shXnuFqns7qjIUOK/KVBWL7Ziyw rC2mov7L3vSrcQQZzCacaIzWrJ3mk9u6l0HjSyBB4TRNxesEaUgB18GNnodJi0SLqsX4+b y0fl3NkNyvTbEtGnf6G2WXfeMQSZUjI6XgwYk6fq9vhZY4lsUBazBjNPMTMoYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgy2w5zztjp; Sun, 1 Dec 2024 12:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsM4f094127; Sun, 1 Dec 2024 12:54:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsMDq094124; Sun, 1 Dec 2024 12:54:22 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:22 GMT Message-Id: <202412011254.4B1CsMDq094124@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 53f95de8ceca - stable/13 - libcxx-compat: update libcxx.imp for headers that were reintroduced by reverts List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 53f95de8ceca9b285484c450f0b64acf1fdfa391 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=53f95de8ceca9b285484c450f0b64acf1fdfa391 commit 53f95de8ceca9b285484c450f0b64acf1fdfa391 Author: Dimitry Andric AuthorDate: 2024-08-06 08:47:32 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:42 +0000 libcxx-compat: update libcxx.imp for headers that were reintroduced by reverts PR: 280562 MFC after: 1 month (cherry picked from commit ff6c8447844b0f48bf507b2af4a0b8870e34e09e) --- lib/libc++/libcxx.imp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libc++/libcxx.imp b/lib/libc++/libcxx.imp index 214c12cd40ed..73c9d62df329 100644 --- a/lib/libc++/libcxx.imp +++ b/lib/libc++/libcxx.imp @@ -774,6 +774,8 @@ { include: [ "<__type_traits/is_implicitly_default_constructible.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_integral.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_literal_type.h>", "private", "", "public" ] }, + { include: [ "<__type_traits/is_member_function_pointer.h>", "private", "", "public" ] }, + { include: [ "<__type_traits/is_member_object_pointer.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_member_pointer.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_nothrow_assignable.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_nothrow_constructible.h>", "private", "", "public" ] }, @@ -790,6 +792,7 @@ { include: [ "<__type_traits/is_referenceable.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_same.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_scalar.h>", "private", "", "public" ] }, + { include: [ "<__type_traits/is_scoped_enum.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_signed.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_signed_integer.h>", "private", "", "public" ] }, { include: [ "<__type_traits/is_specialization.h>", "private", "", "public" ] }, From nobody Sun Dec 1 12:54:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rh01YlLz5fb3S; Sun, 01 Dec 2024 12:54:24 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rgz6vnDz4PWm; Sun, 1 Dec 2024 12:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S0k6R7CyMGReLWCihSxZh7oKB4nozxsteFZEFNoLyog=; b=HVOysAsDDQEBIwS7qVmMipuoYmSFB1iG55OVaiNSQDqyLdCDSt3Zn1vMoFcT4fZ26vwpS8 14/Aq/H97xSJUIVeJd/6nANdjXsJqDyAt1n6k79Q7ILNJQE4yL/2uk6s0UmMSkH4sLjaVp i7zfzc8PdLIzomNnCeGFdLcMJV8WKQq+pp4X6Vt5ppfMvqxCsc0oNNNeEcrYRSDF1+k/5x BigAXYgwya99mHZahmeJTRIEq6wA5c/uAGj6ivAdN9cSMB+1DsIE8SgcAIV0WQ0vvgChv8 SGbTjzoJgMH6e7JKBmjuHOYdT32N2AwxNIeq8B5YEJh6OAQmO9Po5E1TvE+lkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S0k6R7CyMGReLWCihSxZh7oKB4nozxsteFZEFNoLyog=; b=CEA6/N1Rk8IMtUwLD4XJWcMgC238XpM2Fm7rp92l0g9kJySiNn3+7TKCzLF0UXr+gSoDIp lS6lCJEa0x+6oe5PDWUR5/5CReQi2FebX2lAShizh6i5q+4C5L2lpA957ImPHTL3p7ndhg vjX0yywDBMN5YwaZi67ozYQtqPKwhkpgDZ249w5983sa8vR5t3au4zHhv4xTBP5BN55CAq uG8WHIjZQb32SRnphDXV4B8hR8lyYEA8lYuoDF42pFqI58zyh8Ek8zfYAAbVRcbtYlLcBI /ZzgE649Agb5c1pBqTUDY6PW6OA0ZH5kMCQ4lNmhYKXFnoM8yrUaXdTPVdizQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057663; a=rsa-sha256; cv=none; b=Kq2etwPdWWGbbf/Bz3tKEeW8LF0MGEdPI4B3/Aab8ItHjPOujQexYD38darbfDu64ZLhto YZhDKvtg7/EIbDvAPu0CRnHmYbyWAsqhHwjdpILzODII3zKPU25cxALmqlNMfUsjjmcf/o 8xgcxGevM5u67rjlPCl3PChBXgxxy3ZjKLUGg3WVoBGq4rGNf1OEF35pCbJb2KCbBbKVYO T5VgcvuUz8v3mdxyCcf+SYSpKlFVqXTqcDBhwKVH5fo6mG6KQVJXuUd1BCWMWKYUaNO7KA uJ6VV002e69ZQIuBuR1wo9CWTmZt5uZFlKkmzi+gDia0mIa96KkdRxYHEHoS4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rgz53WvztNR; Sun, 1 Dec 2024 12:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsNkd094172; Sun, 1 Dec 2024 12:54:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsN7d094167; Sun, 1 Dec 2024 12:54:23 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:23 GMT Message-Id: <202412011254.4B1CsN7d094167@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: d7185d58b3d2 - stable/13 - Merge llvm-project release/19.x llvmorg-19.1.0-rc2-0-gd033ae172d1c List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d7185d58b3d221543483a7faed1a984ba08fc3b6 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d7185d58b3d221543483a7faed1a984ba08fc3b6 commit d7185d58b3d221543483a7faed1a984ba08fc3b6 Author: Dimitry Andric AuthorDate: 2024-08-06 13:37:26 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:42 +0000 Merge llvm-project release/19.x llvmorg-19.1.0-rc2-0-gd033ae172d1c This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-rc2-0-gd033ae172d1c. PR: 280562 MFC after: 1 month (cherry picked from commit 52418fc2be8efa5172b90a3a9e617017173612c4) --- .../llvm-project/clang/include/clang/AST/DeclCXX.h | 7 + .../llvm-project/clang/include/clang/Basic/Attr.td | 9 + .../clang/include/clang/Basic/AttrDocs.td | 10 + .../include/clang/Basic/DiagnosticFrontendKinds.td | 3 + .../include/clang/Basic/DiagnosticSemaKinds.td | 5 +- contrib/llvm-project/clang/lib/AST/DeclCXX.cpp | 36 +++ .../clang/lib/CodeGen/CodeGenFunction.cpp | 3 + .../clang/lib/CodeGen/Targets/AArch64.cpp | 6 +- .../clang/lib/Driver/ToolChains/Clang.cpp | 3 + .../clang/lib/Format/TokenAnnotator.cpp | 61 ++--- .../clang/lib/Sema/CheckExprLifetime.cpp | 9 + .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 74 ++--- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 29 +- .../llvm-project/clang/lib/Sema/SemaDeclAttr.cpp | 10 +- .../Checkers/BlockInCriticalSectionChecker.cpp | 16 +- .../clang/lib/StaticAnalyzer/Core/Store.cpp | 12 +- .../compiler-rt/lib/builtins/riscv/feature_bits.c | 298 --------------------- .../lib/interception/interception_linux.h | 16 +- .../compiler-rt/lib/nsan/nsan_interceptors.cpp | 10 - .../compiler-rt/lib/rtsan/rtsan_interceptors.cpp | 12 + .../lib/sanitizer_common/sanitizer_linux.cpp | 2 +- .../sanitizer_stacktrace_sparc.cpp | 11 +- .../libcxx/include/__atomic/atomic_ref.h | 32 ++- contrib/llvm-project/libcxx/include/typeinfo | 9 +- contrib/llvm-project/libcxx/include/version | 4 +- .../libcxx/src/include/overridable_function.h | 6 +- .../llvm-project/libunwind/src/UnwindCursor.hpp | 3 +- contrib/llvm-project/lld/ELF/Arch/LoongArch.cpp | 10 + contrib/llvm-project/lld/ELF/DWARF.cpp | 3 +- contrib/llvm-project/lld/ELF/ICF.cpp | 26 +- contrib/llvm-project/lld/ELF/InputFiles.cpp | 1 + contrib/llvm-project/lld/ELF/InputFiles.h | 1 + contrib/llvm-project/lld/ELF/InputSection.cpp | 75 ++++-- contrib/llvm-project/lld/ELF/InputSection.h | 27 +- contrib/llvm-project/lld/ELF/LinkerScript.cpp | 2 + contrib/llvm-project/lld/ELF/MarkLive.cpp | 12 +- contrib/llvm-project/lld/ELF/OutputSections.cpp | 132 ++++++++- contrib/llvm-project/lld/ELF/OutputSections.h | 6 + contrib/llvm-project/lld/ELF/Relocations.cpp | 57 ++-- contrib/llvm-project/lld/ELF/Relocations.h | 102 ++++++- contrib/llvm-project/lld/ELF/ScriptLexer.cpp | 5 - contrib/llvm-project/lld/ELF/SyntheticSections.cpp | 18 +- contrib/llvm-project/lld/ELF/SyntheticSections.h | 5 +- contrib/llvm-project/lld/ELF/Writer.cpp | 13 +- contrib/llvm-project/lld/docs/ReleaseNotes.rst | 8 +- .../llvm-project/llvm/include/llvm/ADT/STLExtras.h | 6 + .../include/llvm/CodeGen/TargetFrameLowering.h | 7 + .../llvm/include/llvm/IR/IntrinsicInst.h | 4 + .../llvm/include/llvm/IR/VectorBuilder.h | 5 +- .../llvm/include/llvm/MC/MCAsmBackend.h | 5 +- .../llvm/include/llvm/MC/MCAssembler.h | 4 +- .../llvm-project/llvm/include/llvm/MC/MCSection.h | 5 + .../llvm/include/llvm/Transforms/Utils/LoopUtils.h | 4 + .../llvm/lib/CodeGen/RegisterCoalescer.cpp | 7 + .../lib/CodeGen/StackFrameLayoutAnalysisPass.cpp | 72 +++-- .../llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp | 14 + contrib/llvm-project/llvm/lib/IR/IntrinsicInst.cpp | 19 ++ contrib/llvm-project/llvm/lib/IR/Metadata.cpp | 5 +- contrib/llvm-project/llvm/lib/IR/VectorBuilder.cpp | 57 +--- contrib/llvm-project/llvm/lib/MC/MCAssembler.cpp | 77 +++--- contrib/llvm-project/llvm/lib/MC/MCSection.cpp | 4 +- .../llvm/lib/Support/Windows/Process.inc | 3 +- .../llvm/lib/Support/Windows/Signals.inc | 38 +-- .../Target/AArch64/AArch64Arm64ECCallLowering.cpp | 5 + .../lib/Target/AArch64/AArch64FrameLowering.cpp | 35 +++ .../llvm/lib/Target/AArch64/AArch64FrameLowering.h | 2 + .../AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h | 1 + .../llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 6 +- .../Hexagon/MCTargetDesc/HexagonAsmBackend.cpp | 4 +- .../LoongArch/AsmParser/LoongArchAsmParser.cpp | 24 ++ .../lib/Target/LoongArch/LoongArchInstrInfo.td | 6 +- .../LoongArch/MCTargetDesc/LoongArchFixupKinds.h | 8 + .../MCTargetDesc/LoongArchMCCodeEmitter.cpp | 12 + .../LoongArch/MCTargetDesc/LoongArchMCExpr.cpp | 15 ++ .../LoongArch/MCTargetDesc/LoongArchMCExpr.h | 4 + .../llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp | 5 +- .../llvm/lib/Target/PowerPC/PPCRegisterInfo.td | 35 ++- .../llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 4 + .../llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp | 10 +- .../lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp | 26 +- .../lib/Transforms/Scalar/InferAddressSpaces.cpp | 2 +- .../llvm/lib/Transforms/Utils/LoopUtils.cpp | 44 ++- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 4 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 4 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 89 files changed, 1106 insertions(+), 701 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/AST/DeclCXX.h b/contrib/llvm-project/clang/include/clang/AST/DeclCXX.h index fb52ac804849..0923736a95f9 100644 --- a/contrib/llvm-project/clang/include/clang/AST/DeclCXX.h +++ b/contrib/llvm-project/clang/include/clang/AST/DeclCXX.h @@ -1210,6 +1210,13 @@ public: return D.HasPublicFields || D.HasProtectedFields || D.HasPrivateFields; } + /// If this is a standard-layout class or union, any and all data members will + /// be declared in the same type. + /// + /// This retrieves the type where any fields are declared, + /// or the current class if there is no class with fields. + const CXXRecordDecl *getStandardLayoutBaseWithFields() const; + /// Whether this class is polymorphic (C++ [class.virtual]), /// which means that the class contains or inherits a virtual function. bool isPolymorphic() const { return data().Polymorphic; } diff --git a/contrib/llvm-project/clang/include/clang/Basic/Attr.td b/contrib/llvm-project/clang/include/clang/Basic/Attr.td index 4825979a974d..46d0a66d59c3 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/Attr.td +++ b/contrib/llvm-project/clang/include/clang/Basic/Attr.td @@ -477,6 +477,9 @@ def TargetELF : TargetSpec { def TargetELFOrMachO : TargetSpec { let ObjectFormats = ["ELF", "MachO"]; } +def TargetWindowsArm64EC : TargetSpec { + let CustomCode = [{ Target.getTriple().isWindowsArm64EC() }]; +} def TargetSupportsInitPriority : TargetSpec { let CustomCode = [{ !Target.getTriple().isOSzOS() }]; @@ -4027,6 +4030,12 @@ def SelectAny : InheritableAttr { let SimpleHandler = 1; } +def HybridPatchable : InheritableAttr, TargetSpecificAttr { + let Spellings = [Declspec<"hybrid_patchable">, Clang<"hybrid_patchable">]; + let Subjects = SubjectList<[Function]>; + let Documentation = [HybridPatchableDocs]; +} + def Thread : Attr { let Spellings = [Declspec<"thread">]; let LangOpts = [MicrosoftExt]; diff --git a/contrib/llvm-project/clang/include/clang/Basic/AttrDocs.td b/contrib/llvm-project/clang/include/clang/Basic/AttrDocs.td index 99738812c815..b5d468eb5ec9 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/AttrDocs.td +++ b/contrib/llvm-project/clang/include/clang/Basic/AttrDocs.td @@ -5985,6 +5985,16 @@ For more information see or `msvc documentation `_. }]; } +def HybridPatchableDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``hybrid_patchable`` attribute declares an ARM64EC function with an additional +x86-64 thunk, which may be patched at runtime. + +For more information see +`ARM64EC ABI documentation `_. +}]; } + def WebAssemblyExportNameDocs : Documentation { let Category = DocCatFunction; let Content = [{ diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticFrontendKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticFrontendKinds.td index 12a4617c64d8..8a1462c670d6 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticFrontendKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticFrontendKinds.td @@ -288,6 +288,9 @@ def err_function_needs_feature : Error< let CategoryName = "Codegen ABI Check" in { def err_function_always_inline_attribute_mismatch : Error< "always_inline function %1 and its caller %0 have mismatching %2 attributes">; +def warn_function_always_inline_attribute_mismatch : Warning< + "always_inline function %1 and its caller %0 have mismatching %2 attributes, " + "inlining may change runtime behaviour">, InGroup; def err_function_always_inline_new_za : Error< "always_inline function %0 has new za state">; diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td index 3669b8b48e53..5490a38afa53 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -3677,6 +3677,9 @@ def err_attribute_weak_static : Error< "weak declaration cannot have internal linkage">; def err_attribute_selectany_non_extern_data : Error< "'selectany' can only be applied to data items with external linkage">; +def warn_attribute_hybrid_patchable_non_extern : Warning< + "'hybrid_patchable' is ignored on functions without external linkage">, + InGroup; def err_declspec_thread_on_thread_variable : Error< "'__declspec(thread)' applied to variable that already has a " "thread-local storage specifier">; @@ -3808,8 +3811,6 @@ def warn_sme_locally_streaming_has_vl_args_returns : Warning< InGroup, DefaultIgnore; def err_conflicting_attributes_arm_state : Error< "conflicting attributes for state '%0'">; -def err_sme_streaming_cannot_be_multiversioned : Error< - "streaming function cannot be multi-versioned">; def err_unknown_arm_state : Error< "unknown state '%0'">; def err_missing_arm_state : Error< diff --git a/contrib/llvm-project/clang/lib/AST/DeclCXX.cpp b/contrib/llvm-project/clang/lib/AST/DeclCXX.cpp index b573c2713a3a..9a3ede426e91 100644 --- a/contrib/llvm-project/clang/lib/AST/DeclCXX.cpp +++ b/contrib/llvm-project/clang/lib/AST/DeclCXX.cpp @@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl *Subobj) { data().StructuralIfLiteral = false; } +const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const { + assert( + isStandardLayout() && + "getStandardLayoutBaseWithFields called on a non-standard-layout type"); +#ifdef EXPENSIVE_CHECKS + { + unsigned NumberOfBasesWithFields = 0; + if (!field_empty()) + ++NumberOfBasesWithFields; + llvm::SmallPtrSet UniqueBases; + forallBases([&](const CXXRecordDecl *Base) -> bool { + if (!Base->field_empty()) + ++NumberOfBasesWithFields; + assert( + UniqueBases.insert(Base->getCanonicalDecl()).second && + "Standard layout struct has multiple base classes of the same type"); + return true; + }); + assert(NumberOfBasesWithFields <= 1 && + "Standard layout struct has fields declared in more than one class"); + } +#endif + if (!field_empty()) + return this; + const CXXRecordDecl *Result = this; + forallBases([&](const CXXRecordDecl *Base) -> bool { + if (!Base->field_empty()) { + // This is the base where the fields are declared; return early + Result = Base; + return false; + } + return true; + }); + return Result; +} + bool CXXRecordDecl::hasConstexprDestructor() const { auto *Dtor = getDestructor(); return Dtor ? Dtor->isConstexpr() : defaultedDestructorIsConstexpr(); diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp index d6078696a7d9..af201554898f 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp @@ -991,6 +991,9 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, if (D && D->hasAttr()) Fn->addFnAttr(llvm::Attribute::NoProfile); + if (D && D->hasAttr()) + Fn->addFnAttr(llvm::Attribute::HybridPatchable); + if (D) { // Function attributes take precedence over command line flags. if (auto *A = D->getAttr()) { diff --git a/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp b/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp index b9df54b0c67c..1dec3cd40ebd 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp @@ -883,8 +883,10 @@ void AArch64TargetCodeGenInfo::checkFunctionCallABIStreaming( if (!CalleeIsStreamingCompatible && (CallerIsStreaming != CalleeIsStreaming || CallerIsStreamingCompatible)) - CGM.getDiags().Report(CallLoc, - diag::err_function_always_inline_attribute_mismatch) + CGM.getDiags().Report( + CallLoc, CalleeIsStreaming + ? diag::err_function_always_inline_attribute_mismatch + : diag::warn_function_always_inline_attribute_mismatch) << Caller->getDeclName() << Callee->getDeclName() << "streaming"; if (auto *NewAttr = Callee->getAttr()) if (NewAttr->isNewZA()) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp index 5de29f1eca61..366b147a052b 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp @@ -1847,6 +1847,9 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args, Args.addOptInFlag( CmdArgs, options::OPT_fptrauth_vtable_pointer_type_discrimination, options::OPT_fno_ptrauth_vtable_pointer_type_discrimination); + Args.addOptInFlag( + CmdArgs, options::OPT_fptrauth_type_info_vtable_pointer_discrimination, + options::OPT_fno_ptrauth_type_info_vtable_pointer_discrimination); Args.addOptInFlag(CmdArgs, options::OPT_fptrauth_init_fini, options::OPT_fno_ptrauth_init_fini); Args.addOptInFlag( diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 21924a8fe17d..63c8699fd62d 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -154,8 +154,8 @@ private: if (NonTemplateLess.count(CurrentToken->Previous) > 0) return false; - const FormatToken &Previous = *CurrentToken->Previous; // The '<'. - if (Previous.Previous) { + if (const auto &Previous = *CurrentToken->Previous; // The '<'. + Previous.Previous) { if (Previous.Previous->Tok.isLiteral()) return false; if (Previous.Previous->is(tok::r_brace)) @@ -175,11 +175,13 @@ private: FormatToken *Left = CurrentToken->Previous; Left->ParentBracket = Contexts.back().ContextKind; ScopedContextCreator ContextCreator(*this, tok::less, 12); - Contexts.back().IsExpression = false; + + const auto *BeforeLess = Left->Previous; + // If there's a template keyword before the opening angle bracket, this is a // template parameter, not an argument. - if (Left->Previous && Left->Previous->isNot(tok::kw_template)) + if (BeforeLess && BeforeLess->isNot(tok::kw_template)) Contexts.back().ContextType = Context::TemplateArgument; if (Style.Language == FormatStyle::LK_Java && @@ -187,19 +189,24 @@ private: next(); } - while (CurrentToken) { + for (bool SeenTernaryOperator = false; CurrentToken;) { + const bool InExpr = Contexts[Contexts.size() - 2].IsExpression; if (CurrentToken->is(tok::greater)) { + const auto *Next = CurrentToken->Next; // Try to do a better job at looking for ">>" within the condition of // a statement. Conservatively insert spaces between consecutive ">" // tokens to prevent splitting right bitshift operators and potentially // altering program semantics. This check is overly conservative and // will prevent spaces from being inserted in select nested template // parameter cases, but should not alter program semantics. - if (CurrentToken->Next && CurrentToken->Next->is(tok::greater) && + if (Next && Next->is(tok::greater) && Left->ParentBracket != tok::less && CurrentToken->getStartOfNonWhitespace() == - CurrentToken->Next->getStartOfNonWhitespace().getLocWithOffset( - -1)) { + Next->getStartOfNonWhitespace().getLocWithOffset(-1)) { + return false; + } + if (InExpr && SeenTernaryOperator && + (!Next || !Next->isOneOf(tok::l_paren, tok::l_brace))) { return false; } Left->MatchingParen = CurrentToken; @@ -210,14 +217,14 @@ private: // msg: < item: data > // In TT_TextProto, map does not occur. if (Style.Language == FormatStyle::LK_TextProto || - (Style.Language == FormatStyle::LK_Proto && Left->Previous && - Left->Previous->isOneOf(TT_SelectorName, TT_DictLiteral))) { + (Style.Language == FormatStyle::LK_Proto && BeforeLess && + BeforeLess->isOneOf(TT_SelectorName, TT_DictLiteral))) { CurrentToken->setType(TT_DictLiteral); } else { CurrentToken->setType(TT_TemplateCloser); CurrentToken->Tok.setLength(1); } - if (CurrentToken->Next && CurrentToken->Next->Tok.isLiteral()) + if (Next && Next->Tok.isLiteral()) return false; next(); return true; @@ -229,18 +236,21 @@ private: } if (CurrentToken->isOneOf(tok::r_paren, tok::r_square, tok::r_brace)) return false; + const auto &Prev = *CurrentToken->Previous; // If a && or || is found and interpreted as a binary operator, this set // of angles is likely part of something like "a < b && c > d". If the // angles are inside an expression, the ||/&& might also be a binary // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (CurrentToken->Previous->isOneOf(tok::pipepipe, tok::ampamp) && - CurrentToken->Previous->is(TT_BinaryOperator) && - Contexts[Contexts.size() - 2].IsExpression && - !Line.startsWith(tok::kw_template)) { - return false; + if (InExpr && !Line.startsWith(tok::kw_template) && + Prev.is(TT_BinaryOperator)) { + const auto Precedence = Prev.getPrecedence(); + if (Precedence > prec::Conditional && Precedence < prec::Relational) + return false; } + if (Prev.is(TT_ConditionalExpr)) + SeenTernaryOperator = true; updateParameterCount(Left, CurrentToken); if (Style.Language == FormatStyle::LK_Proto) { if (FormatToken *Previous = CurrentToken->getPreviousNonComment()) { @@ -372,6 +382,10 @@ private: OpeningParen.Previous->is(tok::kw__Generic)) { Contexts.back().ContextType = Context::C11GenericSelection; Contexts.back().IsExpression = true; + } else if (Line.InPPDirective && + (!OpeningParen.Previous || + OpeningParen.Previous->isNot(tok::identifier))) { + Contexts.back().IsExpression = true; } else if (Contexts[Contexts.size() - 2].CaretFound) { // This is the parameter list of an ObjC block. Contexts.back().IsExpression = false; @@ -384,20 +398,7 @@ private: OpeningParen.Previous->MatchingParen->isOneOf( TT_ObjCBlockLParen, TT_FunctionTypeLParen)) { Contexts.back().IsExpression = false; - } else if (Line.InPPDirective) { - auto IsExpr = [&OpeningParen] { - const auto *Tok = OpeningParen.Previous; - if (!Tok || Tok->isNot(tok::identifier)) - return true; - Tok = Tok->Previous; - while (Tok && Tok->endsSequence(tok::coloncolon, tok::identifier)) { - assert(Tok->Previous); - Tok = Tok->Previous->Previous; - } - return !Tok || !Tok->Tok.getIdentifierInfo(); - }; - Contexts.back().IsExpression = IsExpr(); - } else if (!Line.MustBeDeclaration) { + } else if (!Line.MustBeDeclaration && !Line.InPPDirective) { bool IsForOrCatch = OpeningParen.Previous && OpeningParen.Previous->isOneOf(tok::kw_for, tok::kw_catch); diff --git a/contrib/llvm-project/clang/lib/Sema/CheckExprLifetime.cpp b/contrib/llvm-project/clang/lib/Sema/CheckExprLifetime.cpp index 5c8ef564f30a..112cf3d08182 100644 --- a/contrib/llvm-project/clang/lib/Sema/CheckExprLifetime.cpp +++ b/contrib/llvm-project/clang/lib/Sema/CheckExprLifetime.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "CheckExprLifetime.h" +#include "clang/AST/Decl.h" #include "clang/AST/Expr.h" #include "clang/Basic/DiagnosticSema.h" #include "clang/Sema/Initialization.h" @@ -548,6 +549,14 @@ static void visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path, EnableLifetimeWarnings); } + if (auto *M = dyn_cast(Init)) { + // Lifetime of a non-reference type field is same as base object. + if (auto *F = dyn_cast(M->getMemberDecl()); + F && !F->getType()->isReferenceType()) + visitLocalsRetainedByInitializer(Path, M->getBase(), Visit, true, + EnableLifetimeWarnings); + } + if (isa(Init)) { if (EnableLifetimeWarnings) handleGslAnnotatedTypes(Path, Init, Visit); diff --git a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp index cf1196ad23c2..9088b5e285bf 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp @@ -13664,10 +13664,11 @@ void Sema::DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr, //===--- Layout compatibility ----------------------------------------------// -static bool isLayoutCompatible(ASTContext &C, QualType T1, QualType T2); +static bool isLayoutCompatible(const ASTContext &C, QualType T1, QualType T2); /// Check if two enumeration types are layout-compatible. -static bool isLayoutCompatible(ASTContext &C, EnumDecl *ED1, EnumDecl *ED2) { +static bool isLayoutCompatible(const ASTContext &C, const EnumDecl *ED1, + const EnumDecl *ED2) { // C++11 [dcl.enum] p8: // Two enumeration types are layout-compatible if they have the same // underlying type. @@ -13678,8 +13679,8 @@ static bool isLayoutCompatible(ASTContext &C, EnumDecl *ED1, EnumDecl *ED2) { /// Check if two fields are layout-compatible. /// Can be used on union members, which are exempt from alignment requirement /// of common initial sequence. -static bool isLayoutCompatible(ASTContext &C, FieldDecl *Field1, - FieldDecl *Field2, +static bool isLayoutCompatible(const ASTContext &C, const FieldDecl *Field1, + const FieldDecl *Field2, bool AreUnionMembers = false) { [[maybe_unused]] const Type *Field1Parent = Field1->getParent()->getTypeForDecl(); @@ -13722,60 +13723,33 @@ static bool isLayoutCompatible(ASTContext &C, FieldDecl *Field1, /// Check if two standard-layout structs are layout-compatible. /// (C++11 [class.mem] p17) -static bool isLayoutCompatibleStruct(ASTContext &C, RecordDecl *RD1, - RecordDecl *RD2) { - // If both records are C++ classes, check that base classes match. - if (const CXXRecordDecl *D1CXX = dyn_cast(RD1)) { - // If one of records is a CXXRecordDecl we are in C++ mode, - // thus the other one is a CXXRecordDecl, too. - const CXXRecordDecl *D2CXX = cast(RD2); - // Check number of base classes. - if (D1CXX->getNumBases() != D2CXX->getNumBases()) - return false; +static bool isLayoutCompatibleStruct(const ASTContext &C, const RecordDecl *RD1, + const RecordDecl *RD2) { + // Get to the class where the fields are declared + if (const CXXRecordDecl *D1CXX = dyn_cast(RD1)) + RD1 = D1CXX->getStandardLayoutBaseWithFields(); - // Check the base classes. - for (CXXRecordDecl::base_class_const_iterator - Base1 = D1CXX->bases_begin(), - BaseEnd1 = D1CXX->bases_end(), - Base2 = D2CXX->bases_begin(); - Base1 != BaseEnd1; - ++Base1, ++Base2) { - if (!isLayoutCompatible(C, Base1->getType(), Base2->getType())) - return false; - } - } else if (const CXXRecordDecl *D2CXX = dyn_cast(RD2)) { - // If only RD2 is a C++ class, it should have zero base classes. - if (D2CXX->getNumBases() > 0) - return false; - } + if (const CXXRecordDecl *D2CXX = dyn_cast(RD2)) + RD2 = D2CXX->getStandardLayoutBaseWithFields(); // Check the fields. - RecordDecl::field_iterator Field2 = RD2->field_begin(), - Field2End = RD2->field_end(), - Field1 = RD1->field_begin(), - Field1End = RD1->field_end(); - for ( ; Field1 != Field1End && Field2 != Field2End; ++Field1, ++Field2) { - if (!isLayoutCompatible(C, *Field1, *Field2)) - return false; - } - if (Field1 != Field1End || Field2 != Field2End) - return false; - - return true; + return llvm::equal(RD1->fields(), RD2->fields(), + [&C](const FieldDecl *F1, const FieldDecl *F2) -> bool { + return isLayoutCompatible(C, F1, F2); + }); } /// Check if two standard-layout unions are layout-compatible. /// (C++11 [class.mem] p18) -static bool isLayoutCompatibleUnion(ASTContext &C, RecordDecl *RD1, - RecordDecl *RD2) { - llvm::SmallPtrSet UnmatchedFields; +static bool isLayoutCompatibleUnion(const ASTContext &C, const RecordDecl *RD1, + const RecordDecl *RD2) { + llvm::SmallPtrSet UnmatchedFields; for (auto *Field2 : RD2->fields()) UnmatchedFields.insert(Field2); for (auto *Field1 : RD1->fields()) { - llvm::SmallPtrSet::iterator - I = UnmatchedFields.begin(), - E = UnmatchedFields.end(); + auto I = UnmatchedFields.begin(); + auto E = UnmatchedFields.end(); for ( ; I != E; ++I) { if (isLayoutCompatible(C, Field1, *I, /*IsUnionMember=*/true)) { @@ -13792,8 +13766,8 @@ static bool isLayoutCompatibleUnion(ASTContext &C, RecordDecl *RD1, return UnmatchedFields.empty(); } -static bool isLayoutCompatible(ASTContext &C, RecordDecl *RD1, - RecordDecl *RD2) { +static bool isLayoutCompatible(const ASTContext &C, const RecordDecl *RD1, + const RecordDecl *RD2) { if (RD1->isUnion() != RD2->isUnion()) return false; @@ -13804,7 +13778,7 @@ static bool isLayoutCompatible(ASTContext &C, RecordDecl *RD1, } /// Check if two types are layout-compatible in C++11 sense. -static bool isLayoutCompatible(ASTContext &C, QualType T1, QualType T2) { +static bool isLayoutCompatible(const ASTContext &C, QualType T1, QualType T2) { if (T1.isNull() || T2.isNull()) return false; diff --git a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp index bb25a0b3a45a..01231f8e385e 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp @@ -6890,6 +6890,11 @@ static void checkAttributesAfterMerging(Sema &S, NamedDecl &ND) { } } + if (HybridPatchableAttr *Attr = ND.getAttr()) { + if (!ND.isExternallyVisible()) + S.Diag(Attr->getLocation(), + diag::warn_attribute_hybrid_patchable_non_extern); + } if (const InheritableAttr *Attr = getDLLAttr(&ND)) { auto *VD = dyn_cast(&ND); bool IsAnonymousNS = false; @@ -11009,6 +11014,9 @@ static bool AttrCompatibleWithMultiVersion(attr::Kind Kind, switch (Kind) { default: return false; + case attr::ArmLocallyStreaming: + return MVKind == MultiVersionKind::TargetVersion || + MVKind == MultiVersionKind::TargetClones; case attr::Used: return MVKind == MultiVersionKind::Target; case attr::NonNull: @@ -11145,7 +11153,21 @@ bool Sema::areMultiversionVariantFunctionsCompatible( FunctionType::ExtInfo OldTypeInfo = OldType->getExtInfo(); FunctionType::ExtInfo NewTypeInfo = NewType->getExtInfo(); - if (OldTypeInfo.getCC() != NewTypeInfo.getCC()) + const auto *OldFPT = OldFD->getType()->getAs(); + const auto *NewFPT = NewFD->getType()->getAs(); + + bool ArmStreamingCCMismatched = false; + if (OldFPT && NewFPT) { + unsigned Diff = + OldFPT->getAArch64SMEAttributes() ^ NewFPT->getAArch64SMEAttributes(); + // Arm-streaming, arm-streaming-compatible and non-streaming versions + // cannot be mixed. + if (Diff & (FunctionType::SME_PStateSMEnabledMask | + FunctionType::SME_PStateSMCompatibleMask)) + ArmStreamingCCMismatched = true; + } + + if (OldTypeInfo.getCC() != NewTypeInfo.getCC() || ArmStreamingCCMismatched) return Diag(DiffDiagIDAt.first, DiffDiagIDAt.second) << CallingConv; QualType OldReturnType = OldType->getReturnType(); @@ -11165,9 +11187,8 @@ bool Sema::areMultiversionVariantFunctionsCompatible( if (!CLinkageMayDiffer && OldFD->isExternC() != NewFD->isExternC()) return Diag(DiffDiagIDAt.first, DiffDiagIDAt.second) << LanguageLinkage; - if (CheckEquivalentExceptionSpec( - OldFD->getType()->getAs(), OldFD->getLocation(), - NewFD->getType()->getAs(), NewFD->getLocation())) + if (CheckEquivalentExceptionSpec(OldFPT, OldFD->getLocation(), NewFPT, + NewFD->getLocation())) return true; } return false; diff --git a/contrib/llvm-project/clang/lib/Sema/SemaDeclAttr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaDeclAttr.cpp index 5fd8622c90dd..e2eada24f9fc 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaDeclAttr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaDeclAttr.cpp @@ -3024,9 +3024,6 @@ bool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, Decl *D, return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unsupported << None << CurFeature << TargetVersion; } - if (IsArmStreamingFunction(cast(D), - /*IncludeLocallyStreaming=*/false)) - return Diag(LiteralLoc, diag::err_sme_streaming_cannot_be_multiversioned); return false; } @@ -3123,10 +3120,6 @@ bool Sema::checkTargetClonesAttrString( HasNotDefault = true; } } - if (IsArmStreamingFunction(cast(D), - /*IncludeLocallyStreaming=*/false)) - return Diag(LiteralLoc, - diag::err_sme_streaming_cannot_be_multiversioned); } else { // Other targets ( currently X86 ) if (Cur.starts_with("arch=")) { @@ -6868,6 +6861,9 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, case ParsedAttr::AT_MSConstexpr: handleMSConstexprAttr(S, D, AL); break; + case ParsedAttr::AT_HybridPatchable: + handleSimpleAttribute(S, D, AL); + break; // HLSL attributes: case ParsedAttr::AT_HLSLNumThreads: diff --git a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp index 40f7e9cede1f..4cd2f2802f30 100644 --- a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp +++ b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp @@ -147,10 +147,18 @@ using MutexDescriptor = class BlockInCriticalSectionChecker : public Checker { private: const std::array MutexDescriptors{ - MemberMutexDescriptor({/*MatchAs=*/CDM::CXXMethod, - /*QualifiedName=*/{"std", "mutex", "lock"}, - /*RequiredArgs=*/0}, - {CDM::CXXMethod, {"std", "mutex", "unlock"}, 0}), + // NOTE: There are standard library implementations where some methods + // of `std::mutex` are inherited from an implementation detail base + // class, and those aren't matched by the name specification {"std", + // "mutex", "lock"}. + // As a workaround here we omit the class name and only require the + // presence of the name parts "std" and "lock"/"unlock". + // TODO: Ensure that CallDescription understands inherited methods. + MemberMutexDescriptor( + {/*MatchAs=*/CDM::CXXMethod, + /*QualifiedName=*/{"std", /*"mutex",*/ "lock"}, + /*RequiredArgs=*/0}, + {CDM::CXXMethod, {"std", /*"mutex",*/ "unlock"}, 0}), FirstArgMutexDescriptor({CDM::CLibrary, {"pthread_mutex_lock"}, 1}, {CDM::CLibrary, {"pthread_mutex_unlock"}, 1}), FirstArgMutexDescriptor({CDM::CLibrary, {"mtx_lock"}, 1}, diff --git a/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/Store.cpp b/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/Store.cpp index 67ca61bb56ba..b436dd746d21 100644 --- a/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/Store.cpp +++ b/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/Store.cpp @@ -472,7 +472,17 @@ SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, const auto *ElemR = dyn_cast(BaseRegion); // Convert the offset to the appropriate size and signedness. - Offset = svalBuilder.convertToArrayIndex(Offset).castAs(); + auto Off = svalBuilder.convertToArrayIndex(Offset).getAs(); + if (!Off) { + // Handle cases when LazyCompoundVal is used for an array index. + // Such case is possible if code does: + // char b[4]; + // a[__builtin_bitcast(int, b)]; + // Return UnknownVal, since we cannot model it. + return UnknownVal(); + } + + Offset = Off.value(); if (!ElemR) { // If the base region is not an ElementRegion, create one. diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/riscv/feature_bits.c b/contrib/llvm-project/compiler-rt/lib/builtins/riscv/feature_bits.c deleted file mode 100644 index 77422935bd2d..000000000000 --- a/contrib/llvm-project/compiler-rt/lib/builtins/riscv/feature_bits.c +++ /dev/null @@ -1,298 +0,0 @@ -//=== feature_bits.c - Update RISC-V Feature Bits Structure -*- C -*-=========// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#define RISCV_FEATURE_BITS_LENGTH 1 -struct { - unsigned length; - unsigned long long features[RISCV_FEATURE_BITS_LENGTH]; -} __riscv_feature_bits __attribute__((visibility("hidden"), nocommon)); - -#define RISCV_VENDOR_FEATURE_BITS_LENGTH 1 -struct { - unsigned vendorID; - unsigned length; - unsigned long long features[RISCV_VENDOR_FEATURE_BITS_LENGTH]; -} __riscv_vendor_feature_bits __attribute__((visibility("hidden"), nocommon)); - -// NOTE: Should sync-up with RISCVFeatures.td -// TODO: Maybe generate a header from tablegen then include it. -#define A_GROUPID 0 -#define A_BITMASK (1ULL << 0) -#define C_GROUPID 0 -#define C_BITMASK (1ULL << 2) -#define D_GROUPID 0 -#define D_BITMASK (1ULL << 3) -#define F_GROUPID 0 -#define F_BITMASK (1ULL << 5) -#define I_GROUPID 0 -#define I_BITMASK (1ULL << 8) -#define M_GROUPID 0 -#define M_BITMASK (1ULL << 12) -#define V_GROUPID 0 -#define V_BITMASK (1ULL << 21) -#define ZACAS_GROUPID 0 -#define ZACAS_BITMASK (1ULL << 26) -#define ZBA_GROUPID 0 -#define ZBA_BITMASK (1ULL << 27) -#define ZBB_GROUPID 0 -#define ZBB_BITMASK (1ULL << 28) -#define ZBC_GROUPID 0 -#define ZBC_BITMASK (1ULL << 29) -#define ZBKB_GROUPID 0 -#define ZBKB_BITMASK (1ULL << 30) -#define ZBKC_GROUPID 0 -#define ZBKC_BITMASK (1ULL << 31) -#define ZBKX_GROUPID 0 -#define ZBKX_BITMASK (1ULL << 32) -#define ZBS_GROUPID 0 -#define ZBS_BITMASK (1ULL << 33) -#define ZFA_GROUPID 0 -#define ZFA_BITMASK (1ULL << 34) -#define ZFH_GROUPID 0 -#define ZFH_BITMASK (1ULL << 35) -#define ZFHMIN_GROUPID 0 -#define ZFHMIN_BITMASK (1ULL << 36) -#define ZICBOZ_GROUPID 0 -#define ZICBOZ_BITMASK (1ULL << 37) -#define ZICOND_GROUPID 0 -#define ZICOND_BITMASK (1ULL << 38) -#define ZIHINTNTL_GROUPID 0 -#define ZIHINTNTL_BITMASK (1ULL << 39) -#define ZIHINTPAUSE_GROUPID 0 -#define ZIHINTPAUSE_BITMASK (1ULL << 40) -#define ZKND_GROUPID 0 -#define ZKND_BITMASK (1ULL << 41) -#define ZKNE_GROUPID 0 -#define ZKNE_BITMASK (1ULL << 42) -#define ZKNH_GROUPID 0 -#define ZKNH_BITMASK (1ULL << 43) -#define ZKSED_GROUPID 0 -#define ZKSED_BITMASK (1ULL << 44) -#define ZKSH_GROUPID 0 -#define ZKSH_BITMASK (1ULL << 45) -#define ZKT_GROUPID 0 -#define ZKT_BITMASK (1ULL << 46) -#define ZTSO_GROUPID 0 -#define ZTSO_BITMASK (1ULL << 47) -#define ZVBB_GROUPID 0 -#define ZVBB_BITMASK (1ULL << 48) -#define ZVBC_GROUPID 0 -#define ZVBC_BITMASK (1ULL << 49) -#define ZVFH_GROUPID 0 -#define ZVFH_BITMASK (1ULL << 50) -#define ZVFHMIN_GROUPID 0 -#define ZVFHMIN_BITMASK (1ULL << 51) -#define ZVKB_GROUPID 0 -#define ZVKB_BITMASK (1ULL << 52) -#define ZVKG_GROUPID 0 -#define ZVKG_BITMASK (1ULL << 53) -#define ZVKNED_GROUPID 0 -#define ZVKNED_BITMASK (1ULL << 54) -#define ZVKNHA_GROUPID 0 -#define ZVKNHA_BITMASK (1ULL << 55) -#define ZVKNHB_GROUPID 0 -#define ZVKNHB_BITMASK (1ULL << 56) -#define ZVKSED_GROUPID 0 -#define ZVKSED_BITMASK (1ULL << 57) -#define ZVKSH_GROUPID 0 -#define ZVKSH_BITMASK (1ULL << 58) -#define ZVKT_GROUPID 0 -#define ZVKT_BITMASK (1ULL << 59) - -#if defined(__linux__) - -static long syscall_impl_5_args(long number, long arg1, long arg2, long arg3, - long arg4, long arg5) { - register long a7 __asm__("a7") = number; - register long a0 __asm__("a0") = arg1; - register long a1 __asm__("a1") = arg2; - register long a2 __asm__("a2") = arg3; - register long a3 __asm__("a3") = arg4; - register long a4 __asm__("a4") = arg5; - __asm__ __volatile__("ecall\n\t" - : "=r"(a0) - : "r"(a7), "r"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4) - : "memory"); - return a0; -} - -#define RISCV_HWPROBE_KEY_MVENDORID 0 -#define RISCV_HWPROBE_KEY_MARCHID 1 -#define RISCV_HWPROBE_KEY_MIMPID 2 -#define RISCV_HWPROBE_KEY_BASE_BEHAVIOR 3 -#define RISCV_HWPROBE_BASE_BEHAVIOR_IMA (1ULL << 0) -#define RISCV_HWPROBE_KEY_IMA_EXT_0 4 -#define RISCV_HWPROBE_IMA_FD (1ULL << 0) -#define RISCV_HWPROBE_IMA_C (1ULL << 1) -#define RISCV_HWPROBE_IMA_V (1ULL << 2) -#define RISCV_HWPROBE_EXT_ZBA (1ULL << 3) -#define RISCV_HWPROBE_EXT_ZBB (1ULL << 4) -#define RISCV_HWPROBE_EXT_ZBS (1ULL << 5) -#define RISCV_HWPROBE_EXT_ZICBOZ (1ULL << 6) -#define RISCV_HWPROBE_EXT_ZBC (1ULL << 7) -#define RISCV_HWPROBE_EXT_ZBKB (1ULL << 8) -#define RISCV_HWPROBE_EXT_ZBKC (1ULL << 9) -#define RISCV_HWPROBE_EXT_ZBKX (1ULL << 10) -#define RISCV_HWPROBE_EXT_ZKND (1ULL << 11) -#define RISCV_HWPROBE_EXT_ZKNE (1ULL << 12) -#define RISCV_HWPROBE_EXT_ZKNH (1ULL << 13) -#define RISCV_HWPROBE_EXT_ZKSED (1ULL << 14) -#define RISCV_HWPROBE_EXT_ZKSH (1ULL << 15) -#define RISCV_HWPROBE_EXT_ZKT (1ULL << 16) -#define RISCV_HWPROBE_EXT_ZVBB (1ULL << 17) -#define RISCV_HWPROBE_EXT_ZVBC (1ULL << 18) -#define RISCV_HWPROBE_EXT_ZVKB (1ULL << 19) -#define RISCV_HWPROBE_EXT_ZVKG (1ULL << 20) -#define RISCV_HWPROBE_EXT_ZVKNED (1ULL << 21) -#define RISCV_HWPROBE_EXT_ZVKNHA (1ULL << 22) -#define RISCV_HWPROBE_EXT_ZVKNHB (1ULL << 23) -#define RISCV_HWPROBE_EXT_ZVKSED (1ULL << 24) -#define RISCV_HWPROBE_EXT_ZVKSH (1ULL << 25) -#define RISCV_HWPROBE_EXT_ZVKT (1ULL << 26) -#define RISCV_HWPROBE_EXT_ZFH (1ULL << 27) -#define RISCV_HWPROBE_EXT_ZFHMIN (1ULL << 28) -#define RISCV_HWPROBE_EXT_ZIHINTNTL (1ULL << 29) -#define RISCV_HWPROBE_EXT_ZVFH (1ULL << 30) -#define RISCV_HWPROBE_EXT_ZVFHMIN (1ULL << 31) -#define RISCV_HWPROBE_EXT_ZFA (1ULL << 32) -#define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33) -#define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34) -#define RISCV_HWPROBE_EXT_ZICOND (1ULL << 35) -#define RISCV_HWPROBE_EXT_ZIHINTPAUSE (1ULL << 36) -#define RISCV_HWPROBE_KEY_CPUPERF_0 5 -#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) -#define RISCV_HWPROBE_MISALIGNED_EMULATED (1ULL << 0) -#define RISCV_HWPROBE_MISALIGNED_SLOW (2 << 0) -#define RISCV_HWPROBE_MISALIGNED_FAST (3 << 0) -#define RISCV_HWPROBE_MISALIGNED_UNSUPPORTED (4 << 0) -#define RISCV_HWPROBE_MISALIGNED_MASK (7 << 0) -#define RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE 6 -/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */ - -struct riscv_hwprobe { - long long key; - unsigned long long value; -}; - -#define __NR_riscv_hwprobe 258 -static long initHwProbe(struct riscv_hwprobe *Hwprobes, int len) { - return syscall_impl_5_args(__NR_riscv_hwprobe, (long)Hwprobes, len, 0, 0, 0); -} - -#define SET_RISCV_HWPROBE_EXT_SINGLE_RISCV_FEATURE(EXTNAME) \ - SET_SINGLE_IMAEXT_RISCV_FEATURE(RISCV_HWPROBE_EXT_##EXTNAME, EXTNAME) - -#define SET_SINGLE_IMAEXT_RISCV_FEATURE(HWPROBE_BITMASK, EXT) \ - SET_SINGLE_RISCV_FEATURE(IMAEXT0Value &HWPROBE_BITMASK, EXT) - -#define SET_SINGLE_RISCV_FEATURE(COND, EXT) \ - if (COND) { \ - SET_RISCV_FEATURE(EXT); \ - } - -#define SET_RISCV_FEATURE(EXT) features[EXT##_GROUPID] |= EXT##_BITMASK - -static void initRISCVFeature(struct riscv_hwprobe Hwprobes[]) { - - // Note: If a hwprobe key is unknown to the kernel, its key field - // will be cleared to -1, and its value set to 0. - // This unsets all extension bitmask bits. - - // Init vendor extension - __riscv_vendor_feature_bits.length = 0; - __riscv_vendor_feature_bits.vendorID = Hwprobes[2].value; - - // Init standard extension - // TODO: Maybe Extension implied generate from tablegen? - __riscv_feature_bits.length = RISCV_FEATURE_BITS_LENGTH; - - unsigned long long features[RISCV_FEATURE_BITS_LENGTH]; - int i; - - for (i = 0; i < RISCV_FEATURE_BITS_LENGTH; i++) - features[i] = 0; - - // Check RISCV_HWPROBE_KEY_BASE_BEHAVIOR - unsigned long long BaseValue = Hwprobes[0].value; - if (BaseValue & RISCV_HWPROBE_BASE_BEHAVIOR_IMA) { - SET_RISCV_FEATURE(I); - SET_RISCV_FEATURE(M); - SET_RISCV_FEATURE(A); - } - - // Check RISCV_HWPROBE_KEY_IMA_EXT_0 - unsigned long long IMAEXT0Value = Hwprobes[1].value; - if (IMAEXT0Value & RISCV_HWPROBE_IMA_FD) { - SET_RISCV_FEATURE(F); - SET_RISCV_FEATURE(D); - } - - SET_SINGLE_IMAEXT_RISCV_FEATURE(RISCV_HWPROBE_IMA_C, C); - SET_SINGLE_IMAEXT_RISCV_FEATURE(RISCV_HWPROBE_IMA_V, V); - SET_RISCV_HWPROBE_EXT_SINGLE_RISCV_FEATURE(ZBA); *** 2681 LINES SKIPPED *** From nobody Sun Dec 1 12:54:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rh14YtSz5fbQd; Sun, 01 Dec 2024 12:54:25 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rh12DB6z4PRP; Sun, 1 Dec 2024 12:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6L0VewgcAPVwmdmH5C0puqkddrcUHxJByDxpEI2heAg=; b=CX55C54+zPSY3M80bvM1/IqidgkTZ7VmmqI+DmIk9VUU5RH9AKzmLt05/CK/vHGK3r2rbs Dvwxs+LTnvaiebWKhJX4IH0NLyLkNz+R4tzPmviEe8Q4Cmms8E/isZz5DGDpPecyqR/aQX Hh3jjiVqgXYGOgzd6Dzf/iQLDN4uYBzpGXF+KtZE1o5SnSVXnmM4IC4rMPfdlDKApGp/yB hoGO2S4lXdYyS6Pn5SZjp0N70pMIEzuRRWx2Sm5ExBxr+FQNva3vb9EULgJoXc+A/gg3xf lrLGZk4jmYu6jHG8JVta65nl6Ujy5KCyg7L9tN/dyfuCRPRcW6lov90lydSeNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6L0VewgcAPVwmdmH5C0puqkddrcUHxJByDxpEI2heAg=; b=THsHevK3t/XCP9D2L9lDuTI15i+Dnlt1KX6HJczCZdYHpqRsl9vaVBdM4ovZWlVUpwUPWq CcIJ2LLbOv4yx/f+7sLRe1B7dhvejkPF630HcLLO3BbAeeEI5dEiExqxPL3/AV66arehht Cc7F4bOLyOMKInwhaxdG6q+/VLMySAo2w0b0DEMtkmHJZEVKeSNnmAQ9V51msukpHqonST l2lUdlgxVhBGlsxqx8MIeViioH4W6xuQ3o5fmXIrV42pq6OvD5IELBfi8Hf7DNYc6MTBkI 37gofUE6pHaIXFCQxdKNAFeZnc/6GDwSbGKvGQhr2tq+iODTw4bmLCApUP+hYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057665; a=rsa-sha256; cv=none; b=lR/nTcmRVr1ytimaP7voZgLJ083+ShM0FJX2pn7ixd7Tp9c2pRFgugQd0S6llUTYOgmp8I siFKm7a8KmwSwP8XphW2Vjb8Vqi0EHFvBAZM7/yGBw8Iv0rXcYbZXJiKwJcHg9hzO3gRFr VX1hhEe0b6T2ZTKxV94DPZe1AnIdDKwKa/xqw94p/L61CdyYOLGPPLgYbQcu/ZuoioXUgH wgQyt8mPNLjTlq1grVWrs7N4u3Q6foIsOQZuE8OyDwVYcauz3S8XCESTOXnfDRpuUFmXOa W01bS0YiA7AlpaZMW1Wuu8oWKyP+CRpW2Zq1UzAjm8+tcXetBYPLQUiHSRzNkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rh10LsTztNS; Sun, 1 Dec 2024 12:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsO2M094215; Sun, 1 Dec 2024 12:54:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsOM4094212; Sun, 1 Dec 2024 12:54:24 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:24 GMT Message-Id: <202412011254.4B1CsOM4094212@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4f445d28a5eb - stable/13 - Merge llvm-project release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4f445d28a5eb4746a7baf1371d212165d4123090 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4f445d28a5eb4746a7baf1371d212165d4123090 commit 4f445d28a5eb4746a7baf1371d212165d4123090 Author: Dimitry Andric AuthorDate: 2024-08-25 11:12:58 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:43 +0000 Merge llvm-project release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8. PR: 280562 MFC after: 1 month (cherry picked from commit 62987288060ff68c817b7056815aa9fb8ba8ecd7) --- .../clang/include/clang/AST/DeclBase.h | 7 + .../llvm-project/clang/include/clang/AST/ExprCXX.h | 7 +- .../include/clang/Basic/DiagnosticParseKinds.td | 3 - .../clang/include/clang/Basic/PointerAuthOptions.h | 6 + .../clang/include/clang/Basic/arm_sve.td | 26 ++- .../clang/include/clang/Driver/Options.td | 21 +-- .../clang/include/clang/Lex/PreprocessorOptions.h | 5 - .../clang/include/clang/Parse/Parser.h | 1 - .../include/clang/Serialization/ASTBitCodes.h | 3 + .../clang/include/clang/Serialization/ASTReader.h | 6 + .../clang/include/clang/Serialization/ASTWriter.h | 7 + contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 3 +- contrib/llvm-project/clang/lib/AST/ASTImporter.cpp | 6 +- contrib/llvm-project/clang/lib/AST/DeclBase.cpp | 34 +++- contrib/llvm-project/clang/lib/AST/ExprCXX.cpp | 19 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 2 +- .../llvm-project/clang/lib/CodeGen/CGVTables.cpp | 56 +++--- .../clang/lib/CodeGen/CodeGenFunction.cpp | 4 + .../clang/lib/CodeGen/ItaniumCXXABI.cpp | 3 + .../llvm-project/clang/lib/CodeGen/TargetInfo.cpp | 32 +++- .../llvm-project/clang/lib/CodeGen/TargetInfo.h | 7 +- .../clang/lib/CodeGen/Targets/AArch64.cpp | 14 +- .../clang/lib/Driver/ToolChains/AIX.cpp | 6 - .../clang/lib/Driver/ToolChains/Cuda.cpp | 4 + .../clang/lib/Driver/ToolChains/Darwin.cpp | 37 +++- .../clang/lib/Driver/ToolChains/Gnu.cpp | 3 +- contrib/llvm-project/clang/lib/Driver/Types.cpp | 4 +- .../clang/lib/Format/TokenAnnotator.cpp | 11 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 3 + .../clang/lib/Frontend/CompilerInvocation.cpp | 5 +- .../clang/lib/Frontend/InitPreprocessor.cpp | 1 + contrib/llvm-project/clang/lib/Headers/ptrauth.h | 6 + .../llvm-project/clang/lib/Parse/ParsePragma.cpp | 25 --- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 4 + .../llvm-project/clang/lib/Sema/SemaCoroutine.cpp | 3 +- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 11 +- .../llvm-project/clang/lib/Sema/SemaDeclCXX.cpp | 50 ++++- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 2 +- .../llvm-project/clang/lib/Sema/SemaExprMember.cpp | 3 +- contrib/llvm-project/clang/lib/Sema/SemaInit.cpp | 4 +- contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp | 6 +- .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 6 +- .../llvm-project/clang/lib/Sema/SemaTemplate.cpp | 3 +- .../llvm-project/clang/lib/Sema/TreeTransform.h | 8 +- .../clang/lib/Serialization/ASTReader.cpp | 11 ++ .../clang/lib/Serialization/ASTReaderDecl.cpp | 72 ++++++-- .../clang/lib/Serialization/ASTWriter.cpp | 33 +++- .../clang/lib/Serialization/ASTWriterDecl.cpp | 6 + .../clang/tools/clang-format/ClangFormat.cpp | 12 +- .../lib/builtins/aarch64/sme-libc-mem-routines.S | 10 +- .../lib/sanitizer_common/sanitizer_linux.cpp | 47 ++++- contrib/llvm-project/libcxx/include/__bit/rotate.h | 37 ++-- contrib/llvm-project/libcxx/include/__math/hypot.h | 66 ++----- .../libcxx/include/__memory/inout_ptr.h | 10 +- .../llvm-project/libcxx/include/__memory/out_ptr.h | 8 +- contrib/llvm-project/libcxx/include/complex | 9 +- contrib/llvm-project/libcxx/include/optional | 9 +- contrib/llvm-project/libcxx/include/span | 2 +- contrib/llvm-project/libunwind/src/Registers.hpp | 7 + .../llvm-project/libunwind/src/UnwindCursor.hpp | 6 +- contrib/llvm-project/libunwind/src/UnwindLevel1.c | 31 +++- .../libunwind/src/UnwindRegistersRestore.S | 14 ++ contrib/llvm-project/libunwind/src/assembly.h | 25 ++- contrib/llvm-project/libunwind/src/cet_unwind.h | 22 +++ contrib/llvm-project/lld/ELF/Arch/ARM.cpp | 21 ++- contrib/llvm-project/lld/ELF/Config.h | 3 +- contrib/llvm-project/lld/ELF/Driver.cpp | 9 + contrib/llvm-project/lld/ELF/InputFiles.cpp | 6 +- contrib/llvm-project/lld/ELF/Relocations.cpp | 8 +- .../lldb/include/lldb/API/SBSaveCoreOptions.h | 2 +- .../lldb/include/lldb/Utility/AddressableBits.h | 2 + .../lldb/source/API/SBSaveCoreOptions.cpp | 2 + .../SymbolFile/DWARF/DWARFASTParserClang.cpp | 11 +- .../llvm/include/llvm/ADT/SmallVector.h | 1 + .../include/llvm/Analysis/LoopAccessAnalysis.h | 23 +-- .../include/llvm/CodeGen/TargetFrameLowering.h | 6 + .../llvm/include/llvm/CodeGenData/CodeGenData.h | 204 --------------------- .../llvm/include/llvm/CodeGenData/CodeGenData.inc | 46 ----- .../include/llvm/CodeGenData/CodeGenDataReader.h | 154 ---------------- .../include/llvm/CodeGenData/CodeGenDataWriter.h | 68 ------- .../llvm-project/llvm/include/llvm/IR/Metadata.h | 6 +- .../llvm/lib/Analysis/LoopAccessAnalysis.cpp | 121 ++++++------ .../llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp | 8 +- .../llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 1 + .../llvm/lib/CodeGen/PrologEpilogInserter.cpp | 3 + .../llvm/lib/CodeGenData/CodeGenData.cpp | 196 -------------------- .../llvm/lib/CodeGenData/CodeGenDataReader.cpp | 175 ------------------ .../llvm/lib/CodeGenData/CodeGenDataWriter.cpp | 162 ---------------- .../llvm-project/llvm/lib/IR/LegacyPassManager.cpp | 4 +- .../llvm/lib/Passes/StandardInstrumentations.cpp | 9 +- contrib/llvm-project/llvm/lib/Support/regcomp.c | 8 +- .../llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp | 7 + .../AArch64/AArch64DeadRegisterDefinitionsPass.cpp | 4 + .../llvm/lib/Target/AArch64/AArch64Features.td | 28 ++- .../lib/Target/AArch64/AArch64FrameLowering.cpp | 204 ++++++++++++++++++++- .../llvm/lib/Target/AArch64/AArch64FrameLowering.h | 6 +- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 3 + .../llvm/lib/Target/AArch64/AArch64Processors.td | 46 ++++- .../Target/AArch64/AArch64TargetTransformInfo.cpp | 40 +++- .../Target/AArch64/AArch64TargetTransformInfo.h | 2 +- .../llvm/lib/Target/AMDGPU/SIFoldOperands.cpp | 13 +- .../llvm/lib/Target/ARM/ARMCallLowering.cpp | 9 + .../llvm/lib/Target/ARM/ARMCallLowering.h | 2 + .../lib/Target/Hexagon/HexagonConstExtenders.cpp | 4 + .../llvm/lib/Target/Mips/MipsFastISel.cpp | 4 +- .../llvm/lib/Target/PowerPC/PPCFrameLowering.cpp | 14 +- .../llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp | 19 +- .../Transforms/InstCombine/InstCombineCalls.cpp | 2 +- .../llvm/utils/TableGen/ARMTargetDefEmitter.cpp | 32 +++- .../llvm-project/openmp/runtime/src/z_Linux_asm.S | 53 ++++++ lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 4 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 4 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 117 files changed, 1235 insertions(+), 1454 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/AST/DeclBase.h b/contrib/llvm-project/clang/include/clang/AST/DeclBase.h index 40f01abf384e..2a4bd0f9c2fd 100644 --- a/contrib/llvm-project/clang/include/clang/AST/DeclBase.h +++ b/contrib/llvm-project/clang/include/clang/AST/DeclBase.h @@ -670,6 +670,13 @@ public: /// Whether this declaration comes from another module unit. bool isInAnotherModuleUnit() const; + /// Whether this declaration comes from the same module unit being compiled. + bool isInCurrentModuleUnit() const; + + /// Whether the definition of the declaration should be emitted in external + /// sources. + bool shouldEmitInExternalSource() const; + /// Whether this declaration comes from explicit global module. bool isFromExplicitGlobalModule() const; diff --git a/contrib/llvm-project/clang/include/clang/AST/ExprCXX.h b/contrib/llvm-project/clang/include/clang/AST/ExprCXX.h index c2feac525c1e..45cfd7bfb7f9 100644 --- a/contrib/llvm-project/clang/include/clang/AST/ExprCXX.h +++ b/contrib/llvm-project/clang/include/clang/AST/ExprCXX.h @@ -3229,7 +3229,7 @@ class UnresolvedLookupExpr final const DeclarationNameInfo &NameInfo, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End, - bool KnownDependent); + bool KnownDependent, bool KnownInstantiationDependent); UnresolvedLookupExpr(EmptyShell Empty, unsigned NumResults, bool HasTemplateKWAndArgsInfo); @@ -3248,7 +3248,7 @@ public: NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, UnresolvedSetIterator Begin, UnresolvedSetIterator End, - bool KnownDependent); + bool KnownDependent, bool KnownInstantiationDependent); // After canonicalization, there may be dependent template arguments in // CanonicalConverted But none of Args is dependent. When any of @@ -3258,7 +3258,8 @@ public: NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, const TemplateArgumentListInfo *Args, UnresolvedSetIterator Begin, - UnresolvedSetIterator End, bool KnownDependent); + UnresolvedSetIterator End, bool KnownDependent, + bool KnownInstantiationDependent); static UnresolvedLookupExpr *CreateEmpty(const ASTContext &Context, unsigned NumResults, diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td index f8d50d12bb93..12aab09f2855 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td @@ -1260,9 +1260,6 @@ def warn_pragma_intrinsic_builtin : Warning< def warn_pragma_unused_expected_var : Warning< "expected '#pragma unused' argument to be a variable name">, InGroup; -// - #pragma mc_func -def err_pragma_mc_func_not_supported : - Error<"#pragma mc_func is not supported">; // - #pragma init_seg def warn_pragma_init_seg_unsupported_target : Warning< "'#pragma init_seg' is only supported when targeting a " diff --git a/contrib/llvm-project/clang/include/clang/Basic/PointerAuthOptions.h b/contrib/llvm-project/clang/include/clang/Basic/PointerAuthOptions.h index 417b4b00648c..a26af69e1fa2 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/PointerAuthOptions.h +++ b/contrib/llvm-project/clang/include/clang/Basic/PointerAuthOptions.h @@ -159,6 +159,12 @@ public: }; struct PointerAuthOptions { + /// Should return addresses be authenticated? + bool ReturnAddresses = false; + + /// Do authentication failures cause a trap? + bool AuthTraps = false; + /// Do indirect goto label addresses need to be authenticated? bool IndirectGotos = false; diff --git a/contrib/llvm-project/clang/include/clang/Basic/arm_sve.td b/contrib/llvm-project/clang/include/clang/Basic/arm_sve.td index 94c093d89115..fb11d743fd64 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/arm_sve.td +++ b/contrib/llvm-project/clang/include/clang/Basic/arm_sve.td @@ -2116,7 +2116,7 @@ def SVFCLAMP_BF : SInst<"svclamp[_{d}]", "dddd", "b", MergeNone, "aarch64_sve_ multiclass MinMaxIntr { def SVS # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "csil", MergeNone, "aarch64_sve_s" # i # zm # "_" # mul, [IsStreaming], []>; def SVU # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "UcUsUiUl", MergeNone, "aarch64_sve_u" # i # zm # "_" # mul, [IsStreaming], []>; - def SVF # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "bhfd", MergeNone, "aarch64_sve_f" # i # zm # "_" # mul, [IsStreaming], []>; + def SVF # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "hfd", MergeNone, "aarch64_sve_f" # i # zm # "_" # mul, [IsStreaming], []>; } let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2" in { @@ -2134,11 +2134,11 @@ let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2" in { } multiclass SInstMinMaxByVector { - def NAME # _SINGLE_X2 : SInst<"sv" # name # "nm[_single_{d}_x2]", "22d", "bhfd", MergeNone, "aarch64_sve_f" # name # "nm_single_x2", [IsStreaming], []>; - def NAME # _SINGLE_X4 : SInst<"sv" # name # "nm[_single_{d}_x4]", "44d", "bhfd", MergeNone, "aarch64_sve_f" # name # "nm_single_x4", [IsStreaming], []>; + def NAME # _SINGLE_X2 : SInst<"sv" # name # "nm[_single_{d}_x2]", "22d", "hfd", MergeNone, "aarch64_sve_f" # name # "nm_single_x2", [IsStreaming], []>; + def NAME # _SINGLE_X4 : SInst<"sv" # name # "nm[_single_{d}_x4]", "44d", "hfd", MergeNone, "aarch64_sve_f" # name # "nm_single_x4", [IsStreaming], []>; - def NAME # _X2 : SInst<"sv" # name # "nm[_{d}_x2]", "222", "bhfd", MergeNone, "aarch64_sve_f" # name # "nm_x2", [IsStreaming], []>; - def NAME # _X4 : SInst<"sv" # name # "nm[_{d}_x4]", "444", "bhfd", MergeNone, "aarch64_sve_f" # name # "nm_x4", [IsStreaming], []>; + def NAME # _X2 : SInst<"sv" # name # "nm[_{d}_x2]", "222", "hfd", MergeNone, "aarch64_sve_f" # name # "nm_x2", [IsStreaming], []>; + def NAME # _X4 : SInst<"sv" # name # "nm[_{d}_x4]", "444", "hfd", MergeNone, "aarch64_sve_f" # name # "nm_x4", [IsStreaming], []>; } let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2" in { @@ -2172,9 +2172,25 @@ let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2" in { def SVFCLAMP_X4 : SInst<"svclamp[_single_{d}_x4]", "44dd", "hfd", MergeNone, "aarch64_sve_fclamp_single_x4", [IsStreaming], []>; } +multiclass BfSingleMultiVector { + def NAME # _SINGLE_X2 : SInst<"sv" # name # "[_single_{d}_x2]", "22d", "b", MergeNone, "aarch64_sve_f" # name # "_single_x2", [IsStreaming], []>; + def NAME # _SINGLE_X4 : SInst<"sv" # name # "[_single_{d}_x4]", "44d", "b", MergeNone, "aarch64_sve_f" # name # "_single_x4", [IsStreaming], []>; + + def NAME # _X2 : SInst<"sv" # name # "[_{d}_x2]", "222", "b", MergeNone, "aarch64_sve_f" # name # "_x2", [IsStreaming], []>; + def NAME # _X4 : SInst<"sv" # name # "[_{d}_x4]", "444", "b", MergeNone, "aarch64_sve_f" # name # "_x4", [IsStreaming], []>; +} + let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2,b16b16"in { def SVBFCLAMP_X2 : SInst<"svclamp[_single_{d}_x2]", "22dd", "b", MergeNone, "aarch64_sve_bfclamp_single_x2", [IsStreaming], []>; def SVBFCLAMP_X4 : SInst<"svclamp[_single_{d}_x4]", "44dd", "b", MergeNone, "aarch64_sve_bfclamp_single_x4", [IsStreaming], []>; + + // bfmin, bfmax (single, multi) + defm SVBFMIN : BfSingleMultiVector<"min">; + defm SVBFMAX : BfSingleMultiVector<"max">; + + // bfminnm, bfmaxnm (single, multi) + defm SVBFMINNM : BfSingleMultiVector<"minnm">; + defm SVBFMAXNM : BfSingleMultiVector<"maxnm">; } let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2" in { diff --git a/contrib/llvm-project/clang/include/clang/Driver/Options.td b/contrib/llvm-project/clang/include/clang/Driver/Options.td index 359a698ea87d..15f9ee75492e 100644 --- a/contrib/llvm-project/clang/include/clang/Driver/Options.td +++ b/contrib/llvm-project/clang/include/clang/Driver/Options.td @@ -932,8 +932,9 @@ def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>, Alias, AliasArgs<["1"]>; def Ofast : Joined<["-"], "Ofast">, Group, Visibility<[ClangOption, CC1Option, FlangOption]>, - HelpText<"Deprecated; use '-O3 -ffast-math' for the same behavior," - " or '-O3' to enable only conforming optimizations">; + HelpTextForVariants<[ClangOption, CC1Option], + "Deprecated; use '-O3 -ffast-math' for the same behavior," + " or '-O3' to enable only conforming optimizations">; def P : Flag<["-"], "P">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, Group, @@ -3106,7 +3107,7 @@ def fmodules_user_build_path : Separate<["-"], "fmodules-user-build-path">, Grou HelpText<"Specify the module user build path">, MarshallingInfoString>; def fprebuilt_module_path : Joined<["-"], "fprebuilt-module-path=">, Group, - Flags<[]>, Visibility<[ClangOption, CC1Option]>, + Flags<[]>, Visibility<[ClangOption, CLOption, CC1Option]>, MetaVarName<"">, HelpText<"Specify the prebuilt module path">; defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules", @@ -3115,11 +3116,11 @@ defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules", NegFlag, BothFlags<[], [ClangOption, CC1Option]>>; def fmodule_output_EQ : Joined<["-"], "fmodule-output=">, - Flags<[NoXarchOption]>, Visibility<[ClangOption, CC1Option]>, + Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, CC1Option]>, MarshallingInfoString>, HelpText<"Save intermediate module file results when compiling a standard C++ module unit.">; def fmodule_output : Flag<["-"], "fmodule-output">, Flags<[NoXarchOption]>, - Visibility<[ClangOption, CC1Option]>, + Visibility<[ClangOption, CLOption, CC1Option]>, HelpText<"Save intermediate module file results when compiling a standard C++ module unit.">; defm skip_odr_check_in_gmf : BoolOption<"f", "skip-odr-check-in-gmf", @@ -3299,8 +3300,10 @@ def fretain_comments_from_system_headers : Flag<["-"], "fretain-comments-from-sy Visibility<[ClangOption, CC1Option]>, MarshallingInfoFlag>; def fmodule_header : Flag <["-"], "fmodule-header">, Group, + Visibility<[ClangOption, CLOption]>, HelpText<"Build a C++20 Header Unit from a header">; def fmodule_header_EQ : Joined<["-"], "fmodule-header=">, Group, + Visibility<[ClangOption, CLOption]>, MetaVarName<"">, HelpText<"Build a C++20 Header Unit from a header that should be found in the user (fmodule-header=user) or system (fmodule-header=system) search path.">; @@ -5945,6 +5948,7 @@ def _output : Separate<["--"], "output">, Alias; def _param : Separate<["--"], "param">, Group; def _param_EQ : Joined<["--"], "param=">, Alias<_param>; def _precompile : Flag<["--"], "precompile">, Flags<[NoXarchOption]>, + Visibility<[ClangOption, CLOption]>, Group, HelpText<"Only precompile the input">; def _prefix_EQ : Joined<["--"], "prefix=">, Alias; def _prefix : Separate<["--"], "prefix">, Alias; @@ -8086,13 +8090,6 @@ def source_date_epoch : Separate<["-"], "source-date-epoch">, } // let Visibility = [CC1Option] -defm err_pragma_mc_func_aix : BoolFOption<"err-pragma-mc-func-aix", - PreprocessorOpts<"ErrorOnPragmaMcfuncOnAIX">, DefaultFalse, - PosFlag, - NegFlag>; - //===----------------------------------------------------------------------===// // CUDA Options //===----------------------------------------------------------------------===// diff --git a/contrib/llvm-project/clang/include/clang/Lex/PreprocessorOptions.h b/contrib/llvm-project/clang/include/clang/Lex/PreprocessorOptions.h index 3f7dd9db18ba..c2e3d6833302 100644 --- a/contrib/llvm-project/clang/include/clang/Lex/PreprocessorOptions.h +++ b/contrib/llvm-project/clang/include/clang/Lex/PreprocessorOptions.h @@ -211,10 +211,6 @@ public: /// If set, the UNIX timestamp specified by SOURCE_DATE_EPOCH. std::optional SourceDateEpoch; - /// If set, the preprocessor reports an error when processing #pragma mc_func - /// on AIX. - bool ErrorOnPragmaMcfuncOnAIX = false; - public: PreprocessorOptions() : PrecompiledPreambleBytes(0, false) {} @@ -252,7 +248,6 @@ public: PrecompiledPreambleBytes.first = 0; PrecompiledPreambleBytes.second = false; RetainExcludedConditionalBlocks = false; - ErrorOnPragmaMcfuncOnAIX = false; } }; diff --git a/contrib/llvm-project/clang/include/clang/Parse/Parser.h b/contrib/llvm-project/clang/include/clang/Parse/Parser.h index 35bb1a19d40f..f256d603ae62 100644 --- a/contrib/llvm-project/clang/include/clang/Parse/Parser.h +++ b/contrib/llvm-project/clang/include/clang/Parse/Parser.h @@ -221,7 +221,6 @@ class Parser : public CodeCompletionHandler { std::unique_ptr MaxTokensHerePragmaHandler; std::unique_ptr MaxTokensTotalPragmaHandler; std::unique_ptr RISCVPragmaHandler; - std::unique_ptr MCFuncPragmaHandler; std::unique_ptr CommentSemaHandler; diff --git a/contrib/llvm-project/clang/include/clang/Serialization/ASTBitCodes.h b/contrib/llvm-project/clang/include/clang/Serialization/ASTBitCodes.h index 5dd0ba33f8a9..9b7e3af0e449 100644 --- a/contrib/llvm-project/clang/include/clang/Serialization/ASTBitCodes.h +++ b/contrib/llvm-project/clang/include/clang/Serialization/ASTBitCodes.h @@ -721,6 +721,9 @@ enum ASTRecordTypes { /// Record code for \#pragma clang unsafe_buffer_usage begin/end PP_UNSAFE_BUFFER_USAGE = 69, + + /// Record code for vtables to emit. + VTABLES_TO_EMIT = 70, }; /// Record types used within a source manager block. diff --git a/contrib/llvm-project/clang/include/clang/Serialization/ASTReader.h b/contrib/llvm-project/clang/include/clang/Serialization/ASTReader.h index 76e51ac7ab97..671520a3602b 100644 --- a/contrib/llvm-project/clang/include/clang/Serialization/ASTReader.h +++ b/contrib/llvm-project/clang/include/clang/Serialization/ASTReader.h @@ -790,6 +790,11 @@ private: /// the consumer eagerly. SmallVector EagerlyDeserializedDecls; + /// The IDs of all vtables to emit. The referenced declarations are passed + /// to the consumers' HandleVTable eagerly after passing + /// EagerlyDeserializedDecls. + SmallVector VTablesToEmit; + /// The IDs of all tentative definitions stored in the chain. /// /// Sema keeps track of all tentative definitions in a TU because it has to @@ -1500,6 +1505,7 @@ private: bool isConsumerInterestedIn(Decl *D); void PassInterestingDeclsToConsumer(); void PassInterestingDeclToConsumer(Decl *D); + void PassVTableToConsumer(CXXRecordDecl *RD); void finishPendingActions(); void diagnoseOdrViolations(); diff --git a/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h b/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h index a0e475ec9f86..71a7c28047e3 100644 --- a/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h +++ b/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h @@ -500,6 +500,10 @@ private: std::vector NonAffectingRanges; std::vector NonAffectingOffsetAdjustments; + /// A list of classes which need to emit the VTable in the corresponding + /// object file. + llvm::SmallVector PendingEmittingVTables; + /// Computes input files that didn't affect compilation of the current module, /// and initializes data structures necessary for leaving those files out /// during \c SourceManager serialization. @@ -857,6 +861,8 @@ public: return PredefinedDecls.count(D); } + void handleVTable(CXXRecordDecl *RD); + private: // ASTDeserializationListener implementation void ReaderInitialized(ASTReader *Reader) override; @@ -951,6 +957,7 @@ public: void InitializeSema(Sema &S) override { SemaPtr = &S; } void HandleTranslationUnit(ASTContext &Ctx) override; + void HandleVTable(CXXRecordDecl *RD) override { Writer.handleVTable(RD); } ASTMutationListener *GetASTMutationListener() override; ASTDeserializationListener *GetASTDeserializationListener() override; bool hasEmittedPCH() const { return Buffer->IsComplete; } diff --git a/contrib/llvm-project/clang/lib/AST/ASTContext.cpp b/contrib/llvm-project/clang/lib/AST/ASTContext.cpp index 7af9ea7105bb..3da5e888f251 100644 --- a/contrib/llvm-project/clang/lib/AST/ASTContext.cpp +++ b/contrib/llvm-project/clang/lib/AST/ASTContext.cpp @@ -12405,8 +12405,7 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) { !isMSStaticDataMemberInlineDefinition(VD)) return false; - // Variables in other module units shouldn't be forced to be emitted. - if (VD->isInAnotherModuleUnit()) + if (VD->shouldEmitInExternalSource()) return false; // Variables that can be needed in other TUs are required. diff --git a/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp b/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp index 08ef09d353af..e95992b99f7e 100644 --- a/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp +++ b/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp @@ -8578,13 +8578,15 @@ ASTNodeImporter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) { return UnresolvedLookupExpr::Create( Importer.getToContext(), *ToNamingClassOrErr, *ToQualifierLocOrErr, *ToTemplateKeywordLocOrErr, ToNameInfo, E->requiresADL(), &ToTAInfo, - ToDecls.begin(), ToDecls.end(), KnownDependent); + ToDecls.begin(), ToDecls.end(), KnownDependent, + /*KnownInstantiationDependent=*/E->isInstantiationDependent()); } return UnresolvedLookupExpr::Create( Importer.getToContext(), *ToNamingClassOrErr, *ToQualifierLocOrErr, ToNameInfo, E->requiresADL(), ToDecls.begin(), ToDecls.end(), - /*KnownDependent=*/E->isTypeDependent()); + /*KnownDependent=*/E->isTypeDependent(), + /*KnownInstantiationDependent=*/E->isInstantiationDependent()); } ExpectedStmt diff --git a/contrib/llvm-project/clang/lib/AST/DeclBase.cpp b/contrib/llvm-project/clang/lib/AST/DeclBase.cpp index bc5a9206c0db..b59f118380ca 100644 --- a/contrib/llvm-project/clang/lib/AST/DeclBase.cpp +++ b/contrib/llvm-project/clang/lib/AST/DeclBase.cpp @@ -1125,20 +1125,36 @@ bool Decl::isInAnotherModuleUnit() const { if (!M) return false; + // FIXME or NOTE: maybe we need to be clear about the semantics + // of clang header modules. e.g., if this lives in a clang header + // module included by the current unit, should we return false + // here? + // + // This is clear for header units as the specification says the + // header units live in a synthesised translation unit. So we + // can return false here. M = M->getTopLevelModule(); - // FIXME: It is problematic if the header module lives in another module - // unit. Consider to fix this by techniques like - // ExternalASTSource::hasExternalDefinitions. - if (M->isHeaderLikeModule()) + if (!M->isNamedModule()) return false; - // A global module without parent implies that we're parsing the global - // module. So it can't be in another module unit. - if (M->isGlobalModule()) + return M != getASTContext().getCurrentNamedModule(); +} + +bool Decl::isInCurrentModuleUnit() const { + auto *M = getOwningModule(); + + if (!M || !M->isNamedModule()) return false; - assert(M->isNamedModule() && "New module kind?"); - return M != getASTContext().getCurrentNamedModule(); + return M == getASTContext().getCurrentNamedModule(); +} + +bool Decl::shouldEmitInExternalSource() const { + ExternalASTSource *Source = getASTContext().getExternalSource(); + if (!Source) + return false; + + return Source->hasExternalDefinitions(this) == ExternalASTSource::EK_Always; } bool Decl::isFromExplicitGlobalModule() const { diff --git a/contrib/llvm-project/clang/lib/AST/ExprCXX.cpp b/contrib/llvm-project/clang/lib/AST/ExprCXX.cpp index 8d2a1b5611cc..45e2badf2ddd 100644 --- a/contrib/llvm-project/clang/lib/AST/ExprCXX.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprCXX.cpp @@ -402,10 +402,11 @@ UnresolvedLookupExpr::UnresolvedLookupExpr( NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, - UnresolvedSetIterator End, bool KnownDependent) + UnresolvedSetIterator End, bool KnownDependent, + bool KnownInstantiationDependent) : OverloadExpr(UnresolvedLookupExprClass, Context, QualifierLoc, TemplateKWLoc, NameInfo, TemplateArgs, Begin, End, - KnownDependent, false, false), + KnownDependent, KnownInstantiationDependent, false), NamingClass(NamingClass) { UnresolvedLookupExprBits.RequiresADL = RequiresADL; } @@ -420,7 +421,7 @@ UnresolvedLookupExpr *UnresolvedLookupExpr::Create( const ASTContext &Context, CXXRecordDecl *NamingClass, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, UnresolvedSetIterator Begin, UnresolvedSetIterator End, - bool KnownDependent) { + bool KnownDependent, bool KnownInstantiationDependent) { unsigned NumResults = End - Begin; unsigned Size = totalSizeToAlloc(NumResults, 0, 0); @@ -428,7 +429,8 @@ UnresolvedLookupExpr *UnresolvedLookupExpr::Create( return new (Mem) UnresolvedLookupExpr( Context, NamingClass, QualifierLoc, /*TemplateKWLoc=*/SourceLocation(), NameInfo, RequiresADL, - /*TemplateArgs=*/nullptr, Begin, End, KnownDependent); + /*TemplateArgs=*/nullptr, Begin, End, KnownDependent, + KnownInstantiationDependent); } UnresolvedLookupExpr *UnresolvedLookupExpr::Create( @@ -436,7 +438,8 @@ UnresolvedLookupExpr *UnresolvedLookupExpr::Create( NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, const TemplateArgumentListInfo *Args, UnresolvedSetIterator Begin, - UnresolvedSetIterator End, bool KnownDependent) { + UnresolvedSetIterator End, bool KnownDependent, + bool KnownInstantiationDependent) { unsigned NumResults = End - Begin; bool HasTemplateKWAndArgsInfo = Args || TemplateKWLoc.isValid(); unsigned NumTemplateArgs = Args ? Args->size() : 0; @@ -444,9 +447,9 @@ UnresolvedLookupExpr *UnresolvedLookupExpr::Create( TemplateArgumentLoc>( NumResults, HasTemplateKWAndArgsInfo, NumTemplateArgs); void *Mem = Context.Allocate(Size, alignof(UnresolvedLookupExpr)); - return new (Mem) UnresolvedLookupExpr(Context, NamingClass, QualifierLoc, - TemplateKWLoc, NameInfo, RequiresADL, - Args, Begin, End, KnownDependent); + return new (Mem) UnresolvedLookupExpr( + Context, NamingClass, QualifierLoc, TemplateKWLoc, NameInfo, RequiresADL, + Args, Begin, End, KnownDependent, KnownInstantiationDependent); } UnresolvedLookupExpr *UnresolvedLookupExpr::CreateEmpty( diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp index 234a9c16e39d..6e69e84a2344 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp @@ -2032,7 +2032,7 @@ static void getTrivialDefaultFunctionAttributes( } TargetInfo::BranchProtectionInfo BPI(LangOpts); - TargetCodeGenInfo::setBranchProtectionFnAttributes(BPI, FuncAttrs); + TargetCodeGenInfo::initBranchProtectionFnAttributes(BPI, FuncAttrs); } /// Merges `target-features` from \TargetOpts and \F, and sets the result in diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp index 7f729d359b82..267bdf098297 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp @@ -1078,29 +1078,41 @@ llvm::GlobalVariable::LinkageTypes CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { if (!RD->isExternallyVisible()) return llvm::GlobalVariable::InternalLinkage; - - // We're at the end of the translation unit, so the current key - // function is fully correct. - const CXXMethodDecl *keyFunction = Context.getCurrentKeyFunction(RD); - if (keyFunction && !RD->hasAttr()) { + + // In windows, the linkage of vtable is not related to modules. + bool IsInNamedModule = !getTarget().getCXXABI().isMicrosoft() && + RD->isInNamedModule(); + // If the CXXRecordDecl is not in a module unit, we need to get + // its key function. We're at the end of the translation unit, so the current + // key function is fully correct. + const CXXMethodDecl *keyFunction = + IsInNamedModule ? nullptr : Context.getCurrentKeyFunction(RD); + if (IsInNamedModule || (keyFunction && !RD->hasAttr())) { // If this class has a key function, use that to determine the // linkage of the vtable. const FunctionDecl *def = nullptr; - if (keyFunction->hasBody(def)) + if (keyFunction && keyFunction->hasBody(def)) keyFunction = cast(def); - switch (keyFunction->getTemplateSpecializationKind()) { - case TSK_Undeclared: - case TSK_ExplicitSpecialization: + bool IsExternalDefinition = + IsInNamedModule ? RD->shouldEmitInExternalSource() : !def; + + TemplateSpecializationKind Kind = + IsInNamedModule ? RD->getTemplateSpecializationKind() + : keyFunction->getTemplateSpecializationKind(); + + switch (Kind) { + case TSK_Undeclared: + case TSK_ExplicitSpecialization: assert( - (def || CodeGenOpts.OptimizationLevel > 0 || + (IsInNamedModule || def || CodeGenOpts.OptimizationLevel > 0 || CodeGenOpts.getDebugInfo() != llvm::codegenoptions::NoDebugInfo) && - "Shouldn't query vtable linkage without key function, " - "optimizations, or debug info"); - if (!def && CodeGenOpts.OptimizationLevel > 0) + "Shouldn't query vtable linkage without the class in module units, " + "key function, optimizations, or debug info"); + if (IsExternalDefinition && CodeGenOpts.OptimizationLevel > 0) return llvm::GlobalVariable::AvailableExternallyLinkage; - if (keyFunction->isInlined()) + if (keyFunction && keyFunction->isInlined()) return !Context.getLangOpts().AppleKext ? llvm::GlobalVariable::LinkOnceODRLinkage : llvm::Function::InternalLinkage; @@ -1119,7 +1131,7 @@ CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { case TSK_ExplicitInstantiationDeclaration: llvm_unreachable("Should not have been asked to emit this"); - } + } } // -fapple-kext mode does not support weak linkage, so we must use @@ -1213,22 +1225,20 @@ bool CodeGenVTables::isVTableExternal(const CXXRecordDecl *RD) { TSK == TSK_ExplicitInstantiationDefinition) return false; + // Otherwise, if the class is attached to a module, the tables are uniquely + // emitted in the object for the module unit in which it is defined. + if (RD->isInNamedModule()) + return RD->shouldEmitInExternalSource(); + // Otherwise, if the class doesn't have a key function (possibly // anymore), the vtable must be defined here. const CXXMethodDecl *keyFunction = CGM.getContext().getCurrentKeyFunction(RD); if (!keyFunction) return false; - const FunctionDecl *Def; // Otherwise, if we don't have a definition of the key function, the // vtable must be defined somewhere else. - if (!keyFunction->hasBody(Def)) - return true; - - assert(Def && "The body of the key function is not assigned to Def?"); - // If the non-inline key function comes from another module unit, the vtable - // must be defined there. - return Def->isInAnotherModuleUnit() && !Def->isInlineSpecified(); + return !keyFunction->hasBody(); } /// Given that we're currently at the end of the translation unit, and diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp index af201554898f..2b2e23f1e5d7 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp @@ -880,8 +880,12 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, // Add pointer authentication attributes. const CodeGenOptions &CodeGenOpts = CGM.getCodeGenOpts(); + if (CodeGenOpts.PointerAuth.ReturnAddresses) + Fn->addFnAttr("ptrauth-returns"); if (CodeGenOpts.PointerAuth.FunctionPointers) Fn->addFnAttr("ptrauth-calls"); + if (CodeGenOpts.PointerAuth.AuthTraps) + Fn->addFnAttr("ptrauth-auth-traps"); if (CodeGenOpts.PointerAuth.IndirectGotos) Fn->addFnAttr("ptrauth-indirect-gotos"); diff --git a/contrib/llvm-project/clang/lib/CodeGen/ItaniumCXXABI.cpp b/contrib/llvm-project/clang/lib/CodeGen/ItaniumCXXABI.cpp index cd76f8406e7b..0be92fb2e275 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -2315,6 +2315,9 @@ bool ItaniumCXXABI::canSpeculativelyEmitVTable(const CXXRecordDecl *RD) const { if (!canSpeculativelyEmitVTableAsBaseClass(RD)) return false; + if (RD->shouldEmitInExternalSource()) + return false; + // For a complete-object vtable (or more specifically, for the VTT), we need // to be able to speculatively emit the vtables of all dynamic virtual bases. for (const auto &B : RD->vbases()) { diff --git a/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp b/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp index 38faa50cf19c..64a9a5554caf 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp @@ -209,13 +209,37 @@ llvm::Value *TargetCodeGenInfo::createEnqueuedBlockKernel( void TargetCodeGenInfo::setBranchProtectionFnAttributes( const TargetInfo::BranchProtectionInfo &BPI, llvm::Function &F) { - llvm::AttrBuilder FuncAttrs(F.getContext()); - setBranchProtectionFnAttributes(BPI, FuncAttrs); - F.addFnAttrs(FuncAttrs); + // Called on already created and initialized function where attributes already + // set from command line attributes but some might need to be removed as the + // actual BPI is different. + if (BPI.SignReturnAddr != LangOptions::SignReturnAddressScopeKind::None) { + F.addFnAttr("sign-return-address", BPI.getSignReturnAddrStr()); + F.addFnAttr("sign-return-address-key", BPI.getSignKeyStr()); + } else { + if (F.hasFnAttribute("sign-return-address")) + F.removeFnAttr("sign-return-address"); + if (F.hasFnAttribute("sign-return-address-key")) + F.removeFnAttr("sign-return-address-key"); + } + + auto AddRemoveAttributeAsSet = [&](bool Set, const StringRef &ModAttr) { + if (Set) + F.addFnAttr(ModAttr); + else if (F.hasFnAttribute(ModAttr)) + F.removeFnAttr(ModAttr); + }; + + AddRemoveAttributeAsSet(BPI.BranchTargetEnforcement, + "branch-target-enforcement"); + AddRemoveAttributeAsSet(BPI.BranchProtectionPAuthLR, + "branch-protection-pauth-lr"); + AddRemoveAttributeAsSet(BPI.GuardedControlStack, "guarded-control-stack"); } -void TargetCodeGenInfo::setBranchProtectionFnAttributes( +void TargetCodeGenInfo::initBranchProtectionFnAttributes( const TargetInfo::BranchProtectionInfo &BPI, llvm::AttrBuilder &FuncAttrs) { + // Only used for initializing attributes in the AttrBuilder, which will not + // contain any of these attributes so no need to remove anything. if (BPI.SignReturnAddr != LangOptions::SignReturnAddressScopeKind::None) { FuncAttrs.addAttribute("sign-return-address", BPI.getSignReturnAddrStr()); FuncAttrs.addAttribute("sign-return-address-key", BPI.getSignKeyStr()); diff --git a/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.h b/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.h index 2f2138582ba1..156b4ff4353b 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.h +++ b/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.h @@ -414,13 +414,16 @@ public: return nullptr; } + // Set the Branch Protection Attributes of the Function accordingly to the + // BPI. Remove attributes that contradict with current BPI. static void setBranchProtectionFnAttributes(const TargetInfo::BranchProtectionInfo &BPI, llvm::Function &F); + // Add the Branch Protection Attributes of the FuncAttrs. static void - setBranchProtectionFnAttributes(const TargetInfo::BranchProtectionInfo &BPI, - llvm::AttrBuilder &FuncAttrs); + initBranchProtectionFnAttributes(const TargetInfo::BranchProtectionInfo &BPI, + llvm::AttrBuilder &FuncAttrs); protected: static std::string qualifyWindowsLibrary(StringRef Lib); diff --git a/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp b/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp index 1dec3cd40ebd..97381f673c28 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp @@ -840,12 +840,13 @@ static bool isStreamingCompatible(const FunctionDecl *F) { static void diagnoseIfNeedsFPReg(DiagnosticsEngine &Diags, const StringRef ABIName, const AArch64ABIInfo &ABIInfo, - const QualType &Ty, const NamedDecl *D) { + const QualType &Ty, const NamedDecl *D, + SourceLocation loc) { const Type *HABase = nullptr; uint64_t HAMembers = 0; if (Ty->isFloatingType() || Ty->isVectorType() || ABIInfo.isHomogeneousAggregate(Ty, HABase, HAMembers)) { - Diags.Report(D->getLocation(), diag::err_target_unsupported_type_for_abi) + Diags.Report(loc, diag::err_target_unsupported_type_for_abi) << D->getDeclName() << Ty << ABIName; } } @@ -860,10 +861,11 @@ void AArch64TargetCodeGenInfo::checkFunctionABI( if (!TI.hasFeature("fp") && !ABIInfo.isSoftFloat()) { diagnoseIfNeedsFPReg(CGM.getDiags(), TI.getABI(), ABIInfo, - FuncDecl->getReturnType(), FuncDecl); + FuncDecl->getReturnType(), FuncDecl, + FuncDecl->getLocation()); for (ParmVarDecl *PVD : FuncDecl->parameters()) { diagnoseIfNeedsFPReg(CGM.getDiags(), TI.getABI(), ABIInfo, PVD->getType(), - PVD); + PVD, FuncDecl->getLocation()); } } } @@ -908,11 +910,11 @@ void AArch64TargetCodeGenInfo::checkFunctionCallABISoftFloat( return; diagnoseIfNeedsFPReg(CGM.getDiags(), TI.getABI(), ABIInfo, ReturnType, - Caller); + Callee ? Callee : Caller, CallLoc); for (const CallArg &Arg : Args) diagnoseIfNeedsFPReg(CGM.getDiags(), TI.getABI(), ABIInfo, Arg.getType(), - Caller); + Callee ? Callee : Caller, CallLoc); } void AArch64TargetCodeGenInfo::checkFunctionCallABI(CodeGenModule &CGM, diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/AIX.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/AIX.cpp index fb780fb75651..b04502a57a9f 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/AIX.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/AIX.cpp @@ -557,12 +557,6 @@ void AIX::addClangTargetOptions( if (!Args.getLastArgNoClaim(options::OPT_fsized_deallocation, options::OPT_fno_sized_deallocation)) CC1Args.push_back("-fno-sized-deallocation"); - - if (Args.hasFlag(options::OPT_ferr_pragma_mc_func_aix, - options::OPT_fno_err_pragma_mc_func_aix, false)) - CC1Args.push_back("-ferr-pragma-mc-func-aix"); - else - CC1Args.push_back("-fno-err-pragma-mc-func-aix"); } void AIX::addProfileRTLibs(const llvm::opt::ArgList &Args, diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp index 59453c484ae4..61d12b10dfb6 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp @@ -609,6 +609,10 @@ void NVPTX::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(Args.MakeArgString( "--pxtas-path=" + Args.getLastArgValue(options::OPT_ptxas_path_EQ))); + if (Args.hasArg(options::OPT_cuda_path_EQ)) + CmdArgs.push_back(Args.MakeArgString( + "--cuda-path=" + Args.getLastArgValue(options::OPT_cuda_path_EQ))); + // Add paths specified in LIBRARY_PATH environment variable as -L options. addDirectoryList(Args, CmdArgs, "-L", "LIBRARY_PATH"); diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp index c6f9d7beffb1..17d57b2f7eed 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp @@ -2923,22 +2923,45 @@ bool Darwin::isAlignedAllocationUnavailable() const { return TargetVersion < alignedAllocMinVersion(OS); } -static bool sdkSupportsBuiltinModules(const Darwin::DarwinPlatformKind &TargetPlatform, const std::optional &SDKInfo) { +static bool sdkSupportsBuiltinModules( + const Darwin::DarwinPlatformKind &TargetPlatform, + const Darwin::DarwinEnvironmentKind &TargetEnvironment, + const std::optional &SDKInfo) { + if (TargetEnvironment == Darwin::NativeEnvironment || + TargetEnvironment == Darwin::Simulator || + TargetEnvironment == Darwin::MacCatalyst) { + // Standard xnu/Mach/Darwin based environments + // depend on the SDK version. + } else { + // All other environments support builtin modules from the start. + return true; + } + if (!SDKInfo) + // If there is no SDK info, assume this is building against a + // pre-SDK version of macOS (i.e. before Mac OS X 10.4). Those + // don't support modules anyway, but the headers definitely + // don't support builtin modules either. It might also be some + // kind of degenerate build environment, err on the side of + // the old behavior which is to not use builtin modules. return false; VersionTuple SDKVersion = SDKInfo->getVersion(); switch (TargetPlatform) { + // Existing SDKs added support for builtin modules in the fall + // 2024 major releases. case Darwin::MacOS: - return SDKVersion >= VersionTuple(99U); + return SDKVersion >= VersionTuple(15U); case Darwin::IPhoneOS: - return SDKVersion >= VersionTuple(99U); + return SDKVersion >= VersionTuple(18U); case Darwin::TvOS: - return SDKVersion >= VersionTuple(99U); + return SDKVersion >= VersionTuple(18U); case Darwin::WatchOS: - return SDKVersion >= VersionTuple(99U); + return SDKVersion >= VersionTuple(11U); case Darwin::XROS: - return SDKVersion >= VersionTuple(99U); + return SDKVersion >= VersionTuple(2U); + + // New SDKs support builtin modules from the start. default: return true; } @@ -3030,7 +3053,7 @@ void Darwin::addClangTargetOptions( // i.e. when the builtin stdint.h is in the Darwin module too, the cycle // goes away. Note that -fbuiltin-headers-in-system-modules does nothing // to fix the same problem with C++ headers, and is generally fragile. - if (!sdkSupportsBuiltinModules(TargetPlatform, SDKInfo)) + if (!sdkSupportsBuiltinModules(TargetPlatform, TargetEnvironment, SDKInfo)) CC1Args.push_back("-fbuiltin-headers-in-system-modules"); if (!DriverArgs.hasArgNoClaim(options::OPT_fdefine_target_os_macros, diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp index 52c2ee90b1b2..543f3965dfd4 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2463,7 +2463,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( // lists should shrink over time. Please don't add more elements to *Triples. static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; static const char *const AArch64Triples[] = { - "aarch64-none-linux-gnu", "aarch64-redhat-linux", "aarch64-suse-linux"}; + "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux", + "aarch64-suse-linux"}; static const char *const AArch64beLibDirs[] = {"/lib"}; static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu"}; diff --git a/contrib/llvm-project/clang/lib/Driver/Types.cpp b/contrib/llvm-project/clang/lib/Driver/Types.cpp index a7b6b9000e1d..2b9b391c19c9 100644 --- a/contrib/llvm-project/clang/lib/Driver/Types.cpp +++ b/contrib/llvm-project/clang/lib/Driver/Types.cpp @@ -242,7 +242,9 @@ bool types::isCXX(ID Id) { case TY_CXXHUHeader: case TY_PP_CXXHeaderUnit: case TY_ObjCXXHeader: case TY_PP_ObjCXXHeader: - case TY_CXXModule: case TY_PP_CXXModule: + case TY_CXXModule: + case TY_PP_CXXModule: + case TY_ModuleFile: case TY_PP_CLCXX: case TY_CUDA: case TY_PP_CUDA: case TY_CUDA_DEVICE: case TY_HIP: diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 63c8699fd62d..6b9253613788 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp *** 4224 LINES SKIPPED *** From nobody Sun Dec 1 12:54:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rh23vt5z5fbLL; Sun, 01 Dec 2024 12:54:26 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rh22V9Tz4PJx; Sun, 1 Dec 2024 12:54:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ewLRKuatwf1dOWs9gr78i7pB2Bz2GPRwdWw+6IEOcv8=; b=WnJQsNl+Yh//pucE6wcO6Bn3ACYuwHocnseUGJEKdSOqQkrLy59cg6IjlEMpPBA/BOPrl+ cOGVMpsaNY37hBQIkd54lBvUIoSkcCmpL6GvCVBl4w61Zy4km5WE9xfYcArwNTF/MeKeTp 8JS5zBwNQ47d1QyGxce8S4A2oc8x3L2ubpy57+FDeur7H73vdxqI3Qr6QAQF5QoKvmQdB4 SDUi27Ott9mAR6SH3Y8gcji0E8iOwmK4+SlaXfMlafEDqMCayNpoMMFDc9WF6+AQazY/IW sXRws41GbZOVUmcOqgv5637CHvspLAFAJNpEYNEin+GIf6C8EWgZ6A9kIebbkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ewLRKuatwf1dOWs9gr78i7pB2Bz2GPRwdWw+6IEOcv8=; b=mi+09Q305XNB/TLoJvyeK8ObMnXCAd9TL3W6mekAEnJvV0BOJ8eHkDH/HxMEUI792zaqjA 6WfNquy+QNSBpJoAEaQKiE7B9l8CgPemg+/y3BFOfOnM7xk2VI8McgL2vNIgjUpAVyQitF QbyHyg8id4EJdzFLe/crTZZXyLJdnSqvnE0o0pAbQBEvgm3oGxA39Xw7ge81KVF3Mc4rkB F6pjyH7J1S4kGhz94UMTIWUOElSu2XiJUt/80vtuT2LqUFR1AzkuQnpMp3cuAkrbsC5i/k M9X1C/7ElvgFrxb4Gn632AukrvG+ibYVwkvzvtbb977O05rDG0sbyQb1dyjTeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057666; a=rsa-sha256; cv=none; b=qcQTsVzwjbLpooXHmJ0LL/J/W3r8IbKjrmBpCZZ6cMoheQcoh82fHWlkaHEIBONEWQnx3h 7ftMQhqe3C3ENvjC/onWIpruEJ/N+/GWrp7ZRxZYitNgBzfd681ennwv92KxcachCUm1lq 2meG4PgaPvqeTyhYvR8jdhJJXrs9vReoZ1Fmbnw+McAfS1dHq+AzighvhgYAys5ZQhVwFh wkbb6KLdKWobo95UVDNqK8NfgZWRVaWFYlrjdogin5xEBomGLaVAtPivrNFcgIJG9aiFUF 6zF5XM1SE8QgKl4dD5Gfi3aiDdTf0+8tY4X0ygoWYy4UPU8cJfNN8uMdf+Ilcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rh225qjztNT; Sun, 1 Dec 2024 12:54:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsQ8x094275; Sun, 1 Dec 2024 12:54:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsQql094272; Sun, 1 Dec 2024 12:54:26 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:26 GMT Message-Id: <202412011254.4B1CsQql094272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f4d0b5d11e6b - stable/13 - Merge llvm-project release/19.x llvmorg-19.1.0-rc4-0-g0c641568515a List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f4d0b5d11e6bba0ee4e377dea847483f5ca445e1 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f4d0b5d11e6bba0ee4e377dea847483f5ca445e1 commit f4d0b5d11e6bba0ee4e377dea847483f5ca445e1 Author: Dimitry Andric AuthorDate: 2024-09-04 14:31:28 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:43 +0000 Merge llvm-project release/19.x llvmorg-19.1.0-rc4-0-g0c641568515a This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-rc4-0-g0c641568515a. PR: 280562 MFC after: 1 month (cherry picked from commit 6c4b055cfb6bf549e9145dde6454cc6b178c35e4) --- .../clang/include/clang/AST/ASTContext.h | 7 - .../clang/include/clang/AST/TemplateName.h | 4 +- .../llvm-project/clang/include/clang/AST/Type.h | 11 +- .../clang/include/clang/Serialization/ASTWriter.h | 4 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.def | 5 + contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 25 +- .../llvm-project/clang/lib/AST/TemplateName.cpp | 9 + .../clang/lib/Basic/Targets/AArch64.cpp | 40 +- .../llvm-project/clang/lib/Basic/Targets/AArch64.h | 3 + .../clang/lib/Driver/ToolChains/Darwin.cpp | 10 +- .../clang/lib/Format/ContinuationIndenter.cpp | 10 +- .../llvm-project/clang/lib/Format/FormatToken.h | 3 +- .../clang/lib/Format/TokenAnnotator.cpp | 53 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 15 +- .../clang/lib/Format/WhitespaceManager.cpp | 4 +- contrib/llvm-project/clang/lib/Headers/emmintrin.h | 2 +- contrib/llvm-project/clang/lib/Headers/xmmintrin.h | 2 +- .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 73 +- .../clang/lib/Serialization/ASTWriter.cpp | 3 + .../clang/lib/StaticAnalyzer/Checkers/Taint.cpp | 7 + .../lib/sanitizer_common/sanitizer_internal_defs.h | 9 + .../lib/sanitizer_common/sanitizer_linux.cpp | 2 +- .../lib/sanitizer_common/sanitizer_unwind_win.cpp | 7 + .../lib/sanitizer_common/sanitizer_win.cpp | 5 + .../include/__algorithm/three_way_comp_ref_type.h | 1 + contrib/llvm-project/libcxx/include/format | 12 +- .../mach-o/compact_unwind_encoding.modulemap | 4 - contrib/llvm-project/lld/MachO/ObjC.cpp | 10 +- .../llvm/include/llvm/IR/IntrinsicsBPF.td | 6 +- .../llvm/lib/CodeGen/DwarfEHPrepare.cpp | 7 + .../llvm/lib/CodeGen/MachinePipeliner.cpp | 12 +- .../llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 22 +- .../llvm/lib/CodeGen/WindowScheduler.cpp | 29 +- contrib/llvm-project/llvm/lib/IR/BasicBlock.cpp | 24 +- .../llvm/lib/IR/DebugProgramInstruction.cpp | 5 +- contrib/llvm-project/llvm/lib/IR/TypeFinder.cpp | 14 + contrib/llvm-project/llvm/lib/Support/Z3Solver.cpp | 1 + .../llvm/lib/Target/AArch64/AArch64Processors.td | 7 +- .../llvm-project/llvm/lib/Target/AMDGPU/AMDGPU.td | 23 +- .../llvm/lib/Target/AMDGPU/GCNSubtarget.h | 9 + .../llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 9 +- .../llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | 4 + .../llvm/lib/Target/AMDGPU/SIInstrInfo.h | 8 + .../llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp | 15 +- .../lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp | 12 +- .../llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 14 +- .../llvm/lib/Target/PowerPC/PPCInstr64Bit.td | 4 +- .../llvm/lib/Target/PowerPC/PPCInstrInfo.td | 12 +- .../llvm/lib/Target/Sparc/SparcAsmPrinter.cpp | 51 - .../llvm/lib/Target/X86/X86SchedIceLake.td | 2 + .../llvm/lib/Target/X86/X86SchedSkylakeServer.td | 2 + .../Instrumentation/PGOInstrumentation.cpp | 14 +- .../Transforms/Scalar/ConstraintElimination.cpp | 2 +- .../llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | 28 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 4 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 4 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/clang/liblldb/LLDBWrapLua.cpp | 1904 ++++++++++---------- 62 files changed, 1392 insertions(+), 1212 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/AST/ASTContext.h b/contrib/llvm-project/clang/include/clang/AST/ASTContext.h index 6d1c8ca8a2f9..16a19645d7f3 100644 --- a/contrib/llvm-project/clang/include/clang/AST/ASTContext.h +++ b/contrib/llvm-project/clang/include/clang/AST/ASTContext.h @@ -1805,13 +1805,6 @@ public: QualType DeducedType, bool IsDependent) const; -private: - QualType getDeducedTemplateSpecializationTypeInternal(TemplateName Template, - QualType DeducedType, - bool IsDependent, - QualType Canon) const; - -public: /// Return the unique reference to the type for the specified TagDecl /// (struct/union/class/enum) decl. QualType getTagDeclType(const TagDecl *Decl) const; diff --git a/contrib/llvm-project/clang/include/clang/AST/TemplateName.h b/contrib/llvm-project/clang/include/clang/AST/TemplateName.h index e3b7dd261535..e7313dee0128 100644 --- a/contrib/llvm-project/clang/include/clang/AST/TemplateName.h +++ b/contrib/llvm-project/clang/include/clang/AST/TemplateName.h @@ -347,9 +347,7 @@ public: /// error. void dump() const; - void Profile(llvm::FoldingSetNodeID &ID) { - ID.AddPointer(Storage.getOpaqueValue()); - } + void Profile(llvm::FoldingSetNodeID &ID); /// Retrieve the template name as a void pointer. void *getAsVoidPointer() const { return Storage.getOpaqueValue(); } diff --git a/contrib/llvm-project/clang/include/clang/AST/Type.h b/contrib/llvm-project/clang/include/clang/AST/Type.h index 25defea58c2d..9a711030cff9 100644 --- a/contrib/llvm-project/clang/include/clang/AST/Type.h +++ b/contrib/llvm-project/clang/include/clang/AST/Type.h @@ -6421,27 +6421,30 @@ class DeducedTemplateSpecializationType : public DeducedType, DeducedTemplateSpecializationType(TemplateName Template, QualType DeducedAsType, - bool IsDeducedAsDependent, QualType Canon) + bool IsDeducedAsDependent) : DeducedType(DeducedTemplateSpecialization, DeducedAsType, toTypeDependence(Template.getDependence()) | (IsDeducedAsDependent ? TypeDependence::DependentInstantiation : TypeDependence::None), - Canon), + DeducedAsType.isNull() ? QualType(this, 0) + : DeducedAsType.getCanonicalType()), Template(Template) {} public: /// Retrieve the name of the template that we are deducing. TemplateName getTemplateName() const { return Template;} - void Profile(llvm::FoldingSetNodeID &ID) const { + void Profile(llvm::FoldingSetNodeID &ID) { Profile(ID, getTemplateName(), getDeducedType(), isDependentType()); } static void Profile(llvm::FoldingSetNodeID &ID, TemplateName Template, QualType Deduced, bool IsDependent) { Template.Profile(ID); - Deduced.Profile(ID); + QualType CanonicalType = + Deduced.isNull() ? Deduced : Deduced.getCanonicalType(); + ID.AddPointer(CanonicalType.getAsOpaquePtr()); ID.AddBoolean(IsDependent || Template.isDependent()); } diff --git a/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h b/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h index 71a7c28047e3..700f0ad00111 100644 --- a/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h +++ b/contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h @@ -500,8 +500,8 @@ private: std::vector NonAffectingRanges; std::vector NonAffectingOffsetAdjustments; - /// A list of classes which need to emit the VTable in the corresponding - /// object file. + /// A list of classes in named modules which need to emit the VTable in + /// the corresponding object file. llvm::SmallVector PendingEmittingVTables; /// Computes input files that didn't affect compilation of the current module, diff --git a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def index 29aa6a3b8a16..737bc8e86cfb 100644 --- a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def +++ b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def @@ -407,6 +407,11 @@ ANALYZER_OPTION( ANALYZER_OPTION(unsigned, MaxSymbolComplexity, "max-symbol-complexity", "The maximum complexity of symbolic constraint.", 35) +// HACK:https://discourse.llvm.org/t/rfc-make-istainted-and-complex-symbols-friends/79570 +// Ideally, we should get rid of this option soon. +ANALYZER_OPTION(unsigned, MaxTaintedSymbolComplexity, "max-tainted-symbol-complexity", + "[DEPRECATED] The maximum complexity of a symbol to carry taint", 9) + ANALYZER_OPTION(unsigned, MaxTimesInlineLarge, "max-times-inline-large", "The maximum times a large function could be inlined.", 32) diff --git a/contrib/llvm-project/clang/lib/AST/ASTContext.cpp b/contrib/llvm-project/clang/lib/AST/ASTContext.cpp index 3da5e888f251..1064507f3461 100644 --- a/contrib/llvm-project/clang/lib/AST/ASTContext.cpp +++ b/contrib/llvm-project/clang/lib/AST/ASTContext.cpp @@ -6269,9 +6269,11 @@ QualType ASTContext::getUnconstrainedType(QualType T) const { return T; } -QualType ASTContext::getDeducedTemplateSpecializationTypeInternal( - TemplateName Template, QualType DeducedType, bool IsDependent, - QualType Canon) const { +/// Return the uniqued reference to the deduced template specialization type +/// which has been deduced to the given type, or to the canonical undeduced +/// such type, or the canonical deduced-but-dependent such type. +QualType ASTContext::getDeducedTemplateSpecializationType( + TemplateName Template, QualType DeducedType, bool IsDependent) const { // Look in the folding set for an existing type. void *InsertPos = nullptr; llvm::FoldingSetNodeID ID; @@ -6282,8 +6284,7 @@ QualType ASTContext::getDeducedTemplateSpecializationTypeInternal( return QualType(DTST, 0); auto *DTST = new (*this, alignof(DeducedTemplateSpecializationType)) - DeducedTemplateSpecializationType(Template, DeducedType, IsDependent, - Canon); + DeducedTemplateSpecializationType(Template, DeducedType, IsDependent); llvm::FoldingSetNodeID TempID; DTST->Profile(TempID); assert(ID == TempID && "ID does not match"); @@ -6292,20 +6293,6 @@ QualType ASTContext::getDeducedTemplateSpecializationTypeInternal( return QualType(DTST, 0); } -/// Return the uniqued reference to the deduced template specialization type -/// which has been deduced to the given type, or to the canonical undeduced -/// such type, or the canonical deduced-but-dependent such type. -QualType ASTContext::getDeducedTemplateSpecializationType( - TemplateName Template, QualType DeducedType, bool IsDependent) const { - QualType Canon = DeducedType.isNull() - ? getDeducedTemplateSpecializationTypeInternal( - getCanonicalTemplateName(Template), QualType(), - IsDependent, QualType()) - : DeducedType.getCanonicalType(); - return getDeducedTemplateSpecializationTypeInternal(Template, DeducedType, - IsDependent, Canon); -} - /// getAtomicType - Return the uniqued reference to the atomic type for /// the given value type. QualType ASTContext::getAtomicType(QualType T) const { diff --git a/contrib/llvm-project/clang/lib/AST/TemplateName.cpp b/contrib/llvm-project/clang/lib/AST/TemplateName.cpp index d4e8a8971a97..11544dbb56e3 100644 --- a/contrib/llvm-project/clang/lib/AST/TemplateName.cpp +++ b/contrib/llvm-project/clang/lib/AST/TemplateName.cpp @@ -264,6 +264,15 @@ bool TemplateName::containsUnexpandedParameterPack() const { return getDependence() & TemplateNameDependence::UnexpandedPack; } +void TemplateName::Profile(llvm::FoldingSetNodeID &ID) { + if (const auto* USD = getAsUsingShadowDecl()) + ID.AddPointer(USD->getCanonicalDecl()); + else if (const auto *TD = getAsTemplateDecl()) + ID.AddPointer(TD->getCanonicalDecl()); + else + ID.AddPointer(Storage.getOpaqueValue()); +} + void TemplateName::print(raw_ostream &OS, const PrintingPolicy &Policy, Qualified Qual) const { auto handleAnonymousTTP = [](TemplateDecl *TD, raw_ostream &OS) { diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp index 6ba31cc05a0d..63fc15f916c5 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp @@ -471,23 +471,25 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts, if (HasSVE2 && HasSVE2SM4) Builder.defineMacro("__ARM_FEATURE_SVE2_SM4", "1"); + if (HasSVEB16B16) + Builder.defineMacro("__ARM_FEATURE_SVE_B16B16", "1"); + if (HasSME) { Builder.defineMacro("__ARM_FEATURE_SME"); Builder.defineMacro("__ARM_FEATURE_LOCALLY_STREAMING", "1"); } - if (HasSME2) { - Builder.defineMacro("__ARM_FEATURE_SME", "1"); + if (HasSME2) Builder.defineMacro("__ARM_FEATURE_SME2", "1"); - Builder.defineMacro("__ARM_FEATURE_LOCALLY_STREAMING", "1"); - } - if (HasSME2p1) { - Builder.defineMacro("__ARM_FEATURE_SME", "1"); - Builder.defineMacro("__ARM_FEATURE_SME2", "1"); + if (HasSME2p1) Builder.defineMacro("__ARM_FEATURE_SME2p1", "1"); - Builder.defineMacro("__ARM_FEATURE_LOCALLY_STREAMING", "1"); - } + + if (HasSMEF16F16) + Builder.defineMacro("__ARM_FEATURE_SME_F16F16", "1"); + + if (HasSMEB16B16) + Builder.defineMacro("__ARM_FEATURE_SME_B16B16", "1"); if (HasCRC) Builder.defineMacro("__ARM_FEATURE_CRC32", "1"); @@ -749,6 +751,7 @@ bool AArch64TargetInfo::hasFeature(StringRef Feature) const { .Case("sve", FPU & SveMode) .Case("sve-bf16", FPU & SveMode && HasBFloat16) .Case("sve-i8mm", FPU & SveMode && HasMatMul) + .Case("sve-b16b16", HasSVEB16B16) .Case("f32mm", FPU & SveMode && HasMatmulFP32) .Case("f64mm", FPU & SveMode && HasMatmulFP64) .Case("sve2", FPU & SveMode && HasSVE2) @@ -763,6 +766,8 @@ bool AArch64TargetInfo::hasFeature(StringRef Feature) const { .Case("sme-f64f64", HasSMEF64F64) .Case("sme-i16i64", HasSMEI16I64) .Case("sme-fa64", HasSMEFA64) + .Case("sme-f16f16", HasSMEF16F16) + .Case("sme-b16b16", HasSMEB16B16) .Cases("memtag", "memtag2", HasMTE) .Case("sb", HasSB) .Case("predres", HasPredRes) @@ -863,6 +868,8 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector &Features, HasSVE2 = true; HasSVE2SM4 = true; } + if (Feature == "+sve-b16b16") + HasSVEB16B16 = true; if (Feature == "+sve2-bitperm") { FPU |= NeonMode; FPU |= SveMode; @@ -919,6 +926,21 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector &Features, HasSVE2 = true; HasSMEFA64 = true; } + if (Feature == "+sme-f16f16") { + HasSME = true; + HasSME2 = true; + HasBFloat16 = true; + HasFullFP16 = true; + HasSMEF16F16 = true; + } + if (Feature == "+sme-b16b16") { + HasSME = true; + HasSME2 = true; + HasBFloat16 = true; + HasFullFP16 = true; + HasSVEB16B16 = true; + HasSMEB16B16 = true; + } if (Feature == "+sb") HasSB = true; if (Feature == "+predres") diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.h b/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.h index 7bdf5a2b4106..526f7f30a386 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.h @@ -53,6 +53,7 @@ class LLVM_LIBRARY_VISIBILITY AArch64TargetInfo : public TargetInfo { bool HasSVE2AES = false; bool HasSVE2SHA3 = false; bool HasSVE2SM4 = false; + bool HasSVEB16B16 = false; bool HasSVE2BitPerm = false; bool HasMatmulFP64 = false; bool HasMatmulFP32 = false; @@ -71,6 +72,8 @@ class LLVM_LIBRARY_VISIBILITY AArch64TargetInfo : public TargetInfo { bool HasSME2 = false; bool HasSMEF64F64 = false; bool HasSMEI16I64 = false; + bool HasSMEF16F16 = false; + bool HasSMEB16B16 = false; bool HasSME2p1 = false; bool HasSB = false; bool HasPredRes = false; diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp index 17d57b2f7eed..e576efaf5ca8 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp @@ -2953,7 +2953,15 @@ static bool sdkSupportsBuiltinModules( case Darwin::MacOS: return SDKVersion >= VersionTuple(15U); case Darwin::IPhoneOS: - return SDKVersion >= VersionTuple(18U); + switch (TargetEnvironment) { + case Darwin::MacCatalyst: + // Mac Catalyst uses `-target arm64-apple-ios18.0-macabi` so the platform + // is iOS, but it builds with the macOS SDK, so it's the macOS SDK version + // that's relevant. + return SDKVersion >= VersionTuple(15U); + default: + return SDKVersion >= VersionTuple(18U); + } case Darwin::TvOS: return SDKVersion >= VersionTuple(18U); case Darwin::WatchOS: diff --git a/contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp b/contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp index b07360425ca6..7d89f0e63dd2 100644 --- a/contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp +++ b/contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp @@ -842,10 +842,8 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, CurrentState.ContainsUnwrappedBuilder = true; } - if (Current.is(TT_TrailingReturnArrow) && - Style.Language == FormatStyle::LK_Java) { + if (Current.is(TT_LambdaArrow) && Style.Language == FormatStyle::LK_Java) CurrentState.NoLineBreak = true; - } if (Current.isMemberAccess() && Previous.is(tok::r_paren) && (Previous.MatchingParen && (Previous.TotalLength - Previous.MatchingParen->TotalLength > 10))) { @@ -1000,7 +998,7 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State, // // is common and should be formatted like a free-standing function. The same // goes for wrapping before the lambda return type arrow. - if (Current.isNot(TT_TrailingReturnArrow) && + if (Current.isNot(TT_LambdaArrow) && (!Style.isJavaScript() || Current.NestingLevel != 0 || !PreviousNonComment || PreviousNonComment->isNot(tok::equal) || !Current.isOneOf(Keywords.kw_async, Keywords.kw_function))) { @@ -1257,7 +1255,7 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) { } return CurrentState.Indent; } - if (Current.is(TT_TrailingReturnArrow) && + if (Current.is(TT_LambdaArrow) && Previous.isOneOf(tok::kw_noexcept, tok::kw_mutable, tok::kw_constexpr, tok::kw_consteval, tok::kw_static, TT_AttributeSquare)) { return ContinuationIndent; @@ -1590,7 +1588,7 @@ unsigned ContinuationIndenter::moveStateToNextToken(LineState &State, } if (Current.isOneOf(TT_BinaryOperator, TT_ConditionalExpr) && Newline) CurrentState.NestedBlockIndent = State.Column + Current.ColumnWidth + 1; - if (Current.isOneOf(TT_LambdaLSquare, TT_TrailingReturnArrow)) + if (Current.isOneOf(TT_LambdaLSquare, TT_LambdaArrow)) CurrentState.LastSpace = State.Column; if (Current.is(TT_RequiresExpression) && Style.RequiresExpressionIndentation == FormatStyle::REI_Keyword) { diff --git a/contrib/llvm-project/clang/lib/Format/FormatToken.h b/contrib/llvm-project/clang/lib/Format/FormatToken.h index cc45d5a8c5c1..9bfeb2052164 100644 --- a/contrib/llvm-project/clang/lib/Format/FormatToken.h +++ b/contrib/llvm-project/clang/lib/Format/FormatToken.h @@ -102,6 +102,7 @@ namespace format { TYPE(JsTypeColon) \ TYPE(JsTypeOperator) \ TYPE(JsTypeOptionalQuestion) \ + TYPE(LambdaArrow) \ TYPE(LambdaLBrace) \ TYPE(LambdaLSquare) \ TYPE(LeadingJavaAnnotation) \ @@ -725,7 +726,7 @@ public: bool isMemberAccess() const { return isOneOf(tok::arrow, tok::period, tok::arrowstar) && !isOneOf(TT_DesignatedInitializerPeriod, TT_TrailingReturnArrow, - TT_LeadingJavaAnnotation); + TT_LambdaArrow, TT_LeadingJavaAnnotation); } bool isPointerOrReference() const { diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 6b9253613788..3f00a28e6298 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -249,7 +249,7 @@ private: if (Precedence > prec::Conditional && Precedence < prec::Relational) return false; } - if (Prev.is(TT_ConditionalExpr)) + if (Prev.isOneOf(tok::question, tok::colon) && !Style.isProto()) SeenTernaryOperator = true; updateParameterCount(Left, CurrentToken); if (Style.Language == FormatStyle::LK_Proto) { @@ -831,7 +831,7 @@ private: } // An arrow after an ObjC method expression is not a lambda arrow. if (CurrentToken->is(TT_ObjCMethodExpr) && CurrentToken->Next && - CurrentToken->Next->is(TT_TrailingReturnArrow)) { + CurrentToken->Next->is(TT_LambdaArrow)) { CurrentToken->Next->overwriteFixedType(TT_Unknown); } Left->MatchingParen = CurrentToken; @@ -1769,8 +1769,10 @@ private: } break; case tok::arrow: - if (Tok->Previous && Tok->Previous->is(tok::kw_noexcept)) + if (Tok->isNot(TT_LambdaArrow) && Tok->Previous && + Tok->Previous->is(tok::kw_noexcept)) { Tok->setType(TT_TrailingReturnArrow); + } break; case tok::equal: // In TableGen, there must be a value after "="; @@ -2056,11 +2058,11 @@ private: TT_LambdaLSquare, TT_LambdaLBrace, TT_AttributeMacro, TT_IfMacro, TT_ForEachMacro, TT_TypenameMacro, TT_FunctionLBrace, TT_ImplicitStringLiteral, TT_InlineASMBrace, TT_FatArrow, - TT_NamespaceMacro, TT_OverloadedOperator, TT_RegexLiteral, - TT_TemplateString, TT_ObjCStringLiteral, TT_UntouchableMacroFunc, - TT_StatementAttributeLikeMacro, TT_FunctionLikeOrFreestandingMacro, - TT_ClassLBrace, TT_EnumLBrace, TT_RecordLBrace, TT_StructLBrace, - TT_UnionLBrace, TT_RequiresClause, + TT_LambdaArrow, TT_NamespaceMacro, TT_OverloadedOperator, + TT_RegexLiteral, TT_TemplateString, TT_ObjCStringLiteral, + TT_UntouchableMacroFunc, TT_StatementAttributeLikeMacro, + TT_FunctionLikeOrFreestandingMacro, TT_ClassLBrace, TT_EnumLBrace, + TT_RecordLBrace, TT_StructLBrace, TT_UnionLBrace, TT_RequiresClause, TT_RequiresClauseInARequiresExpression, TT_RequiresExpression, TT_RequiresExpressionLParen, TT_RequiresExpressionLBrace, TT_BracedListLBrace)) { @@ -2246,7 +2248,7 @@ private: Contexts.back().IsExpression = true; } else if (Current.is(TT_TrailingReturnArrow)) { Contexts.back().IsExpression = false; - } else if (Current.is(Keywords.kw_assert)) { + } else if (Current.isOneOf(TT_LambdaArrow, Keywords.kw_assert)) { Contexts.back().IsExpression = Style.Language == FormatStyle::LK_Java; } else if (Current.Previous && Current.Previous->is(TT_CtorInitializerColon)) { @@ -2381,7 +2383,7 @@ private: AutoFound = true; } else if (Current.is(tok::arrow) && Style.Language == FormatStyle::LK_Java) { - Current.setType(TT_TrailingReturnArrow); + Current.setType(TT_LambdaArrow); } else if (Current.is(tok::arrow) && Style.isVerilog()) { // The implication operator. Current.setType(TT_BinaryOperator); @@ -2874,6 +2876,8 @@ private: // Search for unexpected tokens. for (auto *Prev = BeforeRParen; Prev != LParen; Prev = Prev->Previous) { if (Prev->is(tok::r_paren)) { + if (Prev->is(TT_CastRParen)) + return false; Prev = Prev->MatchingParen; if (!Prev) return false; @@ -3276,7 +3280,7 @@ private: } if (Current->is(TT_JsComputedPropertyName)) return prec::Assignment; - if (Current->is(TT_TrailingReturnArrow)) + if (Current->is(TT_LambdaArrow)) return prec::Comma; if (Current->is(TT_FatArrow)) return prec::Assignment; @@ -4200,7 +4204,7 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line, } if (Right.is(TT_PointerOrReference)) return 190; - if (Right.is(TT_TrailingReturnArrow)) + if (Right.is(TT_LambdaArrow)) return 110; if (Left.is(tok::equal) && Right.is(tok::l_brace)) return 160; @@ -4467,10 +4471,8 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, } if (Left.is(tok::colon)) return Left.isNot(TT_ObjCMethodExpr); - if (Left.is(tok::coloncolon)) { - return Right.is(tok::star) && Right.is(TT_PointerOrReference) && - Style.PointerAlignment != FormatStyle::PAS_Left; - } + if (Left.is(tok::coloncolon)) + return false; if (Left.is(tok::less) || Right.isOneOf(tok::greater, tok::less)) { if (Style.Language == FormatStyle::LK_TextProto || (Style.Language == FormatStyle::LK_Proto && @@ -4580,8 +4582,14 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (!BeforeLeft) return false; if (BeforeLeft->is(tok::coloncolon)) { - return Left.is(tok::star) && - Style.PointerAlignment != FormatStyle::PAS_Right; + if (Left.isNot(tok::star)) + return false; + assert(Style.PointerAlignment != FormatStyle::PAS_Right); + if (!Right.startsSequence(tok::identifier, tok::r_paren)) + return true; + assert(Right.Next); + const auto *LParen = Right.Next->MatchingParen; + return !LParen || LParen->isNot(TT_FunctionTypeLParen); } return !BeforeLeft->isOneOf(tok::l_paren, tok::l_square); } @@ -5274,9 +5282,10 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, return false; } - if (Right.is(TT_TrailingReturnArrow) || Left.is(TT_TrailingReturnArrow)) + if (Right.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow) || + Left.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow)) { return true; - + } if (Left.is(tok::comma) && Right.isNot(TT_OverloadedOperatorLParen) && // In an unexpanded macro call we only find the parentheses and commas // in a line; the commas and closing parenthesis do not require a space. @@ -6294,8 +6303,8 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line, return Left.isOneOf(tok::comma, tok::coloncolon, tok::semi, tok::l_brace, tok::kw_class, tok::kw_struct, tok::comment) || Right.isMemberAccess() || - Right.isOneOf(TT_TrailingReturnArrow, tok::lessless, tok::colon, - tok::l_square, tok::at) || + Right.isOneOf(TT_TrailingReturnArrow, TT_LambdaArrow, tok::lessless, + tok::colon, tok::l_square, tok::at) || (Left.is(tok::r_paren) && Right.isOneOf(tok::identifier, tok::kw_const)) || (Left.is(tok::l_paren) && Right.isNot(tok::r_paren)) || diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp index 688c7c5b1e97..60e65aaa83e9 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp @@ -609,9 +609,8 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { ProbablyBracedList = NextTok->isNot(tok::l_square); } - // Cpp macro definition body that is a nonempty braced list or block: + // Cpp macro definition body containing nonempty braced list or block: if (IsCpp && Line->InMacroBody && PrevTok != FormatTok && - !FormatTok->Previous && NextTok->is(tok::eof) && // A statement can end with only `;` (simple statement), a block // closing brace (compound statement), or `:` (label statement). // If PrevTok is a block opening brace, Tok ends an empty block. @@ -2322,7 +2321,7 @@ bool UnwrappedLineParser::tryToParseLambda() { // This might or might not actually be a lambda arrow (this could be an // ObjC method invocation followed by a dereferencing arrow). We might // reset this back to TT_Unknown in TokenAnnotator. - FormatTok->setFinalizedType(TT_TrailingReturnArrow); + FormatTok->setFinalizedType(TT_LambdaArrow); SeenArrow = true; nextToken(); break; @@ -2668,6 +2667,7 @@ void UnwrappedLineParser::parseSquare(bool LambdaIntroducer) { break; } case tok::at: + case tok::colon: nextToken(); if (FormatTok->is(tok::l_brace)) { nextToken(); @@ -3978,6 +3978,9 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { auto IsNonMacroIdentifier = [](const FormatToken *Tok) { return Tok->is(tok::identifier) && Tok->TokenText != Tok->TokenText.upper(); }; + // JavaScript/TypeScript supports anonymous classes like: + // a = class extends foo { } + bool JSPastExtendsOrImplements = false; // The actual identifier can be a nested name specifier, and in macros // it is often token-pasted. // An [[attribute]] can be before the identifier. @@ -3988,6 +3991,7 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { FormatTok->isOneOf(tok::period, tok::comma))) { if (Style.isJavaScript() && FormatTok->isOneOf(Keywords.kw_extends, Keywords.kw_implements)) { + JSPastExtendsOrImplements = true; // JavaScript/TypeScript supports inline object types in // extends/implements positions: // class Foo implements {bar: number} { } @@ -4011,10 +4015,11 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { } break; case tok::coloncolon: + case tok::hashhash: break; default: - if (!ClassName && Previous->is(tok::identifier) && - Previous->isNot(TT_AttributeMacro)) { + if (!JSPastExtendsOrImplements && !ClassName && + Previous->is(tok::identifier) && Previous->isNot(TT_AttributeMacro)) { ClassName = Previous; } } diff --git a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp index a31874a7c319..fd4a40a86082 100644 --- a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp +++ b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp @@ -469,7 +469,9 @@ AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsigned End, // except if the token is equal, then a space is needed. if ((Style.PointerAlignment == FormatStyle::PAS_Right || Style.ReferenceAlignment == FormatStyle::RAS_Right) && - CurrentChange.Spaces != 0 && CurrentChange.Tok->isNot(tok::equal)) { + CurrentChange.Spaces != 0 && + !CurrentChange.Tok->isOneOf(tok::equal, tok::r_paren, + TT_TemplateCloser)) { const bool ReferenceNotRightAligned = Style.ReferenceAlignment != FormatStyle::RAS_Right && Style.ReferenceAlignment != FormatStyle::RAS_Pointer; diff --git a/contrib/llvm-project/clang/lib/Headers/emmintrin.h b/contrib/llvm-project/clang/lib/Headers/emmintrin.h index e85bfc47aa5c..4dff6421350c 100644 --- a/contrib/llvm-project/clang/lib/Headers/emmintrin.h +++ b/contrib/llvm-project/clang/lib/Headers/emmintrin.h @@ -1771,7 +1771,7 @@ static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_undefined_pd(void) { /// lower 64 bits contain the value of the parameter. The upper 64 bits are /// set to zero. static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_set_sd(double __w) { - return __extension__(__m128d){__w, 0}; + return __extension__(__m128d){__w, 0.0}; } /// Constructs a 128-bit floating-point vector of [2 x double], with each diff --git a/contrib/llvm-project/clang/lib/Headers/xmmintrin.h b/contrib/llvm-project/clang/lib/Headers/xmmintrin.h index 1ef89de9c9f5..6fb27297af92 100644 --- a/contrib/llvm-project/clang/lib/Headers/xmmintrin.h +++ b/contrib/llvm-project/clang/lib/Headers/xmmintrin.h @@ -1910,7 +1910,7 @@ _mm_undefined_ps(void) static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_set_ss(float __w) { - return __extension__ (__m128){ __w, 0, 0, 0 }; + return __extension__ (__m128){ __w, 0.0f, 0.0f, 0.0f }; } /// Constructs a 128-bit floating-point vector of [4 x float], with each diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp index 8995d461362d..a09e3be83c45 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -20,6 +20,7 @@ #include "clang/AST/Expr.h" #include "clang/AST/ExprConcepts.h" #include "clang/AST/PrettyDeclStackTrace.h" +#include "clang/AST/RecursiveASTVisitor.h" #include "clang/AST/Type.h" #include "clang/AST/TypeLoc.h" #include "clang/AST/TypeVisitor.h" @@ -87,12 +88,19 @@ struct Response { // than lambda classes. const FunctionDecl * getPrimaryTemplateOfGenericLambda(const FunctionDecl *LambdaCallOperator) { + if (!isLambdaCallOperator(LambdaCallOperator)) + return LambdaCallOperator; while (true) { if (auto *FTD = dyn_cast_if_present( LambdaCallOperator->getDescribedTemplate()); FTD && FTD->getInstantiatedFromMemberTemplate()) { LambdaCallOperator = FTD->getInstantiatedFromMemberTemplate()->getTemplatedDecl(); + } else if (LambdaCallOperator->getPrimaryTemplate()) { + // Cases where the lambda operator is instantiated in + // TemplateDeclInstantiator::VisitCXXMethodDecl. + LambdaCallOperator = + LambdaCallOperator->getPrimaryTemplate()->getTemplatedDecl(); } else if (auto *Prev = cast(LambdaCallOperator) ->getInstantiatedFromMemberFunction()) LambdaCallOperator = Prev; @@ -138,22 +146,28 @@ getEnclosingTypeAliasTemplateDecl(Sema &SemaRef) { // Check if we are currently inside of a lambda expression that is // surrounded by a using alias declaration. e.g. // template using type = decltype([](auto) { ^ }()); -// By checking if: -// 1. The lambda expression and the using alias declaration share the -// same declaration context. -// 2. They have the same template depth. // We have to do so since a TypeAliasTemplateDecl (or a TypeAliasDecl) is never // a DeclContext, nor does it have an associated specialization Decl from which // we could collect these template arguments. bool isLambdaEnclosedByTypeAliasDecl( - const FunctionDecl *PrimaryLambdaCallOperator, + const FunctionDecl *LambdaCallOperator, const TypeAliasTemplateDecl *PrimaryTypeAliasDecl) { - return cast(PrimaryLambdaCallOperator->getDeclContext()) - ->getTemplateDepth() == - PrimaryTypeAliasDecl->getTemplateDepth() && - getLambdaAwareParentOfDeclContext( - const_cast(PrimaryLambdaCallOperator)) == - PrimaryTypeAliasDecl->getDeclContext(); + struct Visitor : RecursiveASTVisitor { + Visitor(const FunctionDecl *CallOperator) : CallOperator(CallOperator) {} + bool VisitLambdaExpr(const LambdaExpr *LE) { + // Return true to bail out of the traversal, implying the Decl contains + // the lambda. + return getPrimaryTemplateOfGenericLambda(LE->getCallOperator()) != + CallOperator; + } + const FunctionDecl *CallOperator; + }; + + QualType Underlying = + PrimaryTypeAliasDecl->getTemplatedDecl()->getUnderlyingType(); + + return !Visitor(getPrimaryTemplateOfGenericLambda(LambdaCallOperator)) + .TraverseType(Underlying); } // Add template arguments from a variable template instantiation. @@ -290,23 +304,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, // If this function is a generic lambda specialization, we are done. if (!ForConstraintInstantiation && - isGenericLambdaCallOperatorOrStaticInvokerSpecialization(Function)) { - // TypeAliasTemplateDecls should be taken into account, e.g. - // when we're deducing the return type of a lambda. - // - // template int Value = 0; - // template - // using T = decltype([]() { return Value; }()); - // - if (auto TypeAlias = getEnclosingTypeAliasTemplateDecl(SemaRef)) { - if (isLambdaEnclosedByTypeAliasDecl( - /*PrimaryLambdaCallOperator=*/getPrimaryTemplateOfGenericLambda( - Function), - /*PrimaryTypeAliasDecl=*/TypeAlias.PrimaryTypeAliasDecl)) - return Response::UseNextDecl(Function); - } + isGenericLambdaCallOperatorOrStaticInvokerSpecialization(Function)) return Response::Done(); - } } else if (Function->getDescribedFunctionTemplate()) { assert( @@ -418,10 +417,9 @@ Response HandleRecordDecl(Sema &SemaRef, const CXXRecordDecl *Rec, // Retrieve the template arguments for a using alias declaration. // This is necessary for constraint checking, since we always keep // constraints relative to the primary template. - if (auto TypeAlias = getEnclosingTypeAliasTemplateDecl(SemaRef)) { - const FunctionDecl *PrimaryLambdaCallOperator = - getPrimaryTemplateOfGenericLambda(Rec->getLambdaCallOperator()); - if (isLambdaEnclosedByTypeAliasDecl(PrimaryLambdaCallOperator, + if (auto TypeAlias = getEnclosingTypeAliasTemplateDecl(SemaRef); + ForConstraintInstantiation && TypeAlias) { + if (isLambdaEnclosedByTypeAliasDecl(Rec->getLambdaCallOperator(), TypeAlias.PrimaryTypeAliasDecl)) { Result.addOuterTemplateArguments(TypeAlias.Template, TypeAlias.AssociatedTemplateArguments, @@ -1642,12 +1640,17 @@ namespace { CXXRecordDecl::LambdaDependencyKind ComputeLambdaDependency(LambdaScopeInfo *LSI) { - auto &CCS = SemaRef.CodeSynthesisContexts.back(); - if (CCS.Kind == - Sema::CodeSynthesisContext::TypeAliasTemplateInstantiation) { - unsigned TypeAliasDeclDepth = CCS.Entity->getTemplateDepth(); + if (auto TypeAlias = + TemplateInstArgsHelpers::getEnclosingTypeAliasTemplateDecl( + getSema()); + TypeAlias && TemplateInstArgsHelpers::isLambdaEnclosedByTypeAliasDecl( + LSI->CallOperator, TypeAlias.PrimaryTypeAliasDecl)) { + unsigned TypeAliasDeclDepth = TypeAlias.Template->getTemplateDepth(); if (TypeAliasDeclDepth >= TemplateArgs.getNumSubstitutedLevels()) return CXXRecordDecl::LambdaDependencyKind::LDK_AlwaysDependent; + for (const TemplateArgument &TA : TypeAlias.AssociatedTemplateArguments) + if (TA.isDependent()) + return CXXRecordDecl::LambdaDependencyKind::LDK_AlwaysDependent; } return inherited::ComputeLambdaDependency(LSI); } diff --git a/contrib/llvm-project/clang/lib/Serialization/ASTWriter.cpp b/contrib/llvm-project/clang/lib/Serialization/ASTWriter.cpp index 7c0636962459..cb63dec92e33 100644 --- a/contrib/llvm-project/clang/lib/Serialization/ASTWriter.cpp +++ b/contrib/llvm-project/clang/lib/Serialization/ASTWriter.cpp @@ -3963,6 +3963,9 @@ void ASTWriter::WriteIdentifierTable(Preprocessor &PP, } void ASTWriter::handleVTable(CXXRecordDecl *RD) { + if (!RD->isInNamedModule()) + return; + PendingEmittingVTables.push_back(RD); } diff --git a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp index 6362c82b009d..0bb5739db4b7 100644 --- a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp +++ b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp @@ -12,6 +12,7 @@ #include "clang/StaticAnalyzer/Checkers/Taint.h" #include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h" #include @@ -256,6 +257,12 @@ std::vector taint::getTaintedSymbolsImpl(ProgramStateRef State, if (!Sym) return TaintedSymbols; + // HACK:https://discourse.llvm.org/t/rfc-make-istainted-and-complex-symbols-friends/79570 + if (const auto &Opts = State->getAnalysisManager().getAnalyzerOptions(); + Sym->computeComplexity() > Opts.MaxTaintedSymbolComplexity) { + return {}; + } + // Traverse all the symbols this symbol depends on to see if any are tainted. for (SymbolRef SubSym : Sym->symbols()) { if (!isa(SubSym)) diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h index 294e330c4d56..eebfb00aad7a 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h @@ -194,7 +194,16 @@ typedef u64 OFF64_T; #ifdef __SIZE_TYPE__ typedef __SIZE_TYPE__ usize; #else +// Since we use this for operator new, usize must match the real size_t, but on +// 32-bit Windows the definition of uptr does not actually match uintptr_t or +// size_t because we are working around typedef mismatches for the (S)SIZE_T +// types used in interception.h. +// Until the definition of uptr has been fixed we have to special case Win32. +# if SANITIZER_WINDOWS && SANITIZER_WORDSIZE == 32 +typedef unsigned int usize; +# else typedef uptr usize; +# endif #endif typedef u64 tid_t; diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp index 8d375ffcd079..648df0c4e5a7 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp @@ -35,7 +35,7 @@ // access stat from asm/stat.h, without conflicting with definition in // sys/stat.h, we use this trick. sparc64 is similar, using // syscall(__NR_stat64) and struct kernel_stat64. -# if SANITIZER_MIPS64 || SANITIZER_SPARC64 +# if SANITIZER_LINUX && (SANITIZER_MIPS64 || SANITIZER_SPARC64) # include # include # define stat kernel_stat diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cpp index afcd01dae0b7..6fc18396ca63 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cpp +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cpp @@ -70,10 +70,17 @@ void BufferedStackTrace::UnwindSlow(uptr pc, void *context, u32 max_depth) { stack_frame.AddrStack.Offset = ctx.Rsp; # endif # else +# if SANITIZER_ARM + int machine_type = IMAGE_FILE_MACHINE_ARM; + stack_frame.AddrPC.Offset = ctx.Pc; + stack_frame.AddrFrame.Offset = ctx.R11; + stack_frame.AddrStack.Offset = ctx.Sp; +# else int machine_type = IMAGE_FILE_MACHINE_I386; stack_frame.AddrPC.Offset = ctx.Eip; stack_frame.AddrFrame.Offset = ctx.Ebp; stack_frame.AddrStack.Offset = ctx.Esp; +# endif # endif stack_frame.AddrPC.Mode = AddrModeFlat; stack_frame.AddrFrame.Mode = AddrModeFlat; diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp index 995f00eddc38..8a80d5475136 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp @@ -992,8 +992,13 @@ void SignalContext::InitPcSpBp() { sp = (uptr)context_record->Rsp; # endif # else +# if SANITIZER_ARM + bp = (uptr)context_record->R11; + sp = (uptr)context_record->Sp; +# else bp = (uptr)context_record->Ebp; sp = (uptr)context_record->Esp; +# endif # endif } diff --git a/contrib/llvm-project/libcxx/include/__algorithm/three_way_comp_ref_type.h b/contrib/llvm-project/libcxx/include/__algorithm/three_way_comp_ref_type.h index 70c5818976f0..5702a1fee082 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/three_way_comp_ref_type.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/three_way_comp_ref_type.h @@ -9,6 +9,7 @@ #ifndef _LIBCPP___ALGORITHM_THREE_WAY_COMP_REF_TYPE_H #define _LIBCPP___ALGORITHM_THREE_WAY_COMP_REF_TYPE_H +#include <__assert> #include <__compare/ordering.h> #include <__config> #include <__utility/declval.h> diff --git a/contrib/llvm-project/libcxx/include/format b/contrib/llvm-project/libcxx/include/format index c3f2b45f0f73..a88b3ef8528e 100644 --- a/contrib/llvm-project/libcxx/include/format +++ b/contrib/llvm-project/libcxx/include/format @@ -237,21 +237,21 @@ namespace std { # include # include # include -# include # include # include +# include # include # include +# include +# include # include # include # include # include -#endif -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 *** 3011 LINES SKIPPED *** From nobody Sun Dec 1 12:54:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rh36Dfnz5fbNd; Sun, 01 Dec 2024 12:54:27 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rh35Y5zz4PD5; Sun, 1 Dec 2024 12:54:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qut8kLrGh/BsImpN3y6lLa4ohg0yRE4ffPFHS0qL19I=; b=X9lUiLY6PHbmQnvNSDiuAFjTVJ4a8o76fyvqkbpbXTb/t5NoLUYxcFqJ2UoB3UIWNH2syS KyyCLCbjKsF8aRQBYeUk3Oujox1B5ywbUNSzdT8OcnskCV2WA8Gd0/iN15unkRKJ1S52qZ m1INI9wxhn5dXYQGutoutBe5pdV1bNM6Ekt8u/fhaivj/AIQIUYUdGeej6A9TkaQl18aOm kEJr/pqk12O8JjXa4qmVGUUTqF43rSWPa5ddUEZq1qk6mqk+ALAXF/unk9hVbIqAS5ZN9c b1SQOXkT9yY2lL4g4d2NrvRCXjTWTR0DxG1oUfLIZrZX4L5eY/gubvz3dc69kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qut8kLrGh/BsImpN3y6lLa4ohg0yRE4ffPFHS0qL19I=; b=ttBTa4eNikmp0odo+dUq9Fh859q/SsozFNPt70rn6qBWklQklWhT7pwZyd6BsxF1OyP+x+ y7+3ky7VLIrOemsEMX8xpGlEThi8wUGHQ94ra1fTgVDczGWDMOPxf8cQNk2zS/9EgBZPKM xFsT3lNSaB9ztsmV0yqv6c5k2AAOrCJXZh9c9XmSdSBDoR2Qq2cwsNWB4M1/AmJUqqEy8P JBfMwT3RAXtIHKItp7ElN98EVJyW0Iey8g5wYYwp/o1bY1vzvqaiBD1KDgE/iC8DlnVtMc jghs5L4TllsmAJ9cDUvwPbz6ciEI/lMkelysePzfoO35zQI1PkQAOlF/75lpzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057667; a=rsa-sha256; cv=none; b=kZ6CJtdOBhF8BZFh57Oz7ucFR6Zdp5+aAAt0e8Yi8/gvWFSxNaOaas6WEUOuaPIzMWq/qg 6NmTWXVsAaOzCQxi//R/upGNgcQOhcj8lptTKbuC/+dfuKD3UAPTufyELygKvy3tqmYfd5 7wORxf/os/A/yIMHOX6+odn3oijzBD7wXxtdPcPZkHCyqReRzkWCLpMsb2LQHTS9+0k6Vx qfRH5AHVY5vgSaDT/IDnRdor4PCzxgVpWjKLXMcFiDj5XLoIu7X82G97vVtGddu5RNDNkC qfH0+QN1XkVLCcAPt/bn/fRFg/OZH0wlp0azJkrUfC5u4WgxbyzNZ9wtdLKqAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rh33qfhztQ9; Sun, 1 Dec 2024 12:54:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsRis094329; Sun, 1 Dec 2024 12:54:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsRrO094326; Sun, 1 Dec 2024 12:54:27 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:27 GMT Message-Id: <202412011254.4B1CsRrO094326@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2fed7b083358 - stable/13 - Merge commit 6dbdb8430b49 from llvm git (by Nikolas Klauser): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2fed7b08335831cd52ea2c699dd55669bd657383 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2fed7b08335831cd52ea2c699dd55669bd657383 commit 2fed7b08335831cd52ea2c699dd55669bd657383 Author: Dimitry Andric AuthorDate: 2024-09-11 10:17:00 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:44 +0000 Merge commit 6dbdb8430b49 from llvm git (by Nikolas Klauser): [Clang] Fix crash due to invalid source location in __is_trivially_equality_comparable (#107815) Fixes #107777 This fixes an assertion failure building www/qt5-webengine: Assertion failed: (Loc.isValid() && "point of instantiation must be valid!"), function setPointOfInstantiation, file contrib/llvm-project/clang/include/clang/AST/DeclTemplate.h, line 1938. PR: 280562 MFC after: 1 month (cherry picked from commit 835c3a3e69af562ec6d4ec3639938c96dad1697e) --- contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp index 14d1f395af90..de50786f4d6c 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp @@ -5140,7 +5140,8 @@ static bool HasNonDeletedDefaultedEqualityComparison(Sema &S, // const ClassT& obj; OpaqueValueExpr Operand( - {}, Decl->getTypeForDecl()->getCanonicalTypeUnqualified().withConst(), + KeyLoc, + Decl->getTypeForDecl()->getCanonicalTypeUnqualified().withConst(), ExprValueKind::VK_LValue); UnresolvedSet<16> Functions; // obj == obj; From nobody Sun Dec 1 12:54:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rh50MrWz5fbQm; Sun, 01 Dec 2024 12:54:29 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rh452fnz4PZB; Sun, 1 Dec 2024 12:54:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NJZuUgTb4IK7U4jyyxzXTlgcBMeOJdwosFsT8ULxu9w=; b=Z+74qjPaL4pe2UANUjYH/pPND3KwF0d6EKiNO06gj5/B/w+By52q4MdOgkHrSGIOqXl9o/ R/JL3W/5454Fz2VHjxByKliycv0mBfg5ZbSrc6dnGwmIxlgD/Bw/nTJ6txry4Nrb6FEK49 B/T63Igl+NQiK4YHdh8WMOPl3Cy8eSg4XswIv2qm0yS+O9wo7Vd/J7EbVjaZ3y/3PH5VtD 1mU/vWFemARiTrYOuMxPm+9f6TX9Eb6vLTXurY7MIlF+fzbmubYHwBYMGF/olcjVyU1Ft+ ZbDdRPmiZh7W3ADfwx7x7LNdI30iQRrbYngXza30tHqqQb2jY3z3wZz/j304IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NJZuUgTb4IK7U4jyyxzXTlgcBMeOJdwosFsT8ULxu9w=; b=VdVrHazYM5990fz0SBcJfiUfNZjYWL+TngSiWRoVQQ828L7aBn5Amo9r6XUrzM4feMlKER a0wypa/b1wvr96Afgp/y3hc9OVr+jSkUZpCI1w1BcdF+/u5PuJ4jM7DM+ci8IKZOw11r3O ACuJKUybC9l+3IPGrB1UZrHn+kxR7N0VkYPVa3DzeNLDCCcHMweCH6fD3y0T+DEHHwNCzx fpsggmwh+BZurMDTeZisRTq1DOWFnOXWoeYv9bdAhBil1F8WMRH9/BuZ+rI0tlmJUxQZoI 11GO/gW0SQxB+vOZjchOIbAPh0tkQIQhKMxvL5SgdmGSjsLxyHX/vsDYmuvYiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057668; a=rsa-sha256; cv=none; b=nGYpHHJv/pYzznPurrUB8pkT5zxdZCQZtyWVjCxxwJsEwaEb/pJ5bRs/LK3TdRNFC0YFdT pi5iQtnOmNFDlswG7EzLUeXMt8cvJX44N32whJ1FJ2rio7ZP5IlHrXqOsdKTjJO+g5a6s2 r4hhvUGpR2iLOsUHnLkm/TCM0QVW9NmPtqWU/KrWMIE/KhQeuXS3UYmUxPCO0+dchByH1F 1DLYLohmCrdRIsYmfNvSbxnzqMOIZuutlWRImbzLWrwReIq0UaFaYp+6t9l/KaX1j1nhf4 SelTgulqVHDNTC8l/KpkmrDJiit9qchVoabnkHk6jGrvzIk9oA8PpIUY9y0H4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rh44ZMszt57; Sun, 1 Dec 2024 12:54:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsS5X094368; Sun, 1 Dec 2024 12:54:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsSKD094365; Sun, 1 Dec 2024 12:54:28 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:28 GMT Message-Id: <202412011254.4B1CsSKD094365@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2510351d465a - stable/13 - Merge llvm-project release/19.x llvmorg-19.1.0-0-ga4bf6cd7cfb1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2510351d465a329ba36486d10948daac0d0fa3f9 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2510351d465a329ba36486d10948daac0d0fa3f9 commit 2510351d465a329ba36486d10948daac0d0fa3f9 Author: Dimitry Andric AuthorDate: 2024-09-22 09:48:03 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:44 +0000 Merge llvm-project release/19.x llvmorg-19.1.0-0-ga4bf6cd7cfb1 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-0-ga4bf6cd7cfb1, a.k.a. 19.1.0 release. PR: 280562 MFC after: 1 month (cherry picked from commit c80e69b00d976a5a3b3e84527f270fa7e72a8205) --- .../llvm-project/clang/lib/Basic/Targets/X86.cpp | 4 + contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 146 +++++++++------------ .../llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 23 ++-- contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp | 2 +- .../clang/lib/CodeGen/CodeGenFunction.h | 7 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 6 +- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 21 ++- contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp | 1 - contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp | 2 +- .../clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 5 +- .../compiler-rt/lib/builtins/cpu_model/x86.c | 20 +++ .../llvm-project/compiler-rt/lib/builtins/divtc3.c | 2 +- .../llvm-project/compiler-rt/lib/builtins/multc3.c | 2 +- contrib/llvm-project/libcxx/include/chrono | 2 +- contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp | 8 +- .../include/llvm/TargetParser/X86TargetParser.def | 3 + .../include/llvm/TargetParser/X86TargetParser.h | 1 + .../llvm/lib/CodeGen/ModuloSchedule.cpp | 3 + .../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 4 + contrib/llvm-project/llvm/lib/IR/BasicBlock.cpp | 12 +- .../lib/Target/AArch64/AArch64FrameLowering.cpp | 33 ----- .../llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 4 - .../llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | 30 +++-- .../llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 9 +- .../llvm/lib/Target/RISCV/RISCVInstrInfo.cpp | 2 +- contrib/llvm-project/llvm/lib/Target/X86/X86.td | 15 +++ .../llvm/lib/Target/X86/X86PfmCounters.td | 1 + .../llvm-project/llvm/lib/TargetParser/Host.cpp | 19 +++ .../llvm/lib/TargetParser/X86TargetParser.cpp | 5 + .../lib/Transforms/Vectorize/SLPVectorizer.cpp | 8 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 4 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 4 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 37 files changed, 237 insertions(+), 187 deletions(-) diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp index 18e6dbf03e00..072c97e6c8c6 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp @@ -723,6 +723,9 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, case CK_ZNVER4: defineCPUMacros(Builder, "znver4"); break; + case CK_ZNVER5: + defineCPUMacros(Builder, "znver5"); + break; case CK_Geode: defineCPUMacros(Builder, "geode"); break; @@ -1613,6 +1616,7 @@ std::optional X86TargetInfo::getCPUCacheLineSize() const { case CK_ZNVER2: case CK_ZNVER3: case CK_ZNVER4: + case CK_ZNVER5: // Deprecated case CK_x86_64: case CK_x86_64_v2: diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp index 6e69e84a2344..d7ebffa8c5e4 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp @@ -1336,75 +1336,50 @@ static llvm::Value *CreateCoercedLoad(Address Src, llvm::Type *Ty, return CGF.Builder.CreateLoad(Tmp); } -// Function to store a first-class aggregate into memory. We prefer to -// store the elements rather than the aggregate to be more friendly to -// fast-isel. -// FIXME: Do we need to recurse here? -void CodeGenFunction::EmitAggregateStore(llvm::Value *Val, Address Dest, - bool DestIsVolatile) { - // Prefer scalar stores to first-class aggregate stores. - if (llvm::StructType *STy = dyn_cast(Val->getType())) { - for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { - Address EltPtr = Builder.CreateStructGEP(Dest, i); - llvm::Value *Elt = Builder.CreateExtractValue(Val, i); - Builder.CreateStore(Elt, EltPtr, DestIsVolatile); - } - } else { - Builder.CreateStore(Val, Dest, DestIsVolatile); - } -} - -/// CreateCoercedStore - Create a store to \arg DstPtr from \arg Src, -/// where the source and destination may have different types. The -/// destination is known to be aligned to \arg DstAlign bytes. -/// -/// This safely handles the case when the src type is larger than the -/// destination type; the upper bits of the src will be lost. -static void CreateCoercedStore(llvm::Value *Src, - Address Dst, - bool DstIsVolatile, - CodeGenFunction &CGF) { - llvm::Type *SrcTy = Src->getType(); - llvm::Type *DstTy = Dst.getElementType(); - if (SrcTy == DstTy) { - CGF.Builder.CreateStore(Src, Dst, DstIsVolatile); - return; - } - - llvm::TypeSize SrcSize = CGF.CGM.getDataLayout().getTypeAllocSize(SrcTy); - - if (llvm::StructType *DstSTy = dyn_cast(DstTy)) { - Dst = EnterStructPointerForCoercedAccess(Dst, DstSTy, - SrcSize.getFixedValue(), CGF); - DstTy = Dst.getElementType(); - } - - llvm::PointerType *SrcPtrTy = llvm::dyn_cast(SrcTy); - llvm::PointerType *DstPtrTy = llvm::dyn_cast(DstTy); - if (SrcPtrTy && DstPtrTy && - SrcPtrTy->getAddressSpace() != DstPtrTy->getAddressSpace()) { - Src = CGF.Builder.CreateAddrSpaceCast(Src, DstTy); - CGF.Builder.CreateStore(Src, Dst, DstIsVolatile); +void CodeGenFunction::CreateCoercedStore(llvm::Value *Src, Address Dst, + llvm::TypeSize DstSize, + bool DstIsVolatile) { + if (!DstSize) return; - } - // If the source and destination are integer or pointer types, just do an - // extension or truncation to the desired type. - if ((isa(SrcTy) || isa(SrcTy)) && - (isa(DstTy) || isa(DstTy))) { - Src = CoerceIntOrPtrToIntOrPtr(Src, DstTy, CGF); - CGF.Builder.CreateStore(Src, Dst, DstIsVolatile); - return; + llvm::Type *SrcTy = Src->getType(); + llvm::TypeSize SrcSize = CGM.getDataLayout().getTypeAllocSize(SrcTy); + + // GEP into structs to try to make types match. + // FIXME: This isn't really that useful with opaque types, but it impacts a + // lot of regression tests. + if (SrcTy != Dst.getElementType()) { + if (llvm::StructType *DstSTy = + dyn_cast(Dst.getElementType())) { + assert(!SrcSize.isScalable()); + Dst = EnterStructPointerForCoercedAccess(Dst, DstSTy, + SrcSize.getFixedValue(), *this); + } } - llvm::TypeSize DstSize = CGF.CGM.getDataLayout().getTypeAllocSize(DstTy); - - // If store is legal, just bitcast the src pointer. - if (isa(SrcTy) || - isa(DstTy) || - SrcSize.getFixedValue() <= DstSize.getFixedValue()) { - Dst = Dst.withElementType(SrcTy); - CGF.EmitAggregateStore(Src, Dst, DstIsVolatile); + if (SrcSize.isScalable() || SrcSize <= DstSize) { + if (SrcTy->isIntegerTy() && Dst.getElementType()->isPointerTy() && + SrcSize == CGM.getDataLayout().getTypeAllocSize(Dst.getElementType())) { + // If the value is supposed to be a pointer, convert it before storing it. + Src = CoerceIntOrPtrToIntOrPtr(Src, Dst.getElementType(), *this); + Builder.CreateStore(Src, Dst, DstIsVolatile); + } else if (llvm::StructType *STy = + dyn_cast(Src->getType())) { + // Prefer scalar stores to first-class aggregate stores. + Dst = Dst.withElementType(SrcTy); + for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { + Address EltPtr = Builder.CreateStructGEP(Dst, i); + llvm::Value *Elt = Builder.CreateExtractValue(Src, i); + Builder.CreateStore(Elt, EltPtr, DstIsVolatile); + } + } else { + Builder.CreateStore(Src, Dst.withElementType(SrcTy), DstIsVolatile); + } + } else if (SrcTy->isIntegerTy()) { + // If the source is a simple integer, coerce it directly. + llvm::Type *DstIntTy = Builder.getIntNTy(DstSize.getFixedValue() * 8); + Src = CoerceIntOrPtrToIntOrPtr(Src, DstIntTy, *this); + Builder.CreateStore(Src, Dst.withElementType(DstIntTy), DstIsVolatile); } else { // Otherwise do coercion through memory. This is stupid, but // simple. @@ -1416,12 +1391,12 @@ static void CreateCoercedStore(llvm::Value *Src, // FIXME: Assert that we aren't truncating non-padding bits when have access // to that information. RawAddress Tmp = - CreateTempAllocaForCoercion(CGF, SrcTy, Dst.getAlignment()); - CGF.Builder.CreateStore(Src, Tmp); - CGF.Builder.CreateMemCpy( - Dst.emitRawPointer(CGF), Dst.getAlignment().getAsAlign(), - Tmp.getPointer(), Tmp.getAlignment().getAsAlign(), - llvm::ConstantInt::get(CGF.IntPtrTy, DstSize.getFixedValue())); + CreateTempAllocaForCoercion(*this, SrcTy, Dst.getAlignment()); + Builder.CreateStore(Src, Tmp); + Builder.CreateMemCpy(Dst.emitRawPointer(*this), + Dst.getAlignment().getAsAlign(), Tmp.getPointer(), + Tmp.getAlignment().getAsAlign(), + Builder.CreateTypeSize(IntPtrTy, DstSize)); } } @@ -3309,7 +3284,12 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, assert(NumIRArgs == 1); auto AI = Fn->getArg(FirstIRArg); AI->setName(Arg->getName() + ".coerce"); - CreateCoercedStore(AI, Ptr, /*DstIsVolatile=*/false, *this); + CreateCoercedStore( + AI, Ptr, + llvm::TypeSize::getFixed( + getContext().getTypeSizeInChars(Ty).getQuantity() - + ArgI.getDirectOffset()), + /*DstIsVolatile=*/false); } // Match to what EmitParmDecl is expecting for this type. @@ -5939,17 +5919,8 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, llvm::Value *Imag = Builder.CreateExtractValue(CI, 1); return RValue::getComplex(std::make_pair(Real, Imag)); } - case TEK_Aggregate: { - Address DestPtr = ReturnValue.getAddress(); - bool DestIsVolatile = ReturnValue.isVolatile(); - - if (!DestPtr.isValid()) { - DestPtr = CreateMemTemp(RetTy, "agg.tmp"); - DestIsVolatile = false; - } - EmitAggregateStore(CI, DestPtr, DestIsVolatile); - return RValue::getAggregate(DestPtr); - } + case TEK_Aggregate: + break; case TEK_Scalar: { // If the argument doesn't match, perform a bitcast to coerce it. // This can happen due to trivial type mismatches. @@ -5959,7 +5930,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, return RValue::get(V); } } - llvm_unreachable("bad evaluation kind"); } // If coercing a fixed vector from a scalable vector for ABI @@ -5981,10 +5951,13 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, Address DestPtr = ReturnValue.getValue(); bool DestIsVolatile = ReturnValue.isVolatile(); + uint64_t DestSize = + getContext().getTypeInfoDataSizeInChars(RetTy).Width.getQuantity(); if (!DestPtr.isValid()) { DestPtr = CreateMemTemp(RetTy, "coerce"); DestIsVolatile = false; + DestSize = getContext().getTypeSizeInChars(RetTy).getQuantity(); } // An empty record can overlap other data (if declared with @@ -5993,7 +5966,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, if (!isEmptyRecord(getContext(), RetTy, true)) { // If the value is offset in memory, apply the offset now. Address StorePtr = emitAddressAtOffset(*this, DestPtr, RetAI); - CreateCoercedStore(CI, StorePtr, DestIsVolatile, *this); + CreateCoercedStore( + CI, StorePtr, + llvm::TypeSize::getFixed(DestSize - RetAI.getDirectOffset()), + DestIsVolatile); } return convertTempToRValue(DestPtr, RetTy, SourceLocation()); diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp index c3c10e73ff05..d9f44f4be617 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp @@ -131,15 +131,12 @@ public: EnsureDest(E->getType()); if (llvm::Value *Result = ConstantEmitter(CGF).tryEmitConstantExpr(E)) { - Address StoreDest = Dest.getAddress(); - // The emitted value is guaranteed to have the same size as the - // destination but can have a different type. Just do a bitcast in this - // case to avoid incorrect GEPs. - if (Result->getType() != StoreDest.getType()) - StoreDest = StoreDest.withElementType(Result->getType()); - - CGF.EmitAggregateStore(Result, StoreDest, - E->getType().isVolatileQualified()); + CGF.CreateCoercedStore( + Result, Dest.getAddress(), + llvm::TypeSize::getFixed( + Dest.getPreferredSize(CGF.getContext(), E->getType()) + .getQuantity()), + E->getType().isVolatileQualified()); return; } return Visit(E->getSubExpr()); @@ -2050,6 +2047,10 @@ CodeGenFunction::getOverlapForFieldInit(const FieldDecl *FD) { if (!FD->hasAttr() || !FD->getType()->isRecordType()) return AggValueSlot::DoesNotOverlap; + // Empty fields can overlap earlier fields. + if (FD->getType()->getAsCXXRecordDecl()->isEmpty()) + return AggValueSlot::MayOverlap; + // If the field lies entirely within the enclosing class's nvsize, its tail // padding cannot overlap any already-initialized object. (The only subobjects // with greater addresses that might already be initialized are vbases.) @@ -2072,6 +2073,10 @@ AggValueSlot::Overlap_t CodeGenFunction::getOverlapForBaseInit( if (IsVirtual) return AggValueSlot::MayOverlap; + // Empty bases can overlap earlier bases. + if (BaseRD->isEmpty()) + return AggValueSlot::MayOverlap; + // If the base class is laid out entirely within the nvsize of the derived // class, its tail padding cannot yet be initialized, so we can issue // stores at the full width of the base class. diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp index aa97f685ac7a..2f466602d2f6 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp @@ -745,7 +745,7 @@ void CodeGenFunction::EmitAttributedStmt(const AttributedStmt &S) { } break; case attr::CXXAssume: { const Expr *Assumption = cast(A)->getAssumption(); - if (getLangOpts().CXXAssumptions && + if (getLangOpts().CXXAssumptions && Builder.GetInsertBlock() && !Assumption->HasSideEffects(getContext())) { llvm::Value *AssumptionVal = EvaluateExprAsBool(Assumption); Builder.CreateAssumption(AssumptionVal); diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h index ba7b565d9755..60e6841e1b3d 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h @@ -4838,9 +4838,10 @@ public: void EmitAggFinalDestCopy(QualType Type, AggValueSlot Dest, const LValue &Src, ExprValueKind SrcKind); - /// Build all the stores needed to initialize an aggregate at Dest with the - /// value Val. - void EmitAggregateStore(llvm::Value *Val, Address Dest, bool DestIsVolatile); + /// Create a store to \arg DstPtr from \arg Src, truncating the stored value + /// to at most \arg DstSize bytes. + void CreateCoercedStore(llvm::Value *Src, Address Dst, llvm::TypeSize DstSize, + bool DstIsVolatile); /// EmitExtendGCLifetime - Given a pointer to an Objective-C object, /// make sure it survives garbage collection until this point. diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp index 60e65aaa83e9..7813d86ff0ea 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp @@ -570,7 +570,8 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { NextTok->isOneOf(Keywords.kw_of, Keywords.kw_in, Keywords.kw_as)); ProbablyBracedList = - ProbablyBracedList || (IsCpp && NextTok->is(tok::l_paren)); + ProbablyBracedList || (IsCpp && (PrevTok->Tok.isLiteral() || + NextTok->is(tok::l_paren))); // If there is a comma, semicolon or right paren after the closing // brace, we assume this is a braced initializer list. @@ -609,8 +610,9 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { ProbablyBracedList = NextTok->isNot(tok::l_square); } - // Cpp macro definition body containing nonempty braced list or block: + // Cpp macro definition body that is a nonempty braced list or block: if (IsCpp && Line->InMacroBody && PrevTok != FormatTok && + !FormatTok->Previous && NextTok->is(tok::eof) && // A statement can end with only `;` (simple statement), a block // closing brace (compound statement), or `:` (label statement). // If PrevTok is a block opening brace, Tok ends an empty block. diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp index edb8b79a2220..f56ca398cda8 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp @@ -5430,11 +5430,24 @@ struct EnsureImmediateInvocationInDefaultArgs // Rewrite to source location to refer to the context in which they are used. ExprResult TransformSourceLocExpr(SourceLocExpr *E) { - if (E->getParentContext() == SemaRef.CurContext) + DeclContext *DC = E->getParentContext(); + if (DC == SemaRef.CurContext) return E; - return getDerived().RebuildSourceLocExpr(E->getIdentKind(), E->getType(), - E->getBeginLoc(), E->getEndLoc(), - SemaRef.CurContext); + + // FIXME: During instantiation, because the rebuild of defaults arguments + // is not always done in the context of the template instantiator, + // we run the risk of producing a dependent source location + // that would never be rebuilt. + // This usually happens during overload resolution, or in contexts + // where the value of the source location does not matter. + // However, we should find a better way to deal with source location + // of function templates. + if (!SemaRef.CurrentInstantiationScope || + !SemaRef.CurContext->isDependentContext() || DC->isDependentContext()) + DC = SemaRef.CurContext; + + return getDerived().RebuildSourceLocExpr( + E->getIdentKind(), E->getType(), E->getBeginLoc(), E->getEndLoc(), DC); } }; diff --git a/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp b/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp index 601077e9f333..809b94bb7412 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp @@ -1318,7 +1318,6 @@ void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, if (C->Init.isUsable()) { addInitCapture(LSI, cast(Var), C->Kind == LCK_ByRef); - PushOnScopeChains(Var, CurScope, false); } else { TryCaptureKind Kind = C->Kind == LCK_ByRef ? TryCapture_ExplicitByRef : TryCapture_ExplicitByVal; diff --git a/contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp b/contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp index 7a6a64529f52..d3d4bf27ae72 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp @@ -570,7 +570,7 @@ void LookupResult::resolveKind() { // For non-type declarations, check for a prior lookup result naming this // canonical declaration. - if (!D->isPlaceholderVar(getSema().getLangOpts()) && !ExistingI) { + if (!ExistingI) { auto UniqueResult = Unique.insert(std::make_pair(D, I)); if (!UniqueResult.second) { // We've seen this entity before. diff --git a/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index 62a240ecbc60..c11468a08ae5 100644 --- a/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -1928,6 +1928,7 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, case Stmt::CXXRewrittenBinaryOperatorClass: case Stmt::RequiresExprClass: case Expr::CXXParenListInitExprClass: + case Stmt::EmbedExprClass: // Fall through. // Cases we intentionally don't evaluate, since they don't need @@ -2430,10 +2431,6 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, Bldr.addNodes(Dst); break; } - - case Stmt::EmbedExprClass: - llvm::report_fatal_error("Support for EmbedExpr is not implemented."); - break; } } diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model/x86.c b/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model/x86.c index 867ed97e57bf..b1c4abd9d11d 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model/x86.c +++ b/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model/x86.c @@ -59,6 +59,7 @@ enum ProcessorTypes { INTEL_SIERRAFOREST, INTEL_GRANDRIDGE, INTEL_CLEARWATERFOREST, + AMDFAM1AH, CPU_TYPE_MAX }; @@ -97,6 +98,7 @@ enum ProcessorSubtypes { INTEL_COREI7_ARROWLAKE, INTEL_COREI7_ARROWLAKE_S, INTEL_COREI7_PANTHERLAKE, + AMDFAM1AH_ZNVER5, CPU_SUBTYPE_MAX }; @@ -803,6 +805,24 @@ static const char *getAMDProcessorTypeAndSubtype(unsigned Family, break; // "znver4" } break; // family 19h + case 26: + CPU = "znver5"; + *Type = AMDFAM1AH; + if (Model <= 0x77) { + // Models 00h-0Fh (Breithorn). + // Models 10h-1Fh (Breithorn-Dense). + // Models 20h-2Fh (Strix 1). + // Models 30h-37h (Strix 2). + // Models 38h-3Fh (Strix 3). + // Models 40h-4Fh (Granite Ridge). + // Models 50h-5Fh (Weisshorn). + // Models 60h-6Fh (Krackan1). + // Models 70h-77h (Sarlak). + CPU = "znver5"; + *Subtype = AMDFAM1AH_ZNVER5; + break; // "znver5" + } + break; default: break; // Unknown AMD CPU. } diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/divtc3.c b/contrib/llvm-project/compiler-rt/lib/builtins/divtc3.c index 099de5802daf..c393de815337 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/divtc3.c +++ b/contrib/llvm-project/compiler-rt/lib/builtins/divtc3.c @@ -13,7 +13,7 @@ #define QUAD_PRECISION #include "fp_lib.h" -#if defined(CRT_HAS_F128) +#if defined(CRT_HAS_128BIT) && defined(CRT_HAS_F128) // Returns: the quotient of (a + ib) / (c + id) diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/multc3.c b/contrib/llvm-project/compiler-rt/lib/builtins/multc3.c index 61a3f45e4727..a89832f0e883 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/multc3.c +++ b/contrib/llvm-project/compiler-rt/lib/builtins/multc3.c @@ -15,7 +15,7 @@ #include "int_lib.h" #include "int_math.h" -#if defined(CRT_HAS_F128) +#if defined(CRT_HAS_128BIT) && defined(CRT_HAS_F128) // Returns: the product of a + ib and c + id diff --git a/contrib/llvm-project/libcxx/include/chrono b/contrib/llvm-project/libcxx/include/chrono index 990c415ec2e9..7bec5e5a26ef 100644 --- a/contrib/llvm-project/libcxx/include/chrono +++ b/contrib/llvm-project/libcxx/include/chrono @@ -1015,8 +1015,8 @@ constexpr chrono::year operator ""y(unsigned lo # include # if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include +# include # endif -# include #endif #endif // _LIBCPP_CHRONO diff --git a/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp b/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp index 54821c299bde..abde3cd96491 100644 --- a/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp +++ b/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp @@ -60,17 +60,15 @@ Hexagon::Hexagon() { } uint32_t Hexagon::calcEFlags() const { - assert(!ctx.objectFiles.empty()); - // The architecture revision must always be equal to or greater than // greatest revision in the list of inputs. - uint32_t ret = 0; + std::optional ret; for (InputFile *f : ctx.objectFiles) { uint32_t eflags = cast>(f)->getObj().getHeader().e_flags; - if (eflags > ret) + if (!ret || eflags > *ret) ret = eflags; } - return ret; + return ret.value_or(/* Default Arch Rev: */ 0x60); } static uint32_t applyMask(uint32_t mask, uint32_t data) { diff --git a/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.def b/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.def index 92798cbe4b4c..008cf5381c12 100644 --- a/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.def +++ b/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.def @@ -49,11 +49,13 @@ X86_CPU_TYPE(ZHAOXIN_FAM7H, "zhaoxin_fam7h") X86_CPU_TYPE(INTEL_SIERRAFOREST, "sierraforest") X86_CPU_TYPE(INTEL_GRANDRIDGE, "grandridge") X86_CPU_TYPE(INTEL_CLEARWATERFOREST, "clearwaterforest") +X86_CPU_TYPE(AMDFAM1AH, "amdfam1ah") // Alternate names supported by __builtin_cpu_is and target multiversioning. X86_CPU_TYPE_ALIAS(INTEL_BONNELL, "atom") X86_CPU_TYPE_ALIAS(AMDFAM10H, "amdfam10") X86_CPU_TYPE_ALIAS(AMDFAM15H, "amdfam15") +X86_CPU_TYPE_ALIAS(AMDFAM1AH, "amdfam1a") X86_CPU_TYPE_ALIAS(INTEL_SILVERMONT, "slm") #undef X86_CPU_TYPE_ALIAS @@ -104,6 +106,7 @@ X86_CPU_SUBTYPE(INTEL_COREI7_GRANITERAPIDS_D,"graniterapids-d") X86_CPU_SUBTYPE(INTEL_COREI7_ARROWLAKE, "arrowlake") X86_CPU_SUBTYPE(INTEL_COREI7_ARROWLAKE_S, "arrowlake-s") X86_CPU_SUBTYPE(INTEL_COREI7_PANTHERLAKE, "pantherlake") +X86_CPU_SUBTYPE(AMDFAM1AH_ZNVER5, "znver5") // Alternate names supported by __builtin_cpu_is and target multiversioning. X86_CPU_SUBTYPE_ALIAS(INTEL_COREI7_ALDERLAKE, "raptorlake") diff --git a/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.h b/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.h index 2083e585af4a..5468aaa81edb 100644 --- a/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.h +++ b/contrib/llvm-project/llvm/include/llvm/TargetParser/X86TargetParser.h @@ -147,6 +147,7 @@ enum CPUKind { CK_x86_64_v3, CK_x86_64_v4, CK_Geode, + CK_ZNVER5, }; /// Parse \p CPU string into a CPUKind. Will only accept 64-bit capable CPUs if diff --git a/contrib/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp b/contrib/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp index 0f29ebe3ee79..b1a2bfaf7895 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp @@ -130,6 +130,7 @@ void ModuloScheduleExpander::generatePipelinedLoop() { // Generate the prolog instructions that set up the pipeline. generateProlog(MaxStageCount, KernelBB, VRMap, PrologBBs); MF.insert(BB->getIterator(), KernelBB); + LIS.insertMBBInMaps(KernelBB); // Rearrange the instructions to generate the new, pipelined loop, // and update register names as needed. @@ -210,6 +211,7 @@ void ModuloScheduleExpander::generateProlog(unsigned LastStage, NewBB->transferSuccessors(PredBB); PredBB->addSuccessor(NewBB); PredBB = NewBB; + LIS.insertMBBInMaps(NewBB); // Generate instructions for each appropriate stage. Process instructions // in original program order. @@ -283,6 +285,7 @@ void ModuloScheduleExpander::generateEpilog( PredBB->replaceSuccessor(LoopExitBB, NewBB); NewBB->addSuccessor(LoopExitBB); + LIS.insertMBBInMaps(NewBB); if (EpilogStart == LoopExitBB) EpilogStart = NewBB; diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index df3d207d85d3..b961d3bb1fec 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -1453,6 +1453,10 @@ void SelectionDAGISel::reportIPToStateForBlocks(MachineFunction *MF) { if (BB->getFirstMayFaultInst()) { // Report IP range only for blocks with Faulty inst auto MBBb = MBB.getFirstNonPHI(); + + if (MBBb == MBB.end()) + continue; + MachineInstr *MIb = &*MBBb; if (MIb->isTerminator()) continue; diff --git a/contrib/llvm-project/llvm/lib/IR/BasicBlock.cpp b/contrib/llvm-project/llvm/lib/IR/BasicBlock.cpp index 0a9498f051cb..46896d3cdf7d 100644 --- a/contrib/llvm-project/llvm/lib/IR/BasicBlock.cpp +++ b/contrib/llvm-project/llvm/lib/IR/BasicBlock.cpp @@ -975,8 +975,16 @@ void BasicBlock::spliceDebugInfoImpl(BasicBlock::iterator Dest, BasicBlock *Src, if (ReadFromTail && Src->getMarker(Last)) { DbgMarker *FromLast = Src->getMarker(Last); if (LastIsEnd) { - Dest->adoptDbgRecords(Src, Last, true); - // adoptDbgRecords will release any trailers. + if (Dest == end()) { + // Abosrb the trailing markers from Src. + assert(FromLast == Src->getTrailingDbgRecords()); + createMarker(Dest)->absorbDebugValues(*FromLast, true); + FromLast->eraseFromParent(); + Src->deleteTrailingDbgRecords(); + } else { + // adoptDbgRecords will release any trailers. + Dest->adoptDbgRecords(Src, Last, true); + } assert(!Src->getTrailingDbgRecords()); } else { // FIXME: can we use adoptDbgRecords here to reduce allocations? diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp index ba46ededc63a..87e057a468af 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp @@ -2931,16 +2931,6 @@ struct RegPairInfo { } // end anonymous namespace -unsigned findFreePredicateReg(BitVector &SavedRegs) { - for (unsigned PReg = AArch64::P8; PReg <= AArch64::P15; ++PReg) { - if (SavedRegs.test(PReg)) { - unsigned PNReg = PReg - AArch64::P0 + AArch64::PN0; - return PNReg; - } - } - return AArch64::NoRegister; -} - static void computeCalleeSaveRegisterPairs( MachineFunction &MF, ArrayRef CSI, const TargetRegisterInfo *TRI, SmallVectorImpl &RegPairs, @@ -3645,7 +3635,6 @@ void AArch64FrameLowering::determineCalleeSaves(MachineFunction &MF, unsigned ExtraCSSpill = 0; bool HasUnpairedGPR64 = false; - bool HasPairZReg = false; // Figure out which callee-saved registers to save/restore. for (unsigned i = 0; CSRegs[i]; ++i) { const unsigned Reg = CSRegs[i]; @@ -3699,28 +3688,6 @@ void AArch64FrameLowering::determineCalleeSaves(MachineFunction &MF, !RegInfo->isReservedReg(MF, PairedReg)) ExtraCSSpill = PairedReg; } - // Check if there is a pair of ZRegs, so it can select PReg for spill/fill - HasPairZReg |= (AArch64::ZPRRegClass.contains(Reg, CSRegs[i ^ 1]) && - SavedRegs.test(CSRegs[i ^ 1])); - } - - if (HasPairZReg && (Subtarget.hasSVE2p1() || Subtarget.hasSME2())) { - AArch64FunctionInfo *AFI = MF.getInfo(); - // Find a suitable predicate register for the multi-vector spill/fill - // instructions. - unsigned PnReg = findFreePredicateReg(SavedRegs); - if (PnReg != AArch64::NoRegister) - AFI->setPredicateRegForFillSpill(PnReg); - // If no free callee-save has been found assign one. - if (!AFI->getPredicateRegForFillSpill() && - MF.getFunction().getCallingConv() == - CallingConv::AArch64_SVE_VectorCall) { - SavedRegs.set(AArch64::P8); - AFI->setPredicateRegForFillSpill(AArch64::PN8); - } - - assert(!RegInfo->isReservedReg(MF, AFI->getPredicateRegForFillSpill()) && - "Predicate cannot be a reserved register"); } if (MF.getFunction().getCallingConv() == CallingConv::Win64 && diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index 377bcd5868fb..805684ef69a5 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -5144,10 +5144,6 @@ void AArch64InstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, if (PNRReg.isValid() && !PNRReg.isVirtual()) MI.addDef(PNRReg, RegState::Implicit); MI.addMemOperand(MMO); - - if (PNRReg.isValid() && PNRReg.isVirtual()) - BuildMI(MBB, MBBI, DebugLoc(), get(TargetOpcode::COPY), PNRReg) - .addReg(DestReg); } bool llvm::isNZCVTouchedInInstructionRange(const MachineInstr &DefMI, diff --git a/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp index 39ae7c96cf77..a71c9453d968 100644 --- a/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp @@ -4349,6 +4349,7 @@ AMDGPUTargetLowering::performMulLoHiCombine(SDNode *N, SelectionDAG &DAG = DCI.DAG; SDLoc DL(N); + bool Signed = N->getOpcode() == ISD::SMUL_LOHI; SDValue N0 = N->getOperand(0); SDValue N1 = N->getOperand(1); @@ -4363,20 +4364,25 @@ AMDGPUTargetLowering::performMulLoHiCombine(SDNode *N, // Try to use two fast 24-bit multiplies (one for each half of the result) // instead of one slow extending multiply. - unsigned LoOpcode, HiOpcode; - if (Subtarget->hasMulU24() && isU24(N0, DAG) && isU24(N1, DAG)) { - N0 = DAG.getZExtOrTrunc(N0, DL, MVT::i32); - N1 = DAG.getZExtOrTrunc(N1, DL, MVT::i32); - LoOpcode = AMDGPUISD::MUL_U24; - HiOpcode = AMDGPUISD::MULHI_U24; - } else if (Subtarget->hasMulI24() && isI24(N0, DAG) && isI24(N1, DAG)) { - N0 = DAG.getSExtOrTrunc(N0, DL, MVT::i32); - N1 = DAG.getSExtOrTrunc(N1, DL, MVT::i32); - LoOpcode = AMDGPUISD::MUL_I24; - HiOpcode = AMDGPUISD::MULHI_I24; + unsigned LoOpcode = 0; + unsigned HiOpcode = 0; + if (Signed) { + if (Subtarget->hasMulI24() && isI24(N0, DAG) && isI24(N1, DAG)) { + N0 = DAG.getSExtOrTrunc(N0, DL, MVT::i32); + N1 = DAG.getSExtOrTrunc(N1, DL, MVT::i32); + LoOpcode = AMDGPUISD::MUL_I24; + HiOpcode = AMDGPUISD::MULHI_I24; + } } else { - return SDValue(); + if (Subtarget->hasMulU24() && isU24(N0, DAG) && isU24(N1, DAG)) { + N0 = DAG.getZExtOrTrunc(N0, DL, MVT::i32); + N1 = DAG.getZExtOrTrunc(N1, DL, MVT::i32); + LoOpcode = AMDGPUISD::MUL_U24; + HiOpcode = AMDGPUISD::MULHI_U24; + } } + if (!LoOpcode) + return SDValue(); SDValue Lo = DAG.getNode(LoOpcode, DL, MVT::i32, N0, N1); SDValue Hi = DAG.getNode(HiOpcode, DL, MVT::i32, N0, N1); diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 21cf4d9eeac1..758de9d732fa 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -9338,12 +9338,13 @@ SDValue PPCTargetLowering::LowerBITCAST(SDValue Op, SelectionDAG &DAG) const { SDLoc dl(Op); SDValue Op0 = Op->getOperand(0); + if (!Subtarget.isPPC64() || (Op0.getOpcode() != ISD::BUILD_PAIR) || + (Op.getValueType() != MVT::f128)) + return SDValue(); + SDValue Lo = Op0.getOperand(0); SDValue Hi = Op0.getOperand(1); - - if ((Op.getValueType() != MVT::f128) || - (Op0.getOpcode() != ISD::BUILD_PAIR) || (Lo.getValueType() != MVT::i64) || - (Hi.getValueType() != MVT::i64) || !Subtarget.isPPC64()) + if ((Lo.getValueType() != MVT::i64) || (Hi.getValueType() != MVT::i64)) return SDValue(); if (!Subtarget.isLittleEndian()) diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp index ba3b4bd701d6..6c0cbeadebf4 100644 --- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp @@ -2902,7 +2902,7 @@ RISCVInstrInfo::getOutliningTypeImpl(MachineBasicBlock::iterator &MBBI, // if any possible. if (MO.getTargetFlags() == RISCVII::MO_PCREL_LO && (MI.getMF()->getTarget().getFunctionSections() || F.hasComdat() || - F.hasSection())) + F.hasSection() || F.getSectionPrefix())) return outliner::InstrType::Illegal; } diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86.td b/contrib/llvm-project/llvm/lib/Target/X86/X86.td index 9dafd5e628ca..e82e624f7099 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86.td +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86.td @@ -1543,6 +1543,19 @@ def ProcessorFeatures { FeatureVPOPCNTDQ]; list ZN4Features = !listconcat(ZN3Features, ZN4AdditionalFeatures); + + + list ZN5Tuning = ZN4Tuning; + list ZN5AdditionalFeatures = [FeatureVNNI, + FeatureMOVDIRI, + FeatureMOVDIR64B, + FeatureVP2INTERSECT, + FeaturePREFETCHI, + FeatureAVXVNNI + ]; + list ZN5Features = + !listconcat(ZN4Features, ZN5AdditionalFeatures); + } //===----------------------------------------------------------------------===// @@ -1892,6 +1905,8 @@ def : ProcModel<"znver3", Znver3Model, ProcessorFeatures.ZN3Features, ProcessorFeatures.ZN3Tuning>; def : ProcModel<"znver4", Znver4Model, ProcessorFeatures.ZN4Features, ProcessorFeatures.ZN4Tuning>; +def : ProcModel<"znver5", Znver4Model, ProcessorFeatures.ZN5Features, + ProcessorFeatures.ZN5Tuning>; def : Proc<"geode", [FeatureX87, FeatureCX8, FeatureMMX, FeaturePRFCHW], [TuningSlowUAMem16, TuningInsertVZEROUPPER]>; diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86PfmCounters.td b/contrib/llvm-project/llvm/lib/Target/X86/X86PfmCounters.td index 2b1dac411c99..c30e989cdc2a 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86PfmCounters.td +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86PfmCounters.td @@ -350,3 +350,4 @@ def ZnVer4PfmCounters : ProcPfmCounters { let ValidationCounters = DefaultAMDPfmValidationCounters; } def : PfmCountersBinding<"znver4", ZnVer4PfmCounters>; +def : PfmCountersBinding<"znver5", ZnVer4PfmCounters>; diff --git a/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp b/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp index 7e637cba4cfb..865b6a44adbb 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp @@ -1213,6 +1213,25 @@ static const char *getAMDProcessorTypeAndSubtype(unsigned Family, break; // "znver4" } break; // family 19h + case 26: + CPU = "znver5"; + *Type = X86::AMDFAM1AH; + if (Model <= 0x77) { + // Models 00h-0Fh (Breithorn). + // Models 10h-1Fh (Breithorn-Dense). + // Models 20h-2Fh (Strix 1). + // Models 30h-37h (Strix 2). + // Models 38h-3Fh (Strix 3). + // Models 40h-4Fh (Granite Ridge). + // Models 50h-5Fh (Weisshorn). + // Models 60h-6Fh (Krackan1). + // Models 70h-77h (Sarlak). + CPU = "znver5"; + *Subtype = X86::AMDFAM1AH_ZNVER5; + break; // "znver5" + } + break; + default: break; // Unknown AMD CPU. } diff --git a/contrib/llvm-project/llvm/lib/TargetParser/X86TargetParser.cpp b/contrib/llvm-project/llvm/lib/TargetParser/X86TargetParser.cpp index dcf9130052ac..a6f3b5ba5d33 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/X86TargetParser.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/X86TargetParser.cpp @@ -238,6 +238,10 @@ static constexpr FeatureBitset FeaturesZNVER4 = FeatureAVX512BITALG | FeatureAVX512VPOPCNTDQ | FeatureAVX512BF16 | FeatureGFNI | FeatureSHSTK; +static constexpr FeatureBitset FeaturesZNVER5 = + FeaturesZNVER4 | FeatureAVXVNNI | FeatureMOVDIRI | FeatureMOVDIR64B | + FeatureAVX512VP2INTERSECT | FeaturePREFETCHI | FeatureAVXVNNI; + // D151696 tranplanted Mangling and OnlyForCPUDispatchSpecific from // X86TargetParser.def to here. They are assigned by following ways: // 1. Copy the mangling from the original CPU_SPEICIFC MACROs. If no, assign @@ -417,6 +421,7 @@ constexpr ProcInfo Processors[] = { { {"znver2"}, CK_ZNVER2, FEATURE_AVX2, FeaturesZNVER2, '\0', false }, { {"znver3"}, CK_ZNVER3, FEATURE_AVX2, FeaturesZNVER3, '\0', false }, { {"znver4"}, CK_ZNVER4, FEATURE_AVX512VBMI2, FeaturesZNVER4, '\0', false }, + { {"znver5"}, CK_ZNVER5, FEATURE_AVX512VP2INTERSECT, FeaturesZNVER5, '\0', false }, // Generic 64-bit processor. { {"x86-64"}, CK_x86_64, FEATURE_SSE2 , FeaturesX86_64, '\0', false }, { {"x86-64-v2"}, CK_x86_64_v2, FEATURE_SSE4_2 , FeaturesX86_64_V2, '\0', false }, diff --git a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index cca9eeebaa53..ab2b96cdc42d 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -15211,7 +15211,8 @@ bool BoUpSLP::collectValuesToDemote( if (any_of(E.Scalars, [&](Value *V) { return !all_of(V->users(), [=](User *U) { return getTreeEntry(U) || - (UserIgnoreList && UserIgnoreList->contains(U)) || + (E.Idx == 0 && UserIgnoreList && + UserIgnoreList->contains(U)) || (!isa(U) && U->getType()->isSized() && !U->getType()->isScalableTy() && DL->getTypeSizeInBits(U->getType()) <= BitWidth); @@ -15539,6 +15540,11 @@ void BoUpSLP::computeMinimumValueSizes() { const TreeEntry *UserTE = E.UserTreeIndices.back().UserTE; if (TE == UserTE || !TE) return false; + if (!isa(U) || + !isa(UserTE->getMainOp())) + return true; unsigned UserTESz = DL->getTypeSizeInBits( UserTE->Scalars.front()->getType()); auto It = MinBWs.find(TE); diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index 5c86affe3309..cac840266348 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-19.1.0-rc4-0-g0c641568515a" +#define LLVM_REVISION "llvmorg-19.1.0-0-ga4bf6cd7cfb1" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-19.1.0-rc4-0-g0c641568515a" +#define CLANG_REVISION "llvmorg-19.1.0-0-ga4bf6cd7cfb1" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-19.1.0-rc4-0-g0c641568515a" +#define LLDB_REVISION "llvmorg-19.1.0-0-ga4bf6cd7cfb1" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index 834f0b9f93fb..f5e540cec4fd 100644 --- a/lib/clang/include/clang/Basic/Version.inc *** 69 LINES SKIPPED *** From nobody Sun Dec 1 12:54:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rh61vlZz5fZw9; Sun, 01 Dec 2024 12:54:30 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rh56vh3z4Pg8; Sun, 1 Dec 2024 12:54:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C6ZC6mmG3aqVV8RubKXKNst0G2dEzMZImK5IF+NA3hM=; b=ayRKPtGNzjYgSqafjTRcDoHNoBsZ9p5EjhcCMNZlHNYyj3YHCiNbjDtvMJLVaMLNGaIc9I oQtOpcakmT+anyaDmzMIctNZRItrp98IbEeESIsEqyhplSu38dzWCc0XneEhR2AFXZ5JjF +E/kSsgXabzIUs2NEDVyWEJuk7ZROcJEWRdQjlxJ+8N0MAKmcr4nd5JfM1xJ+V0VglZ0iR 25W6epcITMQDRERHG9doqNCNjii+796jBco5yFUU+ZPPRrmwDC+LIsYD6XsC5Mbg/j4ifE MBOx6ximPlpJyGDy3SO7SqlbmKL96h4n6mVp6QbNvU6aFqAOx+aScClxB0YnPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C6ZC6mmG3aqVV8RubKXKNst0G2dEzMZImK5IF+NA3hM=; b=eKcz5Ch58TMD28zSvIRnnHt/PkcWL508vQJX05bs1YN+6xoTVzyzvH01REV4H1s4oG707D saCXUlXBln7P6patHLg8AFTE3gQ7hz7S93gdG3rZA/bRWADKwBDaoc0b5FZEHNaG2UJbBc B0f3r2fdOkvWVJt6zWMajfYHZMrtvLcDTkBGJP98eP2H6qWaFN0RGfJ9eyC6P03WA4W7o5 q7qmeWjTpVoRsoLbsMgxrvlmih02i0rIDDFtlSbwgNdntIrMkEpdfe1f6q1uEFYNv+GYLT mO6ZF4u/+nVdABgX7asLR3l8ZFeh7WD5yKo6vTg/KfjUvQ03L5fJI0hBVjDCxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057670; a=rsa-sha256; cv=none; b=gVsk9hThTrcERfjUmTdszy3/f9Z8bU1uNjZU2KtpZhwrUIQDvCYLMfZAn6RtjIPL8t8p1T lMvKrNWb4lQiVS0e8WBgiW+pwsT5bi62iE5YY0IqUg/zUoP3l5Ly9fqtFqqc3USkvNBXKM K18Pz4bwJcqtSfaPrm9plcVcsYTUHw933JWIfjv1Gm6GzMGzrf9tUMVXNVpMwxOy/rJmS9 mUfCi/NxBgeXcUDKV/JSs1NmmLOyhkxtTX1QWtsaMuy6xoaA5QOsMP60JTn+YSAMjBKZsg C/rrOsCJ2HCSDS/SKpay7gvaEBNJ2PWE6BaYWtrrdjeQ0iMhwOgrpXBmakSPWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rh56Ng7ztQB; Sun, 1 Dec 2024 12:54:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsTbF094413; Sun, 1 Dec 2024 12:54:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsTap094410; Sun, 1 Dec 2024 12:54:29 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:29 GMT Message-Id: <202412011254.4B1CsTap094410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: d5a0bcbae311 - stable/13 - Merge llvm-project release/19.x llvmorg-19.1.1-0-gd401987fe349 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d5a0bcbae311f812970479c1403726dd55216738 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d5a0bcbae311f812970479c1403726dd55216738 commit d5a0bcbae311f812970479c1403726dd55216738 Author: Dimitry Andric AuthorDate: 2024-10-08 17:05:26 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:45 +0000 Merge llvm-project release/19.x llvmorg-19.1.1-0-gd401987fe349 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.1-0-gd401987fe349, a.k.a. 19.1.1 release. PR: 280562 MFC after: 1 month (cherry picked from commit 6e516c87b6d779911edde7481d8aef165b837a03) --- .../clang/include/clang/AST/DeclBase.h | 3 + .../include/clang/Tooling/CompilationDatabase.h | 6 ++ contrib/llvm-project/clang/lib/AST/DeclBase.cpp | 4 ++ .../clang/lib/CodeGen/CGExprScalar.cpp | 26 ++++--- .../clang/lib/Driver/ToolChains/Clang.cpp | 26 +++++++ .../clang/lib/Format/FormatTokenLexer.cpp | 7 ++ .../clang/lib/Format/TokenAnnotator.cpp | 5 -- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 26 ++++++- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 3 +- .../lib/Tooling/LocateToolCompilationDatabase.cpp | 71 ++++++++++++++++++ .../lib/sanitizer_common/sanitizer_linux.cpp | 12 ++++ contrib/llvm-project/libcxx/include/__config | 2 +- .../vendor/llvm/default_assertion_handler.in | 3 +- contrib/llvm-project/lld/ELF/ICF.cpp | 4 +- contrib/llvm-project/lld/ELF/InputSection.cpp | 6 +- contrib/llvm-project/lld/ELF/InputSection.h | 4 ++ .../llvm/include/llvm/Analysis/AliasAnalysis.h | 2 +- .../llvm/lib/Analysis/AliasAnalysis.cpp | 2 + .../llvm-project/llvm/lib/CodeGen/InitUndef.cpp | 1 + .../llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 83 +++++++++++++--------- .../llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 3 +- .../llvm/lib/ExecutionEngine/Orc/Core.cpp | 15 ++++ .../llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp | 6 +- .../llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp | 9 ++- .../lib/Target/LoongArch/LoongArchISelLowering.cpp | 6 +- .../lib/Target/LoongArch/LoongArchInstrInfo.td | 5 +- .../lib/Target/LoongArch/LoongArchLASXInstrInfo.td | 6 ++ .../lib/Target/LoongArch/LoongArchOptWInstrs.cpp | 15 ++++ .../llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp | 3 +- .../llvm/lib/Target/X86/X86ISelLowering.cpp | 2 +- .../llvm/lib/Target/X86/X86InstrAVX512.td | 4 +- .../llvm/lib/Transforms/Utils/InlineFunction.cpp | 20 ++++-- .../llvm/lib/Transforms/Utils/LoopPeel.cpp | 2 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 40 files changed, 330 insertions(+), 92 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/AST/DeclBase.h b/contrib/llvm-project/clang/include/clang/AST/DeclBase.h index 2a4bd0f9c2fd..04dbd1db6cba 100644 --- a/contrib/llvm-project/clang/include/clang/AST/DeclBase.h +++ b/contrib/llvm-project/clang/include/clang/AST/DeclBase.h @@ -680,6 +680,9 @@ public: /// Whether this declaration comes from explicit global module. bool isFromExplicitGlobalModule() const; + /// Whether this declaration comes from global module. + bool isFromGlobalModule() const; + /// Whether this declaration comes from a named module. bool isInNamedModule() const; diff --git a/contrib/llvm-project/clang/include/clang/Tooling/CompilationDatabase.h b/contrib/llvm-project/clang/include/clang/Tooling/CompilationDatabase.h index fee584acb486..36fe0812ebe9 100644 --- a/contrib/llvm-project/clang/include/clang/Tooling/CompilationDatabase.h +++ b/contrib/llvm-project/clang/include/clang/Tooling/CompilationDatabase.h @@ -234,6 +234,12 @@ std::unique_ptr std::unique_ptr inferTargetAndDriverMode(std::unique_ptr Base); +/// Returns a wrapped CompilationDatabase that will transform argv[0] to an +/// absolute path, if it currently is a plain tool name, looking it up in +/// PATH. +std::unique_ptr +inferToolLocation(std::unique_ptr Base); + /// Returns a wrapped CompilationDatabase that will expand all rsp(response) /// files on commandline returned by underlying database. std::unique_ptr diff --git a/contrib/llvm-project/clang/lib/AST/DeclBase.cpp b/contrib/llvm-project/clang/lib/AST/DeclBase.cpp index b59f118380ca..c4e948a38e26 100644 --- a/contrib/llvm-project/clang/lib/AST/DeclBase.cpp +++ b/contrib/llvm-project/clang/lib/AST/DeclBase.cpp @@ -1161,6 +1161,10 @@ bool Decl::isFromExplicitGlobalModule() const { return getOwningModule() && getOwningModule()->isExplicitGlobalModule(); } +bool Decl::isFromGlobalModule() const { + return getOwningModule() && getOwningModule()->isGlobalModule(); +} + bool Decl::isInNamedModule() const { return getOwningModule() && getOwningModule()->isNamedModule(); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp index a17d68424bbc..6e212e74676e 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp @@ -2833,18 +2833,22 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV, llvm::AtomicOrdering::SequentiallyConsistent); return isPre ? Builder.CreateBinOp(op, old, amt) : old; } - // Special case for atomic increment/decrement on floats + // Special case for atomic increment/decrement on floats. + // Bail out non-power-of-2-sized floating point types (e.g., x86_fp80). if (type->isFloatingType()) { - llvm::AtomicRMWInst::BinOp aop = - isInc ? llvm::AtomicRMWInst::FAdd : llvm::AtomicRMWInst::FSub; - llvm::Instruction::BinaryOps op = - isInc ? llvm::Instruction::FAdd : llvm::Instruction::FSub; - llvm::Value *amt = llvm::ConstantFP::get( - VMContext, llvm::APFloat(static_cast(1.0))); - llvm::Value *old = - Builder.CreateAtomicRMW(aop, LV.getAddress(), amt, - llvm::AtomicOrdering::SequentiallyConsistent); - return isPre ? Builder.CreateBinOp(op, old, amt) : old; + llvm::Type *Ty = ConvertType(type); + if (llvm::has_single_bit(Ty->getScalarSizeInBits())) { + llvm::AtomicRMWInst::BinOp aop = + isInc ? llvm::AtomicRMWInst::FAdd : llvm::AtomicRMWInst::FSub; + llvm::Instruction::BinaryOps op = + isInc ? llvm::Instruction::FAdd : llvm::Instruction::FSub; + llvm::Value *amt = llvm::ConstantFP::get(Ty, 1.0); + llvm::AtomicRMWInst *old = Builder.CreateAtomicRMW( + aop, LV.getAddress(), amt, + llvm::AtomicOrdering::SequentiallyConsistent); + + return isPre ? Builder.CreateBinOp(op, old, amt) : old; + } } value = EmitLoadOfLValue(LV, E->getExprLoc()); input = value; diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp index 366b147a052b..8858c318aba7 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp @@ -8561,6 +8561,32 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA, WantDebug = !A->getOption().matches(options::OPT_g0) && !A->getOption().matches(options::OPT_ggdb0); + // If a -gdwarf argument appeared, remember it. + bool EmitDwarf = false; + if (const Arg *A = getDwarfNArg(Args)) + EmitDwarf = checkDebugInfoOption(A, Args, D, getToolChain()); + + bool EmitCodeView = false; + if (const Arg *A = Args.getLastArg(options::OPT_gcodeview)) + EmitCodeView = checkDebugInfoOption(A, Args, D, getToolChain()); + + // If the user asked for debug info but did not explicitly specify -gcodeview + // or -gdwarf, ask the toolchain for the default format. + if (!EmitCodeView && !EmitDwarf && WantDebug) { + switch (getToolChain().getDefaultDebugFormat()) { + case llvm::codegenoptions::DIF_CodeView: + EmitCodeView = true; + break; + case llvm::codegenoptions::DIF_DWARF: + EmitDwarf = true; + break; + } + } + + // If the arguments don't imply DWARF, don't emit any debug info here. + if (!EmitDwarf) + WantDebug = false; + llvm::codegenoptions::DebugInfoKind DebugInfoKind = llvm::codegenoptions::NoDebugInfo; diff --git a/contrib/llvm-project/clang/lib/Format/FormatTokenLexer.cpp b/contrib/llvm-project/clang/lib/Format/FormatTokenLexer.cpp index e21b5a882b77..63949b2e26bd 100644 --- a/contrib/llvm-project/clang/lib/Format/FormatTokenLexer.cpp +++ b/contrib/llvm-project/clang/lib/Format/FormatTokenLexer.cpp @@ -100,6 +100,13 @@ ArrayRef FormatTokenLexer::lex() { if (Tokens.back()->NewlinesBefore > 0 || Tokens.back()->IsMultiline) FirstInLineIndex = Tokens.size() - 1; } while (Tokens.back()->isNot(tok::eof)); + if (Style.InsertNewlineAtEOF) { + auto &TokEOF = *Tokens.back(); + if (TokEOF.NewlinesBefore == 0) { + TokEOF.NewlinesBefore = 1; + TokEOF.OriginalColumn = 0; + } + } return Tokens; } diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 3f00a28e6298..4512e539cc79 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -3680,11 +3680,6 @@ void TokenAnnotator::annotate(AnnotatedLine &Line) { auto *First = Line.First; First->SpacesRequiredBefore = 1; First->CanBreakBefore = First->MustBreakBefore; - - if (First->is(tok::eof) && First->NewlinesBefore == 0 && - Style.InsertNewlineAtEOF) { - First->NewlinesBefore = 1; - } } // This function heuristically determines whether 'Current' starts the name of a diff --git a/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp b/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp index c34d32002b5a..244f6ef2f53f 100755 --- a/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp @@ -969,8 +969,30 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( // equivalence. LocalInstantiationScope ScopeForParameters(S); if (auto *FD = DeclInfo.getDecl()->getAsFunction()) - for (auto *PVD : FD->parameters()) - ScopeForParameters.InstantiatedLocal(PVD, PVD); + for (auto *PVD : FD->parameters()) { + if (!PVD->isParameterPack()) { + ScopeForParameters.InstantiatedLocal(PVD, PVD); + continue; + } + // This is hacky: we're mapping the parameter pack to a size-of-1 argument + // to avoid building SubstTemplateTypeParmPackTypes for + // PackExpansionTypes. The SubstTemplateTypeParmPackType node would + // otherwise reference the AssociatedDecl of the template arguments, which + // is, in this case, the template declaration. + // + // However, as we are in the process of comparing potential + // re-declarations, the canonical declaration is the declaration itself at + // this point. So if we didn't expand these packs, we would end up with an + // incorrect profile difference because we will be profiling the + // canonical types! + // + // FIXME: Improve the "no-transform" machinery in FindInstantiatedDecl so + // that we can eliminate the Scope in the cases where the declarations are + // not necessarily instantiated. It would also benefit the noexcept + // specifier comparison. + ScopeForParameters.MakeInstantiatedLocalArgPack(PVD); + ScopeForParameters.InstantiatedLocalPackArg(PVD, PVD); + } std::optional ThisScope; diff --git a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp index d608dd92a4b4..717ddb833958 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp @@ -9732,8 +9732,9 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, // the function decl is created above). // FIXME: We need a better way to separate C++ standard and clang modules. bool ImplicitInlineCXX20 = !getLangOpts().CPlusPlusModules || + NewFD->isConstexpr() || NewFD->isConsteval() || !NewFD->getOwningModule() || - NewFD->isFromExplicitGlobalModule() || + NewFD->isFromGlobalModule() || NewFD->getOwningModule()->isHeaderLikeModule(); bool isInline = D.getDeclSpec().isInlineSpecified(); bool isVirtual = D.getDeclSpec().isVirtualSpecified(); diff --git a/contrib/llvm-project/clang/lib/Tooling/LocateToolCompilationDatabase.cpp b/contrib/llvm-project/clang/lib/Tooling/LocateToolCompilationDatabase.cpp new file mode 100644 index 000000000000..033f69f3760c --- /dev/null +++ b/contrib/llvm-project/clang/lib/Tooling/LocateToolCompilationDatabase.cpp @@ -0,0 +1,71 @@ +//===- GuessTargetAndModeCompilationDatabase.cpp --------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "clang/Tooling/CompilationDatabase.h" +#include "clang/Tooling/Tooling.h" +#include "llvm/Support/Path.h" +#include "llvm/Support/Program.h" +#include + +namespace clang { +namespace tooling { + +namespace { +class LocationAdderDatabase : public CompilationDatabase { +public: + LocationAdderDatabase(std::unique_ptr Base) + : Base(std::move(Base)) { + assert(this->Base != nullptr); + } + + std::vector getAllFiles() const override { + return Base->getAllFiles(); + } + + std::vector getAllCompileCommands() const override { + return addLocation(Base->getAllCompileCommands()); + } + + std::vector + getCompileCommands(StringRef FilePath) const override { + return addLocation(Base->getCompileCommands(FilePath)); + } + +private: + std::vector + addLocation(std::vector Cmds) const { + for (auto &Cmd : Cmds) { + if (Cmd.CommandLine.empty()) + continue; + std::string &Driver = Cmd.CommandLine.front(); + // If the driver name already is absolute, we don't need to do anything. + if (llvm::sys::path::is_absolute(Driver)) + continue; + // If the name is a relative path, like bin/clang, we assume it's + // possible to resolve it and don't do anything about it either. + if (llvm::any_of(Driver, + [](char C) { return llvm::sys::path::is_separator(C); })) + continue; + auto Absolute = llvm::sys::findProgramByName(Driver); + // If we found it in path, update the entry in Cmd.CommandLine + if (Absolute && llvm::sys::path::is_absolute(*Absolute)) + Driver = std::move(*Absolute); + } + return Cmds; + } + std::unique_ptr Base; +}; +} // namespace + +std::unique_ptr +inferToolLocation(std::unique_ptr Base) { + return std::make_unique(std::move(Base)); +} + +} // namespace tooling +} // namespace clang diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp index 648df0c4e5a7..b9b1f496df7c 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp @@ -2014,6 +2014,18 @@ SignalContext::WriteFlag SignalContext::GetWriteFlag() const { return Unknown; return esr & ESR_ELx_WNR ? Write : Read; # elif defined(__loongarch__) + // In the musl environment, the Linux kernel uapi sigcontext.h is not + // included in signal.h. To avoid missing the SC_ADDRERR_{RD,WR} macros, + // copy them here. The LoongArch Linux kernel uapi is already stable, + // so there's no need to worry about the value changing. +# ifndef SC_ADDRERR_RD + // Address error was due to memory load +# define SC_ADDRERR_RD (1 << 30) +# endif +# ifndef SC_ADDRERR_WR + // Address error was due to memory store +# define SC_ADDRERR_WR (1 << 31) +# endif u32 flags = ucontext->uc_mcontext.__flags; if (flags & SC_ADDRERR_RD) return SignalContext::Read; diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index f44f18d52099..8301fec2b3d7 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -27,7 +27,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 190100 +# define _LIBCPP_VERSION 190101 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/libcxx/vendor/llvm/default_assertion_handler.in b/contrib/llvm-project/libcxx/vendor/llvm/default_assertion_handler.in index 3b6d6b2cca53..e12ccccdaff3 100644 --- a/contrib/llvm-project/libcxx/vendor/llvm/default_assertion_handler.in +++ b/contrib/llvm-project/libcxx/vendor/llvm/default_assertion_handler.in @@ -26,7 +26,8 @@ # if __has_builtin(__builtin_verbose_trap) // AppleClang shipped a slightly different version of __builtin_verbose_trap from the upstream // version before upstream Clang actually got the builtin. -# if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 17000 +// TODO: Remove once AppleClang supports the two-arguments version of the builtin. +# if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1700 # define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap(message) # else # define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap("libc++", message) diff --git a/contrib/llvm-project/lld/ELF/ICF.cpp b/contrib/llvm-project/lld/ELF/ICF.cpp index 44e8a71cc628..5591c5e71e0b 100644 --- a/contrib/llvm-project/lld/ELF/ICF.cpp +++ b/contrib/llvm-project/lld/ELF/ICF.cpp @@ -324,7 +324,7 @@ bool ICF::equalsConstant(const InputSection *a, const InputSection *b) { const RelsOrRelas ra = a->template relsOrRelas(); const RelsOrRelas rb = b->template relsOrRelas(); - if (ra.areRelocsCrel()) + if (ra.areRelocsCrel() || rb.areRelocsCrel()) return constantEq(a, ra.crels, b, rb.crels); return ra.areRelocsRel() || rb.areRelocsRel() ? constantEq(a, ra.rels, b, rb.rels) @@ -376,7 +376,7 @@ template bool ICF::equalsVariable(const InputSection *a, const InputSection *b) { const RelsOrRelas ra = a->template relsOrRelas(); const RelsOrRelas rb = b->template relsOrRelas(); - if (ra.areRelocsCrel()) + if (ra.areRelocsCrel() || rb.areRelocsCrel()) return variableEq(a, ra.crels, b, rb.crels); return ra.areRelocsRel() || rb.areRelocsRel() ? variableEq(a, ra.rels, b, rb.rels) diff --git a/contrib/llvm-project/lld/ELF/InputSection.cpp b/contrib/llvm-project/lld/ELF/InputSection.cpp index 570e485455ba..a165c813d425 100644 --- a/contrib/llvm-project/lld/ELF/InputSection.cpp +++ b/contrib/llvm-project/lld/ELF/InputSection.cpp @@ -150,12 +150,12 @@ RelsOrRelas InputSectionBase::relsOrRelas(bool supportsCrel) const { InputSectionBase *const &relSec = f->getSections()[relSecIdx]; // Otherwise, allocate a buffer to hold the decoded RELA relocations. When // called for the first time, relSec is null (without --emit-relocs) or an - // InputSection with zero eqClass[0]. - if (!relSec || !cast(relSec)->eqClass[0]) { + // InputSection with false decodedCrel. + if (!relSec || !cast(relSec)->decodedCrel) { auto *sec = makeThreadLocal(*f, shdr, name); f->cacheDecodedCrel(relSecIdx, sec); sec->type = SHT_RELA; - sec->eqClass[0] = SHT_RELA; + sec->decodedCrel = true; RelocsCrel entries(sec->content_); sec->size = entries.size() * sizeof(typename ELFT::Rela); diff --git a/contrib/llvm-project/lld/ELF/InputSection.h b/contrib/llvm-project/lld/ELF/InputSection.h index 6659530a9c9c..afa6ee5bd082 100644 --- a/contrib/llvm-project/lld/ELF/InputSection.h +++ b/contrib/llvm-project/lld/ELF/InputSection.h @@ -176,6 +176,10 @@ public: mutable bool compressed = false; + // Whether this section is SHT_CREL and has been decoded to RELA by + // relsOrRelas. + bool decodedCrel = false; + // Whether the section needs to be padded with a NOP filler due to // deleteFallThruJmpInsn. bool nopFiller = false; diff --git a/contrib/llvm-project/llvm/include/llvm/Analysis/AliasAnalysis.h b/contrib/llvm-project/llvm/include/llvm/Analysis/AliasAnalysis.h index 4140387a1f34..1b5a6ee24b86 100644 --- a/contrib/llvm-project/llvm/include/llvm/Analysis/AliasAnalysis.h +++ b/contrib/llvm-project/llvm/include/llvm/Analysis/AliasAnalysis.h @@ -320,7 +320,7 @@ class AAResults { public: // Make these results default constructable and movable. We have to spell // these out because MSVC won't synthesize them. - AAResults(const TargetLibraryInfo &TLI) : TLI(TLI) {} + AAResults(const TargetLibraryInfo &TLI); AAResults(AAResults &&Arg); ~AAResults(); diff --git a/contrib/llvm-project/llvm/lib/Analysis/AliasAnalysis.cpp b/contrib/llvm-project/llvm/lib/Analysis/AliasAnalysis.cpp index 6eaaad5f332e..9cdb315b6088 100644 --- a/contrib/llvm-project/llvm/lib/Analysis/AliasAnalysis.cpp +++ b/contrib/llvm-project/llvm/lib/Analysis/AliasAnalysis.cpp @@ -73,6 +73,8 @@ static cl::opt EnableAATrace("aa-trace", cl::Hidden, cl::init(false)); static const bool EnableAATrace = false; #endif +AAResults::AAResults(const TargetLibraryInfo &TLI) : TLI(TLI) {} + AAResults::AAResults(AAResults &&Arg) : TLI(Arg.TLI), AAs(std::move(Arg.AAs)), AADeps(std::move(Arg.AADeps)) {} diff --git a/contrib/llvm-project/llvm/lib/CodeGen/InitUndef.cpp b/contrib/llvm-project/llvm/lib/CodeGen/InitUndef.cpp index 51c50ff872ef..8f25ede0eb2b 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/InitUndef.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/InitUndef.cpp @@ -272,6 +272,7 @@ bool InitUndef::runOnMachineFunction(MachineFunction &MF) { for (auto *DeadMI : DeadInsts) DeadMI->eraseFromParent(); DeadInsts.clear(); + NewRegs.clear(); return Changed; } diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 71cdec91e5f6..7b1f1dc40211 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -191,6 +191,11 @@ namespace { // AA - Used for DAG load/store alias analysis. AliasAnalysis *AA; + /// This caches all chains that have already been processed in + /// DAGCombiner::getStoreMergeCandidates() and found to have no mergeable + /// stores candidates. + SmallPtrSet ChainsWithoutMergeableStores; + /// When an instruction is simplified, add all users of the instruction to /// the work lists because they might get more simplified now. void AddUsersToWorklist(SDNode *N) { @@ -776,11 +781,10 @@ namespace { bool UseTrunc); /// This is a helper function for mergeConsecutiveStores. Stores that - /// potentially may be merged with St are placed in StoreNodes. RootNode is - /// a chain predecessor to all store candidates. - void getStoreMergeCandidates(StoreSDNode *St, - SmallVectorImpl &StoreNodes, - SDNode *&Root); + /// potentially may be merged with St are placed in StoreNodes. On success, + /// returns a chain predecessor to all store candidates. + SDNode *getStoreMergeCandidates(StoreSDNode *St, + SmallVectorImpl &StoreNodes); /// Helper function for mergeConsecutiveStores. Checks if candidate stores /// have indirect dependency through their operands. RootNode is the @@ -1782,6 +1786,9 @@ void DAGCombiner::Run(CombineLevel AtLevel) { ++NodesCombined; + // Invalidate cached info. + ChainsWithoutMergeableStores.clear(); + // If we get back the same node we passed in, rather than a new node or // zero, we know that the node must have defined multiple values and // CombineTo was used. Since CombineTo takes care of the worklist @@ -20372,15 +20379,15 @@ bool DAGCombiner::mergeStoresOfConstantsOrVecElts( return true; } -void DAGCombiner::getStoreMergeCandidates( - StoreSDNode *St, SmallVectorImpl &StoreNodes, - SDNode *&RootNode) { +SDNode * +DAGCombiner::getStoreMergeCandidates(StoreSDNode *St, + SmallVectorImpl &StoreNodes) { // This holds the base pointer, index, and the offset in bytes from the base // pointer. We must have a base and an offset. Do not handle stores to undef // base pointers. BaseIndexOffset BasePtr = BaseIndexOffset::match(St, DAG); if (!BasePtr.getBase().getNode() || BasePtr.getBase().isUndef()) - return; + return nullptr; SDValue Val = peekThroughBitcasts(St->getValue()); StoreSource StoreSrc = getStoreSource(Val); @@ -20396,14 +20403,14 @@ void DAGCombiner::getStoreMergeCandidates( LoadVT = Ld->getMemoryVT(); // Load and store should be the same type. if (MemVT != LoadVT) - return; + return nullptr; // Loads must only have one use. if (!Ld->hasNUsesOfValue(1, 0)) - return; + return nullptr; // The memory operands must not be volatile/indexed/atomic. // TODO: May be able to relax for unordered atomics (see D66309) if (!Ld->isSimple() || Ld->isIndexed()) - return; + return nullptr; } auto CandidateMatch = [&](StoreSDNode *Other, BaseIndexOffset &Ptr, int64_t &Offset) -> bool { @@ -20471,6 +20478,27 @@ void DAGCombiner::getStoreMergeCandidates( return (BasePtr.equalBaseIndex(Ptr, DAG, Offset)); }; + // We are looking for a root node which is an ancestor to all mergable + // stores. We search up through a load, to our root and then down + // through all children. For instance we will find Store{1,2,3} if + // St is Store1, Store2. or Store3 where the root is not a load + // which always true for nonvolatile ops. TODO: Expand + // the search to find all valid candidates through multiple layers of loads. + // + // Root + // |-------|-------| + // Load Load Store3 + // | | + // Store1 Store2 + // + // FIXME: We should be able to climb and + // descend TokenFactors to find candidates as well. + + SDNode *RootNode = St->getChain().getNode(); + // Bail out if we already analyzed this root node and found nothing. + if (ChainsWithoutMergeableStores.contains(RootNode)) + return nullptr; + // Check if the pair of StoreNode and the RootNode already bail out many // times which is over the limit in dependence check. auto OverLimitInDependenceCheck = [&](SDNode *StoreNode, @@ -20494,28 +20522,13 @@ void DAGCombiner::getStoreMergeCandidates( } }; - // We looking for a root node which is an ancestor to all mergable - // stores. We search up through a load, to our root and then down - // through all children. For instance we will find Store{1,2,3} if - // St is Store1, Store2. or Store3 where the root is not a load - // which always true for nonvolatile ops. TODO: Expand - // the search to find all valid candidates through multiple layers of loads. - // - // Root - // |-------|-------| - // Load Load Store3 - // | | - // Store1 Store2 - // - // FIXME: We should be able to climb and - // descend TokenFactors to find candidates as well. - - RootNode = St->getChain().getNode(); - unsigned NumNodesExplored = 0; const unsigned MaxSearchNodes = 1024; if (auto *Ldn = dyn_cast(RootNode)) { RootNode = Ldn->getChain().getNode(); + // Bail out if we already analyzed this root node and found nothing. + if (ChainsWithoutMergeableStores.contains(RootNode)) + return nullptr; for (auto I = RootNode->use_begin(), E = RootNode->use_end(); I != E && NumNodesExplored < MaxSearchNodes; ++I, ++NumNodesExplored) { if (I.getOperandNo() == 0 && isa(*I)) { // walk down chain @@ -20532,6 +20545,8 @@ void DAGCombiner::getStoreMergeCandidates( I != E && NumNodesExplored < MaxSearchNodes; ++I, ++NumNodesExplored) TryToAddCandidate(I); } + + return RootNode; } // We need to check that merging these stores does not cause a loop in the @@ -21162,9 +21177,8 @@ bool DAGCombiner::mergeConsecutiveStores(StoreSDNode *St) { return false; SmallVector StoreNodes; - SDNode *RootNode; // Find potential store merge candidates by searching through chain sub-DAG - getStoreMergeCandidates(St, StoreNodes, RootNode); + SDNode *RootNode = getStoreMergeCandidates(St, StoreNodes); // Check if there is anything to merge. if (StoreNodes.size() < 2) @@ -21220,6 +21234,11 @@ bool DAGCombiner::mergeConsecutiveStores(StoreSDNode *St) { llvm_unreachable("Unhandled store source type"); } } + + // Remember if we failed to optimize, to save compile time. + if (!MadeChange) + ChainsWithoutMergeableStores.insert(RootNode); + return MadeChange; } diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 7f5b46af01c6..4b25f553ffae 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -2190,7 +2190,8 @@ void SelectionDAGLegalize::ExpandFPLibCall(SDNode* Node, Results.push_back(Tmp.first); Results.push_back(Tmp.second); } else { - SDValue Tmp = ExpandLibCall(LC, Node, false).first; + bool IsSignedArgument = Node->getOpcode() == ISD::FLDEXP; + SDValue Tmp = ExpandLibCall(LC, Node, IsSignedArgument).first; Results.push_back(Tmp); } } diff --git a/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/Core.cpp b/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/Core.cpp index 3e6de62c8b7d..f70c2890521d 100644 --- a/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/Core.cpp +++ b/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/Core.cpp @@ -3592,6 +3592,21 @@ ExecutionSession::IL_failSymbols(JITDylib &JD, assert(MI.DefiningEDU->Symbols.count(NonOwningSymbolStringPtr(Name)) && "Symbol does not appear in its DefiningEDU"); MI.DefiningEDU->Symbols.erase(NonOwningSymbolStringPtr(Name)); + + // Remove this EDU from the dependants lists of its dependencies. + for (auto &[DepJD, DepSyms] : MI.DefiningEDU->Dependencies) { + for (auto DepSym : DepSyms) { + assert(DepJD->Symbols.count(SymbolStringPtr(DepSym)) && + "DepSym not in DepJD"); + assert(DepJD->MaterializingInfos.count(SymbolStringPtr(DepSym)) && + "DepSym has not MaterializingInfo"); + auto &SymMI = DepJD->MaterializingInfos[SymbolStringPtr(DepSym)]; + assert(SymMI.DependantEDUs.count(MI.DefiningEDU.get()) && + "DefiningEDU missing from DependantEDUs list of dependency"); + SymMI.DependantEDUs.erase(MI.DefiningEDU.get()); + } + } + MI.DefiningEDU = nullptr; } else { // Otherwise if there are any EDUs waiting on this symbol then move diff --git a/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp b/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp index b7471bab1285..7b786ee26417 100644 --- a/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp @@ -1911,7 +1911,7 @@ bool AMDGPUDAGToDAGISel::SelectScratchSAddr(SDNode *Parent, SDValue Addr, 0); } - Offset = CurDAG->getTargetConstant(COffsetVal, DL, MVT::i16); + Offset = CurDAG->getTargetConstant(COffsetVal, DL, MVT::i32); return true; } @@ -1967,7 +1967,7 @@ bool AMDGPUDAGToDAGISel::SelectScratchSVAddr(SDNode *N, SDValue Addr, return false; if (checkFlatScratchSVSSwizzleBug(VAddr, SAddr, SplitImmOffset)) return false; - Offset = CurDAG->getTargetConstant(SplitImmOffset, SDLoc(), MVT::i16); + Offset = CurDAG->getTargetConstant(SplitImmOffset, SDLoc(), MVT::i32); return true; } } @@ -2000,7 +2000,7 @@ bool AMDGPUDAGToDAGISel::SelectScratchSVAddr(SDNode *N, SDValue Addr, if (checkFlatScratchSVSSwizzleBug(VAddr, SAddr, ImmOffset)) return false; SAddr = SelectSAddrFI(CurDAG, SAddr); - Offset = CurDAG->getTargetConstant(ImmOffset, SDLoc(), MVT::i16); + Offset = CurDAG->getTargetConstant(ImmOffset, SDLoc(), MVT::i32); return true; } diff --git a/contrib/llvm-project/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp b/contrib/llvm-project/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp index 77db876d47e4..a8927d834630 100644 --- a/contrib/llvm-project/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp @@ -122,8 +122,13 @@ bool AVRDAGToDAGISel::SelectAddr(SDNode *Op, SDValue N, SDValue &Base, // offset allowed. MVT VT = cast(Op)->getMemoryVT().getSimpleVT(); - // We only accept offsets that fit in 6 bits (unsigned). - if (isUInt<6>(RHSC) && (VT == MVT::i8 || VT == MVT::i16)) { + // We only accept offsets that fit in 6 bits (unsigned), with the exception + // of 16-bit loads - those can only go up to 62, because we desugar them + // into a pair of 8-bit loads like `ldd rx, RHSC` + `ldd ry, RHSC + 1`. + bool OkI8 = VT == MVT::i8 && RHSC <= 63; + bool OkI16 = VT == MVT::i16 && RHSC <= 62; + + if (OkI8 || OkI16) { Base = N.getOperand(0); Disp = CurDAG->getTargetConstant(RHSC, dl, MVT::i8); diff --git a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp index d80509cf3984..082b42398c6a 100644 --- a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp @@ -295,6 +295,7 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM, setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Custom); setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Custom); setOperationAction(ISD::BUILD_VECTOR, VT, Custom); + setOperationAction(ISD::CONCAT_VECTORS, VT, Legal); setOperationAction(ISD::SETCC, VT, Legal); setOperationAction(ISD::VSELECT, VT, Legal); @@ -5600,8 +5601,9 @@ bool LoongArchTargetLowering::shouldInsertFencesForAtomic( // On LA64, atomic store operations with IntegerBitWidth of 32 and 64 do not // require fences beacuse we can use amswap_db.[w/d]. - if (isa(I)) { - unsigned Size = I->getOperand(0)->getType()->getIntegerBitWidth(); + Type *Ty = I->getOperand(0)->getType(); + if (isa(I) && Ty->isIntegerTy()) { + unsigned Size = Ty->getIntegerBitWidth(); return (Size == 8 || Size == 16); } diff --git a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchInstrInfo.td b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchInstrInfo.td index ef647a427787..339d50bd8192 100644 --- a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchInstrInfo.td +++ b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchInstrInfo.td @@ -1065,10 +1065,13 @@ def RDTIME_D : RDTIME_2R<0x00006800>; /// Generic pattern classes +def assertsexti32 : PatFrag<(ops node:$src), (assertsext node:$src), [{ + return cast(N->getOperand(1))->getVT().bitsLE(MVT::i32); +}]>; class PatGprGpr : Pat<(OpNode GPR:$rj, GPR:$rk), (Inst GPR:$rj, GPR:$rk)>; class PatGprGpr_32 - : Pat<(sext_inreg (OpNode GPR:$rj, GPR:$rk), i32), (Inst GPR:$rj, GPR:$rk)>; + : Pat<(sext_inreg (OpNode (assertsexti32 GPR:$rj), (assertsexti32 GPR:$rk)), i32), (Inst GPR:$rj, GPR:$rk)>; class PatGpr : Pat<(OpNode GPR:$rj), (Inst GPR:$rj)>; diff --git a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td index 6f1969bf8cae..0a220a0319bc 100644 --- a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td +++ b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td @@ -1789,6 +1789,12 @@ def : Pat<(v4i32 (fp_to_uint (v4f64 LASX256:$vj))), v4f64:$vj)), sub_128)>; +// XVPERMI_Q +foreach vt = [v32i8, v16i16, v8i32, v4i64, v8f32, v4f64] in +def : Pat<(vt (concat_vectors LSX128:$vd, LSX128:$vj)), + (XVPERMI_Q (SUBREG_TO_REG (i64 0), LSX128:$vd, sub_128), + (SUBREG_TO_REG (i64 0), LSX128:$vj, sub_128), 2)>; + } // Predicates = [HasExtLASX] /// Intrinsic pattern diff --git a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp index abac69054f3b..ab90409fdf47 100644 --- a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp +++ b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp @@ -637,6 +637,19 @@ static bool isSignExtendedW(Register SrcReg, const LoongArchSubtarget &ST, break; } return false; + // If all incoming values are sign-extended and all users only use + // the lower 32 bits, then convert them to W versions. + case LoongArch::DIV_D: { + if (!AddRegToWorkList(MI->getOperand(1).getReg())) + return false; + if (!AddRegToWorkList(MI->getOperand(2).getReg())) + return false; + if (hasAllWUsers(*MI, ST, MRI)) { + FixableDef.insert(MI); + break; + } + return false; + } } } @@ -651,6 +664,8 @@ static unsigned getWOp(unsigned Opcode) { return LoongArch::ADDI_W; case LoongArch::ADD_D: return LoongArch::ADD_W; + case LoongArch::DIV_D: + return LoongArch::DIV_W; case LoongArch::LD_D: case LoongArch::LD_WU: return LoongArch::LD_W; diff --git a/contrib/llvm-project/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp b/contrib/llvm-project/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp index c7f88fed9b12..efbcb57add98 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/contrib/llvm-project/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -2707,7 +2707,8 @@ bool X86AsmParser::parseIntelOperand(OperandVector &Operands, StringRef Name) { bool MaybeDirectBranchDest = true; if (Parser.isParsingMasm()) { - if (is64BitMode() && SM.getElementSize() > 0) { + if (is64BitMode() && + ((PtrInOperand && !IndexReg) || SM.getElementSize() > 0)) { DefaultBaseReg = X86::RIP; } if (IsUnconditionalBranch) { diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp index 5a9d679d7002..45989bcd07d3 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -3415,7 +3415,7 @@ unsigned X86TargetLowering::preferedOpcodeForCmpEqPiecesOfOperand( // We prefer rotate for vectors of if we won't get a zext mask with SRL // (PreferRotate will be set in the latter case). - if (PreferRotate || VT.isVector()) + if (PreferRotate || !MayTransformRotate || VT.isVector()) return ShiftOpc; // Non-vector type and we have a zext mask with SRL. diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td b/contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td index da690aea43f5..cc1f9090c11a 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td @@ -2625,11 +2625,11 @@ multiclass avx512_mask_mov opc_kk, bits<8> opc_km, bits<8> opc_mk, def km#Suffix : I, - Sched<[WriteLoad]>; + Sched<[WriteLoad]>, NoCD8; def mk#Suffix : I, - Sched<[WriteStore]>; + Sched<[WriteStore]>, NoCD8; } multiclass avx512_mask_mov_gpr opc_kr, bits<8> opc_rk, diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp index 9c9fc7a49a9d..68696789530f 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1349,7 +1349,8 @@ static bool MayContainThrowingOrExitingCallAfterCB(CallBase *Begin, // Add attributes from CB params and Fn attributes that can always be propagated // to the corresponding argument / inner callbases. static void AddParamAndFnBasicAttributes(const CallBase &CB, - ValueToValueMapTy &VMap) { + ValueToValueMapTy &VMap, + ClonedCodeInfo &InlinedFunctionInfo) { auto *CalledFunction = CB.getCalledFunction(); auto &Context = CalledFunction->getContext(); @@ -1380,6 +1381,11 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, auto *NewInnerCB = dyn_cast_or_null(VMap.lookup(InnerCB)); if (!NewInnerCB) continue; + // The InnerCB might have be simplified during the inlining + // process which can make propagation incorrect. + if (InlinedFunctionInfo.isSimplified(InnerCB, NewInnerCB)) + continue; + AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { // Check if the underlying value for the parameter is an argument. @@ -1455,7 +1461,8 @@ static AttrBuilder IdentifyValidPoisonGeneratingAttributes(CallBase &CB) { return Valid; } -static void AddReturnAttributes(CallBase &CB, ValueToValueMapTy &VMap) { +static void AddReturnAttributes(CallBase &CB, ValueToValueMapTy &VMap, + ClonedCodeInfo &InlinedFunctionInfo) { AttrBuilder ValidUB = IdentifyValidUBGeneratingAttributes(CB); AttrBuilder ValidPG = IdentifyValidPoisonGeneratingAttributes(CB); if (!ValidUB.hasAttributes() && !ValidPG.hasAttributes()) @@ -1474,6 +1481,11 @@ static void AddReturnAttributes(CallBase &CB, ValueToValueMapTy &VMap) { auto *NewRetVal = dyn_cast_or_null(VMap.lookup(RetVal)); if (!NewRetVal) continue; + + // The RetVal might have be simplified during the inlining + // process which can make propagation incorrect. + if (InlinedFunctionInfo.isSimplified(RetVal, NewRetVal)) + continue; // Backward propagation of attributes to the returned value may be incorrect // if it is control flow dependent. // Consider: @@ -2456,11 +2468,11 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI, // Clone return attributes on the callsite into the calls within the inlined // function which feed into its return value. - AddReturnAttributes(CB, VMap); + AddReturnAttributes(CB, VMap, InlinedFunctionInfo); // Clone attributes on the params of the callsite to calls within the // inlined function which use the same param. - AddParamAndFnBasicAttributes(CB, VMap); + AddParamAndFnBasicAttributes(CB, VMap, InlinedFunctionInfo); propagateMemProfMetadata(CalledFunc, CB, InlinedFunctionInfo.ContainsMemProfMetadata, VMap); diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/LoopPeel.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/LoopPeel.cpp index 5d7c0d947fac..760f1619e030 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/LoopPeel.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/LoopPeel.cpp @@ -859,7 +859,7 @@ static void cloneLoopBlocks( if (LatchInst && L->contains(LatchInst)) LatchVal = VMap[LatchVal]; PHI.addIncoming(LatchVal, cast(VMap[Edge.first])); - SE.forgetValue(&PHI); + SE.forgetLcssaPhiWithNewPredecessor(L, &PHI); } // LastValueMap is updated with the values for the current loop diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index cac840266348..776ac0ea1544 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-19.1.0-0-ga4bf6cd7cfb1" +#define LLVM_REVISION "llvmorg-19.1.1-0-gd401987fe349" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-19.1.0-0-ga4bf6cd7cfb1" +#define CLANG_REVISION "llvmorg-19.1.1-0-gd401987fe349" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-19.1.0-0-ga4bf6cd7cfb1" +#define LLDB_REVISION "llvmorg-19.1.1-0-gd401987fe349" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index f5e540cec4fd..d383f17c1532 100644 *** 80 LINES SKIPPED *** From nobody Sun Dec 1 12:54:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rh73TTtz5fbLP; Sun, 01 Dec 2024 12:54:31 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rh710x9z4PQ7; Sun, 1 Dec 2024 12:54:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YlfLrCOwTYBqRRH4sgBEMHoVC0a9FW35JJI2/Eq1E+M=; b=h4My8IKf8XW2Hwd5jCKMVj0fNv9sOuCcA6I5zpEU3oA7EmlJKxMACST+oN1jeLleWyEN8r ClinYAS+w+vgnDmfwNBWcJy64OM177HwyUCbEJdaRjW6pKIB6/khPpg+4H2X1ae5WR/Me1 TIUOAVYFrchKGW6llNN+Bfy+AEY38yploXOL975obSMOGwyG29OKQ0/5u1YDqTu7cMqLoi Kxyf5Wkrudd8ds+H2f7vjefX3nct136ioryE92rPa+BDNYdGAU+ZziNkGmLwKXORKxXxUo 6zXQ0TmbGlVlDxKKM0jMg8PwA8dpKeiknakS9W49rG2P1tf64SYlxKALxp9jvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YlfLrCOwTYBqRRH4sgBEMHoVC0a9FW35JJI2/Eq1E+M=; b=n7jBZteiLQePosCg/NcZ33HFdMa3ld7BmrtMfIY7hs21qxhjdSznNCWN7Fjgaqwz4R8nim k3MUWCq52PCTLJiKguWL9wHYRBV1pLFd1J45MxegHIPrmcwLhVUtC8BEu/2lveHpY9tLVl vOMpQ2klFelp4L/TlSABK0URYwZkkBf96Yb81T0g9rf8V+6xYXqv6w6i2bHvYijNkHZeJB 8cIs4KY+URJtbkPypylKa579zWFD2DtOcWqn3mwxNWrXv6Ro7UuQKVZNUYoTHuUdPwvLQz m4VreRNbX2fe86y8PG3z4TVvmQ9MM+YJ49NkK2RdEoDL7Bx5yOCbm6gSlkme7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057671; a=rsa-sha256; cv=none; b=DhIGdbNMSmAw0vn5WK3rn4Qv/bYf4uXwX6ieSyQMUrxK5018bHSz4tooN1/e+jGq2ksQji 0wNQYNFPrvzfozoE1MJYXAabC0tNoGn4ujqR/Tfos52jYd1WdKKcMi94BAuIpFJCxxoRaK ZfFhutaX4Ivnb1pAoSLwRWtTQyZKpdLZFojJhJlOpUgiIL+v23wp53JK7R8ZR03/05pe/4 4cF4xmBs+TG59tR95/kFranlm4OB9ToMuJu61nGmOhGNFl+oTF6VV1pGfEKyKGo3KqwPbv ch+QWq0dy01fR6NEIjELk0Zrv73dZCtXbDy+DFBlMULC9G6AxDg5T+KFhNJOQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rh70Ys7ztNV; Sun, 1 Dec 2024 12:54:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsVq8094452; Sun, 1 Dec 2024 12:54:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsUmM094449; Sun, 1 Dec 2024 12:54:30 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:30 GMT Message-Id: <202412011254.4B1CsUmM094449@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: aed18551af0e - stable/13 - Merge llvm-project release/19.x llvmorg-19.1.2-0-g7ba7d8e2f7b6 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: aed18551af0e7f80d1dbcac266a6b18192251cf8 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=aed18551af0e7f80d1dbcac266a6b18192251cf8 commit aed18551af0e7f80d1dbcac266a6b18192251cf8 Author: Dimitry Andric AuthorDate: 2024-10-21 12:59:26 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:45 +0000 Merge llvm-project release/19.x llvmorg-19.1.2-0-g7ba7d8e2f7b6 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.2-0-g7ba7d8e2f7b6, a.k.a. 19.1.2 release. PR: 280562 MFC after: 1 month (cherry picked from commit 5deeebd8c6ca991269e72902a7a62cada57947f6) --- .../clang/include/clang/Basic/TokenKinds.def | 5 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 31 ++++++------ contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp | 2 +- contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp | 16 +++--- .../clang/lib/CodeGen/CodeGenModule.cpp | 15 +++--- .../llvm-project/clang/lib/CodeGen/CodeGenModule.h | 5 +- .../llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp | 13 +++-- .../llvm-project/clang/lib/CodeGen/CodeGenTBAA.h | 5 +- .../clang/lib/CodeGen/CodeGenTypes.cpp | 7 +-- .../llvm-project/clang/lib/CodeGen/CodeGenTypes.h | 8 +-- .../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 2 +- .../clang/lib/Format/TokenAnnotator.cpp | 42 ++++++++------- .../clang/lib/Format/UnwrappedLineParser.cpp | 17 +++++-- contrib/llvm-project/clang/lib/Headers/intrin0.h | 2 +- contrib/llvm-project/clang/lib/Headers/vecintrin.h | 28 ++++++++-- .../clang/lib/Lex/PPMacroExpansion.cpp | 52 ++++++++++++------- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 3 +- .../llvm-project/clang/lib/Sema/TreeTransform.h | 2 +- .../compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp | 5 ++ contrib/llvm-project/libcxx/include/__config | 2 +- contrib/llvm-project/libcxx/include/version | 7 ++- contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp | 20 ++++++-- .../llvm/include/llvm/CodeGen/FastISel.h | 3 ++ .../llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 12 +++-- .../llvm/lib/Target/X86/X86FastISel.cpp | 4 +- .../llvm/lib/Target/X86/X86ISelLowering.cpp | 13 +++-- .../Transforms/InstCombine/InstCombineAndOrXor.cpp | 18 +++++-- .../lib/Transforms/Vectorize/VectorCombine.cpp | 59 ++++++++++++---------- lib/clang/include/VCSVersion.inc | 6 +-- lib/clang/include/clang/Basic/Version.inc | 6 +-- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +-- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 35 files changed, 260 insertions(+), 168 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def b/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def index 8c54661e65cf..0526fbf51bd9 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def +++ b/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def @@ -64,6 +64,10 @@ #ifndef EXPRESSION_TRAIT #define EXPRESSION_TRAIT(I,E,K) KEYWORD(I,K) #endif +#ifndef TRANSFORM_TYPE_TRAIT_DEF +#define TRANSFORM_TYPE_TRAIT_DEF(K, Trait) KEYWORD(__##Trait, KEYCXX) +#endif + #ifndef ALIAS #define ALIAS(X,Y,Z) #endif @@ -534,7 +538,6 @@ TYPE_TRAIT_1(__has_unique_object_representations, TYPE_TRAIT_2(__is_layout_compatible, IsLayoutCompatible, KEYCXX) TYPE_TRAIT_2(__is_pointer_interconvertible_base_of, IsPointerInterconvertibleBaseOf, KEYCXX) -#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait) KEYWORD(__##Trait, KEYCXX) #include "clang/Basic/TransformTypeTraits.def" // Clang-only C++ Type Traits diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp index d7ebffa8c5e4..0416fa03d749 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp @@ -314,7 +314,8 @@ CodeGenTypes::arrangeCXXMethodDeclaration(const CXXMethodDecl *MD) { if (MD->isImplicitObjectMemberFunction()) { // The abstract case is perfectly fine. - const CXXRecordDecl *ThisType = TheCXXABI.getThisArgumentTypeForMethod(MD); + const CXXRecordDecl *ThisType = + getCXXABI().getThisArgumentTypeForMethod(MD); return arrangeCXXMethodType(ThisType, prototype.getTypePtr(), MD); } @@ -337,7 +338,7 @@ CodeGenTypes::arrangeCXXStructorDeclaration(GlobalDecl GD) { SmallVector argTypes; SmallVector paramInfos; - const CXXRecordDecl *ThisType = TheCXXABI.getThisArgumentTypeForMethod(GD); + const CXXRecordDecl *ThisType = getCXXABI().getThisArgumentTypeForMethod(GD); argTypes.push_back(DeriveThisType(ThisType, MD)); bool PassParams = true; @@ -356,7 +357,7 @@ CodeGenTypes::arrangeCXXStructorDeclaration(GlobalDecl GD) { appendParameterTypes(*this, argTypes, paramInfos, FTP); CGCXXABI::AddedStructorArgCounts AddedArgs = - TheCXXABI.buildStructorSignature(GD, argTypes); + getCXXABI().buildStructorSignature(GD, argTypes); if (!paramInfos.empty()) { // Note: prefix implies after the first param. if (AddedArgs.Prefix) @@ -372,11 +373,10 @@ CodeGenTypes::arrangeCXXStructorDeclaration(GlobalDecl GD) { : RequiredArgs::All); FunctionType::ExtInfo extInfo = FTP->getExtInfo(); - CanQualType resultType = TheCXXABI.HasThisReturn(GD) - ? argTypes.front() - : TheCXXABI.hasMostDerivedReturn(GD) - ? CGM.getContext().VoidPtrTy - : Context.VoidTy; + CanQualType resultType = getCXXABI().HasThisReturn(GD) ? argTypes.front() + : getCXXABI().hasMostDerivedReturn(GD) + ? CGM.getContext().VoidPtrTy + : Context.VoidTy; return arrangeLLVMFunctionInfo(resultType, FnInfoOpts::IsInstanceMethod, argTypes, extInfo, paramInfos, required); } @@ -437,11 +437,10 @@ CodeGenTypes::arrangeCXXConstructorCall(const CallArgList &args, : RequiredArgs::All; GlobalDecl GD(D, CtorKind); - CanQualType ResultType = TheCXXABI.HasThisReturn(GD) - ? ArgTypes.front() - : TheCXXABI.hasMostDerivedReturn(GD) - ? CGM.getContext().VoidPtrTy - : Context.VoidTy; + CanQualType ResultType = getCXXABI().HasThisReturn(GD) ? ArgTypes.front() + : getCXXABI().hasMostDerivedReturn(GD) + ? CGM.getContext().VoidPtrTy + : Context.VoidTy; FunctionType::ExtInfo Info = FPT->getExtInfo(); llvm::SmallVector ParamInfos; @@ -806,7 +805,7 @@ const CGFunctionInfo &CodeGenTypes::arrangeLLVMFunctionInfo( } else if (info.getCC() == CC_Swift || info.getCC() == CC_SwiftAsync) { swiftcall::computeABIInfo(CGM, *FI); } else { - getABIInfo().computeInfo(*FI); + CGM.getABIInfo().computeInfo(*FI); } // Loop over all of the computed argument and return value info. If any of @@ -6022,6 +6021,6 @@ RValue CodeGenFunction::EmitVAArg(VAArgExpr *VE, Address &VAListAddr, : EmitVAListRef(VE->getSubExpr()); QualType Ty = VE->getType(); if (VE->isMicrosoftABI()) - return CGM.getTypes().getABIInfo().EmitMSVAArg(*this, VAListAddr, Ty, Slot); - return CGM.getTypes().getABIInfo().EmitVAArg(*this, VAListAddr, Ty, Slot); + return CGM.getABIInfo().EmitMSVAArg(*this, VAListAddr, Ty, Slot); + return CGM.getABIInfo().EmitVAArg(*this, VAListAddr, Ty, Slot); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp index 667e260f2228..e5ba50de3462 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp @@ -209,7 +209,7 @@ CodeGenModule::GetNonVirtualBaseClassOffset(const CXXRecordDecl *ClassDecl, return nullptr; llvm::Type *PtrDiffTy = - Types.ConvertType(getContext().getPointerDiffType()); + getTypes().ConvertType(getContext().getPointerDiffType()); return llvm::ConstantInt::get(PtrDiffTy, Offset.getQuantity()); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp index 5f58a64d8386..3ef22b17f769 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp @@ -1052,6 +1052,8 @@ public: return Visit(E->getBase()); } const Expr *VisitCastExpr(const CastExpr *E) { + if (E->getCastKind() == CK_LValueToRValue) + return IsExpectedRecordDecl(E) ? E : nullptr; return Visit(E->getSubExpr()); } const Expr *VisitParenExpr(const ParenExpr *E) { @@ -1119,19 +1121,15 @@ llvm::Value *CodeGenFunction::EmitCountedByFieldExpr( return nullptr; llvm::Value *Res = nullptr; - if (const auto *DRE = dyn_cast(StructBase)) { - Res = EmitDeclRefLValue(DRE).getPointer(*this); - Res = Builder.CreateAlignedLoad(ConvertType(DRE->getType()), Res, - getPointerAlign(), "dre.load"); - } else if (const MemberExpr *ME = dyn_cast(StructBase)) { - LValue LV = EmitMemberExpr(ME); - Address Addr = LV.getAddress(); - Res = Addr.emitRawPointer(*this); - } else if (StructBase->getType()->isPointerType()) { + if (StructBase->getType()->isPointerType()) { LValueBaseInfo BaseInfo; TBAAAccessInfo TBAAInfo; Address Addr = EmitPointerWithAlignment(StructBase, &BaseInfo, &TBAAInfo); Res = Addr.emitRawPointer(*this); + } else if (StructBase->isLValue()) { + LValue LV = EmitLValue(StructBase); + Address Addr = LV.getAddress(); + Res = Addr.emitRawPointer(*this); } else { return nullptr; } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp index 63ed5b4dd0c3..cf5e29e5a3db 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp @@ -343,10 +343,11 @@ CodeGenModule::CodeGenModule(ASTContext &C, : Context(C), LangOpts(C.getLangOpts()), FS(FS), HeaderSearchOpts(HSO), PreprocessorOpts(PPO), CodeGenOpts(CGO), TheModule(M), Diags(diags), Target(C.getTargetInfo()), ABI(createCXXABI(*this)), - VMContext(M.getContext()), Types(*this), VTables(*this), + VMContext(M.getContext()), VTables(*this), SanitizerMD(new SanitizerMetadata(*this)) { // Initialize the type cache. + Types.reset(new CodeGenTypes(*this)); llvm::LLVMContext &LLVMContext = M.getContext(); VoidTy = llvm::Type::getVoidTy(LLVMContext); Int8Ty = llvm::Type::getInt8Ty(LLVMContext); @@ -405,7 +406,7 @@ CodeGenModule::CodeGenModule(ASTContext &C, if (LangOpts.Sanitize.has(SanitizerKind::Thread) || (!CodeGenOpts.RelaxedAliasing && CodeGenOpts.OptimizationLevel > 0)) TBAA.reset(new CodeGenTBAA(Context, getTypes(), TheModule, CodeGenOpts, - getLangOpts(), getCXXABI().getMangleContext())); + getLangOpts())); // If debug info or coverage generation is enabled, create the CGDebugInfo // object. @@ -1452,12 +1453,12 @@ void CodeGenModule::EmitBackendOptionsMetadata( void CodeGenModule::UpdateCompletedType(const TagDecl *TD) { // Make sure that this type is translated. - Types.UpdateCompletedType(TD); + getTypes().UpdateCompletedType(TD); } void CodeGenModule::RefreshTypeCacheForClass(const CXXRecordDecl *RD) { // Make sure that this type is translated. - Types.RefreshTypeCacheForClass(RD); + getTypes().RefreshTypeCacheForClass(RD); } llvm::MDNode *CodeGenModule::getTBAATypeInfo(QualType QTy) { @@ -5376,6 +5377,10 @@ void CodeGenModule::maybeSetTrivialComdat(const Decl &D, GO.setComdat(TheModule.getOrInsertComdat(GO.getName())); } +const ABIInfo &CodeGenModule::getABIInfo() { + return getTargetCodeGenInfo().getABIInfo(); +} + /// Pass IsTentative as true if you want to create a tentative definition. void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, bool IsTentative) { @@ -7784,7 +7789,5 @@ void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) { NewBuilder->WeakRefReferences = std::move(WeakRefReferences); - NewBuilder->TBAA = std::move(TBAA); - NewBuilder->ABI->MangleCtx = std::move(ABI->MangleCtx); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h index 284bba823bae..c58bb88035ca 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h @@ -320,7 +320,7 @@ private: // This should not be moved earlier, since its initialization depends on some // of the previous reference members being already initialized and also checks // if TheTargetCodeGenInfo is NULL - CodeGenTypes Types; + std::unique_ptr Types; /// Holds information about C++ vtables. CodeGenVTables VTables; @@ -776,6 +776,7 @@ public: bool supportsCOMDAT() const; void maybeSetTrivialComdat(const Decl &D, llvm::GlobalObject &GO); + const ABIInfo &getABIInfo(); CGCXXABI &getCXXABI() const { return *ABI; } llvm::LLVMContext &getLLVMContext() { return VMContext; } @@ -783,7 +784,7 @@ public: const TargetCodeGenInfo &getTargetCodeGenInfo(); - CodeGenTypes &getTypes() { return Types; } + CodeGenTypes &getTypes() { return *Types; } CodeGenVTables &getVTables() { return VTables; } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp index b66b6234c9d3..2ce558d4bdf3 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp @@ -16,6 +16,7 @@ #include "CodeGenTBAA.h" #include "ABIInfoImpl.h" +#include "CGCXXABI.h" #include "CGRecordLayout.h" #include "CodeGenTypes.h" #include "clang/AST/ASTContext.h" @@ -36,10 +37,10 @@ using namespace CodeGen; CodeGenTBAA::CodeGenTBAA(ASTContext &Ctx, CodeGenTypes &CGTypes, llvm::Module &M, const CodeGenOptions &CGO, - const LangOptions &Features, MangleContext &MContext) + const LangOptions &Features) : Context(Ctx), CGTypes(CGTypes), Module(M), CodeGenOpts(CGO), - Features(Features), MContext(MContext), MDHelper(M.getContext()), - Root(nullptr), Char(nullptr) {} + Features(Features), MDHelper(M.getContext()), Root(nullptr), + Char(nullptr) {} CodeGenTBAA::~CodeGenTBAA() { } @@ -256,7 +257,8 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { SmallString<256> OutName; llvm::raw_svector_ostream Out(OutName); - MContext.mangleCanonicalTypeName(QualType(ETy, 0), Out); + CGTypes.getCXXABI().getMangleContext().mangleCanonicalTypeName( + QualType(ETy, 0), Out); return createScalarTypeNode(OutName, getChar(), Size); } @@ -481,7 +483,8 @@ llvm::MDNode *CodeGenTBAA::getBaseTypeInfoHelper(const Type *Ty) { if (Features.CPlusPlus) { // Don't use the mangler for C code. llvm::raw_svector_ostream Out(OutName); - MContext.mangleCanonicalTypeName(QualType(Ty, 0), Out); + CGTypes.getCXXABI().getMangleContext().mangleCanonicalTypeName( + QualType(Ty, 0), Out); } else { OutName = RD->getName(); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.h b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.h index 5d9ecec3ff0f..ba74a39a4d25 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.h +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTBAA.h @@ -24,7 +24,6 @@ namespace clang { class ASTContext; class CodeGenOptions; class LangOptions; - class MangleContext; class QualType; class Type; @@ -120,7 +119,6 @@ class CodeGenTBAA { llvm::Module &Module; const CodeGenOptions &CodeGenOpts; const LangOptions &Features; - MangleContext &MContext; // MDHelper - Helper for creating metadata. llvm::MDBuilder MDHelper; @@ -174,8 +172,7 @@ class CodeGenTBAA { public: CodeGenTBAA(ASTContext &Ctx, CodeGenTypes &CGTypes, llvm::Module &M, - const CodeGenOptions &CGO, const LangOptions &Features, - MangleContext &MContext); + const CodeGenOptions &CGO, const LangOptions &Features); ~CodeGenTBAA(); /// getTypeInfo - Get metadata used to describe accesses to objects of the diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.cpp index e0f567c5da34..f5deccdc1ba7 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.cpp @@ -30,9 +30,8 @@ using namespace clang; using namespace CodeGen; CodeGenTypes::CodeGenTypes(CodeGenModule &cgm) - : CGM(cgm), Context(cgm.getContext()), TheModule(cgm.getModule()), - Target(cgm.getTarget()), TheCXXABI(cgm.getCXXABI()), - TheABIInfo(cgm.getTargetCodeGenInfo().getABIInfo()) { + : CGM(cgm), Context(cgm.getContext()), TheModule(cgm.getModule()), + Target(cgm.getTarget()) { SkippedLayout = false; LongDoubleReferenced = false; } @@ -43,6 +42,8 @@ CodeGenTypes::~CodeGenTypes() { delete &*I++; } +CGCXXABI &CodeGenTypes::getCXXABI() const { return getCGM().getCXXABI(); } + const CodeGenOptions &CodeGenTypes::getCodeGenOpts() const { return CGM.getCodeGenOpts(); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.h b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.h index cbda2628e914..5aebf9a21223 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.h +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.h @@ -57,11 +57,6 @@ class CodeGenTypes { ASTContext &Context; llvm::Module &TheModule; const TargetInfo &Target; - CGCXXABI &TheCXXABI; - - // This should not be moved earlier, since its initialization depends on some - // of the previous reference members being already initialized - const ABIInfo &TheABIInfo; /// The opaque type map for Objective-C interfaces. All direct /// manipulation is done by the runtime interfaces, which are @@ -106,9 +101,8 @@ public: } CodeGenModule &getCGM() const { return CGM; } ASTContext &getContext() const { return Context; } - const ABIInfo &getABIInfo() const { return TheABIInfo; } const TargetInfo &getTarget() const { return Target; } - CGCXXABI &getCXXABI() const { return TheCXXABI; } + CGCXXABI &getCXXABI() const; llvm::LLVMContext &getLLVMContext() { return TheModule.getContext(); } const CodeGenOptions &getCodeGenOpts() const; diff --git a/contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp index cc6740edabcd..76d0191a7e63 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp @@ -1111,7 +1111,7 @@ static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, const Type *Base = nullptr; uint64_t NumElts = 0; if (CGM.getTarget().getTriple().isAArch64() && - CGM.getTypes().getABIInfo().isHomogeneousAggregate(Ty, Base, NumElts) && + CGM.getABIInfo().isHomogeneousAggregate(Ty, Base, NumElts) && isa(Base)) { return true; } diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 4512e539cc79..ad9ed7b47d00 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -189,25 +189,29 @@ private: next(); } - for (bool SeenTernaryOperator = false; CurrentToken;) { + for (bool SeenTernaryOperator = false, MaybeAngles = true; CurrentToken;) { const bool InExpr = Contexts[Contexts.size() - 2].IsExpression; if (CurrentToken->is(tok::greater)) { const auto *Next = CurrentToken->Next; - // Try to do a better job at looking for ">>" within the condition of - // a statement. Conservatively insert spaces between consecutive ">" - // tokens to prevent splitting right bitshift operators and potentially - // altering program semantics. This check is overly conservative and - // will prevent spaces from being inserted in select nested template - // parameter cases, but should not alter program semantics. - if (Next && Next->is(tok::greater) && - Left->ParentBracket != tok::less && - CurrentToken->getStartOfNonWhitespace() == - Next->getStartOfNonWhitespace().getLocWithOffset(-1)) { - return false; - } - if (InExpr && SeenTernaryOperator && - (!Next || !Next->isOneOf(tok::l_paren, tok::l_brace))) { - return false; + if (CurrentToken->isNot(TT_TemplateCloser)) { + // Try to do a better job at looking for ">>" within the condition of + // a statement. Conservatively insert spaces between consecutive ">" + // tokens to prevent splitting right shift operators and potentially + // altering program semantics. This check is overly conservative and + // will prevent spaces from being inserted in select nested template + // parameter cases, but should not alter program semantics. + if (Next && Next->is(tok::greater) && + Left->ParentBracket != tok::less && + CurrentToken->getStartOfNonWhitespace() == + Next->getStartOfNonWhitespace().getLocWithOffset(-1)) { + return false; + } + if (InExpr && SeenTernaryOperator && + (!Next || !Next->isOneOf(tok::l_paren, tok::l_brace))) { + return false; + } + if (!MaybeAngles) + return false; } Left->MatchingParen = CurrentToken; CurrentToken->MatchingParen = Left; @@ -243,11 +247,11 @@ private: // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if (MaybeAngles && InExpr && !Line.startsWith(tok::kw_template) && Prev.is(TT_BinaryOperator)) { const auto Precedence = Prev.getPrecedence(); if (Precedence > prec::Conditional && Precedence < prec::Relational) - return false; + MaybeAngles = false; } if (Prev.isOneOf(tok::question, tok::colon) && !Style.isProto()) SeenTernaryOperator = true; @@ -1615,7 +1619,7 @@ private: return false; break; case tok::greater: - if (Style.Language != FormatStyle::LK_TextProto) + if (Style.Language != FormatStyle::LK_TextProto && Tok->is(TT_Unknown)) Tok->setType(TT_BinaryOperator); if (Tok->Previous && Tok->Previous->is(TT_TemplateCloser)) Tok->SpacesRequiredBefore = 1; diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp index 7813d86ff0ea..631c7c62baac 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp @@ -2131,6 +2131,11 @@ void UnwrappedLineParser::parseStructuralElement( return; } break; + case tok::greater: + nextToken(); + if (FormatTok->is(tok::l_brace)) + FormatTok->Previous->setFinalizedType(TT_TemplateCloser); + break; default: nextToken(); break; @@ -2551,7 +2556,7 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType) { parseChildBlock(); break; case tok::r_paren: { - const auto *Prev = LeftParen->Previous; + auto *Prev = LeftParen->Previous; if (!MightBeStmtExpr && !MightBeFoldExpr && !Line->InMacroBody && Style.RemoveParentheses > FormatStyle::RPS_Leave) { const auto *Next = Tokens->peekNextToken(); @@ -2575,9 +2580,13 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType) { FormatTok->Optional = true; } } - if (Prev && Prev->is(TT_TypenameMacro)) { - LeftParen->setFinalizedType(TT_TypeDeclarationParen); - FormatTok->setFinalizedType(TT_TypeDeclarationParen); + if (Prev) { + if (Prev->is(TT_TypenameMacro)) { + LeftParen->setFinalizedType(TT_TypeDeclarationParen); + FormatTok->setFinalizedType(TT_TypeDeclarationParen); + } else if (Prev->is(tok::greater) && FormatTok->Previous == LeftParen) { + Prev->setFinalizedType(TT_TemplateCloser); + } } nextToken(); return SeenEqual; diff --git a/contrib/llvm-project/clang/lib/Headers/intrin0.h b/contrib/llvm-project/clang/lib/Headers/intrin0.h index 866c8896617d..6b01f3808652 100644 --- a/contrib/llvm-project/clang/lib/Headers/intrin0.h +++ b/contrib/llvm-project/clang/lib/Headers/intrin0.h @@ -44,7 +44,7 @@ unsigned char _InterlockedCompareExchange128_rel(__int64 volatile *_Destination, __int64 *_ComparandResult); #endif -#ifdef __x86_64__ && !defined(__arm64ec__) +#if defined(__x86_64__) && !defined(__arm64ec__) unsigned __int64 _umul128(unsigned __int64, unsigned __int64, unsigned __int64 *); unsigned __int64 __shiftleft128(unsigned __int64 _LowPart, diff --git a/contrib/llvm-project/clang/lib/Headers/vecintrin.h b/contrib/llvm-project/clang/lib/Headers/vecintrin.h index 1f51e32c0d13..609c7cf0b7a6 100644 --- a/contrib/llvm-project/clang/lib/Headers/vecintrin.h +++ b/contrib/llvm-project/clang/lib/Headers/vecintrin.h @@ -8359,7 +8359,9 @@ vec_min(__vector double __a, __vector double __b) { static inline __ATTRS_ai __vector unsigned char vec_add_u128(__vector unsigned char __a, __vector unsigned char __b) { - return (__vector unsigned char)((__int128)__a + (__int128)__b); + return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) + ((__int128)__a + (__int128)__b); } /*-- vec_addc ---------------------------------------------------------------*/ @@ -8389,6 +8391,7 @@ vec_addc(__vector unsigned long long __a, __vector unsigned long long __b) { static inline __ATTRS_ai __vector unsigned char vec_addc_u128(__vector unsigned char __a, __vector unsigned char __b) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vaccq((unsigned __int128)__a, (unsigned __int128)__b); } @@ -8398,6 +8401,7 @@ static inline __ATTRS_ai __vector unsigned char vec_adde_u128(__vector unsigned char __a, __vector unsigned char __b, __vector unsigned char __c) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vacq((unsigned __int128)__a, (unsigned __int128)__b, (unsigned __int128)__c); } @@ -8408,6 +8412,7 @@ static inline __ATTRS_ai __vector unsigned char vec_addec_u128(__vector unsigned char __a, __vector unsigned char __b, __vector unsigned char __c) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vacccq((unsigned __int128)__a, (unsigned __int128)__b, (unsigned __int128)__c); } @@ -8483,7 +8488,9 @@ vec_gfmsum(__vector unsigned int __a, __vector unsigned int __b) { static inline __ATTRS_o_ai __vector unsigned char vec_gfmsum_128(__vector unsigned long long __a, __vector unsigned long long __b) { - return (__vector unsigned char)__builtin_s390_vgfmg(__a, __b); + return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) + __builtin_s390_vgfmg(__a, __b); } /*-- vec_gfmsum_accum -------------------------------------------------------*/ @@ -8513,6 +8520,7 @@ vec_gfmsum_accum_128(__vector unsigned long long __a, __vector unsigned long long __b, __vector unsigned char __c) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vgfmag(__a, __b, (unsigned __int128)__c); } @@ -8810,6 +8818,7 @@ vec_msum_u128(__vector unsigned long long __a, __vector unsigned long long __b, #define vec_msum_u128(X, Y, Z, W) \ ((__typeof__((vec_msum_u128)((X), (Y), (Z), (W)))) \ + (unsigned __int128 __attribute__((__vector_size__(16)))) \ __builtin_s390_vmslg((X), (Y), (unsigned __int128)(Z), (W))) #endif @@ -8817,7 +8826,9 @@ vec_msum_u128(__vector unsigned long long __a, __vector unsigned long long __b, static inline __ATTRS_ai __vector unsigned char vec_sub_u128(__vector unsigned char __a, __vector unsigned char __b) { - return (__vector unsigned char)((__int128)__a - (__int128)__b); + return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) + ((__int128)__a - (__int128)__b); } /*-- vec_subc ---------------------------------------------------------------*/ @@ -8847,6 +8858,7 @@ vec_subc(__vector unsigned long long __a, __vector unsigned long long __b) { static inline __ATTRS_ai __vector unsigned char vec_subc_u128(__vector unsigned char __a, __vector unsigned char __b) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vscbiq((unsigned __int128)__a, (unsigned __int128)__b); } @@ -8856,6 +8868,7 @@ static inline __ATTRS_ai __vector unsigned char vec_sube_u128(__vector unsigned char __a, __vector unsigned char __b, __vector unsigned char __c) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vsbiq((unsigned __int128)__a, (unsigned __int128)__b, (unsigned __int128)__c); } @@ -8866,6 +8879,7 @@ static inline __ATTRS_ai __vector unsigned char vec_subec_u128(__vector unsigned char __a, __vector unsigned char __b, __vector unsigned char __c) { return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) __builtin_s390_vsbcbiq((unsigned __int128)__a, (unsigned __int128)__b, (unsigned __int128)__c); } @@ -8886,12 +8900,16 @@ vec_sum2(__vector unsigned int __a, __vector unsigned int __b) { static inline __ATTRS_o_ai __vector unsigned char vec_sum_u128(__vector unsigned int __a, __vector unsigned int __b) { - return (__vector unsigned char)__builtin_s390_vsumqf(__a, __b); + return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) + __builtin_s390_vsumqf(__a, __b); } static inline __ATTRS_o_ai __vector unsigned char vec_sum_u128(__vector unsigned long long __a, __vector unsigned long long __b) { - return (__vector unsigned char)__builtin_s390_vsumqg(__a, __b); + return (__vector unsigned char) + (unsigned __int128 __attribute__((__vector_size__(16)))) + __builtin_s390_vsumqg(__a, __b); } /*-- vec_sum4 ---------------------------------------------------------------*/ diff --git a/contrib/llvm-project/clang/lib/Lex/PPMacroExpansion.cpp b/contrib/llvm-project/clang/lib/Lex/PPMacroExpansion.cpp index 3913ff08c2eb..fb88ec2bf603 100644 --- a/contrib/llvm-project/clang/lib/Lex/PPMacroExpansion.cpp +++ b/contrib/llvm-project/clang/lib/Lex/PPMacroExpansion.cpp @@ -1602,6 +1602,34 @@ static bool isTargetVariantEnvironment(const TargetInfo &TI, return false; } +static bool IsBuiltinTrait(Token &Tok) { + +#define TYPE_TRAIT_1(Spelling, Name, Key) \ + case tok::kw_##Spelling: \ + return true; +#define TYPE_TRAIT_2(Spelling, Name, Key) \ + case tok::kw_##Spelling: \ + return true; +#define TYPE_TRAIT_N(Spelling, Name, Key) \ + case tok::kw_##Spelling: \ + return true; +#define ARRAY_TYPE_TRAIT(Spelling, Name, Key) \ + case tok::kw_##Spelling: \ + return true; +#define EXPRESSION_TRAIT(Spelling, Name, Key) \ + case tok::kw_##Spelling: \ + return true; +#define TRANSFORM_TYPE_TRAIT_DEF(K, Spelling) \ + case tok::kw___##Spelling: \ + return true; + + switch (Tok.getKind()) { + default: + return false; +#include "clang/Basic/TokenKinds.def" + } +} + /// ExpandBuiltinMacro - If an identifier token is read that is to be expanded /// as a builtin macro, handle it and return the next token as 'Tok'. void Preprocessor::ExpandBuiltinMacro(Token &Tok) { @@ -1798,25 +1826,11 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { getTargetInfo().getTargetOpts().FeatureMap); } return true; - } else if (II->getTokenID() != tok::identifier || - II->hasRevertedTokenIDToIdentifier()) { - // Treat all keywords that introduce a custom syntax of the form - // - // '__some_keyword' '(' [...] ')' - // - // as being "builtin functions", even if the syntax isn't a valid - // function call (for example, because the builtin takes a type - // argument). - if (II->getName().starts_with("__builtin_") || - II->getName().starts_with("__is_") || - II->getName().starts_with("__has_")) - return true; - return llvm::StringSwitch(II->getName()) - .Case("__array_rank", true) - .Case("__array_extent", true) -#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait) .Case("__" #Trait, true) -#include "clang/Basic/TransformTypeTraits.def" - .Default(false); + } else if (IsBuiltinTrait(Tok)) { + return true; + } else if (II->getTokenID() != tok::identifier && + II->getName().starts_with("__builtin_")) { + return true; } else { return llvm::StringSwitch(II->getName()) // Report builtin templates as being builtins. diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp index f56ca398cda8..687b1be94592 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp @@ -6922,8 +6922,7 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, } if (CXXMethodDecl *Method = dyn_cast_or_null(FDecl)) - if (!isa(CurContext) && - Method->isImplicitObjectMemberFunction()) + if (Method->isImplicitObjectMemberFunction()) return ExprError(Diag(LParenLoc, diag::err_member_call_without_object) << Fn->getSourceRange() << 0); diff --git a/contrib/llvm-project/clang/lib/Sema/TreeTransform.h b/contrib/llvm-project/clang/lib/Sema/TreeTransform.h index 51e6a4845bf6..0ae393524fe0 100644 --- a/contrib/llvm-project/clang/lib/Sema/TreeTransform.h +++ b/contrib/llvm-project/clang/lib/Sema/TreeTransform.h @@ -13608,7 +13608,7 @@ bool TreeTransform::TransformOverloadExprDecls(OverloadExpr *Old, } AllEmptyPacks &= Decls.empty(); - }; + } // C++ [temp.res]/8.4.2: // The program is ill-formed, no diagnostic required, if [...] lookup for diff --git a/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp b/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp index db80eb383885..73eea07cf869 100644 --- a/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp +++ b/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp @@ -239,6 +239,10 @@ size_t PageSize() { } void SetThreadName(std::thread &thread, const std::string &name) { +#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) || \ + defined(_GLIBCXX_GCC_GTHR_POSIX_H) + (void)pthread_setname_np(thread.native_handle(), name.c_str()); +#else typedef HRESULT(WINAPI * proc)(HANDLE, PCWSTR); HMODULE kbase = GetModuleHandleA("KernelBase.dll"); proc ThreadNameProc = @@ -253,6 +257,7 @@ void SetThreadName(std::thread &thread, const std::string &name) { } } } +#endif } } // namespace fuzzer diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 8301fec2b3d7..87b6d9d19e83 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -27,7 +27,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 190101 +# define _LIBCPP_VERSION 190102 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/libcxx/include/version b/contrib/llvm-project/libcxx/include/version index fe64343eafbc..76ab6bedafdd 100644 --- a/contrib/llvm-project/libcxx/include/version +++ b/contrib/llvm-project/libcxx/include/version @@ -182,8 +182,9 @@ __cpp_lib_philox_engine 202406L __cpp_lib_polymorphic_allocator 201902L __cpp_lib_print 202207L __cpp_lib_quoted_string_io 201304L -__cpp_lib_ranges 202207L +__cpp_lib_ranges 202211L + 202110L // C++20 __cpp_lib_ranges_as_const 202207L __cpp_lib_ranges_as_rvalue 202207L __cpp_lib_ranges_chunk 202202L @@ -428,7 +429,7 @@ __cpp_lib_void_t 201411L # if _LIBCPP_AVAILABILITY_HAS_PMR # define __cpp_lib_polymorphic_allocator 201902L # endif -# define __cpp_lib_ranges 202207L +# define __cpp_lib_ranges 202110L # define __cpp_lib_remove_cvref 201711L # if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC # define __cpp_lib_semaphore 201907L @@ -480,6 +481,8 @@ __cpp_lib_void_t 201411L # define __cpp_lib_optional 202110L # define __cpp_lib_out_ptr 202106L # define __cpp_lib_print 202207L +# undef __cpp_lib_ranges +# define __cpp_lib_ranges 202211L // # define __cpp_lib_ranges_as_const 202207L # define __cpp_lib_ranges_as_rvalue 202207L // # define __cpp_lib_ranges_chunk 202202L diff --git a/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp b/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp index abde3cd96491..56cf96fd1770 100644 --- a/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp +++ b/contrib/llvm-project/lld/ELF/Arch/Hexagon.cpp @@ -181,11 +181,13 @@ static const InstructionMask r6[] = { {0xd7000000, 0x006020e0}, {0xd8000000, 0x006020e0}, {0xdb000000, 0x006020e0}, {0xdf000000, 0x006020e0}}; +constexpr uint32_t instParsePacketEnd = 0x0000c000; + static bool isDuplex(uint32_t insn) { // Duplex forms have a fixed mask and parse bits 15:14 are always // zero. Non-duplex insns will always have at least one bit set in the // parse field. - return (0xC000 & insn) == 0; + return (instParsePacketEnd & insn) == 0; } static uint32_t findMaskR6(uint32_t insn) { @@ -216,6 +218,12 @@ static uint32_t findMaskR11(uint32_t insn) { } static uint32_t findMaskR16(uint32_t insn) { + if (isDuplex(insn)) + return 0x03f00000; + + // Clear the end-packet-parse bits: + insn = insn & ~instParsePacketEnd; + if ((0xff000000 & insn) == 0x48000000) return 0x061f20ff; if ((0xff000000 & insn) == 0x49000000) @@ -225,8 +233,14 @@ static uint32_t findMaskR16(uint32_t insn) { if ((0xff000000 & insn) == 0xb0000000) return 0x0fe03fe0; - if (isDuplex(insn)) - return 0x03f00000; + if ((0xff802000 & insn) == 0x74000000) + return 0x00001fe0; + if ((0xff802000 & insn) == 0x74002000) + return 0x00001fe0; + if ((0xff802000 & insn) == 0x74800000) + return 0x00001fe0; + if ((0xff802000 & insn) == 0x74802000) + return 0x00001fe0; for (InstructionMask i : r6) if ((0xff000000 & insn) == i.cmpMask) diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h index 3cbc35400181..95e8004cc09c 100644 --- a/contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h +++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h @@ -275,6 +275,9 @@ public: /// This is a wrapper around getRegForValue that also takes care of /// truncating or sign-extending the given getelementptr index value. + Register getRegForGEPIndex(MVT PtrVT, const Value *Idx); + + /// Retained for ABI compatibility in release branch. Register getRegForGEPIndex(const Value *Idx); /// We're checking to see if we can fold \p LI into \p FoldInst. Note diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index ef9f78335519..398381a8164b 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -380,14 +380,13 @@ void FastISel::updateValueMap(const Value *I, Register Reg, unsigned NumRegs) { } } -Register FastISel::getRegForGEPIndex(const Value *Idx) { +Register FastISel::getRegForGEPIndex(MVT PtrVT, const Value *Idx) { Register IdxN = getRegForValue(Idx); if (!IdxN) // Unhandled operand. Halt "fast" selection and bail. return Register(); // If the index is smaller or larger than intptr_t, truncate or extend it. - MVT PtrVT = TLI.getPointerTy(DL); EVT IdxVT = EVT::getEVT(Idx->getType(), /*HandleUnknown=*/false); if (IdxVT.bitsLT(PtrVT)) { IdxN = fastEmit_r(IdxVT.getSimpleVT(), PtrVT, ISD::SIGN_EXTEND, IdxN); @@ -398,6 +397,10 @@ Register FastISel::getRegForGEPIndex(const Value *Idx) { return IdxN; } +Register FastISel::getRegForGEPIndex(const Value *Idx) { + return getRegForGEPIndex(TLI.getPointerTy(DL), Idx); +} + void FastISel::recomputeInsertPt() { if (getLastLocalValue()) { FuncInfo.InsertPt = getLastLocalValue(); @@ -543,7 +546,8 @@ bool FastISel::selectGetElementPtr(const User *I) { uint64_t TotalOffs = 0; // FIXME: What's a good SWAG number for MaxOffs? uint64_t MaxOffs = 2048; - MVT VT = TLI.getPointerTy(DL); + MVT VT = TLI.getValueType(DL, I->getType()).getSimpleVT(); + for (gep_type_iterator GTI = gep_type_begin(I), E = gep_type_end(I); GTI != E; ++GTI) { const Value *Idx = GTI.getOperand(); @@ -584,7 +588,7 @@ bool FastISel::selectGetElementPtr(const User *I) { // N = N + Idx * ElementSize; uint64_t ElementSize = GTI.getSequentialElementStride(DL); - Register IdxN = getRegForGEPIndex(Idx); + Register IdxN = getRegForGEPIndex(VT, Idx); if (!IdxN) // Unhandled operand. Halt "fast" selection and bail. return false; diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86FastISel.cpp b/contrib/llvm-project/llvm/lib/Target/X86/X86FastISel.cpp index 2eae15595636..5d594bd54fbf 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86FastISel.cpp +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86FastISel.cpp @@ -902,6 +902,8 @@ redo_gep: uint64_t Disp = (int32_t)AM.Disp; unsigned IndexReg = AM.IndexReg; unsigned Scale = AM.Scale; + MVT PtrVT = TLI.getValueType(DL, U->getType()).getSimpleVT(); + gep_type_iterator GTI = gep_type_begin(U); // Iterate through the indices, folding what we can. Constants can be // folded, and one dynamic index can be handled, if the scale is supported. @@ -937,7 +939,7 @@ redo_gep: *** 273 LINES SKIPPED *** From nobody Sun Dec 1 12:54:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rh84wYZz5fbNj; Sun, 01 Dec 2024 12:54:32 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rh827P1z4PgQ; Sun, 1 Dec 2024 12:54:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c3sPTk1uFVhkSInUryISIIgLUDpUlhcuWA7T35/Nwpw=; b=PRgAQSFOwoA24PdUm+UmRvY4hg1iNoDN+ZwcjinF9briYOppzs5C2PGZ8HaJ3B3pgeqMlf NM5pa/ZUTk1AhP0Btqbg2ZFcIkEp39BSdkX4mpd2SaWVHVtgpsAo2/reykBQNDmdxR0JKu riyVHsOBaYdX+wIF0O8FrAM9o+UvNqN+zYRzOcqXK1yRk/zF15DWL01FRlDOXHYlWhu0Fh Fh+EPupEbMGYCotIgQ6DbNgcqjUhVbQz3y3jMY0OTq48iQs5s+FtuF4GWRheusjRpzV/Ch m5p03fuCUZ3+joUag9NzIWcDMMsMbsHuHtMnUa1nkLitp/EfareruDb4bEqzyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c3sPTk1uFVhkSInUryISIIgLUDpUlhcuWA7T35/Nwpw=; b=OLTcc1L+f7ofL53+B7JsjnLIgp4IcSBwv+XJSB4UhoFLRBpvNLGraON5SxjkhhIzKewKTy pcxszLCo+DWpP1of4Dm+9qzHwovjBPJzUzK8jTuCcUTSYOVZjZb82yPRtl23c4mZxwnzk9 bv+kXtSalvEijA3rBH3QAb58BxD6quOo670jtEki3yvvKPdd9AbIZmDnY3fa0+KkByImod Lyz4MpXILIqjG11vwAwqURvhdrwFHbB3/lKSf6oyWhj7DDTNbGDcmLCvecWI8crZjE6zSV LZQ3dBcH0EINAfaeS4fFziD7BhzN8r19uT5iT6LpH8InOsOgI+ZnWUSJy7zbXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057672; a=rsa-sha256; cv=none; b=ZcQvj+NtgSdU11me6dHDUFFkVhKkh5f9lChSWodhxTHpYQPKnERwSwYFu6MFa3J/JrPisP 9RSv0Z1tPOCGjb+jRCOMAxU/TwWTosBf8gSxtCPPVLewney5hw9mO3hGmj68BsoocAnW4Y MTyUZXnekoKHEhqt4UKo/3OMSknf2Zq0yEQr6EV53j4JJc2ZMsImJFSAmOGEUp9xrwnRms 4d8mgRNUiSrimMcoPN1c4ZiR8mRlFDqFWXND0uXXCqicHCjl9p7tgYJtFidtsYCMehiAc5 /Rs7q9yaCwE9aRPXRbMQGVzIkWNH2mL5hpxouUxmlziRFogBrst9vc7WVJGuhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rh81kp4ztQC; Sun, 1 Dec 2024 12:54:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsWNw094511; Sun, 1 Dec 2024 12:54:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsWKk094508; Sun, 1 Dec 2024 12:54:32 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:32 GMT Message-Id: <202412011254.4B1CsWKk094508@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 22a5f765704b - stable/13 - Apply workaround for building llvm-project with WITHOUT_LLVM_ASSERTIONS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 22a5f765704b96aa97074685d17a7216c6233c6e Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=22a5f765704b96aa97074685d17a7216c6233c6e commit 22a5f765704b96aa97074685d17a7216c6233c6e Author: Dimitry Andric AuthorDate: 2024-10-24 07:02:54 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:46 +0000 Apply workaround for building llvm-project with WITHOUT_LLVM_ASSERTIONS Some internal checking functions should only be declared when both NDEBUG and LLVM_ENABLE_ABI_BREAKING_CHECKS are undefined, otherwise you would get compile errors similar to: /usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:921:13: error: no member named 'VerifyDAGDivergence' in 'llvm::SelectionDAG' 921 | CurDAG->VerifyDAGDivergence(); | ~~~~~~ ^ Adjust the conditions for declaring and using these functions. This has also been reported upstream. Reported by: cy PR: 280562 MFC after: 1 month (cherry picked from commit a5b1eecbed07519c637095e3291b9cbd9748e823) --- .../llvm/include/llvm/CodeGen/SelectionDAG.h | 2 +- .../llvm/include/llvm/CodeGen/SelectionDAGISel.h | 2 +- .../llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 +- .../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h index 16ec65f2e7da..9c0220055f38 100644 --- a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h +++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h @@ -582,7 +582,7 @@ public: return Root; } -#ifndef NDEBUG +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS void VerifyDAGDivergence(); #endif diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h index aa0efa5d9bf5..0c23e80a0ac5 100644 --- a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h +++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h @@ -55,7 +55,7 @@ public: AssumptionCache *AC = nullptr; GCFunctionInfo *GFI = nullptr; SSPLayoutInfo *SP = nullptr; -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS TargetTransformInfo *TTI = nullptr; #endif CodeGenOptLevel OptLevel; diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 02d44cd36ae5..63213e276d22 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -11623,7 +11623,7 @@ void SelectionDAG::CreateTopologicalOrder(std::vector &Order) { } } -#ifndef NDEBUG +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS void SelectionDAG::VerifyDAGDivergence() { std::vector TopoOrder; CreateTopologicalOrder(TopoOrder); diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index b961d3bb1fec..74bd1fdb887c 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -916,7 +916,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -936,7 +936,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -958,7 +958,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -982,7 +982,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1000,7 +1000,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1016,7 +1016,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1036,7 +1036,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1056,7 +1056,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1076,7 +1076,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif From nobody Sun Dec 1 12:54:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Rh96TRZz5fb3Z; Sun, 01 Dec 2024 12:54:33 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Rh93CScz4PbD; Sun, 1 Dec 2024 12:54:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GK8r58bESdyFroDiNLuBwSAe41yuPfbqQ8mxjYkqi+w=; b=Qo3n8wfkC+M4ynSw3JltpSbEqAhnQDQFd855HdzpESi87i1LEabpOOMPKuJ7KPd5K9W3ds LDggNl8Xys8692kzaoQxux+dAl6xQq7JZzxUDgs5yAiLcGJCuGkm9gs0Sngvbpack4xOf9 V6ZsseKe/ng1otmxy0s1fXkHi8MdkYSa/og2q9bsTX1Ubh3coNqzD9XUITw0bgf8hj+vmD ayyCh8Cm7NwXFM/MX/M0LXFwgNZ93OSMNlEX/CCUPZMHyZT24xN7vwDf/m6VTIU2DpZg1f ydUyPFRkYmlZWiDuzCTE8UjlC3vkUcu7uYt3/ZQwQ6EU1Ibggt339LSV8kLC9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GK8r58bESdyFroDiNLuBwSAe41yuPfbqQ8mxjYkqi+w=; b=IqEubHsGpQ/dY+rdhme1ZO8ZHzImqcca4NYzs2kssoRTVuwHpRO8xdK7tsTNo4bkMPQ9mh cRyd94htnucD2KJMuMxFrMhF1xJsLs905U+ia2l2xepuJd6Q5RZY5eYo8C7dTsUj7NpbDr IvPPuVvvyXixdGmFqa5ZI3ZicQ/xu60cI7w2PryCu6vXMVPPpryMhVKTA8h4K6cyLGj4zY EOctzeDNefNdFQdg5BtoidOAhJtEWWicyNtek8bMtmS3gYuJsQ32CU8QJi6YevbXrUa3BT o07SSgjSbUbraDySExujm4zqZbnFPJVf2VUDjWjmv3HBcS0NgCvEUGtJ9y96Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057673; a=rsa-sha256; cv=none; b=uERSlRRJb3Ue6MhPqezMgKK0wnTBw/1re0kAzuPOjMHQMylIsNBq5gVrPF1GlkythDiUwq m1fNWcLeKAFZg9nUCsgK8dSgGT7UyiHbR0bGspKkDahZNxY47WOt3iyrC6pbyEy4Fo19ec bFYvKm95Kz4H3ms00VfCC9EcJlJG67Oqd5yrrLz6lHa6XezQSjYs55MNVChFkYgU+LXnVs Nik8mJ+75W93YzX5SpBSZ31mHeti/pZ0Eplg7c2SHriZZ2mOSCZFgO4ew09rgdtUmG1Twr 4g496fe8SS23lmt0AyGZi6odRhSQzQuZATPRg0v0lXGk7icT16U5lhXnM3BfqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Rh92knyztjq; Sun, 1 Dec 2024 12:54:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsXWb094561; Sun, 1 Dec 2024 12:54:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsXsY094558; Sun, 1 Dec 2024 12:54:33 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:33 GMT Message-Id: <202412011254.4B1CsXsY094558@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 44be5a00bedd - stable/13 - Adjust LLVM_ENABLE_ABI_BREAKING_CHECKS depending on NDEBUG List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 44be5a00bedd95e39d20f7dc6d5458251af49e20 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=44be5a00bedd95e39d20f7dc6d5458251af49e20 commit 44be5a00bedd95e39d20f7dc6d5458251af49e20 Author: Dimitry Andric AuthorDate: 2024-10-24 09:53:19 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:46 +0000 Adjust LLVM_ENABLE_ABI_BREAKING_CHECKS depending on NDEBUG When assertions are disabled, the upstream build system disables LLVM_ENABLE_ABI_BREAKING_CHECKS by default. Though the upstream build system allows it to be force-enabled, it looks like that is not a well-tested build-time configuration. Therefore, always disable LLVM_ENABLE_ABI_BREAKING_CHECKS when assertions are disabled, which will also save some more runtime cost when people use WITHOUT_LLVM_ASSERTIONS. PR: 280562 MFC after: 1 month (cherry picked from commit 1c83996beda7b6a382857c318f46daefcb6bd84c) --- lib/clang/include/llvm/Config/abi-breaking.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/clang/include/llvm/Config/abi-breaking.h b/lib/clang/include/llvm/Config/abi-breaking.h index eb90be1fe37b..55e67e2ebad7 100644 --- a/lib/clang/include/llvm/Config/abi-breaking.h +++ b/lib/clang/include/llvm/Config/abi-breaking.h @@ -13,7 +13,11 @@ #define LLVM_ABI_BREAKING_CHECKS_H /* Define to enable checks that alter the LLVM C++ ABI */ +#ifdef NDEBUG +#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0 +#else #define LLVM_ENABLE_ABI_BREAKING_CHECKS 1 +#endif /* Define to enable reverse iteration of unordered llvm containers */ #define LLVM_ENABLE_REVERSE_ITERATION 0 From nobody Sun Dec 1 12:54:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1RhB4xQgz5fZwG; Sun, 01 Dec 2024 12:54:34 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1RhB3t5Pz4Pgt; Sun, 1 Dec 2024 12:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gsn0+Jr7BqajJChmsKSeLoo+MedUhsfFUjHE5/dTDY8=; b=XmQHg4EWMjLdbT7ANGGBmYgVsTdJAbPVMlVj/XrbdSGEdkfuD+sJFrcWc1WS0RXAQwAKrS 5faQe/V289/+Sp+QXMIr0n6k7c4FuhfMXhPpLG/7018EfhhDZ9pK5EXwWYgXauO01aD/6Y K3SmfR3lYcVv4AiNqt9wASsc4CKyRnwR6YfLAgDuIgbJRuu20c0r9ntBYPOc9mNt7RTaqB iM1tf9B5CdJk+5Q//e9vzfbyRDGNygznUcC3vbrMCCiPr57h54PdOyiub2zYHsrK9o4gwR a9/sDyqxoKJv3ebFVvs0ZyhtJHSx/sOUxXoTkQelrKj3HbO9bJtTxt8K3MgqLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gsn0+Jr7BqajJChmsKSeLoo+MedUhsfFUjHE5/dTDY8=; b=SFJwC0Puoq+20+K/50rmoVJpBL5lb8JhG2jdKOA/beUyd5nzVtW1I5gf0IfoIwVMqDRZwt jIyVGao1auxa9cseJ/c8+FqtNUwFThEmc1P+PSuKbtbwnLARIdb0MyTDZYblVTh4Ymehd3 SLb1q4Wtpi7pmKk17XobGiAvY13kZdDouLOOnMPuEkxu8JTII5DZ8L0/9o5N42Zv68zSJx rumBIUcB9YXGwhaKBJ1Et6xFVHG87lMtjdMLK/a5Cqe4qZNSYbTJdIn73SKLSI7ZPqWLPE yY1pIOmIduDfxX6FYBMbeLOLAxDa6zz5o9rrXwGgCMZ2OrHfXyn6sEL0rqKPHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057674; a=rsa-sha256; cv=none; b=ozFIRbU4Q+RdbOjBB7fmz1utDD/o73Jnua4JL4avy2ZBNu2ZjmcqPTE3wijd8JeNOxO2a7 ckfHtFVBcMRKQKNvni+PC/ovUAmj7XFnWu7yBNshN4CaUEDBC8LZxRrMuwllQL9Vk4H1ms uaq3dsqWMUdd61J372yxOEYSli0mcHeinrH05qXMYHXqP4ujuAQU4OqDij2lEY2TQ5kXrK h689Fr8MlMw9ESVsqqepX7tMLIfmtAbAdAbd0bOTS0WXKqGL36AR1ZRm5dHefDNMepux62 sWWgkj9KDkJ0dd2ep0YhF/odzyQXdI1cQrGfHhLnJHE3Ukp8EtjTjiHEQon8rQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1RhB3VDKztKx; Sun, 1 Dec 2024 12:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsY5W094623; Sun, 1 Dec 2024 12:54:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsYqj094618; Sun, 1 Dec 2024 12:54:34 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:34 GMT Message-Id: <202412011254.4B1CsYqj094618@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 7954b908bdb1 - stable/13 - Fix buildworld with gcc 12 after llvm-19 import List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7954b908bdb1b5c5aae962bc9d9dbe197345f875 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7954b908bdb1b5c5aae962bc9d9dbe197345f875 commit 7954b908bdb1b5c5aae962bc9d9dbe197345f875 Author: Dimitry Andric AuthorDate: 2024-10-25 16:07:59 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:46 +0000 Fix buildworld with gcc 12 after llvm-19 import Unfortunately gcc 12's is not yet capable of compiling all of libc++ 19's C++23 code, which results in errors similar to: /usr/src/freebsd/src/contrib/llvm-project/libcxx/include/__algorithm/ranges_contains.h:41:3: error: 'static constexpr bool std::__1::ranges::__contains::__fn::operator()(_Iter, _Sent, const _Type&, _Proj)' must be a non-static member function 41 | operator()(_Iter __first, _Sent __last, const _Type& __value, _Proj __proj = {}) { | ^~~~~~~~ /usr/src/freebsd/src/contrib/llvm-project/libcxx/include/__algorithm/ranges_contains.h:48:3: error: 'static constexpr bool std::__1::ranges::__contains::__fn::operator()(_Range&&, const _Type&, _Proj)' must be a non-static member function 48 | operator()(_Range&& __range, const _Type& __value, _Proj __proj = {}) { | ^~~~~~~~ Until we can get rid of gcc 12, work around this by making it compile libc++ in C++20 mode instead. NOTE: The resulting libc++ library will not be C++23 compatible! Please try to avoid shipping it, and use gcc 13 instead, if you must use gcc. PR: 280562 MFC after: 3 days (cherry picked from commit bc9e19dce0abee80750e6fa04aaf979873bfe0d2) --- contrib/llvm-project/libcxx/src/expected.cpp | 2 ++ lib/libc++/Makefile | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/contrib/llvm-project/libcxx/src/expected.cpp b/contrib/llvm-project/libcxx/src/expected.cpp index f30efb516479..ed3bf9e37e35 100644 --- a/contrib/llvm-project/libcxx/src/expected.cpp +++ b/contrib/llvm-project/libcxx/src/expected.cpp @@ -9,5 +9,7 @@ #include _LIBCPP_BEGIN_NAMESPACE_STD +#if _LIBCPP_STD_VER >= 23 const char* bad_expected_access::what() const noexcept { return "bad access to std::expected"; } +#endif _LIBCPP_END_NAMESPACE_STD diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index 048a84ba6bf4..32687cb5a1b4 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -103,7 +103,15 @@ CFLAGS+= -ffunction-sections CFLAGS+= -fno-semantic-interposition CFLAGS+= -fvisibility-inlines-hidden CFLAGS+= -fvisibility=hidden + +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 130000 +# NOTE: gcc 12 cannot correctly compile all libc++'s C++23 code. To temporarily +# support gcc 12, compile libc++ in C++20 mode, but this will leave out any +# C++23 features. +CXXSTD?= c++20 +.else CXXSTD?= c++23 +.endif LIBADD+= cxxrt From nobody Sun Dec 1 12:54:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1RhC6l7zz5fbR1; Sun, 01 Dec 2024 12:54:35 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1RhC4h0rz4Pml; Sun, 1 Dec 2024 12:54:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HR3BgCNb0TCV/bIExPvMceX7RiEZ60RxYni1AOklLoY=; b=JX/LA0HhY5uUui180WCmkx85Z6BmWw7dRpiUIDbmndMNdd+AovAPTRr420CepW/fkVWvqK eUe6icxpJoTnLcc1gAm8liLeEXY1bC12DNlo2g7/tWFqqs0M4fUm9RFoMCj5x7y5FpSG8H tXEfXG9VXWGSdqyB4aW91CwRCYAxCZPCq0wJ9AsLK03RqjJk0pk3tQd/fO7tV/fiLTgN4h XjCk34twCcwwsYA9qDSw//MzPfTegVYBrReQQZBAd27DthcaSNuM1KMeVQcWMUWA5A0SzD eC8jLKLH9kvLhnUUfvQJELy+jMffn0EoBZW8hcyMQT07E6Eq6qgWiCykrQxXyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HR3BgCNb0TCV/bIExPvMceX7RiEZ60RxYni1AOklLoY=; b=GxTffWtGq2LD87ZkgsmbEY18XwCYQF8z+CAy/GmxKjE6BER/8QRxQsjykQEz7LHJn3uEK3 +S2QzMikpgGaw+0P8/zU7xqZUj5NfipOn4dR5uoU8Aczxa4N1/20TS0AOHh+ofreB4j9pt WjFDsda+Vuvyj4Xpdke2nFUCeZBtZ87rvAsnaiDAw/FyqseaKZ9fx9BYZJMxwI9P3n7SN/ goeK2BzPX102758wLNEIJJLOFcWiQrAR7oSdUoCHBiTuoL6+gDcEfuCrZSzHDKjhC+1N+3 vyi1ZYgqoG+OMW0ZcycY7eMCGDV46+aaCnsNfcm7Hw5la8dB0XSGYdEe5xzcAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057675; a=rsa-sha256; cv=none; b=fpipQRo248qfNmotr2bcPZWAIEni5BrXxyVuVlc+HYrI4xyIT4SjRxALu8yO6PYfM5c6RR tQsxfh+nEHCBkd8LB1Hf9rh00eeGauNrSDIzDU7KGJuZEAO3kBD73trDMzAo31VVHSuTiJ l5QuNr1Y+x4onOB/G7cAkdmgsCpK1Xc7SpNP7ukS93zKoLvWaNoDkSkjPJFPBhQ5C/NBwF Mpq7rnlLTaoUzsBU5mLSSbqWt6OluwPKujBwij8NB2RhQvSVptyZOO9YISeZdSRIIR3m1F ZRftJunbgvEn1gFqpVP+KZhBNWx2dSKSqswE48b9GPt4ErVjdZA20YQXW0BC+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1RhC4DzyztQD; Sun, 1 Dec 2024 12:54:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsZ44094671; Sun, 1 Dec 2024 12:54:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsZjr094668; Sun, 1 Dec 2024 12:54:35 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:35 GMT Message-Id: <202412011254.4B1CsZjr094668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: cdbdcbd7a12a - stable/13 - Merge llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cdbdcbd7a12aab6499ee6ade6ac3d8a60869c511 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cdbdcbd7a12aab6499ee6ade6ac3d8a60869c511 commit cdbdcbd7a12aab6499ee6ade6ac3d8a60869c511 Author: Dimitry Andric AuthorDate: 2024-11-08 11:32:34 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:46 +0000 Merge llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5, a.k.a. 19.1.3 release. PR: 280562 MFC after: 1 month (cherry picked from commit d686ce931cab72612a9e1ada9fe99d65e11a32a3) --- .../clang/include/clang/AST/ExternalASTSource.h | 48 ++++++++++++++++------ .../llvm-project/clang/lib/Basic/Targets/ARM.cpp | 2 + .../clang/lib/Basic/Targets/OSTargets.h | 4 ++ .../llvm-project/clang/lib/CodeGen/CGBuiltin.cpp | 45 +++++++++----------- .../clang/lib/CodeGen/CodeGenModule.cpp | 10 +++-- .../llvm-project/clang/lib/CodeGen/Targets/ARM.cpp | 3 ++ contrib/llvm-project/clang/lib/Driver/Driver.cpp | 5 ++- .../clang/lib/Driver/ToolChains/Arch/ARM.cpp | 7 ++++ .../clang/lib/Driver/ToolChains/Gnu.cpp | 2 + .../clang/lib/Driver/ToolChains/Linux.cpp | 1 + .../clang/lib/Format/UnwrappedLineParser.cpp | 5 +++ contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp | 11 +++-- .../clang/lib/Sema/SemaTemplateDeductionGuide.cpp | 21 ++++++++-- .../clang/lib/Serialization/ASTReaderDecl.cpp | 3 +- .../clang/lib/Serialization/ASTWriterDecl.cpp | 5 ++- .../sanitizer_procmaps_solaris.cpp | 4 ++ contrib/llvm-project/libcxx/include/__config | 2 +- .../llvm/include/llvm/TargetParser/Triple.h | 35 +++++++++++++--- .../llvm/lib/Analysis/ConstantFolding.cpp | 4 +- .../llvm/lib/Target/ARM/ARMSubtarget.h | 4 +- .../llvm/lib/Target/ARM/ARMTargetMachine.cpp | 2 + .../llvm/lib/Target/ARM/ARMTargetMachine.h | 1 + .../lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp | 6 +-- .../WebAssembly/WebAssemblyTargetMachine.cpp | 12 ++---- .../llvm/lib/TargetParser/ARMTargetParser.cpp | 3 ++ .../llvm-project/llvm/lib/TargetParser/Triple.cpp | 6 +++ .../llvm/lib/Transforms/Utils/InlineFunction.cpp | 2 +- .../llvm/lib/Transforms/Utils/ModuleUtils.cpp | 12 +++--- lib/clang/include/VCSVersion.inc | 6 +-- lib/clang/include/clang/Basic/Version.inc | 6 +-- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +-- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/libc++/__assertion_handler | 3 +- lib/libomp/kmp_config.h | 2 +- 37 files changed, 203 insertions(+), 97 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/AST/ExternalASTSource.h b/contrib/llvm-project/clang/include/clang/AST/ExternalASTSource.h index 385c32edbae0..582ed7c65f58 100644 --- a/contrib/llvm-project/clang/include/clang/AST/ExternalASTSource.h +++ b/contrib/llvm-project/clang/include/clang/AST/ExternalASTSource.h @@ -25,10 +25,12 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/iterator.h" #include "llvm/Support/PointerLikeTypeTraits.h" +#include #include #include #include #include +#include #include #include @@ -326,29 +328,49 @@ struct LazyOffsetPtr { /// /// If the low bit is clear, a pointer to the AST node. If the low /// bit is set, the upper 63 bits are the offset. - mutable uint64_t Ptr = 0; + static constexpr size_t DataSize = std::max(sizeof(uint64_t), sizeof(T *)); + alignas(uint64_t) alignas(T *) mutable unsigned char Data[DataSize] = {}; + + unsigned char GetLSB() const { + return Data[llvm::sys::IsBigEndianHost ? DataSize - 1 : 0]; + } + + template U &As(bool New) const { + unsigned char *Obj = + Data + (llvm::sys::IsBigEndianHost ? DataSize - sizeof(U) : 0); + if (New) + return *new (Obj) U; + return *std::launder(reinterpret_cast(Obj)); + } + + T *&GetPtr() const { return As(false); } + uint64_t &GetU64() const { return As(false); } + void SetPtr(T *Ptr) const { As(true) = Ptr; } + void SetU64(uint64_t U64) const { As(true) = U64; } public: LazyOffsetPtr() = default; - explicit LazyOffsetPtr(T *Ptr) : Ptr(reinterpret_cast(Ptr)) {} + explicit LazyOffsetPtr(T *Ptr) : Data() { SetPtr(Ptr); } - explicit LazyOffsetPtr(uint64_t Offset) : Ptr((Offset << 1) | 0x01) { + explicit LazyOffsetPtr(uint64_t Offset) : Data() { assert((Offset << 1 >> 1) == Offset && "Offsets must require < 63 bits"); if (Offset == 0) - Ptr = 0; + SetPtr(nullptr); + else + SetU64((Offset << 1) | 0x01); } LazyOffsetPtr &operator=(T *Ptr) { - this->Ptr = reinterpret_cast(Ptr); + SetPtr(Ptr); return *this; } LazyOffsetPtr &operator=(uint64_t Offset) { assert((Offset << 1 >> 1) == Offset && "Offsets must require < 63 bits"); if (Offset == 0) - Ptr = 0; + SetPtr(nullptr); else - Ptr = (Offset << 1) | 0x01; + SetU64((Offset << 1) | 0x01); return *this; } @@ -356,15 +378,15 @@ public: /// Whether this pointer is non-NULL. /// /// This operation does not require the AST node to be deserialized. - explicit operator bool() const { return Ptr != 0; } + explicit operator bool() const { return isOffset() || GetPtr() != nullptr; } /// Whether this pointer is non-NULL. /// /// This operation does not require the AST node to be deserialized. - bool isValid() const { return Ptr != 0; } + bool isValid() const { return isOffset() || GetPtr() != nullptr; } /// Whether this pointer is currently stored as an offset. - bool isOffset() const { return Ptr & 0x01; } + bool isOffset() const { return GetLSB() & 0x01; } /// Retrieve the pointer to the AST node that this lazy pointer points to. /// @@ -375,9 +397,9 @@ public: if (isOffset()) { assert(Source && "Cannot deserialize a lazy pointer without an AST source"); - Ptr = reinterpret_cast((Source->*Get)(OffsT(Ptr >> 1))); + SetPtr((Source->*Get)(OffsT(GetU64() >> 1))); } - return reinterpret_cast(Ptr); + return GetPtr(); } /// Retrieve the address of the AST node pointer. Deserializes the pointee if @@ -385,7 +407,7 @@ public: T **getAddressOfPointer(ExternalASTSource *Source) const { // Ensure the integer is in pointer form. (void)get(Source); - return reinterpret_cast(&Ptr); + return &GetPtr(); } }; diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp index 7423626d7c3c..e55feedbd5c6 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp @@ -311,7 +311,9 @@ ARMTargetInfo::ARMTargetInfo(const llvm::Triple &Triple, switch (Triple.getEnvironment()) { case llvm::Triple::Android: case llvm::Triple::GNUEABI: + case llvm::Triple::GNUEABIT64: case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABIHFT64: case llvm::Triple::MuslEABI: case llvm::Triple::MuslEABIHF: case llvm::Triple::OpenHOS: diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h b/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h index 5f27c3469f86..357c1965057c 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h @@ -337,6 +337,10 @@ protected: Builder.defineMacro("_GNU_SOURCE"); if (this->HasFloat128) Builder.defineMacro("__FLOAT128__"); + if (Triple.isTime64ABI()) { + Builder.defineMacro("_FILE_OFFSET_BITS", "64"); + Builder.defineMacro("_TIME_BITS", "64"); + } } public: diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp index 5639239359ab..86d47054615e 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp @@ -1001,6 +1001,24 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, // Can't find the field referenced by the "counted_by" attribute. return nullptr; + if (isa(Base)) + // The whole struct is specificed in the __bdos. The calculation of the + // whole size of the structure can be done in two ways: + // + // 1) sizeof(struct S) + count * sizeof(typeof(fam)) + // 2) offsetof(struct S, fam) + count * sizeof(typeof(fam)) + // + // The first will add additional padding after the end of the array, + // allocation while the second method is more precise, but not quite + // expected from programmers. See + // https://lore.kernel.org/lkml/ZvV6X5FPBBW7CO1f@archlinux/ for a + // discussion of the topic. + // + // GCC isn't (currently) able to calculate __bdos on a pointer to the whole + // structure. Therefore, because of the above issue, we'll choose to match + // what GCC does for consistency's sake. + return nullptr; + // Build a load of the counted_by field. bool IsSigned = CountedByFD->getType()->isSignedIntegerType(); Value *CountedByInst = EmitCountedByFieldExpr(Base, FAMDecl, CountedByFD); @@ -1031,32 +1049,9 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, CharUnits Size = Ctx.getTypeSizeInChars(ArrayTy->getElementType()); llvm::Constant *ElemSize = llvm::ConstantInt::get(ResType, Size.getQuantity(), IsSigned); - Value *FAMSize = + Value *Res = Builder.CreateMul(CountedByInst, ElemSize, "", !IsSigned, IsSigned); - FAMSize = Builder.CreateIntCast(FAMSize, ResType, IsSigned); - Value *Res = FAMSize; - - if (isa(Base)) { - // The whole struct is specificed in the __bdos. - const ASTRecordLayout &Layout = Ctx.getASTRecordLayout(OuterRD); - - // Get the offset of the FAM. - llvm::Constant *FAMOffset = ConstantInt::get(ResType, Offset, IsSigned); - Value *OffsetAndFAMSize = - Builder.CreateAdd(FAMOffset, Res, "", !IsSigned, IsSigned); - - // Get the full size of the struct. - llvm::Constant *SizeofStruct = - ConstantInt::get(ResType, Layout.getSize().getQuantity(), IsSigned); - - // max(sizeof(struct s), - // offsetof(struct s, array) + p->count * sizeof(*p->array)) - Res = IsSigned - ? Builder.CreateBinaryIntrinsic(llvm::Intrinsic::smax, - OffsetAndFAMSize, SizeofStruct) - : Builder.CreateBinaryIntrinsic(llvm::Intrinsic::umax, - OffsetAndFAMSize, SizeofStruct); - } + Res = Builder.CreateIntCast(Res, ResType, IsSigned); // A negative \p IdxInst or \p CountedByInst means that the index lands // outside of the flexible array member. If that's the case, we want to diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp index cf5e29e5a3db..151505baf38d 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp @@ -177,10 +177,7 @@ createTargetCodeGenInfo(CodeGenModule &CGM) { else if (ABIStr == "aapcs16") Kind = ARMABIKind::AAPCS16_VFP; else if (CodeGenOpts.FloatABI == "hard" || - (CodeGenOpts.FloatABI != "soft" && - (Triple.getEnvironment() == llvm::Triple::GNUEABIHF || - Triple.getEnvironment() == llvm::Triple::MuslEABIHF || - Triple.getEnvironment() == llvm::Triple::EABIHF))) + (CodeGenOpts.FloatABI != "soft" && Triple.isHardFloatABI())) Kind = ARMABIKind::AAPCS_VFP; return createARMTargetCodeGenInfo(CGM, Kind); @@ -1137,6 +1134,11 @@ void CodeGenModule::Release() { CodeGenOpts.SanitizeCfiCanonicalJumpTables); } + if (CodeGenOpts.SanitizeCfiICallNormalizeIntegers) { + getModule().addModuleFlag(llvm::Module::Override, "cfi-normalize-integers", + 1); + } + if (LangOpts.Sanitize.has(SanitizerKind::KCFI)) { getModule().addModuleFlag(llvm::Module::Override, "kcfi", 1); // KCFI assumes patchable-function-prefix is the same for all indirectly diff --git a/contrib/llvm-project/clang/lib/CodeGen/Targets/ARM.cpp b/contrib/llvm-project/clang/lib/CodeGen/Targets/ARM.cpp index d032b88d7683..457d761039a0 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/Targets/ARM.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/Targets/ARM.cpp @@ -35,7 +35,9 @@ public: case llvm::Triple::EABI: case llvm::Triple::EABIHF: case llvm::Triple::GNUEABI: + case llvm::Triple::GNUEABIT64: case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABIHFT64: case llvm::Triple::MuslEABI: case llvm::Triple::MuslEABIHF: return true; @@ -48,6 +50,7 @@ public: switch (getTarget().getTriple().getEnvironment()) { case llvm::Triple::EABIHF: case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABIHFT64: case llvm::Triple::MuslEABIHF: return true; default: diff --git a/contrib/llvm-project/clang/lib/Driver/Driver.cpp b/contrib/llvm-project/clang/lib/Driver/Driver.cpp index 8e44d5afa40e..ecae475f75da 100644 --- a/contrib/llvm-project/clang/lib/Driver/Driver.cpp +++ b/contrib/llvm-project/clang/lib/Driver/Driver.cpp @@ -602,7 +602,8 @@ static llvm::Triple computeTargetTriple(const Driver &D, if (A->getOption().matches(options::OPT_m64) || A->getOption().matches(options::OPT_maix64)) { AT = Target.get64BitArchVariant().getArch(); - if (Target.getEnvironment() == llvm::Triple::GNUX32) + if (Target.getEnvironment() == llvm::Triple::GNUX32 || + Target.getEnvironment() == llvm::Triple::GNUT64) Target.setEnvironment(llvm::Triple::GNU); else if (Target.getEnvironment() == llvm::Triple::MuslX32) Target.setEnvironment(llvm::Triple::Musl); @@ -665,11 +666,13 @@ static llvm::Triple computeTargetTriple(const Driver &D, } else if (ABIName == "n32") { Target = Target.get64BitArchVariant(); if (Target.getEnvironment() == llvm::Triple::GNU || + Target.getEnvironment() == llvm::Triple::GNUT64 || Target.getEnvironment() == llvm::Triple::GNUABI64) Target.setEnvironment(llvm::Triple::GNUABIN32); } else if (ABIName == "64") { Target = Target.get64BitArchVariant(); if (Target.getEnvironment() == llvm::Triple::GNU || + Target.getEnvironment() == llvm::Triple::GNUT64 || Target.getEnvironment() == llvm::Triple::GNUABIN32) Target.setEnvironment(llvm::Triple::GNUABI64); } diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/ARM.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/ARM.cpp index a6041b809b80..0489911ecd9d 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/ARM.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/ARM.cpp @@ -327,6 +327,11 @@ void arm::setFloatABIInTriple(const Driver &D, const ArgList &Args, Triple.setEnvironment(isHardFloat ? llvm::Triple::GNUEABIHF : llvm::Triple::GNUEABI); break; + case llvm::Triple::GNUEABIT64: + case llvm::Triple::GNUEABIHFT64: + Triple.setEnvironment(isHardFloat ? llvm::Triple::GNUEABIHFT64 + : llvm::Triple::GNUEABIT64); + break; case llvm::Triple::EABI: case llvm::Triple::EABIHF: Triple.setEnvironment(isHardFloat ? llvm::Triple::EABIHF @@ -414,10 +419,12 @@ arm::FloatABI arm::getDefaultFloatABI(const llvm::Triple &Triple) { return FloatABI::Soft; switch (Triple.getEnvironment()) { case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABIHFT64: case llvm::Triple::MuslEABIHF: case llvm::Triple::EABIHF: return FloatABI::Hard; case llvm::Triple::GNUEABI: + case llvm::Triple::GNUEABIT64: case llvm::Triple::MuslEABI: case llvm::Triple::EABI: // EABI is always AAPCS, and if it was not marked 'hard', it's softfp diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp index 543f3965dfd4..5e9a655eaf82 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2694,6 +2694,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( case llvm::Triple::thumb: LibDirs.append(begin(ARMLibDirs), end(ARMLibDirs)); if (TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHF || + TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHFT64 || TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF || TargetTriple.getEnvironment() == llvm::Triple::EABIHF) { TripleAliases.append(begin(ARMHFTriples), end(ARMHFTriples)); @@ -2705,6 +2706,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( case llvm::Triple::thumbeb: LibDirs.append(begin(ARMebLibDirs), end(ARMebLibDirs)); if (TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHF || + TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHFT64 || TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF || TargetTriple.getEnvironment() == llvm::Triple::EABIHF) { TripleAliases.append(begin(ARMebHFTriples), end(ARMebHFTriples)); diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp index 2265138edbff..35bf39069605 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp @@ -508,6 +508,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { case llvm::Triple::thumbeb: { const bool HF = Triple.getEnvironment() == llvm::Triple::GNUEABIHF || + Triple.getEnvironment() == llvm::Triple::GNUEABIHFT64 || tools::arm::getARMFloatABI(*this, Args) == tools::arm::FloatABI::Hard; LibDir = "lib"; diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp index 631c7c62baac..a5268e153bcc 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp @@ -2500,6 +2500,11 @@ bool UnwrappedLineParser::parseBracedList(bool IsAngleBracket, bool IsEnum) { // Assume there are no blocks inside a braced init list apart // from the ones we explicitly parse out (like lambdas). FormatTok->setBlockKind(BK_BracedInit); + if (!IsAngleBracket) { + auto *Prev = FormatTok->Previous; + if (Prev && Prev->is(tok::greater)) + Prev->setFinalizedType(TT_TemplateCloser); + } nextToken(); parseBracedList(); break; diff --git a/contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp b/contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp index 22d38adc28eb..3ac1f0fa27f8 100644 --- a/contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp +++ b/contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp @@ -1508,10 +1508,13 @@ StmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) { SourceLocation ConstevalLoc; if (Tok.is(tok::kw_constexpr)) { - Diag(Tok, getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_constexpr_if - : diag::ext_constexpr_if); - IsConstexpr = true; - ConsumeToken(); + // C23 supports constexpr keyword, but only for object definitions. + if (getLangOpts().CPlusPlus) { + Diag(Tok, getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_constexpr_if + : diag::ext_constexpr_if); + IsConstexpr = true; + ConsumeToken(); + } } else { if (Tok.is(tok::exclaim)) { NotLocation = ConsumeToken(); diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateDeductionGuide.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateDeductionGuide.cpp index 0602d07c6b9b..1bf82b31def9 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateDeductionGuide.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateDeductionGuide.cpp @@ -69,8 +69,8 @@ public: ExtractTypeForDeductionGuide( Sema &SemaRef, llvm::SmallVectorImpl &MaterializedTypedefs, - ClassTemplateDecl *NestedPattern, - const MultiLevelTemplateArgumentList *OuterInstantiationArgs) + ClassTemplateDecl *NestedPattern = nullptr, + const MultiLevelTemplateArgumentList *OuterInstantiationArgs = nullptr) : Base(SemaRef), MaterializedTypedefs(MaterializedTypedefs), NestedPattern(NestedPattern), OuterInstantiationArgs(OuterInstantiationArgs) { @@ -1263,10 +1263,25 @@ FunctionTemplateDecl *DeclareAggregateDeductionGuideForTypeAlias( getRHSTemplateDeclAndArgs(SemaRef, AliasTemplate).first; if (!RHSTemplate) return nullptr; + + llvm::SmallVector TypedefDecls; + llvm::SmallVector NewParamTypes; + ExtractTypeForDeductionGuide TypeAliasTransformer(SemaRef, TypedefDecls); + for (QualType P : ParamTypes) { + QualType Type = TypeAliasTransformer.TransformType(P); + if (Type.isNull()) + return nullptr; + NewParamTypes.push_back(Type); + } + auto *RHSDeductionGuide = SemaRef.DeclareAggregateDeductionGuideFromInitList( - RHSTemplate, ParamTypes, Loc); + RHSTemplate, NewParamTypes, Loc); if (!RHSDeductionGuide) return nullptr; + + for (TypedefNameDecl *TD : TypedefDecls) + TD->setDeclContext(RHSDeductionGuide->getTemplatedDecl()); + return BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, RHSDeductionGuide, Loc); } diff --git a/contrib/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp b/contrib/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp index c118f3818467..154acdfbe032 100644 --- a/contrib/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/contrib/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp @@ -2665,7 +2665,8 @@ void ASTDeclReader::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { D->setDeclaredWithTypename(Record.readInt()); - if (D->hasTypeConstraint()) { + const bool TypeConstraintInitialized = Record.readBool(); + if (TypeConstraintInitialized && D->hasTypeConstraint()) { ConceptReference *CR = nullptr; if (Record.readBool()) CR = Record.readConceptReference(); diff --git a/contrib/llvm-project/clang/lib/Serialization/ASTWriterDecl.cpp b/contrib/llvm-project/clang/lib/Serialization/ASTWriterDecl.cpp index 8a4ca54349e3..ff1334340874 100644 --- a/contrib/llvm-project/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/contrib/llvm-project/clang/lib/Serialization/ASTWriterDecl.cpp @@ -1880,7 +1880,7 @@ void ASTDeclWriter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { Record.push_back(D->wasDeclaredWithTypename()); const TypeConstraint *TC = D->getTypeConstraint(); - assert((bool)TC == D->hasTypeConstraint()); + Record.push_back(/*TypeConstraintInitialized=*/TC != nullptr); if (TC) { auto *CR = TC->getConceptReference(); Record.push_back(CR != nullptr); @@ -1898,7 +1898,7 @@ void ASTDeclWriter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { if (OwnsDefaultArg) Record.AddTemplateArgumentLoc(D->getDefaultArgument()); - if (!TC && !OwnsDefaultArg && + if (!D->hasTypeConstraint() && !OwnsDefaultArg && D->getDeclContext() == D->getLexicalDeclContext() && !D->isInvalidDecl() && !D->hasAttrs() && !D->isTopLevelDeclInObjCContainer() && !D->isImplicit() && @@ -2561,6 +2561,7 @@ void ASTWriter::WriteDeclAbbrevs() { // TemplateTypeParmDecl Abv->Add( BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // wasDeclaredWithTypename + Abv->Add(BitCodeAbbrevOp(0)); // TypeConstraintInitialized Abv->Add(BitCodeAbbrevOp(0)); // OwnsDefaultArg DeclTemplateTypeParmAbbrev = Stream.EmitAbbrev(std::move(Abv)); diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp index eeb49e2afe34..80b8158f43db 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp @@ -11,6 +11,10 @@ // Before Solaris 11.4, doesn't work in a largefile environment. #undef _FILE_OFFSET_BITS + +// Avoid conflict between `_TIME_BITS` defined vs. `_FILE_OFFSET_BITS` +// undefined in some Linux configurations. +#undef _TIME_BITS #include "sanitizer_platform.h" #if SANITIZER_SOLARIS # include diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 87b6d9d19e83..7d735e5b6601 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -27,7 +27,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 190102 +# define _LIBCPP_VERSION 190103 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h b/contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h index ebd92f264d90..d2126a03db90 100644 --- a/contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h +++ b/contrib/llvm-project/llvm/include/llvm/TargetParser/Triple.h @@ -294,7 +294,11 @@ public: PAuthTest, - LastEnvironmentType = PAuthTest + GNUT64, + GNUEABIT64, + GNUEABIHFT64, + + LastEnvironmentType = GNUEABIHFT64 }; enum ObjectFormatType { UnknownObjectFormat, @@ -605,11 +609,12 @@ public: bool isGNUEnvironment() const { EnvironmentType Env = getEnvironment(); - return Env == Triple::GNU || Env == Triple::GNUABIN32 || - Env == Triple::GNUABI64 || Env == Triple::GNUEABI || - Env == Triple::GNUEABIHF || Env == Triple::GNUF32 || - Env == Triple::GNUF64 || Env == Triple::GNUSF || - Env == Triple::GNUX32; + return Env == Triple::GNU || Env == Triple::GNUT64 || + Env == Triple::GNUABIN32 || Env == Triple::GNUABI64 || + Env == Triple::GNUEABI || Env == Triple::GNUEABIT64 || + Env == Triple::GNUEABIHF || Env == Triple::GNUEABIHFT64 || + Env == Triple::GNUF32 || Env == Triple::GNUF64 || + Env == Triple::GNUSF || Env == Triple::GNUX32; } /// Tests whether the OS is Haiku. @@ -866,9 +871,11 @@ public: return (isARM() || isThumb()) && (getEnvironment() == Triple::EABI || getEnvironment() == Triple::GNUEABI || + getEnvironment() == Triple::GNUEABIT64 || getEnvironment() == Triple::MuslEABI || getEnvironment() == Triple::EABIHF || getEnvironment() == Triple::GNUEABIHF || + getEnvironment() == Triple::GNUEABIHFT64 || getEnvironment() == Triple::OpenHOS || getEnvironment() == Triple::MuslEABIHF || isAndroid()) && isOSBinFormatELF(); @@ -1046,6 +1053,22 @@ public: return getArch() == Triple::bpfel || getArch() == Triple::bpfeb; } + /// Tests if the target forces 64-bit time_t on a 32-bit architecture. + bool isTime64ABI() const { + EnvironmentType Env = getEnvironment(); + return Env == Triple::GNUT64 || Env == Triple::GNUEABIT64 || + Env == Triple::GNUEABIHFT64; + } + + /// Tests if the target forces hardfloat. + bool isHardFloatABI() const { + EnvironmentType Env = getEnvironment(); + return Env == llvm::Triple::GNUEABIHF || + Env == llvm::Triple::GNUEABIHFT64 || + Env == llvm::Triple::MuslEABIHF || + Env == llvm::Triple::EABIHF; + } + /// Tests whether the target supports comdat bool supportsCOMDAT() const { return !(isOSBinFormatMachO() || isOSBinFormatXCOFF() || diff --git a/contrib/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp b/contrib/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp index df75745645e0..ff30fece5fce 100644 --- a/contrib/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp +++ b/contrib/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp @@ -1784,8 +1784,8 @@ Constant *ConstantFoldFP(double (*NativeFP)(double), const APFloat &V, } #if defined(HAS_IEE754_FLOAT128) && defined(HAS_LOGF128) -Constant *ConstantFoldFP128(long double (*NativeFP)(long double), - const APFloat &V, Type *Ty) { +Constant *ConstantFoldFP128(float128 (*NativeFP)(float128), const APFloat &V, + Type *Ty) { llvm_fenv_clearexcept(); float128 Result = NativeFP(V.convertToQuad()); if (llvm_fenv_testexcept()) { diff --git a/contrib/llvm-project/llvm/lib/Target/ARM/ARMSubtarget.h b/contrib/llvm-project/llvm/lib/Target/ARM/ARMSubtarget.h index 00239ff94b7b..6d301efd5618 100644 --- a/contrib/llvm-project/llvm/lib/Target/ARM/ARMSubtarget.h +++ b/contrib/llvm-project/llvm/lib/Target/ARM/ARMSubtarget.h @@ -325,7 +325,9 @@ public: } bool isTargetGNUAEABI() const { return (TargetTriple.getEnvironment() == Triple::GNUEABI || - TargetTriple.getEnvironment() == Triple::GNUEABIHF) && + TargetTriple.getEnvironment() == Triple::GNUEABIT64 || + TargetTriple.getEnvironment() == Triple::GNUEABIHF || + TargetTriple.getEnvironment() == Triple::GNUEABIHFT64) && !isTargetDarwin() && !isTargetWindows(); } bool isTargetMuslAEABI() const { diff --git a/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.cpp index 7553778c5740..a58c63dcf762 100644 --- a/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.cpp +++ b/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.cpp @@ -241,7 +241,9 @@ ARMBaseTargetMachine::ARMBaseTargetMachine(const Target &T, const Triple &TT, Options.EABIVersion == EABI::Unknown) { // musl is compatible with glibc with regard to EABI version if ((TargetTriple.getEnvironment() == Triple::GNUEABI || + TargetTriple.getEnvironment() == Triple::GNUEABIT64 || TargetTriple.getEnvironment() == Triple::GNUEABIHF || + TargetTriple.getEnvironment() == Triple::GNUEABIHFT64 || TargetTriple.getEnvironment() == Triple::MuslEABI || TargetTriple.getEnvironment() == Triple::MuslEABIHF || TargetTriple.getEnvironment() == Triple::OpenHOS) && diff --git a/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.h b/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.h index 69d8fa8ada64..75ee50f0e93c 100644 --- a/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.h +++ b/contrib/llvm-project/llvm/lib/Target/ARM/ARMTargetMachine.h @@ -64,6 +64,7 @@ public: bool isTargetHardFloat() const { return TargetTriple.getEnvironment() == Triple::GNUEABIHF || + TargetTriple.getEnvironment() == Triple::GNUEABIHFT64 || TargetTriple.getEnvironment() == Triple::MuslEABIHF || TargetTriple.getEnvironment() == Triple::EABIHF || (TargetTriple.isOSBinFormatMachO() && diff --git a/contrib/llvm-project/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp b/contrib/llvm-project/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp index 388d58a82214..c0bc1276967b 100644 --- a/contrib/llvm-project/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp @@ -88,15 +88,15 @@ static void adjustBranch(unsigned Size, const MCFixup &Fixup, uint64_t &Value, /// Adjusts the value of a relative branch target before fixup application. static void adjustRelativeBranch(unsigned Size, const MCFixup &Fixup, uint64_t &Value, MCContext *Ctx = nullptr) { + // Jumps are relative to the current instruction. + Value -= 2; + // We have one extra bit of precision because the value is rightshifted by // one. signed_width(Size + 1, Value, std::string("branch target"), Fixup, Ctx); // Rightshifts the value by one. AVR::fixups::adjustBranchTarget(Value); - - // Jumps are relative to the current instruction. - Value -= 1; } /// 22-bit absolute fixup. diff --git a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp index 23539a5f4b26..ac9e6d5a90cb 100644 --- a/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp +++ b/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp @@ -202,8 +202,7 @@ public: bool runOnModule(Module &M) override { FeatureBitset Features = coalesceFeatures(M); - std::string FeatureStr = - getFeatureString(Features, WasmTM->getTargetFeatureString()); + std::string FeatureStr = getFeatureString(Features); WasmTM->setTargetFeatureString(FeatureStr); for (auto &F : M) replaceFeatures(F, FeatureStr); @@ -241,17 +240,14 @@ private: return Features; } - static std::string getFeatureString(const FeatureBitset &Features, - StringRef TargetFS) { + static std::string getFeatureString(const FeatureBitset &Features) { std::string Ret; for (const SubtargetFeatureKV &KV : WebAssemblyFeatureKV) { if (Features[KV.Value]) Ret += (StringRef("+") + KV.Key + ",").str(); + else + Ret += (StringRef("-") + KV.Key + ",").str(); } - SubtargetFeatures TF{TargetFS}; - for (std::string const &F : TF.getFeatures()) - if (!SubtargetFeatures::isEnabled(F)) - Ret += F + ","; return Ret; } diff --git a/contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParser.cpp b/contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParser.cpp index 9d9917d86a36..5e9dd94b84b2 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParser.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParser.cpp @@ -554,7 +554,9 @@ StringRef ARM::computeDefaultTargetABI(const Triple &TT, StringRef CPU) { switch (TT.getEnvironment()) { case Triple::Android: case Triple::GNUEABI: + case Triple::GNUEABIT64: case Triple::GNUEABIHF: + case Triple::GNUEABIHFT64: case Triple::MuslEABI: case Triple::MuslEABIHF: case Triple::OpenHOS: @@ -635,6 +637,7 @@ StringRef ARM::getARMCPUForArch(const llvm::Triple &Triple, StringRef MArch) { switch (Triple.getEnvironment()) { case llvm::Triple::EABIHF: case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABIHFT64: case llvm::Triple::MuslEABIHF: return "arm1176jzf-s"; default: diff --git a/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp b/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp index bf89aace65e5..21d6c74b5956 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp @@ -317,10 +317,13 @@ StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) { case EABI: return "eabi"; case EABIHF: return "eabihf"; case GNU: return "gnu"; + case GNUT64: return "gnut64"; case GNUABI64: return "gnuabi64"; case GNUABIN32: return "gnuabin32"; case GNUEABI: return "gnueabi"; + case GNUEABIT64: return "gnueabit64"; case GNUEABIHF: return "gnueabihf"; + case GNUEABIHFT64: return "gnueabihft64"; case GNUF32: return "gnuf32"; case GNUF64: return "gnuf64"; case GNUSF: return "gnusf"; @@ -693,7 +696,9 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) { .StartsWith("eabi", Triple::EABI) .StartsWith("gnuabin32", Triple::GNUABIN32) .StartsWith("gnuabi64", Triple::GNUABI64) + .StartsWith("gnueabihft64", Triple::GNUEABIHFT64) .StartsWith("gnueabihf", Triple::GNUEABIHF) + .StartsWith("gnueabit64", Triple::GNUEABIT64) .StartsWith("gnueabi", Triple::GNUEABI) .StartsWith("gnuf32", Triple::GNUF32) .StartsWith("gnuf64", Triple::GNUF64) @@ -701,6 +706,7 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) { .StartsWith("gnux32", Triple::GNUX32) .StartsWith("gnu_ilp32", Triple::GNUILP32) .StartsWith("code16", Triple::CODE16) + .StartsWith("gnut64", Triple::GNUT64) .StartsWith("gnu", Triple::GNU) .StartsWith("android", Triple::Android) .StartsWith("musleabihf", Triple::MuslEABIHF) diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp index 68696789530f..fda1c22cc1fb 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1395,7 +1395,7 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, if (!Arg) continue; - if (AL.hasParamAttr(I, Attribute::ByVal)) + if (NewInnerCB->paramHasAttr(I, Attribute::ByVal)) // It's unsound to propagate memory attributes to byval arguments. // Even if CalledFunction doesn't e.g. write to the argument, // the call to NewInnerCB may write to its by-value copy. diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp index 122279160cc7..95bf9f06bc33 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp @@ -161,11 +161,13 @@ void llvm::setKCFIType(Module &M, Function &F, StringRef MangledType) { // Matches CodeGenModule::CreateKCFITypeId in Clang. LLVMContext &Ctx = M.getContext(); MDBuilder MDB(Ctx); - F.setMetadata( - LLVMContext::MD_kcfi_type, - MDNode::get(Ctx, MDB.createConstant(ConstantInt::get( - Type::getInt32Ty(Ctx), - static_cast(xxHash64(MangledType)))))); + std::string Type = MangledType.str(); + if (M.getModuleFlag("cfi-normalize-integers")) + Type += ".normalized"; + F.setMetadata(LLVMContext::MD_kcfi_type, + MDNode::get(Ctx, MDB.createConstant(ConstantInt::get( + Type::getInt32Ty(Ctx), + static_cast(xxHash64(Type)))))); // If the module was compiled with -fpatchable-function-entry, ensure // we use the same patchable-function-prefix. if (auto *MD = mdconst::extract_or_null( diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index 5b4ac649986a..b514dee27f3a 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-19.1.2-0-g7ba7d8e2f7b6" +#define LLVM_REVISION "llvmorg-19.1.3-0-gab51eccf88f5" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-19.1.2-0-g7ba7d8e2f7b6" +#define CLANG_REVISION "llvmorg-19.1.3-0-gab51eccf88f5" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-19.1.2-0-g7ba7d8e2f7b6" +#define LLDB_REVISION "llvmorg-19.1.3-0-gab51eccf88f5" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index 163d9b601b93..2795c08bec37 100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@ -1,8 +1,8 @@ -#define CLANG_VERSION 19.1.2 -#define CLANG_VERSION_STRING "19.1.2" +#define CLANG_VERSION 19.1.3 +#define CLANG_VERSION_STRING "19.1.3" #define CLANG_VERSION_MAJOR 19 #define CLANG_VERSION_MAJOR_STRING "19" #define CLANG_VERSION_MINOR 1 -#define CLANG_VERSION_PATCHLEVEL 2 +#define CLANG_VERSION_PATCHLEVEL 3 #define CLANG_VENDOR "FreeBSD " diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index f207be812952..834cd39007ca 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1400007 -#define LLD_VERSION_STRING "19.1.2 (FreeBSD llvmorg-19.1.2-0-g7ba7d8e2f7b6-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "19.1.3 (FreeBSD llvmorg-19.1.3-0-gab51eccf88f5-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc index be36ec215810..1e614fc8a0cc 100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@ -1,6 +1,6 @@ -#define LLDB_VERSION 19.1.2 -#define LLDB_VERSION_STRING "19.1.2" +#define LLDB_VERSION 19.1.3 +#define LLDB_VERSION_STRING "19.1.3" #define LLDB_VERSION_MAJOR 19 #define LLDB_VERSION_MINOR 1 -#define LLDB_VERSION_PATCH 2 +#define LLDB_VERSION_PATCH 3 /* #undef LLDB_FULL_VERSION_STRING */ diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h index 2ad54b836743..972b3c894dac 100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@ -338,10 +338,10 @@ #define PACKAGE_NAME "LLVM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "LLVM 19.1.2" +#define PACKAGE_STRING "LLVM 19.1.3" /* Define to the version of this package. */ -#define PACKAGE_VERSION "19.1.2" +#define PACKAGE_VERSION "19.1.3" /* Define to the vendor of this package. */ /* #undef PACKAGE_VENDOR */ diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h index 0d8253e78646..c3a1df747ff6 100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@ -176,10 +176,10 @@ #define LLVM_VERSION_MINOR 1 /* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 2 +#define LLVM_VERSION_PATCH 3 /* LLVM version string */ -#define LLVM_VERSION_STRING "19.1.2" +#define LLVM_VERSION_STRING "19.1.3" /* Whether LLVM records statistics for use with GetStatistics(), * PrintStatistics() or PrintStatisticsJSON() diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index a9cdf75b6b13..361bd66edf2f 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,2 +1,2 @@ -#define LLVM_REVISION "llvmorg-19.1.2-0-g7ba7d8e2f7b6" +#define LLVM_REVISION "llvmorg-19.1.3-0-gab51eccf88f5" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/libc++/__assertion_handler b/lib/libc++/__assertion_handler index 3b6d6b2cca53..e12ccccdaff3 100644 --- a/lib/libc++/__assertion_handler +++ b/lib/libc++/__assertion_handler @@ -26,7 +26,8 @@ # if __has_builtin(__builtin_verbose_trap) // AppleClang shipped a slightly different version of __builtin_verbose_trap from the upstream // version before upstream Clang actually got the builtin. -# if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 17000 +// TODO: Remove once AppleClang supports the two-arguments version of the builtin. +# if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1700 # define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap(message) # else # define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap("libc++", message) diff --git a/lib/libomp/kmp_config.h b/lib/libomp/kmp_config.h index 3a8f726353bf..9caf4b8cdf44 100644 --- a/lib/libomp/kmp_config.h +++ b/lib/libomp/kmp_config.h @@ -148,7 +148,7 @@ #define ENABLE_LIBOMPTARGET OPENMP_ENABLE_LIBOMPTARGET // Configured cache line based on architecture -#if KMP_ARCH_PPC64 +#if KMP_ARCH_PPC64 || KMP_ARCH_PPC # define CACHE_LINE 128 #elif KMP_ARCH_AARCH64_A64FX # define CACHE_LINE 256 From nobody Sun Dec 1 12:54:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1RhF2jyPz5fb63; Sun, 01 Dec 2024 12:54:37 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1RhD5xJXz4Pf7; Sun, 1 Dec 2024 12:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d3SbBnF4BB4SGYCF3+ivXxJrpef1MYUdNVKHIEoXRQ8=; b=iw4S60HPu+ef7y1xSBUAiU5Zdw+wqyKmg1DGQ15WbcKHLd5lSJE/80Ds46iI9h2KIRUd1n KKP1dlZ51Kfudz/A+wE2r0dTKKM51jXeyQyC3Le49aAzUxq5yyAfRGnZbxjroCJQrJqHTa BdvMZL/eTytvoLl0FRagQx9WeS7HwQSq30zeejbOqcD6CX9ZkSF0xziqAK59S/6pFijxMF Iu+Q9PyaNDs78sRb9HCtwYd6qTPOY4fVFFQ+mp/hdthMhbQmBDIvIKNov6sBvccZmVslBW 0gn+0EPtSmKejeBiP4JG5oMT/ltIDUK82IJKv4D/o6a3Dwz4gxJkLXh8sjfB+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d3SbBnF4BB4SGYCF3+ivXxJrpef1MYUdNVKHIEoXRQ8=; b=QkqZzqbjwdAG4HYrYOnNv+VR3ZF/p3AzAPK+z77C95VbTq6IvLnbzWdxN3bY2d9kQ3MPet yivhFSV4Tnr+AfmQ1NYGIPZRIL0K7AqhOmqkNt/HD5ak7sOY5B5hm/piVlTws8TnQgo/ob C2jy43xB+DoU8ZoHVC9gxQKUqeqmMSsgYKxvrFKKQJG/NR5ibSc+BHnHlhZyEPQb0Ph+FY BntOPTjOe/1HNRHuOx3vErQaSc//m1IjAmiNQjWu0tff/tbU2RlKs86/FXooeRDf2U9eU4 P8qPrSrfzF1Z1MqHhHINzq+FAVjW6fecjmjmV4tVPUQjt3cOI02AZ3VQWA+siQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057676; a=rsa-sha256; cv=none; b=C3L19xDRbSP943fmVwW99KT26wO/z/HIZNh/gqkeDvIs4sS8mu+K/kBJpu0BqVyLEsIlcc /IDz/yi6JyhOtly6ZC0WuDegRf7TEQV7HfqDmEJQmdUJvgbWcpxd0hfDMGmpdWJspBpKtl HGe+BNhGyS7Iq6yoZ+lJ1IFV+i4e5nDVUkz6Q4xKJfG8bcQeYgc2gc+tW9u/OolnNRM1m0 tQRMy9huC6gPrmgJ2XGzdHTN7gb6GgAs9jKhyQF2yVff75d7RB7J1t8una08eEzjYtzOLu klPpml4DtBV62DOmxymFdpyPZbyq8Y002ft5eAhRH1FinQMTHUuCenoGSOvHpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1RhD5XKYztNW; Sun, 1 Dec 2024 12:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsaN8094710; Sun, 1 Dec 2024 12:54:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsapH094707; Sun, 1 Dec 2024 12:54:36 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:36 GMT Message-Id: <202412011254.4B1CsapH094707@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 5dc061642ece - stable/13 - Merge llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76e List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5dc061642ece481a125dd3b48f8a6e5fb1fc0ef8 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5dc061642ece481a125dd3b48f8a6e5fb1fc0ef8 commit 5dc061642ece481a125dd3b48f8a6e5fb1fc0ef8 Author: Dimitry Andric AuthorDate: 2024-11-21 13:03:43 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:47 +0000 Merge llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76e This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76e, a.k.a. 19.1.4 release. PR: 280562 MFC after: 1 month (cherry picked from commit 415efcecd8b80f68e76376ef2b854cb6f5c84b5a) --- .../include/clang/Basic/BuiltinsLoongArchLASX.def | 146 ++++++++++----------- .../include/clang/Basic/BuiltinsLoongArchLSX.def | 132 +++++++++---------- contrib/llvm-project/clang/lib/AST/Decl.cpp | 10 +- .../llvm-project/clang/lib/AST/Interp/Interp.cpp | 8 ++ .../clang/lib/CodeGen/CodeGenModule.cpp | 4 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 8 +- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 2 +- .../compiler-rt/lib/builtins/int_math.h | 13 +- .../compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp | 9 +- .../lib/sanitizer_common/sanitizer_linux.cpp | 55 +++++--- contrib/llvm-project/libcxx/include/__config | 2 +- .../llvm/include/llvm/Demangle/Demangle.h | 4 + .../llvm/include/llvm/Demangle/MicrosoftDemangle.h | 4 + .../llvm-project/llvm/include/llvm/IR/Mangler.h | 6 + .../llvm/include/llvm/Target/TargetSelectionDAG.td | 6 +- .../CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 6 +- .../llvm/lib/Demangle/MicrosoftDemangle.cpp | 19 +++ contrib/llvm-project/llvm/lib/IR/Mangler.cpp | 36 +++-- .../llvm/lib/Target/AArch64/AArch64InstrInfo.td | 2 +- .../RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp | 7 +- .../lib/Target/SystemZ/SystemZISelLowering.cpp | 3 +- .../Target/WebAssembly/WebAssemblyCFGStackify.cpp | 53 ++------ .../Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp | 13 ++ .../Target/WebAssembly/WebAssemblyInstrControl.td | 9 +- .../WebAssembly/WebAssemblyLateEHPrepare.cpp | 34 ++++- .../llvm/lib/Target/X86/X86InstrCompiler.td | 3 +- .../Transforms/InstCombine/InstCombineNegator.cpp | 11 ++ .../lib/Transforms/InstCombine/InstCombinePHI.cpp | 3 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 35 files changed, 370 insertions(+), 268 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLASX.def b/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLASX.def index 4cf51cc000f6..f644b820a618 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLASX.def +++ b/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLASX.def @@ -12,29 +12,29 @@ // //===----------------------------------------------------------------------===// -TARGET_BUILTIN(__builtin_lasx_xvadd_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvadd_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvadd_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvadd_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvadd_d, "V4LLiV4LLiV4LLi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvadd_q, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsub_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsub_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsub_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsub_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsub_d, "V4LLiV4LLiV4LLi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsub_q, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvaddi_bu, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvaddi_bu, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddi_hu, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddi_wu, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddi_du, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsubi_bu, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsubi_bu, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubi_hu, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubi_wu, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubi_du, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvneg_b, "V32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvneg_b, "V32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvneg_h, "V16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvneg_w, "V8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvneg_d, "V4LLiV4LLi", "nc", "lasx") @@ -79,22 +79,22 @@ TARGET_BUILTIN(__builtin_lasx_xvhsubw_wu_hu, "V8UiV16UsV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvhsubw_du_wu, "V4ULLiV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvhsubw_qu_du, "V4ULLiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvaddwev_h_b, "V16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvaddwev_h_b, "V16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwev_w_h, "V8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwev_d_w, "V4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwev_q_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvaddwod_h_b, "V16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvaddwod_h_b, "V16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwod_w_h, "V8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwod_d_w, "V4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwod_q_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsubwev_h_b, "V16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsubwev_h_b, "V16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwev_w_h, "V8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwev_d_w, "V4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwev_q_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsubwod_h_b, "V16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsubwod_h_b, "V16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwod_w_h, "V8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwod_d_w, "V4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwod_q_d, "V4LLiV4LLiV4LLi", "nc", "lasx") @@ -119,12 +119,12 @@ TARGET_BUILTIN(__builtin_lasx_xvsubwod_w_hu, "V8SiV16UsV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwod_d_wu, "V4LLiV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsubwod_q_du, "V4LLiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvaddwev_h_bu_b, "V16sV32UcV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvaddwev_h_bu_b, "V16sV32UcV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwev_w_hu_h, "V8SiV16UsV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwev_d_wu_w, "V4LLiV8UiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwev_q_du_d, "V4LLiV4ULLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvaddwod_h_bu_b, "V16sV32UcV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvaddwod_h_bu_b, "V16sV32UcV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwod_w_hu_h, "V8SiV16UsV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwod_d_wu_w, "V4LLiV8UiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvaddwod_q_du_d, "V4LLiV4ULLiV4LLi", "nc", "lasx") @@ -209,7 +209,7 @@ TARGET_BUILTIN(__builtin_lasx_xvmul_h, "V16SsV16SsV16Ss", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmul_w, "V8SiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmul_d, "V4SLLiV4SLLiV4SLLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmuh_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmuh_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmuh_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmuh_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmuh_d, "V4LLiV4LLiV4LLi", "nc", "lasx") @@ -219,12 +219,12 @@ TARGET_BUILTIN(__builtin_lasx_xvmuh_hu, "V16UsV16UsV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmuh_wu, "V8UiV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmuh_du, "V4ULLiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmulwev_h_b, "V16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmulwev_h_b, "V16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwev_w_h, "V8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwev_d_w, "V4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwev_q_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmulwod_h_b, "V16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmulwod_h_b, "V16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_w_h, "V8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_d_w, "V4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_q_d, "V4LLiV4LLiV4LLi", "nc", "lasx") @@ -239,12 +239,12 @@ TARGET_BUILTIN(__builtin_lasx_xvmulwod_w_hu, "V8SiV16UsV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_d_wu, "V4LLiV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_q_du, "V4LLiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmulwev_h_bu_b, "V16sV32UcV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmulwev_h_bu_b, "V16sV32UcV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwev_w_hu_h, "V8SiV16UsV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwev_d_wu_w, "V4LLiV8UiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwev_q_du_d, "V4LLiV4ULLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmulwod_h_bu_b, "V16sV32UcV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmulwod_h_bu_b, "V16sV32UcV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_w_hu_h, "V8SiV16UsV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_d_wu_w, "V4LLiV8UiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmulwod_q_du_d, "V4LLiV4ULLiV4LLi", "nc", "lasx") @@ -259,12 +259,12 @@ TARGET_BUILTIN(__builtin_lasx_xvmsub_h, "V16SsV16SsV16SsV16Ss", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmsub_w, "V8SiV8SiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmsub_d, "V4SLLiV4SLLiV4SLLiV4SLLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmaddwev_h_b, "V16sV16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmaddwev_h_b, "V16sV16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwev_w_h, "V8SiV8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwev_d_w, "V4LLiV4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwev_q_d, "V4LLiV4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmaddwod_h_b, "V16sV16sV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmaddwod_h_b, "V16sV16sV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_w_h, "V8SiV8SiV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_d_w, "V4LLiV4LLiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_q_d, "V4LLiV4LLiV4LLiV4LLi", "nc", "lasx") @@ -279,12 +279,12 @@ TARGET_BUILTIN(__builtin_lasx_xvmaddwod_w_hu, "V8UiV8UiV16UsV16Us", "nc", "lasx" TARGET_BUILTIN(__builtin_lasx_xvmaddwod_d_wu, "V4ULLiV4ULLiV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_q_du, "V4ULLiV4ULLiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmaddwev_h_bu_b, "V16sV16sV32UcV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmaddwev_h_bu_b, "V16sV16sV32UcV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwev_w_hu_h, "V8SiV8SiV16UsV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwev_d_wu_w, "V4LLiV4LLiV8UiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwev_q_du_d, "V4LLiV4LLiV4ULLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmaddwod_h_bu_b, "V16sV16sV32UcV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmaddwod_h_bu_b, "V16sV16sV32UcV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_w_hu_h, "V8SiV8SiV16UsV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_d_wu_w, "V4LLiV4LLiV8UiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmaddwod_q_du_d, "V4LLiV4LLiV4ULLiV4LLi", "nc", "lasx") @@ -320,7 +320,7 @@ TARGET_BUILTIN(__builtin_lasx_xvsat_hu, "V16UsV16UsIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsat_wu, "V8UiV8UiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsat_du, "V4ULLiV4ULLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvexth_h_b, "V16sV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvexth_h_b, "V16sV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvexth_w_h, "V8SiV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvexth_d_w, "V4LLiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvexth_q_d, "V4LLiV4LLi", "nc", "lasx") @@ -330,17 +330,17 @@ TARGET_BUILTIN(__builtin_lasx_xvexth_wu_hu, "V8UiV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvexth_du_wu, "V4ULLiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvexth_qu_du, "V4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_vext2xv_h_b, "V16sV32c", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_vext2xv_w_b, "V8SiV32c", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_vext2xv_d_b, "V4LLiV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_vext2xv_h_b, "V16sV32Sc", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_vext2xv_w_b, "V8SiV32Sc", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_vext2xv_d_b, "V4LLiV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_vext2xv_w_h, "V8SiV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_vext2xv_d_h, "V4LLiV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_vext2xv_d_w, "V4LLiV8Si", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_vext2xv_hu_bu, "V16sV32c", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_vext2xv_wu_bu, "V8SiV32c", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_vext2xv_du_bu, "V4LLiV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_vext2xv_hu_bu, "V16sV32Sc", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_vext2xv_wu_bu, "V8SiV32Sc", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_vext2xv_du_bu, "V4LLiV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_vext2xv_wu_hu, "V8SiV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_vext2xv_du_hu, "V4LLiV16s", "nc", "lasx") @@ -351,16 +351,16 @@ TARGET_BUILTIN(__builtin_lasx_xvsigncov_h, "V16SsV16SsV16Ss", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsigncov_w, "V8SiV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsigncov_d, "V4SLLiV4SLLiV4SLLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmskltz_b, "V32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmskltz_b, "V32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmskltz_h, "V16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmskltz_w, "V8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmskltz_d, "V4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmskgez_b, "V32cV32c", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmsknz_b, "V16sV16s", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmskgez_b, "V32ScV32Sc", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvmsknz_b, "V32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvldi, "V4LLiIi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvrepli_b, "V32cIi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvrepli_b, "V32ScIi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrepli_h, "V16sIi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrepli_w, "V8iIi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrepli_d, "V4LLiIi", "nc", "lasx") @@ -368,7 +368,7 @@ TARGET_BUILTIN(__builtin_lasx_xvrepli_d, "V4LLiIi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvand_v, "V32UcV32UcV32Uc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvor_v, "V32UcV32UcV32Uc", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvxor_v, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvxor_v, "V32UcV32UcV32Uc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvnor_v, "V32UcV32UcV32Uc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvandn_v, "V32UcV32UcV32Uc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvorn_v, "V32ScV32ScV32Sc", "nc", "lasx") @@ -378,47 +378,47 @@ TARGET_BUILTIN(__builtin_lasx_xvori_b, "V32UcV32UcIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvxori_b, "V32UcV32UcIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvnori_b, "V32UcV32UcIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsll_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsll_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsll_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsll_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsll_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvslli_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvslli_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvslli_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvslli_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvslli_d, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrl_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrl_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrl_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrl_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrl_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrli_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrli_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrli_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrli_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrli_d, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsra_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsra_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsra_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsra_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsra_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrai_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrai_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrai_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrai_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrai_d, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvrotr_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvrotr_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrotr_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrotr_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrotr_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvrotri_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvrotri_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrotri_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrotri_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrotri_d, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsllwil_h_b, "V16sV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsllwil_h_b, "V16sV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsllwil_w_h, "V8SiV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsllwil_d_w, "V4LLiV8SiIUi", "nc", "lasx") @@ -430,22 +430,22 @@ TARGET_BUILTIN(__builtin_lasx_xvsllwil_du_wu, "V4ULLiV8UiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvextl_qu_du, "V4LLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrlr_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrlr_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlr_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlr_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlr_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrlri_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrlri_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlri_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlri_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlri_d, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrar_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrar_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrar_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrar_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrar_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrari_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrari_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrari_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrari_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrari_d, "V4LLiV4LLiIUi", "nc", "lasx") @@ -458,12 +458,12 @@ TARGET_BUILTIN(__builtin_lasx_xvsran_b_h, "V32ScV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsran_h_w, "V16sV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsran_w_d, "V8SiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrlni_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrlni_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlni_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlni_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlni_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrani_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrani_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrani_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrani_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrani_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") @@ -476,12 +476,12 @@ TARGET_BUILTIN(__builtin_lasx_xvsrarn_b_h, "V32ScV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrarn_h_w, "V16sV8SiV8Si", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrarn_w_d, "V8SiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrlrni_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrlrni_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlrni_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlrni_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrlrni_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvsrarni_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvsrarni_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrarni_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrarni_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvsrarni_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") @@ -502,22 +502,22 @@ TARGET_BUILTIN(__builtin_lasx_xvssran_bu_h, "V32UcV16UsV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssran_hu_w, "V16UsV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssran_wu_d, "V8UiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrlni_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrlni_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlni_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlni_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlni_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrani_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrani_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrani_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrani_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrani_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrlrni_bu_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrlrni_bu_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlrni_hu_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlrni_wu_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlrni_du_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrani_bu_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrani_bu_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrani_hu_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrani_wu_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrani_du_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") @@ -538,22 +538,22 @@ TARGET_BUILTIN(__builtin_lasx_xvssrarn_bu_h, "V32UcV16UsV16Us", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarn_hu_w, "V16UsV8UiV8Ui", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarn_wu_d, "V8UiV4ULLiV4ULLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrlrni_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrlrni_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlrni_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlrni_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlrni_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrarni_b_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrarni_b_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarni_h_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarni_w_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarni_d_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrlni_bu_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrlni_bu_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlni_hu_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlni_wu_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrlni_du_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvssrarni_bu_h, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvssrarni_bu_h, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarni_hu_w, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarni_wu_d, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvssrarni_du_q, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") @@ -606,7 +606,7 @@ TARGET_BUILTIN(__builtin_lasx_xvbitrevi_d, "V4ULLiV4ULLiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvfrstp_b, "V32ScV32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvfrstp_h, "V16SsV16SsV16SsV16Ss", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvfrstpi_b, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvfrstpi_b, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvfrstpi_h, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvfadd_s, "V8fV8fV8f", "nc", "lasx") @@ -877,12 +877,12 @@ TARGET_BUILTIN(__builtin_lasx_xvpickve2gr_d, "LLiV4SLLiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickve2gr_wu, "iV8UiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickve2gr_du, "LLiV4ULLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvreplve_b, "V32cV32cUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvreplve_b, "V32ScV32ScUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvreplve_h, "V16sV16sUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvreplve_w, "V8iV8iUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvreplve_d, "V4LLiV4LLiUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvrepl128vei_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvrepl128vei_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrepl128vei_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrepl128vei_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvrepl128vei_d, "V4LLiV4LLiIUi", "nc", "lasx") @@ -902,40 +902,40 @@ TARGET_BUILTIN(__builtin_lasx_xvpickve_d, "V4LLiV4LLiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickve_w_f, "V8fV8fIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickve_d_f, "V4dV4dIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvbsll_v, "V32cV32cIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvbsrl_v, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvbsll_v, "V32ScV32ScIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvbsrl_v, "V32ScV32ScIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvpackev_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvpackev_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpackev_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpackev_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpackev_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvpackod_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvpackod_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpackod_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpackod_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpackod_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvpickev_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvpickev_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickev_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickev_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickev_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvpickod_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvpickod_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickod_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickod_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpickod_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvilvl_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvilvl_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvilvl_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvilvl_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvilvl_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvilvh_b, "V32cV32cV32c", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvilvh_b, "V32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvilvh_h, "V16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvilvh_w, "V8iV8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvilvh_d, "V4LLiV4LLiV4LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvshuf_b, "V32UcV32UcV32UcV32Uc", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvshuf_b, "V32ScV32ScV32ScV32Sc", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvshuf_h, "V16sV16sV16sV16s", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvshuf_w, "V8iV8iV8iV8i", "nc", "lasx") @@ -943,16 +943,16 @@ TARGET_BUILTIN(__builtin_lasx_xvshuf_d, "V4LLiV4LLiV4LLiV4LLi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvperm_w, "V8iV8iV8i", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvshuf4i_b, "V32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvshuf4i_b, "V32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvshuf4i_h, "V16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvshuf4i_w, "V8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvshuf4i_d, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpermi_w, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvpermi_d, "V4LLiV4LLiIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvpermi_q, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvpermi_q, "V32ScV32ScV32ScIUi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvextrins_b, "V32cV32cV32cIUi", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvextrins_b, "V32ScV32ScV32ScIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvextrins_h, "V16sV16sV16sIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvextrins_w, "V8iV8iV8iIUi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvextrins_d, "V4LLiV4LLiV4LLiIUi", "nc", "lasx") @@ -963,7 +963,7 @@ TARGET_BUILTIN(__builtin_lasx_xvst, "vV32Scv*Ii", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvldx, "V32ScvC*LLi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvstx, "vV32Scv*LLi", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvldrepl_b, "V32cvC*Ii", "nc", "lasx") +TARGET_BUILTIN(__builtin_lasx_xvldrepl_b, "V32ScvC*Ii", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvldrepl_h, "V16svC*Ii", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvldrepl_w, "V8ivC*Ii", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvldrepl_d, "V4LLivC*Ii", "nc", "lasx") diff --git a/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLSX.def b/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLSX.def index c90f4dc5458f..b3056971986d 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLSX.def +++ b/contrib/llvm-project/clang/include/clang/Basic/BuiltinsLoongArchLSX.def @@ -12,29 +12,29 @@ // //===----------------------------------------------------------------------===// -TARGET_BUILTIN(__builtin_lsx_vadd_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vadd_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vadd_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vadd_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vadd_d, "V2LLiV2LLiV2LLi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vadd_q, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsub_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsub_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsub_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsub_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsub_d, "V2LLiV2LLiV2LLi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsub_q, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vaddi_bu, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vaddi_bu, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddi_hu, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddi_wu, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddi_du, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsubi_bu, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsubi_bu, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubi_hu, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubi_wu, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubi_du, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vneg_b, "V16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vneg_b, "V16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vneg_h, "V8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vneg_w, "V4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vneg_d, "V2LLiV2LLi", "nc", "lsx") @@ -79,22 +79,22 @@ TARGET_BUILTIN(__builtin_lsx_vhsubw_wu_hu, "V4UiV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vhsubw_du_wu, "V2ULLiV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vhsubw_qu_du, "V2ULLiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vaddwev_h_b, "V8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vaddwev_h_b, "V8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwev_w_h, "V4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwev_d_w, "V2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwev_q_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vaddwod_h_b, "V8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vaddwod_h_b, "V8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwod_w_h, "V4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwod_d_w, "V2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwod_q_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsubwev_h_b, "V8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsubwev_h_b, "V8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwev_w_h, "V4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwev_d_w, "V2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwev_q_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsubwod_h_b, "V8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsubwod_h_b, "V8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwod_w_h, "V4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwod_d_w, "V2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwod_q_d, "V2LLiV2LLiV2LLi", "nc", "lsx") @@ -119,12 +119,12 @@ TARGET_BUILTIN(__builtin_lsx_vsubwod_w_hu, "V4SiV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwod_d_wu, "V2LLiV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsubwod_q_du, "V2LLiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vaddwev_h_bu_b, "V8sV16UcV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vaddwev_h_bu_b, "V8sV16UcV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwev_w_hu_h, "V4SiV8UsV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwev_d_wu_w, "V2LLiV4UiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwev_q_du_d, "V2LLiV2ULLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vaddwod_h_bu_b, "V8sV16UcV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vaddwod_h_bu_b, "V8sV16UcV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwod_w_hu_h, "V4SiV8UsV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwod_d_wu_w, "V2LLiV4UiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vaddwod_q_du_d, "V2LLiV2ULLiV2LLi", "nc", "lsx") @@ -209,7 +209,7 @@ TARGET_BUILTIN(__builtin_lsx_vmul_h, "V8SsV8SsV8Ss", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmul_w, "V4SiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmul_d, "V2SLLiV2SLLiV2SLLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmuh_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmuh_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmuh_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmuh_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmuh_d, "V2LLiV2LLiV2LLi", "nc", "lsx") @@ -219,12 +219,12 @@ TARGET_BUILTIN(__builtin_lsx_vmuh_hu, "V8UsV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmuh_wu, "V4UiV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmuh_du, "V2ULLiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmulwev_h_b, "V8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmulwev_h_b, "V8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwev_w_h, "V4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwev_d_w, "V2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwev_q_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmulwod_h_b, "V8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmulwod_h_b, "V8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_w_h, "V4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_d_w, "V2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_q_d, "V2LLiV2LLiV2LLi", "nc", "lsx") @@ -239,12 +239,12 @@ TARGET_BUILTIN(__builtin_lsx_vmulwod_w_hu, "V4SiV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_d_wu, "V2LLiV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_q_du, "V2LLiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmulwev_h_bu_b, "V8sV16UcV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmulwev_h_bu_b, "V8sV16UcV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwev_w_hu_h, "V4SiV8UsV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwev_d_wu_w, "V2LLiV4UiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwev_q_du_d, "V2LLiV2ULLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmulwod_h_bu_b, "V8sV16UcV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmulwod_h_bu_b, "V8sV16UcV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_w_hu_h, "V4SiV8UsV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_d_wu_w, "V2LLiV4UiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmulwod_q_du_d, "V2LLiV2ULLiV2LLi", "nc", "lsx") @@ -259,12 +259,12 @@ TARGET_BUILTIN(__builtin_lsx_vmsub_h, "V8SsV8SsV8SsV8Ss", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmsub_w, "V4SiV4SiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmsub_d, "V2SLLiV2SLLiV2SLLiV2SLLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmaddwev_h_b, "V8sV8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmaddwev_h_b, "V8sV8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwev_w_h, "V4SiV4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwev_d_w, "V2LLiV2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwev_q_d, "V2LLiV2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmaddwod_h_b, "V8sV8sV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmaddwod_h_b, "V8sV8sV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_w_h, "V4SiV4SiV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_d_w, "V2LLiV2LLiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_q_d, "V2LLiV2LLiV2LLiV2LLi", "nc", "lsx") @@ -279,12 +279,12 @@ TARGET_BUILTIN(__builtin_lsx_vmaddwod_w_hu, "V4UiV4UiV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_d_wu, "V2ULLiV2ULLiV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_q_du, "V2ULLiV2ULLiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmaddwev_h_bu_b, "V8sV8sV16UcV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmaddwev_h_bu_b, "V8sV8sV16UcV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwev_w_hu_h, "V4SiV4SiV8UsV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwev_d_wu_w, "V2LLiV2LLiV4UiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwev_q_du_d, "V2LLiV2LLiV2ULLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmaddwod_h_bu_b, "V8sV8sV16UcV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmaddwod_h_bu_b, "V8sV8sV16UcV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_w_hu_h, "V4SiV4SiV8UsV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_d_wu_w, "V2LLiV2LLiV4UiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmaddwod_q_du_d, "V2LLiV2LLiV2ULLiV2LLi", "nc", "lsx") @@ -320,7 +320,7 @@ TARGET_BUILTIN(__builtin_lsx_vsat_hu, "V8UsV8UsIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsat_wu, "V4UiV4UiIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsat_du, "V2ULLiV2ULLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vexth_h_b, "V8sV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vexth_h_b, "V8sV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vexth_w_h, "V4SiV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vexth_d_w, "V2LLiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vexth_q_d, "V2LLiV2LLi", "nc", "lsx") @@ -335,16 +335,16 @@ TARGET_BUILTIN(__builtin_lsx_vsigncov_h, "V8SsV8SsV8Ss", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsigncov_w, "V4SiV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsigncov_d, "V2SLLiV2SLLiV2SLLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmskltz_b, "V16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmskltz_b, "V16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmskltz_h, "V8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmskltz_w, "V4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vmskltz_d, "V2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmskgez_b, "V16cV16c", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vmsknz_b, "V8sV8s", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmskgez_b, "V16ScV16Sc", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vmsknz_b, "V16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vldi, "V2LLiIi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vrepli_b, "V16cIi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vrepli_b, "V16ScIi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrepli_h, "V8sIi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrepli_w, "V4iIi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrepli_d, "V2LLiIi", "nc", "lsx") @@ -352,7 +352,7 @@ TARGET_BUILTIN(__builtin_lsx_vrepli_d, "V2LLiIi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vand_v, "V16UcV16UcV16Uc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vor_v, "V16UcV16UcV16Uc", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vxor_v, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vxor_v, "V16UcV16UcV16Uc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vnor_v, "V16UcV16UcV16Uc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vandn_v, "V16UcV16UcV16Uc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vorn_v, "V16ScV16ScV16Sc", "nc", "lsx") @@ -362,47 +362,47 @@ TARGET_BUILTIN(__builtin_lsx_vori_b, "V16UcV16UcIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vxori_b, "V16UcV16UcIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vnori_b, "V16UcV16UcIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsll_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsll_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsll_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsll_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsll_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vslli_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vslli_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vslli_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vslli_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vslli_d, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrl_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrl_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrl_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrl_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrl_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrli_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrli_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrli_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrli_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrli_d, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsra_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsra_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsra_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsra_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsra_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrai_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrai_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrai_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrai_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrai_d, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vrotr_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vrotr_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrotr_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrotr_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrotr_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vrotri_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vrotri_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrotri_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrotri_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vrotri_d, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsllwil_h_b, "V8sV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsllwil_h_b, "V8sV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsllwil_w_h, "V4SiV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsllwil_d_w, "V2LLiV4SiIUi", "nc", "lsx") @@ -414,22 +414,22 @@ TARGET_BUILTIN(__builtin_lsx_vsllwil_du_wu, "V2ULLiV4UiIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vextl_qu_du, "V2LLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrlr_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrlr_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlr_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlr_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlr_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrlri_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrlri_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlri_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlri_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlri_d, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrar_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrar_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrar_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrar_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrar_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrari_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrari_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrari_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrari_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrari_d, "V2LLiV2LLiIUi", "nc", "lsx") @@ -442,12 +442,12 @@ TARGET_BUILTIN(__builtin_lsx_vsran_b_h, "V16ScV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsran_h_w, "V8sV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsran_w_d, "V4SiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrlni_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrlni_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlni_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlni_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlni_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrani_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrani_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrani_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrani_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrani_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") @@ -460,12 +460,12 @@ TARGET_BUILTIN(__builtin_lsx_vsrarn_b_h, "V16ScV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrarn_h_w, "V8sV4SiV4Si", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrarn_w_d, "V4SiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrlrni_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrlrni_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlrni_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlrni_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrlrni_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vsrarni_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vsrarni_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrarni_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrarni_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vsrarni_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") @@ -486,22 +486,22 @@ TARGET_BUILTIN(__builtin_lsx_vssran_bu_h, "V16UcV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssran_hu_w, "V8UsV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssran_wu_d, "V4UiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrlni_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrlni_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlni_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlni_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlni_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrani_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrani_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrani_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrani_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrani_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrlrni_bu_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrlrni_bu_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlrni_hu_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlrni_wu_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlrni_du_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrani_bu_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrani_bu_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrani_hu_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrani_wu_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrani_du_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") @@ -522,22 +522,22 @@ TARGET_BUILTIN(__builtin_lsx_vssrarn_bu_h, "V16UcV8UsV8Us", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarn_hu_w, "V8UsV4UiV4Ui", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarn_wu_d, "V4UiV2ULLiV2ULLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrlrni_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrlrni_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlrni_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlrni_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlrni_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrarni_b_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrarni_b_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarni_h_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarni_w_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarni_d_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrlni_bu_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrlni_bu_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlni_hu_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlni_wu_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrlni_du_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vssrarni_bu_h, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vssrarni_bu_h, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarni_hu_w, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarni_wu_d, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vssrarni_du_q, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") @@ -590,7 +590,7 @@ TARGET_BUILTIN(__builtin_lsx_vbitrevi_d, "V2ULLiV2ULLiIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vfrstp_b, "V16ScV16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vfrstp_h, "V8SsV8SsV8SsV8Ss", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vfrstpi_b, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vfrstpi_b, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vfrstpi_h, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vfadd_s, "V4fV4fV4f", "nc", "lsx") @@ -867,63 +867,63 @@ TARGET_BUILTIN(__builtin_lsx_vpickve2gr_hu, "iV8UsIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickve2gr_wu, "iV4UiIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickve2gr_du, "LLiV2ULLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vreplve_b, "V16cV16cUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vreplve_b, "V16ScV16ScUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vreplve_h, "V8sV8sUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vreplve_w, "V4iV4iUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vreplve_d, "V2LLiV2LLiUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vreplvei_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vreplvei_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vreplvei_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vreplvei_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vreplvei_d, "V2LLiV2LLiIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vbsll_v, "V16cV16cIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vbsrl_v, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vbsll_v, "V16ScV16ScIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vbsrl_v, "V16ScV16ScIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vpackev_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vpackev_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpackev_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpackev_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpackev_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vpackod_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vpackod_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpackod_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpackod_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpackod_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vpickev_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vpickev_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickev_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickev_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickev_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vpickod_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vpickod_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickod_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickod_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpickod_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vilvl_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vilvl_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vilvl_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vilvl_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vilvl_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vilvh_b, "V16cV16cV16c", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vilvh_b, "V16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vilvh_h, "V8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vilvh_w, "V4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vilvh_d, "V2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vshuf_b, "V16UcV16UcV16UcV16Uc", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vshuf_b, "V16ScV16ScV16ScV16Sc", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vshuf_h, "V8sV8sV8sV8s", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vshuf_w, "V4iV4iV4iV4i", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vshuf_d, "V2LLiV2LLiV2LLiV2LLi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vshuf4i_b, "V16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vshuf4i_b, "V16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vshuf4i_h, "V8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vshuf4i_w, "V4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vshuf4i_d, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vpermi_w, "V4iV4iV4iIUi", "nc", "lsx") -TARGET_BUILTIN(__builtin_lsx_vextrins_b, "V16cV16cV16cIUi", "nc", "lsx") +TARGET_BUILTIN(__builtin_lsx_vextrins_b, "V16ScV16ScV16ScIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vextrins_h, "V8sV8sV8sIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vextrins_w, "V4iV4iV4iIUi", "nc", "lsx") TARGET_BUILTIN(__builtin_lsx_vextrins_d, "V2LLiV2LLiV2LLiIUi", "nc", "lsx") @@ -934,7 +934,7 @@ TARGET_BUILTIN(__builtin_lsx_vst, "vV16Scv*Ii", "nc", "lsx") *** 858 LINES SKIPPED *** From nobody Sun Dec 1 12:54:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1RhH2Gt7z5fbLY; Sun, 01 Dec 2024 12:54:39 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1RhH14Nlz4PfV; Sun, 1 Dec 2024 12:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qtHXIq//tFoI0jFndP+DyZI+ziEHDiJNgcaZ78spSIc=; b=kAkKw4X+Fxoq7JxC6qpRGfhiBEzeHJhLLQevv8eK6sVUaMp12D0DwABT9iBA8hLIRR2hSZ ewX/0D4uKk/IJr9pyU/dsG6HnrWhldKUVcIV4IsSAb8MoccgD5VHHQn1NWXU4Jm/mwd5SE FJywxYCnKaJmsUHTRWcs789iMdlQNVWYJcsYX+oRrNLeqrXn79tsaZoxz5iq3ISUrDhDMl jt7ItgXxp3hmuFyS9DN4Ih6cTI2mF00ozWf4wfWFnE6QRhmzY7CJUqHYm+0OGGo3DoxbVO EU6ducVsr2KZ2yFhDHqRHysCylPVjsvVmezoge7HKFfJtuGFoUvP631YkLWBpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qtHXIq//tFoI0jFndP+DyZI+ziEHDiJNgcaZ78spSIc=; b=CmXmcaWeE+k4Gi51kKZfxy4T1PLcgYm94a21dvV5QzpekyPQ3N3GP90BTkw30RLwQmQF20 afgnlRiB6pP+YziPeUoMOgT8NmTsMUoHnkNXYXiH83pLk9iBtJzwwlOVCbKFvF0z8mUIzR 9YdCXE6AhZY3/VeA4KNDUHZMlCudOlM/dpli0RAe7M02V01RvkPJgo2uQIWhjoNn046ebb X+Ld6jhFYSBdU/KYnpa3Tjesl4qqvNHlj0NjshC3/71NfeTs5lpZLmQBQyCJsEDF/QXnB2 lGOHT0vk4ftOBwMedVnEqP3iBRJxG82FxGhuihDFFXms1WuHfSyT5YESLEGaxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057679; a=rsa-sha256; cv=none; b=xPe+ospBLrGgA7LqxaodPEpWBSB6xjndyQtHlzxvombRs/sbFwCdYVDVxXo9PcVE6WRyr3 Lhmq543KRrarEQYbjg/RlZfcXa67VBaZsYsuXChR483QLjpUB/9nRoeiVTbfztBshmH1AZ ze5VRopcQbZhRLQZxY7WMd53afRw8BVlBvxlAyRiTmAHWewR+SY2tn4GM7AtK4RGFmcmcb K5jMnCu9xihtXSbIvZ/pzxNmsnK1JhZKIdiPL5/6/r74yfhMrbA6Xu3MQ4gv378QTGmYs3 tC4Jovqm6hBxAX4LnVe0clQQwOYh7GnQIkLoYdcjW8Tgce5G7iI+C8bkUa9jQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1RhH0hhhztHL; Sun, 1 Dec 2024 12:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsduA094817; Sun, 1 Dec 2024 12:54:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CscfL094814; Sun, 1 Dec 2024 12:54:38 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:38 GMT Message-Id: <202412011254.4B1CscfL094814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: b802ab153dd2 - stable/13 - Bump __FreeBSD_version for llvm 19.1.4 merge List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b802ab153dd24f468b9bfe33a96c61408e0d0565 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b802ab153dd24f468b9bfe33a96c61408e0d0565 commit b802ab153dd24f468b9bfe33a96c61408e0d0565 Author: Dimitry Andric AuthorDate: 2024-10-23 16:49:02 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:53:18 +0000 Bump __FreeBSD_version for llvm 19.1.4 merge PR: 280562 MFC after: 1 month (cherry picked from commit f3dbef108212460489ae68b4c47e20b73984f433) --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index cba49f3e9b9b..c209db90ba1e 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -59,7 +59,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1304500 /* Master, propagated to newvers */ +#define __FreeBSD_version 1304501 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Sun Dec 1 12:54:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1RhG1zgbz5fbNq; Sun, 01 Dec 2024 12:54:38 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1RhG07MRz4Pvs; Sun, 1 Dec 2024 12:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VotE7R5+z4ciZKzRnAg+VYLMN11ueeZJWM6O4OBHa5Q=; b=X0eOI6PtmdqUDcAF8eEILJouGU6J7kgi8SAPNdZOS2TGqdehAl87t9AnsLO30mM7bujBAE xHbxCuiSkqJbb0UPnebA9OoefbAz8kecfVF6ecvosJmEwvsn8QRRQZOZIPX/NdtPQKU8c8 AaQ0grz5o/qbnY78w7Oi14tRt0NaY7gWEzo6sZX8HoC76q3TG6cH975rx6AYfpZulmEIJ/ imqxNC9ArgS4C9JTSnagAmv3edwFwUJD6ItCQ2XlE+B5IVbYq5Sj+ysBVG+1mzWUHCWlko P1mwM8W+fSXWQxMd3WCzLCW21G1qDnIT1fGm0wpeNERaSWKD9SgPNuxCCB4QXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VotE7R5+z4ciZKzRnAg+VYLMN11ueeZJWM6O4OBHa5Q=; b=PReRwz7S/Lqg944bLATQuCL4pvPuTpAvNE2YjvB8JhXKUlvyxhMv7ysMwLvMFeM8tqU9PW fWPyvqA/Hk/P/jdo0Mwnb6JQl6htgQcDotbQ1CffSSDUpRVYWiaS3wBonmExwLhqzmxqNJ usxIKC4Szu2QCvd8vhbj8GyOt6QLkM2Z/P3lB/+UPrHhJYKjsjRzJOpyJJnoGUtx52VuTE Pmtea3dVe5dtlQvBd9rXAnmF8zSLQq948z+ftU7VMXLr9YTY7LIA/ZlIeulgqjXgj+6L/5 eC3o+23KoKkLxd5RB2yZ0ODG/haFCs86qixWBCzZkQgI/G0UCw43qj1pNuCykA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057678; a=rsa-sha256; cv=none; b=gPpEafKjHyr9wG36iBJAfSS/Q/SSzVJ0hOXDbwuADBW/BV8WeETrUKbduVqyb7krw7LTra cisbvQyyufL0Ja6otl2PonBRq6vNA2oFPRKaVMbJa03ez4/6lUcRtfxR3NjvMUV3pZZU1o ayGFxWkrauv61Zsiz90O3+nFgSZKwjQLnMrpee4DnvoGvVyYH0hPhiQQbuossso7ZhmnPF GWZj2gQvX5V5fyBDYL5bYYoJrZewnVZwtqcNW4jsD5ld84hxPl1SLhwhyx9knBIMoc89Ru oIPplrtiQv1XCVkluEtout/CZwZlF5qS2CncZUPtGZgvZPubpEvCL1U/cvahuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1RhF6sSjztNX; Sun, 1 Dec 2024 12:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1CsbAg094772; Sun, 1 Dec 2024 12:54:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsbiH094769; Sun, 1 Dec 2024 12:54:37 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:37 GMT Message-Id: <202412011254.4B1CsbiH094769@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: a58eb6653223 - stable/13 - libzpool: add workaround for MIPS-specific llvm bug compiling arc.c List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a58eb6653223494cce02faf85d3a49110743b9fc Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a58eb6653223494cce02faf85d3a49110743b9fc commit a58eb6653223494cce02faf85d3a49110743b9fc Author: Dimitry Andric AuthorDate: 2024-12-01 12:52:42 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:52:42 +0000 libzpool: add workaround for MIPS-specific llvm bug compiling arc.c This works around an assertion in llvm's shrink wrapping analysis pass, when compiling arc.c for mips and mips64: Assertion failed: (PhysReg.isPhysical() && "Unallocated register?!"), function useOrDefCSROrFI, file /usr/src/contrib/llvm-project/llvm/lib/CodeGen/ShrinkWrap.cpp, line 341. The bug will also be submitted upstream. Direct commit to stable/13, since MIPS support was removed in 14.0. --- cddl/lib/libzpool/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile index 38490d9cff71..cd9f893c426f 100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@ -265,4 +265,12 @@ CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith CFLAGS.zstd.c+= -fno-tree-vectorize CFLAGS.zstd.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +.include + +.if ${MACHINE_CPUARCH} == "mips" && \ + ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 190000 +# Work around MIPS-specific llvm bug in the Shrink Wrapping analysis pass +CFLAGS.arc.c+= -mllvm -enable-shrink-wrap-region-split=false +.endif + .include From nobody Sun Dec 1 17:33:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Ysc6Ftjz5fwJ3; Sun, 01 Dec 2024 17:33:08 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Ysc627Pz40sc; Sun, 1 Dec 2024 17:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733074388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zs5EfAXDZlDO4/b9heDEBalTbnZi5cszo9dp+fPp/fs=; b=jRUel1YGnNk4K5tUvrZ3OTLnh6JaR5rhcPbsOuEfg2+0a5zN14eRnr5p0NnNnDfyaipKmV 1nTTjirfV8lFKmx1dolg8uGmIHoxRN8j2AC3im7yR0izYz8IPQzf3SlC1ztGpIkrNoCsvV GOiDTSqYkjm/1wWgUlJgEQM/4rMFvSYs2J+sSukGnaVAy2+OwD7qTp009feb3hvpJr28mg 2z9n06MjbP0/s/bgIpKQNLeKg9ITFnkks9pB5TtBnoVzE4hbv/Iy+GK1LqKCcwu30PUW7r oEtbLQtfMXR0hmfswLxBOsV1Uepwsti8oKgK4iEblwfxI2X9IIv0LR/94WWrMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733074388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zs5EfAXDZlDO4/b9heDEBalTbnZi5cszo9dp+fPp/fs=; b=hCTBkKyaVh60PDxlisFjaRa/NaowFJ6IQLylLbtKKeMM7mck3CbfvnihOPNOyLXOXw4Esb oeIrsizYb4ojdw50dZUaj3BYNeJM3oxbq89whOqOGwbK0IG4XOhjoEyTNYA5b4W3e4edfE qDcOo+awM3BxLpR/0DrWjCkVMTsu1QE1A8Jb82tOGqXUMxsSl9EVU6yLI0J7afdpp+HJMG 22VE5OzERtINcydeX3Fwim+CGXlVO+vtfVqoyiW8fTvX48lVD7cUgm0kIA7gdJg3b9yINh zdaN7bIfLn2iRuX5sB/5tM50ivBPxnGKRzrjPQmD2NxlmpVEXvT2QB3TY/tFTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733074388; a=rsa-sha256; cv=none; b=ZsiDYmY6lZFQ8egw7njoOpQGHelH39QkrH8QchzqkPAY2ii9sSFeuZa5tpp06l75SBITh2 t+dM9Jc+tThXBF+8/8ur5qV6vLJGApfiiMDE2gC30eFIYNm6sht0HZEgOYXZRjRZvqHWFI fbiy3idIMVqzFDaDLqgJVFjbX0r//lblp5PrvcdRVwr4xA3G47p8OdY6Djf3bN7uKUJETC TRpqpuTyw85t+xRJQIH+YmwZOUsG/oW1WFI/GcFYEX3wTfHIac/lnnCpTjiw0vkVrvOsk8 Hlul4VBvwC9Q2Zxqb3RnUBuQ77NRT4RXXAmum5qpw467nLHT6/c8f/QlDYGHSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Ysc5b5tz12l9; Sun, 1 Dec 2024 17:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1HX862014577; Sun, 1 Dec 2024 17:33:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1HX8Iw014569; Sun, 1 Dec 2024 17:33:08 GMT (envelope-from git) Date: Sun, 1 Dec 2024 17:33:08 GMT Message-Id: <202412011733.4B1HX8Iw014569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 646e1679a312 - stable/14 - ota: Merge 20240623 (bsd-features) from ota 9f971fba471b List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 646e1679a3129bd34164b4f16763b143536585e0 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=646e1679a3129bd34164b4f16763b143536585e0 commit 646e1679a3129bd34164b4f16763b143536585e0 Author: Warner Losh AuthorDate: 2024-07-23 21:17:58 +0000 Commit: Warner Losh CommitDate: 2024-12-01 17:33:16 +0000 ota: Merge 20240623 (bsd-features) from ota 9f971fba471b Merge from upstream. The system-status test was modifed upstream, but it still doesn't fit into ATF, so those changes weren't brought in. From FIXES: Jun 23, 2024 Fix signal for system-status test. Thanks to Tim van der Molen. Rewrite if-else chain as switch. Thanks to Andrew Sukach. May 27, 2024 Spelling fixes and removal of unneeded prototypes and extern. Thanks to Jonathan Gray. May 4, 2024 Fixed a use-after-free bug with ARGV for "delete ARGV". Also ENVtab is no longer global. Thanks to Benjamin Sturz for spotting the ARGV issue and Todd Miller for the fix. May 3, 2024: Remove warnings when compiling with g++. Thanks to Arnold Robbins. Sponsored by: Netflix (cherry picked from commit 17853db4b0dc36ed32af039cd803f13b692913da) --- contrib/one-true-awk/FIXES | 26 ++++++++--- contrib/one-true-awk/FIXES.1e | 4 +- contrib/one-true-awk/README.md | 2 +- contrib/one-true-awk/TODO | 2 +- contrib/one-true-awk/awk.h | 1 - contrib/one-true-awk/b.c | 55 ++++++++++++++--------- contrib/one-true-awk/bugs-fixed/ofs-rebuild.awk | 2 +- contrib/one-true-awk/bugs-fixed/system-status.ok2 | 2 +- contrib/one-true-awk/lex.c | 2 +- contrib/one-true-awk/lib.c | 8 ++-- contrib/one-true-awk/main.c | 48 ++++++++++++++------ contrib/one-true-awk/makefile | 1 + contrib/one-true-awk/proto.h | 4 -- contrib/one-true-awk/run.c | 6 +-- contrib/one-true-awk/testdir/T.argv | 23 ++++++++++ contrib/one-true-awk/testdir/T.csconcat | 2 +- contrib/one-true-awk/tran.c | 22 ++++----- 17 files changed, 141 insertions(+), 69 deletions(-) diff --git a/contrib/one-true-awk/FIXES b/contrib/one-true-awk/FIXES index c4eef3bd8ea0..b59f32831e2c 100644 --- a/contrib/one-true-awk/FIXES +++ b/contrib/one-true-awk/FIXES @@ -25,15 +25,31 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the second edition of the AWK book was published in September 2023. +Jun 23, 2024 + Fix signal for system-status test. Thanks to Tim van der Molen. + Rewrite if-else chain as switch. Thanks to Andrew Sukach. + +May 27, 2024 + Spelling fixes and removal of unneeded prototypes and extern. + Thanks to Jonathan Gray. + +May 4, 2024 + Fixed a use-after-free bug with ARGV for "delete ARGV". + Also ENVtab is no longer global. Thanks to Benjamin Sturz + for spotting the ARGV issue and Todd Miller for the fix. + +May 3, 2024: + Remove warnings when compiling with g++. Thanks to Arnold Robbins. + Apr 22, 2024: - fixed regex engine gototab reallocation issue that was - introduced during the Nov 24 rewrite. Thanks to Arnold Robbins. + Fixed regex engine gototab reallocation issue that was + Introduced during the Nov 24 rewrite. Thanks to Arnold Robbins. Fixed a scan bug in split in the case the separator is a single - character. thanks to Oguz Ismail for spotting the issue. + character. Thanks to Oguz Ismail for spotting the issue. Mar 10, 2024: - fixed use-after-free bug in fnematch due to adjbuf invalidating - the pointers to buf. thanks to github user caffe3 for spotting + Fixed use-after-free bug in fnematch due to adjbuf invalidating + the pointers to buf. Thanks to github user caffe3 for spotting the issue and providing a fix, and to Miguel Pineiro Jr. for the alternative fix. MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max. diff --git a/contrib/one-true-awk/FIXES.1e b/contrib/one-true-awk/FIXES.1e index 8cbd6ac1a097..880226dd9d01 100644 --- a/contrib/one-true-awk/FIXES.1e +++ b/contrib/one-true-awk/FIXES.1e @@ -224,7 +224,7 @@ January 9, 2020: mere warnings. Thanks to Martijn Dekker . January 5, 2020: - Fix a bug in the concatentation of two string constants into + Fix a bug in the concatenation of two string constants into one done in the grammar. Fixes GitHub issue #61. Thanks to GitHub user awkfan77 for pointing out the direction for the fix. New test T.concat added to the test suite. @@ -866,7 +866,7 @@ Jan 13, 1999: added a few (int) casts to silence useless compiler warnings. e.g., errorflag= in run.c jump(). - added proctab.c to the bundle outout; one less thing + added proctab.c to the bundle output; one less thing to have to compile out of the box. added calls to _popen and _pclose to the win95 stub for diff --git a/contrib/one-true-awk/README.md b/contrib/one-true-awk/README.md index a41fb3c3b128..aba057228b15 100644 --- a/contrib/one-true-awk/README.md +++ b/contrib/one-true-awk/README.md @@ -16,7 +16,7 @@ this affects `length`, `substr`, `index`, `match`, `split`, points are not necessarily characters. UTF-8 sequences may appear in literal strings and regular expressions. -Aribtrary characters may be included with `\u` followed by 1 to 8 hexadecimal digits. +Arbitrary characters may be included with `\u` followed by 1 to 8 hexadecimal digits. ### Regular expressions ### diff --git a/contrib/one-true-awk/TODO b/contrib/one-true-awk/TODO index 13f2925544b7..151cb884db99 100644 --- a/contrib/one-true-awk/TODO +++ b/contrib/one-true-awk/TODO @@ -14,6 +14,6 @@ and see exactly which tests fail: The beebe.tar file appears to be from sometime in the 1990s. 3. Make the One True Awk valgrind clean. In particular add a - a test suite target that runs valgrind on all the tests and + test suite target that runs valgrind on all the tests and reports if there are any definite losses or any invalid reads or writes (similar to gawk's test of this nature). diff --git a/contrib/one-true-awk/awk.h b/contrib/one-true-awk/awk.h index 740447ee2167..76c2a772b4ce 100644 --- a/contrib/one-true-awk/awk.h +++ b/contrib/one-true-awk/awk.h @@ -176,7 +176,6 @@ typedef struct Node { #define NIL ((Node *) 0) extern Node *winner; -extern Node *nullstat; extern Node *nullnode; /* ctypes */ diff --git a/contrib/one-true-awk/b.c b/contrib/one-true-awk/b.c index f650269753c7..a8f67785a6ea 100644 --- a/contrib/one-true-awk/b.c +++ b/contrib/one-true-awk/b.c @@ -369,36 +369,49 @@ int quoted(const uschar **pp) /* pick up next thing after a \\ */ /* BUG: should advance by utf-8 char even if makes no sense */ - if ((c = *p++) == 't') { + switch ((c = *p++)) { + case 't': c = '\t'; - } else if (c == 'n') { + break; + case 'n': c = '\n'; - } else if (c == 'f') { + break; + case 'f': c = '\f'; - } else if (c == 'r') { + break; + case 'r': c = '\r'; - } else if (c == 'b') { + break; + case 'b': c = '\b'; - } else if (c == 'v') { + break; + case 'v': c = '\v'; - } else if (c == 'a') { + break; + case 'a': c = '\a'; - } else if (c == '\\') { + break; + case '\\': c = '\\'; - } else if (c == 'x') { /* 2 hex digits follow */ - c = hexstr(&p, 2); /* this adds a null if number is invalid */ - } else if (c == 'u') { /* unicode char number up to 8 hex digits */ + break; + case 'x': /* 2 hex digits follow */ + c = hexstr(&p, 2); /* this adds a null if number is invalid */ + break; + case 'u': /* unicode char number up to 8 hex digits */ c = hexstr(&p, 8); - } else if (isoctdigit(c)) { /* \d \dd \ddd */ - int n = c - '0'; - if (isoctdigit(*p)) { - n = 8 * n + *p++ - '0'; - if (isoctdigit(*p)) + break; + default: + if (isoctdigit(c)) { /* \d \dd \ddd */ + int n = c - '0'; + if (isoctdigit(*p)) { n = 8 * n + *p++ - '0'; + if (isoctdigit(*p)) + n = 8 * n + *p++ - '0'; + } + c = n; } - c = n; - } /* else */ - /* c = c; */ + } + *pp = p; return c; } @@ -645,7 +658,7 @@ static int set_gototab(fa *f, int state, int ch, int val) /* hide gototab implem f->gototab[state].entries[0].state = val; f->gototab[state].inuse++; return val; - } else if (ch > f->gototab[state].entries[f->gototab[state].inuse-1].ch) { + } else if ((unsigned)ch > f->gototab[state].entries[f->gototab[state].inuse-1].ch) { // not seen yet, insert and return gtt *tab = & f->gototab[state]; if (tab->inuse + 1 >= tab->allocated) @@ -869,7 +882,7 @@ bool fnematch(fa *pfa, FILE *f, char **pbuf, int *pbufsize, int quantum) * Call u8_rune with at least awk_mb_cur_max ahead in * the buffer until EOF interferes. */ - if (k - j < awk_mb_cur_max) { + if (k - j < (int)awk_mb_cur_max) { if (k + awk_mb_cur_max > buf + bufsize) { char *obuf = buf; adjbuf((char **) &buf, &bufsize, diff --git a/contrib/one-true-awk/bugs-fixed/ofs-rebuild.awk b/contrib/one-true-awk/bugs-fixed/ofs-rebuild.awk index dd2700031524..7c5e5eee3ec6 100644 --- a/contrib/one-true-awk/bugs-fixed/ofs-rebuild.awk +++ b/contrib/one-true-awk/bugs-fixed/ofs-rebuild.awk @@ -10,7 +10,7 @@ BEGIN { # Change OFS after (conceptually) rebuilding the record OFS = "<>" - # Unmodifed nawk prints "a<>b<>3333<>d<>e<>f<>g" because + # Unmodified nawk prints "a<>b<>3333<>d<>e<>f<>g" because # it delays rebuilding $0 until it's needed, and then it uses # the current value of OFS. Oops. print diff --git a/contrib/one-true-awk/bugs-fixed/system-status.ok2 b/contrib/one-true-awk/bugs-fixed/system-status.ok2 index f1f631e1cb33..c8f39fcb8e66 100644 --- a/contrib/one-true-awk/bugs-fixed/system-status.ok2 +++ b/contrib/one-true-awk/bugs-fixed/system-status.ok2 @@ -1,3 +1,3 @@ normal status 42 -death by signal status 257 +death by signal status 265 death by signal with core dump status 262 diff --git a/contrib/one-true-awk/lex.c b/contrib/one-true-awk/lex.c index 141cc81d2b59..7c61bba46d13 100644 --- a/contrib/one-true-awk/lex.c +++ b/contrib/one-true-awk/lex.c @@ -225,7 +225,7 @@ int yylex(void) ; unput(c); /* - * Next line is a hack, itcompensates for + * Next line is a hack, it compensates for * unput's treatment of \n. */ lineno++; diff --git a/contrib/one-true-awk/lib.c b/contrib/one-true-awk/lib.c index e6fb99c744b5..4b0addf21525 100644 --- a/contrib/one-true-awk/lib.c +++ b/contrib/one-true-awk/lib.c @@ -335,14 +335,16 @@ int readcsvrec(char **pbuf, int *pbufsize, FILE *inf, bool newflag) /* csv can h char *getargv(int n) /* get ARGV[n] */ { + Array *ap; Cell *x; char *s, temp[50]; - extern Array *ARGVtab; + extern Cell *ARGVcell; + ap = (Array *)ARGVcell->sval; snprintf(temp, sizeof(temp), "%d", n); - if (lookup(temp, ARGVtab) == NULL) + if (lookup(temp, ap) == NULL) return NULL; - x = setsymtab(temp, "", 0.0, STR, ARGVtab); + x = setsymtab(temp, "", 0.0, STR, ap); s = getsval(x); DPRINTF("getargv(%d) returns |%s|\n", n, s); return s; diff --git a/contrib/one-true-awk/main.c b/contrib/one-true-awk/main.c index 0e70288a92f3..02d02991bce7 100644 --- a/contrib/one-true-awk/main.c +++ b/contrib/one-true-awk/main.c @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20240422"; +const char *version = "version 20240623"; #define DEBUG #include @@ -62,22 +62,42 @@ static noreturn void fpecatch(int n ) { #ifdef SA_SIGINFO - static const char *emsg[] = { - [0] = "Unknown error", - [FPE_INTDIV] = "Integer divide by zero", - [FPE_INTOVF] = "Integer overflow", - [FPE_FLTDIV] = "Floating point divide by zero", - [FPE_FLTOVF] = "Floating point overflow", - [FPE_FLTUND] = "Floating point underflow", - [FPE_FLTRES] = "Floating point inexact result", - [FPE_FLTINV] = "Invalid Floating point operation", - [FPE_FLTSUB] = "Subscript out of range", - }; + const char *mesg = NULL; + + switch (si->si_code) { + case FPE_INTDIV: + mesg = "Integer divide by zero"; + break; + case FPE_INTOVF: + mesg = "Integer overflow"; + break; + case FPE_FLTDIV: + mesg = "Floating point divide by zero"; + break; + case FPE_FLTOVF: + mesg = "Floating point overflow"; + break; + case FPE_FLTUND: + mesg = "Floating point underflow"; + break; + case FPE_FLTRES: + mesg = "Floating point inexact result"; + break; + case FPE_FLTINV: + mesg = "Invalid Floating point operation"; + break; + case FPE_FLTSUB: + mesg = "Subscript out of range"; + break; + case 0: + default: + mesg = "Unknown error"; + break; + } #endif FATAL("floating point exception" #ifdef SA_SIGINFO - ": %s", (size_t)si->si_code < sizeof(emsg) / sizeof(emsg[0]) && - emsg[si->si_code] ? emsg[si->si_code] : emsg[0] + ": %s", mesg #endif ); } diff --git a/contrib/one-true-awk/makefile b/contrib/one-true-awk/makefile index c62908709d1c..9c92ca4aae33 100644 --- a/contrib/one-true-awk/makefile +++ b/contrib/one-true-awk/makefile @@ -32,6 +32,7 @@ CFLAGS = -O2 #CC = cc -O4 -Wall -pedantic -fno-strict-aliasing #CC = cc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov HOSTCC = cc -g -Wall -pedantic -Wcast-qual +# HOSTCC = g++ -g -Wall -pedantic -Wcast-qual CC = $(HOSTCC) # change this is cross-compiling. # By fiat, to make our lives easier, yacc is now defined to be bison. diff --git a/contrib/one-true-awk/proto.h b/contrib/one-true-awk/proto.h index b44f9e7a5599..a07a26b6e38b 100644 --- a/contrib/one-true-awk/proto.h +++ b/contrib/one-true-awk/proto.h @@ -34,9 +34,6 @@ extern void startreg(void); extern int input(void); extern void unput(int); extern void unputstr(const char *); -extern int yylook(void); -extern int yyback(int *, int); -extern int yyinput(void); extern fa *makedfa(const char *, bool); extern fa *mkdfa(const char *, bool); @@ -169,7 +166,6 @@ extern Cell *boolop(Node **, int); extern Cell *relop(Node **, int); extern void tfree(Cell *); extern Cell *gettemp(void); -extern Cell *field(Node **, int); extern Cell *indirect(Node **, int); extern Cell *substr(Node **, int); extern Cell *sindex(Node **, int); diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c index 9c61b1a1c558..3f9f3d8626fc 100644 --- a/contrib/one-true-awk/run.c +++ b/contrib/one-true-awk/run.c @@ -724,7 +724,7 @@ int u8_byte2char(const char *s, int bytenum) return charnum; } -/* runetochar() adapted from rune.c in the Plan 9 distributione */ +/* runetochar() adapted from rune.c in the Plan 9 distribution */ enum { @@ -2061,7 +2061,7 @@ static char *nawk_tolower(const char *s) Cell *bltin(Node **a, int n) /* builtin functions. a[0] is type, a[1] is arg list */ { Cell *x, *y; - Awkfloat u; + Awkfloat u = 0; int t, sz; Awkfloat tmp; char *buf, *fmt; @@ -2513,7 +2513,7 @@ Cell *dosub(Node **a, int subop) /* sub and gsub */ const char *start; const char *noempty = NULL; /* empty match disallowed here */ size_t m = 0; /* match count */ - size_t whichm; /* which match to select, 0 = global */ + size_t whichm = 0; /* which match to select, 0 = global */ int mtype; /* match type */ if (a[0] == NULL) { /* 0 => a[1] is already-compiled regexpr */ diff --git a/contrib/one-true-awk/testdir/T.argv b/contrib/one-true-awk/testdir/T.argv index 55e2754cd8b5..2002d3cb28c1 100755 --- a/contrib/one-true-awk/testdir/T.argv +++ b/contrib/one-true-awk/testdir/T.argv @@ -148,3 +148,26 @@ END { printf("ARGV[%d] is %s\n", i, ARGV[i]) }' >foo2 diff foo1 foo2 || echo 'BAD: T.argv delete ARGV[2]' + +# deleting ARGV used to trigger a use-after-free crash when awk +# iterates over it to read files. +echo >foo1 +echo >foo2 +echo >foo3 + +$awk 'BEGIN { + delete ARGV + ARGV[0] = "awk" + ARGV[1] = "/dev/null" + ARGC = 2 +} { + # this should not be executed + print "FILENAME: " FILENAME + fflush() +}' foo1 foo2 foo3 >foo4 + +awkstatus=$? +diff /dev/null foo4 +if [ $? -ne 0 ] || [ $awkstatus -ne 0 ]; then + echo 'BAD: T.argv delete ARGV' +fi diff --git a/contrib/one-true-awk/testdir/T.csconcat b/contrib/one-true-awk/testdir/T.csconcat index 51996007db86..a87754326682 100755 --- a/contrib/one-true-awk/testdir/T.csconcat +++ b/contrib/one-true-awk/testdir/T.csconcat @@ -1,4 +1,4 @@ -echo T.csconcat: test constant string concatentation +echo T.csconcat: test constant string concatenation awk=${awk-../a.out} diff --git a/contrib/one-true-awk/tran.c b/contrib/one-true-awk/tran.c index 482eede1de4c..ad8234a03e86 100644 --- a/contrib/one-true-awk/tran.c +++ b/contrib/one-true-awk/tran.c @@ -57,8 +57,7 @@ Cell *fnrloc; /* FNR */ Cell *ofsloc; /* OFS */ Cell *orsloc; /* ORS */ Cell *rsloc; /* RS */ -Array *ARGVtab; /* symbol table containing ARGV[...] */ -Array *ENVtab; /* symbol table containing ENVIRON[...] */ +Cell *ARGVcell; /* cell with symbol table containing ARGV[...] */ Cell *rstartloc; /* RSTART */ Cell *rlengthloc; /* RLENGTH */ Cell *subseploc; /* SUBSEP */ @@ -107,36 +106,39 @@ void syminit(void) /* initialize symbol table with builtin vars */ void arginit(int ac, char **av) /* set up ARGV and ARGC */ { + Array *ap; Cell *cp; int i; char temp[50]; ARGC = &setsymtab("ARGC", "", (Awkfloat) ac, NUM, symtab)->fval; cp = setsymtab("ARGV", "", 0.0, ARR, symtab); - ARGVtab = makesymtab(NSYMTAB); /* could be (int) ARGC as well */ + ap = makesymtab(NSYMTAB); /* could be (int) ARGC as well */ free(cp->sval); - cp->sval = (char *) ARGVtab; + cp->sval = (char *) ap; for (i = 0; i < ac; i++) { double result; sprintf(temp, "%d", i); if (is_number(*av, & result)) - setsymtab(temp, *av, result, STR|NUM, ARGVtab); + setsymtab(temp, *av, result, STR|NUM, ap); else - setsymtab(temp, *av, 0.0, STR, ARGVtab); + setsymtab(temp, *av, 0.0, STR, ap); av++; } + ARGVcell = cp; } void envinit(char **envp) /* set up ENVIRON variable */ { + Array *ap; Cell *cp; char *p; cp = setsymtab("ENVIRON", "", 0.0, ARR, symtab); - ENVtab = makesymtab(NSYMTAB); + ap = makesymtab(NSYMTAB); free(cp->sval); - cp->sval = (char *) ENVtab; + cp->sval = (char *) ap; for ( ; *envp; envp++) { double result; @@ -146,9 +148,9 @@ void envinit(char **envp) /* set up ENVIRON variable */ continue; *p++ = 0; /* split into two strings at = */ if (is_number(p, & result)) - setsymtab(*envp, p, result, STR|NUM, ENVtab); + setsymtab(*envp, p, result, STR|NUM, ap); else - setsymtab(*envp, p, 0.0, STR, ENVtab); + setsymtab(*envp, p, 0.0, STR, ap); p[-1] = '='; /* restore in case env is passed down to a shell */ } } From nobody Sun Dec 1 17:33:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y1Ysf0LPyz5fwNy; Sun, 01 Dec 2024 17:33:10 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1Ysd6xx5z40kL; Sun, 1 Dec 2024 17:33:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733074390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d2sj0b3dcTIjUaxZ/UsLtMPDTiN023w0UqeSN/fBuK0=; b=FnOUkro7Tl8ILAe3FgT5V6FACQs1Lv/48HzF3H8SzRgOj+G6tMphjGa1lWwYBbGC9x/FrD SmvdMrYjq15idDT6mb15UOLzJRtljRwy4tDPALgLJHjlcVxoCPU3bKGnykshl+V02FSBKR fhBoq5rnMl94o+rB1XCfBYsbKo+1v6zwWHJA37eQj6KkHi1ViHln1rAyQH7ORgizW3wuOC nxj4AunSPHf/QLzaGadECAA7DmZs1QfdTDT5tyw/bGh6jJpEXMoDnLVIzsAM9LisK64YiG NNo7WxQ70vUZq2AlpBIqFeinYVYG8nDLTAJpd9MjeN44ZPXf5kZIEQJBptn0PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733074390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d2sj0b3dcTIjUaxZ/UsLtMPDTiN023w0UqeSN/fBuK0=; b=xjFOp8c9anYTisNR0XXdeGKaOQzvbyJm1JgBQELgqu9sVVbfOgOigXy0u81JSW0LQ/5fHL 957HTT7KICtNcqAtdp5nPk2cZl8H5hXdH9zSS8atIZkQWw1vpdM+HOIZvmoWq/SA2zpc5x upwVplsn85UmYYQ0osUFgRpQOVJJdodl9ZsxOPxgKcVhXSgwY86TMZ8lYwxI7qwTt7nZhW Lw04RxWGZX5OZJkAzamLSgya1NmT1LhLTEd4vd3U+IfTHTqfScQAxXiG/fIg5T3iAii22I AAL5bDVUbdcJOPLKnkWtCGAuud3Rp5JFfQmNXGlsWmDU2pOoagfFDlIdF+obMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733074390; a=rsa-sha256; cv=none; b=sAd+mAjRZgxwFmdKzHN9FE5N04w9bqaD5R/Ejml6KPi5Zwq6gxWzbFUuYgDE6p/U0irhlO MHj/1CA4sJMmv3syLqI//WoTZvgdP0EK6ArrjPXyhX5rRdub8wh/IKFFeDJW3lyGBgQQoO DBYI1+ZRA5LsmxCaFXsz2EfFHogM5feHMmGvgLSBcZastUxEluOiGavdHSHh9byTlxgZj3 FNuhpsEDajilVIMboMnYhAlZR6/7swVGf0+YZfCzvlxM1kSEM4gc7gvXzzTR4FoI2sU4/k XjmRDtRweEMSXDh+CztKYJTjncNNOv+NdQp4ZuQS1/uQHEp+qEx6yxuJqehAiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y1Ysd6Dbrz12qY; Sun, 1 Dec 2024 17:33:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B1HX9C9014637; Sun, 1 Dec 2024 17:33:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1HX9og014633; Sun, 1 Dec 2024 17:33:09 GMT (envelope-from git) Date: Sun, 1 Dec 2024 17:33:09 GMT Message-Id: <202412011733.4B1HX9og014633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 955208d636fc - stable/14 - ota: Merge 20240728 (bsd-feature) from ota 3319c34a8713 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 955208d636fc453f655136dacf8ddc12287667d0 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=955208d636fc453f655136dacf8ddc12287667d0 commit 955208d636fc453f655136dacf8ddc12287667d0 Author: Warner Losh AuthorDate: 2024-11-30 04:57:45 +0000 Commit: Warner Losh CommitDate: 2024-12-01 17:33:16 +0000 ota: Merge 20240728 (bsd-feature) from ota 3319c34a8713 Jul 28, 2024 Fixed readcsvrec resize segfault when reading csv records longer than 8k. Thanks to Ozan Yigit. mktime() added to bsd-features branch. Thanks to Todd Miller. (cherry picked from commit 8d457988a72487b35ee3922671775d73169339e3) --- contrib/one-true-awk/FIXES | 5 +++++ contrib/one-true-awk/awk.h | 1 + contrib/one-true-awk/b.c | 2 +- contrib/one-true-awk/lex.c | 1 + contrib/one-true-awk/lib.c | 2 +- contrib/one-true-awk/main.c | 2 +- contrib/one-true-awk/run.c | 22 +++++++++++++++++++++- 7 files changed, 31 insertions(+), 4 deletions(-) diff --git a/contrib/one-true-awk/FIXES b/contrib/one-true-awk/FIXES index b59f32831e2c..ad8bce2645fd 100644 --- a/contrib/one-true-awk/FIXES +++ b/contrib/one-true-awk/FIXES @@ -25,6 +25,11 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the second edition of the AWK book was published in September 2023. +Jul 28, 2024 + Fixed readcsvrec resize segfault when reading csv records longer + than 8k. Thanks to Ozan Yigit. + mktime() added to bsd-features branch. Thanks to Todd Miller. + Jun 23, 2024 Fix signal for system-status test. Thanks to Tim van der Molen. Rewrite if-else chain as switch. Thanks to Andrew Sukach. diff --git a/contrib/one-true-awk/awk.h b/contrib/one-true-awk/awk.h index 76c2a772b4ce..a57c1598d67e 100644 --- a/contrib/one-true-awk/awk.h +++ b/contrib/one-true-awk/awk.h @@ -162,6 +162,7 @@ extern Cell *symtabloc; /* SYMTAB */ #define FRSHIFT 20 #define FSYSTIME 21 #define FSTRFTIME 22 +#define FMKTIME 23 /* Node: parse tree is made of nodes, with Cell's at bottom */ diff --git a/contrib/one-true-awk/b.c b/contrib/one-true-awk/b.c index a8f67785a6ea..455e6f812d3e 100644 --- a/contrib/one-true-awk/b.c +++ b/contrib/one-true-awk/b.c @@ -616,7 +616,7 @@ static void resize_gototab(fa *f, int state) if (p == NULL) overflo(__func__); - // need to initialized the new memory to zero + // need to initialize the new memory to zero size_t orig_size = f->gototab[state].allocated; // 2nd half of new mem is this size memset(p + orig_size, 0, orig_size * sizeof(gtte)); // clean it out diff --git a/contrib/one-true-awk/lex.c b/contrib/one-true-awk/lex.c index 7c61bba46d13..c135db4dfb67 100644 --- a/contrib/one-true-awk/lex.c +++ b/contrib/one-true-awk/lex.c @@ -74,6 +74,7 @@ const Keyword keywords[] = { /* keep sorted: binary searched */ { "log", FLOG, BLTIN }, { "lshift", FLSHIFT, BLTIN }, { "match", MATCHFCN, MATCHFCN }, + { "mktime", FMKTIME, BLTIN }, { "next", NEXT, NEXT }, { "nextfile", NEXTFILE, NEXTFILE }, { "or", FFOR, BLTIN }, diff --git a/contrib/one-true-awk/lib.c b/contrib/one-true-awk/lib.c index 4b0addf21525..c2ed4f2607ac 100644 --- a/contrib/one-true-awk/lib.c +++ b/contrib/one-true-awk/lib.c @@ -231,7 +231,7 @@ int readrec(char **pbuf, int *pbufsize, FILE *inf, bool newflag) /* read one rec char *rs = getsval(rsloc); if (CSV) { - c = readcsvrec(pbuf, pbufsize, inf, newflag); + c = readcsvrec(&buf, &bufsize, inf, newflag); isrec = (c == EOF && rr == buf) ? false : true; } else if (*rs && rs[1]) { bool found; diff --git a/contrib/one-true-awk/main.c b/contrib/one-true-awk/main.c index 02d02991bce7..7d3ef84a580f 100644 --- a/contrib/one-true-awk/main.c +++ b/contrib/one-true-awk/main.c @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20240623"; +const char *version = "version 20240728"; #define DEBUG #include diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c index 3f9f3d8626fc..286a601f3311 100644 --- a/contrib/one-true-awk/run.c +++ b/contrib/one-true-awk/run.c @@ -2069,7 +2069,7 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0] is type, a[1] is arg lis FILE *fp; int status = 0; time_t tv; - struct tm *tm; + struct tm *tm, tmbuf; int estatus = 0; t = ptoi(a[0]); @@ -2223,6 +2223,26 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0] is type, a[1] is arg lis else u = fflush(fp); break; + case FMKTIME: + memset(&tmbuf, 0, sizeof(tmbuf)); + tm = &tmbuf; + t = sscanf(getsval(x), "%d %d %d %d %d %d %d", + &tm->tm_year, &tm->tm_mon, &tm->tm_mday, &tm->tm_hour, + &tm->tm_min, &tm->tm_sec, &tm->tm_isdst); + switch (t) { + case 6: + tm->tm_isdst = -1; /* let mktime figure it out */ + /* FALLTHROUGH */ + case 7: + tm->tm_year -= 1900; + tm->tm_mon--; + u = mktime(tm); + break; + default: + u = -1; + break; + } + break; case FSYSTIME: u = time((time_t *) 0); break;