From owner-dev-commits-src-main@freebsd.org Mon Jun 28 08:15:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D7DA651F23; Mon, 28 Jun 2021 08:15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GD0m60pGmz4bdk; Mon, 28 Jun 2021 08:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 044A621EB4; Mon, 28 Jun 2021 08:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15S8FXd7014454; Mon, 28 Jun 2021 08:15:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15S8FXVK014453; Mon, 28 Jun 2021 08:15:33 GMT (envelope-from git) Date: Mon, 28 Jun 2021 08:15:33 GMT Message-Id: <202106280815.15S8FXVK014453@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: e0893890eb60 - main - ipsec: globalize lft zone and zero out buffers at allocation time MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0893890eb6080e92f7e7fd9da319536bb5fe64e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 08:15:34 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e0893890eb6080e92f7e7fd9da319536bb5fe64e commit e0893890eb6080e92f7e7fd9da319536bb5fe64e Author: Mateusz Guzik AuthorDate: 2021-06-24 11:19:09 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-28 08:14:26 +0000 ipsec: globalize lft zone and zero out buffers at allocation time Creation of a zone is expensive and there is no need to have one for every vnet. Moreover, this wastes memory as these separate zones cannot use the same per-cpu caches. Finally, this is a step towards replacing the custom zone with pcpu-16. Two counter_u64_zero calls induce back-to-back IPIs to zero everything out. Instead, pass the M_ZERO flag to let uma just iterate all buffers. The counter(9) API abstraction is already violated by not using counter_u64_alloc. Reviewed by: ae Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30916 --- sys/netipsec/key.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 86dc9ea41024..4ca65979d5b2 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -534,8 +534,7 @@ MALLOC_DEFINE(M_IPSEC_SAQ, "ipsec-saq", "ipsec sa acquire"); MALLOC_DEFINE(M_IPSEC_SAR, "ipsec-reg", "ipsec sa acquire"); MALLOC_DEFINE(M_IPSEC_SPDCACHE, "ipsec-spdcache", "ipsec SPD cache"); -VNET_DEFINE_STATIC(uma_zone_t, key_lft_zone); -#define V_key_lft_zone VNET(key_lft_zone) +static uma_zone_t __read_mostly ipsec_key_lft_zone; /* * set parameters into secpolicyindex buffer. @@ -2939,13 +2938,11 @@ key_newsav(const struct sadb_msghdr *mhp, struct secasindex *saidx, goto done; } mtx_init(sav->lock, "ipsec association", NULL, MTX_DEF); - sav->lft_c = uma_zalloc_pcpu(V_key_lft_zone, M_NOWAIT); + sav->lft_c = uma_zalloc_pcpu(ipsec_key_lft_zone, M_NOWAIT | M_ZERO); if (sav->lft_c == NULL) { *errp = ENOBUFS; goto done; } - counter_u64_zero(sav->lft_c_allocations); - counter_u64_zero(sav->lft_c_bytes); sav->spi = spi; sav->seq = mhp->msg->sadb_msg_seq; @@ -3031,7 +3028,7 @@ done: free(sav->lock, M_IPSEC_MISC); } if (sav->lft_c != NULL) - uma_zfree_pcpu(V_key_lft_zone, sav->lft_c); + uma_zfree_pcpu(ipsec_key_lft_zone, sav->lft_c); free(sav, M_IPSEC_SA), sav = NULL; } if (sah != NULL) @@ -3109,7 +3106,7 @@ key_delsav(struct secasvar *sav) if ((sav->flags & SADB_X_EXT_F_CLONED) == 0) { mtx_destroy(sav->lock); free(sav->lock, M_IPSEC_MISC); - uma_zfree_pcpu(V_key_lft_zone, sav->lft_c); + uma_zfree_pcpu(ipsec_key_lft_zone, sav->lft_c); } free(sav, M_IPSEC_SA); } @@ -8269,10 +8266,6 @@ key_init(void) TAILQ_INIT(&V_sptree_ifnet[i]); } - V_key_lft_zone = uma_zcreate("IPsec SA lft_c", - sizeof(uint64_t) * 2, NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_PCPU); - TAILQ_INIT(&V_sahtree); V_sphashtbl = hashinit(SPHASH_NHASH, M_IPSEC_SP, &V_sphash_mask); V_savhashtbl = hashinit(SAVHASH_NHASH, M_IPSEC_SA, &V_savhash_mask); @@ -8294,6 +8287,10 @@ key_init(void) if (!IS_DEFAULT_VNET(curvnet)) return; + ipsec_key_lft_zone = uma_zcreate("IPsec SA lft_c", + sizeof(uint64_t) * 2, NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, UMA_ZONE_PCPU); + SPTREE_LOCK_INIT(); REGTREE_LOCK_INIT(); SAHTREE_LOCK_INIT(); @@ -8409,10 +8406,12 @@ key_destroy(void) SPACQ_UNLOCK(); hashdestroy(V_acqaddrhashtbl, M_IPSEC_SAQ, V_acqaddrhash_mask); hashdestroy(V_acqseqhashtbl, M_IPSEC_SAQ, V_acqseqhash_mask); - uma_zdestroy(V_key_lft_zone); if (!IS_DEFAULT_VNET(curvnet)) return; + + uma_zdestroy(ipsec_key_lft_zone); + #ifndef IPSEC_DEBUG2 callout_drain(&key_timer); #endif From owner-dev-commits-src-main@freebsd.org Mon Jun 28 12:12:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98AD5655710; Mon, 28 Jun 2021 12:12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GD60w3v2Cz4tk5; Mon, 28 Jun 2021 12:12:00 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 6DF5525386; Mon, 28 Jun 2021 12:12:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SCC0ww035314; Mon, 28 Jun 2021 12:12:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SCC0fu035313; Mon, 28 Jun 2021 12:12:00 GMT (envelope-from git) Date: Mon, 28 Jun 2021 12:12:00 GMT Message-Id: <202106281212.15SCC0fu035313@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 539228d372fa - main - LinuxKPI: pci re-add pci_free_irq_vectors() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 539228d372fae8c4cc401b7ba4620f27783be5a4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 12:12:00 -0000 The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=539228d372fae8c4cc401b7ba4620f27783be5a4 commit 539228d372fae8c4cc401b7ba4620f27783be5a4 Author: Bjoern A. Zeeb AuthorDate: 2021-06-28 12:09:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-06-28 12:09:16 +0000 LinuxKPI: pci re-add pci_free_irq_vectors() Re-add pci_free_irq_vectors() accidentally removed in d4a4960c6559caa890af0901a21296e75b961210 and now needed by drm-kmod v5.5. Reported by: wulf Sponsored by: The FreeBSD Foundation MFC after: 3 days X-MFC with: d4a4960c6559caa890af0901a21296e75b961210 --- sys/compat/linuxkpi/common/include/linux/pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 007665730353..85278356dfea 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -572,6 +572,7 @@ lkpi_pci_disable_msi(struct pci_dev *pdev) pdev->msi_enabled = false; } #define pci_disable_msi(pdev) lkpi_pci_disable_msi(pdev) +#define pci_free_irq_vectors(pdev) lkpi_pci_disable_msi(pdev) unsigned long pci_resource_start(struct pci_dev *pdev, int bar); unsigned long pci_resource_len(struct pci_dev *pdev, int bar); From owner-dev-commits-src-main@freebsd.org Mon Jun 28 12:15:47 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AED736553DD; Mon, 28 Jun 2021 12:15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GD65H4Symz4tkv; Mon, 28 Jun 2021 12:15:47 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 819DD25314; Mon, 28 Jun 2021 12:15:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SCFlnp036786; Mon, 28 Jun 2021 12:15:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SCFlOD036785; Mon, 28 Jun 2021 12:15:47 GMT (envelope-from git) Date: Mon, 28 Jun 2021 12:15:47 GMT Message-Id: <202106281215.15SCFlOD036785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 399da52fff81 - main - LinuxKPI: firmware, implement deferred loading for "nowait" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 399da52fff81a33b1f2c0cee3e8574bc3c63166f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 12:15:47 -0000 The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=399da52fff81a33b1f2c0cee3e8574bc3c63166f commit 399da52fff81a33b1f2c0cee3e8574bc3c63166f Author: Bjoern A. Zeeb AuthorDate: 2021-06-20 13:49:46 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-06-28 12:13:43 +0000 LinuxKPI: firmware, implement deferred loading for "nowait" Change linuxkpi_request_firmware_nowait() to deferred firmware loading scheduling a task. This changes behaviour in some cases that we return from loading the driver before the driver is finished initialising if the driver does not deal with it (wait). This brings the behaviour one would expect from when this function is called and I implemented it to see if it would help a specific case. Sponsored by: The FreeBSD Foundation MFC after: 12 days Reviewed by: hselasky, imp (earlier version) Differential Revision: https://reviews.freebsd.org/D30830 --- sys/compat/linuxkpi/common/src/linux_firmware.c | 74 +++++++++++++++++++------ 1 file changed, 58 insertions(+), 16 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_firmware.c b/sys/compat/linuxkpi/common/src/linux_firmware.c index 289779c5246c..d779b509105e 100644 --- a/sys/compat/linuxkpi/common/src/linux_firmware.c +++ b/sys/compat/linuxkpi/common/src/linux_firmware.c @@ -30,9 +30,13 @@ * $FreeBSD$ */ +#include +#include #include #include #include +#include +#include #include #include @@ -42,6 +46,16 @@ MALLOC_DEFINE(M_LKPI_FW, "lkpifw", "LinuxKPI firmware"); +struct lkpi_fw_task { + /* Task and arguments for the "nowait" callback. */ + struct task fw_task; + gfp_t gfp; + const char *fw_name; + struct device *dev; + void *drv; + void(*cont)(const struct linuxkpi_firmware *, void *); +}; + static int _linuxkpi_request_firmware(const char *fw_name, const struct linuxkpi_firmware **fw, struct device *dev, gfp_t gfp __unused, bool enoentok, bool warn) @@ -52,8 +66,10 @@ _linuxkpi_request_firmware(const char *fw_name, const struct linuxkpi_firmware * char *p; uint32_t flags; - if (fw_name == NULL || fw == NULL || dev == NULL) + if (fw_name == NULL || fw == NULL || dev == NULL) { + *fw = NULL; return (-EINVAL); + } /* Set independent on "warn". To debug, bootverbose is avail. */ flags = FIRMWARE_GET_NOWARN; @@ -129,28 +145,54 @@ _linuxkpi_request_firmware(const char *fw_name, const struct linuxkpi_firmware * return (0); } -int -linuxkpi_request_firmware_nowait(struct module *mod __unused, bool _t __unused, - const char *fw_name, struct device *dev, gfp_t gfp, void *drv, - void(*cont)(const struct linuxkpi_firmware *, void *)) +static void +lkpi_fw_task(void *ctx, int pending) { - const struct linuxkpi_firmware *lfw; + struct lkpi_fw_task *lfwt; + const struct linuxkpi_firmware *fw; int error; + KASSERT(ctx != NULL && pending == 1, ("%s: lfwt %p, pending %d\n", + __func__, ctx, pending)); + + lfwt = ctx; + if (lfwt->cont == NULL) + goto out; + + error = _linuxkpi_request_firmware(lfwt->fw_name, &fw, lfwt->dev, + lfwt->gfp, true, true); + /* * Linux seems to run the callback if it cannot find the firmware. - * The fact that this is "_nowait()" and has a callback seems to - * imply that this is run in a deferred conext which we currently - * do not do. Should it become necessary (a driver actually requiring - * it) we would need to implement it here. + * We call it in all cases as it is the only feedback to the requester. */ - error = _linuxkpi_request_firmware(fw_name, &lfw, dev, gfp, true, true); - if (error == -ENOENT) - error = 0; - if (error == 0) - cont(lfw, drv); + lfwt->cont(fw, lfwt->drv); + /* Do not assume fw is still valid! */ - return (error); +out: + free(lfwt, M_LKPI_FW); +} + +int +linuxkpi_request_firmware_nowait(struct module *mod __unused, bool _t __unused, + const char *fw_name, struct device *dev, gfp_t gfp, void *drv, + void(*cont)(const struct linuxkpi_firmware *, void *)) +{ + struct lkpi_fw_task *lfwt; + int error; + + lfwt = malloc(sizeof(*lfwt), M_LKPI_FW, M_WAITOK | M_ZERO); + lfwt->gfp = gfp; + lfwt->fw_name = fw_name; + lfwt->dev = dev; + lfwt->drv = drv; + lfwt->cont = cont; + TASK_INIT(&lfwt->fw_task, 0, lkpi_fw_task, lfwt); + error = taskqueue_enqueue(taskqueue_thread, &lfwt->fw_task); + + if (error) + return (-error); + return (0); } int From owner-dev-commits-src-main@freebsd.org Mon Jun 28 12:18:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F70C655B0C; Mon, 28 Jun 2021 12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GD68p39lCz4ttC; Mon, 28 Jun 2021 12:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 5653425392; Mon, 28 Jun 2021 12:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SCIoWS037339; Mon, 28 Jun 2021 12:18:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SCIoM7037338; Mon, 28 Jun 2021 12:18:50 GMT (envelope-from git) Date: Mon, 28 Jun 2021 12:18:50 GMT Message-Id: <202106281218.15SCIoM7037338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 243b95978deb - main - net80211: ieee80211_probereq_ie fix length calculation for hw scans MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 243b95978debac3db06df6d26ca9f8d84f6cbd83 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 12:18:50 -0000 The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=243b95978debac3db06df6d26ca9f8d84f6cbd83 commit 243b95978debac3db06df6d26ca9f8d84f6cbd83 Author: Bjoern A. Zeeb AuthorDate: 2021-06-18 09:57:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-06-28 12:17:11 +0000 net80211: ieee80211_probereq_ie fix length calculation for hw scans c338cf2c6d5eacdee813191d5976aa531d450ee7 split up ieee80211_probereq_ie(). For HW scans we usually do not want to add a SSID to the IEs. During that split we allocate memory based on the length which will always include the length of the SSID and only later we reduced the length but never updated the value passed back to the caller. Split the SSID handling up and reduce the length before malloc(). This not only makes us not over-allocate in these situatoins but also fixes the length returned to the caller and with that usually directly passed to firmware. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D30813 --- sys/net80211/ieee80211_output.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 07f7349461ac..ab3e3142ad2c 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -2472,6 +2472,10 @@ ieee80211_probereq_ie(struct ieee80211vap *vap, struct ieee80211com *ic, if (!alloc && len > *frmlen) return (ENOBUFS); + /* For HW scans we usually do not pass in the SSID as IE. */ + if (ssidlen == -1) + len -= (2 + IEEE80211_NWID_LEN); + if (alloc) { frm = malloc(len, M_80211_VAP, M_WAITOK | M_ZERO); *frmp = frm; @@ -2479,10 +2483,7 @@ ieee80211_probereq_ie(struct ieee80211vap *vap, struct ieee80211com *ic, } else frm = *frmp; - /* For HW scans we usually do not pass in the SSID as IE. */ - if (ssidlen == -1) - len -= (2 + IEEE80211_NWID_LEN); - else + if (ssidlen != -1) frm = ieee80211_add_ssid(frm, ssid, ssidlen); rs = ieee80211_get_suprates(ic, ic->ic_curchan); frm = ieee80211_add_rates(frm, rs); From owner-dev-commits-src-main@freebsd.org Mon Jun 28 15:37:39 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7255D657F16; Mon, 28 Jun 2021 15:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDBZC2ZgPz3P7D; Mon, 28 Jun 2021 15:37:39 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 3CCBE27E80; Mon, 28 Jun 2021 15:37:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SFbdeo002781; Mon, 28 Jun 2021 15:37:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SFbdiG002780; Mon, 28 Jun 2021 15:37:39 GMT (envelope-from git) Date: Mon, 28 Jun 2021 15:37:39 GMT Message-Id: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 175841285e28 - main - Add deprecation notice for WITH_PROFILE option 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/main X-Git-Reftype: branch X-Git-Commit: 175841285e289edebb6603da39f02549521ce950 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 15:37:39 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=175841285e289edebb6603da39f02549521ce950 commit 175841285e289edebb6603da39f02549521ce950 Author: Ed Maste AuthorDate: 2021-06-27 17:21:26 +0000 Commit: Ed Maste CommitDate: 2021-06-28 15:36:59 +0000 Add deprecation notice for WITH_PROFILE option As discussed on freebsd-current [1] and freebsd-arch [2] and review D30833, FreeBSD 14 will ship without the _p.a libraries built with -pg. Both upstream and base system (in commit b762974cf4b9) Clang have been modified to remove the special case for linking against these libraries. Clang's -pg support and mcount() remain, so building with -pg can still be used on code that the user builds; we just do not provide prebuilt libraries compiled with -pg. A similar change is still needed for GCC. [1] https://lists.freebsd.org/pipermail/freebsd-current/2020-January/075105.html [2] https://lists.freebsd.org/archives/freebsd-arch/2021-June/000016.html MFC after: 1 week Sponsored by: The FreeBSD Foundation --- tools/build/options/WITHOUT_PROFILE | 2 ++ tools/build/options/WITH_PROFILE | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/build/options/WITHOUT_PROFILE b/tools/build/options/WITHOUT_PROFILE index 7fdb12c94cdd..5cc8dbb027c8 100644 --- a/tools/build/options/WITHOUT_PROFILE +++ b/tools/build/options/WITHOUT_PROFILE @@ -1,3 +1,5 @@ .\" $FreeBSD$ Do not build profiled libraries for use with .Xr gprof 8 . +This option is enabled by default as of +.Fx 14 . diff --git a/tools/build/options/WITH_PROFILE b/tools/build/options/WITH_PROFILE index 51814a1ea856..3f91c4394911 100644 --- a/tools/build/options/WITH_PROFILE +++ b/tools/build/options/WITH_PROFILE @@ -1,3 +1,5 @@ .\" $FreeBSD$ Build profiled libraries for use with .Xr gprof 8 . +This option is deprecated and is not present in +.Fx 14 . From owner-dev-commits-src-main@freebsd.org Mon Jun 28 15:49:25 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1217365805F; Mon, 28 Jun 2021 15:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDBqm6wbVz3PpL; Mon, 28 Jun 2021 15:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 D5E9A4D; Mon, 28 Jun 2021 15:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SFnOtD016052; Mon, 28 Jun 2021 15:49:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SFnOvQ016051; Mon, 28 Jun 2021 15:49:24 GMT (envelope-from git) Date: Mon, 28 Jun 2021 15:49:24 GMT Message-Id: <202106281549.15SFnOvQ016051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: d09388d01330 - main - pf: add pf_release_staten and use it in pf_unlink_state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d09388d013300fc4aa1ee1a6bc24260cd400aff3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 15:49:25 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d09388d013300fc4aa1ee1a6bc24260cd400aff3 commit d09388d013300fc4aa1ee1a6bc24260cd400aff3 Author: Mateusz Guzik AuthorDate: 2021-06-28 12:18:43 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-28 15:49:20 +0000 pf: add pf_release_staten and use it in pf_unlink_state Saves one atomic op. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 11 +++++++++++ sys/netpfil/pf/pf.c | 7 ++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index e07016f7b66c..9578ec0a701f 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1510,6 +1510,17 @@ pf_release_state(struct pf_state *s) return (0); } +static __inline int +pf_release_staten(struct pf_state *s, u_int n) +{ + + if (refcount_releasen(&s->refs, n)) { + pf_free_state(s); + return (1); + } else + return (0); +} + extern struct pf_state *pf_find_state_byid(uint64_t, uint32_t); extern struct pf_state *pf_find_state_all(struct pf_state_key_cmp *, u_int, int *); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 7e187a358783..02d0809f738d 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1732,11 +1732,8 @@ pf_unlink_state(struct pf_state *s, u_int flags) PF_HASHROW_UNLOCK(ih); pf_detach_state(s); - /* pf_state_insert() initialises refs to 2, so we can never release the - * last reference here, only in pf_release_state(). */ - (void)refcount_release(&s->refs); - - return (pf_release_state(s)); + /* pf_state_insert() initialises refs to 2 */ + return (pf_release_staten(s, 2)); } void From owner-dev-commits-src-main@freebsd.org Mon Jun 28 15:49:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44DB1657C75; Mon, 28 Jun 2021 15:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDBqp0Xtzz3PrP; Mon, 28 Jun 2021 15:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 EF96E277F5; Mon, 28 Jun 2021 15:49:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SFnPv2016076; Mon, 28 Jun 2021 15:49:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SFnPV8016075; Mon, 28 Jun 2021 15:49:25 GMT (envelope-from git) Date: Mon, 28 Jun 2021 15:49:25 GMT Message-Id: <202106281549.15SFnPV8016075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: ccb17a21041e - main - pf: factor out state allocation into pf_alloc_state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccb17a21041e9206b80fa9f64b6ec20233df6403 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 15:49:26 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ccb17a21041e9206b80fa9f64b6ec20233df6403 commit ccb17a21041e9206b80fa9f64b6ec20233df6403 Author: Mateusz Guzik AuthorDate: 2021-06-28 12:22:31 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-28 15:49:20 +0000 pf: factor out state allocation into pf_alloc_state Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 02d0809f738d..26989adfb613 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1736,6 +1736,28 @@ pf_unlink_state(struct pf_state *s, u_int flags) return (pf_release_staten(s, 2)); } +static struct pf_state * +pf_alloc_state(int flags) +{ + struct pf_state *s; + + s = uma_zalloc(V_pf_state_z, flags | M_ZERO); + if (__predict_false(s == NULL)) + return (NULL); + + for (int i = 0; i < 2; i++) { + s->bytes[i] = counter_u64_alloc(M_NOWAIT); + s->packets[i] = counter_u64_alloc(M_NOWAIT); + + if (s->bytes[i] == NULL || s->packets[i] == NULL) { + pf_free_state(s); + return (NULL); + } + } + + return (s); +} + void pf_free_state(struct pf_state *cur) { @@ -3730,21 +3752,11 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, REASON_SET(&reason, PFRES_SRCLIMIT); goto csfailed; } - s = uma_zalloc(V_pf_state_z, M_NOWAIT | M_ZERO); + s = pf_alloc_state(M_NOWAIT); if (s == NULL) { REASON_SET(&reason, PFRES_MEMORY); goto csfailed; } - for (int i = 0; i < 2; i++) { - s->bytes[i] = counter_u64_alloc(M_NOWAIT); - s->packets[i] = counter_u64_alloc(M_NOWAIT); - - if (s->bytes[i] == NULL || s->packets[i] == NULL) { - pf_free_state(s); - REASON_SET(&reason, PFRES_MEMORY); - goto csfailed; - } - } s->rule.ptr = r; s->nat_rule.ptr = nr; s->anchor.ptr = a; From owner-dev-commits-src-main@freebsd.org Mon Jun 28 15:49:27 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 53947657ED3; Mon, 28 Jun 2021 15:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDBqq1rfBz3Q2V; Mon, 28 Jun 2021 15:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 2711D27EC6; Mon, 28 Jun 2021 15:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SFnR4o016106; Mon, 28 Jun 2021 15:49:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SFnRVX016105; Mon, 28 Jun 2021 15:49:27 GMT (envelope-from git) Date: Mon, 28 Jun 2021 15:49:27 GMT Message-Id: <202106281549.15SFnRVX016105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: e6dd0e2e8d4f - main - pf: assert that sizeof(struct pf_state) <= 312 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6dd0e2e8d4f59275fb576a9ccb9d356d36457bb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 15:49:27 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e6dd0e2e8d4f59275fb576a9ccb9d356d36457bb commit e6dd0e2e8d4f59275fb576a9ccb9d356d36457bb Author: Mateusz Guzik AuthorDate: 2021-06-28 12:49:40 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-28 15:49:20 +0000 pf: assert that sizeof(struct pf_state) <= 312 To prevent accidentally going over a threshold which makes UMA fit only 12 objects per page instead of 13. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 9578ec0a701f..9f0bf002b631 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -551,6 +551,11 @@ struct pf_state { u_int8_t sync_updates; u_int8_t _tail[3]; }; + +/* + * Size <= fits 13 objects per page on LP64. Try to not grow the struct beyond that. + */ +_Static_assert(sizeof(struct pf_state) <= 312, "pf_state size crosses 312 bytes"); #endif /* From owner-dev-commits-src-main@freebsd.org Mon Jun 28 16:30:11 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A705658B10; Mon, 28 Jun 2021 16:30:11 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDCkp5fT8z3jL9; Mon, 28 Jun 2021 16:30:10 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 15SGU2pX097042; Mon, 28 Jun 2021 09:30:02 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 15SGU2j0097041; Mon, 28 Jun 2021 09:30:02 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202106281630.15SGU2j0097041@gndrsh.dnsmgr.net> Subject: Re: git: b762974cf4b9 - main - clang: stop linking _p libs for -pg as of FreeBSD 14 In-Reply-To: <202106271712.15RHConb019042@gitrepo.freebsd.org> To: Ed Maste Date: Mon, 28 Jun 2021 09:30:02 -0700 (PDT) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4GDCkp5fT8z3jL9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 16:30:11 -0000 > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b762974cf4b9ea77f1decf4a6d829372f0a97f75 > > commit b762974cf4b9ea77f1decf4a6d829372f0a97f75 > Author: Ed Maste > AuthorDate: 2021-06-26 23:58:16 +0000 > Commit: Ed Maste > CommitDate: 2021-06-27 17:12:12 +0000 > > clang: stop linking _p libs for -pg as of FreeBSD 14 > > In FreeBSD 14 we will stop providing _p libraries (compiled with -pg). So if this is being done in 14 only, why is there a MFC marker? Should that of been MFC: never? > Reviewed by: dim (upstream) > Obtained from: LLVM 699d47472c3f > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D30861 > --- > .../clang/lib/Driver/ToolChains/FreeBSD.cpp | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > > diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp > index 37c0a68234ed..652e5c4cb9e6 100644 > --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp > +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp > @@ -293,6 +293,8 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, > addLinkerCompressDebugSectionsOption(ToolChain, Args, CmdArgs); > AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA); > > + bool Profiling = Args.hasArg(options::OPT_pg) && > + ToolChain.getTriple().getOSMajorVersion() < 14; > if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { > // Use the static OpenMP runtime with -static-openmp > bool StaticOpenMP = Args.hasArg(options::OPT_static_openmp) && > @@ -302,7 +304,7 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, > if (D.CCCIsCXX()) { > if (ToolChain.ShouldLinkCXXStdlib(Args)) > ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); > - if (Args.hasArg(options::OPT_pg)) > + if (Profiling) > CmdArgs.push_back("-lm_p"); > else > CmdArgs.push_back("-lm"); > @@ -313,13 +315,13 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, > linkXRayRuntimeDeps(ToolChain, CmdArgs); > // FIXME: For some reason GCC passes -lgcc and -lgcc_s before adding > // the default system libraries. Just mimic this for now. > - if (Args.hasArg(options::OPT_pg)) > + if (Profiling) > CmdArgs.push_back("-lgcc_p"); > else > CmdArgs.push_back("-lgcc"); > if (Args.hasArg(options::OPT_static)) { > CmdArgs.push_back("-lgcc_eh"); > - } else if (Args.hasArg(options::OPT_pg)) { > + } else if (Profiling) { > CmdArgs.push_back("-lgcc_eh_p"); > } else { > CmdArgs.push_back("--as-needed"); > @@ -328,13 +330,13 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, > } > > if (Args.hasArg(options::OPT_pthread)) { > - if (Args.hasArg(options::OPT_pg)) > + if (Profiling) > CmdArgs.push_back("-lpthread_p"); > else > CmdArgs.push_back("-lpthread"); > } > > - if (Args.hasArg(options::OPT_pg)) { > + if (Profiling) { > if (Args.hasArg(options::OPT_shared)) > CmdArgs.push_back("-lc"); > else > @@ -347,7 +349,7 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, > > if (Args.hasArg(options::OPT_static)) { > CmdArgs.push_back("-lgcc_eh"); > - } else if (Args.hasArg(options::OPT_pg)) { > + } else if (Profiling) { > CmdArgs.push_back("-lgcc_eh_p"); > } else { > CmdArgs.push_back("--as-needed"); > @@ -416,7 +418,8 @@ void FreeBSD::addLibStdCxxIncludePaths( > void FreeBSD::AddCXXStdlibLibArgs(const ArgList &Args, > ArgStringList &CmdArgs) const { > CXXStdlibType Type = GetCXXStdlibType(Args); > - bool Profiling = Args.hasArg(options::OPT_pg); > + bool Profiling = > + Args.hasArg(options::OPT_pg) && getTriple().getOSMajorVersion() < 14; > > switch (Type) { > case ToolChain::CST_Libcxx: > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Mon Jun 28 17:26:52 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63A496594D6; Mon, 28 Jun 2021 17:26:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDF0D2MbXz3lgK; Mon, 28 Jun 2021 17:26:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 35023B59E; Mon, 28 Jun 2021 17:26:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f54.google.com with SMTP id p7so6458217qvn.5; Mon, 28 Jun 2021 10:26:52 -0700 (PDT) X-Gm-Message-State: AOAM532HnVKm+k8iAv6F8dsM3odbZh5YPtG31LYNycJV4aAw/ewfT5YB dUzfNwW00DGqkzdKKj0Yy5u9eAoL0Rjpegm07lM= X-Google-Smtp-Source: ABdhPJyN0u0HNPYFKP48OGNi2LsP9Giq9W58ENAmd+BcApJYvNl+xE0OxhaNRC++qA8jz9+tLYOvIIMtqHb4b+7HIOA= X-Received: by 2002:ad4:4b22:: with SMTP id s2mr26711256qvw.22.1624901211885; Mon, 28 Jun 2021 10:26:51 -0700 (PDT) MIME-Version: 1.0 References: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> In-Reply-To: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> From: Kyle Evans Date: Mon, 28 Jun 2021 10:26:40 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 175841285e28 - main - Add deprecation notice for WITH_PROFILE option To: Ed Maste Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 17:26:52 -0000 On Mon, Jun 28, 2021 at 8:37 AM Ed Maste wrote: > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=175841285e289edebb6603da39f02549521ce950 > > commit 175841285e289edebb6603da39f02549521ce950 > Author: Ed Maste > AuthorDate: 2021-06-27 17:21:26 +0000 > Commit: Ed Maste > CommitDate: 2021-06-28 15:36:59 +0000 > > Add deprecation notice for WITH_PROFILE option > > As discussed on freebsd-current [1] and freebsd-arch [2] and review > D30833, FreeBSD 14 will ship without the _p.a libraries built with -pg. > Both upstream and base system (in commit b762974cf4b9) Clang have been > modified to remove the special case for linking against these libraries. > > Clang's -pg support and mcount() remain, so building with -pg can still > be used on code that the user builds; we just do not provide prebuilt > libraries compiled with -pg. A similar change is still needed for GCC. > > [1] https://lists.freebsd.org/pipermail/freebsd-current/2020-January/075105.html > [2] https://lists.freebsd.org/archives/freebsd-arch/2021-June/000016.html > > MFC after: 1 week > Sponsored by: The FreeBSD Foundation > --- > tools/build/options/WITHOUT_PROFILE | 2 ++ > tools/build/options/WITH_PROFILE | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/tools/build/options/WITHOUT_PROFILE b/tools/build/options/WITHOUT_PROFILE > index 7fdb12c94cdd..5cc8dbb027c8 100644 > --- a/tools/build/options/WITHOUT_PROFILE > +++ b/tools/build/options/WITHOUT_PROFILE > @@ -1,3 +1,5 @@ > .\" $FreeBSD$ > Do not build profiled libraries for use with > .Xr gprof 8 . > +This option is enabled by default as of > +.Fx 14 . I know we could bikeshed this all day, but I think this verbiage is a little too casual; "enabled by default" makes it sound like it can be turned off, when it's really becoming non-optional. > diff --git a/tools/build/options/WITH_PROFILE b/tools/build/options/WITH_PROFILE > index 51814a1ea856..3f91c4394911 100644 > --- a/tools/build/options/WITH_PROFILE > +++ b/tools/build/options/WITH_PROFILE > @@ -1,3 +1,5 @@ > .\" $FreeBSD$ > Build profiled libraries for use with > .Xr gprof 8 . > +This option is deprecated and is not present in > +.Fx 14 From owner-dev-commits-src-main@freebsd.org Mon Jun 28 18:31:56 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0920465A31C; Mon, 28 Jun 2021 18:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDGRH6Sgmz3sch; Mon, 28 Jun 2021 18:31:55 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C63CC251D; Mon, 28 Jun 2021 18:31:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SIVtgv041606; Mon, 28 Jun 2021 18:31:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SIVt3p041605; Mon, 28 Jun 2021 18:31:55 GMT (envelope-from git) Date: Mon, 28 Jun 2021 18:31:55 GMT Message-Id: <202106281831.15SIVt3p041605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: c7a7e547a5ad - main - vn_isdisk(9): update after r364372 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7a7e547a5ad2c699fed4c011c65bcd7c0d5f859 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 18:31:56 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=c7a7e547a5ad2c699fed4c011c65bcd7c0d5f859 commit c7a7e547a5ad2c699fed4c011c65bcd7c0d5f859 Author: Robert Wing AuthorDate: 2021-06-28 18:27:27 +0000 Commit: Robert Wing CommitDate: 2021-06-28 18:27:27 +0000 vn_isdisk(9): update after r364372 Reviewed by: mjg Differential Revision: https://reviews.freebsd.org/D30874 --- share/man/man9/vn_isdisk.9 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/share/man/man9/vn_isdisk.9 b/share/man/man9/vn_isdisk.9 index 76cdf96810cb..5de75e53e1e7 100644 --- a/share/man/man9/vn_isdisk.9 +++ b/share/man/man9/vn_isdisk.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2001 +.Dd June 28, 2021 .Dt VN_ISDISK 9 .Os .Sh NAME @@ -35,12 +35,16 @@ .Sh SYNOPSIS .In sys/param.h .In sys/vnode.h -.Ft int -.Fn vn_isdisk "struct vnode *vp" "int *errp" +.Ft bool +.Fn vn_isdisk "struct vnode *vp" +.Ft bool +.Fn vn_isdisk_error "struct vnode *vp" "int *errp" .Sh DESCRIPTION The .Fn vn_isdisk -function checks to see if +and +.Fn vn_isdisk_error +functions check to see if .Fa vp represents a disk. In order for @@ -56,7 +60,7 @@ must have .Dv D_DISK set. .Pp -Its arguments are: +The arguments are: .Bl -tag -width ".Fa errp" .It Fa vp The vnode to check. @@ -64,7 +68,7 @@ The vnode to check. An integer pointer to store the error number in if the call fails. .El .Sh RETURN VALUES -If the vnode represents a disk, 1 is returned; otherwise, 0 +If the vnode represents a disk, true is returned; otherwise, false is returned and .Fa errp will contain the error number. From owner-dev-commits-src-main@freebsd.org Mon Jun 28 19:57:15 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3D3A65B414; Mon, 28 Jun 2021 19:57:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDJKk309Bz4SNK; Mon, 28 Jun 2021 19:57:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-lf1-f43.google.com with SMTP id h15so34703322lfv.12; Mon, 28 Jun 2021 12:57:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aErUdnzt8iYvC10nZiSIQDvcniVNWVYuk9qF+pYji2M=; b=pSxHt4h5O4pIEMy6uo0h/Ijmm9GmFKUNWZyQnY7GZ+dJdRgnoXIgycRjrwHEluMo+n pWb77cJntYI/n0ucSAsS4GmUF0tTsva1S2wOP1BOv7KQ0eFOd16d4NTr8iCe1XdL6sko ipxiqIKScPTIFN9ih3q9XQHrltVn1tbyICBU9akQcuujs3CMw+pVZI1QHR/etGp6UMKL rynFoRtiNpiH8YCJf97vcggT1m5pDq94GLX4PQub3sLn+0/joVuno5XpGfS9RTWG0LBf V/xN2L04GzpTkCx2vsLjSOGAEOmY2nubQ0skaF92O4hyDONCK/A9PWRZ6a2/vGXMQiRz qi+Q== X-Gm-Message-State: AOAM532zWyn9BkmVIkpavmJBkTiRJhJt5Im5Qui9w0ubiPXzKbE1mG8X /GNDNFDkxELlCB9Eh+jNZ7QS+lZOQOSJGEeDie5rdAub X-Google-Smtp-Source: ABdhPJwBrXd9zpqkWAJ4TpdpZSHXd0P06Ll/iv7Y3kbA05kyOHpNCH5ws1jqKSyRxWQP31Fq9toNBAZKsnmZK8ixawg= X-Received: by 2002:ac2:4310:: with SMTP id l16mr5971903lfh.481.1624910232172; Mon, 28 Jun 2021 12:57:12 -0700 (PDT) MIME-Version: 1.0 References: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Mon, 28 Jun 2021 15:56:50 -0400 Message-ID: Subject: Re: git: 175841285e28 - main - Add deprecation notice for WITH_PROFILE option To: Kyle Evans Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GDJKk309Bz4SNK X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 19:57:15 -0000 On Mon, 28 Jun 2021 at 13:26, Kyle Evans wrote: > > I know we could bikeshed this all day, but I think this verbiage is a > little too casual; "enabled by default" makes it sound like it can be > turned off, when it's really becoming non-optional. That's a good point; I wanted to make sure some notice is in and can be MFC'd soon. Anyhow PROFILE will at least default to off for 14, but will probably be removed entirely. How about "The PROFILE functionality is not available in .Fx 14."? From owner-dev-commits-src-main@freebsd.org Mon Jun 28 20:00:07 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C73165B23A; Mon, 28 Jun 2021 20:00:07 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDJP26yKRz4SfR; Mon, 28 Jun 2021 20:00:06 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-lf1-f42.google.com with SMTP id f30so34878490lfj.1; Mon, 28 Jun 2021 13:00:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=il9R1eWAYma3gXtN3ScdR9SJc8DYFCMTzclVIosvEj0=; b=JyGO4Vqkk1g7t2FNYz0KO6ad8bxYAyqYhyPyQxu+JIbJIleXIuln0zT6ZsugEzkIk2 MuFBBzvomwBzdcYCWmsoivdKEW1P5cKAdy/HXiVkmp5VW0QBLgwLNBYGXn+o/eCF1No/ 0k6MrTWohU2SIGHpv9of8jdeoY9De8G6FeLZUfISJO8ULV1riot4OpyagVPbwp6wT9m3 1Z/w0uCY8YZDw0qf09uBW/3tmbwy+T2D/dUVEGflE/xq6oBQ+YDyOk0qBT1G+iV3YL7s qBytbqpDisopcE5buqhAg/EGsl6sf19H0UQcQEEeeSpD8QbOfQ7ZGiYq3PY/VPbJP6ml oO2A== X-Gm-Message-State: AOAM5333Fa7MosQ3yLkzaA2FsNydC0ack1T/WeRbxrdS4bvHlPGFw7MM wjcf6M/c5zAPoUFMwB2jVNxnWWvqAUPxrtLmOA9w78Vt X-Google-Smtp-Source: ABdhPJyzfqLvheniKRmXtX+yXBlxjhseE5+CKnmcSNgVpVahI9BaOTcR3sEacR0s9FAJl/QMxjd7G4S2ehQruPa7BH4= X-Received: by 2002:ac2:4310:: with SMTP id l16mr5978972lfh.481.1624910403829; Mon, 28 Jun 2021 13:00:03 -0700 (PDT) MIME-Version: 1.0 References: <202106271712.15RHConb019042@gitrepo.freebsd.org> <202106281630.15SGU2j0097041@gndrsh.dnsmgr.net> In-Reply-To: <202106281630.15SGU2j0097041@gndrsh.dnsmgr.net> From: Ed Maste Date: Mon, 28 Jun 2021 15:59:42 -0400 Message-ID: Subject: Re: git: b762974cf4b9 - main - clang: stop linking _p libs for -pg as of FreeBSD 14 To: "Rodney W. Grimes" Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GDJP26yKRz4SfR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 20:00:07 -0000 > > clang: stop linking _p libs for -pg as of FreeBSD 14 > > > > In FreeBSD 14 we will stop providing _p libraries (compiled with -pg). > > So if this is being done in 14 only, why is there a MFC marker? > Should that of been MFC: never? ... > > + bool Profiling = Args.hasArg(options::OPT_pg) && > > + ToolChain.getTriple().getOSMajorVersion() < 14; The compiler applies this logic only to 14 and later. MFCing will allow a FreeBSD 13 Clang to build a FreeBSD 14 binary with -pg. From owner-dev-commits-src-main@freebsd.org Mon Jun 28 20:01:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 551AA65B72F; Mon, 28 Jun 2021 20:01:30 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDJQf14Tvz4T7T; Mon, 28 Jun 2021 20:01:30 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 0A1D6CA7A; Mon, 28 Jun 2021 20:01:30 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f53.google.com with SMTP id g14so2325718qvo.7; Mon, 28 Jun 2021 13:01:30 -0700 (PDT) X-Gm-Message-State: AOAM532USCvFdoP+O4fkB3DDiBD+nxIiuTdpRBpXOy20Kaa07OcA5ZiL e/HE/tgoliw3JTuNfxRdw8U8YdQXfX1O7SKDyjo= X-Google-Smtp-Source: ABdhPJw95uDJ5NXC35iXrSD8NziBVvzB6gXbCD+RKiMrroo2xri3nrKrBSD4U0aNh5lUm57RCfTcEDTSoUZHnD7xMKc= X-Received: by 2002:a05:6214:12c7:: with SMTP id s7mr11792502qvv.60.1624910489516; Mon, 28 Jun 2021 13:01:29 -0700 (PDT) MIME-Version: 1.0 References: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Mon, 28 Jun 2021 13:01:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 175841285e28 - main - Add deprecation notice for WITH_PROFILE option To: Ed Maste Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 20:01:30 -0000 On Mon, Jun 28, 2021 at 12:57 PM Ed Maste wrote: > > On Mon, 28 Jun 2021 at 13:26, Kyle Evans wrote: > > > > I know we could bikeshed this all day, but I think this verbiage is a > > little too casual; "enabled by default" makes it sound like it can be > > turned off, when it's really becoming non-optional. > > That's a good point; I wanted to make sure some notice is in and can > be MFC'd soon. Anyhow PROFILE will at least default to off for 14, but > will probably be removed entirely. > > How about "The PROFILE functionality is not available in .Fx 14."? +1, I like that. From owner-dev-commits-src-main@freebsd.org Mon Jun 28 21:40:11 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1066965C7EC; Mon, 28 Jun 2021 21:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDLcV74Bdz4gNm; Mon, 28 Jun 2021 21:40:10 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 DB0B44F0D; Mon, 28 Jun 2021 21:40:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SLeAtp085475; Mon, 28 Jun 2021 21:40:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SLeAI0085472; Mon, 28 Jun 2021 21:40:10 GMT (envelope-from git) Date: Mon, 28 Jun 2021 21:40:10 GMT Message-Id: <202106282140.15SLeAI0085472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: c5d3206ac6e1 - main - cam: kill trailing white space in two spots 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/main X-Git-Reftype: branch X-Git-Commit: c5d3206ac6e15ace5862b190acf2d6dbd4c87e2c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 21:40:11 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c5d3206ac6e15ace5862b190acf2d6dbd4c87e2c commit c5d3206ac6e15ace5862b190acf2d6dbd4c87e2c Author: Warner Losh AuthorDate: 2021-06-25 21:33:31 +0000 Commit: Warner Losh CommitDate: 2021-06-28 21:36:19 +0000 cam: kill trailing white space in two spots --- sys/cam/cam_xpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index b0e112868383..d2aa5952459d 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -5573,7 +5573,7 @@ camisr_runqueue(void) } } -struct kv +struct kv { uint32_t v; const char *name; @@ -5625,7 +5625,7 @@ static struct kv map[] = { }; const char * -xpt_action_name(uint32_t action) +xpt_action_name(uint32_t action) { static char buffer[32]; /* Only for unknown messages -- racy */ struct kv *walker = map; From owner-dev-commits-src-main@freebsd.org Mon Jun 28 21:43:16 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A7AD65CE0C; Mon, 28 Jun 2021 21:43:16 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDLh40BRjz4gpc; Mon, 28 Jun 2021 21:43:15 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f170.google.com with SMTP id s19so18895139ilj.1; Mon, 28 Jun 2021 14:43:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d9Yy2YA9gIfwdsuOGolyNa3TzVpMEO/12CGQMRiSJAI=; b=gvpaeW1d9ltFDcjTjh7CitLGHZjvtZ/cuH9gobjqb13jPDsA5RUyECC8Zyvgm7SL41 ykAf8znEPmK1bOYqq5LFe1dx9TIH8UxBJkHmV+npRN42HfifmWSywbVZrD+DW4ZxAC5Q +uq/OUvy7MoiNYD9PzmWUPpfYDesBfYf/wEDo6O00k4mxQSKH3/LvJ1nQ3lv5ngNGxcn XrPJVbVltbTfPTxpBmXqS40Aal7gWZZl6E3awd0YNPF2pqCdMzENC8t4lbfNE34L7tHo K4qsnKxPo8fZpXSsOvUoBoUZ6aIa7a+FfAB/Yb3pNdHRTAgqK+W7G//EYIo7P8JEbqpO uNvg== X-Gm-Message-State: AOAM530ds2kZKm+YRwl1GfmD+nAocnFR9wvDx7fF7rrDRvhpHW6UEDz8 PBDUgRRQidTzJVapdDvnf4f7dMnxkRrDmdyhwPwxy1Jj+p0= X-Google-Smtp-Source: ABdhPJyyvC4s4govB3aUgM/yEUk0YkJaAcQIHc1CJo9vMOqKIf3ScDX2KGaJttRUwYlSCgNCnMctjlye4bvBUDUGntg= X-Received: by 2002:a92:d0d1:: with SMTP id y17mr10464257ila.256.1624916594271; Mon, 28 Jun 2021 14:43:14 -0700 (PDT) MIME-Version: 1.0 References: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Mon, 28 Jun 2021 17:42:52 -0400 Message-ID: Subject: Re: git: 175841285e28 - main - Add deprecation notice for WITH_PROFILE option To: Kyle Evans Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GDLh40BRjz4gpc X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 21:43:16 -0000 On Mon, 28 Jun 2021 at 16:01, Kyle Evans wrote: > > On Mon, Jun 28, 2021 at 12:57 PM Ed Maste wrote: > > > > How about "The PROFILE functionality is not available in .Fx 14."? > > +1, I like that. Hrm, I think I don't need a note in WITHOUT_PROFILE in fact. I added it originally because I thought PROFILE was on by default for all archs on stable branches, which would have only WITHOUT_PROFILE in src.conf.5. However, mips64 lacks PROFILE support so both are listed - thus with a note in WITH_PROFILE only we'd have: WITHOUT_PROFILE Do not build profiled libraries for use with gprof(8). This is a default setting on mips/mips64. WITH_PROFILE Build profiled libraries for use with gprof(8). This option is deprecated and is not present in FreeBSD 14. This is a default setting on amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. which I think is sufficient. From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:16:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2A9E65D4C5; Mon, 28 Jun 2021 22:16:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMQP5v9wz4jCn; Mon, 28 Jun 2021 22:16:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id AD2A5E0D2; Mon, 28 Jun 2021 22:16:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f176.google.com with SMTP id g3so10430824qth.11; Mon, 28 Jun 2021 15:16:29 -0700 (PDT) X-Gm-Message-State: AOAM530DL3GkUnEmwylmf75sfJUqR7nlDVHPU2OSCv4IT5vpFDd6EV36 14nQApozkiB4O+DZxEV9/jJbhvnD4fIPVM2ravc= X-Google-Smtp-Source: ABdhPJzolJ9P847TuH8gcOHrmG9VdWZREZ7bBSh14BNfdX+8dI6XuwWATr7k/58w6y9AQBFh6sZDP/NjM+/UrolUmK4= X-Received: by 2002:ac8:6c6:: with SMTP id j6mr23332705qth.242.1624918589299; Mon, 28 Jun 2021 15:16:29 -0700 (PDT) MIME-Version: 1.0 References: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Mon, 28 Jun 2021 15:16:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 175841285e28 - main - Add deprecation notice for WITH_PROFILE option To: Ed Maste Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:16:30 -0000 On Mon, Jun 28, 2021 at 2:43 PM Ed Maste wrote: > > On Mon, 28 Jun 2021 at 16:01, Kyle Evans wrote: > > > > On Mon, Jun 28, 2021 at 12:57 PM Ed Maste wrote: > > > > > > How about "The PROFILE functionality is not available in .Fx 14."? > > > > +1, I like that. > > Hrm, I think I don't need a note in WITHOUT_PROFILE in fact. I added > it originally because I thought PROFILE was on by default for all > archs on stable branches, which would have only WITHOUT_PROFILE in > src.conf.5. However, mips64 lacks PROFILE support so both are listed - > thus with a note in WITH_PROFILE only we'd have: > > WITHOUT_PROFILE > Do not build profiled libraries for use with gprof(8). > > This is a default setting on mips/mips64. > > WITH_PROFILE > Build profiled libraries for use with gprof(8). This option is > deprecated and is not present in FreeBSD 14. > > This is a default setting on amd64/amd64, arm/armv6, arm/armv7, > arm64/aarch64, i386/i386, mips/mips, powerpc/powerpc, > powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. > > which I think is sufficient. Oh yeah, totally; +1 to omitting it based on this. From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:23:59 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CAF365D7D2; Mon, 28 Jun 2021 22:23: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMb318S9z4jwp; Mon, 28 Jun 2021 22:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0FC9257F5; Mon, 28 Jun 2021 22:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMNxE2048671; Mon, 28 Jun 2021 22:23:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMNwf6048670; Mon, 28 Jun 2021 22:23:58 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:23:58 GMT Message-Id: <202106282223.15SMNwf6048670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 40990d54834b - main - cam: save parent_dev in xpt_bus_register 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/main X-Git-Reftype: branch X-Git-Commit: 40990d54834bb319eb3d3b5e7192d799b41946fc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:23:59 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=40990d54834bb319eb3d3b5e7192d799b41946fc commit 40990d54834bb319eb3d3b5e7192d799b41946fc Author: Warner Losh AuthorDate: 2021-06-28 21:55:02 +0000 Commit: Warner Losh CommitDate: 2021-06-28 21:55:02 +0000 cam: save parent_dev in xpt_bus_register Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30846 --- sys/cam/cam_xpt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index d2aa5952459d..81d5d98fb9d4 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -4024,6 +4024,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) new_bus->flags = 0; new_bus->refcount = 1; /* Held until a bus_deregister event */ new_bus->generation = 0; + new_bus->parent_dev = parent; xpt_lock_buses(); sim->path_id = new_bus->path_id = From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7766A65DA80; Mon, 28 Jun 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMb42nsvz4k6c; Mon, 28 Jun 2021 22:24:00 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 3B8A756F2; Mon, 28 Jun 2021 22:24:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMO05Q048695; Mon, 28 Jun 2021 22:24:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO08S048694; Mon, 28 Jun 2021 22:24:00 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:00 GMT Message-Id: <202106282224.15SMO08S048694@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 56e1161b09c3 - main - cam: fix UB behavior 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/main X-Git-Reftype: branch X-Git-Commit: 56e1161b09c38c90d27182414f49d042046dded8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:00 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=56e1161b09c38c90d27182414f49d042046dded8 commit 56e1161b09c38c90d27182414f49d042046dded8 Author: Warner Losh AuthorDate: 2021-06-28 21:56:08 +0000 Commit: Warner Losh CommitDate: 2021-06-28 21:56:08 +0000 cam: fix UB behavior The trick of subtracting one from the poitner returned from malloc results in undefined behavior: >>C89: 3.3.6 Unless both the pointer operand and the result point to a >>member of the same array object, or one past the last member of the >>array object, the behavior is undefined. Instead, allocate 1 extra element and stop adjusting the pointer. While a little wasteful, the extra is in the noise on today's systems. Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30847 --- sys/cam/cam_queue.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/sys/cam/cam_queue.c b/sys/cam/cam_queue.c index 074b0545a1fd..1bb1713d65c5 100644 --- a/sys/cam/cam_queue.c +++ b/sys/cam/cam_queue.c @@ -60,17 +60,16 @@ camq_init(struct camq *camq, int size) bzero(camq, sizeof(*camq)); camq->array_size = size; if (camq->array_size != 0) { - camq->queue_array = (cam_pinfo**)malloc(size*sizeof(cam_pinfo*), - M_CAMQ, M_NOWAIT); + /* + * Heap algorithms like everything numbered from 1, so + * allocate one more to account for 0 base. + */ + camq->queue_array = malloc((size + 1) * sizeof(cam_pinfo*), + M_CAMQ, M_NOWAIT); if (camq->queue_array == NULL) { printf("camq_init: - cannot malloc array!\n"); return (1); } - /* - * Heap algorithms like everything numbered from 1, so - * offset our pointer into the heap array by one element. - */ - camq->queue_array--; } return (0); } @@ -85,11 +84,6 @@ void camq_fini(struct camq *queue) { if (queue->queue_array != NULL) { - /* - * Heap algorithms like everything numbered from 1, so - * our pointer into the heap array is offset by one element. - */ - queue->queue_array++; free(queue->queue_array, M_CAMQ); } } @@ -102,8 +96,8 @@ camq_resize(struct camq *queue, int new_size) KASSERT(new_size >= queue->entries, ("camq_resize: " "New queue size can't accommodate queued entries (%d < %d).", new_size, queue->entries)); - new_array = (cam_pinfo **)malloc(new_size * sizeof(cam_pinfo *), - M_CAMQ, M_NOWAIT); + new_array = malloc((new_size + 1) * sizeof(cam_pinfo *), M_CAMQ, + M_NOWAIT); if (new_array == NULL) { /* Couldn't satisfy request */ return (CAM_RESRC_UNAVAIL); @@ -114,12 +108,11 @@ camq_resize(struct camq *queue, int new_size) * by one element. */ if (queue->queue_array != NULL) { - queue->queue_array++; bcopy(queue->queue_array, new_array, - queue->entries * sizeof(cam_pinfo *)); + (queue->entries + 1) * sizeof(cam_pinfo *)); free(queue->queue_array, M_CAMQ); } - queue->queue_array = new_array-1; + queue->queue_array = new_array; queue->array_size = new_size; return (CAM_REQ_CMP); } From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E22C865DA18; Mon, 28 Jun 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMb53Q20z4jwt; Mon, 28 Jun 2021 22:24:01 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 5D1CF57F6; Mon, 28 Jun 2021 22:24:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMO1ar048719; Mon, 28 Jun 2021 22:24:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO1HR048718; Mon, 28 Jun 2021 22:24:01 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:01 GMT Message-Id: <202106282224.15SMO1HR048718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9f1e411ae8cf - main - cam: Group all xpt_path*() functions together in cam_xpt.h 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/main X-Git-Reftype: branch X-Git-Commit: 9f1e411ae8cf84ebf53391288b5b6bac8df23a96 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:02 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9f1e411ae8cf84ebf53391288b5b6bac8df23a96 commit 9f1e411ae8cf84ebf53391288b5b6bac8df23a96 Author: Warner Losh AuthorDate: 2021-06-28 21:56:55 +0000 Commit: Warner Losh CommitDate: 2021-06-28 21:56:55 +0000 cam: Group all xpt_path*() functions together in cam_xpt.h Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30852 --- sys/cam/cam_xpt.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/cam/cam_xpt.h b/sys/cam/cam_xpt.h index 1d3fd9d315a1..7e7e6ac5880a 100644 --- a/sys/cam/cam_xpt.h +++ b/sys/cam/cam_xpt.h @@ -105,9 +105,6 @@ int xpt_path_comp(struct cam_path *path1, struct cam_path *path2); int xpt_path_comp_dev(struct cam_path *path, struct cam_ed *dev); -void xpt_print_path(struct cam_path *path); -void xpt_print_device(struct cam_ed *device); -void xpt_print(struct cam_path *path, const char *fmt, ...); int xpt_path_string(struct cam_path *path, char *str, size_t str_len); int xpt_path_sbuf(struct cam_path *path, struct sbuf *sb); @@ -116,6 +113,9 @@ target_id_t xpt_path_target_id(struct cam_path *path); lun_id_t xpt_path_lun_id(struct cam_path *path); struct cam_sim *xpt_path_sim(struct cam_path *path); struct cam_periph *xpt_path_periph(struct cam_path *path); +void xpt_print_path(struct cam_path *path); +void xpt_print_device(struct cam_ed *device); +void xpt_print(struct cam_path *path, const char *fmt, ...); void xpt_async(u_int32_t async_code, struct cam_path *path, void *async_arg); void xpt_rescan(union ccb *ccb); From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC5C465D83E; Mon, 28 Jun 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMb64v4Jz4jx1; Mon, 28 Jun 2021 22:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 8646E57F7; Mon, 28 Jun 2021 22:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMO2jS048749; Mon, 28 Jun 2021 22:24:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO2NT048748; Mon, 28 Jun 2021 22:24:02 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:02 GMT Message-Id: <202106282224.15SMO2NT048748@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1ed401626792 - main - cam: add xpt_path_sim_device to return device_t associated with a path 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/main X-Git-Reftype: branch X-Git-Commit: 1ed401626792b2888e2e29befb13c23ff2273c4e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:03 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1ed401626792b2888e2e29befb13c23ff2273c4e commit 1ed401626792b2888e2e29befb13c23ff2273c4e Author: Warner Losh AuthorDate: 2021-06-28 21:57:51 +0000 Commit: Warner Losh CommitDate: 2021-06-28 21:57:51 +0000 cam: add xpt_path_sim_device to return device_t associated with a path Return the device associated with the sim's bus when it called xpt_bus_register, if any. Most real SIMs in the tree set this device, but some virtual ones do not have a device_t assocaited with them. Reviewed by: scottl@, mav@ (earlier version) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30853 --- sys/cam/cam_xpt.c | 18 +++++++++++++++++- sys/cam/cam_xpt.h | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 81d5d98fb9d4..ee216451bd6d 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -5574,7 +5574,23 @@ camisr_runqueue(void) } } -struct kv +/** + * @brief Return the device_t associated with the path + * + * When a SIM is created, it registers a bus with a NEWBUS device_t. This is + * stored in the internal cam_eb bus structure. There is no guarnatee any given + * path will have a @c device_t associated with it (it's legal to call @c + * xpt_bus_register with a @c NULL @c device_t. + * + * @param path Path to return the device_t for. + */ +device_t +xpt_path_sim_device(const struct cam_path *path) +{ + return (path->bus->parent_dev); +} + +struct kv { uint32_t v; const char *name; diff --git a/sys/cam/cam_xpt.h b/sys/cam/cam_xpt.h index 7e7e6ac5880a..c8494d04234a 100644 --- a/sys/cam/cam_xpt.h +++ b/sys/cam/cam_xpt.h @@ -113,6 +113,7 @@ target_id_t xpt_path_target_id(struct cam_path *path); lun_id_t xpt_path_lun_id(struct cam_path *path); struct cam_sim *xpt_path_sim(struct cam_path *path); struct cam_periph *xpt_path_periph(struct cam_path *path); +device_t xpt_path_sim_device(const struct cam_path *path); void xpt_print_path(struct cam_path *path); void xpt_print_device(struct cam_ed *device); void xpt_print(struct cam_path *path, const char *fmt, ...); From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 067AB65DA1C; Mon, 28 Jun 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMb86dbDz4kCb; Mon, 28 Jun 2021 22:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 BEFC856F3; Mon, 28 Jun 2021 22:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMO4HM048798; Mon, 28 Jun 2021 22:24:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO4IU048797; Mon, 28 Jun 2021 22:24:04 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:04 GMT Message-Id: <202106282224.15SMO4IU048797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: fdd60a97dad5 - main - sdiob: get the device_t from periph's path 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/main X-Git-Reftype: branch X-Git-Commit: fdd60a97dad5a0e81905a5d97cbc4b496638b06f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:05 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fdd60a97dad5a0e81905a5d97cbc4b496638b06f commit fdd60a97dad5a0e81905a5d97cbc4b496638b06f Author: Warner Losh AuthorDate: 2021-06-28 22:00:09 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:02 +0000 sdiob: get the device_t from periph's path Use the new xpt_path_device to get the device_t using the periph's path. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30855 --- sys/dev/sdio/sdiob.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/sys/dev/sdio/sdiob.c b/sys/dev/sdio/sdiob.c index afa111971bf5..6209aa1f242e 100644 --- a/sys/dev/sdio/sdiob.c +++ b/sys/dev/sdio/sdiob.c @@ -112,7 +112,7 @@ struct sdiob_softc { #define NB_STATE_SIM_ADDED 0x0002 #define NB_STATE_READY 0x0004 - /* CAM side (including sim_dev). */ + /* CAM side. */ struct card_info cardinfo; struct cam_periph *periph; union ccb *ccb; @@ -923,23 +923,21 @@ sdio_newbus_sim_add(struct sdiob_softc *sc) /* Add ourselves to our parent (SIM) device. */ /* Add ourselves to our parent. That way we can become a parent. */ - KASSERT(sc->periph->sim->sim_dev != NULL, ("%s: sim_dev is NULL, sc %p " - "periph %p sim %p\n", __func__, sc, sc->periph, sc->periph->sim)); + pdev = xpt_path_sim_device(sc->periph->path); + KASSERT(pdev != NULL, + ("%s: pdev is NULL, sc %p periph %p sim %p\n", + __func__, sc, sc->periph, sc->periph->sim)); if (sc->dev == NULL) - sc->dev = BUS_ADD_CHILD(sc->periph->sim->sim_dev, 0, - SDIOB_NAME_S, -1); + sc->dev = BUS_ADD_CHILD(pdev, 0, SDIOB_NAME_S, -1); if (sc->dev == NULL) return (ENXIO); device_set_softc(sc->dev, sc); + /* * Don't set description here; devclass_add_driver() -> * device_probe_child() -> device_set_driver() will nuke it again. */ - - pdev = device_get_parent(sc->dev); - KASSERT(pdev != NULL, ("%s: sc %p dev %p (%s) parent is NULL\n", - __func__, sc, sc->dev, device_get_nameunit(sc->dev))); bus_devclass = device_get_devclass(pdev); if (bus_devclass == NULL) { printf("%s: Failed to get devclass from %s.\n", __func__, @@ -1032,9 +1030,8 @@ sdiobregister(struct cam_periph *periph, void *arg) __func__, periph); return(CAM_REQ_CMP_ERR); } - if (periph->sim == NULL || periph->sim->sim_dev == NULL) { - printf("%s: no sim %p or sim_dev %p\n", __func__, periph->sim, - (periph->sim != NULL) ? periph->sim->sim_dev : NULL); + if (xpt_path_sim_device(periph->path) == NULL) { + printf("%s: no device_t for sim %p\n", __func__, periph->sim); return(CAM_REQ_CMP_ERR); } From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:04 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40A1465DA92; Mon, 28 Jun 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMb80x1yz4jtF; Mon, 28 Jun 2021 22:24:03 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 A256958E7; Mon, 28 Jun 2021 22:24:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMO3VH048774; Mon, 28 Jun 2021 22:24:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO3Yi048773; Mon, 28 Jun 2021 22:24:03 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:03 GMT Message-Id: <202106282224.15SMO3Yi048773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d6e7349254e3 - main - cam mmc: Assert that the xpt_bus_register registered a device_t 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/main X-Git-Reftype: branch X-Git-Commit: d6e7349254e3d26bbecf105be28686a5eb976537 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:04 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d6e7349254e3d26bbecf105be28686a5eb976537 commit d6e7349254e3d26bbecf105be28686a5eb976537 Author: Warner Losh AuthorDate: 2021-06-28 21:59:04 +0000 Commit: Warner Losh CommitDate: 2021-06-28 21:59:04 +0000 cam mmc: Assert that the xpt_bus_register registered a device_t Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30854 --- sys/cam/mmc/mmc_xpt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index 6b2fecdab0fb..c94e74876ed7 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -406,8 +406,6 @@ mmccam_start_discovery(struct cam_sim *sim) union ccb *ccb; uint32_t pathid; - KASSERT(sim->sim_dev != NULL, ("mmccam_start_discovery(%s): sim_dev is not initialized," - " has cam_sim_alloc_dev() been used?", cam_sim_name(sim))); pathid = cam_sim_path(sim); ccb = xpt_alloc_ccb(); @@ -420,6 +418,10 @@ mmccam_start_discovery(struct cam_sim *sim) xpt_free_ccb(ccb); return; } + + KASSERT(xpt_path_sim_device(&ccb->ccb_h.path) != NULL, + ("%s(%s): device is not initialized on sim's path", + __func__, cam_sim_name(sim))); xpt_rescan(ccb); } From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:08 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8864F65D777; Mon, 28 Jun 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMbD2rQXz4k7G; Mon, 28 Jun 2021 22:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 397EF5990; Mon, 28 Jun 2021 22:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMO8E0048874; Mon, 28 Jun 2021 22:24:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO86E048873; Mon, 28 Jun 2021 22:24:08 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:08 GMT Message-Id: <202106282224.15SMO86E048873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: dcd5dea96509 - main - cam: delete cam_sim_alloc_dev 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/main X-Git-Reftype: branch X-Git-Commit: dcd5dea96509f6e483861350c9ef1d6a85b44ff6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:09 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dcd5dea96509f6e483861350c9ef1d6a85b44ff6 commit dcd5dea96509f6e483861350c9ef1d6a85b44ff6 Author: Warner Losh AuthorDate: 2021-06-28 22:00:44 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:03 +0000 cam: delete cam_sim_alloc_dev cam_sim_alloc_dev was only used internally by the MMC system. That has been convered to using xpt_path_device() and has stopped using this interface, so this can be retired. Reviewed by: scottl@, mav@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30858 --- sys/cam/cam_sim.c | 28 ---------------------------- sys/cam/cam_sim.h | 1 - 2 files changed, 29 deletions(-) diff --git a/sys/cam/cam_sim.c b/sys/cam/cam_sim.c index 20bed83fac86..e7a7348d0c44 100644 --- a/sys/cam/cam_sim.c +++ b/sys/cam/cam_sim.c @@ -116,7 +116,6 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll, sim->sim_name = sim_name; sim->softc = softc; sim->path_id = CAM_PATH_ANY; - sim->sim_dev = NULL; /* set only by cam_sim_alloc_dev */ sim->unit_number = unit; sim->bus_id = 0; /* set in xpt_bus_register */ sim->max_tagged_dev_openings = max_tagged_dev_transactions; @@ -128,33 +127,6 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll, return (sim); } -/** - * @brief allocate a new sim and fill in the details with a device_t - * - * Just like @c cam_sim_alloc, but with an additional paramter. - * - * @param dev A newbus device that's associated with the - * sim. Must be non-NULL. - */ -struct cam_sim * -cam_sim_alloc_dev(sim_action_func sim_action, sim_poll_func sim_poll, - const char *sim_name, void *softc, device_t dev, struct mtx *mtx, - int max_dev_transactions, int max_tagged_dev_transactions, - struct cam_devq *queue) -{ - struct cam_sim *sim; - - KASSERT(dev != NULL, ("%s: dev is null for sim_name %s softc %p\n", - __func__, sim_name, softc)); - - sim = cam_sim_alloc(sim_action, sim_poll, sim_name, softc, - device_get_unit(dev), mtx, max_dev_transactions, - max_tagged_dev_transactions, queue); - if (sim != NULL) - sim->sim_dev = dev; - return (sim); -} - void cam_sim_free(struct cam_sim *sim, int free_devq) { diff --git a/sys/cam/cam_sim.h b/sys/cam/cam_sim.h index 4becc715f13e..47f395854c01 100644 --- a/sys/cam/cam_sim.h +++ b/sys/cam/cam_sim.h @@ -104,7 +104,6 @@ struct cam_sim { u_int32_t flags; struct cam_devq *devq; /* Device Queue to use for this SIM */ int refcount; /* References to the SIM. */ - device_t sim_dev; /* For attached peripherals. */ }; static __inline u_int32_t From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:06 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94B8765DA95; Mon, 28 Jun 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMbB28Jyz4kCf; Mon, 28 Jun 2021 22:24:06 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 E837355B3; Mon, 28 Jun 2021 22:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMO5lk048822; Mon, 28 Jun 2021 22:24:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO55N048821; Mon, 28 Jun 2021 22:24:05 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:05 GMT Message-Id: <202106282224.15SMO55N048821@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: bd69852be14c - main - mmc_sim: stop using cam_sim_alloc_dev 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/main X-Git-Reftype: branch X-Git-Commit: bd69852be14cac4ff24d3cf31c4f9e90f6e0ded8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:06 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bd69852be14cac4ff24d3cf31c4f9e90f6e0ded8 commit bd69852be14cac4ff24d3cf31c4f9e90f6e0ded8 Author: Warner Losh AuthorDate: 2021-06-28 22:00:20 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:02 +0000 mmc_sim: stop using cam_sim_alloc_dev Use the vanilla flavor of cam_sim_alloc. Now that sdiob has been converted to get the device_t from the cam_path, this data is no longer necessary. Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30856 --- sys/cam/mmc/mmc_sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/mmc/mmc_sim.c b/sys/cam/mmc/mmc_sim.c index b9a6a852c07f..2aae157c9542 100644 --- a/sys/cam/mmc/mmc_sim.c +++ b/sys/cam/mmc/mmc_sim.c @@ -204,9 +204,9 @@ mmc_cam_sim_alloc(device_t dev, const char *name, struct mmc_sim *mmc_sim) snprintf(mtx_name, sizeof(mtx_name), "%s_mtx", name); mtx_init(&mmc_sim->mtx, sim_name, NULL, MTX_DEF); - mmc_sim->sim = cam_sim_alloc_dev(mmc_cam_sim_default_action, + mmc_sim->sim = cam_sim_alloc(mmc_cam_sim_default_action, mmc_cam_default_poll, - name, mmc_sim, dev, + name, mmc_sim, &mmc_sim->mtx, 1, 1, mmc_sim->devq); if (mmc_sim->sim == NULL) { From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:07 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E1E865DA2A; Mon, 28 Jun 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMbC27Lnz4jrK; Mon, 28 Jun 2021 22:24:07 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 1964257FA; Mon, 28 Jun 2021 22:24:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMO6Od048846; Mon, 28 Jun 2021 22:24:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO6Ye048845; Mon, 28 Jun 2021 22:24:06 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:06 GMT Message-Id: <202106282224.15SMO6Ye048845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: aeb04e88f51a - main - sdhci: stop using cam_sim_alloc_dev 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/main X-Git-Reftype: branch X-Git-Commit: aeb04e88f51a706ef4b6a380bf5e82d15203fb6a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:07 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=aeb04e88f51a706ef4b6a380bf5e82d15203fb6a commit aeb04e88f51a706ef4b6a380bf5e82d15203fb6a Author: Warner Losh AuthorDate: 2021-06-28 22:00:37 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:02 +0000 sdhci: stop using cam_sim_alloc_dev Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30857 --- sys/dev/sdhci/sdhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sdhci/sdhci.c b/sys/dev/sdhci/sdhci.c index 22df56672c4b..1ed521da8a70 100644 --- a/sys/dev/sdhci/sdhci.c +++ b/sys/dev/sdhci/sdhci.c @@ -2483,8 +2483,8 @@ sdhci_start_slot(struct sdhci_slot *slot) goto fail; mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF); - slot->sim = cam_sim_alloc_dev(sdhci_cam_action, sdhci_cam_poll, - "sdhci_slot", slot, slot->bus, + slot->sim = cam_sim_alloc(sdhci_cam_action, sdhci_cam_poll, + "sdhci_slot", slot, &slot->sim_mtx, 1, 1, slot->devq); if (slot->sim == NULL) { From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:10 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15FC765D7E8; Mon, 28 Jun 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMbF6F3zz4jrd; Mon, 28 Jun 2021 22:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 6016656F5; Mon, 28 Jun 2021 22:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMO9Su048900; Mon, 28 Jun 2021 22:24:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO9Nq048899; Mon, 28 Jun 2021 22:24:09 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:09 GMT Message-Id: <202106282224.15SMO9Nq048899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 30f8afd0270e - main - cam: fix xpt_bus_register and xpt_bus_deregister return errno 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/main X-Git-Reftype: branch X-Git-Commit: 30f8afd0270e0bb70e1e0df1cf8de7a841797a30 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:10 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=30f8afd0270e0bb70e1e0df1cf8de7a841797a30 commit 30f8afd0270e0bb70e1e0df1cf8de7a841797a30 Author: Warner Losh AuthorDate: 2021-06-28 22:01:30 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:03 +0000 cam: fix xpt_bus_register and xpt_bus_deregister return errno xpt_bus_register and xpt_bus_deregister returns a hybrid error that's neither a cam_status, nor an errno, but a mix of both. Update xpt_bus_register and xpt_bus_deregister to return an errno. The vast majority of current users compare against zero, which can also be spelled CAM_SUCCESS. Nobody uses CAM_FAILURE, so remove that symbol to prevent comfusion (nothing returns it either). Where the return value is saved, ensure that the variable 'error' is used to store an errno and 'status' is used to store a cam_status where it makes the code clearer (usually just in functions that already mix and match). Where the return value isn't used at all, avoid storing it at all. Reviewed by: scottl@, mav@ (earlier version) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30860 --- sys/cam/cam_ccb.h | 1 - sys/cam/cam_xpt.c | 22 +++++++++++----------- sys/cam/cam_xpt_sim.h | 6 +++--- sys/dev/iscsi/iscsi.c | 3 +-- sys/dev/smartpqi/smartpqi_cam.c | 8 ++++---- sys/dev/usb/storage/umass.c | 10 +++++----- sys/dev/vmware/pvscsi/pvscsi.c | 8 ++++---- 7 files changed, 28 insertions(+), 30 deletions(-) diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index 3a01cde1a442..f0150d680d2f 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -1299,7 +1299,6 @@ struct ccb_eng_exec { /* This structure must match SCSIIO size */ #define CAM_TIME_INFINITY 0xFFFFFFFF /* Infinite timeout */ #define CAM_SUCCESS 0 /* For signaling general success */ -#define CAM_FAILURE 1 /* For signaling general failure */ #define CAM_FALSE 0 #define CAM_TRUE 1 diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index ee216451bd6d..016f0e6a38be 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -930,9 +930,9 @@ xpt_init(void *dummy) if (xpt_sim == NULL) return (ENOMEM); - if ((status = xpt_bus_register(xpt_sim, NULL, 0)) != CAM_SUCCESS) { - printf("xpt_init: xpt_bus_register failed with status %#x," - " failing attach\n", status); + if ((error = xpt_bus_register(xpt_sim, NULL, 0)) != CAM_SUCCESS) { + printf("xpt_init: xpt_bus_register failed with errno %d," + " failing attach\n", error); return (EINVAL); } @@ -3999,8 +3999,8 @@ CAM_XPT_XPORT(xport_default); * information specified by the user. Once interrupt services are * available, the bus will be probed. */ -int32_t -xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) +int +xpt_bus_register(struct cam_sim *sim, device_t parent, uint32_t bus) { struct cam_eb *new_bus; struct cam_eb *old_bus; @@ -4013,7 +4013,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) M_CAMXPT, M_NOWAIT|M_ZERO); if (new_bus == NULL) { /* Couldn't satisfy request */ - return (CAM_RESRC_UNAVAIL); + return (ENOMEM); } mtx_init(&new_bus->eb_mtx, "CAM bus lock", NULL, MTX_DEF); @@ -4051,7 +4051,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); if (status != CAM_REQ_CMP) { xpt_release_bus(new_bus); - return (CAM_RESRC_UNAVAIL); + return (ENOMEM); } xpt_path_inq(&cpi, path); @@ -4070,7 +4070,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) "No transport found for %d\n", cpi.transport); xpt_release_bus(new_bus); free(path, M_CAMXPT); - return (CAM_RESRC_UNAVAIL); + return (EINVAL); } } @@ -4099,7 +4099,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) return (CAM_SUCCESS); } -int32_t +int xpt_bus_deregister(path_id_t pathid) { struct cam_path bus_path; @@ -4108,7 +4108,7 @@ xpt_bus_deregister(path_id_t pathid) status = xpt_compile_path(&bus_path, NULL, pathid, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); if (status != CAM_REQ_CMP) - return (status); + return (ENOMEM); xpt_async(AC_LOST_DEVICE, &bus_path, NULL); xpt_async(AC_PATH_DEREGISTERED, &bus_path, NULL); @@ -4117,7 +4117,7 @@ xpt_bus_deregister(path_id_t pathid) xpt_release_bus(bus_path.bus); xpt_release_path(&bus_path); - return (CAM_REQ_CMP); + return (CAM_SUCCESS); } static path_id_t diff --git a/sys/cam/cam_xpt_sim.h b/sys/cam/cam_xpt_sim.h index aa9746019981..569ed09c23d2 100644 --- a/sys/cam/cam_xpt_sim.h +++ b/sys/cam/cam_xpt_sim.h @@ -39,9 +39,9 @@ /* Functions accessed by SIM drivers */ #ifdef _KERNEL -int32_t xpt_bus_register(struct cam_sim *sim, device_t parent, - u_int32_t bus); -int32_t xpt_bus_deregister(path_id_t path_id); +int xpt_bus_register(struct cam_sim *sim, device_t parent, + uint32_t bus); +int xpt_bus_deregister(path_id_t path_id); u_int32_t xpt_freeze_simq(struct cam_sim *sim, u_int count); void xpt_release_simq(struct cam_sim *sim, int run_queue); u_int32_t xpt_freeze_devq(struct cam_path *path, u_int count); diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index 7ddb5a9ce1ec..9a1b539e539b 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -1506,8 +1506,7 @@ iscsi_ioctl_daemon_handoff(struct iscsi_softc *sc, return (ENOMEM); } - error = xpt_bus_register(is->is_sim, NULL, 0); - if (error != 0) { + if (xpt_bus_register(is->is_sim, NULL, 0) != 0) { ISCSI_SESSION_UNLOCK(is); ISCSI_SESSION_WARN(is, "failed to register bus"); iscsi_session_terminate(is); diff --git a/sys/dev/smartpqi/smartpqi_cam.c b/sys/dev/smartpqi/smartpqi_cam.c index e389eb143e4a..1278434131d9 100644 --- a/sys/dev/smartpqi/smartpqi_cam.c +++ b/sys/dev/smartpqi/smartpqi_cam.c @@ -1204,7 +1204,7 @@ register_sim(struct pqisrc_softstate *softs, int card_index) { int max_transactions; union ccb *ccb = NULL; - cam_status status = 0; + int error; struct ccb_setasync csa; struct cam_sim *sim; @@ -1231,9 +1231,9 @@ register_sim(struct pqisrc_softstate *softs, int card_index) softs->os_specific.sim = sim; mtx_lock(&softs->os_specific.cam_lock); - status = xpt_bus_register(sim, softs->os_specific.pqi_dev, 0); - if (status != CAM_SUCCESS) { - DBG_ERR("xpt_bus_register failed status=%d\n", status); + error = xpt_bus_register(sim, softs->os_specific.pqi_dev, 0); + if (error != CAM_SUCCESS) { + DBG_ERR("xpt_bus_register failed errno %d\n", error); cam_sim_free(softs->os_specific.sim, FALSE); cam_simq_free(softs->os_specific.devq); mtx_unlock(&softs->os_specific.cam_lock); diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index bc07fe50b6ab..65c72b06e244 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -2129,11 +2129,11 @@ umass_cam_attach(struct umass_softc *sc) static void umass_cam_detach_sim(struct umass_softc *sc) { - cam_status status; + int error; if (sc->sc_sim != NULL) { - status = xpt_bus_deregister(cam_sim_path(sc->sc_sim)); - if (status == CAM_REQ_CMP) { + error = xpt_bus_deregister(cam_sim_path(sc->sc_sim)); + if (error == 0) { /* accessing the softc is not possible after this */ sc->sc_sim->softc = NULL; DPRINTF(sc, UDMASS_SCSI, "%s: %s:%d:%d caling " @@ -2143,8 +2143,8 @@ umass_cam_detach_sim(struct umass_softc *sc) sc->sc_sim->refcount, sc->sc_sim->mtx); cam_sim_free(sc->sc_sim, /* free_devq */ TRUE); } else { - panic("%s: %s: CAM layer is busy: %#x\n", - __func__, sc->sc_name, status); + panic("%s: %s: CAM layer is busy: errno %d\n", + __func__, sc->sc_name, error); } sc->sc_sim = NULL; } diff --git a/sys/dev/vmware/pvscsi/pvscsi.c b/sys/dev/vmware/pvscsi/pvscsi.c index ad32d2ab4959..f64b20863f60 100644 --- a/sys/dev/vmware/pvscsi/pvscsi.c +++ b/sys/dev/vmware/pvscsi/pvscsi.c @@ -1548,16 +1548,16 @@ pvscsi_free_all(struct pvscsi_softc *sc) { if (sc->sim) { - int32_t status; + int error; if (sc->bus_path) { xpt_free_path(sc->bus_path); } - status = xpt_bus_deregister(cam_sim_path(sc->sim)); - if (status != CAM_REQ_CMP) { + error = xpt_bus_deregister(cam_sim_path(sc->sim)); + if (error != 0) { device_printf(sc->dev, - "Error deregistering bus, status=%d\n", status); + "Error deregistering bus, error %d\n", error); } cam_sim_free(sc->sim, TRUE); From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:11 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3535B65DB1D; Mon, 28 Jun 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMbG56kFz4kFm; Mon, 28 Jun 2021 22:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 83F5758E8; Mon, 28 Jun 2021 22:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMOAK9048924; Mon, 28 Jun 2021 22:24:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMOASU048923; Mon, 28 Jun 2021 22:24:10 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:10 GMT Message-Id: <202106282224.15SMOASU048923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 2b0987023804 - main - cam: Remove CAM_TRUE and CAM_FALSE, they are unused and duplicate bool 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/main X-Git-Reftype: branch X-Git-Commit: 2b09870238048cb2bd911b2e3dfb281c72ef1fb8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:11 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2b09870238048cb2bd911b2e3dfb281c72ef1fb8 commit 2b09870238048cb2bd911b2e3dfb281c72ef1fb8 Author: Warner Losh AuthorDate: 2021-06-28 22:03:01 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:03 +0000 cam: Remove CAM_TRUE and CAM_FALSE, they are unused and duplicate bool These were in the original CAM commit in 3.0, but were not used there, nor have they been used since then. They also duplicate the now-standard bool type. Remove them. Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30879 --- sys/cam/cam_ccb.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index f0150d680d2f..5b5e24904996 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -1300,9 +1300,6 @@ struct ccb_eng_exec { /* This structure must match SCSIIO size */ #define CAM_SUCCESS 0 /* For signaling general success */ -#define CAM_FALSE 0 -#define CAM_TRUE 1 - #define XPT_CCB_INVALID -1 /* for signaling a bad CCB to free */ /* From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:12 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AB0465DB23; Mon, 28 Jun 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMbH5p00z4jxN; Mon, 28 Jun 2021 22:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 A76CB56F6; Mon, 28 Jun 2021 22:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMOBxf048948; Mon, 28 Jun 2021 22:24:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMOBYn048947; Mon, 28 Jun 2021 22:24:11 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:11 GMT Message-Id: <202106282224.15SMOBYn048947@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 50aa1daf1468 - main - cam: change xpt_clone_path to return int 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/main X-Git-Reftype: branch X-Git-Commit: 50aa1daf14688a6f85f324a8efa8708a25b46a86 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:12 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=50aa1daf14688a6f85f324a8efa8708a25b46a86 commit 50aa1daf14688a6f85f324a8efa8708a25b46a86 Author: Warner Losh AuthorDate: 2021-06-28 22:04:02 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:03 +0000 cam: change xpt_clone_path to return int xpt_clone_path originally returned a cam_status, but it doesn't do I/O and should return an errno instead. I added it last year and it's only used in one place. It's not yet documented, so no doc changes are nneeded. Reviewed by: scottl@, mav@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30884 --- sys/cam/cam_xpt.c | 8 ++++---- sys/cam/cam_xpt.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 016f0e6a38be..b76d6f5adde7 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -3669,14 +3669,14 @@ xpt_compile_path(struct cam_path *new_path, struct cam_periph *perph, return (status); } -cam_status +int xpt_clone_path(struct cam_path **new_path_ptr, struct cam_path *path) { struct cam_path *new_path; new_path = (struct cam_path *)malloc(sizeof(*path), M_CAMPATH, M_NOWAIT); if (new_path == NULL) - return(CAM_RESRC_UNAVAIL); + return (ENOMEM); *new_path = *path; if (path->bus != NULL) xpt_acquire_bus(path->bus); @@ -3685,7 +3685,7 @@ xpt_clone_path(struct cam_path **new_path_ptr, struct cam_path *path) if (path->device != NULL) xpt_acquire_device(path->device); *new_path_ptr = new_path; - return (CAM_REQ_CMP); + return (0); } void @@ -4397,7 +4397,7 @@ xpt_async(u_int32_t async_code, struct cam_path *path, void *async_arg) return; } - if (xpt_clone_path(&ccb->ccb_h.path, path) != CAM_REQ_CMP) { + if (xpt_clone_path(&ccb->ccb_h.path, path) != 0) { xpt_print(path, "Can't allocate path to send %s\n", xpt_async_string(async_code)); xpt_free_ccb(ccb); diff --git a/sys/cam/cam_xpt.h b/sys/cam/cam_xpt.h index c8494d04234a..b75025dbd4d3 100644 --- a/sys/cam/cam_xpt.h +++ b/sys/cam/cam_xpt.h @@ -138,7 +138,7 @@ cam_status xpt_compile_path(struct cam_path *new_path, path_id_t path_id, target_id_t target_id, lun_id_t lun_id); -cam_status xpt_clone_path(struct cam_path **new_path, +int xpt_clone_path(struct cam_path **new_path, struct cam_path *path); void xpt_release_path(struct cam_path *path); From owner-dev-commits-src-main@freebsd.org Mon Jun 28 22:24:13 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE85165DB99; Mon, 28 Jun 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMbK0pgpz4kFy; Mon, 28 Jun 2021 22:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 D397258E9; Mon, 28 Jun 2021 22:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMOC00048972; Mon, 28 Jun 2021 22:24:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMOCcM048971; Mon, 28 Jun 2021 22:24:12 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:12 GMT Message-Id: <202106282224.15SMOCcM048971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9f0febd6a44c - main - cam_sim: remove unused sim_doneq member 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/main X-Git-Reftype: branch X-Git-Commit: 9f0febd6a44cab90659f2a1b98a8bb3f766e18fd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:14 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9f0febd6a44cab90659f2a1b98a8bb3f766e18fd commit 9f0febd6a44cab90659f2a1b98a8bb3f766e18fd Author: Warner Losh AuthorDate: 2021-06-28 22:04:54 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:03 +0000 cam_sim: remove unused sim_doneq member Its use was removed in 227d67aa54 by mav when locking was revamped. Reviewed by: scottl@, mav@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30890 --- sys/cam/cam_sim.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/cam/cam_sim.h b/sys/cam/cam_sim.h index 47f395854c01..54e0ae3ed8d4 100644 --- a/sys/cam/cam_sim.h +++ b/sys/cam/cam_sim.h @@ -94,7 +94,6 @@ struct cam_sim { const char *sim_name; void *softc; struct mtx *mtx; - TAILQ_HEAD(, ccb_hdr) sim_doneq; TAILQ_ENTRY(cam_sim) links; u_int32_t path_id;/* The Boot device may set this to 0? */ u_int32_t unit_number; From owner-dev-commits-src-main@freebsd.org Mon Jun 28 23:24:46 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BA4465ECC4; Mon, 28 Jun 2021 23: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDNxB2qGSz4n2r; Mon, 28 Jun 2021 23:24:46 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 490F95DF8; Mon, 28 Jun 2021 23:24:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SNOkkv028680; Mon, 28 Jun 2021 23:24:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SNOkrs028679; Mon, 28 Jun 2021 23:24:46 GMT (envelope-from git) Date: Mon, 28 Jun 2021 23:24:46 GMT Message-Id: <202106282324.15SNOkrs028679@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a72af82e3169 - main - cam: Fix GENERIC-MMCCAM build 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/main X-Git-Reftype: branch X-Git-Commit: a72af82e3169fcacfedf9047120679300a4296f8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 23:24:46 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a72af82e3169fcacfedf9047120679300a4296f8 commit a72af82e3169fcacfedf9047120679300a4296f8 Author: Warner Losh AuthorDate: 2021-06-28 23:22:35 +0000 Commit: Warner Losh CommitDate: 2021-06-28 23:22:35 +0000 cam: Fix GENERIC-MMCCAM build Fix forgotten argument and type error. MMCCAM isn't enabled by default, and I'd mistakenly thought it was, so these went undetected precommit. Sponsored by: Netflix --- sys/cam/mmc/mmc_sim.c | 2 +- sys/cam/mmc/mmc_xpt.c | 2 +- sys/dev/sdhci/sdhci.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/cam/mmc/mmc_sim.c b/sys/cam/mmc/mmc_sim.c index 2aae157c9542..0bb4c850f8eb 100644 --- a/sys/cam/mmc/mmc_sim.c +++ b/sys/cam/mmc/mmc_sim.c @@ -206,7 +206,7 @@ mmc_cam_sim_alloc(device_t dev, const char *name, struct mmc_sim *mmc_sim) mtx_init(&mmc_sim->mtx, sim_name, NULL, MTX_DEF); mmc_sim->sim = cam_sim_alloc(mmc_cam_sim_default_action, mmc_cam_default_poll, - name, mmc_sim, + name, mmc_sim, device_get_unit(dev), &mmc_sim->mtx, 1, 1, mmc_sim->devq); if (mmc_sim->sim == NULL) { diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index c94e74876ed7..a649946f096f 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -419,7 +419,7 @@ mmccam_start_discovery(struct cam_sim *sim) return; } - KASSERT(xpt_path_sim_device(&ccb->ccb_h.path) != NULL, + KASSERT(xpt_path_sim_device(ccb->ccb_h.path) != NULL, ("%s(%s): device is not initialized on sim's path", __func__, cam_sim_name(sim))); xpt_rescan(ccb); diff --git a/sys/dev/sdhci/sdhci.c b/sys/dev/sdhci/sdhci.c index 1ed521da8a70..bd30175e9f86 100644 --- a/sys/dev/sdhci/sdhci.c +++ b/sys/dev/sdhci/sdhci.c @@ -2484,7 +2484,7 @@ sdhci_start_slot(struct sdhci_slot *slot) mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF); slot->sim = cam_sim_alloc(sdhci_cam_action, sdhci_cam_poll, - "sdhci_slot", slot, + "sdhci_slot", slot, device_get_unit(slot->dev), &slot->sim_mtx, 1, 1, slot->devq); if (slot->sim == NULL) { From owner-dev-commits-src-main@freebsd.org Mon Jun 28 23:25:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE50465EAA3; Mon, 28 Jun 2021 23:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDNxs55YBz4mrP; Mon, 28 Jun 2021 23:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 97302668A; Mon, 28 Jun 2021 23:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SNPL5F028850; Mon, 28 Jun 2021 23:25:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SNPLn9028849; Mon, 28 Jun 2021 23:25:21 GMT (envelope-from git) Date: Mon, 28 Jun 2021 23:25:21 GMT Message-Id: <202106282325.15SNPLn9028849@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f94360971e64 - main - Clarify notice for profiled libraries in FreeBSD 14 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/main X-Git-Reftype: branch X-Git-Commit: f94360971e649fa684ef3b7e72839b59c7242bdb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 23:25:21 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f94360971e649fa684ef3b7e72839b59c7242bdb commit f94360971e649fa684ef3b7e72839b59c7242bdb Author: Ed Maste AuthorDate: 2021-06-28 21:30:48 +0000 Commit: Ed Maste CommitDate: 2021-06-28 23:24:56 +0000 Clarify notice for profiled libraries in FreeBSD 14 Reported by: kevans Fixes: 175841285e28 ("Add deprecation notice for...") Sponsored by: The FreeBSD Foundation --- share/man/man5/src.conf.5 | 4 +++- tools/build/options/WITHOUT_PROFILE | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 342c9f92b234..e9265df9051a 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd June 27, 2021 +.Dd June 28, 2021 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1362,6 +1362,8 @@ mips/mips64. .It Va WITH_PROFILE Build profiled libraries for use with .Xr gprof 8 . +This option is deprecated and is not present in +.Fx 14 . .Pp This is a default setting on amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. diff --git a/tools/build/options/WITHOUT_PROFILE b/tools/build/options/WITHOUT_PROFILE index 5cc8dbb027c8..7fdb12c94cdd 100644 --- a/tools/build/options/WITHOUT_PROFILE +++ b/tools/build/options/WITHOUT_PROFILE @@ -1,5 +1,3 @@ .\" $FreeBSD$ Do not build profiled libraries for use with .Xr gprof 8 . -This option is enabled by default as of -.Fx 14 . From owner-dev-commits-src-main@freebsd.org Tue Jun 29 01:10:37 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05E7565F96D; Tue, 29 Jun 2021 01:10: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDRHJ6Vd6z4tXx; Tue, 29 Jun 2021 01:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C77B37BB5; Tue, 29 Jun 2021 01:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15T1AaIG070159; Tue, 29 Jun 2021 01:10:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T1AaMe070158; Tue, 29 Jun 2021 01:10:36 GMT (envelope-from git) Date: Tue, 29 Jun 2021 01:10:36 GMT Message-Id: <202106290110.15T1AaMe070158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John-Mark Gurney Subject: git: 3d5104182c2e - main - ued may be NULL here which will cause a panic... reproducable by simply doing a usbconfig reset on a device which doesn't reset itself properly... MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jmg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3d5104182c2eb4336905e89aa0d089b67aa746e3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 01:10:37 -0000 The branch main has been updated by jmg: URL: https://cgit.FreeBSD.org/src/commit/?id=3d5104182c2eb4336905e89aa0d089b67aa746e3 commit 3d5104182c2eb4336905e89aa0d089b67aa746e3 Author: John-Mark Gurney AuthorDate: 2021-06-29 01:09:14 +0000 Commit: John-Mark Gurney CommitDate: 2021-06-29 01:09:14 +0000 ued may be NULL here which will cause a panic... reproducable by simply doing a usbconfig reset on a device which doesn't reset itself properly... --- sys/dev/usb/net/if_cdce.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/dev/usb/net/if_cdce.c b/sys/dev/usb/net/if_cdce.c index 64c31896d417..24813ea305e4 100644 --- a/sys/dev/usb/net/if_cdce.c +++ b/sys/dev/usb/net/if_cdce.c @@ -709,18 +709,18 @@ alloc_transfers: if ((ued == NULL) || (ued->bLength < sizeof(*ued))) { error = USB_ERR_INVAL; } else { + /* + * ECM 1.2 doesn't say it excludes the CRC, but states that it's + * normally 1514, which excludes the CRC. + */ + DPRINTF("max segsize: %d\n", UGETW(ued->wMaxSegmentSize)); + if (UGETW(ued->wMaxSegmentSize) >= (ETHER_MAX_LEN - ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN)) + sc->sc_flags |= CDCE_FLAG_VLAN; + error = usbd_req_get_string_any(uaa->device, NULL, eaddr_str, sizeof(eaddr_str), ued->iMacAddress); } - /* - * ECM 1.2 doesn't say it excludes the CRC, but states that it's - * normally 1514, which excludes the CRC. - */ - DPRINTF("max segsize: %d\n", UGETW(ued->wMaxSegmentSize)); - if (UGETW(ued->wMaxSegmentSize) >= (ETHER_MAX_LEN - ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN)) - sc->sc_flags |= CDCE_FLAG_VLAN; - if (error) { /* fake MAC address */ From owner-dev-commits-src-main@freebsd.org Tue Jun 29 02:10:53 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FAF6640F28; Tue, 29 Jun 2021 02:10: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDScs3xlkz3Hgx; Tue, 29 Jun 2021 02:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 6FDE110D05; Tue, 29 Jun 2021 02:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15T2ArYJ051264; Tue, 29 Jun 2021 02:10:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T2ArG9051263; Tue, 29 Jun 2021 02:10:53 GMT (envelope-from git) Date: Tue, 29 Jun 2021 02:10:53 GMT Message-Id: <202106290210.15T2ArG9051263@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 857cde693f26 - main - UPDATING: Fix typos / improve langauge 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/main X-Git-Reftype: branch X-Git-Commit: 857cde693f26ba558fbacf86aa2f2313d29a02cd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 02:10:53 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=857cde693f26ba558fbacf86aa2f2313d29a02cd commit 857cde693f26ba558fbacf86aa2f2313d29a02cd Author: Maigurs Stalidzans AuthorDate: 2021-06-29 01:27:30 +0000 Commit: Warner Losh CommitDate: 2021-06-29 01:42:17 +0000 UPDATING: Fix typos / improve langauge This fixes a couple of typos in older entries, and clarifies the language of a newer one. It also removes a joke that trips up foreign readers due its use of faux archaic English. Reviewed by: imp@ --- UPDATING | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UPDATING b/UPDATING index dbedcd058585..35994b25a2f1 100644 --- a/UPDATING +++ b/UPDATING @@ -593,8 +593,8 @@ https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html r342286 modifies the NFSv4 server so that it obeys vfs.nfsd.nfs_privport in the same as it is applied to NFSv2 and 3. This implies that NFSv4 servers that have vfs.nfsd.nfs_privport set will only allow mounts - from clients using a reserved port#. Since both the FreeBSD and Linux - NFSv4 clients use reserved port#s by default, this should not affect + from clients using a reserved port. Since both the FreeBSD and Linux + NFSv4 clients use reserved ports by default, this should not affect most NFSv4 mounts. 20181219: @@ -1036,7 +1036,7 @@ https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html Newer versions of loader can boot old kernels without issue. 20171110: - The LOADER_FIREWIRE_SUPPORT build variable as been renamed to + The LOADER_FIREWIRE_SUPPORT build variable has been renamed to WITH/OUT_LOADER_FIREWIRE. LOADER_{NO_,}GELI_SUPPORT has been renamed to WITH/OUT_LOADER_GELI. @@ -1220,7 +1220,7 @@ https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html If you have if_ath_pci in /boot/loader.conf, ensure it is after if_ath or it will not load any HAL chipset support. - If you want to selectively load things (eg on ye cheape ARM/MIPS + If you want to selectively load things (eg on cheaper ARM/MIPS platforms where RAM is at a premium) you should: * load ath_hal @@ -1444,7 +1444,7 @@ https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html kernel. 20160527: - CAM will now strip leading spaces from SCSI disks' serial numbers. + CAM now strips the leading spaces from each SCSI disk's serial number. This will affect users who create UFS filesystems on SCSI disks using those disk's diskid device nodes. For example, if /etc/fstab previously contained a line like From owner-dev-commits-src-main@freebsd.org Tue Jun 29 03:23:11 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7930B642014; Tue, 29 Jun 2021 03:23: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDVDH1gKGz3PTF; Tue, 29 Jun 2021 03:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 22F0211EF4; Tue, 29 Jun 2021 03:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15T3NBXe048217; Tue, 29 Jun 2021 03:23:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T3NBK8048216; Tue, 29 Jun 2021 03:23:11 GMT (envelope-from git) Date: Tue, 29 Jun 2021 03:23:11 GMT Message-Id: <202106290323.15T3NBK8048216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 26a357245f21 - main - arm64: a few simplications to pmap_remove_{all, write} MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26a357245f2197eea4dbbae0956d5c71ef8ba4f1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 03:23:11 -0000 The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=26a357245f2197eea4dbbae0956d5c71ef8ba4f1 commit 26a357245f2197eea4dbbae0956d5c71ef8ba4f1 Author: Alan Cox AuthorDate: 2021-06-29 02:57:04 +0000 Commit: Alan Cox CommitDate: 2021-06-29 03:21:24 +0000 arm64: a few simplications to pmap_remove_{all,write} Eliminate some unnecessary unlocking and relocking when we have to retry the operation to avoid deadlock. (All of the other pmap functions that iterate over a PV list already implemented retries without these same unlocking and relocking operations.) Avoid a pointer dereference by using an existing local variable that already holds the desired value. Eliminate some unnecessary repetition of code on a failed fcmpset. Specifically, there is no point in retesting the DBM bit because it cannot change state while the pmap lock is held. Reviewed by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30931 --- sys/arm64/arm64/pmap.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 76ca8eab70ff..79b9d20231aa 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -3130,8 +3130,8 @@ pmap_remove_all(vm_page_t m) SLIST_INIT(&free); lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : page_to_pvh(m); -retry: rw_wlock(lock); +retry: while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -3140,7 +3140,6 @@ retry: PMAP_LOCK(pmap); rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { - rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; } @@ -3151,7 +3150,6 @@ retry: ("pmap_remove_all: no page table entry found")); KASSERT(lvl == 2, ("pmap_remove_all: invalid pte level %d", lvl)); - pmap_demote_l2_locked(pmap, pte, va, &lock); PMAP_UNLOCK(pmap); } @@ -3165,7 +3163,6 @@ retry: PMAP_LOCK(pmap); rw_wlock(lock); if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { - rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; } @@ -5224,8 +5221,8 @@ pmap_remove_write(vm_page_t m) return; lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : page_to_pvh(m); -retry_pv_loop: rw_wlock(lock); +retry: TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); PMAP_ASSERT_STAGE1(pmap); @@ -5236,12 +5233,11 @@ retry_pv_loop: rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); - goto retry_pv_loop; + goto retry; } } va = pv->pv_va; - pte = pmap_pte(pmap, pv->pv_va, &lvl); + pte = pmap_pte(pmap, va, &lvl); if ((pmap_load(pte) & ATTR_SW_DBM) != 0) (void)pmap_demote_l2_locked(pmap, pte, va, &lock); KASSERT(lock == VM_PAGE_TO_PV_LIST_LOCK(m), @@ -5261,17 +5257,15 @@ retry_pv_loop: if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); - goto retry_pv_loop; + goto retry; } } pte = pmap_pte(pmap, pv->pv_va, &lvl); oldpte = pmap_load(pte); -retry: if ((oldpte & ATTR_SW_DBM) != 0) { - if (!atomic_fcmpset_long(pte, &oldpte, + while (!atomic_fcmpset_64(pte, &oldpte, (oldpte | ATTR_S1_AP_RW_BIT) & ~ATTR_SW_DBM)) - goto retry; + cpu_spinwait(); if ((oldpte & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP(ATTR_S1_AP_RW)) vm_page_dirty(m); From owner-dev-commits-src-main@freebsd.org Tue Jun 29 07:22:39 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F1CD645055; Tue, 29 Jun 2021 07:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDbXb3wGMz4Rh3; Tue, 29 Jun 2021 07:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 6E78D14E3C; Tue, 29 Jun 2021 07:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15T7MdZr067862; Tue, 29 Jun 2021 07:22:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T7Mdev067861; Tue, 29 Jun 2021 07:22:39 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:22:39 GMT Message-Id: <202106290722.15T7Mdev067861@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: b33d1898c1b0 - main - md5: Improve compatibility with coreutils and format fix MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b33d1898c1b0e6d76b52eb48078260588802dc95 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:22:39 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=b33d1898c1b0e6d76b52eb48078260588802dc95 commit b33d1898c1b0e6d76b52eb48078260588802dc95 Author: Stefan Eßer AuthorDate: 2021-06-29 07:01:13 +0000 Commit: Stefan Eßer CommitDate: 2021-06-29 07:21:57 +0000 md5: Improve compatibility with coreutils and format fix The previous changes that added support for the coreutils -c option modified the output generated by passing -r to match that of the coreutils versions. The difference is that coreutils separates the hash from the file name by two blanks " " (or a blank followed by an asterisk " *" with the -b option denoting). While most scripts or users will not notice the difference, it might be considered a violation of POLA and this commit reverts the change for the non-sum programs. These will print a single blank " " as the separator, as they die before the previous commit. In order to still generate output that is identical to that of the coreutils programs, this commit generates the " " or " *" separator used by them for the -sum versions, depending on the presence of the -b option. MFC after: 3 days --- sbin/md5/md5.1 | 25 ++++++++++++++++--------- sbin/md5/md5.c | 10 +++++++++- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/sbin/md5/md5.1 b/sbin/md5/md5.1 index da034d1298c5..2b1da85c080f 100644 --- a/sbin/md5/md5.1 +++ b/sbin/md5/md5.1 @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd June 24, 2021 +.Dd June 29, 2021 .Dt MD5 1 .Os .Sh NAME @@ -77,9 +77,11 @@ The hexadecimal checksum of each file listed on the command line is printed after the options are processed. .Bl -tag -width indent .It Fl b -Ignored for compatibility with the coreutils +Make the .Nm -sum -programs. +programs separate hash and digest with a blank followed by an asterisk instead +of by 2 blank characters for full compatibility with the output generated by the +coreutils versions of these programs. .It Fl c Ar string If the program was called with a name that does not end in .Nm sum , @@ -88,13 +90,13 @@ compare the digest of the file against this string. .It Fl c Ar file If the program was called with a name that does end in .Nm sum , -the file passed as argument must contain digest lines generated by the same digest algorithm -with or without the +the file passed as argument must contain digest lines generated by the same +digest algorithm with or without the .Fl r option .Pq i.e. in either classical BSD format or in GNU coreutils format . -A line with file name followed by -.Dq : +A line with the file name followed by a colon +.Dq ":" and either OK or FAILED is written for each well-formed line in the digest file. If applicable, the number of failed comparisons and the number of lines that were skipped since they were not well-formed are printed at the end. @@ -157,8 +159,13 @@ $ echo -n Hello | md5 Calculate the checksum of multiple files reversing the output: .Bd -literal -offset indent $ md5 -r /boot/loader.conf /etc/rc.conf -ada5f60f23af88ff95b8091d6d67bef6 /boot/loader.conf -d80bf36c332dc0fdc479366ec3fa44cd /etc/rc.conf +ada5f60f23af88ff95b8091d6d67bef6 /boot/loader.conf +d80bf36c332dc0fdc479366ec3fa44cd /etc/rc.conf +.Pd +The +.Nm -sum +variants put 2 blank characters between hash and file name for full compatibilty +with the coreutils versions of these commands. .Ed .Pp Write the digest for diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index 43a76227a9d2..7235e6e0a39f 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #define TEST_BLOCK_COUNT 100000 #define MDTESTCOUNT 8 +static int bflag; static int cflag; static int pflag; static int qflag; @@ -301,6 +302,7 @@ main(int argc, char *argv[]) while ((ch = getopt(argc, argv, "bc:pqrs:tx")) != -1) switch (ch) { case 'b': + bflag = 1; break; case 'c': cflag = 1; @@ -436,7 +438,13 @@ MDOutput(const Algorithm_t *alg, char *p, char *argv[]) printf("%s\n", p); } else { if (rflag) - printf("%s %s", p, *argv); + if (gnu_emu) + if (bflag) + printf("%s *%s", p, *argv); + else + printf("%s %s", p, *argv); + else + printf("%s %s", p, *argv); else printf("%s (%s) = %s", alg->name, *argv, p); if (checkAgainst) { From owner-dev-commits-src-main@freebsd.org Tue Jun 29 07:24:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE21B644EBB; Tue, 29 Jun 2021 07:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDbbF54LWz4RqW; Tue, 29 Jun 2021 07:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 9692E14ED7; Tue, 29 Jun 2021 07:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15T7OvE4068135; Tue, 29 Jun 2021 07:24:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T7OvwR068134; Tue, 29 Jun 2021 07:24:57 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:24:57 GMT Message-Id: <202106290724.15T7OvwR068134@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 7f025db57c78 - main - pf: fix error-case leaks in pf_create_state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7f025db57c7879bfa43ac74ecd95903439fdd1d0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:24:57 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=7f025db57c7879bfa43ac74ecd95903439fdd1d0 commit 7f025db57c7879bfa43ac74ecd95903439fdd1d0 Author: Mateusz Guzik AuthorDate: 2021-06-28 18:29:58 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-29 07:24:52 +0000 pf: fix error-case leaks in pf_create_state The hand-rolled clean up failed to free counters. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 26989adfb613..f05dc69b3dbb 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -3827,7 +3827,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, REASON_SET(&reason, PFRES_MAPFAILED); pf_src_tree_remove_state(s); STATE_DEC_COUNTERS(s); - uma_zfree(V_pf_state_z, s); + pf_free_state(s); goto csfailed; } s->rt_kif = r->rpool.cur->kif; @@ -3849,7 +3849,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, REASON_SET(&reason, PFRES_MEMORY); pf_src_tree_remove_state(s); STATE_DEC_COUNTERS(s); - uma_zfree(V_pf_state_z, s); + pf_free_state(s); return (PF_DROP); } if ((pd->flags & PFDESC_TCP_NORM) && s->src.scrub && @@ -3859,10 +3859,9 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, DPFPRINTF(PF_DEBUG_URGENT, ("pf_normalize_tcp_stateful failed on first " "pkt\n")); - pf_normalize_tcp_cleanup(s); pf_src_tree_remove_state(s); STATE_DEC_COUNTERS(s); - uma_zfree(V_pf_state_z, s); + pf_free_state(s); return (PF_DROP); } } @@ -3886,12 +3885,10 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, if (pf_state_insert(BOUND_IFACE(r, kif), kif, (pd->dir == PF_IN) ? sk : nk, (pd->dir == PF_IN) ? nk : sk, s)) { - if (pd->proto == IPPROTO_TCP) - pf_normalize_tcp_cleanup(s); REASON_SET(&reason, PFRES_STATEINS); pf_src_tree_remove_state(s); STATE_DEC_COUNTERS(s); - uma_zfree(V_pf_state_z, s); + pf_free_state(s); return (PF_DROP); } else *sm = s; From owner-dev-commits-src-main@freebsd.org Tue Jun 29 07:24:59 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 186EB64506D; Tue, 29 Jun 2021 07:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDbbG71g1z4Rn9; Tue, 29 Jun 2021 07:24:58 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 B0ECF14D4E; Tue, 29 Jun 2021 07:24:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15T7Owaa068164; Tue, 29 Jun 2021 07:24:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T7OwLL068163; Tue, 29 Jun 2021 07:24:58 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:24:58 GMT Message-Id: <202106290724.15T7OwLL068163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 803dfe3da0e3 - main - pf: deduplicate V_pf_state_z handling with pfsync MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 803dfe3da0e30520227a791ba5c2b93da16e1cf5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:24:59 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=803dfe3da0e30520227a791ba5c2b93da16e1cf5 commit 803dfe3da0e30520227a791ba5c2b93da16e1cf5 Author: Mateusz Guzik AuthorDate: 2021-06-28 18:18:26 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-29 07:24:53 +0000 pf: deduplicate V_pf_state_z handling with pfsync Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 1 + sys/netpfil/pf/if_pfsync.c | 20 +++----------------- sys/netpfil/pf/pf.c | 2 +- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 9f0bf002b631..2ce47f926091 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1495,6 +1495,7 @@ extern int pf_state_insert(struct pfi_kkif *, struct pf_state_key *, struct pf_state_key *, struct pf_state *); +extern struct pf_state *pf_alloc_state(int); extern void pf_free_state(struct pf_state *); static __inline void diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 3514c922c361..16878fe87750 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -504,16 +504,10 @@ pfsync_state_import(struct pfsync_state *sp, u_int8_t flags) /* * XXXGL: consider M_WAITOK in ioctl path after. */ - if ((st = uma_zalloc(V_pf_state_z, M_NOWAIT | M_ZERO)) == NULL) + st = pf_alloc_state(M_NOWAIT); + if (__predict_false(st == NULL)) goto cleanup; - for (int i = 0; i < 2; i++) { - st->packets[i] = counter_u64_alloc(M_NOWAIT); - st->bytes[i] = counter_u64_alloc(M_NOWAIT); - if (st->packets[i] == NULL || st->bytes[i] == NULL) - goto cleanup; - } - if ((skw = uma_zalloc(V_pf_state_key_z, M_NOWAIT)) == NULL) goto cleanup; @@ -623,15 +617,7 @@ cleanup: cleanup_state: /* pf_state_insert() frees the state keys. */ if (st) { - for (int i = 0; i < 2; i++) { - counter_u64_free(st->packets[i]); - counter_u64_free(st->bytes[i]); - } - if (st->dst.scrub) - uma_zfree(V_pf_state_scrub_z, st->dst.scrub); - if (st->src.scrub) - uma_zfree(V_pf_state_scrub_z, st->src.scrub); - uma_zfree(V_pf_state_z, st); + pf_free_state(st); } return (error); } diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index f05dc69b3dbb..7579b6bbebb0 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1736,7 +1736,7 @@ pf_unlink_state(struct pf_state *s, u_int flags) return (pf_release_staten(s, 2)); } -static struct pf_state * +struct pf_state * pf_alloc_state(int flags) { struct pf_state *s; From owner-dev-commits-src-main@freebsd.org Tue Jun 29 07:25:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 117816450B1; Tue, 29 Jun 2021 07:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDbbH6rCwz4RnG; Tue, 29 Jun 2021 07:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 D1D4314D4F; Tue, 29 Jun 2021 07:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15T7Ox9n068190; Tue, 29 Jun 2021 07:24:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T7OxIF068189; Tue, 29 Jun 2021 07:24:59 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:24:59 GMT Message-Id: <202106290724.15T7OxIF068189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 55cc305dfcad - main - pf: revert: Use counter(9) for pf_state byte/packet tracking MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55cc305dfcad0ad7c4f528fa47f7473927e8223a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:25:00 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=55cc305dfcad0ad7c4f528fa47f7473927e8223a commit 55cc305dfcad0ad7c4f528fa47f7473927e8223a Author: Mateusz Guzik AuthorDate: 2021-06-28 18:50:56 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-29 07:24:53 +0000 pf: revert: Use counter(9) for pf_state byte/packet tracking stats are not shared and consequently per-CPU counters only waste memory. No slowdown was measured when passing over 20M pps. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 4 ++-- sys/netpfil/pf/pf.c | 39 +++++++++------------------------------ sys/netpfil/pf/pf_ioctl.c | 10 ++++------ sys/netpfil/pf/pf_nv.c | 4 ++-- 4 files changed, 17 insertions(+), 40 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 2ce47f926091..c97fffea845f 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -536,8 +536,8 @@ struct pf_state { struct pfi_kkif *rt_kif; struct pf_ksrc_node *src_node; struct pf_ksrc_node *nat_src_node; - counter_u64_t packets[2]; - counter_u64_t bytes[2]; + u_int64_t packets[2]; + u_int64_t bytes[2]; u_int32_t creation; u_int32_t expire; u_int32_t pfsync_time; diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 7579b6bbebb0..69cdc75f0f41 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1739,23 +1739,8 @@ pf_unlink_state(struct pf_state *s, u_int flags) struct pf_state * pf_alloc_state(int flags) { - struct pf_state *s; - - s = uma_zalloc(V_pf_state_z, flags | M_ZERO); - if (__predict_false(s == NULL)) - return (NULL); - - for (int i = 0; i < 2; i++) { - s->bytes[i] = counter_u64_alloc(M_NOWAIT); - s->packets[i] = counter_u64_alloc(M_NOWAIT); - - if (s->bytes[i] == NULL || s->packets[i] == NULL) { - pf_free_state(s); - return (NULL); - } - } - return (s); + return (uma_zalloc(V_pf_state_z, flags | M_ZERO)); } void @@ -1766,11 +1751,6 @@ pf_free_state(struct pf_state *cur) KASSERT(cur->timeout == PFTM_UNLINKED, ("%s: timeout %u", __func__, cur->timeout)); - for (int i = 0; i < 2; i++) { - counter_u64_free(cur->bytes[i]); - counter_u64_free(cur->packets[i]); - } - pf_normalize_tcp_cleanup(cur); uma_zfree(V_pf_state_z, cur); counter_u64_add(V_pf_status.fcounters[FCNT_STATE_REMOVALS], 1); @@ -4313,9 +4293,8 @@ pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst, pf_print_flags(th->th_flags); printf(" seq=%u (%u) ack=%u len=%u ackskew=%d " "pkts=%llu:%llu dir=%s,%s\n", seq, orig_seq, ack, - pd->p_len, ackskew, - (unsigned long long)counter_u64_fetch((*state)->packets[0]), - (unsigned long long)counter_u64_fetch((*state)->packets[1]), + pd->p_len, ackskew, (unsigned long long)(*state)->packets[0], + (unsigned long long)(*state)->packets[1], pd->dir == PF_IN ? "in" : "out", pd->dir == (*state)->direction ? "fwd" : "rev"); } @@ -4370,8 +4349,8 @@ pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst, printf(" seq=%u (%u) ack=%u len=%u ackskew=%d " "pkts=%llu:%llu dir=%s,%s\n", seq, orig_seq, ack, pd->p_len, ackskew, - (unsigned long long)counter_u64_fetch((*state)->packets[0]), - (unsigned long long)counter_u64_fetch((*state)->packets[1]), + (unsigned long long)(*state)->packets[0], + (unsigned long long)(*state)->packets[1], pd->dir == PF_IN ? "in" : "out", pd->dir == (*state)->direction ? "fwd" : "rev"); printf("pf: State failure on: %c %c %c %c | %c %c\n", @@ -6276,8 +6255,8 @@ done: pd.tot_len); } dirndx = (dir == s->direction) ? 0 : 1; - counter_u64_add(s->packets[dirndx], 1); - counter_u64_add(s->bytes[dirndx], pd.tot_len); + s->packets[dirndx]++; + s->bytes[dirndx] += pd.tot_len; } tr = r; nr = (s != NULL) ? s->nat_rule.ptr : pd.nat_rule; @@ -6673,8 +6652,8 @@ done: pd.tot_len); } dirndx = (dir == s->direction) ? 0 : 1; - counter_u64_add(s->packets[dirndx], 1); - counter_u64_add(s->bytes[dirndx], pd.tot_len); + s->packets[dirndx]++; + s->bytes[dirndx] += pd.tot_len; } tr = r; nr = (s != NULL) ? s->nat_rule.ptr : pd.nat_rule; diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 7a8d12ee4c3f..928e4a1259cc 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -4584,12 +4584,10 @@ pfsync_state_export(struct pfsync_state *sp, struct pf_state *st) else sp->nat_rule = htonl(st->nat_rule.ptr->nr); - pf_state_counter_hton(counter_u64_fetch(st->packets[0]), - sp->packets[0]); - pf_state_counter_hton(counter_u64_fetch(st->packets[1]), - sp->packets[1]); - pf_state_counter_hton(counter_u64_fetch(st->bytes[0]), sp->bytes[0]); - pf_state_counter_hton(counter_u64_fetch(st->bytes[1]), sp->bytes[1]); + pf_state_counter_hton(st->packets[0], sp->packets[0]); + pf_state_counter_hton(st->packets[1], sp->packets[1]); + pf_state_counter_hton(st->bytes[0], sp->bytes[0]); + pf_state_counter_hton(st->bytes[1], sp->bytes[1]); } diff --git a/sys/netpfil/pf/pf_nv.c b/sys/netpfil/pf/pf_nv.c index 31943ba69687..553290c88586 100644 --- a/sys/netpfil/pf/pf_nv.c +++ b/sys/netpfil/pf/pf_nv.c @@ -982,9 +982,9 @@ pf_state_to_nvstate(const struct pf_state *s) for (int i = 0; i < 2; i++) { nvlist_append_number_array(nvl, "packets", - counter_u64_fetch(s->packets[i])); + s->packets[i]); nvlist_append_number_array(nvl, "bytes", - counter_u64_fetch(s->bytes[i])); + s->bytes[i]); } nvlist_add_number(nvl, "creatorid", s->creatorid); From owner-dev-commits-src-main@freebsd.org Tue Jun 29 07:25:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8425F644E57; Tue, 29 Jun 2021 07:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDbbK1jbsz4RVw; Tue, 29 Jun 2021 07:25:01 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0D0EE14F3D; Tue, 29 Jun 2021 07:25:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15T7P0xH068220; Tue, 29 Jun 2021 07:25:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T7P0Gt068219; Tue, 29 Jun 2021 07:25:00 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:25:00 GMT Message-Id: <202106290725.15T7P0Gt068219@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: d26ef5c7ac83 - main - pf: make sure the dtrace probe has safe access to state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d26ef5c7ac830812f07a02787f25fed5d6f8609e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:25:01 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d26ef5c7ac830812f07a02787f25fed5d6f8609e commit d26ef5c7ac830812f07a02787f25fed5d6f8609e Author: Mateusz Guzik AuthorDate: 2021-06-28 19:32:20 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-29 07:24:53 +0000 pf: make sure the dtrace probe has safe access to state Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 69cdc75f0f41..39b032962e84 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6297,11 +6297,12 @@ done: } break; } - if (s) - PF_STATE_UNLOCK(s); SDT_PROBE4(pf, ip, test, done, action, reason, r, s); + if (s) + PF_STATE_UNLOCK(s); + return (action); } #endif /* INET */ From owner-dev-commits-src-main@freebsd.org Tue Jun 29 07:58:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B459645F10; Tue, 29 Jun 2021 07:58: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDcKT0jZYz4TFP; Tue, 29 Jun 2021 07:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0113A15924; Tue, 29 Jun 2021 07:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15T7w49o008233; Tue, 29 Jun 2021 07:58:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T7w4GB008232; Tue, 29 Jun 2021 07:58:04 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:58:04 GMT Message-Id: <202106290758.15T7w4GB008232@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 435754a59ee2 - main - Add infrastructure required for Linux coredump support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 435754a59ee203c3369f47ff9103f269c81581b7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:58:05 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=435754a59ee203c3369f47ff9103f269c81581b7 commit 435754a59ee203c3369f47ff9103f269c81581b7 Author: Edward Tomasz Napierala AuthorDate: 2021-06-29 07:49:04 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-06-29 07:49:12 +0000 Add infrastructure required for Linux coredump support This adds `sv_elf_core_osabi`, `sv_elf_core_abi_vendor`, and `sv_elf_core_prepare_notes` fields to `struct sysentvec`, and modifies imgact_elf.c to make use of them instead of hardcoding FreeBSD-specific values. It also updates all of the ABI definitions to preserve current behaviour. This makes it possible to implement non-native ELF coredump support without unnecessary code duplication. It will be used for Linux coredumps. Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30921 --- sys/amd64/amd64/elf_machdep.c | 6 +++ sys/amd64/cloudabi32/cloudabi32_sysvec.c | 3 ++ sys/amd64/cloudabi64/cloudabi64_sysvec.c | 3 ++ sys/amd64/linux/linux_sysvec.c | 3 ++ sys/amd64/linux32/linux32_sysvec.c | 3 ++ sys/arm/arm/elf_machdep.c | 3 ++ sys/arm/cloudabi32/cloudabi32_sysvec.c | 3 ++ sys/arm64/arm64/elf32_machdep.c | 3 ++ sys/arm64/arm64/elf_machdep.c | 3 ++ sys/arm64/cloudabi32/cloudabi32_sysvec.c | 3 ++ sys/arm64/cloudabi64/cloudabi64_sysvec.c | 3 ++ sys/arm64/linux/linux_sysvec.c | 3 ++ sys/compat/ia32/ia32_sysvec.c | 3 ++ sys/i386/i386/elf_machdep.c | 3 ++ sys/i386/linux/linux_sysvec.c | 3 ++ sys/kern/imgact_elf.c | 66 ++++++++++++++++---------------- sys/mips/mips/elf_machdep.c | 2 + sys/mips/mips/freebsd32_machdep.c | 3 ++ sys/powerpc/powerpc/elf32_machdep.c | 3 ++ sys/powerpc/powerpc/elf64_machdep.c | 6 +++ sys/riscv/riscv/elf_machdep.c | 3 ++ sys/sys/imgact_elf.h | 11 +++++- sys/sys/sysent.h | 5 +++ 23 files changed, 113 insertions(+), 34 deletions(-) diff --git a/sys/amd64/amd64/elf_machdep.c b/sys/amd64/amd64/elf_machdep.c index a3fb1184bb05..a7cef2a8d92a 100644 --- a/sys/amd64/amd64/elf_machdep.c +++ b/sys/amd64/amd64/elf_machdep.c @@ -59,6 +59,9 @@ struct sysentvec elf64_freebsd_sysvec_la48 = { .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, @@ -94,6 +97,9 @@ struct sysentvec elf64_freebsd_sysvec_la57 = { .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/amd64/cloudabi32/cloudabi32_sysvec.c b/sys/amd64/cloudabi32/cloudabi32_sysvec.c index 5f04c35a5c72..164f87e90e91 100644 --- a/sys/amd64/cloudabi32/cloudabi32_sysvec.c +++ b/sys/amd64/cloudabi32/cloudabi32_sysvec.c @@ -209,6 +209,9 @@ static struct sysentvec cloudabi32_elf_sysvec = { .sv_fixup = cloudabi32_fixup_tcb, .sv_name = "CloudABI ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_minuser = FREEBSD32_MINUSER, .sv_maxuser = FREEBSD32_MAXUSER, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, diff --git a/sys/amd64/cloudabi64/cloudabi64_sysvec.c b/sys/amd64/cloudabi64/cloudabi64_sysvec.c index 34ad0aedfe8b..d3893902b08e 100644 --- a/sys/amd64/cloudabi64/cloudabi64_sysvec.c +++ b/sys/amd64/cloudabi64/cloudabi64_sysvec.c @@ -197,6 +197,9 @@ static struct sysentvec cloudabi64_elf_sysvec = { .sv_fixup = cloudabi64_fixup_tcb, .sv_name = "CloudABI ELF64", .sv_coredump = elf64_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf64_prepare_notes, .sv_minuser = VM_MIN_ADDRESS, /* Keep top page reserved to work around AMD Ryzen stability issues. */ .sv_maxuser = VM_MAXUSER_ADDRESS - PAGE_SIZE, diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 32db8399ad42..655214b10047 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -740,6 +740,9 @@ struct sysentvec elf_linux_sysvec = { .sv_szsigcode = &linux_szsigcode, .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, + .sv_elf_core_osabi = ELFOSABI_NONE, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf64_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index 8e3e728161ce..740e8a54a4da 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -912,6 +912,9 @@ struct sysentvec elf_linux_sysvec = { .sv_szsigcode = &linux_szsigcode, .sv_name = "Linux ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c index d32dbb5baf90..c67cd225a1af 100644 --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -72,6 +72,9 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/arm/cloudabi32/cloudabi32_sysvec.c b/sys/arm/cloudabi32/cloudabi32_sysvec.c index c6dfe0661b7c..a8c5da47d265 100644 --- a/sys/arm/cloudabi32/cloudabi32_sysvec.c +++ b/sys/arm/cloudabi32/cloudabi32_sysvec.c @@ -173,6 +173,9 @@ static struct sysentvec cloudabi32_elf_sysvec = { .sv_fixup = cloudabi32_fixup, .sv_name = "CloudABI ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index b9669616e1dd..7792374f865b 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -87,6 +87,9 @@ static struct sysentvec elf32_freebsd_sysvec = { .sv_szsigcode = &sz_aarch32_sigcode, .sv_name = "FreeBSD ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = FREEBSD32_MINUSER, diff --git a/sys/arm64/arm64/elf_machdep.c b/sys/arm64/arm64/elf_machdep.c index cd12d40c37df..82ecdf894911 100644 --- a/sys/arm64/arm64/elf_machdep.c +++ b/sys/arm64/arm64/elf_machdep.c @@ -68,6 +68,9 @@ static struct sysentvec elf64_freebsd_sysvec = { .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/arm64/cloudabi32/cloudabi32_sysvec.c b/sys/arm64/cloudabi32/cloudabi32_sysvec.c index eb8c51742dc7..889393560ede 100644 --- a/sys/arm64/cloudabi32/cloudabi32_sysvec.c +++ b/sys/arm64/cloudabi32/cloudabi32_sysvec.c @@ -181,6 +181,9 @@ static struct sysentvec cloudabi32_elf_sysvec = { .sv_fixup = cloudabi32_fixup, .sv_name = "CloudABI ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = (uintmax_t)1 << 32, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, diff --git a/sys/arm64/cloudabi64/cloudabi64_sysvec.c b/sys/arm64/cloudabi64/cloudabi64_sysvec.c index 92deb356a112..bdbd828b7b62 100644 --- a/sys/arm64/cloudabi64/cloudabi64_sysvec.c +++ b/sys/arm64/cloudabi64/cloudabi64_sysvec.c @@ -165,6 +165,9 @@ static struct sysentvec cloudabi64_elf_sysvec = { .sv_fixup = cloudabi64_fixup, .sv_name = "CloudABI ELF64", .sv_coredump = elf64_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf64_prepare_notes, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index afcca9f7e948..33bc303b5ada 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -416,6 +416,9 @@ struct sysentvec elf_linux_sysvec = { .sv_szsigcode = &linux_szsigcode, .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, + .sv_elf_core_osabi = ELFOSABI_NONE, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf64_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/compat/ia32/ia32_sysvec.c b/sys/compat/ia32/ia32_sysvec.c index f5a2c1200fc6..2b019e3b0323 100644 --- a/sys/compat/ia32/ia32_sysvec.c +++ b/sys/compat/ia32/ia32_sysvec.c @@ -105,6 +105,9 @@ struct sysentvec ia32_freebsd_sysvec = { .sv_szsigcode = &sz_ia32_sigcode, .sv_name = "FreeBSD ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = FREEBSD32_MINUSER, diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c index 0d870748967e..cb7b5617715c 100644 --- a/sys/i386/i386/elf_machdep.c +++ b/sys/i386/i386/elf_machdep.c @@ -61,6 +61,9 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 9cc15bbfd5c3..adb70fded6dc 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -854,6 +854,9 @@ struct sysentvec elf_linux_sysvec = { .sv_szsigcode = &linux_szsigcode, .sv_name = "Linux ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 4a649664c917..8c56660b1fe4 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -197,8 +197,6 @@ static Elf_Brandinfo *elf_brand_list[MAX_BRANDS]; #define aligned(a, t) (rounddown2((u_long)(a), sizeof(t)) == (u_long)(a)) -static const char FREEBSD_ABI_VENDOR[] = "FreeBSD"; - Elf_Brandnote __elfN(freebsd_brandnote) = { .hdr.n_namesz = sizeof(FREEBSD_ABI_VENDOR), .hdr.n_descsz = sizeof(int32_t), @@ -1434,8 +1432,6 @@ struct phdr_closure { Elf_Off offset; /* Offset of segment in core file */ }; -typedef void (*outfunc_t)(void *, struct sbuf *, size_t *); - struct note_info { int type; /* Note type. */ outfunc_t outfunc; /* Output function. */ @@ -1455,10 +1451,7 @@ static void each_dumpable_segment(struct thread *, segment_callback, void *, int); static int __elfN(corehdr)(struct coredump_params *, int, void *, size_t, struct note_info_list *, size_t, int); -static void __elfN(prepare_notes)(struct thread *, struct note_info_list *, - size_t *); -static void __elfN(putnote)(struct note_info *, struct sbuf *); -static size_t register_note(struct note_info_list *, int, outfunc_t, void *); +static void __elfN(putnote)(struct thread *td, struct note_info *, struct sbuf *); static void __elfN(note_fpregset)(void *, struct sbuf *, size_t *); static void __elfN(note_prpsinfo)(void *, struct sbuf *, size_t *); @@ -1509,7 +1502,7 @@ __elfN(coredump)(struct thread *td, struct vnode *vp, off_t limit, int flags) hdrsize = sizeof(Elf_Ehdr) + sizeof(Elf_Phdr) * (1 + seginfo.count); if (seginfo.count + 1 >= PN_XNUM) hdrsize += sizeof(Elf_Shdr); - __elfN(prepare_notes)(td, ¬elst, ¬esz); + td->td_proc->p_sysent->sv_elf_core_prepare_notes(td, ¬elst, ¬esz); coresize = round_page(hdrsize + notesz) + seginfo.size; /* Set up core dump parameters. */ @@ -1735,7 +1728,7 @@ __elfN(corehdr)(struct coredump_params *p, int numsegs, void *hdr, sbuf_start_section(sb, NULL); sbuf_bcat(sb, hdr, hdrsize); TAILQ_FOREACH(ninfo, notelst, link) - __elfN(putnote)(ninfo, sb); + __elfN(putnote)(p->td, ninfo, sb); /* Align up to a page boundary for the program segments. */ sbuf_end_section(sb, -1, PAGE_SIZE, 0); error = sbuf_finish(sb); @@ -1744,7 +1737,7 @@ __elfN(corehdr)(struct coredump_params *p, int numsegs, void *hdr, return (error); } -static void +void __elfN(prepare_notes)(struct thread *td, struct note_info_list *list, size_t *sizep) { @@ -1755,7 +1748,7 @@ __elfN(prepare_notes)(struct thread *td, struct note_info_list *list, p = td->td_proc; size = 0; - size += register_note(list, NT_PRPSINFO, __elfN(note_prpsinfo), p); + size += __elfN(register_note)(td, list, NT_PRPSINFO, __elfN(note_prpsinfo), p); /* * To have the debugger select the right thread (LWP) as the initial @@ -1765,15 +1758,15 @@ __elfN(prepare_notes)(struct thread *td, struct note_info_list *list, */ thr = td; while (thr != NULL) { - size += register_note(list, NT_PRSTATUS, + size += __elfN(register_note)(td, list, NT_PRSTATUS, __elfN(note_prstatus), thr); - size += register_note(list, NT_FPREGSET, + size += __elfN(register_note)(td, list, NT_FPREGSET, __elfN(note_fpregset), thr); - size += register_note(list, NT_THRMISC, + size += __elfN(register_note)(td, list, NT_THRMISC, __elfN(note_thrmisc), thr); - size += register_note(list, NT_PTLWPINFO, + size += __elfN(register_note)(td, list, NT_PTLWPINFO, __elfN(note_ptlwpinfo), thr); - size += register_note(list, -1, + size += __elfN(register_note)(td, list, -1, __elfN(note_threadmd), thr); thr = thr == td ? TAILQ_FIRST(&p->p_threads) : @@ -1782,23 +1775,23 @@ __elfN(prepare_notes)(struct thread *td, struct note_info_list *list, thr = TAILQ_NEXT(thr, td_plist); } - size += register_note(list, NT_PROCSTAT_PROC, + size += __elfN(register_note)(td, list, NT_PROCSTAT_PROC, __elfN(note_procstat_proc), p); - size += register_note(list, NT_PROCSTAT_FILES, + size += __elfN(register_note)(td, list, NT_PROCSTAT_FILES, note_procstat_files, p); - size += register_note(list, NT_PROCSTAT_VMMAP, + size += __elfN(register_note)(td, list, NT_PROCSTAT_VMMAP, note_procstat_vmmap, p); - size += register_note(list, NT_PROCSTAT_GROUPS, + size += __elfN(register_note)(td, list, NT_PROCSTAT_GROUPS, note_procstat_groups, p); - size += register_note(list, NT_PROCSTAT_UMASK, + size += __elfN(register_note)(td, list, NT_PROCSTAT_UMASK, note_procstat_umask, p); - size += register_note(list, NT_PROCSTAT_RLIMIT, + size += __elfN(register_note)(td, list, NT_PROCSTAT_RLIMIT, note_procstat_rlimit, p); - size += register_note(list, NT_PROCSTAT_OSREL, + size += __elfN(register_note)(td, list, NT_PROCSTAT_OSREL, note_procstat_osrel, p); - size += register_note(list, NT_PROCSTAT_PSSTRINGS, + size += __elfN(register_note)(td, list, NT_PROCSTAT_PSSTRINGS, __elfN(note_procstat_psstrings), p); - size += register_note(list, NT_PROCSTAT_AUXV, + size += __elfN(register_note)(td, list, NT_PROCSTAT_AUXV, __elfN(note_procstat_auxv), p); *sizep = size; @@ -1822,7 +1815,7 @@ __elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs, ehdr->e_ident[EI_CLASS] = ELF_CLASS; ehdr->e_ident[EI_DATA] = ELF_DATA; ehdr->e_ident[EI_VERSION] = EV_CURRENT; - ehdr->e_ident[EI_OSABI] = ELFOSABI_FREEBSD; + ehdr->e_ident[EI_OSABI] = td->td_proc->p_sysent->sv_elf_core_osabi; ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; @@ -1888,12 +1881,15 @@ __elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs, each_dumpable_segment(td, cb_put_phdr, &phc, flags); } -static size_t -register_note(struct note_info_list *list, int type, outfunc_t out, void *arg) +size_t +__elfN(register_note)(struct thread *td, struct note_info_list *list, + int type, outfunc_t out, void *arg) { + const struct sysentvec *sv; struct note_info *ninfo; size_t size, notesize; + sv = td->td_proc->p_sysent; size = 0; out(arg, NULL, &size); ninfo = malloc(sizeof(*ninfo), M_TEMP, M_ZERO | M_WAITOK); @@ -1907,7 +1903,7 @@ register_note(struct note_info_list *list, int type, outfunc_t out, void *arg) return (size); notesize = sizeof(Elf_Note) + /* note header */ - roundup2(sizeof(FREEBSD_ABI_VENDOR), ELF_NOTE_ROUNDSIZE) + + roundup2(strlen(sv->sv_elf_core_abi_vendor) + 1, ELF_NOTE_ROUNDSIZE) + /* note name */ roundup2(size, ELF_NOTE_ROUNDSIZE); /* note description */ @@ -1957,9 +1953,10 @@ __elfN(populate_note)(int type, void *src, void *dst, size_t size, void **descp) } static void -__elfN(putnote)(struct note_info *ninfo, struct sbuf *sb) +__elfN(putnote)(struct thread *td, struct note_info *ninfo, struct sbuf *sb) { Elf_Note note; + const struct sysentvec *sv; ssize_t old_len, sect_len; size_t new_len, descsz, i; @@ -1968,13 +1965,16 @@ __elfN(putnote)(struct note_info *ninfo, struct sbuf *sb) return; } - note.n_namesz = sizeof(FREEBSD_ABI_VENDOR); + sv = td->td_proc->p_sysent; + + note.n_namesz = strlen(sv->sv_elf_core_abi_vendor) + 1; note.n_descsz = ninfo->outsize; note.n_type = ninfo->type; sbuf_bcat(sb, ¬e, sizeof(note)); sbuf_start_section(sb, &old_len); - sbuf_bcat(sb, FREEBSD_ABI_VENDOR, sizeof(FREEBSD_ABI_VENDOR)); + sbuf_bcat(sb, sv->sv_elf_core_abi_vendor, + strlen(sv->sv_elf_core_abi_vendor) + 1); sbuf_end_section(sb, old_len, ELF_NOTE_ROUNDSIZE, 0); if (note.n_descsz == 0) return; diff --git a/sys/mips/mips/elf_machdep.c b/sys/mips/mips/elf_machdep.c index 9e27e5e7f2a4..9df6d1d36436 100644 --- a/sys/mips/mips/elf_machdep.c +++ b/sys/mips/mips/elf_machdep.c @@ -65,6 +65,8 @@ static struct sysentvec elf_freebsd_sysvec = { .sv_name = "FreeBSD ELF32", #endif .sv_coredump = __elfN(coredump), + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/mips/mips/freebsd32_machdep.c b/sys/mips/mips/freebsd32_machdep.c index 5d7fd4719efb..e30753e7a59c 100644 --- a/sys/mips/mips/freebsd32_machdep.c +++ b/sys/mips/mips/freebsd32_machdep.c @@ -85,6 +85,9 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_szsigcode = &szsigcode32, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/powerpc/powerpc/elf32_machdep.c b/sys/powerpc/powerpc/elf32_machdep.c index 04150f02bb9c..2c4928f7d9df 100644 --- a/sys/powerpc/powerpc/elf32_machdep.c +++ b/sys/powerpc/powerpc/elf32_machdep.c @@ -98,6 +98,9 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_szsigcode = &szsigcode32, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/powerpc/powerpc/elf64_machdep.c b/sys/powerpc/powerpc/elf64_machdep.c index 1bca857d9ca5..38f76c158793 100644 --- a/sys/powerpc/powerpc/elf64_machdep.c +++ b/sys/powerpc/powerpc/elf64_machdep.c @@ -69,6 +69,9 @@ struct sysentvec elf64_freebsd_sysvec_v1 = { .sv_szsigcode = &szsigcode64, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, @@ -105,6 +108,9 @@ struct sysentvec elf64_freebsd_sysvec_v2 = { .sv_szsigcode = &szsigcode64, .sv_name = "FreeBSD ELF64 V2", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/riscv/riscv/elf_machdep.c b/sys/riscv/riscv/elf_machdep.c index 06d117128ef7..ee80e04e8c31 100644 --- a/sys/riscv/riscv/elf_machdep.c +++ b/sys/riscv/riscv/elf_machdep.c @@ -72,6 +72,9 @@ struct sysentvec elf64_freebsd_sysvec = { .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index f0c112b2bcdc..44a860359a75 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -50,6 +50,8 @@ struct image_params; struct thread; struct vnode; +struct note_info_list; +struct sbuf; /* * Structure used to pass information from the loader to the @@ -98,7 +100,10 @@ typedef struct { __ElfType(Auxargs); __ElfType(Brandinfo); -#define MAX_BRANDS 8 +#define MAX_BRANDS 8 +#define FREEBSD_ABI_VENDOR "FreeBSD" + +typedef void (*outfunc_t)(void *, struct sbuf *, size_t *); /* Closure for __elfN(size_segments)(). */ struct sseg_closure { @@ -115,7 +120,11 @@ size_t __elfN(populate_note)(int, void *, void *, size_t, void **); void __elfN(stackgap)(struct image_params *, uintptr_t *); int __elfN(freebsd_copyout_auxargs)(struct image_params *, uintptr_t); void __elfN(puthdr)(struct thread *, void *, size_t, int, size_t, int); +void __elfN(prepare_notes)(struct thread *, struct note_info_list *, + size_t *); void __elfN(size_segments)(struct thread *, struct sseg_closure *, int); +size_t __elfN(register_note)(struct thread *, struct note_info_list *, + int, outfunc_t, void *); /* Machine specific function to dump per-thread information. */ void __elfN(dump_thread)(struct thread *, void *, size_t *); diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 8b0903f7dcc0..e0e5e351ae20 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -98,6 +98,7 @@ struct proc; struct __sigset; struct trapframe; struct vnode; +struct note_info_list; struct sysentvec { int sv_size; /* number of entries */ @@ -113,6 +114,10 @@ struct sysentvec { char *sv_name; /* name of binary type */ int (*sv_coredump)(struct thread *, struct vnode *, off_t, int); /* function to dump core, or NULL */ + int sv_elf_core_osabi; + const char *sv_elf_core_abi_vendor; + void (*sv_elf_core_prepare_notes)(struct thread *, + struct note_info_list *, size_t *); int (*sv_imgact_try)(struct image_params *); void (*sv_stackgap)(struct image_params *, uintptr_t *); int (*sv_copyout_auxargs)(struct image_params *, From owner-dev-commits-src-main@freebsd.org Tue Jun 29 13:01:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68C5364BD50; Tue, 29 Jun 2021 13:01: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDl332RtGz4pHH; Tue, 29 Jun 2021 13:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 3C5F01963F; Tue, 29 Jun 2021 13:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TD13Sw015953; Tue, 29 Jun 2021 13:01:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TD13Bn015952; Tue, 29 Jun 2021 13:01:03 GMT (envelope-from git) Date: Tue, 29 Jun 2021 13:01:03 GMT Message-Id: <202106291301.15TD13Bn015952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 372691a7ae18 - main - unionfs: release parent vnodes in deferred context MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 372691a7ae1878ecdf707195b0854750f07bf44e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 13:01:03 -0000 The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=372691a7ae1878ecdf707195b0854750f07bf44e commit 372691a7ae1878ecdf707195b0854750f07bf44e Author: Jason A. Harmening AuthorDate: 2021-06-12 19:45:18 +0000 Commit: Jason A. Harmening CommitDate: 2021-06-29 13:02:01 +0000 unionfs: release parent vnodes in deferred context Each unionfs node holds a reference to its parent directory vnode. A single open file reference can therefore end up keeping an arbitrarily deep vnode hierarchy in place. When that reference is released, the resulting VOP_RECLAIM call chain can then exhaust the kernel stack. This is easily reproducible by running the unionfs.sh stress2 test. Fix it by deferring recursive unionfs vnode release to taskqueue context. PR: 238883 Reviewed By: kib (earlier version), markj Differential Revision: https://reviews.freebsd.org/D30748 --- sys/fs/unionfs/union.h | 6 ++++- sys/fs/unionfs/union_subr.c | 55 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/sys/fs/unionfs/union.h b/sys/fs/unionfs/union.h index ba0318bf185c..64706b2b21a2 100644 --- a/sys/fs/unionfs/union.h +++ b/sys/fs/unionfs/union.h @@ -89,7 +89,11 @@ struct unionfs_node { /* unionfs status head */ LIST_HEAD(unionfs_node_hashhead, unionfs_node) *un_hashtbl; /* dir vnode hash table */ - LIST_ENTRY(unionfs_node) un_hash; /* hash list entry */ + union { + LIST_ENTRY(unionfs_node) un_hash; /* hash list entry */ + STAILQ_ENTRY(unionfs_node) un_rele; /* deferred release list */ + }; + u_long un_hashmask; /* bit mask */ char *un_path; /* path */ int un_flag; /* unionfs node flag */ diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 93e4f50d98c5..04d00fd77e39 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -53,6 +53,8 @@ #include #include #include +#include +#include #include #include @@ -67,6 +69,18 @@ static MALLOC_DEFINE(M_UNIONFSHASH, "UNIONFS hash", "UNIONFS hash table"); MALLOC_DEFINE(M_UNIONFSNODE, "UNIONFS node", "UNIONFS vnode private part"); MALLOC_DEFINE(M_UNIONFSPATH, "UNIONFS path", "UNIONFS path private part"); +static struct task unionfs_deferred_rele_task; +static struct mtx unionfs_deferred_rele_lock; +static STAILQ_HEAD(, unionfs_node) unionfs_deferred_rele_list = + STAILQ_HEAD_INITIALIZER(unionfs_deferred_rele_list); +static TASKQUEUE_DEFINE_THREAD(unionfs_rele); + +unsigned int unionfs_ndeferred = 0; +SYSCTL_UINT(_vfs, OID_AUTO, unionfs_ndeferred, CTLFLAG_RD, + &unionfs_ndeferred, 0, "unionfs deferred vnode release"); + +static void unionfs_deferred_rele(void *, int); + /* * Initialize */ @@ -74,6 +88,8 @@ int unionfs_init(struct vfsconf *vfsp) { UNIONFSDEBUG("unionfs_init\n"); /* printed during system boot */ + TASK_INIT(&unionfs_deferred_rele_task, 0, unionfs_deferred_rele, NULL); + mtx_init(&unionfs_deferred_rele_lock, "uniondefr", NULL, MTX_DEF); return (0); } @@ -83,9 +99,35 @@ unionfs_init(struct vfsconf *vfsp) int unionfs_uninit(struct vfsconf *vfsp) { + taskqueue_quiesce(taskqueue_unionfs_rele); + taskqueue_free(taskqueue_unionfs_rele); + mtx_destroy(&unionfs_deferred_rele_lock); return (0); } +static void +unionfs_deferred_rele(void *arg __unused, int pending __unused) +{ + STAILQ_HEAD(, unionfs_node) local_rele_list; + struct unionfs_node *unp, *tunp; + unsigned int ndeferred; + + ndeferred = 0; + STAILQ_INIT(&local_rele_list); + mtx_lock(&unionfs_deferred_rele_lock); + STAILQ_CONCAT(&local_rele_list, &unionfs_deferred_rele_list); + mtx_unlock(&unionfs_deferred_rele_lock); + STAILQ_FOREACH_SAFE(unp, &local_rele_list, un_rele, tunp) { + ++ndeferred; + MPASS(unp->un_dvp != NULL); + vrele(unp->un_dvp); + free(unp, M_UNIONFSNODE); + } + + /* We expect this function to be single-threaded, thus no atomic */ + unionfs_ndeferred += ndeferred; +} + static struct unionfs_node_hashhead * unionfs_get_hashhead(struct vnode *dvp, char *path) { @@ -375,10 +417,6 @@ unionfs_noderem(struct vnode *vp, struct thread *td) vrele(lvp); if (uvp != NULLVP) vrele(uvp); - if (dvp != NULLVP) { - vrele(dvp); - unp->un_dvp = NULLVP; - } if (unp->un_path != NULL) { free(unp->un_path, M_UNIONFSPATH); unp->un_path = NULL; @@ -400,7 +438,14 @@ unionfs_noderem(struct vnode *vp, struct thread *td) LIST_REMOVE(unsp, uns_list); free(unsp, M_TEMP); } - free(unp, M_UNIONFSNODE); + if (dvp != NULLVP) { + mtx_lock(&unionfs_deferred_rele_lock); + STAILQ_INSERT_TAIL(&unionfs_deferred_rele_list, unp, un_rele); + mtx_unlock(&unionfs_deferred_rele_lock); + taskqueue_enqueue(taskqueue_unionfs_rele, + &unionfs_deferred_rele_task); + } else + free(unp, M_UNIONFSNODE); } /* From owner-dev-commits-src-main@freebsd.org Tue Jun 29 14:26:43 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 824A064C93A; Tue, 29 Jun 2021 14:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDmxv3By6z3CK2; Tue, 29 Jun 2021 14:26:43 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 52DC61AC01; Tue, 29 Jun 2021 14:26:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TEQh3R026882; Tue, 29 Jun 2021 14:26:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TEQhof026881; Tue, 29 Jun 2021 14:26:43 GMT (envelope-from git) Date: Tue, 29 Jun 2021 14:26:43 GMT Message-Id: <202106291426.15TEQhof026881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: f77697dd9f31 - main - mac: cheaper check for ifnet_create_mbuf and ifnet_check_transmit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f77697dd9f31df85cd86370888606c81833f7c8a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 14:26:43 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=f77697dd9f31df85cd86370888606c81833f7c8a commit f77697dd9f31df85cd86370888606c81833f7c8a Author: Mateusz Guzik AuthorDate: 2021-06-29 12:56:19 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-29 13:06:45 +0000 mac: cheaper check for ifnet_create_mbuf and ifnet_check_transmit Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/security/mac/mac_framework.c | 6 ++++++ sys/security/mac/mac_framework.h | 34 ++++++++++++++++++++++++++++++++-- sys/security/mac/mac_net.c | 10 ++-------- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index f0b4f89db7ca..e773a3840464 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.c @@ -145,6 +145,8 @@ FPFLAG_RARE(vnode_check_access); FPFLAG_RARE(vnode_check_readlink); FPFLAG_RARE(pipe_check_stat); FPFLAG_RARE(pipe_check_poll); +FPFLAG_RARE(ifnet_create_mbuf); +FPFLAG_RARE(ifnet_check_transmit); #undef FPFLAG #undef FPFLAG_RARE @@ -445,6 +447,10 @@ struct mac_policy_fastpath_elem mac_policy_fastpath_array[] = { .flag = &mac_pipe_check_stat_fp_flag }, { .offset = FPO(pipe_check_poll), .flag = &mac_pipe_check_poll_fp_flag }, + { .offset = FPO(ifnet_create_mbuf), + .flag = &mac_ifnet_create_mbuf_fp_flag }, + { .offset = FPO(ifnet_check_transmit), + .flag = &mac_ifnet_check_transmit_fp_flag }, }; static void diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h index 481f90a04801..7a46fbedb28d 100644 --- a/sys/security/mac/mac_framework.h +++ b/sys/security/mac/mac_framework.h @@ -143,9 +143,39 @@ void mac_devfs_update(struct mount *mp, struct devfs_dirent *de, void mac_devfs_vnode_associate(struct mount *mp, struct devfs_dirent *de, struct vnode *vp); -int mac_ifnet_check_transmit(struct ifnet *ifp, struct mbuf *m); +int mac_ifnet_check_transmit_impl(struct ifnet *ifp, struct mbuf *m); +#ifdef MAC +extern bool mac_ifnet_check_transmit_fp_flag; +#else +#define mac_ifnet_check_transmit_fp_flag 0 +#endif +#define mac_ifnet_check_transmit_enabled() __predict_false(mac_ifnet_check_transmit_fp_flag) +static inline int +mac_ifnet_check_transmit(struct ifnet *ifp, struct mbuf *m) +{ + + if (mac_ifnet_check_transmit_enabled()) + return (mac_ifnet_check_transmit_impl(ifp, m)); + return (0); +} + void mac_ifnet_create(struct ifnet *ifp); -void mac_ifnet_create_mbuf(struct ifnet *ifp, struct mbuf *m); + +void mac_ifnet_create_mbuf_impl(struct ifnet *ifp, struct mbuf *m); +#ifdef MAC +extern bool mac_ifnet_create_mbuf_fp_flag; +#else +#define mac_ifnet_create_mbuf_fp_flag 0 +#endif +#define mac_ifnet_create_mbuf_enabled() __predict_false(mac_ifnet_create_mbuf_fp_flag) +static inline void +mac_ifnet_create_mbuf(struct ifnet *ifp, struct mbuf *m) +{ + + if (mac_ifnet_create_mbuf_enabled()) + mac_ifnet_create_mbuf_impl(ifp, m); +} + void mac_ifnet_destroy(struct ifnet *); void mac_ifnet_init(struct ifnet *); int mac_ifnet_ioctl_get(struct ucred *cred, struct ifreq *ifr, diff --git a/sys/security/mac/mac_net.c b/sys/security/mac/mac_net.c index 161040edf84f..372619c7b583 100644 --- a/sys/security/mac/mac_net.c +++ b/sys/security/mac/mac_net.c @@ -337,14 +337,11 @@ mac_bpfdesc_create_mbuf(struct bpf_d *d, struct mbuf *m) } void -mac_ifnet_create_mbuf(struct ifnet *ifp, struct mbuf *m) +mac_ifnet_create_mbuf_impl(struct ifnet *ifp, struct mbuf *m) { struct label *label; int locked; - if (mac_policy_count == 0) - return; - label = mac_mbuf_to_label(m); MAC_IFNET_LOCK(ifp, locked); @@ -380,16 +377,13 @@ MAC_CHECK_PROBE_DEFINE2(ifnet_check_transmit, "struct ifnet *", "struct mbuf *"); int -mac_ifnet_check_transmit(struct ifnet *ifp, struct mbuf *m) +mac_ifnet_check_transmit_impl(struct ifnet *ifp, struct mbuf *m) { struct label *label; int error, locked; M_ASSERTPKTHDR(m); - if (mac_policy_count == 0) - return (0); - label = mac_mbuf_to_label(m); MAC_IFNET_LOCK(ifp, locked); From owner-dev-commits-src-main@freebsd.org Tue Jun 29 17:20:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1077164F317; Tue, 29 Jun 2021 17:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDrpF6nqJz3Pcl; Tue, 29 Jun 2021 17:20:21 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 CDAAC1CDCA; Tue, 29 Jun 2021 17:20:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15THKL1b062255; Tue, 29 Jun 2021 17:20:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15THKLZM062245; Tue, 29 Jun 2021 17:20:21 GMT (envelope-from git) Date: Tue, 29 Jun 2021 17:20:21 GMT Message-Id: <202106291720.15THKLZM062245@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 615f22b2fb6d - main - Add a link to the Elf_Brandinfo into the struc proc. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 615f22b2fb6d999005473abcb771c6bf25118dfe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 17:20:22 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=615f22b2fb6d999005473abcb771c6bf25118dfe commit 615f22b2fb6d999005473abcb771c6bf25118dfe Author: Dmitry Chagin AuthorDate: 2021-06-29 17:15:08 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-29 17:15:08 +0000 Add a link to the Elf_Brandinfo into the struc proc. To allow the ABI to make a dicision based on the Brandinfo add a link to the Elf_Brandinfo into the struct proc. Add a note that the high 8 bits of Elf_Brandinfo flags is private to the ABI. Note to MFC: it breaks KBI. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D30918 MFC after: 2 weeks --- sys/kern/imgact_elf.c | 1 + sys/kern/kern_exec.c | 4 ++++ sys/kern/kern_thread.c | 4 ++-- sys/sys/imgact_elf.h | 1 + sys/sys/proc.h | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 8c56660b1fe4..98ce5460e360 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1246,6 +1246,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) map = &vmspace->vm_map; imgp->proc->p_sysent = sv; + imgp->proc->p_elf_brandinfo = brand_info; maxv = vm_map_max(map) - lim_max(td, RLIMIT_STACK); if (et_dyn_addr == ET_DYN_ADDR_RAND) { diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index b091d6061616..aff030cd432e 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -397,6 +397,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p, #endif int error, i, orig_osrel; uint32_t orig_fctl0; + Elf_Brandinfo *orig_brandinfo; static const char fexecv_proc_title[] = "(fexecv)"; imgp = &image_params; @@ -427,6 +428,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p, oldcred = p->p_ucred; orig_osrel = p->p_osrel; orig_fctl0 = p->p_fctl0; + orig_brandinfo = p->p_elf_brandinfo; #ifdef MAC error = mac_execve_enter(imgp, mac_p); @@ -499,6 +501,7 @@ interpret: imgp->proc->p_osrel = 0; imgp->proc->p_fctl0 = 0; + imgp->proc->p_elf_brandinfo = NULL; /* * Implement image setuid/setgid. @@ -894,6 +897,7 @@ exec_fail_dealloc: if (error != 0) { p->p_osrel = orig_osrel; p->p_fctl0 = orig_fctl0; + p->p_elf_brandinfo = orig_brandinfo; } if (imgp->firstpage != NULL) diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 949095a4d34e..3afcf2d3f0ef 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -100,7 +100,7 @@ _Static_assert(offsetof(struct proc, p_filemon) == 0x3b8, "struct proc KBI p_filemon"); _Static_assert(offsetof(struct proc, p_comm) == 0x3d0, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b0, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b8, "struct proc KBI p_emuldata"); #endif #ifdef __i386__ @@ -120,7 +120,7 @@ _Static_assert(offsetof(struct proc, p_filemon) == 0x268, "struct proc KBI p_filemon"); _Static_assert(offsetof(struct proc, p_comm) == 0x27c, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x308, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x30c, "struct proc KBI p_emuldata"); #endif diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index 44a860359a75..97383c6eeeb8 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -91,6 +91,7 @@ typedef struct { Elf_Brandnote *brand_note; boolean_t (*header_supported)(struct image_params *, int32_t *, uint32_t *); + /* High 8 bits of flags is private to the ABI */ #define BI_CAN_EXEC_DYN 0x0001 #define BI_BRAND_NOTE 0x0002 /* May have note.ABI-tag section. */ #define BI_BRAND_NOTE_MANDATORY 0x0004 /* Must have note.ABI-tag section. */ diff --git a/sys/sys/proc.h b/sys/sys/proc.h index ef27691ae4cd..36c07b3b5e78 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -702,6 +702,8 @@ struct proc { our subtree. */ uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ + void *p_elf_brandinfo; /* (x) Elf_Brandinfo, NULL for + non ELF binaries. */ /* End area that is copied on creation. */ #define p_endcopy p_xexit From owner-dev-commits-src-main@freebsd.org Tue Jun 29 17:20:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F99764F319; Tue, 29 Jun 2021 17:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDrpJ1JGqz3PZB; Tue, 29 Jun 2021 17:20:24 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 157631CB59; Tue, 29 Jun 2021 17:20:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15THKN1C062340; Tue, 29 Jun 2021 17:20:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15THKNZI062339; Tue, 29 Jun 2021 17:20:23 GMT (envelope-from git) Date: Tue, 29 Jun 2021 17:20:23 GMT Message-Id: <202106291720.15THKNZI062339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 5d9f790191fe - main - Eliminate p_elf_machine from struct proc. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d9f790191fe7cd003e92f8b0fa93571d885bf5e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 17:20:24 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5d9f790191fe7cd003e92f8b0fa93571d885bf5e commit 5d9f790191fe7cd003e92f8b0fa93571d885bf5e Author: Dmitry Chagin AuthorDate: 2021-06-29 17:18:29 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-29 17:18:29 +0000 Eliminate p_elf_machine from struct proc. Instead of p_elf_machine use machine member of the Elf_Brandinfo which is now cached in the struct proc at p_elf_brandinfo member. Note to MFC: D30918, KBI Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D30926 MFC after: 2 weeks --- sys/kern/imgact_elf.c | 5 +++-- sys/kern/kern_thread.c | 2 +- sys/sys/proc.h | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 98ce5460e360..42d922e9f002 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1333,7 +1333,6 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) imgp->reloc_base = addr; imgp->proc->p_osrel = osrel; imgp->proc->p_fctl0 = fctl0; - imgp->proc->p_elf_machine = hdr->e_machine; imgp->proc->p_elf_flags = hdr->e_flags; ret: @@ -1806,8 +1805,10 @@ __elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs, Elf_Phdr *phdr; Elf_Shdr *shdr; struct phdr_closure phc; + Elf_Brandinfo *bi; ehdr = (Elf_Ehdr *)hdr; + bi = td->td_proc->p_elf_brandinfo; ehdr->e_ident[EI_MAG0] = ELFMAG0; ehdr->e_ident[EI_MAG1] = ELFMAG1; @@ -1820,7 +1821,7 @@ __elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs, ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; - ehdr->e_machine = td->td_proc->p_elf_machine; + ehdr->e_machine = bi->machine; ehdr->e_version = EV_CURRENT; ehdr->e_entry = 0; ehdr->e_phoff = sizeof(Elf_Ehdr); diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 3afcf2d3f0ef..7d971d295cba 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -120,7 +120,7 @@ _Static_assert(offsetof(struct proc, p_filemon) == 0x268, "struct proc KBI p_filemon"); _Static_assert(offsetof(struct proc, p_comm) == 0x27c, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x30c, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x308, "struct proc KBI p_emuldata"); #endif diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 36c07b3b5e78..19e8d76c6f99 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -700,7 +700,6 @@ struct proc { pid_t p_reapsubtree; /* (e) Pid of the direct child of the reaper which spawned our subtree. */ - uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ void *p_elf_brandinfo; /* (x) Elf_Brandinfo, NULL for non ELF binaries. */ From owner-dev-commits-src-main@freebsd.org Tue Jun 29 17:20:23 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15D2664F53B; Tue, 29 Jun 2021 17:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDrpH000hz3PTG; Tue, 29 Jun 2021 17:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 DD11C1CE51; Tue, 29 Jun 2021 17:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15THKMM6062316; Tue, 29 Jun 2021 17:20:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15THKM1D062315; Tue, 29 Jun 2021 17:20:22 GMT (envelope-from git) Date: Tue, 29 Jun 2021 17:20:22 GMT Message-Id: <202106291720.15THKM1D062315@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 945accf502db - main - LinuxKPI: Use the proper API to determine the ABI of the running process. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 945accf502db0dd44522489857f461e29ef17d30 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 17:20:23 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=945accf502db0dd44522489857f461e29ef17d30 commit 945accf502db0dd44522489857f461e29ef17d30 Author: Dmitry Chagin AuthorDate: 2021-06-29 17:17:16 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-29 17:17:16 +0000 LinuxKPI: Use the proper API to determine the ABI of the running process. Reviewed by: markj, hselasky, kib Differential Revision: https://reviews.freebsd.org/D30924 MFC after: 2 weeks --- sys/compat/linuxkpi/common/src/linux_compat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 217c4081c603..4e949cdb91c4 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -964,7 +965,7 @@ linux_file_ioctl_sub(struct file *fp, struct linux_file *filp, data = *(void **)data; } #if defined(__amd64__) - if (td->td_proc->p_elf_machine == EM_386) { + if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) { /* try the compat IOCTL handler first */ if (fop->compat_ioctl != NULL) { error = -OPW(fp, td, fop->compat_ioctl(filp, From owner-dev-commits-src-main@freebsd.org Tue Jun 29 17:20:25 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A83FA64F603; Tue, 29 Jun 2021 17:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDrpK2kR8z3Pqm; Tue, 29 Jun 2021 17:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 310721CDCB; Tue, 29 Jun 2021 17:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15THKPZE062364; Tue, 29 Jun 2021 17:20:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15THKP09062363; Tue, 29 Jun 2021 17:20:25 GMT (envelope-from git) Date: Tue, 29 Jun 2021 17:20:25 GMT Message-Id: <202106291720.15THKP09062363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 1fd26da926d5 - main - LinuxKPI: Put compat code under appropriate condition. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fd26da926d55bc0923b1218af65720dfaa4ca28 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 17:20:25 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=1fd26da926d55bc0923b1218af65720dfaa4ca28 commit 1fd26da926d55bc0923b1218af65720dfaa4ca28 Author: Dmitry Chagin AuthorDate: 2021-06-29 17:19:17 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-29 17:19:17 +0000 LinuxKPI: Put compat code under appropriate condition. Reviewed by: hselasky, emaste, kib Differential Revision: https://reviews.freebsd.org/D30927 MFC after: 2 weeks --- sys/compat/linuxkpi/common/src/linux_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 4e949cdb91c4..3e1b2e517141 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -964,7 +964,7 @@ linux_file_ioctl_sub(struct file *fp, struct linux_file *filp, /* fetch user-space pointer */ data = *(void **)data; } -#if defined(__amd64__) +#ifdef COMPAT_FREEBSD32 if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) { /* try the compat IOCTL handler first */ if (fop->compat_ioctl != NULL) { From owner-dev-commits-src-main@freebsd.org Tue Jun 29 17:20:27 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B8E564F605; Tue, 29 Jun 2021 17:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDrpL40M3z3Pt3; Tue, 29 Jun 2021 17:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 57E8F1CDCC; Tue, 29 Jun 2021 17:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15THKQV1062388; Tue, 29 Jun 2021 17:20:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15THKQZB062387; Tue, 29 Jun 2021 17:20:26 GMT (envelope-from git) Date: Tue, 29 Jun 2021 17:20:26 GMT Message-Id: <202106291720.15THKQZB062387@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 5ca9d4170007 - main - LinuxKPI: Rename a short description of the kmalloc type. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ca9d41700078aa0757ee49aafbdd8f52fc96aae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 17:20:27 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5ca9d41700078aa0757ee49aafbdd8f52fc96aae commit 5ca9d41700078aa0757ee49aafbdd8f52fc96aae Author: Dmitry Chagin AuthorDate: 2021-06-29 17:20:01 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-29 17:20:01 +0000 LinuxKPI: Rename a short description of the kmalloc type. To avoid duplication in the vmstat -m output rename the kmalloc type short description to 'lkpikmalloc' as the Linux emulation layer historically names its linux malloc type as 'linux'. Reviewed by: hselasky, kib, emaste Differential Revision: https://reviews.freebsd.org/D30928 MFC after: 2 weeks --- sys/compat/linuxkpi/common/src/linux_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 3e1b2e517141..7ea33c9a0d8d 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -108,7 +108,7 @@ static int lkpi_net_maxpps = 99; SYSCTL_INT(_compat_linuxkpi, OID_AUTO, net_ratelimit, CTLFLAG_RWTUN, &lkpi_net_maxpps, 0, "Limit number of LinuxKPI net messages per second."); -MALLOC_DEFINE(M_KMALLOC, "linux", "Linux kmalloc compat"); +MALLOC_DEFINE(M_KMALLOC, "lkpikmalloc", "Linux kmalloc compat"); #include /* Undo Linux compat changes. */ From owner-dev-commits-src-main@freebsd.org Tue Jun 29 18:01:23 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56012650353; Tue, 29 Jun 2021 18:01: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDsjb22JMz3hVq; Tue, 29 Jun 2021 18:01:23 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 2452E1DA33; Tue, 29 Jun 2021 18:01:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TI1NgH016732; Tue, 29 Jun 2021 18:01:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TI1NfL016731; Tue, 29 Jun 2021 18:01:23 GMT (envelope-from git) Date: Tue, 29 Jun 2021 18:01:23 GMT Message-Id: <202106291801.15TI1NfL016731@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: a9f5512f072d - main - portsnap: Shorten 'Skipping' output lines 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/main X-Git-Reftype: branch X-Git-Commit: a9f5512f072d1b4e7a6bd8c3418df1213131efb1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 18:01:23 -0000 The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a9f5512f072d1b4e7a6bd8c3418df1213131efb1 commit a9f5512f072d1b4e7a6bd8c3418df1213131efb1 Author: Colin Percival AuthorDate: 2021-06-29 17:45:46 +0000 Commit: Colin Percival CommitDate: 2021-06-29 18:00:54 +0000 portsnap: Shorten 'Skipping' output lines Portsnap uses patches opportunistically to reduce download bandwidth: It attempts to fetch patches which could be useful, and then makes use of whichever patches it actually gets. (This solves the otherwise O(n^2) issue for the server to build patches between every pair of versions.) During the process of applying patches, portsnap prints lines of the form "Skipping XXX-YYY (123 of 4567).\r", where the \r serves to allow each of these (potentially many) lines to overwrite the previous one on the console. Unfortunately, XXX and YYY here are SHA256 hashes, resulting in these lines wrapping on reasonable-width consoles. Replace the hashes with abbreviations of the form "0123...cdef" (cutting 64 characters down to 11) in order to keep lines to a reasonable length. The rather ugly shell code here is used to avoid forking additional processes; it would be much cleaner using sed(1), but in my testing the sed-based alternative increases CPU time consumption by 50%. Requested by: des --- usr.sbin/portsnap/portsnap/portsnap.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh index 9db381e99f86..2edc51460642 100644 --- a/usr.sbin/portsnap/portsnap/portsnap.sh +++ b/usr.sbin/portsnap/portsnap/portsnap.sh @@ -838,6 +838,11 @@ fetch_update() { I=$(($I + 1)) F="${X}-${Y}" if [ ! -f "${F}" ]; then + XS=${X%[0-9a-f][0-9a-f][0-9a-f][0-9a-f]} + XE=${X#[0-9a-f][0-9a-f][0-9a-f][0-9a-f]} + YS=${Y%[0-9a-f][0-9a-f][0-9a-f][0-9a-f]} + YE=${Y#[0-9a-f][0-9a-f][0-9a-f][0-9a-f]} + F="${X%${XE}}...${X#${XS}}-${Y%${YE}}...${Y#${YS}}" printf " Skipping ${F} (${I} of ${PATCHCNT}).\r" continue; fi From owner-dev-commits-src-main@freebsd.org Tue Jun 29 18:01:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 880E264FE59; Tue, 29 Jun 2021 18:01: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDsjc2SwTz3hYN; Tue, 29 Jun 2021 18:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 3AFF31D8B1; Tue, 29 Jun 2021 18:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TI1OL4016756; Tue, 29 Jun 2021 18:01:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TI1OkP016755; Tue, 29 Jun 2021 18:01:24 GMT (envelope-from git) Date: Tue, 29 Jun 2021 18:01:24 GMT Message-Id: <202106291801.15TI1OkP016755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 2ef5995f49c9 - main - portsnap: Remove superfluous semicolons 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/main X-Git-Reftype: branch X-Git-Commit: 2ef5995f49c9558ddad4d50810d4528b79afff4a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 18:01:24 -0000 The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=2ef5995f49c9558ddad4d50810d4528b79afff4a commit 2ef5995f49c9558ddad4d50810d4528b79afff4a Author: Colin Percival AuthorDate: 2021-06-29 17:59:59 +0000 Commit: Colin Percival CommitDate: 2021-06-29 18:00:54 +0000 portsnap: Remove superfluous semicolons Submitted by: des --- usr.sbin/portsnap/portsnap/portsnap.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh index 2edc51460642..ad40e3c9c95c 100644 --- a/usr.sbin/portsnap/portsnap/portsnap.sh +++ b/usr.sbin/portsnap/portsnap/portsnap.sh @@ -411,7 +411,7 @@ fetch_pick_server() { SRV_PRIORITY=`cut -f 1 -d ' ' serverlist | sort -n | head -1` # Add up the weights of the response lines at that priority level. - SRV_WSUM=0; + SRV_WSUM=0 while read X; do case "$X" in ${SRV_PRIORITY}\ *) @@ -771,7 +771,7 @@ fetch_update() { cut -f 2 -d '|' /dev/stdin patchlist | while read Y; do if [ ! -f "files/${Y}.gz" ]; then - echo ${Y}; + echo ${Y} fi done > filelist echo -n "Fetching `wc -l < filelist | tr -d ' '` " @@ -844,7 +844,7 @@ fetch_update() { YE=${Y#[0-9a-f][0-9a-f][0-9a-f][0-9a-f]} F="${X%${XE}}...${X#${XS}}-${Y%${YE}}...${Y#${YS}}" printf " Skipping ${F} (${I} of ${PATCHCNT}).\r" - continue; + continue fi echo " Processing ${F}..." 1>${QUIETREDIR} gunzip -c < files/${X}.gz > OLD @@ -863,7 +863,7 @@ fetch_update() { cut -f 2 -d '|' /dev/stdin patchlist | while read Y; do if [ ! -f "files/${Y}.gz" ]; then - echo ${Y}; + echo ${Y} fi done > filelist echo -n "Fetching `wc -l < filelist | tr -d ' '` " @@ -990,7 +990,7 @@ extract_run() { return 1 fi if [ ! -z "${EXTRACTPATH}" ]; then - return 0; + return 0 fi IFS="$oldifs" From owner-dev-commits-src-main@freebsd.org Tue Jun 29 21:29:38 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 232E565317E; Tue, 29 Jun 2021 21:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDyKt0SDrz4WPL; Tue, 29 Jun 2021 21:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 EBDCA20904; Tue, 29 Jun 2021 21:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TLTb07087765; Tue, 29 Jun 2021 21:29:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TLTbrR087764; Tue, 29 Jun 2021 21:29:37 GMT (envelope-from git) Date: Tue, 29 Jun 2021 21:29:37 GMT Message-Id: <202106292129.15TLTbrR087764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Silvers Subject: git: ed1a156b038d - main - fsck_ffs: don't try to write in read-only mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed1a156b038dee0e7a02c2935186ad5d8f4c36c1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 21:29:38 -0000 The branch main has been updated by chs: URL: https://cgit.FreeBSD.org/src/commit/?id=ed1a156b038dee0e7a02c2935186ad5d8f4c36c1 commit ed1a156b038dee0e7a02c2935186ad5d8f4c36c1 Author: Chuck Silvers AuthorDate: 2021-06-29 21:29:15 +0000 Commit: Chuck Silvers CommitDate: 2021-06-29 21:29:15 +0000 fsck_ffs: don't try to write in read-only mode Skip trying to change fs_mtime for SU+J if we are running read-only. Reviewed by: mckusick Sponsored by: Netflix --- sbin/fsck_ffs/main.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 67aff2dde73c..edda3d785f09 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -441,17 +441,19 @@ checkfilesys(char *filesys) sujrecovery = 0; printf("** Skipping journal, falling through to full fsck\n\n"); } - /* - * Write the superblock so we don't try to recover the - * journal on another pass. If this is the only change - * to the filesystem, we do not want it to be called - * out as modified. - */ - sblock.fs_mtime = time(NULL); - sbdirty(); - ofsmodified = fsmodified; - flush(fswritefd, &sblk); - fsmodified = ofsmodified; + if (fswritefd != -1) { + /* + * Write the superblock so we don't try to recover the + * journal on another pass. If this is the only change + * to the filesystem, we do not want it to be called + * out as modified. + */ + sblock.fs_mtime = time(NULL); + sbdirty(); + ofsmodified = fsmodified; + flush(fswritefd, &sblk); + fsmodified = ofsmodified; + } } /* * If the filesystem was run on an old kernel that did not From owner-dev-commits-src-main@freebsd.org Tue Jun 29 23:41:19 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD54D65686E; Tue, 29 Jun 2021 23:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GF1Fq5zS1z4j5F; Tue, 29 Jun 2021 23:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 B584F21DE9; Tue, 29 Jun 2021 23:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TNfJG4067722; Tue, 29 Jun 2021 23:41:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TNfJV5067721; Tue, 29 Jun 2021 23:41:19 GMT (envelope-from git) Date: Tue, 29 Jun 2021 23:41:19 GMT Message-Id: <202106292341.15TNfJV5067721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 849dcdb1c0c5 - main - Change strmode argument type to mode_t 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/main X-Git-Reftype: branch X-Git-Commit: 849dcdb1c0c50b13f97d67c912f0edac82688281 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 23:41:19 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=849dcdb1c0c50b13f97d67c912f0edac82688281 commit 849dcdb1c0c50b13f97d67c912f0edac82688281 Author: Alfonso Gregory AuthorDate: 2021-06-25 15:35:14 +0000 Commit: Warner Losh CommitDate: 2021-06-29 23:38:45 +0000 Change strmode argument type to mode_t Finally, we have the correct function definition for strmode. NetBSD/OpenBSD did this many years ago. This code is weird sign extension safe. Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/493 --- include/string.h | 8 +++++++- lib/libc/string/strmode.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/string.h b/include/string.h index 774cf5fe9756..540258cfcf4f 100644 --- a/include/string.h +++ b/include/string.h @@ -96,7 +96,13 @@ size_t strlcpy(char * __restrict, const char * __restrict, size_t); #endif size_t strlen(const char *) __pure; #if __BSD_VISIBLE -void strmode(int, char *); + +#ifndef _MODE_T_DECLARED +typedef __mode_t mode_t; +#define _MODE_T_DECLARED +#endif + +void strmode(mode_t, char *); #endif char *strncat(char * __restrict, const char * __restrict, size_t); int strncmp(const char *, const char *, size_t) __pure; diff --git a/lib/libc/string/strmode.c b/lib/libc/string/strmode.c index 50016be21ea1..d601bd0430e1 100644 --- a/lib/libc/string/strmode.c +++ b/lib/libc/string/strmode.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include void -strmode(/* mode_t */ int mode, char *p) +strmode(mode_t mode, char *p) { /* print type */ switch (mode & S_IFMT) { From owner-dev-commits-src-main@freebsd.org Tue Jun 29 23:41:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 600026569B2; Tue, 29 Jun 2021 23:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GF1Fs07vKz4j7L; Tue, 29 Jun 2021 23:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 CF350220C8; Tue, 29 Jun 2021 23:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TNfKYE067748; Tue, 29 Jun 2021 23:41:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TNfK5F067747; Tue, 29 Jun 2021 23:41:20 GMT (envelope-from git) Date: Tue, 29 Jun 2021 23:41:20 GMT Message-Id: <202106292341.15TNfK5F067747@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 0d9e8c286df6 - main - Change strmode argument type to mode_t for crossbuild 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/main X-Git-Reftype: branch X-Git-Commit: 0d9e8c286df6cdda1fe53baf3339f0db7acdaafd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 23:41:21 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0d9e8c286df6cdda1fe53baf3339f0db7acdaafd commit 0d9e8c286df6cdda1fe53baf3339f0db7acdaafd Author: Alfonso Gregory AuthorDate: 2021-06-25 15:30:57 +0000 Commit: Warner Losh CommitDate: 2021-06-29 23:39:55 +0000 Change strmode argument type to mode_t for crossbuild To match the libc changes. Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/493 --- tools/build/cross-build/include/linux/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/cross-build/include/linux/string.h b/tools/build/cross-build/include/linux/string.h index 485cc2b680b5..1d173974a5bd 100644 --- a/tools/build/cross-build/include/linux/string.h +++ b/tools/build/cross-build/include/linux/string.h @@ -52,7 +52,7 @@ __BEGIN_DECLS size_t strlcpy(char *dst, const char *src, size_t siz); size_t strlcat(char *dst, const char *src, size_t siz); char *strnstr(const char *str, const char *find, size_t str_len); -void strmode(/* mode_t*/ int mode, char *str); +void strmode(mode_t mode, char *str); #if !defined(__GLIBC__) || \ (defined(__GLIBC__) && (!__GLIBC_PREREQ(2, 25) || !defined(_GNU_SOURCE))) From owner-dev-commits-src-main@freebsd.org Tue Jun 29 23:52:39 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94A8F657138; Tue, 29 Jun 2021 23:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GF1Vv3jfbz4k3l; Tue, 29 Jun 2021 23:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 6882C2264E; Tue, 29 Jun 2021 23:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TNqd80084827; Tue, 29 Jun 2021 23:52:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TNqdmX084826; Tue, 29 Jun 2021 23:52:39 GMT (envelope-from git) Date: Tue, 29 Jun 2021 23:52:39 GMT Message-Id: <202106292352.15TNqdmX084826@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a00d703f2f43 - main - top(1): support command name and argument grepping 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/main X-Git-Reftype: branch X-Git-Commit: a00d703f2f438b199d3933d19d535540586b7792 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 23:52:39 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a00d703f2f438b199d3933d19d535540586b7792 commit a00d703f2f438b199d3933d19d535540586b7792 Author: John Grafton AuthorDate: 2021-06-16 19:40:21 +0000 Commit: Warner Losh CommitDate: 2021-06-29 23:51:18 +0000 top(1): support command name and argument grepping Obtained from: OpenBSD Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/479 --- usr.bin/top/commands.c | 1 + usr.bin/top/commands.h | 1 + usr.bin/top/machine.c | 35 +++++++++++++++++++++++++++++++++++ usr.bin/top/machine.h | 2 +- usr.bin/top/top.1 | 5 +++++ usr.bin/top/top.c | 15 +++++++++++++++ usr.bin/top/top.h | 2 ++ 7 files changed, 60 insertions(+), 1 deletion(-) diff --git a/usr.bin/top/commands.c b/usr.bin/top/commands.c index 88f4b0867d47..9efc693020ba 100644 --- a/usr.bin/top/commands.c +++ b/usr.bin/top/commands.c @@ -59,6 +59,7 @@ const struct command all_commands[] = {'H', "toggle the displaying of threads", false, CMD_thrtog}, {'h', "show this help text", true, CMD_help}, {'?', NULL, true, CMD_help}, + {'/', "filter on command name (+ selects all commands)", false, CMD_grep}, {'i', "toggle the displaying of idle processes", false, CMD_idletog}, {'I', NULL, false, CMD_idletog}, {'j', "toggle the displaying of jail ID", false, CMD_jidtog}, diff --git a/usr.bin/top/commands.h b/usr.bin/top/commands.h index 0071fbe62fc6..863effd2ddd9 100644 --- a/usr.bin/top/commands.h +++ b/usr.bin/top/commands.h @@ -24,6 +24,7 @@ enum cmd_id { CMD_update, CMD_quit, CMD_help, + CMD_grep, CMD_errors, CMD_number, CMD_delay, diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index c7b3e13c700b..1fe2a91a655c 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -224,6 +224,7 @@ static void getsysctl(const char *name, void *ptr, size_t len); static int swapmode(int *retavail, int *retfree); static void update_layout(void); static int find_uid(uid_t needle, int *haystack); +static int cmd_matches(struct kinfo_proc *, const char *); static int find_uid(uid_t needle, int *haystack) @@ -869,6 +870,10 @@ get_process_info(struct system_info *si, struct process_select *sel, if (sel->pid != -1 && pp->ki_pid != sel->pid) continue; + if (!cmd_matches(pp, sel->command)) + /* skip proc. that doesn't match grep string */ + continue; + *prefp++ = pp; active_procs++; } @@ -887,6 +892,36 @@ get_process_info(struct system_info *si, struct process_select *sel, return (&handle); } +static int +cmd_matches(struct kinfo_proc *proc, const char *term) +{ + extern int show_args; + char **args = NULL; + + if (!term) { + /* No command filter set */ + return 1; + } else { + /* Filter set, does process name contain term? */ + if (strstr(proc->ki_comm, term)) + return 1; + /* Search arguments only if arguments are displayed */ + if (show_args) { + args = kvm_getargv(kd, proc, 1024); + if (args == NULL) { + /* Failed to get arguments so can't search them */ + return 0; + } + while (*args != NULL) { + if (strstr(*args, term)) + return 1; + args++; + } + } + } + return 0; +} + char * format_next_process(struct handle * xhandle, char *(*get_userid)(int), int flags) { diff --git a/usr.bin/top/machine.h b/usr.bin/top/machine.h index c2616e9052e3..af66eaead76b 100644 --- a/usr.bin/top/machine.h +++ b/usr.bin/top/machine.h @@ -75,7 +75,7 @@ struct process_select bool swap; /* show swap usage */ bool kidle; /* show per-CPU idle threads */ int pid; /* only this pid (unless pid == -1) */ - const char *command; /* only this command (unless == NULL) */ + char *command; /* only this command (unless == NULL) */ }; /* routines defined by the machine dependent module */ diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 03301b2f89fc..42282bebdafe 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -243,6 +243,11 @@ Remember that the next display counts as one, so typing will make .Nm show one final display and then immediately exit. +.It / +Display only processes that contain the specified string in their +command name. +If displaying arguments is enabled, the arguments are searched +too. '+' shows all processes. .It m Toggle the display between 'cpu' and 'io' modes. .It n or # diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c index 9853ecf914b0..4fbf11b50299 100644 --- a/usr.bin/top/top.c +++ b/usr.bin/top/top.c @@ -53,6 +53,7 @@ typedef void sigret_t; static char stdoutbuf[Buffersize]; static int fmt_flags = 0; +int show_args = false; int pcpu_stats = false; /* signal handling routines */ @@ -907,6 +908,19 @@ restart: } break; + case CMD_grep: /* grep command name */ + new_message(MT_standout, + "Grep command name: "); + if (readline(tempbuf1, sizeof(tempbuf1), false) > 0) { + free(ps.command); + if (tempbuf1[0] == '+' && tempbuf1[1] == '\0') { + ps.command = NULL; + } else if ((ps.command = strdup(tempbuf1)) == NULL) + quit(1); + } + clear_message(); + break; + case CMD_displays: /* change display count */ new_message(MT_standout, "Displays to show (currently %s): ", @@ -1025,6 +1039,7 @@ restart: break; case CMD_showargs: fmt_flags ^= FMT_SHOWARGS; + show_args = fmt_flags & FMT_SHOWARGS; new_message(MT_standout | MT_delayed, " %sisplaying process arguments.", fmt_flags & FMT_SHOWARGS ? "D" : "Not d"); diff --git a/usr.bin/top/top.h b/usr.bin/top/top.h index 7ec2d7f2c199..2f31d5812ee4 100644 --- a/usr.bin/top/top.h +++ b/usr.bin/top/top.h @@ -37,6 +37,8 @@ extern pid_t mypid; extern int (*compares[])(const void*, const void*); +extern int show_args; + const char* kill_procs(char *); const char* renice_procs(char *); From owner-dev-commits-src-main@freebsd.org Wed Jun 30 06:34:08 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB8D565BAE0; Wed, 30 Jun 2021 06:34: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFBQ84dZ8z4VpT; Wed, 30 Jun 2021 06:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 87C7327E73; Wed, 30 Jun 2021 06:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15U6Y8W3016930; Wed, 30 Jun 2021 06:34:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U6Y8m8016927; Wed, 30 Jun 2021 06:34:08 GMT (envelope-from git) Date: Wed, 30 Jun 2021 06:34:08 GMT Message-Id: <202106300634.15U6Y8m8016927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 2617128a21bf - main - zfs: merge openzfs/zfs@4694131a0 (master) into main MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2617128a21bfb1b1e3065e54d46f9982d37c0bf8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 06:34:08 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=2617128a21bfb1b1e3065e54d46f9982d37c0bf8 commit 2617128a21bfb1b1e3065e54d46f9982d37c0bf8 Merge: a00d703f2f43 4694131a0a05 Author: Martin Matuska AuthorDate: 2021-06-30 06:02:44 +0000 Commit: Martin Matuska CommitDate: 2021-06-30 06:02:44 +0000 zfs: merge openzfs/zfs@4694131a0 (master) into main Notable upstream pull request merges: #12253 module/zfs: simplify ddt_stat_add() loop #12288 Avoid 64bit division in multilist index functions Obtained from: OpenZFS OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064 sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh | 2 +- .../openzfs/contrib/dracut/90zfs/zfs-lib.sh.in | 4 ++-- sys/contrib/openzfs/module/zfs/arc.c | 5 +++-- sys/contrib/openzfs/module/zfs/dbuf.c | 5 +++-- sys/contrib/openzfs/module/zfs/ddt.c | 4 ++-- sys/contrib/openzfs/module/zfs/dmu_objset.c | 10 +++++++++- sys/contrib/openzfs/module/zfs/metaslab.c | 7 ++++++- sys/contrib/openzfs/module/zstd/zfs_zstd.c | 19 +++++++++++++++++++ 9 files changed, 46 insertions(+), 12 deletions(-) From owner-dev-commits-src-main@freebsd.org Wed Jun 30 06:35:16 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16B8E65BDAB; Wed, 30 Jun 2021 06:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFBRS0BZvz4WKD; Wed, 30 Jun 2021 06:35:16 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 E3E8C27D1C; Wed, 30 Jun 2021 06:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15U6ZF5R017142; Wed, 30 Jun 2021 06:35:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U6ZF7s017141; Wed, 30 Jun 2021 06:35:15 GMT (envelope-from git) Date: Wed, 30 Jun 2021 06:35:15 GMT Message-Id: <202106300635.15U6ZF7s017141@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: c0149d030023 - main - zfs: update zfs_config.h (missing in 2617128a2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0149d030023a8e4f7c4d668e95ad413ea7ac9db Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 06:35:16 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=c0149d030023a8e4f7c4d668e95ad413ea7ac9db commit c0149d030023a8e4f7c4d668e95ad413ea7ac9db Author: Martin Matuska AuthorDate: 2021-06-30 06:34:36 +0000 Commit: Martin Matuska CommitDate: 2021-06-30 06:34:36 +0000 zfs: update zfs_config.h (missing in 2617128a2) --- sys/modules/zfs/zfs_config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h index ae32a588b104..7983ac8959e7 100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@ -734,7 +734,7 @@ /* #undef ZFS_IS_GPL_COMPATIBLE */ /* Define the project alias string. */ -#define ZFS_META_ALIAS "zfs-2.1.99-FreeBSD_g5e2c8338b" +#define ZFS_META_ALIAS "zfs-2.1.99-FreeBSD_g4694131a0" /* Define the project author. */ #define ZFS_META_AUTHOR "OpenZFS" @@ -743,7 +743,7 @@ /* #undef ZFS_META_DATA */ /* Define the maximum compatible kernel version. */ -#define ZFS_META_KVER_MAX "5.12" +#define ZFS_META_KVER_MAX "5.13" /* Define the minimum compatible kernel version. */ #define ZFS_META_KVER_MIN "3.10" @@ -764,7 +764,7 @@ #define ZFS_META_NAME "zfs" /* Define the project release. */ -#define ZFS_META_RELEASE "FreeBSD_g5e2c8338b" +#define ZFS_META_RELEASE "FreeBSD_g4694131a0" /* Define the project version. */ #define ZFS_META_VERSION "2.1.99" From owner-dev-commits-src-main@freebsd.org Wed Jun 30 08:06:51 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4456165F9E4; Wed, 30 Jun 2021 08:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFDT71WRzz4htg; Wed, 30 Jun 2021 08:06:51 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 1C52FFAB; Wed, 30 Jun 2021 08:06:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15U86pNO037943; Wed, 30 Jun 2021 08:06:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U86pGq037942; Wed, 30 Jun 2021 08:06:51 GMT (envelope-from git) Date: Wed, 30 Jun 2021 08:06:51 GMT Message-Id: <202106300806.15U86pGq037942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Fernando Apestegu=C3=ADa?= Subject: git: 0a0f7486413c - main - man: Build manpages for all architectures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a0f7486413c147d56808b38055c40c64cff61f5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 08:06:51 -0000 The branch main has been updated by fernape (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=0a0f7486413c147d56808b38055c40c64cff61f5 commit 0a0f7486413c147d56808b38055c40c64cff61f5 Author: Fernando Apesteguía AuthorDate: 2021-06-09 10:58:04 +0000 Commit: Fernando Apesteguía CommitDate: 2021-06-30 07:57:51 +0000 man: Build manpages for all architectures Building and installing architecture-specific man pages only raises a number of problems: * The https://www.freebsd.org/cgi/man.cgi is incomplete. As an example, it does not show results for pae(4). The reason for this is that the cgi interface runs on FreeBSD amd64. * In FreeBSD amd64 some manual pages have broken X-refs. See hptrr(4) for an example. * Also, we have broken links in our Release Notes. This is a consequence of the first point. See https://www.freebsd.org/releases/13.0R/hardware/#proc-i386. Make MAN_ARCH default to 'all' so we build all the man pages for all the architectures. The difference in disk space is negligible. Also link architecture-specific man pages to their own section while keeping their own namespace. PR: 212290 Reported by: mj@bsdops.com Approved by: ceri@, wosch@ MFC after: 4 weeks --- sbin/Makefile | 6 ++++++ share/man/man4/Makefile | 4 +--- share/man/man4/man4.aarch64/Makefile | 5 +++++ share/man/man4/man4.arm/Makefile | 5 +++++ share/man/man4/man4.i386/Makefile | 5 +++++ share/man/man4/man4.powerpc/Makefile | 5 +++++ share/man/man5/make.conf.5 | 2 +- usr.sbin/Makefile | 7 +++++++ usr.sbin/apm/Makefile | 4 ++++ 9 files changed, 39 insertions(+), 4 deletions(-) diff --git a/sbin/Makefile b/sbin/Makefile index 64840bae82bb..f53e2f037ebe 100644 --- a/sbin/Makefile +++ b/sbin/Makefile @@ -90,6 +90,12 @@ SUBDIR.${MK_ZFS}+= zfsbootcfg SUBDIR.${MK_TESTS}+= tests +# Add architecture-specific manpages +# to be included anyway +MAN= sconfig/sconfig.8 + +.include + .include SUBDIR_PARALLEL= diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 5051470edc71..9027fe7df841 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -895,9 +895,7 @@ _cgem.4= cgem.4 MLINKS+=cgem.4 if_cgem.4 .endif -.if empty(MAN_ARCH) -__arches= ${MACHINE} ${MACHINE_ARCH} ${MACHINE_CPUARCH} -.elif ${MAN_ARCH} == "all" +.if empty(MAN_ARCH) || ${MAN_ARCH} == "all" __arches= ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E} .else __arches= ${MAN_ARCH} diff --git a/share/man/man4/man4.aarch64/Makefile b/share/man/man4/man4.aarch64/Makefile index 6714a47011ef..ef5fcd84ccd4 100644 --- a/share/man/man4/man4.aarch64/Makefile +++ b/share/man/man4/man4.aarch64/Makefile @@ -17,6 +17,11 @@ MAN= \ rk_i2c.4 \ rk_pinctrl.4 \ +# Link files to the parent directory +.for _manpage in ${MAN} +MLINKS+=${_manpage} ../${_manpage} +.endfor + MANSUBDIR=/aarch64 .include diff --git a/share/man/man4/man4.arm/Makefile b/share/man/man4/man4.arm/Makefile index 0b3eec427934..2ac8dbb5fd81 100644 --- a/share/man/man4/man4.arm/Makefile +++ b/share/man/man4/man4.arm/Makefile @@ -18,6 +18,11 @@ MAN= \ MLINKS= imx_wdog.4 imxwdt.4 MLINKS+= mge.4 if_mge.4 +# Link files to the parent directory +.for _manpage in ${MAN} +MLINKS+=${_manpage} ../${_manpage} +.endfor + MANSUBDIR=/arm .include diff --git a/share/man/man4/man4.i386/Makefile b/share/man/man4/man4.i386/Makefile index a21b3cd6302b..e3d2e66ca78d 100644 --- a/share/man/man4/man4.i386/Makefile +++ b/share/man/man4/man4.i386/Makefile @@ -21,6 +21,11 @@ MLINKS= CPU_ELAN.4 CPU_SOEKRIS.4 MLINKS+=pae.4 PAE.4 MLINKS+=sbni.4 if_sbni.4 +# Link files to the parent directory +.for _manpage in ${MAN} +MLINKS+=${_manpage} ../${_manpage} +.endfor + MANSUBDIR=/i386 .include diff --git a/share/man/man4/man4.powerpc/Makefile b/share/man/man4/man4.powerpc/Makefile index 05c5d4012fe8..aa0e137fcedd 100644 --- a/share/man/man4/man4.powerpc/Makefile +++ b/share/man/man4/man4.powerpc/Makefile @@ -15,6 +15,11 @@ MAN= adb.4 \ snd_davbus.4 \ tsec.4 +# Link files to the parent directory +.for _manpage in ${MAN} +MLINKS+=${_manpage} ../${_manpage} +.endfor + MANSUBDIR=/powerpc .include diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index 5885d9476d71..b3623b29a950 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -385,7 +385,7 @@ for which section 4 man pages will be installed. The special value .Sq all installs all available architectures. -The default is the MACHINE and MACHINE_ARCH being built. +It is also the default value. .It Va MODULES_WITH_WORLD .Pq Vt bool Set to build modules with the system instead of the kernel. diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 6acef31cc23a..f19af2a5566d 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -213,6 +213,13 @@ SUBDIR.${MK_TESTS}+= tests .include +# Add architecture-specific manpages +# to be included anyway +MAN= apmd/apmd.8 \ + nvram/nvram.8 + +.include + SUBDIR_PARALLEL= .include diff --git a/usr.sbin/apm/Makefile b/usr.sbin/apm/Makefile index f52453c62522..27fa0c37d5cf 100644 --- a/usr.sbin/apm/Makefile +++ b/usr.sbin/apm/Makefile @@ -5,6 +5,10 @@ MAN= apm.8 MLINKS= apm.8 apmconf.8 MANSUBDIR= /${MACHINE_CPUARCH} +# Link files to the parent directory +MLINKS+= apm.8 ../apm.8 +MLINKS+= apmconf.8 ../apmconf.8 + PACKAGE=apm .include From owner-dev-commits-src-main@freebsd.org Wed Jun 30 12:56:12 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6781F664613; Wed, 30 Jun 2021 12:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFLv02T8Wz3pTZ; Wed, 30 Jun 2021 12:56:12 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 3E81A503E; Wed, 30 Jun 2021 12:56:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UCuCJt025348; Wed, 30 Jun 2021 12:56:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UCuC2C025347; Wed, 30 Jun 2021 12:56:12 GMT (envelope-from git) Date: Wed, 30 Jun 2021 12:56:12 GMT Message-Id: <202106301256.15UCuC2C025347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Houchard Subject: git: c1da17a86cdb - main - arm: Garbage collect _arm_memcpy/_arm_bzero. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cognet X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c1da17a86cdbb364f1c946b8346601e72643daf1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 12:56:12 -0000 The branch main has been updated by cognet: URL: https://cgit.FreeBSD.org/src/commit/?id=c1da17a86cdbb364f1c946b8346601e72643daf1 commit c1da17a86cdbb364f1c946b8346601e72643daf1 Author: Olivier Houchard AuthorDate: 2021-06-25 23:06:26 +0000 Commit: Olivier Houchard CommitDate: 2021-06-30 12:53:57 +0000 arm: Garbage collect _arm_memcpy/_arm_bzero. Remove any attempt to use _arm_memcpy and _arm_bzero. It was used by some xscale platforms to provide functions to use the DMA engine for big zeroing/copying work, but those platforms are long gone, and it's unlikely anything else will use those. --- sys/arm/arm/bcopyinout.S | 5 ----- sys/arm/arm/bcopyinout_xscale.S | 44 ----------------------------------------- sys/arm/arm/machdep.c | 5 ----- sys/arm/arm/support.S | 41 -------------------------------------- sys/arm/include/md_var.h | 10 ---------- 5 files changed, 105 deletions(-) diff --git a/sys/arm/arm/bcopyinout.S b/sys/arm/arm/bcopyinout.S index 2a9d48f989ea..dcdf8ed5af0c 100644 --- a/sys/arm/arm/bcopyinout.S +++ b/sys/arm/arm/bcopyinout.S @@ -41,11 +41,6 @@ #include #include -.L_arm_memcpy: - .word _C_LABEL(_arm_memcpy) -.L_min_memcpy_size: - .word _C_LABEL(_min_memcpy_size) - __FBSDID("$FreeBSD$"); #include diff --git a/sys/arm/arm/bcopyinout_xscale.S b/sys/arm/arm/bcopyinout_xscale.S index e592b901201f..4849ab9e794a 100644 --- a/sys/arm/arm/bcopyinout_xscale.S +++ b/sys/arm/arm/bcopyinout_xscale.S @@ -67,28 +67,6 @@ ENTRY(copyin) movcs r0, #EFAULT RETc(cs) - ldr r3, .L_arm_memcpy - ldr r3, [r3] - cmp r3, #0 - beq .Lnormal - ldr r3, .L_min_memcpy_size - ldr r3, [r3] - cmp r2, r3 - blt .Lnormal - stmfd sp!, {r0-r2, r4, lr} - mov r3, r0 - mov r0, r1 - mov r1, r3 - mov r3, #2 /* SRC_IS_USER */ - ldr r4, .L_arm_memcpy - mov lr, pc - ldr pc, [r4] - cmp r0, #0 - ldmfd sp!, {r0-r2, r4, lr} - moveq r0, #0 - RETeq - -.Lnormal: stmfd sp!, {r10-r11, lr} GET_PCB(r10) @@ -452,28 +430,6 @@ ENTRY(copyout) movcs r0, #EFAULT RETc(cs) - ldr r3, .L_arm_memcpy - ldr r3, [r3] - cmp r3, #0 - beq .Lnormale - ldr r3, .L_min_memcpy_size - ldr r3, [r3] - cmp r2, r3 - blt .Lnormale - stmfd sp!, {r0-r2, r4, lr} - mov r3, r0 - mov r0, r1 - mov r1, r3 - mov r3, #1 /* DST_IS_USER */ - ldr r4, .L_arm_memcpy - mov lr, pc - ldr pc, [r4] - cmp r0, #0 - ldmfd sp!, {r0-r2, r4, lr} - moveq r0, #0 - RETeq - -.Lnormale: stmfd sp!, {r10-r11, lr} GET_PCB(r10) diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index 3d966527599d..4f26c6e9ebf9 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -122,11 +122,6 @@ vm_offset_t vector_page; /* The address at which the kernel was loaded. Set early in initarm(). */ vm_paddr_t arm_physmem_kernaddr; -int (*_arm_memcpy)(void *, void *, int, int) = NULL; -int (*_arm_bzero)(void *, int, int) = NULL; -int _min_memcpy_size = 0; -int _min_bzero_size = 0; - extern int *end; #ifdef FDT diff --git a/sys/arm/arm/support.S b/sys/arm/arm/support.S index a3ee3c3b93ba..7a39c283aed1 100644 --- a/sys/arm/arm/support.S +++ b/sys/arm/arm/support.S @@ -93,14 +93,6 @@ __FBSDID("$FreeBSD$"); .syntax unified -.L_arm_memcpy: - .word _C_LABEL(_arm_memcpy) -.L_arm_bzero: - .word _C_LABEL(_arm_bzero) -.L_min_memcpy_size: - .word _C_LABEL(_min_memcpy_size) -.L_min_bzero_size: - .word _C_LABEL(_min_bzero_size) /* * memset: Sets a block of memory to the specified value * @@ -114,22 +106,6 @@ __FBSDID("$FreeBSD$"); */ /* LINTSTUB: Func: void bzero(void *, size_t) */ ENTRY(bzero) - ldr r3, .L_arm_bzero - ldr r3, [r3] - cmp r3, #0 - beq .Lnormal0 - ldr r2, .L_min_bzero_size - ldr r2, [r2] - cmp r1, r2 - blt .Lnormal0 - stmfd sp!, {r0, r1, lr} - mov r2, #0 - mov lr, pc - mov pc, r3 - cmp r0, #0 - ldmfd sp!, {r0, r1, lr} - RETeq -.Lnormal0: mov r3, #0x00 b do_memset END(bzero) @@ -779,23 +755,6 @@ ENTRY(memcpy) bhi .Lnormal #endif #endif - ldr r3, .L_arm_memcpy - ldr r3, [r3] - cmp r3, #0 - beq .Lnormal - ldr r3, .L_min_memcpy_size - ldr r3, [r3] - cmp r2, r3 - blt .Lnormal - stmfd sp!, {r0-r2, r4, lr} - mov r3, #0 - ldr r4, .L_arm_memcpy - mov lr, pc - ldr pc, [r4] - cmp r0, #0 - ldmfd sp!, {r0-r2, r4, lr} - RETeq -.Lnormal: mov r3, r0 /* We must not clobber r0 */ /* Word-align the destination buffer */ diff --git a/sys/arm/include/md_var.h b/sys/arm/include/md_var.h index d60992f104e1..19468bd30e02 100644 --- a/sys/arm/include/md_var.h +++ b/sys/arm/include/md_var.h @@ -42,16 +42,6 @@ extern u_long elf_hwcap; extern u_long elf_hwcap2; extern vm_paddr_t arm_physmem_kernaddr; -extern int (*_arm_memcpy)(void *, void *, int, int); -extern int (*_arm_bzero)(void *, int, int); - -extern int _min_memcpy_size; -extern int _min_bzero_size; - -#define DST_IS_USER 0x1 -#define SRC_IS_USER 0x2 -#define IS_PHYSICAL 0x4 - enum cpu_class { CPU_CLASS_NONE, CPU_CLASS_CORTEXA, From owner-dev-commits-src-main@freebsd.org Wed Jun 30 12:56:13 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9794E66470C; Wed, 30 Jun 2021 12:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFLv13T5zz3pgc; Wed, 30 Jun 2021 12:56:13 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 5F53D52A7; Wed, 30 Jun 2021 12:56:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UCuDSU025372; Wed, 30 Jun 2021 12:56:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UCuDeQ025371; Wed, 30 Jun 2021 12:56:13 GMT (envelope-from git) Date: Wed, 30 Jun 2021 12:56:13 GMT Message-Id: <202106301256.15UCuDeQ025371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Houchard Subject: git: 712c060c94fd - main - arm64: Make sure COMPAT_FREEBSD32 handles thumb entry point. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cognet X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 712c060c94fd447c91b0e6218c12a431206b487a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 12:56:13 -0000 The branch main has been updated by cognet: URL: https://cgit.FreeBSD.org/src/commit/?id=712c060c94fd447c91b0e6218c12a431206b487a commit 712c060c94fd447c91b0e6218c12a431206b487a Author: Olivier Houchard AuthorDate: 2021-06-30 12:50:47 +0000 Commit: Olivier Houchard CommitDate: 2021-06-30 12:55:18 +0000 arm64: Make sure COMPAT_FREEBSD32 handles thumb entry point. If the entry point for the binary executed is a thumb 2 entry point, make sure we set the PSR_T bit, or the CPU will interpret it as arm32 code and bad things will happen. PR: 256899 MFC after: 1 week --- sys/arm64/arm64/elf32_machdep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index 7792374f865b..5321e12d74e9 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -258,6 +258,8 @@ freebsd32_setregs(struct thread *td, struct image_params *imgp, tf->tf_x[14] = imgp->entry_addr; tf->tf_elr = imgp->entry_addr; tf->tf_spsr = PSR_M_32; + if ((uint32_t)imgp->entry_addr & 1) + tf->tf_spsr |= PSR_T; #ifdef VFP vfp_reset_state(td, pcb); From owner-dev-commits-src-main@freebsd.org Wed Jun 30 17:09:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F505648386; Wed, 30 Jun 2021 17:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFSW519Cqz4v6G; Wed, 30 Jun 2021 17:09:21 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0C9B3107F3; Wed, 30 Jun 2021 17:09:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UH9KKY058056; Wed, 30 Jun 2021 17:09:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UH9K9e058055; Wed, 30 Jun 2021 17:09:20 GMT (envelope-from git) Date: Wed, 30 Jun 2021 17:09:20 GMT Message-Id: <202106301709.15UH9K9e058055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 91604330e607 - main - sysbuild: Also copy /var/db/zoneinfo 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/main X-Git-Reftype: branch X-Git-Commit: 91604330e6073e49805849efdb34e7fdfdbe845b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 17:09:21 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=91604330e6073e49805849efdb34e7fdfdbe845b commit 91604330e6073e49805849efdb34e7fdfdbe845b Author: Jose Luis Duran AuthorDate: 2021-06-20 02:19:00 +0000 Commit: Warner Losh CommitDate: 2021-06-30 17:08:26 +0000 sysbuild: Also copy /var/db/zoneinfo Per tzsetup(8), /etc/localtime and /var/db/zoneinfo go hand in hand. Remove extra white spaces as well. Reviewed by: imp@, phk@ (informal no objection email) Pull Request: https://github.com/freebsd/freebsd-src/pull/486 --- tools/tools/sysbuild/sysbuild.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/tools/sysbuild/sysbuild.sh b/tools/tools/sysbuild/sysbuild.sh index 2ad19b75659f..3b4502014642 100644 --- a/tools/tools/sysbuild/sysbuild.sh +++ b/tools/tools/sysbuild/sysbuild.sh @@ -243,7 +243,7 @@ ports_recurse() ( ports_build() ( - ports_recurse . $PORTS_WE_WANT + ports_recurse . $PORTS_WE_WANT if [ "x${PKG_DIR}" != "x" ] ; then mkdir -p ${PKG_DIR} @@ -262,7 +262,7 @@ ports_build() ( ( cd $p - ports_make clean all install + ports_make clean all install ) > _.$b 2>&1 < /dev/null continue fi @@ -340,7 +340,7 @@ ports_prefetch() ( ) > /${ldir}/_.prefetch.$b 2>&1 done echo "Done" >> /${ldir}/_.prefetch - ) + ) ) ####################################################################### @@ -442,7 +442,7 @@ if $do_prefetch ; then mkdir -p /tmp/sysbuild/ports ln -s ${distfile_cache} /tmp/sysbuild/ports/distfiles export PORTS_OPTS=CD_MOUNTPTS=/tmp/sysbuild - ports_prefetch /tmp + ports_prefetch /tmp exit 0 fi @@ -602,14 +602,18 @@ fi if [ -f /etc/localtime ] ; then log_it copy localtime cp /etc/localtime ${SBMNT}/etc + if [ -f /var/db/zoneinfo ] ; then + log_it copy zoneinfo + cp /var/db/zoneinfo ${SBMNT}/var/db + fi fi log_it ldconfig in chroot chroot ${SBMNT} sh /etc/rc.d/ldconfig start log_it before_ports -( - before_ports +( + before_ports ) log_it fixing fstab @@ -623,14 +627,14 @@ cp /tmp/_sb_log ${SBMNT}/tmp b=`basename $0` if [ "x$c_arg" != "x" ] ; then cp $c_arg ${SBMNT}/root - chroot ${SBMNT} sh /root/$0 -c /root/`basename $c_arg` $use_pkg chroot_script + chroot ${SBMNT} sh /root/$0 -c /root/`basename $c_arg` $use_pkg chroot_script else chroot ${SBMNT} sh /root/$0 $use_pkg chroot_script fi cp ${SBMNT}/tmp/_sb_log /tmp log_it create all mountpoints -grep -v '^[ ]*#' ${SBMNT}/etc/fstab | +grep -v '^[ ]*#' ${SBMNT}/etc/fstab | while read a b c do mkdir -p ${SBMNT}/$b From owner-dev-commits-src-main@freebsd.org Wed Jun 30 17:09:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6542F648132; Wed, 30 Jun 2021 17:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFSW61lB1z4v6J; Wed, 30 Jun 2021 17:09:22 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 1B15610CC2; Wed, 30 Jun 2021 17:09:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UH9Mai058080; Wed, 30 Jun 2021 17:09:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UH9MOE058079; Wed, 30 Jun 2021 17:09:22 GMT (envelope-from git) Date: Wed, 30 Jun 2021 17:09:22 GMT Message-Id: <202106301709.15UH9MOE058079@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6ce785c50bfa - main - bsdinstall: Also copy /var/db/zoneinfo 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/main X-Git-Reftype: branch X-Git-Commit: 6ce785c50bfacf4fc8f7529e1bf6e2966dc5fac1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 17:09:22 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6ce785c50bfacf4fc8f7529e1bf6e2966dc5fac1 commit 6ce785c50bfacf4fc8f7529e1bf6e2966dc5fac1 Author: Jose Luis Duran AuthorDate: 2021-06-20 02:22:48 +0000 Commit: Warner Losh CommitDate: 2021-06-30 17:08:26 +0000 bsdinstall: Also copy /var/db/zoneinfo Per tzsetup(8), /etc/localtime and /var/db/zoneinfo go hand in hand. Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/486 --- usr.sbin/bsdinstall/scripts/jail | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index d9b5c8eb3cb4..3110f744207c 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -137,6 +137,7 @@ trap error SIGINT # SIGINT is bad again bsdinstall config || error "Failed to save config" cp /etc/resolv.conf $1/etc cp /etc/localtime $1/etc +cp /var/db/zoneinfo $1/var/db # Run post-install script if [ -f $TMPDIR/bsdinstall-installscript-ab ]; then From owner-dev-commits-src-main@freebsd.org Wed Jun 30 17:20:46 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7418B667E6A; Wed, 30 Jun 2021 17:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFSmG2mtLz3Bxg; Wed, 30 Jun 2021 17:20:46 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 476BC10B51; Wed, 30 Jun 2021 17:20:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UHKkoG079378; Wed, 30 Jun 2021 17:20:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UHKkUQ079377; Wed, 30 Jun 2021 17:20:46 GMT (envelope-from git) Date: Wed, 30 Jun 2021 17:20:46 GMT Message-Id: <202106301720.15UHKkUQ079377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3f197b101f71 - main - release: Remove C-like string comparison operator 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/main X-Git-Reftype: branch X-Git-Commit: 3f197b101f71ee4f4949c53bf330f61b43749ce9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 17:20:46 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3f197b101f71ee4f4949c53bf330f61b43749ce9 commit 3f197b101f71ee4f4949c53bf330f61b43749ce9 Author: Jose Luis Duran AuthorDate: 2021-06-20 00:00:19 +0000 Commit: Warner Losh CommitDate: 2021-06-30 17:13:51 +0000 release: Remove C-like string comparison operator Per [(1), i.e. test(1), the string comparison operator should be `=`, not `==` in sh(1) scripts. No functional change. FreeBSD's test accepts `==` as an alias for `=` for compatibility with gnu test's `==` extension. Reviewed by: imp@, gjb@ Pull Request: https://github.com/freebsd/freebsd-src/pull/485 --- release/tools/arm.subr | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/release/tools/arm.subr b/release/tools/arm.subr index 811d6ddb402d..89b52077e836 100644 --- a/release/tools/arm.subr +++ b/release/tools/arm.subr @@ -65,13 +65,13 @@ umount_loop() { arm_create_disk() { # Create the target raw file and temporary work directory. chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev} - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then chroot ${CHROOTDIR} gpart add -t efi -l efi -a 512k -s ${FAT_SIZE} ${mddev} chroot ${CHROOTDIR} newfs_msdos -L efi -F ${FAT_TYPE} /dev/${mddev}p1 chroot ${CHROOTDIR} gpart add -t freebsd-ufs -l rootfs -a 64k ${mddev} chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}p2 fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 @@ -169,10 +169,10 @@ arm_setup_minimal_loader() { } arm_install_base() { - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then chroot ${CHROOTDIR} mount /dev/${mddev}p2 ${DESTDIR} fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} fi _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) @@ -196,13 +196,13 @@ arm_install_base() { echo '# Custom /etc/fstab for FreeBSD embedded images' \ > ${CHROOTDIR}/${DESTDIR}/etc/fstab - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then echo "/dev/ufs/rootfs / ufs rw 1 1" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/EFI /boot/efi msdosfs rw,noatime 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then echo "/dev/ufs/rootfs / ufs rw 1 1" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ @@ -232,11 +232,11 @@ arm_install_boot() { FATMOUNT="${DESTDIR%${KERNEL}}/fat" UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then dospart="/dev/${mddev}p1" ufspart="/dev/${mddev}p2" fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then dospart="/dev/${mddev}s1" ufspart="/dev/${mddev}s2a" fi @@ -244,7 +244,7 @@ arm_install_boot() { chroot ${CHROOTDIR} mount_msdosfs ${dospart} ${FATMOUNT} chroot ${CHROOTDIR} mount ${ufspart} ${UFSMOUNT} - if [ "${EMBEDDED_TARGET}" == "arm" ]; then + if [ "${EMBEDDED_TARGET}" = "arm" ]; then chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ ${FATMOUNT}/ubldr.bin fi From owner-dev-commits-src-main@freebsd.org Wed Jun 30 17:59:47 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FB68649002; Wed, 30 Jun 2021 17:59:47 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.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 "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFTdH2v8tz3JcY; Wed, 30 Jun 2021 17:59:47 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1625075987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b+QamJfr0Fc4bKSp9o0jHh7BaUb/z72LkNinusfxpVQ=; b=x7/bDVzH1GHgK17yNzYJl/IDFZLu4MVvQxm/uRzSFy26uqm7caGZOMilMGvWq2Nbv5NntY txeKymGiEaFZxSkzTIViwVmwErGR6pfd/ymg+dWU5zZh5a2wKyekzOG3YCGcF/CyR8RCoS F21ZBYP2+GxMkY4OccfeDvDT1DWEl7IGSueIb9Pu+smt+3etFY4u6vmskoGIhXC06wJleb 44ZIaoo84pxPkRZotg7wgRyTgS1SPXz9jI+01Zoo+YsPBAOOz7QxgVhTkIgpCAdynqtxAe qKA7xT9q5gqBnTiJn6BLMUnuMpiDB9Pi8QkzZrOVXygJp5OIPlumGbUvmwfY0g== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2927A5F79; Wed, 30 Jun 2021 17:59:47 +0000 (UTC) Date: Wed, 30 Jun 2021 17:59:47 +0000 From: Alexey Dokuchaev To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3f197b101f71 - main - release: Remove C-like string comparison operator Message-ID: References: <202106301720.15UHKkUQ079377@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202106301720.15UHKkUQ079377@gitrepo.freebsd.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1625075987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b+QamJfr0Fc4bKSp9o0jHh7BaUb/z72LkNinusfxpVQ=; b=uzaVvsrnlCqHeGqQx9jsPf/FnmLosXywWOa5ud3ZadVAuIjdy62vF+nZPnApZGLAmUnQVh 3yO/tmLVZrtIv/ANQtA6JtzPM03e1pKQQCNBv6LEW9wKnNelO8o11kOgH9EXJBYFFtW6WY uVhtBhjoqfgEjM0qJDd86M4Q92TejE85nSYqvEuUOj/06Fv1arEShp2fJqVJNfc/6HdNz9 g6Dy6JpUO3hku6k9NWESlOn4dgN9vZu52uNtKw1i/4eESyDQQHsymxUsmIErvgaw3sAhCb 90tkzOt9aJEnXZ6iLmTOzsISxbfbeG/UQ4JxH7XkMI/VR/Z4YfvHeZIJu9DG8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1625075987; a=rsa-sha256; cv=none; b=n3CHS6Hd/qrg2bCFd0fakPfl0epWPivOWI/fGKSqikedEquaN1888XBxtbBE14N7CkDjT5 +e53HEAfx78ZMFWtAnY/VkzvmOKeG8Ss0yODm5Q2LJqXgeNb6yZA0Si8gpH5guIJYDcw22 VyI7cswMKSeL2Fcj9B3Lgg3GNlvd/cRKVYB41CDo85Wv/i1qubgZeZ87BZr9k9nAI4qrHY j4DNb/X0sDlg60N1C1ExQEvTqJfLtf73Eq2gXnc3fOWNOkM4rwe919VZiCKXe/R/Ct7OO2 f0SVeLUWmibV8PSSUeZwM2OncROBaahWeYS39HMFciqVMe4NswvSMceAXBKBAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 17:59:47 -0000 On Wed, Jun 30, 2021 at 05:20:46PM +0000, Warner Losh wrote: > commit 3f197b101f71ee4f4949c53bf330f61b43749ce9 > > release: Remove C-like string comparison operator > > Per [(1), i.e. test(1), the string comparison operator should be `=`, > not `==` in sh(1) scripts. > > No functional change. FreeBSD's test accepts `==` as an alias for `=` > for compatibility with gnu test's `==` extension. Nice, thanks, but why didn't you remove those needless quotes around static stings, e.g. "GPT" -> GPT? ./danfe From owner-dev-commits-src-main@freebsd.org Wed Jun 30 18:15:32 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E62126493BB; Wed, 30 Jun 2021 18:15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFTzS5zZZz3Mfw; Wed, 30 Jun 2021 18:15:32 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 B4CB711B3D; Wed, 30 Jun 2021 18:15:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UIFWeh051026; Wed, 30 Jun 2021 18:15:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UIFWDU051025; Wed, 30 Jun 2021 18:15:32 GMT (envelope-from git) Date: Wed, 30 Jun 2021 18:15:32 GMT Message-Id: <202106301815.15UIFWDU051025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 1a8bcf30f97e - main - amd64: a simplication to pmap_remove_{all, write} MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a8bcf30f97e6153def2af781db2fe54f5c0d106 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 18:15:33 -0000 The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=1a8bcf30f97e6153def2af781db2fe54f5c0d106 commit 1a8bcf30f97e6153def2af781db2fe54f5c0d106 Author: Alan Cox AuthorDate: 2021-06-30 05:59:21 +0000 Commit: Alan Cox CommitDate: 2021-06-30 18:12:25 +0000 amd64: a simplication to pmap_remove_{all,write} Eliminate some unnecessary unlocking and relocking when we have to retry the operation to avoid deadlock. (All of the other pmap functions that iterate over a PV list already implemented retries without these same unlocking and relocking operations.) Reviewed by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30951 --- sys/amd64/amd64/pmap.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index a4046cc1f687..ea017b8a61a8 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -6307,8 +6307,8 @@ pmap_remove_all(vm_page_t m) lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : pa_to_pvh(VM_PAGE_TO_PHYS(m)); -retry: rw_wlock(lock); +retry: while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -6317,7 +6317,6 @@ retry: PMAP_LOCK(pmap); rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { - rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; } @@ -6336,7 +6335,6 @@ retry: PMAP_LOCK(pmap); rw_wlock(lock); if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { - rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; } @@ -8460,8 +8458,8 @@ pmap_remove_write(vm_page_t m) lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : pa_to_pvh(VM_PAGE_TO_PHYS(m)); -retry_pv_loop: rw_wlock(lock); +retry_pv_loop: TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -8471,7 +8469,6 @@ retry_pv_loop: rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); goto retry_pv_loop; } } @@ -8496,7 +8493,6 @@ retry_pv_loop: if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); goto retry_pv_loop; } } From owner-dev-commits-src-main@freebsd.org Wed Jun 30 18:20:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 849516497A0 for ; Wed, 30 Jun 2021 18:20:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFV585NPTz3MbM for ; Wed, 30 Jun 2021 18:20:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x830.google.com with SMTP id h3so2159549qto.4 for ; Wed, 30 Jun 2021 11:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VRAyvI2zrUF0l9CQ72dPQjQ8fxz7QaJlEDtDxyGEQ9E=; b=szoRE6GIwL+DJkuRsHb30I+oraQlDTIYhLdsW9EUNYvWv8rUsy6sEYSfolKd1U6xQw XnfaQcLzMejAmJwX99BDKk0kGQ6gkFRReQWzus6DQlO5nB/W5jBABFc1nz4A3I6AtEdc Mw8FiqNh5qkn/cJL7b8adhr+MPoyCg4dOc5ZJfele21qPkCTmU224oCIFrdWfyx5h1iY umwoMHcnuTpYVINtxF/zCFkkD8Yp+od/Gz8FJX6yzSupgq5zxCeQnDaWJF1FcJYVg8QP HByAI1iM9whMWmYm/j39lkEhEU+fwcXB9x8gK0ActqvRcPyK9Sn0gkcYJweEbadcVgGa 5i/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VRAyvI2zrUF0l9CQ72dPQjQ8fxz7QaJlEDtDxyGEQ9E=; b=KR3NSy/YUiOytdfsBdPVXbFmgiGYgk4xrOhXqftDnQRcLaq4u0jVw0prI+32MAoZP9 RbYvWF/snYMMuC6rGe4TI56uPazYl4EnEYeVRbrExrPZoep1o2dynLP9BOyHybYbuMQq M/SunyNnH64fPFNQFilalpYZ7STxCg10lb0uyFF9CE8ToBcXBMSIkr5mLoNRcT2/u0bp IUVkKQ57TM+4ye5HcFVPFi730Y7lWadbr+VieLoeSo36wyTgX5iqD9eJ59bHFdAuqv3t mI5IOLGuPTRT5kDjOC2K3gyGI/Pr5k7f9doM2R2lxOIzq4t1gEDwEU385Vw1cNDanz23 +xiw== X-Gm-Message-State: AOAM532DLs3D7siJR78c53VyVfP/nQd6kbh6pBO7EqzuoSb1PfUxhsDN iGEOqCZs2MYADOM2zcKwQbvT3szSPnENx9CwciHVug== X-Google-Smtp-Source: ABdhPJwlYfYskREbtAyT9Hh9aMH2LOT7HlN5TqXClzjHSP7b34ZsKJcrerqksnYzFiirlKhmFL/gTvfmKI66NPYo3p4= X-Received: by 2002:a05:622a:164d:: with SMTP id y13mr33005191qtj.244.1625077227725; Wed, 30 Jun 2021 11:20:27 -0700 (PDT) MIME-Version: 1.0 References: <202106301720.15UHKkUQ079377@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 30 Jun 2021 12:20:17 -0600 Message-ID: Subject: Re: git: 3f197b101f71 - main - release: Remove C-like string comparison operator To: Alexey Dokuchaev Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4GFV585NPTz3MbM X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=szoRE6GI; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::830) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.95 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.95)[-0.945]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::830:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::830:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::830:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[dev-commits-src-main]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 18:20:29 -0000 On Wed, Jun 30, 2021 at 11:59 AM Alexey Dokuchaev wrote: > On Wed, Jun 30, 2021 at 05:20:46PM +0000, Warner Losh wrote: > > commit 3f197b101f71ee4f4949c53bf330f61b43749ce9 > > > > release: Remove C-like string comparison operator > > > > Per [(1), i.e. test(1), the string comparison operator should be `=`, > > not `==` in sh(1) scripts. > > > > No functional change. FreeBSD's test accepts `==` as an alias for `=` > > for compatibility with gnu test's `==` extension. > > Nice, thanks, but why didn't you remove those needless quotes around > static stings, e.g. "GPT" -> GPT? > Sure, that could also be done. However, I'll leave it to the re@ team. It works either way, and I've seen both styles in the tree (and outside it as well). Warner From owner-dev-commits-src-main@freebsd.org Wed Jun 30 19:49:12 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6ED5D64A996; Wed, 30 Jun 2021 19:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFX3X2GwJz3nWb; Wed, 30 Jun 2021 19:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 3433512AC5; Wed, 30 Jun 2021 19:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UJnCTB070928; Wed, 30 Jun 2021 19:49:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UJnCcF070927; Wed, 30 Jun 2021 19:49:12 GMT (envelope-from git) Date: Wed, 30 Jun 2021 19:49:12 GMT Message-Id: <202106301949.15UJnCcF070927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 2129c8f6771a - main - hwpmc_arm64.c: fix return style MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2129c8f6771a9a33253a1fe2d4e9d3494bc77f10 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 19:49:12 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2129c8f6771a9a33253a1fe2d4e9d3494bc77f10 commit 2129c8f6771a9a33253a1fe2d4e9d3494bc77f10 Author: Mitchell Horne AuthorDate: 2021-06-14 15:21:08 +0000 Commit: Mitchell Horne CommitDate: 2021-06-30 19:26:07 +0000 hwpmc_arm64.c: fix return style In accordance to style(9). MFC after: 3 days Sponsored by: The FreeBSD Foundation --- sys/dev/hwpmc/hwpmc_arm64.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index 050f861a74fe..ba98eaefcc9a 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -188,7 +188,7 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, PMCDBG2(MDP, ALL, 2, "arm64-allocate ri=%d -> config=0x%x", ri, config); - return 0; + return (0); } @@ -231,7 +231,7 @@ arm64_read_pmc(int cpu, int ri, pmc_value_t *v) else *v = tmp; - return 0; + return (0); } static int @@ -254,7 +254,7 @@ arm64_write_pmc(int cpu, int ri, pmc_value_t v) pm->pm_pcpu_state[cpu].pps_overflowcnt = v >> 32; arm64_pmcn_write(ri, v); - return 0; + return (0); } static int @@ -277,7 +277,7 @@ arm64_config_pmc(int cpu, int ri, struct pmc *pm) phw->phw_pmc = pm; - return 0; + return (0); } static int @@ -305,7 +305,7 @@ arm64_start_pmc(int cpu, int ri) arm64_interrupt_enable(ri); arm64_counter_enable(ri); - return 0; + return (0); } static int @@ -323,7 +323,7 @@ arm64_stop_pmc(int cpu, int ri) arm64_counter_disable(ri); arm64_interrupt_disable(ri); - return 0; + return (0); } static int @@ -340,7 +340,7 @@ arm64_release_pmc(int cpu, int ri, struct pmc *pmc) KASSERT(phw->phw_pmc == NULL, ("[arm64,%d] PHW pmc %p non-NULL", __LINE__, phw->phw_pmc)); - return 0; + return (0); } static int From owner-dev-commits-src-main@freebsd.org Wed Jun 30 19:49:14 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18A0E64AB45; Wed, 30 Jun 2021 19:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFX3Y41bLz3nFQ; Wed, 30 Jun 2021 19:49:13 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 5984A12CFA; Wed, 30 Jun 2021 19:49:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UJnDVd070958; Wed, 30 Jun 2021 19:49:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UJnD5Y070956; Wed, 30 Jun 2021 19:49:13 GMT (envelope-from git) Date: Wed, 30 Jun 2021 19:49:13 GMT Message-Id: <202106301949.15UJnD5Y070956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 5867cccdc49d - main - hwpmc_arm64: fill kern.hwpmc.cpuid MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5867cccdc49df3e7eb3147d6516b488dd8384afe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 19:49:14 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5867cccdc49df3e7eb3147d6516b488dd8384afe commit 5867cccdc49df3e7eb3147d6516b488dd8384afe Author: Mitchell Horne AuthorDate: 2021-04-01 13:19:43 +0000 Commit: Mitchell Horne CommitDate: 2021-06-30 19:26:07 +0000 hwpmc_arm64: fill kern.hwpmc.cpuid This will be used to detect supported pmu events. The expected format is the MIDR register with the revision and variant fields masked. See also: lib/libpmc/pmu-events/arch/arm64/mapfile.csv. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30601 --- sys/dev/hwpmc/hwpmc_arm64.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index ba98eaefcc9a..be26605bad51 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -505,6 +505,7 @@ pmc_arm64_initialize() struct pmc_classdep *pcd; int idcode, impcode; int reg; + uint64_t midr; reg = arm64_pmcr_read(); arm64_npmcs = (reg & PMCR_N_MASK) >> PMCR_N_SHIFT; @@ -513,6 +514,18 @@ pmc_arm64_initialize() PMCDBG1(MDP, INI, 1, "arm64-init npmcs=%d", arm64_npmcs); + /* + * Write the CPU model to kern.hwpmc.cpuid. + * + * We zero the variant and revision fields. + * + * TODO: how to handle differences between cores due to big.LITTLE? + * For now, just use MIDR from CPU 0. + */ + midr = (uint64_t)(pcpu_find(0)->pc_midr); + midr &= ~(CPU_VAR_MASK | CPU_REV_MASK); + snprintf(pmc_cpuid, sizeof(pmc_cpuid), "0x%016lx", midr); + /* * Allocate space for pointers to PMC HW descriptors and for * the MDEP structure used by MI code. From owner-dev-commits-src-main@freebsd.org Wed Jun 30 19:49:15 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C2EE64AC0A; Wed, 30 Jun 2021 19:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFX3Z6rwdz3nPB; Wed, 30 Jun 2021 19:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 7C9FD12B69; Wed, 30 Jun 2021 19:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UJnE5A070983; Wed, 30 Jun 2021 19:49:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UJnEGt070982; Wed, 30 Jun 2021 19:49:14 GMT (envelope-from git) Date: Wed, 30 Jun 2021 19:49:14 GMT Message-Id: <202106301949.15UJnEGt070982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 8cc3815f02be - main - hwpmc_arm64: accept raw event codes for PMC_OP_PMCALLOCATE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8cc3815f02be9fa2a96e47713ad989e6d787e12a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 19:49:15 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8cc3815f02be9fa2a96e47713ad989e6d787e12a commit 8cc3815f02be9fa2a96e47713ad989e6d787e12a Author: Mitchell Horne AuthorDate: 2021-05-19 16:11:33 +0000 Commit: Mitchell Horne CommitDate: 2021-06-30 19:47:09 +0000 hwpmc_arm64: accept raw event codes for PMC_OP_PMCALLOCATE Make it possible to specify event codes without an offset of PMC_EV_ARMV8_FIRST, by setting a machine-dependent flag. This is required to make use of event definitions from pmu-events. Reviewed by: ray (slightly earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30602 --- sys/arm64/include/pmc_mdep.h | 5 ++++- sys/dev/hwpmc/hwpmc_arm64.c | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/sys/arm64/include/pmc_mdep.h b/sys/arm64/include/pmc_mdep.h index bcf08a7f9551..f4f31aba6305 100644 --- a/sys/arm64/include/pmc_mdep.h +++ b/sys/arm64/include/pmc_mdep.h @@ -38,7 +38,10 @@ #include union pmc_md_op_pmcallocate { - uint64_t __pad[4]; + uint32_t pm_md_flags; +#define PM_MD_RAW_EVENT 0x1 + uint32_t __pad32; + uint64_t __pad[3]; }; /* Logging */ diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index be26605bad51..6b98fb46e7f1 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -181,11 +181,14 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, } pe = a->pm_ev; - config = (uint32_t)pe - PMC_EV_ARMV8_FIRST; - if (config > (PMC_EV_ARMV8_LAST - PMC_EV_ARMV8_FIRST)) - return (EINVAL); + /* Adjust the config value if needed. */ + config = (uint32_t)pe; + if ((a->pm_md.pm_md_flags & PM_MD_RAW_EVENT) == 0) { + config -= PMC_EV_ARMV8_FIRST; + if (config > (PMC_EV_ARMV8_LAST - PMC_EV_ARMV8_FIRST)) + return (EINVAL); + } pm->pm_md.pm_arm64.pm_arm64_evsel = config; - PMCDBG2(MDP, ALL, 2, "arm64-allocate ri=%d -> config=0x%x", ri, config); return (0); From owner-dev-commits-src-main@freebsd.org Wed Jun 30 19:49:16 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A4E464AB5A; Wed, 30 Jun 2021 19:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFX3c0Crlz3nZY; Wed, 30 Jun 2021 19:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 9EF2D12E33; Wed, 30 Jun 2021 19:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UJnF5J071009; Wed, 30 Jun 2021 19:49:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UJnFg3071008; Wed, 30 Jun 2021 19:49:15 GMT (envelope-from git) Date: Wed, 30 Jun 2021 19:49:15 GMT Message-Id: <202106301949.15UJnFg3071008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 28dd6730a5d6 - main - libpmc: enable pmu_utils on arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28dd6730a5d6bc73aca4c015c0ff875a9def25ac Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 19:49:16 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=28dd6730a5d6bc73aca4c015c0ff875a9def25ac commit 28dd6730a5d6bc73aca4c015c0ff875a9def25ac Author: Mitchell Horne AuthorDate: 2021-05-27 20:02:04 +0000 Commit: Mitchell Horne CommitDate: 2021-06-30 19:47:18 +0000 libpmc: enable pmu_utils on arm64 This allows supported libpmc to query/select from the pmu-events table, which may have a more complete set of events than what we define manually. A future update to these definitions should greatly improve this support. The alias table is empty for now, until this future import is complete. Add the Foundation's copyright for recent work on this file. Reviewed by: ray (slightly earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30603 --- lib/libpmc/libpmc_pmu_util.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index 81320a3dc954..d33abdb50acc 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -2,6 +2,10 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2018, Matthew Macy + * Copyright (c) 2021, The FreeBSD Foundation + * + * Portions of this software were developed by Mitchell Horne + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -139,6 +143,24 @@ pmu_alias_get(const char *name) return (name); } +#elif defined(__aarch64__) + +static struct pmu_alias pmu_armv8_alias_table[] = { + {NULL, NULL}, +}; + +static const char * +pmu_alias_get(const char *name) +{ + struct pmu_alias *pa; + + for (pa = pmu_armv8_alias_table; pa->pa_alias != NULL; pa++) + if (strcasecmp(name, pa->pa_alias) == 0) + return (pa->pa_name); + + return (name); +} + #else static const char * @@ -549,6 +571,28 @@ pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) return (pmc_pmu_amd_pmcallocate(event_name, pm, &ped)); } +#elif defined(__aarch64__) + +int +pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) +{ + const struct pmu_event *pe; + int idx = -1; + + event_name = pmu_alias_get(event_name); + if ((pe = pmu_event_get(NULL, event_name, &idx)) == NULL) + return (ENOENT); + if (pe->event == NULL) + return (ENOENT); + + assert(idx >= 0); + pm->pm_md.pm_md_flags |= PM_MD_RAW_EVENT; + pm->pm_class = PMC_CLASS_ARMV8; + pm->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); + + return (0); +} + #else int From owner-dev-commits-src-main@freebsd.org Wed Jun 30 20:09:59 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AF3064BBFE; Wed, 30 Jun 2021 20:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFXWW2cVkz3qtq; Wed, 30 Jun 2021 20:09:59 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 420D813293; Wed, 30 Jun 2021 20:09:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UK9xp1098815; Wed, 30 Jun 2021 20:09:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UK9xb6098814; Wed, 30 Jun 2021 20:09:59 GMT (envelope-from git) Date: Wed, 30 Jun 2021 20:09:59 GMT Message-Id: <202106302009.15UK9xb6098814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: 781c3b51193e - main - Add Thomas Munro to the committers graph MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 781c3b51193e5bd99773439192ca68fdfdd9c330 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 20:09:59 -0000 The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=781c3b51193e5bd99773439192ca68fdfdd9c330 commit 781c3b51193e5bd99773439192ca68fdfdd9c330 Author: Allan Jude AuthorDate: 2021-06-30 20:09:18 +0000 Commit: Allan Jude CommitDate: 2021-06-30 20:09:18 +0000 Add Thomas Munro to the committers graph Reported by: gnn --- share/misc/committers-src.dot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index fcb6f6b800dd..677b12a41e72 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -353,6 +353,7 @@ thj [label="Tom Jones\nthj@FreeBSD.org\n2018/04/07"] thompsa [label="Andrew Thompson\nthompsa@FreeBSD.org\n2005/05/25"] ticso [label="Bernd Walter\nticso@FreeBSD.org\n2002/01/31"] tijl [label="Tijl Coosemans\ntijl@FreeBSD.org\n2010/07/16"] +tmunro [label="Thomas Munro\ntmunro@FreeBSD.org\n2018/10/15"] tsoome [label="Toomas Soome\ntsoome@FreeBSD.org\n2016/08/10"] trasz [label="Edward Tomasz Napierala\ntrasz@FreeBSD.org\n2008/08/22"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/05/28"] @@ -410,6 +411,7 @@ adrian -> sgalabov ae -> melifaro allanjude -> rew +allanjude -> tmunro allanjude -> tsoome alc -> davide @@ -745,6 +747,7 @@ mdodd -> jake mike -> das mjg -> kaktus +mjg -> tmunro mlaier -> benjsc mlaier -> dhartmei From owner-dev-commits-src-main@freebsd.org Wed Jun 30 20:35:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E13D064C542; Wed, 30 Jun 2021 20:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFY4N5yWLz3t1G; Wed, 30 Jun 2021 20:35:00 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 B0AB51365D; Wed, 30 Jun 2021 20:35:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UKZ0PZ038168; Wed, 30 Jun 2021 20:35:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UKZ0m3038167; Wed, 30 Jun 2021 20:35:00 GMT (envelope-from git) Date: Wed, 30 Jun 2021 20:35:00 GMT Message-Id: <202106302035.15UKZ0m3038167@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Antoine Brodin Subject: git: d75d33870df1 - main - ObsoleteFiles.inc: add a few missed files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: antoine X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d75d33870df197309e40d07541b8547447e20286 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 20:35:01 -0000 The branch main has been updated by antoine: URL: https://cgit.FreeBSD.org/src/commit/?id=d75d33870df197309e40d07541b8547447e20286 commit d75d33870df197309e40d07541b8547447e20286 Author: Antoine Brodin AuthorDate: 2021-06-30 20:34:01 +0000 Commit: Antoine Brodin CommitDate: 2021-06-30 20:34:36 +0000 ObsoleteFiles.inc: add a few missed files --- ObsoleteFiles.inc | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 38cbbd7807ca..60707faebefc 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -3967,6 +3967,9 @@ OLD_FILES+=usr/libexec/kgdb OLD_FILES+=usr/share/man/man4/hme.4.gz OLD_FILES+=usr/share/man/man4/if_hme.4.gz +# 20201129: RADIX_MPATH removed +OLD_FILES+=usr/include/net/radix_mpath.h + # 20201124: ping6(8) was merged into ping(8) OLD_FILES+=usr/lib/debug/sbin/ping6.debug OLD_FILES+=usr/share/man/man8/ping6.8.gz @@ -4048,6 +4051,9 @@ OLD_FILES+=boot/lua/logo-fbsdbw.lua OLD_FILES+=boot/lua/logo-orb.lua OLD_FILES+=boot/lua/logo-orbbw.lua +# 20200828: net/route/shared.h moved to net/route/route_var.h +OLD_FILES+=usr/include/net/route/shared.h + # 20200825: merged OpenZFS support OLD_LIBS+=lib/libzfs.so.3 OLD_LIBS+=usr/lib32/libzfs.so.3 @@ -4323,6 +4329,9 @@ OLD_FILES+=usr/share/man/man4/cy.4.gz OLD_FILES+=usr/share/man/man4/rc.4.gz OLD_FILES+=usr/share/man/man4/rp.4.gz +# 20200721: sys/iommu.h moved to dev/iommu/ +OLD_FILES+=usr/include/sys/iommu.h + # 20200715: rework of devstat(9) man page OLD_FILES+=usr/share/man/man9/devstat_add_entry.9.gz @@ -5782,6 +5791,37 @@ OLD_FILES+=usr/libexec/cc1plus OLD_FILES+=usr/share/man/man1/gcpp.1.gz OLD_FILES+=usr/share/man/man1/gperf.1.gz OLD_FILES+=usr/share/man/man7/gperf.7.gz +OLD_DIRS+=usr/include/c++/4.2/tr1 +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/unordered_iterator +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/trie_policy +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/tree_policy +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/thin_heap_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/resize_policy +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/rc_binomial_heap_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/rb_tree_map_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/pairing_heap_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_policy +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/eq_fn +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_base_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/basic_tree_policy +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds +OLD_DIRS+=usr/include/c++/4.2/ext +OLD_DIRS+=usr/include/c++/4.2/debug +OLD_DIRS+=usr/include/c++/4.2/bits +OLD_DIRS+=usr/include/c++/4.2/backward +OLD_DIRS+=usr/include/c++/4.2 # 20200220: Upgrade of ncurses, shlib bumped to version 9 OLD_LIBS+=lib/libncurses.so.8 @@ -5797,6 +5837,7 @@ OLD_FILES+=usr/share/man/man1/elf2aout.1.gz OLD_FILES+=usr/sbin/simple_httpd # 20200127: vpo removed +OLD_FILES+=usr/include/dev/ppbus/vpoio.h OLD_FILES+=usr/share/man/man4/imm.4.gz OLD_FILES+=usr/share/man/man4/vpo.4.gz From owner-dev-commits-src-main@freebsd.org Wed Jun 30 21:00:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E143650310; Wed, 30 Jun 2021 21:00: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFYdk2kK4z4TRr; Wed, 30 Jun 2021 21:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 45DCB13F07; Wed, 30 Jun 2021 21:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UL0Q54082568; Wed, 30 Jun 2021 21:00:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UL0QbN082567; Wed, 30 Jun 2021 21:00:26 GMT (envelope-from git) Date: Wed, 30 Jun 2021 21:00:26 GMT Message-Id: <202106302100.15UL0QbN082567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Houchard Subject: git: 8c3bd133dd52 - main - arm: Make sure we can handle a thumb entry point. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cognet X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c3bd133dd52824e427e350c65eae1fd9eb5a3cd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 21:00:26 -0000 The branch main has been updated by cognet: URL: https://cgit.FreeBSD.org/src/commit/?id=8c3bd133dd52824e427e350c65eae1fd9eb5a3cd commit 8c3bd133dd52824e427e350c65eae1fd9eb5a3cd Author: Olivier Houchard AuthorDate: 2021-06-30 20:56:50 +0000 Commit: Olivier Houchard CommitDate: 2021-06-30 20:56:50 +0000 arm: Make sure we can handle a thumb entry point. Similarly to what's been done on arm64 with commit 712c060c94fd447c91b0e6218c12a431206b487a, when executing a binary, if the entry point is a thumb symbol, then make sure we set the PSL_T flag, otherwise the CPU will interpret it in ARM mode, and that will likely leads to an undefined instruction. PR: 256899 MFC after: 1 week --- sys/arm/arm/machdep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index 4f26c6e9ebf9..c852187087b3 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -346,6 +346,8 @@ exec_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) tf->tf_svc_lr = 0x77777777; tf->tf_pc = imgp->entry_addr; tf->tf_spsr = PSR_USR32_MODE; + if ((register_t)imgp->entry_addr & 1) + tf->tf_spsr |= PSR_T; } #ifdef VFP From owner-dev-commits-src-main@freebsd.org Wed Jun 30 21:22:17 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16010650A6B; Wed, 30 Jun 2021 21:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFZ6w71sCz4WJf; Wed, 30 Jun 2021 21:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 CA3081436D; Wed, 30 Jun 2021 21:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15ULMGbw013528; Wed, 30 Jun 2021 21:22:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ULMGHD013525; Wed, 30 Jun 2021 21:22:16 GMT (envelope-from git) Date: Wed, 30 Jun 2021 21:22:16 GMT Message-Id: <202106302122.15ULMGHD013525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 8c2dd68caa96 - main - libpmc: Import AMD Zen 3 PMU events MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c2dd68caa963f1900a8228b0732b04f5d530ffa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 21:22:17 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8c2dd68caa963f1900a8228b0732b04f5d530ffa commit 8c2dd68caa963f1900a8228b0732b04f5d530ffa Author: Greg V AuthorDate: 2021-06-30 21:15:21 +0000 Commit: Mitchell Horne CommitDate: 2021-06-30 21:21:23 +0000 libpmc: Import AMD Zen 3 PMU events Reviewed by: mav, mhorne MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D30965 --- lib/libpmc/pmu-events/arch/x86/amdzen3/branch.json | 53 +++ lib/libpmc/pmu-events/arch/x86/amdzen3/cache.json | 402 +++++++++++++++++++ lib/libpmc/pmu-events/arch/x86/amdzen3/core.json | 137 +++++++ .../pmu-events/arch/x86/amdzen3/data-fabric.json | 98 +++++ .../arch/x86/amdzen3/floating-point.json | 139 +++++++ lib/libpmc/pmu-events/arch/x86/amdzen3/memory.json | 428 +++++++++++++++++++++ lib/libpmc/pmu-events/arch/x86/amdzen3/other.json | 103 +++++ .../pmu-events/arch/x86/amdzen3/recommended.json | 214 +++++++++++ lib/libpmc/pmu-events/arch/x86/mapfile.csv | 1 + 9 files changed, 1575 insertions(+) diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/branch.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/branch.json new file mode 100644 index 000000000000..018a7fe94fb9 --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/branch.json @@ -0,0 +1,53 @@ +[ + { + "EventName": "bp_l1_btb_correct", + "EventCode": "0x8a", + "BriefDescription": "L1 Branch Prediction Overrides Existing Prediction (speculative)." + }, + { + "EventName": "bp_l2_btb_correct", + "EventCode": "0x8b", + "BriefDescription": "L2 Branch Prediction Overrides Existing Prediction (speculative)." + }, + { + "EventName": "bp_dyn_ind_pred", + "EventCode": "0x8e", + "BriefDescription": "Dynamic Indirect Predictions.", + "PublicDescription": "The number of times a branch used the indirect predictor to make a prediction." + }, + { + "EventName": "bp_de_redirect", + "EventCode": "0x91", + "BriefDescription": "Decode Redirects", + "PublicDescription": "The number of times the instruction decoder overrides the predicted target." + }, + { + "EventName": "bp_l1_tlb_fetch_hit", + "EventCode": "0x94", + "BriefDescription": "The number of instruction fetches that hit in the L1 ITLB.", + "UMask": "0xff" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if1g", + "EventCode": "0x94", + "BriefDescription": "The number of instruction fetches that hit in the L1 ITLB. L1 Instruction TLB hit (1G page size).", + "UMask": "0x04" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if2m", + "EventCode": "0x94", + "BriefDescription": "The number of instruction fetches that hit in the L1 ITLB. L1 Instruction TLB hit (2M page size).", + "UMask": "0x02" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if4k", + "EventCode": "0x94", + "BriefDescription": "The number of instruction fetches that hit in the L1 ITLB. L1 Instrcution TLB hit (4K or 16K page size).", + "UMask": "0x01" + }, + { + "EventName": "bp_tlb_rel", + "EventCode": "0x99", + "BriefDescription": "The number of ITLB reload requests." + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/cache.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/cache.json new file mode 100644 index 000000000000..fa1d7499a2e3 --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/cache.json @@ -0,0 +1,402 @@ +[ + { + "EventName": "l2_request_g1.rd_blk_l", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache reads (including hardware and software prefetch).", + "UMask": "0x80" + }, + { + "EventName": "l2_request_g1.rd_blk_x", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache stores.", + "UMask": "0x40" + }, + { + "EventName": "l2_request_g1.ls_rd_blk_c_s", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache shared reads.", + "UMask": "0x20" + }, + { + "EventName": "l2_request_g1.cacheable_ic_read", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Instruction cache reads.", + "UMask": "0x10" + }, + { + "EventName": "l2_request_g1.change_to_x", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache state change requests. Request change to writable, check L2 for current state.", + "UMask": "0x08" + }, + { + "EventName": "l2_request_g1.prefetch_l2_cmd", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). PrefetchL2Cmd.", + "UMask": "0x04" + }, + { + "EventName": "l2_request_g1.l2_hw_pf", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). L2 Prefetcher. All prefetches accepted by L2 pipeline, hit or miss. Types of PF and L2 hit/miss broken out in a separate perfmon event.", + "UMask": "0x02" + }, + { + "EventName": "l2_request_g1.group2", + "EventCode": "0x60", + "BriefDescription": "Miscellaneous events covered in more detail by l2_request_g2 (PMCx061).", + "UMask": "0x01" + }, + { + "EventName": "l2_request_g1.all_no_prefetch", + "EventCode": "0x60", + "UMask": "0xf9" + }, + { + "EventName": "l2_request_g2.group1", + "EventCode": "0x61", + "BriefDescription": "Miscellaneous events covered in more detail by l2_request_g1 (PMCx060).", + "UMask": "0x80" + }, + { + "EventName": "l2_request_g2.ls_rd_sized", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Data cache read sized.", + "UMask": "0x40" + }, + { + "EventName": "l2_request_g2.ls_rd_sized_nc", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Data cache read sized non-cacheable.", + "UMask": "0x20" + }, + { + "EventName": "l2_request_g2.ic_rd_sized", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Instruction cache read sized.", + "UMask": "0x10" + }, + { + "EventName": "l2_request_g2.ic_rd_sized_nc", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Instruction cache read sized non-cacheable.", + "UMask": "0x08" + }, + { + "EventName": "l2_request_g2.smc_inval", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Self-modifying code invalidates.", + "UMask": "0x04" + }, + { + "EventName": "l2_request_g2.bus_locks_originator", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Bus locks.", + "UMask": "0x02" + }, + { + "EventName": "l2_request_g2.bus_locks_responses", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Bus lock response.", + "UMask": "0x01" + }, + { + "EventName": "l2_latency.l2_cycles_waiting_on_fills", + "EventCode": "0x62", + "BriefDescription": "Total cycles spent waiting for L2 fills to complete from L3 or memory, divided by four. Event counts are for both threads. To calculate average latency, the number of fills from both threads must be used.", + "UMask": "0x01" + }, + { + "EventName": "l2_wcb_req.wcb_write", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB write requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) write requests.", + "UMask": "0x40" + }, + { + "EventName": "l2_wcb_req.wcb_close", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB close requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) close requests.", + "UMask": "0x20" + }, + { + "EventName": "l2_wcb_req.zero_byte_store", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB zero byte store requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) zero byte store requests.", + "UMask": "0x04" + }, + { + "EventName": "l2_wcb_req.cl_zero", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB cache line zeroing requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) cache line zeroing requests.", + "UMask": "0x01" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_cs", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache shared read hit in L2", + "UMask": "0x80" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_l_hit_x", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache read hit in L2. Modifiable.", + "UMask": "0x40" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_l_hit_s", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache read hit non-modifiable line in L2.", + "UMask": "0x20" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_x", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache store or state change hit in L2.", + "UMask": "0x10" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_c", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache request miss in L2 (all types). Use l2_cache_misses_from_dc_misses instead.", + "UMask": "0x08" + }, + { + "EventName": "l2_cache_req_stat.ic_fill_hit_x", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache hit modifiable line in L2.", + "UMask": "0x04" + }, + { + "EventName": "l2_cache_req_stat.ic_fill_hit_s", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache hit non-modifiable line in L2.", + "UMask": "0x02" + }, + { + "EventName": "l2_cache_req_stat.ic_fill_miss", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache request miss in L2. Use l2_cache_misses_from_ic_miss instead.", + "UMask": "0x01" + }, + { + "EventName": "l2_cache_req_stat.ic_access_in_l2", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache requests in L2.", + "UMask": "0x07" + }, + { + "EventName": "l2_cache_req_stat.ic_dc_miss_in_l2", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache request miss in L2 and Data cache request miss in L2 (all types).", + "UMask": "0x09" + }, + { + "EventName": "l2_cache_req_stat.ic_dc_hit_in_l2", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache request hit in L2 and Data cache request hit in L2 (all types).", + "UMask": "0xf6" + }, + { + "EventName": "l2_fill_pending.l2_fill_busy", + "EventCode": "0x6d", + "BriefDescription": "Cycles with fill pending from L2. Total cycles spent with one or more fill requests in flight from L2.", + "UMask": "0x01" + }, + { + "EventName": "l2_pf_hit_l2", + "EventCode": "0x70", + "BriefDescription": "L2 prefetch hit in L2. Use l2_cache_hits_from_l2_hwpf instead.", + "UMask": "0xff" + }, + { + "EventName": "l2_pf_miss_l2_hit_l3", + "EventCode": "0x71", + "BriefDescription": "L2 prefetcher hits in L3. Counts all L2 prefetches accepted by the L2 pipeline which miss the L2 cache and hit the L3.", + "UMask": "0xff" + }, + { + "EventName": "l2_pf_miss_l2_l3", + "EventCode": "0x72", + "BriefDescription": "L2 prefetcher misses in L3. Counts all L2 prefetches accepted by the L2 pipeline which miss the L2 and the L3 caches.", + "UMask": "0xff" + }, + { + "EventName": "ic_fw32", + "EventCode": "0x80", + "BriefDescription": "The number of 32B fetch windows transferred from IC pipe to DE instruction decoder (includes non-cacheable and cacheable fill responses)." + }, + { + "EventName": "ic_fw32_miss", + "EventCode": "0x81", + "BriefDescription": "The number of 32B fetch windows tried to read the L1 IC and missed in the full tag." + }, + { + "EventName": "ic_cache_fill_l2", + "EventCode": "0x82", + "BriefDescription": "Instruction Cache Refills from L2. The number of 64 byte instruction cache line was fulfilled from the L2 cache." + }, + { + "EventName": "ic_cache_fill_sys", + "EventCode": "0x83", + "BriefDescription": "Instruction Cache Refills from System. The number of 64 byte instruction cache line fulfilled from system memory or another cache." + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_hit", + "EventCode": "0x84", + "BriefDescription": "L1 ITLB Miss, L2 ITLB Hit. The number of instruction fetches that miss in the L1 ITLB but hit in the L2 ITLB." + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss", + "EventCode": "0x85", + "BriefDescription": "The number of instruction fetches that miss in both the L1 and L2 TLBs.", + "UMask": "0xff" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.coalesced_4k", + "EventCode": "0x85", + "BriefDescription": "The number of valid fills into the ITLB originating from the LS Page-Table Walker. Tablewalk requests are issued for L1-ITLB and L2-ITLB misses. Walk for >4K Coalesced page.", + "UMask": "0x08" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if1g", + "EventCode": "0x85", + "BriefDescription": "The number of valid fills into the ITLB originating from the LS Page-Table Walker. Tablewalk requests are issued for L1-ITLB and L2-ITLB misses. Walk for 1G page.", + "UMask": "0x04" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if2m", + "EventCode": "0x85", + "BriefDescription": "The number of valid fills into the ITLB originating from the LS Page-Table Walker. Tablewalk requests are issued for L1-ITLB and L2-ITLB misses. Walk for 2M page.", + "UMask": "0x02" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if4k", + "EventCode": "0x85", + "BriefDescription": "The number of valid fills into the ITLB originating from the LS Page-Table Walker. Tablewalk requests are issued for L1-ITLB and L2-ITLB misses. Walk to 4K page.", + "UMask": "0x01" + }, + { + "EventName": "bp_snp_re_sync", + "EventCode": "0x86", + "BriefDescription": "The number of pipeline restarts caused by invalidating probes that hit on the instruction stream currently being executed. This would happen if the active instruction stream was being modified by another processor in an MP system - typically a highly unlikely event." + }, + { + "EventName": "ic_fetch_stall.ic_stall_any", + "EventCode": "0x87", + "BriefDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle for any reason (nothing valid in pipe ICM1).", + "UMask": "0x04" + }, + { + "EventName": "ic_fetch_stall.ic_stall_dq_empty", + "EventCode": "0x87", + "BriefDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle (including IC to OC fetches) due to DQ empty.", + "UMask": "0x02" + }, + { + "EventName": "ic_fetch_stall.ic_stall_back_pressure", + "EventCode": "0x87", + "BriefDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle (including IC to OC fetches) due to back-pressure.", + "UMask": "0x01" + }, + { + "EventName": "ic_cache_inval.l2_invalidating_probe", + "EventCode": "0x8c", + "BriefDescription": "IC line invalidated due to L2 invalidating probe (external or LS). The number of instruction cache lines invalidated. A non-SMC event is CMC (cross modifying code), either from the other thread of the core or another core.", + "UMask": "0x02" + }, + { + "EventName": "ic_cache_inval.fill_invalidated", + "EventCode": "0x8c", + "BriefDescription": "IC line invalidated due to overwriting fill response. The number of instruction cache lines invalidated. A non-SMC event is CMC (cross modifying code), either from the other thread of the core or another core.", + "UMask": "0x01" + }, + { + "EventName": "ic_tag_hit_miss.all_instruction_cache_accesses", + "EventCode": "0x18e", + "BriefDescription": "All Instruction Cache Accesses. Counts various IC tag related hit and miss events.", + "UMask": "0x1f" + }, + { + "EventName": "ic_tag_hit_miss.instruction_cache_miss", + "EventCode": "0x18e", + "BriefDescription": "Instruction Cache Miss. Counts various IC tag related hit and miss events.", + "UMask": "0x18" + }, + { + "EventName": "ic_tag_hit_miss.instruction_cache_hit", + "EventCode": "0x18e", + "BriefDescription": "Instruction Cache Hit. Counts various IC tag related hit and miss events.", + "UMask": "0x07" + }, + { + "EventName": "ic_oc_mode_switch.oc_ic_mode_switch", + "EventCode": "0x28a", + "BriefDescription": "OC Mode Switch. OC to IC mode switch.", + "UMask": "0x02" + }, + { + "EventName": "ic_oc_mode_switch.ic_oc_mode_switch", + "EventCode": "0x28a", + "BriefDescription": "OC Mode Switch. IC to OC mode switch.", + "UMask": "0x01" + }, + { + "EventName": "op_cache_hit_miss.all_op_cache_accesses", + "EventCode": "0x28f", + "BriefDescription": "All Op Cache accesses. Counts Op Cache micro-tag hit/miss events", + "UMask": "0x07" + }, + { + "EventName": "op_cache_hit_miss.op_cache_miss", + "EventCode": "0x28f", + "BriefDescription": "Op Cache Miss. Counts Op Cache micro-tag hit/miss events", + "UMask": "0x04" + }, + { + "EventName": "op_cache_hit_miss.op_cache_hit", + "EventCode": "0x28f", + "BriefDescription": "Op Cache Hit. Counts Op Cache micro-tag hit/miss events", + "UMask": "0x03" + }, + { + "EventName": "l3_request_g1.caching_l3_cache_accesses", + "EventCode": "0x01", + "BriefDescription": "Caching: L3 cache accesses", + "UMask": "0x80", + "Unit": "L3PMC" + }, + { + "EventName": "l3_lookup_state.all_l3_req_typs", + "EventCode": "0x04", + "BriefDescription": "All L3 Request Types. All L3 cache Requests", + "UMask": "0xff", + "Unit": "L3PMC" + }, + { + "EventName": "l3_comb_clstr_state.other_l3_miss_typs", + "EventCode": "0x06", + "BriefDescription": "Other L3 Miss Request Types", + "UMask": "0xfe", + "Unit": "L3PMC" + }, + { + "EventName": "l3_comb_clstr_state.request_miss", + "EventCode": "0x06", + "BriefDescription": "L3 cache misses", + "UMask": "0x01", + "Unit": "L3PMC" + }, + { + "EventName": "xi_sys_fill_latency", + "EventCode": "0x90", + "BriefDescription": "L3 Cache Miss Latency. Total cycles for all transactions divided by 16. Ignores SliceMask and ThreadMask.", + "Unit": "L3PMC" + }, + { + "EventName": "xi_ccx_sdp_req1", + "EventCode": "0x9a", + "BriefDescription": "L3 Misses by Request Type. Ignores SliceID, EnAllSlices, CoreID, EnAllCores and ThreadMask. Requires unit mask 0xFF to engage event for counting.", + "UMask": "0xff", + "Unit": "L3PMC" + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/core.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/core.json new file mode 100644 index 000000000000..4e27a2be359e --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/core.json @@ -0,0 +1,137 @@ +[ + { + "EventName": "ex_ret_instr", + "EventCode": "0xc0", + "BriefDescription": "Retired Instructions." + }, + { + "EventName": "ex_ret_ops", + "EventCode": "0xc1", + "BriefDescription": "Retired Ops. Use macro_ops_retired instead.", + "PublicDescription": "The number of macro-ops retired." + }, + { + "EventName": "ex_ret_brn", + "EventCode": "0xc2", + "BriefDescription": "Retired Branch Instructions.", + "PublicDescription": "The number of branch instructions retired. This includes all types of architectural control flow changes, including exceptions and interrupts." + }, + { + "EventName": "ex_ret_brn_misp", + "EventCode": "0xc3", + "BriefDescription": "Retired Branch Instructions Mispredicted.", + "PublicDescription": "The number of retired branch instructions, that were mispredicted." + }, + { + "EventName": "ex_ret_brn_tkn", + "EventCode": "0xc4", + "BriefDescription": "Retired Taken Branch Instructions.", + "PublicDescription": "The number of taken branches that were retired. This includes all types of architectural control flow changes, including exceptions and interrupts." + }, + { + "EventName": "ex_ret_brn_tkn_misp", + "EventCode": "0xc5", + "BriefDescription": "Retired Taken Branch Instructions Mispredicted.", + "PublicDescription": "The number of retired taken branch instructions that were mispredicted." + }, + { + "EventName": "ex_ret_brn_far", + "EventCode": "0xc6", + "BriefDescription": "Retired Far Control Transfers.", + "PublicDescription": "The number of far control transfers retired including far call/jump/return, IRET, SYSCALL and SYSRET, plus exceptions and interrupts. Far control transfers are not subject to branch prediction." + }, + { + "EventName": "ex_ret_brn_resync", + "EventCode": "0xc7", + "BriefDescription": "Retired Branch Resyncs.", + "PublicDescription": "The number of resync branches. These reflect pipeline restarts due to certain microcode assists and events such as writes to the active instruction stream, among other things. Each occurrence reflects a restart penalty similar to a branch mispredict. This is relatively rare." + }, + { + "EventName": "ex_ret_near_ret", + "EventCode": "0xc8", + "BriefDescription": "Retired Near Returns.", + "PublicDescription": "The number of near return instructions (RET or RET Iw) retired." + }, + { + "EventName": "ex_ret_near_ret_mispred", + "EventCode": "0xc9", + "BriefDescription": "Retired Near Returns Mispredicted.", + "PublicDescription": "The number of near returns retired that were not correctly predicted by the return address predictor. Each such mispredict incurs the same penalty as a mispredicted conditional branch instruction." + }, + { + "EventName": "ex_ret_brn_ind_misp", + "EventCode": "0xca", + "BriefDescription": "Retired Indirect Branch Instructions Mispredicted.", + "PublicDescription": "The number of indirect branches retired that were not correctly predicted. Each such mispredict incurs the same penalty as a mispredicted conditional branch instruction. Note that only EX mispredicts are counted." + }, + { + "EventName": "ex_ret_mmx_fp_instr.sse_instr", + "EventCode": "0xcb", + "BriefDescription": "SSE instructions (SSE, SSE2, SSE3, SSSE3, SSE4A, SSE41, SSE42, AVX).", + "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS.", + "UMask": "0x04" + }, + { + "EventName": "ex_ret_mmx_fp_instr.mmx_instr", + "EventCode": "0xcb", + "BriefDescription": "MMX instructions.", + "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. MMX instructions.", + "UMask": "0x02" + }, + { + "EventName": "ex_ret_mmx_fp_instr.x87_instr", + "EventCode": "0xcb", + "BriefDescription": "x87 instructions.", + "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. x87 instructions.", + "UMask": "0x01" + }, + { + "EventName": "ex_ret_ind_brch_instr", + "EventCode": "0xcc", + "BriefDescription": "Retired Indirect Branch Instructions. The number of indirect branches retired." + }, + { + "EventName": "ex_ret_cond", + "EventCode": "0xd1", + "BriefDescription": "Retired Conditional Branch Instructions." + }, + { + "EventName": "ex_div_busy", + "EventCode": "0xd3", + "BriefDescription": "Div Cycles Busy count." + }, + { + "EventName": "ex_div_count", + "EventCode": "0xd4", + "BriefDescription": "Div Op Count." + }, + { + "EventName": "ex_ret_msprd_brnch_instr_dir_msmtch", + "EventCode": "0x1c7", + "BriefDescription": "Retired Mispredicted Branch Instructions due to Direction Mismatch", + "PublicDescription": "The number of retired conditional branch instructions that were not correctly predicted because of a branch direction mismatch." + }, + { + "EventName": "ex_tagged_ibs_ops.ibs_count_rollover", + "EventCode": "0x1cf", + "BriefDescription": "Tagged IBS Ops. Number of times an op could not be tagged by IBS because of a previous tagged op that has not retired.", + "UMask": "0x04" + }, + { + "EventName": "ex_tagged_ibs_ops.ibs_tagged_ops_ret", + "EventCode": "0x1cf", + "BriefDescription": "Tagged IBS Ops. Number of Ops tagged by IBS that retired.", + "UMask": "0x02" + }, + { + "EventName": "ex_tagged_ibs_ops.ibs_tagged_ops", + "EventCode": "0x1cf", + "BriefDescription": "Tagged IBS Ops. Number of Ops tagged by IBS.", + "UMask": "0x01" + }, + { + "EventName": "ex_ret_fused_instr", + "EventCode": "0x1d0", + "BriefDescription": "Counts retired Fused Instructions." + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/data-fabric.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/data-fabric.json new file mode 100644 index 000000000000..40271df40015 --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/data-fabric.json @@ -0,0 +1,98 @@ +[ + { + "EventName": "remote_outbound_data_controller_0", + "PublicDescription": "Remote Link Controller Outbound Packet Types: Data (32B): Remote Link Controller 0", + "EventCode": "0x7c7", + "UMask": "0x02", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_outbound_data_controller_1", + "PublicDescription": "Remote Link Controller Outbound Packet Types: Data (32B): Remote Link Controller 1", + "EventCode": "0x807", + "UMask": "0x02", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_outbound_data_controller_2", + "PublicDescription": "Remote Link Controller Outbound Packet Types: Data (32B): Remote Link Controller 2", + "EventCode": "0x847", + "UMask": "0x02", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_outbound_data_controller_3", + "PublicDescription": "Remote Link Controller Outbound Packet Types: Data (32B): Remote Link Controller 3", + "EventCode": "0x887", + "UMask": "0x02", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_0", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x07", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_1", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x47", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_2", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x87", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_3", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0xc7", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_4", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x107", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_5", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x147", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_6", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x187", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_7", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x1c7", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/floating-point.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/floating-point.json new file mode 100644 index 000000000000..98cfcb9c78ec --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/floating-point.json @@ -0,0 +1,139 @@ +[ + { + "EventName": "fpu_pipe_assignment.total", + "EventCode": "0x00", + "BriefDescription": "Total number of fp uOps.", + "PublicDescription": "Total number of fp uOps. The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS.", + "UMask": "0x0f" + }, + { + "EventName": "fpu_pipe_assignment.total3", + "EventCode": "0x00", + "BriefDescription": "Total number uOps assigned to pipe 3.", + "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one-cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to pipe 3.", + "UMask": "0x08" + }, + { + "EventName": "fpu_pipe_assignment.total2", + "EventCode": "0x00", + "BriefDescription": "Total number uOps assigned to pipe 2.", + "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to pipe 2.", + "UMask": "0x04" + }, + { + "EventName": "fpu_pipe_assignment.total1", + "EventCode": "0x00", + "BriefDescription": "Total number uOps assigned to pipe 1.", + "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to pipe 1.", + "UMask": "0x02" + }, + { + "EventName": "fpu_pipe_assignment.total0", + "EventCode": "0x00", + "BriefDescription": "Total number of fp uOps on pipe 0.", + "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to pipe 0.", + "UMask": "0x01" + }, + { + "EventName": "fp_ret_sse_avx_ops.all", + "EventCode": "0x03", + "BriefDescription": "All FLOPS. This is a retire-based event. The number of retired SSE/AVX FLOPS. The number of events logged per cycle can vary from 0 to 64. This event can count above 15.", + "UMask": "0xff" + }, + { + "EventName": "fp_ret_sse_avx_ops.mac_flops", + "EventCode": "0x03", + "BriefDescription": "Multiply-Accumulate FLOPs. Each MAC operation is counted as 2 FLOPS. This is a retire-based event. The number of retired SSE/AVX FLOPs. The number of events logged per cycle can vary from 0 to 64. This event requires the use of the MergeEvent since it can count above 15 events per cycle. See 2.1.17.3 [Large Increment per Cycle Events]. It does not provide a useful count without the use of the MergeEvent.", + "UMask": "0x08" + }, + { + "EventName": "fp_ret_sse_avx_ops.div_flops", + "EventCode": "0x03", + "BriefDescription": "Divide/square root FLOPs. This is a retire-based event. The number of retired SSE/AVX FLOPs. The number of events logged per cycle can vary from 0 to 64. This event requires the use of the MergeEvent since it can count above 15 events per cycle. See 2.1.17.3 [Large Increment per Cycle Events]. It does not provide a useful count without the use of the MergeEvent.", + "UMask": "0x04" + }, + { + "EventName": "fp_ret_sse_avx_ops.mult_flops", + "EventCode": "0x03", + "BriefDescription": "Multiply FLOPs. This is a retire-based event. The number of retired SSE/AVX FLOPs. The number of events logged per cycle can vary from 0 to 64. This event requires the use of the MergeEvent since it can count above 15 events per cycle. See 2.1.17.3 [Large Increment per Cycle Events]. It does not provide a useful count without the use of the MergeEvent.", + "UMask": "0x02" + }, + { + "EventName": "fp_ret_sse_avx_ops.add_sub_flops", + "EventCode": "0x03", + "BriefDescription": "Add/subtract FLOPs. This is a retire-based event. The number of retired SSE/AVX FLOPs. The number of events logged per cycle can vary from 0 to 64. This event requires the use of the MergeEvent since it can count above 15 events per cycle. See 2.1.17.3 [Large Increment per Cycle Events]. It does not provide a useful count without the use of the MergeEvent.", + "UMask": "0x01" + }, + { + "EventName": "fp_num_mov_elim_scal_op.optimized", + "EventCode": "0x04", + "BriefDescription": "Number of Scalar Ops optimized. This is a dispatch based speculative event, and is useful for measuring the effectiveness of the Move elimination and Scalar code optimization schemes.", + "UMask": "0x08" + }, + { + "EventName": "fp_num_mov_elim_scal_op.opt_potential", + "EventCode": "0x04", + "BriefDescription": "Number of Ops that are candidates for optimization (have Z-bit either set or pass). This is a dispatch based speculative event, and is useful for measuring the effectiveness of the Move elimination and Scalar code optimization schemes.", + "UMask": "0x04" + }, + { + "EventName": "fp_num_mov_elim_scal_op.sse_mov_ops_elim", + "EventCode": "0x04", + "BriefDescription": "Number of SSE Move Ops eliminated. This is a dispatch based speculative event, and is useful for measuring the effectiveness of the Move elimination and Scalar code optimization schemes.", + "UMask": "0x02" + }, + { + "EventName": "fp_num_mov_elim_scal_op.sse_mov_ops", + "EventCode": "0x04", + "BriefDescription": "Number of SSE Move Ops. This is a dispatch based speculative event, and is useful for measuring the effectiveness of the Move elimination and Scalar code optimization schemes.", + "UMask": "0x01" + }, + { + "EventName": "fp_retired_ser_ops.sse_bot_ret", + "EventCode": "0x05", + "BriefDescription": "SSE/AVX bottom-executing ops retired. The number of serializing Ops retired.", + "UMask": "0x08" + }, + { + "EventName": "fp_retired_ser_ops.sse_ctrl_ret", + "EventCode": "0x05", + "BriefDescription": "SSE/AVX control word mispredict traps. The number of serializing Ops retired.", + "UMask": "0x04" + }, + { + "EventName": "fp_retired_ser_ops.x87_bot_ret", + "EventCode": "0x05", + "BriefDescription": "x87 bottom-executing ops retired. The number of serializing Ops retired.", + "UMask": "0x02" + }, + { + "EventName": "fp_retired_ser_ops.x87_ctrl_ret", + "EventCode": "0x05", + "BriefDescription": "x87 control word mispredict traps due to mispredictions in RC or PC, or changes in mask bits. The number of serializing Ops retired.", + "UMask": "0x01" + }, + { + "EventName": "fp_disp_faults.ymm_spill_fault", + "EventCode": "0x0e", + "BriefDescription": "Floating Point Dispatch Faults. YMM spill fault.", + "UMask": "0x08" + }, + { + "EventName": "fp_disp_faults.ymm_fill_fault", + "EventCode": "0x0e", + "BriefDescription": "Floating Point Dispatch Faults. YMM fill fault.", + "UMask": "0x04" + }, + { + "EventName": "fp_disp_faults.xmm_fill_fault", + "EventCode": "0x0e", + "BriefDescription": "Floating Point Dispatch Faults. XMM fill fault.", + "UMask": "0x02" + }, + { + "EventName": "fp_disp_faults.x87_fill_fault", + "EventCode": "0x0e", + "BriefDescription": "Floating Point Dispatch Faults. x87 fill fault.", + "UMask": "0x01" + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/memory.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/memory.json new file mode 100644 index 000000000000..a2833955dcd2 --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/memory.json @@ -0,0 +1,428 @@ +[ + { + "EventName": "ls_bad_status2.stli_other", + "EventCode": "0x24", + "BriefDescription": "Non-forwardable conflict; used to reduce STLI's via software. All reasons. Store To Load Interlock (STLI) are loads that were unable to complete because of a possible match with an older store, and the older store could not do STLF for some reason.", + "PublicDescription" : "Store-to-load conflicts: A load was unable to complete due to a non-forwardable conflict with an older store. Most commonly, a load's address range partially but not completely overlaps with an uncompleted older store. Software can avoid this problem by using same-size and same-alignment loads and stores when accessing the same data. Vector/SIMD code is particularly susceptible to this problem; software should construct wide vector stores by manipulating vector elements in registers using shuffle/blend/swap instructions prior to storing to memory, instead of using narrow element-by-element stores.", + "UMask": "0x02" + }, + { + "EventName": "ls_locks.spec_lock_hi_spec", + "EventCode": "0x25", + "BriefDescription": "Retired lock instructions. High speculative cacheable lock speculation succeeded.", + "UMask": "0x08" + }, + { + "EventName": "ls_locks.spec_lock_lo_spec", + "EventCode": "0x25", + "BriefDescription": "Retired lock instructions. Low speculative cacheable lock speculation succeeded.", + "UMask": "0x04" + }, + { + "EventName": "ls_locks.non_spec_lock", + "EventCode": "0x25", + "BriefDescription": "Retired lock instructions. Non-speculative lock succeeded.", + "UMask": "0x02" + }, + { + "EventName": "ls_locks.bus_lock", + "EventCode": "0x25", + "BriefDescription": "Retired lock instructions. Comparable to legacy bus lock.", + "UMask": "0x01" + }, + { + "EventName": "ls_ret_cl_flush", + "EventCode": "0x26", + "BriefDescription": "The number of retired CLFLUSH instructions. This is a non-speculative event." + }, + { + "EventName": "ls_ret_cpuid", + "EventCode": "0x27", + "BriefDescription": "The number of CPUID instructions retired." + }, + { + "EventName": "ls_dispatch.ld_st_dispatch", + "EventCode": "0x29", + "BriefDescription": "Load-op-Store Dispatch. Dispatch of a single op that performs a load from and store to the same memory address. Counts the number of operations dispatched to the LS unit. Unit Masks ADDed.", + "UMask": "0x04" + }, + { + "EventName": "ls_dispatch.store_dispatch", + "EventCode": "0x29", + "BriefDescription": "Dispatch of a single op that performs a memory store. Counts the number of operations dispatched to the LS unit. Unit Masks ADDed.", + "UMask": "0x02" + }, + { + "EventName": "ls_dispatch.ld_dispatch", + "EventCode": "0x29", + "BriefDescription": "Dispatch of a single op that performs a memory load. Counts the number of operations dispatched to the LS unit. Unit Masks ADDed.", + "UMask": "0x01" + }, + { + "EventName": "ls_smi_rx", + "EventCode": "0x2b", + "BriefDescription": "Counts the number of SMIs received." + }, + { + "EventName": "ls_int_taken", + "EventCode": "0x2c", + "BriefDescription": "Counts the number of interrupts taken." + }, + { + "EventName": "ls_rdtsc", + "EventCode": "0x2d", + "BriefDescription": "Number of reads of the TSC (RDTSC instructions). The count is speculative." + }, + { + "EventName": "ls_stlf", + "EventCode": "0x35", + "BriefDescription": "Number of STLF hits." + }, + { + "EventName": "ls_st_commit_cancel2.st_commit_cancel_wcb_full", + "EventCode": "0x37", + "BriefDescription": "A non-cacheable store and the non-cacheable commit buffer is full.", + "UMask": "0x01" + }, + { + "EventName": "ls_dc_accesses", + "EventCode": "0x40", + "BriefDescription": "Number of accesses to the dcache for load/store references.", + "PublicDescription": "The number of accesses to the data cache for load and store references. This may include certain microcode scratchpad accesses, although these are generally rare. Each increment represents an eight-byte access, although the instruction may only be accessing a portion of that. This event is a speculative event." + }, + { + "EventName": "ls_mab_alloc.all_allocations", + "EventCode": "0x41", *** 672 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Wed Jun 30 21:22:15 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E659A650745; Wed, 30 Jun 2021 21:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFZ6v6G1wz4WJx; Wed, 30 Jun 2021 21:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 BF5821436C; Wed, 30 Jun 2021 21:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15ULMFps013498; Wed, 30 Jun 2021 21:22:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ULMF70013497; Wed, 30 Jun 2021 21:22:15 GMT (envelope-from git) Date: Wed, 30 Jun 2021 21:22:15 GMT Message-Id: <202106302122.15ULMF70013497@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 13f5a3076bc8 - main - hwpmc_arm64: add a PMCDBG to the interrupt handler MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13f5a3076bc8f3774b82f2d5ca29e2e0e2af997b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 21:22:16 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=13f5a3076bc8f3774b82f2d5ca29e2e0e2af997b commit 13f5a3076bc8f3774b82f2d5ca29e2e0e2af997b Author: Mitchell Horne AuthorDate: 2021-05-19 16:29:59 +0000 Commit: Mitchell Horne CommitDate: 2021-06-30 21:21:23 +0000 hwpmc_arm64: add a PMCDBG to the interrupt handler MFC after: 3 days Sponsored by: The FreeBSD Foundation --- sys/dev/hwpmc/hwpmc_arm64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index 6b98fb46e7f1..84a8791287f7 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -359,6 +359,9 @@ arm64_intr(struct trapframe *tf) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[arm64,%d] CPU %d out of range", __LINE__, cpu)); + PMCDBG3(MDP,INT,1, "cpu=%d tf=%p um=%d", cpu, (void *)tf, + TRAPF_USERMODE(tf)); + retval = 0; pc = arm64_pcpu[cpu]; From owner-dev-commits-src-main@freebsd.org Wed Jun 30 21:50:10 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F33B9650DB9; Wed, 30 Jun 2021 21:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFZl56YD8z4XFq; Wed, 30 Jun 2021 21:50:09 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C65B614661; Wed, 30 Jun 2021 21:50:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15ULo9ZT043840; Wed, 30 Jun 2021 21:50:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ULo96s043836; Wed, 30 Jun 2021 21:50:09 GMT (envelope-from git) Date: Wed, 30 Jun 2021 21:50:09 GMT Message-Id: <202106302150.15ULo96s043836@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 447636e43c08 - main - linux(4): implement coredump support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 447636e43c08d697664512a50f00f93f41c0a79f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 21:50:10 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=447636e43c08d697664512a50f00f93f41c0a79f commit 447636e43c08d697664512a50f00f93f41c0a79f Author: Edward Tomasz Napierala AuthorDate: 2021-06-30 16:45:21 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-06-30 21:45:06 +0000 linux(4): implement coredump support Implement dumping core for Linux binaries on amd64, for both 32- and 64-bit executables. Some bits are still missing. This is based on a prototype by chuck@. Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30019 --- sys/amd64/linux/linux_machdep.c | 34 +++++ sys/amd64/linux/linux_ptrace.c | 33 ----- sys/amd64/linux/linux_sysvec.c | 4 +- sys/amd64/linux32/linux32_sysvec.c | 6 +- sys/arm64/linux/linux_sysvec.c | 4 +- sys/compat/linux/linux_elf.c | 294 +++++++++++++++++++++++++++++++++++++ sys/compat/linux/linux_elf.h | 56 +++++++ sys/compat/linux/linux_elf32.c | 38 +++++ sys/compat/linux/linux_elf64.c | 38 +++++ sys/compat/linux/linux_emul.h | 6 + sys/modules/linux/Makefile | 1 + sys/modules/linux64/Makefile | 1 + 12 files changed, 475 insertions(+), 40 deletions(-) diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c index d2f9d0cacd3c..b54674e793c8 100644 --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -347,3 +348,36 @@ DEFINE_IFUNC(, int, futex_xorl, (int, uint32_t *, int *)) return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ? futex_xorl_smap : futex_xorl_nosmap); } + +void +bsd_to_linux_regset(struct reg *b_reg, struct linux_pt_regset *l_regset) +{ + + l_regset->r15 = b_reg->r_r15; + l_regset->r14 = b_reg->r_r14; + l_regset->r13 = b_reg->r_r13; + l_regset->r12 = b_reg->r_r12; + l_regset->rbp = b_reg->r_rbp; + l_regset->rbx = b_reg->r_rbx; + l_regset->r11 = b_reg->r_r11; + l_regset->r10 = b_reg->r_r10; + l_regset->r9 = b_reg->r_r9; + l_regset->r8 = b_reg->r_r8; + l_regset->rax = b_reg->r_rax; + l_regset->rcx = b_reg->r_rcx; + l_regset->rdx = b_reg->r_rdx; + l_regset->rsi = b_reg->r_rsi; + l_regset->rdi = b_reg->r_rdi; + l_regset->orig_rax = b_reg->r_rax; + l_regset->rip = b_reg->r_rip; + l_regset->cs = b_reg->r_cs; + l_regset->eflags = b_reg->r_rflags; + l_regset->rsp = b_reg->r_rsp; + l_regset->ss = b_reg->r_ss; + l_regset->fs_base = 0; + l_regset->gs_base = 0; + l_regset->ds = b_reg->r_ds; + l_regset->es = b_reg->r_es; + l_regset->fs = b_reg->r_fs; + l_regset->gs = b_reg->r_gs; +} diff --git a/sys/amd64/linux/linux_ptrace.c b/sys/amd64/linux/linux_ptrace.c index 67d8b121fbf1..9386ba1e6ae3 100644 --- a/sys/amd64/linux/linux_ptrace.c +++ b/sys/amd64/linux/linux_ptrace.c @@ -205,39 +205,6 @@ map_regs_to_linux(struct reg *b_reg, struct linux_pt_reg *l_reg) l_reg->ss = b_reg->r_ss; } -void -bsd_to_linux_regset(struct reg *b_reg, struct linux_pt_regset *l_regset) -{ - - l_regset->r15 = b_reg->r_r15; - l_regset->r14 = b_reg->r_r14; - l_regset->r13 = b_reg->r_r13; - l_regset->r12 = b_reg->r_r12; - l_regset->rbp = b_reg->r_rbp; - l_regset->rbx = b_reg->r_rbx; - l_regset->r11 = b_reg->r_r11; - l_regset->r10 = b_reg->r_r10; - l_regset->r9 = b_reg->r_r9; - l_regset->r8 = b_reg->r_r8; - l_regset->rax = b_reg->r_rax; - l_regset->rcx = b_reg->r_rcx; - l_regset->rdx = b_reg->r_rdx; - l_regset->rsi = b_reg->r_rsi; - l_regset->rdi = b_reg->r_rdi; - l_regset->orig_rax = b_reg->r_rax; - l_regset->rip = b_reg->r_rip; - l_regset->cs = b_reg->r_cs; - l_regset->eflags = b_reg->r_rflags; - l_regset->rsp = b_reg->r_rsp; - l_regset->ss = b_reg->r_ss; - l_regset->fs_base = 0; - l_regset->gs_base = 0; - l_regset->ds = b_reg->r_ds; - l_regset->es = b_reg->r_es; - l_regset->fs = b_reg->r_fs; - l_regset->gs = b_reg->r_gs; -} - static void map_regs_from_linux(struct reg *b_reg, struct linux_pt_reg *l_reg) { diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 655214b10047..c5538932b1e3 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -741,8 +741,8 @@ struct sysentvec elf_linux_sysvec = { .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, .sv_elf_core_osabi = ELFOSABI_NONE, - .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, - .sv_elf_core_prepare_notes = elf64_prepare_notes, + .sv_elf_core_abi_vendor = LINUX_ABI_VENDOR, + .sv_elf_core_prepare_notes = linux64_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index 740e8a54a4da..504d57e418a5 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -912,9 +912,9 @@ struct sysentvec elf_linux_sysvec = { .sv_szsigcode = &linux_szsigcode, .sv_name = "Linux ELF32", .sv_coredump = elf32_coredump, - .sv_elf_core_osabi = ELFOSABI_FREEBSD, - .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, - .sv_elf_core_prepare_notes = elf32_prepare_notes, + .sv_elf_core_osabi = ELFOSABI_NONE, + .sv_elf_core_abi_vendor = LINUX_ABI_VENDOR, + .sv_elf_core_prepare_notes = linux32_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 33bc303b5ada..e1d3708b70e9 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -417,8 +417,8 @@ struct sysentvec elf_linux_sysvec = { .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, .sv_elf_core_osabi = ELFOSABI_NONE, - .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, - .sv_elf_core_prepare_notes = elf64_prepare_notes, + .sv_elf_core_abi_vendor = LINUX_ABI_VENDOR, + .sv_elf_core_prepare_notes = linux64_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c new file mode 100644 index 000000000000..077e0c93c884 --- /dev/null +++ b/sys/compat/linux/linux_elf.c @@ -0,0 +1,294 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 2021 Edward Tomasz Napierala + * Copyright (c) 2018 Chuck Tuffli + * Copyright (c) 2017 Dell EMC + * Copyright (c) 2000 David O'Brien + * Copyright (c) 1995-1996 Søren Schmidt + * Copyright (c) 1996 Peter Wemm + * All rights reserved. + * + * This software was developed by the University of Cambridge Computer + * Laboratory as part of the CHERI for Hypervisors and Operating Systems + * (CHaOS) project, funded by EPSRC grant EP/V000292/1. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#if __ELF_WORD_SIZE == 32 +#define linux_pt_regset linux_pt_regset32 +#define bsd_to_linux_regset bsd_to_linux_regset32 +#include +#else +#include +#endif +#include +#include +#include + +/* This adds "linux32_" and "linux64_" prefixes. */ +#define __linuxN(x) __CONCAT(__CONCAT(__CONCAT(linux,__ELF_WORD_SIZE),_),x) + +#define LINUX_NT_AUXV 6 + +static void __linuxN(note_fpregset)(void *, struct sbuf *, size_t *); +static void __linuxN(note_prpsinfo)(void *, struct sbuf *, size_t *); +static void __linuxN(note_prstatus)(void *, struct sbuf *, size_t *); +static void __linuxN(note_threadmd)(void *, struct sbuf *, size_t *); +static void __linuxN(note_nt_auxv)(void *, struct sbuf *, size_t *); + +void +__linuxN(prepare_notes)(struct thread *td, struct note_info_list *list, + size_t *sizep) +{ + struct proc *p; + struct thread *thr; + size_t size; + + p = td->td_proc; + size = 0; + + /* + * To have the debugger select the right thread (LWP) as the initial + * thread, we dump the state of the thread passed to us in td first. + * This is the thread that causes the core dump and thus likely to + * be the right thread one wants to have selected in the debugger. + */ + thr = td; + while (thr != NULL) { + size += __elfN(register_note)(td, list, + NT_PRSTATUS, __linuxN(note_prstatus), thr); + size += __elfN(register_note)(td, list, + NT_PRPSINFO, __linuxN(note_prpsinfo), p); + size += __elfN(register_note)(td, list, + LINUX_NT_AUXV, __linuxN(note_nt_auxv), p); + size += __elfN(register_note)(td, list, + NT_FPREGSET, __linuxN(note_fpregset), thr); + size += __elfN(register_note)(td, list, + -1, __linuxN(note_threadmd), thr); + + thr = thr == td ? TAILQ_FIRST(&p->p_threads) : + TAILQ_NEXT(thr, td_plist); + if (thr == td) + thr = TAILQ_NEXT(thr, td_plist); + } + + *sizep = size; +} + +typedef struct linux_elf_prstatus linux_elf_prstatus_t; +#if __ELF_WORD_SIZE == 32 +typedef struct prpsinfo32 linux_elf_prpsinfo_t; +typedef struct fpreg32 linux_elf_prfpregset_t; +#else +typedef prpsinfo_t linux_elf_prpsinfo_t; +typedef prfpregset_t linux_elf_prfpregset_t; +#endif + +static void +__linuxN(note_prpsinfo)(void *arg, struct sbuf *sb, size_t *sizep) +{ + struct sbuf sbarg; + size_t len; + char *cp, *end; + struct proc *p; + linux_elf_prpsinfo_t *psinfo; + int error; + + p = arg; + if (sb != NULL) { + KASSERT(*sizep == sizeof(*psinfo), ("invalid size")); + psinfo = malloc(sizeof(*psinfo), M_TEMP, M_ZERO | M_WAITOK); + psinfo->pr_version = PRPSINFO_VERSION; + psinfo->pr_psinfosz = sizeof(linux_elf_prpsinfo_t); + strlcpy(psinfo->pr_fname, p->p_comm, sizeof(psinfo->pr_fname)); + PROC_LOCK(p); + if (p->p_args != NULL) { + len = sizeof(psinfo->pr_psargs) - 1; + if (len > p->p_args->ar_length) + len = p->p_args->ar_length; + memcpy(psinfo->pr_psargs, p->p_args->ar_args, len); + PROC_UNLOCK(p); + error = 0; + } else { + _PHOLD(p); + PROC_UNLOCK(p); + sbuf_new(&sbarg, psinfo->pr_psargs, + sizeof(psinfo->pr_psargs), SBUF_FIXEDLEN); + error = proc_getargv(curthread, p, &sbarg); + PRELE(p); + if (sbuf_finish(&sbarg) == 0) + len = sbuf_len(&sbarg) - 1; + else + len = sizeof(psinfo->pr_psargs) - 1; + sbuf_delete(&sbarg); + } + if (error || len == 0) + strlcpy(psinfo->pr_psargs, p->p_comm, + sizeof(psinfo->pr_psargs)); + else { + KASSERT(len < sizeof(psinfo->pr_psargs), + ("len is too long: %zu vs %zu", len, + sizeof(psinfo->pr_psargs))); + cp = psinfo->pr_psargs; + end = cp + len - 1; + for (;;) { + cp = memchr(cp, '\0', end - cp); + if (cp == NULL) + break; + *cp = ' '; + } + } + psinfo->pr_pid = p->p_pid; + sbuf_bcat(sb, psinfo, sizeof(*psinfo)); + free(psinfo, M_TEMP); + } + *sizep = sizeof(*psinfo); +} + +static void +__linuxN(note_prstatus)(void *arg, struct sbuf *sb, size_t *sizep) +{ + struct thread *td; + linux_elf_prstatus_t *status; +#if __ELF_WORD_SIZE == 32 + struct reg32 pr_reg; +#else + struct reg pr_reg; +#endif + + td = arg; + if (sb != NULL) { + KASSERT(*sizep == sizeof(*status), ("invalid size")); + status = malloc(sizeof(*status), M_TEMP, M_ZERO | M_WAITOK); + + /* + * XXX: Some fields missing. + */ + status->pr_cursig = td->td_proc->p_sig; + status->pr_pid = td->td_tid; + +#if __ELF_WORD_SIZE == 32 + fill_regs32(td, &pr_reg); +#else + fill_regs(td, &pr_reg); +#endif + bsd_to_linux_regset(&pr_reg, &status->pr_reg); + sbuf_bcat(sb, status, sizeof(*status)); + free(status, M_TEMP); + } + *sizep = sizeof(*status); +} + +static void +__linuxN(note_fpregset)(void *arg, struct sbuf *sb, size_t *sizep) +{ + struct thread *td; + linux_elf_prfpregset_t *fpregset; + + td = arg; + if (sb != NULL) { + KASSERT(*sizep == sizeof(*fpregset), ("invalid size")); + fpregset = malloc(sizeof(*fpregset), M_TEMP, M_ZERO | M_WAITOK); +#if __ELF_WORD_SIZE == 32 + fill_fpregs32(td, fpregset); +#else + fill_fpregs(td, fpregset); +#endif + sbuf_bcat(sb, fpregset, sizeof(*fpregset)); + free(fpregset, M_TEMP); + } + *sizep = sizeof(*fpregset); +} + +/* + * Allow for MD specific notes, as well as any MD + * specific preparations for writing MI notes. + */ +static void +__linuxN(note_threadmd)(void *arg, struct sbuf *sb, size_t *sizep) +{ + struct thread *td; + void *buf; + size_t size; + + td = arg; + size = *sizep; + if (size != 0 && sb != NULL) + buf = malloc(size, M_TEMP, M_ZERO | M_WAITOK); + else + buf = NULL; + size = 0; + __elfN(dump_thread)(td, buf, &size); + KASSERT(sb == NULL || *sizep == size, ("invalid size")); + if (size != 0 && sb != NULL) + sbuf_bcat(sb, buf, size); + free(buf, M_TEMP); + *sizep = size; +} + +static void +__linuxN(note_nt_auxv)(void *arg, struct sbuf *sb, size_t *sizep) +{ + struct proc *p; + size_t size; + + p = arg; + if (sb == NULL) { + size = 0; + sb = sbuf_new(NULL, NULL, LINUX_AT_COUNT * sizeof(Elf_Auxinfo), + SBUF_FIXEDLEN); + sbuf_set_drain(sb, sbuf_count_drain, &size); + PHOLD(p); + proc_getauxv(curthread, p, sb); + PRELE(p); + sbuf_finish(sb); + sbuf_delete(sb); + *sizep = size; + } else { + PHOLD(p); + proc_getauxv(curthread, p, sb); + PRELE(p); + } +} diff --git a/sys/compat/linux/linux_elf.h b/sys/compat/linux/linux_elf.h new file mode 100644 index 000000000000..4bb9318e360b --- /dev/null +++ b/sys/compat/linux/linux_elf.h @@ -0,0 +1,56 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Chuck Tuffli + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _COMPAT_LINUX_ELF_H_ +#define _COMPAT_LINUX_ELF_H_ + +struct l_elf_siginfo { + l_int si_signo; + l_int si_code; + l_int si_errno; +}; + +typedef struct linux_pt_regset l_elf_gregset_t; + +struct linux_elf_prstatus { + struct l_elf_siginfo pr_info; + l_short pr_cursig; + l_ulong pr_sigpend; + l_ulong pr_sighold; + l_pid_t pr_pid; + l_pid_t pr_ppid; + l_pid_t pr_pgrp; + l_pid_t pr_sid; + l_timeval pr_utime; + l_timeval pr_stime; + l_timeval pr_cutime; + l_timeval pr_cstime; + l_elf_gregset_t pr_reg; + l_int pr_fpvalid; +}; + +#endif diff --git a/sys/compat/linux/linux_elf32.c b/sys/compat/linux/linux_elf32.c new file mode 100644 index 000000000000..17ee4b6baa0a --- /dev/null +++ b/sys/compat/linux/linux_elf32.c @@ -0,0 +1,38 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Edward Tomasz Napierala + * Copyright (c) 2002 Doug Rabson + * All rights reserved. + * + * This software was developed by the University of Cambridge Computer + * Laboratory as part of the CHERI for Hypervisors and Operating Systems + * (CHaOS) project, funded by EPSRC grant EP/V000292/1. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#define __ELF_WORD_SIZE 32 +#include diff --git a/sys/compat/linux/linux_elf64.c b/sys/compat/linux/linux_elf64.c new file mode 100644 index 000000000000..2e283d763bbc --- /dev/null +++ b/sys/compat/linux/linux_elf64.c @@ -0,0 +1,38 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Edward Tomasz Napierala + * Copyright (c) 2002 Doug Rabson + * All rights reserved. + * + * This software was developed by the University of Cambridge Computer + * Laboratory as part of the CHERI for Hypervisors and Operating Systems + * (CHaOS) project, funded by EPSRC grant EP/V000292/1. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#define __ELF_WORD_SIZE 64 +#include diff --git a/sys/compat/linux/linux_emul.h b/sys/compat/linux/linux_emul.h index de66a7a4c82a..d5f37c918b6c 100644 --- a/sys/compat/linux/linux_emul.h +++ b/sys/compat/linux/linux_emul.h @@ -33,6 +33,10 @@ #define _LINUX_EMUL_H_ struct image_params; +struct note_info_list; + +/* Linux core notes are labeled "CORE" */ +#define LINUX_ABI_VENDOR "CORE" /* * modeled after similar structure in NetBSD @@ -58,6 +62,8 @@ void linux_on_exec(struct proc *, struct image_params *); void linux_thread_dtor(struct thread *); void linux_thread_detach(struct thread *); int linux_common_execve(struct thread *, struct image_args *); +void linux32_prepare_notes(struct thread *, struct note_info_list *, size_t *); +void linux64_prepare_notes(struct thread *, struct note_info_list *, size_t *); /* process emuldata flags */ #define LINUX_XDEPR_REQUEUEOP 0x00000001 /* uses deprecated diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index 49d787e2cb99..b2a5816c6919 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -26,6 +26,7 @@ SRCS+= linux_dummy_x86.c .endif .if ${MACHINE_CPUARCH} == "amd64" SRCS+= linux${SFX}_support.s +SRCS+= linux_elf32.c .else SRCS+= linux_copyout.c .endif diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index c081151e3fc5..d70983354407 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -18,6 +18,7 @@ SRCS= linux_fork.c linux_dummy_machdep.c linux_file.c linux_event.c \ linux_support.s .if ${MACHINE_CPUARCH} == "amd64" SRCS+= linux_dummy_x86.c +SRCS+= linux_elf64.c .endif DPSRCS= assym.inc linux_genassym.c From owner-dev-commits-src-main@freebsd.org Wed Jun 30 22:19:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A47F26515E9; Wed, 30 Jun 2021 22:19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFbNy3x4yz4YqL; Wed, 30 Jun 2021 22:19:30 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 6B16D14D45; Wed, 30 Jun 2021 22:19:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UMJU2o080957; Wed, 30 Jun 2021 22:19:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UMJU5j080956; Wed, 30 Jun 2021 22:19:30 GMT (envelope-from git) Date: Wed, 30 Jun 2021 22:19:30 GMT Message-Id: <202106302219.15UMJU5j080956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: c5f4772c66d2 - main - nfscl: Improve "Consider increasing kern.ipc.maxsockbuf" message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5f4772c66d2eb31b84a84a89c8a284043f03452 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 22:19:30 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=c5f4772c66d2eb31b84a84a89c8a284043f03452 commit c5f4772c66d2eb31b84a84a89c8a284043f03452 Author: Rick Macklem AuthorDate: 2021-06-30 22:15:41 +0000 Commit: Rick Macklem CommitDate: 2021-06-30 22:15:41 +0000 nfscl: Improve "Consider increasing kern.ipc.maxsockbuf" message When the setting of kern.ipc.maxsockbuf is less than what is desired for I/O based on vfs.maxbcachebuf and vfs.nfs.bufpackets, a console message of "Consider increasing kern.ipc.maxsockbuf". is printed. This patch modifies the message to provide a suggested value for kern.ipc.maxsockbuf. Note that the setting is only needed when the NFS rsize/wsize is set to vfs.maxbcachebuf. While here, make nfs_bufpackets global, so that it can be used by a future patch that adds a sysctl to set the NFS server's maximum I/O size. Also, remove "sizeof(u_int32_t)" from the maximum packet length, since NFS_MAXXDR is already an "overestimate" of the actual length. MFC after: 2 weeks --- sys/fs/nfs/nfs_commonkrpc.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 04ef04955ce0..63ff02331a0e 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -101,8 +101,8 @@ extern int nfscl_debuglevel; extern int nfsrv_lease; SVCPOOL *nfscbd_pool; +int nfs_bufpackets = 4; static int nfsrv_gsscallbackson = 0; -static int nfs_bufpackets = 4; static int nfs_reconnects; static int nfs3_jukebox_delay = 10; static int nfs_skip_wcc_data_onerr = 1; @@ -180,6 +180,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp, struct thread *td = curthread; SVCXPRT *xprt; struct timeval timo; + uint64_t tval; /* * We need to establish the socket using the credentials of @@ -238,8 +239,21 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp, do { if (error != 0 && pktscale > 2) { if (nmp != NULL && nrp->nr_sotype == SOCK_STREAM && - pktscale == pktscalesav) - printf("Consider increasing kern.ipc.maxsockbuf\n"); + pktscale == pktscalesav) { + /* + * Suggest vfs.nfs.bufpackets * maximum RPC message, + * adjusted for the sb_max->sb_max_adj conversion of + * MCLBYTES / (MSIZE + MCLBYTES) as the minimum setting + * for kern.ipc.maxsockbuf. + */ + tval = (NFS_MAXBSIZE + NFS_MAXXDR) * nfs_bufpackets; + tval *= MSIZE + MCLBYTES; + tval += MCLBYTES - 1; /* Round up divide by MCLBYTES. */ + tval /= MCLBYTES; + printf("Consider increasing kern.ipc.maxsockbuf to a " + "minimum of %ju to support %ubyte NFS I/O\n", + (uintmax_t)tval, NFS_MAXBSIZE); + } pktscale--; } if (nrp->nr_sotype == SOCK_DGRAM) { @@ -255,10 +269,10 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp, if (nrp->nr_sotype != SOCK_STREAM) panic("nfscon sotype"); if (nmp != NULL) { - sndreserve = (NFS_MAXBSIZE + NFS_MAXXDR + - sizeof (u_int32_t)) * pktscale; - rcvreserve = (NFS_MAXBSIZE + NFS_MAXXDR + - sizeof (u_int32_t)) * pktscale; + sndreserve = (NFS_MAXBSIZE + NFS_MAXXDR) * + pktscale; + rcvreserve = (NFS_MAXBSIZE + NFS_MAXXDR) * + pktscale; } else { sndreserve = rcvreserve = 1024 * pktscale; } From owner-dev-commits-src-main@freebsd.org Thu Jul 1 08:29:45 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 438B765FD83; Thu, 1 Jul 2021 08:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFrx51VN4z4rQ8; Thu, 1 Jul 2021 08:29:45 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 1C3D61CF55; Thu, 1 Jul 2021 08:29:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1618Tjls094286; Thu, 1 Jul 2021 08:29:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1618Tjwp094285; Thu, 1 Jul 2021 08:29:45 GMT (envelope-from git) Date: Thu, 1 Jul 2021 08:29:45 GMT Message-Id: <202107010829.1618Tjwp094285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 93c3453f11c9 - main - linux(4): revert arm64 part of 447636e43c0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93c3453f11c9bc99ae482565b3a3f29b39ab8f62 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 08:29:45 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=93c3453f11c9bc99ae482565b3a3f29b39ab8f62 commit 93c3453f11c9bc99ae482565b3a3f29b39ab8f62 Author: Edward Tomasz Napierala AuthorDate: 2021-07-01 08:28:01 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-07-01 08:29:23 +0000 linux(4): revert arm64 part of 447636e43c0 The arm64 part of the patch was incomplete and prevented linux64.ko from loading due to missing symbol. Sponsored By: EPSRC --- sys/arm64/linux/linux_sysvec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index e1d3708b70e9..33bc303b5ada 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -417,8 +417,8 @@ struct sysentvec elf_linux_sysvec = { .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, .sv_elf_core_osabi = ELFOSABI_NONE, - .sv_elf_core_abi_vendor = LINUX_ABI_VENDOR, - .sv_elf_core_prepare_notes = linux64_prepare_notes, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf64_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, From owner-dev-commits-src-main@freebsd.org Thu Jul 1 08:42:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C9CA660205; Thu, 1 Jul 2021 08:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFsCh3l3qz4st8; Thu, 1 Jul 2021 08:42:24 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 680461D562; Thu, 1 Jul 2021 08:42:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1618gOvr021093; Thu, 1 Jul 2021 08:42:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1618gO0A021092; Thu, 1 Jul 2021 08:42:24 GMT (envelope-from git) Date: Thu, 1 Jul 2021 08:42:24 GMT Message-Id: <202107010842.1618gO0A021092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: db8d680ebe9b - main - procctl(2): add PROC_NO_NEW_PRIVS_CTL, PROC_NO_NEW_PRIVS_STATUS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db8d680ebe9b12c7d9e0eb8bf9940fcef709f5ec Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 08:42:24 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=db8d680ebe9b12c7d9e0eb8bf9940fcef709f5ec commit db8d680ebe9b12c7d9e0eb8bf9940fcef709f5ec Author: Edward Tomasz Napierala AuthorDate: 2021-07-01 08:11:11 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-07-01 08:42:07 +0000 procctl(2): add PROC_NO_NEW_PRIVS_CTL, PROC_NO_NEW_PRIVS_STATUS This introduces a new, per-process flag, "NO_NEW_PRIVS", which is inherited, preserved on exec, and cannot be cleared. The flag, when set, makes subsequent execs ignore any SUID and SGID bits, instead executing those binaries as if they not set. The main purpose of the flag is implementation of Linux PROC_SET_NO_NEW_PRIVS prctl(2), and possibly also unpriviledged chroot. Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30939 --- lib/libc/sys/procctl.2 | 27 ++++++++++++++++++++++++++- sys/compat/freebsd32/freebsd32_misc.c | 3 +++ sys/kern/kern_exec.c | 5 +++-- sys/kern/kern_fork.c | 2 +- sys/kern/kern_procctl.c | 32 ++++++++++++++++++++++++++++++++ sys/sys/proc.h | 1 + sys/sys/procctl.h | 5 +++++ 7 files changed, 71 insertions(+), 4 deletions(-) diff --git a/lib/libc/sys/procctl.2 b/lib/libc/sys/procctl.2 index f85825d8cc6f..432ed5919a81 100644 --- a/lib/libc/sys/procctl.2 +++ b/lib/libc/sys/procctl.2 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 13, 2020 +.Dd July 1, 2021 .Dt PROCCTL 2 .Os .Sh NAME @@ -564,6 +564,31 @@ Stack gaps are enabled in the process after Stack gaps are disabled in the process after .Xr execve 2 . .El +.It Dv PROC_NO_NEW_PRIVS_CTL +Allows one to ignore the SUID and SGID bits on the program +images activated by +.Xr execve 2 +in the specified process and its future descendants. +The +.Fa data +parameter must point to the integer variable holding the following +value: +.Bl -tag -width PROC_NO_NEW_PRIVS_ENABLE +.It Dv PROC_NO_NEW_PRIVS_ENABLE +Request SUID and SGID bits to be ignored. +.El +.Pp +It is not possible to disable it once it has been enabled. +.It Dv PROC_NO_NEW_PRIVS_STATUS +Returns the current status of SUID/SGID enablement for the target process. +The +.Fa data +parameter must point to the integer variable, where one of the +following values is written: +.Bl -tag -width PROC_NO_NEW_PRIVS_DISABLE +.It Dv PROC_NO_NEW_PRIVS_ENABLE +.It Dv PROC_NO_NEW_PRIVS_DISABLE +.El .El .Sh x86 MACHINE-SPECIFIC REQUESTS .Bl -tag -width PROC_KPTI_STATUS diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index f221397e91dc..950631352f12 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -3643,6 +3643,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_procctl_args *uap) case PROC_STACKGAP_CTL: case PROC_TRACE_CTL: case PROC_TRAPCAP_CTL: + case PROC_NO_NEW_PRIVS_CTL: error = copyin(PTRIN(uap->data), &flags, sizeof(flags)); if (error != 0) return (error); @@ -3676,6 +3677,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_procctl_args *uap) case PROC_STACKGAP_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: + case PROC_NO_NEW_PRIVS_STATUS: data = &flags; break; case PROC_PDEATHSIG_CTL: @@ -3707,6 +3709,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_procctl_args *uap) case PROC_STACKGAP_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: + case PROC_NO_NEW_PRIVS_STATUS: if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index aff030cd432e..c3c23f44189e 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -781,8 +781,9 @@ interpret: signotify(td); } - if (imgp->sysent->sv_setid_allowed != NULL && - !(*imgp->sysent->sv_setid_allowed)(td, imgp)) + if ((imgp->sysent->sv_setid_allowed != NULL && + !(*imgp->sysent->sv_setid_allowed)(td, imgp)) || + (p->p_flag2 & P2_NO_NEW_PRIVS) != 0) execve_nosetid(imgp); /* diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 0d0659b432fe..7a80f7de85d8 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -492,7 +492,7 @@ do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread * p2->p_flag2 = p1->p_flag2 & (P2_ASLR_DISABLE | P2_ASLR_ENABLE | P2_ASLR_IGNSTART | P2_NOTRACE | P2_NOTRACE_EXEC | P2_PROTMAX_ENABLE | P2_PROTMAX_DISABLE | P2_TRAPCAP | - P2_STKGAP_DISABLE | P2_STKGAP_DISABLE_EXEC); + P2_STKGAP_DISABLE | P2_STKGAP_DISABLE_EXEC | P2_NO_NEW_PRIVS); p2->p_swtick = ticks; if (p1->p_flag & P_PROFIL) startprofclock(p2); diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index b6f6f1b772b2..4eb226c6b1b3 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -419,6 +419,27 @@ trapcap_status(struct thread *td, struct proc *p, int *data) return (0); } +static int +no_new_privs_ctl(struct thread *td, struct proc *p, int state) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + + if (state != PROC_NO_NEW_PRIVS_ENABLE) + return (EINVAL); + p->p_flag2 |= P2_NO_NEW_PRIVS; + return (0); +} + +static int +no_new_privs_status(struct thread *td, struct proc *p, int *data) +{ + + *data = (p->p_flag2 & P2_NO_NEW_PRIVS) != 0 ? + PROC_NO_NEW_PRIVS_ENABLE : PROC_NO_NEW_PRIVS_DISABLE; + return (0); +} + static int protmax_ctl(struct thread *td, struct proc *p, int state) { @@ -600,6 +621,7 @@ sys_procctl(struct thread *td, struct procctl_args *uap) case PROC_STACKGAP_CTL: case PROC_TRACE_CTL: case PROC_TRAPCAP_CTL: + case PROC_NO_NEW_PRIVS_CTL: error = copyin(uap->data, &flags, sizeof(flags)); if (error != 0) return (error); @@ -631,6 +653,7 @@ sys_procctl(struct thread *td, struct procctl_args *uap) case PROC_STACKGAP_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: + case PROC_NO_NEW_PRIVS_STATUS: data = &flags; break; case PROC_PDEATHSIG_CTL: @@ -661,6 +684,7 @@ sys_procctl(struct thread *td, struct procctl_args *uap) case PROC_STACKGAP_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: + case PROC_NO_NEW_PRIVS_STATUS: if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; @@ -710,6 +734,10 @@ kern_procctl_single(struct thread *td, struct proc *p, int com, void *data) return (trapcap_ctl(td, p, *(int *)data)); case PROC_TRAPCAP_STATUS: return (trapcap_status(td, p, data)); + case PROC_NO_NEW_PRIVS_CTL: + return (no_new_privs_ctl(td, p, *(int *)data)); + case PROC_NO_NEW_PRIVS_STATUS: + return (no_new_privs_status(td, p, data)); default: return (EINVAL); } @@ -740,6 +768,8 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t id, int com, void *data) case PROC_TRAPCAP_STATUS: case PROC_PDEATHSIG_CTL: case PROC_PDEATHSIG_STATUS: + case PROC_NO_NEW_PRIVS_CTL: + case PROC_NO_NEW_PRIVS_STATUS: if (idtype != P_PID) return (EINVAL); } @@ -772,6 +802,7 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t id, int com, void *data) case PROC_REAP_KILL: case PROC_TRACE_CTL: case PROC_TRAPCAP_CTL: + case PROC_NO_NEW_PRIVS_CTL: sx_slock(&proctree_lock); tree_locked = true; break; @@ -788,6 +819,7 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t id, int com, void *data) case PROC_STACKGAP_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: + case PROC_NO_NEW_PRIVS_STATUS: tree_locked = false; break; default: diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 19e8d76c6f99..9813324bfa69 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -835,6 +835,7 @@ struct proc { after exec */ #define P2_ITSTOPPED 0x00002000 #define P2_PTRACEREQ 0x00004000 /* Active ptrace req */ +#define P2_NO_NEW_PRIVS 0x00008000 /* Ignore setuid */ /* Flags protected by proctree_lock, kept in p_treeflags. */ #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ diff --git a/sys/sys/procctl.h b/sys/sys/procctl.h index 90fb149830dc..cc0279fb0d08 100644 --- a/sys/sys/procctl.h +++ b/sys/sys/procctl.h @@ -63,6 +63,8 @@ #define PROC_PROTMAX_STATUS 16 /* query implicit PROT_MAX status */ #define PROC_STACKGAP_CTL 17 /* en/dis stack gap on MAP_STACK */ #define PROC_STACKGAP_STATUS 18 /* query stack gap */ +#define PROC_NO_NEW_PRIVS_CTL 19 /* disable setuid/setgid */ +#define PROC_NO_NEW_PRIVS_STATUS 20 /* query suid/sgid disabled status */ /* Operations for PROC_SPROTECT (passed in integer arg). */ #define PPROT_OP(x) ((x) & 0xf) @@ -141,6 +143,9 @@ struct procctl_reaper_kill { #define PROC_STACKGAP_ENABLE_EXEC 0x0004 #define PROC_STACKGAP_DISABLE_EXEC 0x0008 +#define PROC_NO_NEW_PRIVS_ENABLE 1 +#define PROC_NO_NEW_PRIVS_DISABLE 2 + #ifndef _KERNEL __BEGIN_DECLS int procctl(idtype_t, id_t, int, void *); From owner-dev-commits-src-main@freebsd.org Thu Jul 1 13:13:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C73DA6642D9; Thu, 1 Jul 2021 13:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFzCw5H6Lz3nv4; Thu, 1 Jul 2021 13:13:00 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 9983220E70; Thu, 1 Jul 2021 13:13:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161DD0O2081112; Thu, 1 Jul 2021 13:13:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161DD0Uo081111; Thu, 1 Jul 2021 13:13:00 GMT (envelope-from git) Date: Thu, 1 Jul 2021 13:13:00 GMT Message-Id: <202107011313.161DD0Uo081111@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: d93a2f5d675a - main - fortune: correct documentation of default FORTUNE_PATH. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d93a2f5d675a3dfcc8176826fa5904b206fde30d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 13:13:00 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d93a2f5d675a3dfcc8176826fa5904b206fde30d commit d93a2f5d675a3dfcc8176826fa5904b206fde30d Author: Ceri Davies AuthorDate: 2021-07-01 13:00:06 +0000 Commit: Ceri Davies CommitDate: 2021-07-01 13:02:00 +0000 fortune: correct documentation of default FORTUNE_PATH. While here, fix a typo in a comment relating to FORTUNE_PATH --- usr.bin/fortune/fortune/fortune.6 | 4 ++-- usr.bin/fortune/fortune/fortune.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/fortune/fortune/fortune.6 b/usr.bin/fortune/fortune/fortune.6 index 2660cf8bf20c..c04d5838941a 100644 --- a/usr.bin/fortune/fortune/fortune.6 +++ b/usr.bin/fortune/fortune/fortune.6 @@ -31,7 +31,7 @@ .\" @(#)fortune.6 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd January 3, 2021 +.Dd July 1, 2021 .Dt FORTUNE 6 .Os .Sh NAME @@ -168,7 +168,7 @@ It is a colon-separated list of directories in which .Nm looks for data files. If not set it will default to -.Pa /usr/share/games/fortune . +.Pa /usr/share/games/fortune:/usr/local/share/games/fortune . If none of the directories specified exist, it will print a warning and exit. .It Ev FORTUNE_SAVESTATE If set, fortune will save some state about what fortune diff --git a/usr.bin/fortune/fortune/fortune.c b/usr.bin/fortune/fortune/fortune.c index 724fb4a2372e..f375ec645ede 100644 --- a/usr.bin/fortune/fortune/fortune.c +++ b/usr.bin/fortune/fortune/fortune.c @@ -1380,7 +1380,7 @@ usage(void) /* * getpath - * Set up file search patch from environment var FORTUNE_PATH; + * Set up file search path from environment var FORTUNE_PATH; * if not set, use the compiled in FORTDIR. */ From owner-dev-commits-src-main@freebsd.org Thu Jul 1 14:34:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8A8A6654E6; Thu, 1 Jul 2021 14:34: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG12T4GSGz3v2l; Thu, 1 Jul 2021 14:34:57 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 7B21622244; Thu, 1 Jul 2021 14:34:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161EYvBr088134; Thu, 1 Jul 2021 14:34:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161EYvcH088133; Thu, 1 Jul 2021 14:34:57 GMT (envelope-from git) Date: Thu, 1 Jul 2021 14:34:57 GMT Message-Id: <202107011434.161EYvcH088133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 244002b48257 - main - Switch the order of the ID_AA64PFR1_EL1 fields MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 244002b48257a8e4d3b4772872981c0d7a467923 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 14:34:57 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=244002b48257a8e4d3b4772872981c0d7a467923 commit 244002b48257a8e4d3b4772872981c0d7a467923 Author: Andrew Turner AuthorDate: 2021-07-01 00:45:39 +0000 Commit: Andrew Turner CommitDate: 2021-07-01 00:48:56 +0000 Switch the order of the ID_AA64PFR1_EL1 fields This makes them consistent with the fields in other registers. Sponsored by: The FreeBSD Foundation --- sys/arm64/arm64/identcpu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index c3544e9de9aa..bae5770b4b04 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -901,9 +901,10 @@ static struct mrs_field id_aa64pfr0_fields[] = { /* ID_AA64PFR1_EL1 */ -static struct mrs_field_value id_aa64pfr1_bt[] = { - MRS_FIELD_VALUE(ID_AA64PFR1_BT_NONE, ""), - MRS_FIELD_VALUE(ID_AA64PFR1_BT_IMPL, "BTI"), +static struct mrs_field_value id_aa64pfr1_mte[] = { + MRS_FIELD_VALUE(ID_AA64PFR1_MTE_NONE, ""), + MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL_EL0, "MTE EL0"), + MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL, "MTE"), MRS_FIELD_VALUE_END, }; @@ -914,17 +915,16 @@ static struct mrs_field_value id_aa64pfr1_ssbs[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr1_mte[] = { - MRS_FIELD_VALUE(ID_AA64PFR1_MTE_NONE, ""), - MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL_EL0, "MTE EL0"), - MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL, "MTE"), +static struct mrs_field_value id_aa64pfr1_bt[] = { + MRS_FIELD_VALUE(ID_AA64PFR1_BT_NONE, ""), + MRS_FIELD_VALUE(ID_AA64PFR1_BT_IMPL, "BTI"), MRS_FIELD_VALUE_END, }; static struct mrs_field id_aa64pfr1_fields[] = { - MRS_FIELD(ID_AA64PFR1, BT, false, MRS_EXACT, id_aa64pfr1_bt), - MRS_FIELD(ID_AA64PFR1, SSBS, false, MRS_LOWER, id_aa64pfr1_ssbs), MRS_FIELD(ID_AA64PFR1, MTE, false, MRS_EXACT, id_aa64pfr1_mte), + MRS_FIELD(ID_AA64PFR1, SSBS, false, MRS_LOWER, id_aa64pfr1_ssbs), + MRS_FIELD(ID_AA64PFR1, BT, false, MRS_EXACT, id_aa64pfr1_bt), MRS_FIELD_END, }; From owner-dev-commits-src-main@freebsd.org Thu Jul 1 15:22:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 42FD0665E14; Thu, 1 Jul 2021 15:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG2591Ps4z4SHt; Thu, 1 Jul 2021 15:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 18D3822BB9; Thu, 1 Jul 2021 15:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161FMLNa054330; Thu, 1 Jul 2021 15:22:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161FMKlM054329; Thu, 1 Jul 2021 15:22:20 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:22:20 GMT Message-Id: <202107011522.161FMKlM054329@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 5def4c47d4bd - main - Import device-tree files from Linux 5.11 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5def4c47d4bd90b209b9b4a4ba9faec15846d8fd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:22:21 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=5def4c47d4bd90b209b9b4a4ba9faec15846d8fd commit 5def4c47d4bd90b209b9b4a4ba9faec15846d8fd Merge: 244002b48257 f544df78d0a1 Author: Emmanuel Vadot AuthorDate: 2021-07-01 15:20:05 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-01 15:21:47 +0000 Import device-tree files from Linux 5.11 Sponsored by: Diablotin Systems sys/contrib/device-tree/Bindings/Makefile | 20 +- sys/contrib/device-tree/Bindings/arm/amlogic.yaml | 6 +- .../arm/amlogic/amlogic,meson-mx-secbus2.yaml | 42 + sys/contrib/device-tree/Bindings/arm/arm,scmi.txt | 42 + .../device-tree/Bindings/arm/atmel-sysregs.txt | 7 +- .../device-tree/Bindings/arm/bcm/brcm,bcm4908.yaml | 40 + sys/contrib/device-tree/Bindings/arm/coresight.txt | 5 +- sys/contrib/device-tree/Bindings/arm/cpus.yaml | 2 +- .../device-tree/Bindings/arm/freescale/fsl,scu.txt | 12 +- sys/contrib/device-tree/Bindings/arm/fsl.yaml | 383 +- .../device-tree/Bindings/arm/idle-states.yaml | 2 +- .../arm/marvell/ap80x-system-controller.txt | 8 + sys/contrib/device-tree/Bindings/arm/mediatek.yaml | 8 +- .../device-tree/Bindings/arm/msm/qcom,llcc.yaml | 2 + .../Bindings/arm/mstar/mstar,smpctrl.yaml | 40 + .../device-tree/Bindings/arm/mstar/mstar.yaml | 6 + sys/contrib/device-tree/Bindings/arm/pmu.yaml | 1 + sys/contrib/device-tree/Bindings/arm/qcom.yaml | 12 + sys/contrib/device-tree/Bindings/arm/renesas.yaml | 3 + sys/contrib/device-tree/Bindings/arm/rockchip.yaml | 29 + .../Bindings/arm/samsung/samsung-boards.yaml | 21 + .../socionext/socionext,uniphier-system-cache.yaml | 4 +- .../Bindings/arm/stm32/st,stm32-syscon.yaml | 5 + .../device-tree/Bindings/arm/stm32/stm32.yaml | 23 +- sys/contrib/device-tree/Bindings/arm/sunxi.yaml | 42 +- sys/contrib/device-tree/Bindings/arm/tegra.yaml | 11 + .../Bindings/arm/tegra/nvidia,tegra30-actmon.txt | 25 + sys/contrib/device-tree/Bindings/arm/vt8500.yaml | 3 +- sys/contrib/device-tree/Bindings/arm/xilinx.yaml | 6 +- .../device-tree/Bindings/ata/sata_highbank.yaml | 1 + .../Bindings/auxdisplay/holtek,ht16k33.yaml | 77 + .../Bindings/auxdisplay/modtronix,lcd2s.yaml | 58 + .../Bindings/bus/allwinner,sun50i-a64-de2.yaml | 2 +- .../Bindings/bus/allwinner,sun8i-a23-rsb.yaml | 4 +- .../device-tree/Bindings/bus/baikal,bt1-axi.yaml | 2 +- .../Bindings/bus/nvidia,tegra210-aconnect.yaml | 82 + .../device-tree/Bindings/clock/adi,axi-clkgen.yaml | 54 + .../Bindings/clock/allwinner,sun4i-a10-ccu.yaml | 4 + .../clock/allwinner,sun9i-a80-usb-clks.yaml | 59 + .../Bindings/clock/arm,syscon-icst.yaml | 4 +- .../Bindings/clock/canaan,k210-clk.yaml | 55 + .../Bindings/clock/fsl,flexspi-clock.yaml | 55 + .../Bindings/clock/idt,versaclock5.yaml | 6 + .../device-tree/Bindings/clock/imx27-clock.yaml | 2 +- .../device-tree/Bindings/clock/imx31-clock.yaml | 2 +- .../device-tree/Bindings/clock/imx5-clock.yaml | 2 +- .../device-tree/Bindings/clock/imx8qxp-lpcg.yaml | 79 +- .../device-tree/Bindings/clock/ingenic,cgu.yaml | 2 +- .../Bindings/clock/intel,easic-n5x.yaml | 46 + .../Bindings/clock/mstar,msc313-mpll.yaml | 46 + .../device-tree/Bindings/clock/qcom,a7pll.yaml | 51 + .../Bindings/clock/qcom,aoncc-sm8250.yaml | 58 + .../Bindings/clock/qcom,audiocc-sm8250.yaml | 58 + .../Bindings/clock/qcom,gcc-sc7280.yaml | 92 + .../Bindings/clock/qcom,gcc-sc8180x.yaml | 76 + .../device-tree/Bindings/clock/qcom,gcc-sdx55.yaml | 77 + .../Bindings/clock/qcom,gcc-sm8350.yaml | 96 + .../Bindings/clock/qcom,gpucc-sdm660.yaml | 76 + .../device-tree/Bindings/clock/qcom,mmcc.yaml | 2 + .../device-tree/Bindings/clock/qcom,rpmhcc.yaml | 4 + .../Bindings/clock/qcom,sc7180-camcc.yaml | 73 + .../clock/renesas,rcar-usb2-clock-sel.yaml | 103 + .../Bindings/clock/sifive/fu740-prci.yaml | 60 + .../device-tree/Bindings/clock/silabs,si570.txt | 2 + .../Bindings/connector/usb-connector.yaml | 80 +- .../Bindings/crypto/allwinner,sun8i-ce.yaml | 3 +- .../Bindings/crypto/intel,keembay-ocs-aes.yaml | 45 + .../Bindings/crypto/intel,keembay-ocs-hcu.yaml | 46 + .../Bindings/crypto/samsung-slimsss.yaml | 1 - .../device-tree/Bindings/crypto/samsung-sss.yaml | 1 - .../device-tree/Bindings/crypto/ti,sa2ul.yaml | 2 +- .../device-tree/Bindings/devfreq/exynos-bus.txt | 71 +- .../allwinner,sun4i-a10-display-backend.yaml | 23 +- .../allwinner,sun4i-a10-display-frontend.yaml | 19 +- .../Bindings/display/allwinner,sun4i-a10-hdmi.yaml | 19 +- .../Bindings/display/allwinner,sun4i-a10-tcon.yaml | 25 +- .../display/allwinner,sun4i-a10-tv-encoder.yaml | 6 +- .../Bindings/display/allwinner,sun6i-a31-drc.yaml | 19 +- .../display/allwinner,sun6i-a31-mipi-dsi.yaml | 6 +- .../display/allwinner,sun8i-a83t-de2-mixer.yaml | 19 +- .../display/allwinner,sun8i-a83t-dw-hdmi.yaml | 19 +- .../display/allwinner,sun8i-r40-tcon-top.yaml | 110 +- .../Bindings/display/allwinner,sun9i-a80-deu.yaml | 19 +- .../Bindings/display/amlogic,meson-dw-hdmi.yaml | 4 +- .../Bindings/display/amlogic,meson-vpu.yaml | 4 +- .../Bindings/display/brcm,bcm2711-hdmi.yaml | 19 + .../Bindings/display/brcm,bcm2835-dpi.yaml | 7 +- .../Bindings/display/brcm,bcm2835-dsi0.yaml | 1 + .../Bindings/display/brcm,bcm2835-hdmi.yaml | 1 + .../Bindings/display/brcm,bcm2835-hvs.yaml | 2 +- .../Bindings/display/bridge/analogix,anx7625.yaml | 95 + .../Bindings/display/bridge/analogix,anx7814.yaml | 19 +- .../Bindings/display/bridge/anx6345.yaml | 20 +- .../Bindings/display/bridge/cdns,mhdp8546.yaml | 22 +- .../Bindings/display/bridge/chrontel,ch7033.yaml | 6 +- .../Bindings/display/bridge/intel,keembay-dsi.yaml | 93 + .../Bindings/display/bridge/ite,it6505.yaml | 4 +- .../Bindings/display/bridge/lontium,lt9611.yaml | 75 +- .../Bindings/display/bridge/lvds-codec.yaml | 21 +- .../Bindings/display/bridge/nwl-dsi.yaml | 41 +- .../Bindings/display/bridge/ps8640.yaml | 26 +- .../Bindings/display/bridge/renesas,lvds.yaml | 24 +- .../Bindings/display/bridge/sii902x.txt | 6 +- .../Bindings/display/bridge/simple-bridge.yaml | 19 +- .../Bindings/display/bridge/snps,dw-mipi-dsi.yaml | 7 +- .../display/bridge/thine,thc63lvd1024.yaml | 36 +- .../Bindings/display/bridge/ti,sn65dsi86.yaml | 45 +- .../Bindings/display/bridge/ti,tfp410.yaml | 24 +- .../Bindings/display/bridge/toshiba,tc358762.yaml | 52 +- .../Bindings/display/bridge/toshiba,tc358768.yaml | 48 +- .../Bindings/display/bridge/toshiba,tc358775.yaml | 21 +- .../display/connector/analog-tv-connector.yaml | 1 + .../Bindings/display/connector/dp-connector.yaml | 55 + .../Bindings/display/connector/dvi-connector.yaml | 1 + .../Bindings/display/connector/hdmi-connector.yaml | 1 + .../Bindings/display/connector/vga-connector.yaml | 1 + .../Bindings/display/imx/fsl-imx-drm.txt | 2 +- .../Bindings/display/imx/nxp,imx8mq-dcss.yaml | 2 +- .../device-tree/Bindings/display/ingenic,ipu.yaml | 5 +- .../device-tree/Bindings/display/ingenic,lcd.yaml | 10 +- .../Bindings/display/intel,keembay-display.yaml | 72 + .../Bindings/display/intel,keembay-msscam.yaml | 43 + .../Bindings/display/mediatek/mediatek,disp.txt | 18 +- .../Bindings/display/mediatek/mediatek,dpi.yaml | 98 + .../Bindings/display/mediatek/mediatek,dsi.txt | 18 +- .../Bindings/display/mediatek/mediatek,hdmi.txt | 18 +- .../device-tree/Bindings/display/msm/gpu.txt | 7 + .../Bindings/display/panel/abt,y030xx067a.yaml | 62 + .../display/panel/advantech,idk-2121wr.yaml | 21 +- .../Bindings/display/panel/jdi,lt070me05000.yaml | 1 + .../display/panel/mantix,mlaf057we51-x.yaml | 4 +- .../Bindings/display/panel/novatek,nt36672a.yaml | 88 + .../Bindings/display/panel/panel-common.yaml | 11 +- .../Bindings/display/panel/panel-simple-dsi.yaml | 9 + .../Bindings/display/panel/panel-simple.yaml | 25 +- .../Bindings/display/panel/samsung,s6e63m0.yaml | 4 +- .../display/rockchip/rockchip,rk3066-hdmi.yaml | 16 +- .../Bindings/display/rockchip/rockchip-vop.yaml | 5 +- .../device-tree/Bindings/display/st,stm32-dsi.yaml | 12 +- .../Bindings/display/st,stm32-ltdc.yaml | 8 +- .../device-tree/Bindings/display/ste,mcde.yaml | 168 + .../display/tegra/nvidia,tegra20-host1x.txt | 72 +- .../Bindings/display/ti/ti,am65x-dss.yaml | 30 +- .../Bindings/display/ti/ti,j721e-dss.yaml | 34 +- .../Bindings/display/ti/ti,k2g-dss.yaml | 3 +- .../Bindings/display/xlnx/xlnx,zynqmp-dpsub.yaml | 1 - .../Bindings/dma/allwinner,sun50i-a64-dma.yaml | 5 +- .../device-tree/Bindings/dma/atmel-xdma.txt | 3 +- .../device-tree/Bindings/dma/dma-common.yaml | 4 +- .../device-tree/Bindings/dma/dma-router.yaml | 2 +- .../device-tree/Bindings/dma/ingenic,dma.yaml | 4 +- .../device-tree/Bindings/dma/intel,ldma.yaml | 116 + .../device-tree/Bindings/dma/mtk-uart-apdma.txt | 1 + .../Bindings/dma/nvidia,tegra210-adma.yaml | 99 + sys/contrib/device-tree/Bindings/dma/owl-dma.yaml | 7 +- sys/contrib/device-tree/Bindings/dma/qcom,gpi.yaml | 88 + .../Bindings/dma/renesas,rcar-dmac.yaml | 77 +- .../Bindings/dma/snps,dma-spear1340.yaml | 10 +- .../device-tree/Bindings/dma/snps,dw-axi-dmac.yaml | 126 + .../device-tree/Bindings/dma/ti/k3-bcdma.yaml | 166 + .../device-tree/Bindings/dma/ti/k3-pktdma.yaml | 174 + .../device-tree/Bindings/dma/ti/k3-udma.yaml | 4 +- sys/contrib/device-tree/Bindings/dsp/fsl,dsp.yaml | 2 +- .../Bindings/edac/aspeed-sdram-edac.txt | 9 +- sys/contrib/device-tree/Bindings/eeprom/at24.yaml | 13 +- sys/contrib/device-tree/Bindings/eeprom/at25.yaml | 7 +- .../Bindings/extcon/extcon-ptn5150.yaml | 2 + .../Bindings/extcon/extcon-usbc-tusb320.yaml | 41 + .../device-tree/Bindings/extcon/fcs,fsa880.yaml | 52 + .../device-tree/Bindings/extcon/wlf,arizona.yaml | 1 - .../device-tree/Bindings/firmware/qcom,scm.txt | 2 + .../device-tree/Bindings/fsi/ibm,p9-occ.txt | 12 +- .../device-tree/Bindings/gpio/gpio-davinci.txt | 1 + .../device-tree/Bindings/gpio/gpio-pca95xx.yaml | 5 +- .../device-tree/Bindings/gpio/gpio-xilinx.txt | 2 + .../Bindings/gpio/mediatek,mt7621-gpio.yaml | 72 + .../device-tree/Bindings/gpio/mrvl-gpio.yaml | 3 +- .../Bindings/gpio/mstar,msc313-gpio.yaml | 59 + .../Bindings/gpio/renesas,rcar-gpio.yaml | 3 + .../device-tree/Bindings/gpio/sifive,gpio.yaml | 29 +- .../Bindings/gpio/toshiba,gpio-visconti.yaml | 70 + .../device-tree/Bindings/gpu/arm,mali-bifrost.yaml | 17 + .../device-tree/Bindings/gpu/arm,mali-midgard.yaml | 17 + .../device-tree/Bindings/gpu/brcm,bcm-v3d.yaml | 75 + .../device-tree/Bindings/gpu/nvidia,gk20a.txt | 4 +- sys/contrib/device-tree/Bindings/graph.txt | 129 +- .../Bindings/hwlock/ti,omap-hwspinlock.yaml | 1 + .../device-tree/Bindings/hwmon/adi,ad741x.yaml | 39 + .../device-tree/Bindings/hwmon/adi,adm1275.yaml | 57 + .../device-tree/Bindings/hwmon/adi,ltc2947.yaml | 1 - .../device-tree/Bindings/hwmon/adi,ltc2992.yaml | 80 + .../device-tree/Bindings/hwmon/amd,sbtsi.yaml | 54 + .../device-tree/Bindings/hwmon/baikal,bt1-pvt.yaml | 8 +- .../Bindings/hwmon/moortec,mr75203.yaml | 2 +- sys/contrib/device-tree/Bindings/hwmon/pwm-fan.txt | 28 +- .../Bindings/hwmon/sensirion,shtc1.yaml | 4 +- .../device-tree/Bindings/hwmon/ti,ads7828.yaml | 57 + .../device-tree/Bindings/hwmon/ti,ina2xx.yaml | 55 + .../device-tree/Bindings/hwmon/ti,tmp513.yaml | 3 +- .../device-tree/Bindings/hwmon/ti,tps23861.yaml | 51 + sys/contrib/device-tree/Bindings/i2c/i2c-gate.yaml | 39 + sys/contrib/device-tree/Bindings/i2c/i2c-gpio.yaml | 2 - .../device-tree/Bindings/i2c/i2c-ocores.txt | 8 +- sys/contrib/device-tree/Bindings/i2c/i2c-omap.txt | 1 + sys/contrib/device-tree/Bindings/i2c/i2c-owl.yaml | 62 + .../Bindings/i2c/marvell,mv64xxx-i2c.yaml | 21 +- .../Bindings/i2c/mellanox,i2c-mlxbf.yaml | 78 + .../Bindings/i2c/nuvoton,npcm7xx-i2c.yaml | 2 +- .../device-tree/Bindings/i2c/renesas,i2c.txt | 1 + .../Bindings/i2c/snps,designware-i2c.yaml | 11 - sys/contrib/device-tree/Bindings/i3c/i3c.yaml | 179 + .../device-tree/Bindings/i3c/mipi-i3c-hci.yaml | 52 + .../Bindings/i3c/silvaco,i3c-master.yaml | 60 + .../Bindings/iio/accel/bosch,bma180.yaml | 62 + .../Bindings/iio/accel/bosch,bma255.yaml | 73 + .../Bindings/iio/accel/fsl,mma8452.yaml | 65 + .../Bindings/iio/accel/kionix,kxcjk1013.yaml | 49 + sys/contrib/device-tree/Bindings/iio/adc/adc.yaml | 42 + .../device-tree/Bindings/iio/adc/adi,ad7124.yaml | 14 +- .../device-tree/Bindings/iio/adc/adi,ad7192.yaml | 2 +- .../device-tree/Bindings/iio/adc/adi,ad7292.yaml | 8 +- .../device-tree/Bindings/iio/adc/adi,ad7768-1.yaml | 34 + .../Bindings/iio/adc/aspeed,ast2400-adc.yaml | 1 + .../Bindings/iio/adc/atmel,sama5d2-adc.yaml | 101 + .../Bindings/iio/adc/atmel,sama9260-adc.yaml | 121 + .../Bindings/iio/adc/brcm,iproc-static-adc.yaml | 70 + .../Bindings/iio/adc/envelope-detector.yaml | 86 + .../device-tree/Bindings/iio/adc/lltc,ltc2496.yaml | 5 +- .../Bindings/iio/adc/maxim,max1027.yaml | 65 + .../Bindings/iio/adc/maxim,max9611.yaml | 1 - .../Bindings/iio/adc/mediatek,mt2701-auxadc.yaml | 77 + .../Bindings/iio/adc/mediatek,mt6360-adc.yaml | 31 + .../Bindings/iio/adc/qcom,pm8018-adc.yaml | 166 + .../Bindings/iio/adc/qcom,spmi-iadc.yaml | 60 + .../Bindings/iio/adc/qcom,spmi-vadc.yaml | 4 +- .../Bindings/iio/adc/renesas,rcar-gyroadc.yaml | 143 + .../Bindings/iio/adc/samsung,exynos-adc.yaml | 4 - .../device-tree/Bindings/iio/adc/st,stm32-adc.yaml | 3 +- .../Bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 7 +- .../Bindings/iio/adc/ti,adc084s021.yaml | 58 + .../device-tree/Bindings/iio/adc/ti,ads124s08.yaml | 52 + .../Bindings/iio/adc/ti,palmas-gpadc.yaml | 85 + .../Bindings/iio/adc/x-powers,axp209-adc.yaml | 71 + .../device-tree/Bindings/iio/adc/xilinx-xadc.txt | 49 +- .../Bindings/iio/afe/current-sense-amplifier.yaml | 54 + .../Bindings/iio/afe/current-sense-shunt.yaml | 64 + .../Bindings/iio/afe/voltage-divider.yaml | 86 + .../device-tree/Bindings/iio/dac/adi,ad5592r.yaml | 204 + .../device-tree/Bindings/iio/dac/adi,ad5696.yaml | 57 + .../device-tree/Bindings/iio/dac/adi,ad5758.yaml | 140 + .../device-tree/Bindings/iio/dac/adi,ad5766.yaml | 63 + .../device-tree/Bindings/iio/dac/adi,ad7303.yaml | 50 + .../device-tree/Bindings/iio/dac/dpot-dac.yaml | 64 + .../Bindings/iio/dac/fsl,vf610-dac.yaml | 55 + .../device-tree/Bindings/iio/dac/maxim,ds4424.yaml | 45 + .../Bindings/iio/dac/maxim,max5821.yaml | 44 + .../Bindings/iio/dac/microchip,mcp4725.yaml | 90 + .../Bindings/iio/dac/nxp,lpc1850-dac.yaml | 58 + .../device-tree/Bindings/iio/dac/ti,dac5571.yaml | 52 + .../device-tree/Bindings/iio/dac/ti,dac7311.yaml | 49 + .../device-tree/Bindings/iio/dac/ti,dac7512.yaml | 42 + .../device-tree/Bindings/iio/dac/ti,dac7612.yaml | 53 + .../Bindings/iio/frequency/adi,adf4350.yaml | 190 + .../Bindings/iio/gyroscope/bosch,bmg160.yaml | 49 + .../Bindings/iio/gyroscope/invensense,mpu3050.yaml | 70 + .../Bindings/iio/gyroscope/nxp,fxas21002c.yaml | 95 + .../Bindings/iio/health/maxim,max30100.yaml | 51 + .../Bindings/iio/health/maxim,max30102.yaml | 72 + .../Bindings/iio/health/ti,afe4403.yaml | 54 + .../Bindings/iio/health/ti,afe4404.yaml | 51 + .../device-tree/Bindings/iio/humidity/dht11.yaml | 41 + .../Bindings/iio/humidity/st,hts221.yaml | 54 + .../Bindings/iio/humidity/ti,hdc2010.yaml | 3 +- .../iio/impedance-analyzer/adi,ad5933.yaml | 59 + .../Bindings/iio/imu/adi,adis16480.yaml | 130 + .../Bindings/iio/imu/invensense,mpu6050.yaml | 104 + .../device-tree/Bindings/iio/imu/st,lsm6dsx.yaml | 93 + .../Bindings/iio/light/avago,apds9300.yaml | 44 + .../Bindings/iio/light/avago,apds9960.yaml | 44 + .../Bindings/iio/light/capella,cm3605.yaml | 79 + .../Bindings/iio/light/capella,cm36651.yaml | 48 + .../Bindings/iio/light/maxim,max44009.yaml | 45 + .../Bindings/iio/light/sharp,gp2ap020a00f.yaml | 48 + .../device-tree/Bindings/iio/light/st,uvis25.yaml | 42 + .../device-tree/Bindings/iio/light/st,vl6180.yaml | 45 + .../device-tree/Bindings/iio/light/ti,opt3001.yaml | 47 + .../Bindings/iio/light/upisemi,us5182.yaml | 78 + .../Bindings/iio/light/vishay,vcnl4035.yaml | 45 + .../iio/magnetometer/asahi-kasei,ak8974.yaml | 57 + .../iio/magnetometer/asahi-kasei,ak8975.yaml | 1 + .../iio/magnetometer/bosch,bmc150_magn.yaml | 58 + .../Bindings/iio/magnetometer/fsl,mag3110.yaml | 48 + .../iio/magnetometer/honeywell,hmc5843.yaml | 43 + .../Bindings/iio/magnetometer/pni,rm3100.yaml | 42 + .../Bindings/iio/magnetometer/yamaha,yas530.yaml | 112 + .../Bindings/iio/potentiometer/adi,ad5272.yaml | 51 + .../iio/potentiometer/microchip,mcp41010.yaml | 48 + .../iio/potentiometer/microchip,mcp4131.yaml | 103 + .../iio/potentiometer/microchip,mcp4531.yaml | 116 + .../Bindings/iio/potentiostat/ti,lmp91000.yaml | 68 + .../Bindings/iio/pressure/hoperf,hp03.yaml | 47 + .../Bindings/iio/pressure/meas,ms5611.yaml | 57 + .../Bindings/iio/pressure/murata,zpa2326.yaml | 62 + .../Bindings/iio/proximity/ams,as3935.yaml | 71 + .../Bindings/iio/proximity/semtech,sx9310.yaml | 63 + .../Bindings/iio/proximity/semtech,sx9500.yaml | 50 + .../Bindings/iio/proximity/st,vl53l0x.yaml | 42 + .../Bindings/iio/resolver/adi,ad2s90.yaml | 60 + .../Bindings/iio/samsung,sensorhub-rinato.yaml | 72 + .../device-tree/Bindings/iio/st,st-sensors.yaml | 123 + .../Bindings/iio/temperature/maxim,max31855k.yaml | 76 + .../Bindings/iio/temperature/maxim,max31856.yaml | 54 + .../Bindings/iio/temperature/melexis,mlx90614.yaml | 50 + .../Bindings/iio/temperature/melexis,mlx90632.yaml | 55 + .../Bindings/iio/temperature/ti,tmp007.yaml | 57 + .../device-tree/Bindings/input/adc-keys.txt | 22 +- .../Bindings/input/ariel-pwrbutton.yaml | 57 + .../device-tree/Bindings/input/atmel,maxtouch.yaml | 81 + .../Bindings/input/cypress,tm2-touchkey.yaml | 73 + .../device-tree/Bindings/input/dlg,da7280.txt | 108 + .../Bindings/input/fsl,mpr121-touchkey.yaml | 3 +- .../device-tree/Bindings/input/goodix,gt7375p.yaml | 65 + .../Bindings/input/google,cros-ec-keyb.yaml | 24 + .../device-tree/Bindings/input/gpio-keys.yaml | 12 +- .../Bindings/input/sprd,sc27xx-vibrator.yaml | 48 + .../Bindings/input/touchscreen/edt-ft5x06.yaml | 3 +- .../Bindings/input/touchscreen/ektf2127.txt | 2 +- .../input/touchscreen/elan,elants_i2c.yaml | 1 + .../Bindings/input/touchscreen/goodix.yaml | 1 + .../Bindings/input/touchscreen/touchscreen.yaml | 2 - .../Bindings/interconnect/qcom,rpm.yaml | 85 + .../Bindings/interconnect/qcom,rpmh.yaml | 6 +- .../allwinner,sun6i-a31-r-intc.yaml | 67 + .../allwinner,sun7i-a20-sc-nmi.yaml | 11 +- .../Bindings/interrupt-controller/arm,gic.yaml | 9 +- .../Bindings/interrupt-controller/fsl,intmux.yaml | 2 +- .../interrupt-controller/fsl,ls-extirq.txt | 8 +- .../interrupt-controller/ingenic,intc.yaml | 1 + .../mscc,ocelot-icpu-intr.yaml | 64 + .../Bindings/interrupt-controller/mti,gic.yaml | 4 +- .../Bindings/interrupt-controller/qcom,pdc.txt | 2 + .../interrupt-controller/realtek,rtl-intc.yaml | 57 + .../interrupt-controller/sifive,plic-1.0.0.yaml | 13 +- .../interrupt-controller/st,stm32-exti.yaml | 2 + .../interrupt-controller/ti,pruss-intc.yaml | 5 +- .../Bindings/interrupt-controller/ti,sci-inta.yaml | 2 +- .../device-tree/Bindings/iommu/arm,smmu.yaml | 11 +- .../device-tree/Bindings/iommu/mediatek,iommu.yaml | 183 + .../Bindings/iommu/renesas,ipmmu-vmsa.yaml | 14 +- .../Bindings/leds/backlight/common.yaml | 4 +- sys/contrib/device-tree/Bindings/leds/common.yaml | 16 +- .../device-tree/Bindings/leds/leds-lgm.yaml | 113 + .../device-tree/Bindings/leds/leds-lp55xx.yaml | 10 +- .../device-tree/Bindings/leds/leds-pwm.yaml | 70 + .../device-tree/Bindings/leds/richtek,rt8515.yaml | 111 + .../device-tree/Bindings/leds/ti,tca6507.yaml | 1 + .../device-tree/Bindings/mailbox/arm,mhu.yaml | 1 - .../device-tree/Bindings/mailbox/arm,mhuv2.yaml | 209 + .../device-tree/Bindings/mailbox/omap-mailbox.txt | 4 + .../Bindings/mailbox/qcom,apcs-kpss-global.yaml | 34 + .../device-tree/Bindings/media/allegro,al5e.yaml | 105 + .../Bindings/media/allwinner,sun4i-a10-csi.yaml | 11 +- .../media/allwinner,sun4i-a10-video-engine.yaml | 3 + .../Bindings/media/allwinner,sun6i-a31-csi.yaml | 12 +- .../media/allwinner,sun8i-h3-deinterlace.yaml | 3 + .../Bindings/media/amlogic,axg-ge2d.yaml | 47 + sys/contrib/device-tree/Bindings/media/coda.yaml | 108 + .../device-tree/Bindings/media/i2c/adv7180.yaml | 36 +- .../device-tree/Bindings/media/i2c/adv7604.yaml | 159 + .../Bindings/media/i2c/aptina,mt9v111.yaml | 75 + .../Bindings/media/i2c/imi,rdacm2x-gmsl.yaml | 30 +- .../device-tree/Bindings/media/i2c/imx219.yaml | 22 +- .../device-tree/Bindings/media/i2c/imx258.yaml | 134 + .../Bindings/media/i2c/maxim,max9286.yaml | 118 +- .../device-tree/Bindings/media/i2c/mipi-ccs.yaml | 132 + .../device-tree/Bindings/media/i2c/ov8856.yaml | 22 +- .../Bindings/media/i2c/ovti,ov02a10.yaml | 154 + .../Bindings/media/i2c/ovti,ov2680.yaml | 97 + .../Bindings/media/i2c/ovti,ov5647.yaml | 75 + .../Bindings/media/i2c/ovti,ov5648.yaml | 109 + .../Bindings/media/i2c/ovti,ov772x.yaml | 133 + .../Bindings/media/i2c/ovti,ov8865.yaml | 118 + .../Bindings/media/i2c/sony,imx214.yaml | 125 + .../Bindings/media/i2c/sony,imx274.yaml | 6 +- .../Bindings/media/i2c/sony,imx334.yaml | 90 + .../Bindings/media/marvell,mmp2-ccic.yaml | 20 +- .../Bindings/media/mediatek-jpeg-decoder.txt | 2 +- .../Bindings/media/mediatek-jpeg-encoder.txt | 2 +- .../device-tree/Bindings/media/mediatek-mdp.txt | 2 +- .../device-tree/Bindings/media/nxp,imx7-csi.yaml | 68 + .../Bindings/media/nxp,imx7-mipi-csi2.yaml | 153 + .../device-tree/Bindings/media/qcom,camss.txt | 7 + sys/contrib/device-tree/Bindings/media/rc.yaml | 2 + .../device-tree/Bindings/media/renesas,ceu.yaml | 17 +- .../device-tree/Bindings/media/renesas,csi2.yaml | 54 +- .../device-tree/Bindings/media/renesas,vin.yaml | 113 +- .../device-tree/Bindings/media/rockchip-isp1.yaml | 185 + .../device-tree/Bindings/media/st,stm32-dcmi.yaml | 40 +- sys/contrib/device-tree/Bindings/media/ti,cal.yaml | 55 +- .../Bindings/media/video-interface-devices.yaml | 406 ++ .../Bindings/media/video-interfaces.txt | 640 +-- .../Bindings/media/video-interfaces.yaml | 344 ++ .../Bindings/media/xilinx/xlnx,csi2rxss.yaml | 39 +- .../Bindings/memory-controllers/exynos-srom.yaml | 2 + .../memory-controllers/mediatek,smi-common.yaml | 142 + .../memory-controllers/mediatek,smi-larb.yaml | 132 + .../memory-controllers/nvidia,tegra124-emc.yaml | 19 + .../memory-controllers/nvidia,tegra124-mc.yaml | 5 + .../memory-controllers/nvidia,tegra20-emc.txt | 28 +- .../memory-controllers/nvidia,tegra20-mc.txt | 3 + .../memory-controllers/nvidia,tegra30-emc.yaml | 18 + .../memory-controllers/nvidia,tegra30-mc.yaml | 5 + .../memory-controllers/renesas,rpc-if.yaml | 6 +- .../device-tree/Bindings/mfd/aspeed-lpc.txt | 8 +- .../device-tree/Bindings/mfd/aspeed-scu.txt | 26 + sys/contrib/device-tree/Bindings/mfd/bd9571mwv.txt | 4 +- .../Bindings/mfd/canaan,k210-sysctl.yaml | 109 + .../device-tree/Bindings/mfd/ene-kb930.yaml | 65 + .../device-tree/Bindings/mfd/gateworks-gsc.yaml | 3 +- sys/contrib/device-tree/Bindings/mfd/iqs62x.yaml | 2 +- .../Bindings/mfd/rohm,bd71837-pmic.yaml | 6 + .../device-tree/Bindings/mfd/st,stm32-timers.yaml | 6 +- sys/contrib/device-tree/Bindings/mfd/st,stmfx.yaml | 3 +- sys/contrib/device-tree/Bindings/mfd/syscon.yaml | 4 + .../Bindings/mips/lantiq/lantiq,cgu.yaml | 32 + .../Bindings/mips/lantiq/lantiq,dma-xway.yaml | 32 + .../Bindings/mips/lantiq/lantiq,ebu.yaml | 32 + .../Bindings/mips/lantiq/lantiq,pmu.yaml | 32 + sys/contrib/device-tree/Bindings/mips/mscc.txt | 2 +- .../device-tree/Bindings/mips/realtek-rtl.yaml | 24 + .../device-tree/Bindings/misc/eeprom-93xx46.txt | 1 + .../Bindings/misc/fsl,dpaa2-console.yaml | 26 + .../Bindings/mmc/allwinner,sun4i-a10-mmc.yaml | 8 + .../device-tree/Bindings/mmc/arasan,sdhci.yaml | 2 +- .../device-tree/Bindings/mmc/arm,pl18x.yaml | 223 + .../device-tree/Bindings/mmc/fsl-imx-esdhc.yaml | 1 + .../Bindings/mmc/marvell,xenon-sdhci.txt | 1 + .../device-tree/Bindings/mmc/mmc-controller.yaml | 3 +- .../Bindings/mmc/mmc-pwrseq-simple.yaml | 2 - sys/contrib/device-tree/Bindings/mmc/mtk-sd.yaml | 176 + sys/contrib/device-tree/Bindings/mmc/owl-mmc.yaml | 4 +- .../device-tree/Bindings/mmc/renesas,sdhi.yaml | 3 +- .../device-tree/Bindings/mmc/sdhci-am654.yaml | 19 +- sys/contrib/device-tree/Bindings/mmc/sdhci-msm.txt | 8 +- .../device-tree/Bindings/mtd/gpmi-nand.yaml | 76 +- .../device-tree/Bindings/mtd/intel,lgm-nand.yaml | 99 + .../device-tree/Bindings/mtd/jedec,spi-nor.yaml | 102 + .../device-tree/Bindings/mtd/nand-controller.yaml | 11 +- sys/contrib/device-tree/Bindings/mtd/partition.txt | 131 +- .../mtd/partitions/brcm,bcm4908-partitions.yaml | 70 + .../Bindings/mtd/partitions/fixed-partitions.yaml | 121 + .../Bindings/mtd/partitions/partition.yaml | 47 + .../Bindings/mtd/partitions/qcom,smem-part.yaml | 33 + .../device-tree/Bindings/mtd/qcom_nandc.txt | 4 + .../Bindings/mtd/rockchip,nand-controller.yaml | 161 + .../Bindings/net/allwinner,sun8i-a83t-emac.yaml | 6 +- .../Bindings/net/amlogic,meson-dwmac.yaml | 57 +- .../Bindings/net/brcm,bcm4908-enet.yaml | 48 + .../Bindings/net/brcm,bcm7445-switch-v4.0.txt | 101 +- sys/contrib/device-tree/Bindings/net/btusb.txt | 4 +- .../device-tree/Bindings/net/can/fsl,flexcan.yaml | 16 +- .../device-tree/Bindings/net/can/rcar_canfd.txt | 2 +- .../Bindings/net/dsa/arrow,xrs700x.yaml | 73 + .../device-tree/Bindings/net/dsa/brcm,b53.yaml | 249 ++ .../device-tree/Bindings/net/dsa/brcm,sf2.yaml | 173 + sys/contrib/device-tree/Bindings/net/dsa/dsa.yaml | 12 +- .../Bindings/net/dsa/hirschmann,hellcreek.yaml | 127 + .../Bindings/net/dsa/microchip,ksz.yaml | 148 + .../device-tree/Bindings/net/dsa/mt7530.txt | 6 + .../Bindings/net/ethernet-controller.yaml | 33 +- .../device-tree/Bindings/net/ethernet-phy.yaml | 20 +- .../Bindings/net/fsl,qoriq-mc-dpmac.yaml | 60 + sys/contrib/device-tree/Bindings/net/ftgmac100.txt | 25 + sys/contrib/device-tree/Bindings/net/macb.txt | 4 +- .../device-tree/Bindings/net/marvell-pp2.txt | 6 +- sys/contrib/device-tree/Bindings/net/mdio.yaml | 2 +- .../Bindings/net/mediatek,star-emac.yaml | 2 +- .../device-tree/Bindings/net/nfc/nxp-nci.txt | 2 +- .../Bindings/net/nfc/samsung,s3fwrn5.yaml | 33 +- .../device-tree/Bindings/net/qca,ar803x.yaml | 16 + sys/contrib/device-tree/Bindings/net/qcom,ipa.yaml | 16 +- .../device-tree/Bindings/net/renesas,etheravb.yaml | 3 + .../device-tree/Bindings/net/snps,dwmac.yaml | 45 +- .../Bindings/net/socionext,uniphier-ave4.yaml | 2 +- .../device-tree/Bindings/net/ti,cpsw-switch.yaml | 2 +- .../device-tree/Bindings/net/ti,dp83867.yaml | 12 +- .../device-tree/Bindings/net/ti,dp83869.yaml | 8 +- .../Bindings/net/ti,k3-am654-cpsw-nuss.yaml | 55 +- .../device-tree/Bindings/net/ti,k3-am654-cpts.yaml | 8 + .../Bindings/net/toshiba,visconti-dwmac.yaml | 85 + .../Bindings/net/wireless/qcom,ath11k.yaml | 8 +- .../device-tree/Bindings/net/xilinx_axienet.txt | 4 + .../device-tree/Bindings/nvmem/mtk-efuse.txt | 1 + .../device-tree/Bindings/nvmem/qcom,qfprom.yaml | 17 +- sys/contrib/device-tree/Bindings/nvmem/rmem.yaml | 49 + sys/contrib/device-tree/Bindings/opp/opp.txt | 54 +- .../device-tree/Bindings/pci/brcm,stb-pcie.yaml | 37 +- .../device-tree/Bindings/pci/cdns-pcie-ep.yaml | 3 - .../device-tree/Bindings/pci/layerscape-pci.txt | 1 + .../Bindings/pci/microchip,pcie-host.yaml | 92 + sys/contrib/device-tree/Bindings/pci/qcom,pcie.txt | 19 +- .../device-tree/Bindings/pci/rcar-pci-ep.yaml | 9 + .../device-tree/Bindings/pci/rcar-pci-host.yaml | 115 + .../Bindings/pci/samsung,exynos-pcie.yaml | 119 + .../device-tree/Bindings/pci/ti,j721e-pci-ep.yaml | 23 +- .../Bindings/pci/ti,j721e-pci-host.yaml | 27 +- .../device-tree/Bindings/perf/fsl-imx-ddr.yaml | 3 + .../Bindings/phy/allwinner,sun4i-a10-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun50i-a64-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun50i-h6-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun5i-a13-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun6i-a31-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun8i-a23-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun8i-a83t-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun8i-h3-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun8i-r40-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun8i-v3s-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun9i-a80-usb-phy.yaml | 19 +- .../Bindings/phy/amlogic,axg-mipi-dphy.yaml | 70 + .../phy/amlogic,meson-axg-mipi-pcie-analog.yaml | 21 +- .../Bindings/phy/brcm,brcmstb-usb-phy.yaml | 196 + .../device-tree/Bindings/phy/brcm,sata-phy.yaml | 147 + .../device-tree/Bindings/phy/ingenic,phy-usb.yaml | 58 + .../Bindings/phy/intel,phy-keembay-usb.yaml | 44 + .../Bindings/phy/marvell,mmp3-hsic-phy.yaml | 9 +- .../device-tree/Bindings/phy/mediatek,dsi-phy.yaml | 85 + .../Bindings/phy/mediatek,hdmi-phy.yaml | 92 + .../Bindings/phy/mediatek,mt7621-pci-phy.yaml | 36 + .../device-tree/Bindings/phy/mediatek,tphy.yaml | 260 ++ .../device-tree/Bindings/phy/mediatek,ufs-phy.yaml | 64 + .../device-tree/Bindings/phy/mediatek,xsphy.yaml | 199 + .../Bindings/phy/phy-cadence-sierra.yaml | 152 + .../Bindings/phy/phy-stm32-usbphyc.yaml | 136 + .../device-tree/Bindings/phy/qcom,qmp-phy.yaml | 103 + .../device-tree/Bindings/phy/qcom,qusb2-phy.yaml | 2 + .../device-tree/Bindings/phy/qcom,usb-hs-28nm.yaml | 1 + .../Bindings/phy/qcom,usb-snps-femto-v2.yaml | 2 + .../device-tree/Bindings/phy/renesas,usb2-phy.yaml | 5 +- .../device-tree/Bindings/phy/rockchip-emmc-phy.txt | 5 + .../Bindings/phy/samsung,exynos-pcie-phy.yaml | 51 + .../device-tree/Bindings/phy/samsung-phy.txt | 1 + .../Bindings/phy/socionext,uniphier-ahci-phy.yaml | 2 +- .../Bindings/phy/socionext,uniphier-pcie-phy.yaml | 2 +- .../phy/socionext,uniphier-usb3hs-phy.yaml | 2 +- .../phy/socionext,uniphier-usb3ss-phy.yaml | 2 +- .../device-tree/Bindings/phy/ti,omap-usb2.yaml | 4 +- .../device-tree/Bindings/phy/ti,phy-gmii-sel.yaml | 2 +- .../device-tree/Bindings/phy/ti,phy-j721e-wiz.yaml | 2 +- .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml | 17 +- .../Bindings/pinctrl/aspeed,ast2400-pinctrl.yaml | 5 +- .../Bindings/pinctrl/aspeed,ast2500-pinctrl.yaml | 6 +- .../Bindings/pinctrl/aspeed,ast2600-pinctrl.yaml | 2 +- .../Bindings/pinctrl/atmel,at91-pio4-pinctrl.txt | 8 +- .../Bindings/pinctrl/brcm,ns2-pinmux.txt | 2 +- .../Bindings/pinctrl/brcm,nsp-pinmux.txt | 2 +- .../Bindings/pinctrl/canaan,k210-fpioa.yaml | 171 + .../Bindings/pinctrl/fsl,imx7d-pinctrl.txt | 2 +- .../Bindings/pinctrl/microchip,sparx5-sgpio.yaml | 161 + .../Bindings/pinctrl/mscc,ocelot-pinctrl.txt | 3 +- .../Bindings/pinctrl/nvidia,tegra194-pinmux.txt | 2 +- .../Bindings/pinctrl/pinctrl-bindings.txt | 4 +- .../Bindings/pinctrl/pinctrl-mcp23s08.txt | 2 +- .../Bindings/pinctrl/pinctrl-mt65xx.txt | 2 +- .../Bindings/pinctrl/pinctrl-single.txt | 12 +- .../Bindings/pinctrl/qcom,lpass-lpi-pinctrl.yaml | 130 + .../Bindings/pinctrl/qcom,msm8953-pinctrl.yaml | 167 + .../Bindings/pinctrl/qcom,pmic-gpio.txt | 3 + .../device-tree/Bindings/pinctrl/qcom,pmic-mpp.txt | 1 + .../Bindings/pinctrl/qcom,sc7280-pinctrl.yaml | 158 + .../Bindings/pinctrl/qcom,sc8180x-pinctrl.yaml | 152 + .../Bindings/pinctrl/qcom,sdx55-pinctrl.yaml | 154 + .../Bindings/pinctrl/qcom,sm8350-pinctrl.yaml | 145 + .../Bindings/pinctrl/qcom,tlmm-common.yaml | 85 + .../Bindings/pinctrl/ralink,rt2880-pinmux.yaml | 64 + .../device-tree/Bindings/pinctrl/renesas,pfc.yaml | 12 +- .../Bindings/pinctrl/samsung-pinctrl.txt | 2 +- .../device-tree/Bindings/power/brcm,bcm-pmb.yaml | 50 + .../Bindings/power/mediatek,power-controller.yaml | 304 ++ .../device-tree/Bindings/power/qcom,rpmpd.yaml | 5 + .../device-tree/Bindings/power/renesas,apmu.yaml | 2 +- .../Bindings/power/reset/ocelot-reset.txt | 4 +- .../Bindings/power/reset/regulator-poweroff.yaml | 37 + .../device-tree/Bindings/power/supply/battery.yaml | 3 - .../device-tree/Bindings/power/supply/bq2515x.yaml | 1 - .../device-tree/Bindings/power/supply/bq256xx.yaml | 110 + .../device-tree/Bindings/power/supply/bq25980.yaml | 1 + .../Bindings/power/supply/cw2015_battery.yaml | 2 +- .../Bindings/power/supply/ltc4162-l.yaml | 69 + .../device-tree/Bindings/powerpc/sleep.yaml | 2 +- .../device-tree/Bindings/ptp/ptp-idtcm.yaml | 4 +- .../Bindings/pwm/intel,keembay-pwm.yaml | 47 + .../device-tree/Bindings/pwm/intel,lgm-pwm.yaml | 44 + .../device-tree/Bindings/pwm/pwm-mediatek.txt | 1 + .../device-tree/Bindings/pwm/pwm-mtk-disp.txt | 1 + .../device-tree/Bindings/pwm/pwm-sifive.yaml | 9 +- .../Bindings/regulator/anatop-regulator.yaml | 1 - .../device-tree/Bindings/regulator/dlg,da9121.yaml | 188 + .../Bindings/regulator/fixed-regulator.yaml | 49 +- .../Bindings/regulator/max8997-regulator.txt | 1 + .../Bindings/regulator/mcp16502-regulator.txt | 5 +- .../Bindings/regulator/mt6315-regulator.yaml | 69 + .../Bindings/regulator/nxp,pca9450-regulator.yaml | 5 + .../Bindings/regulator/nxp,pf8x00-regulator.yaml | 206 + .../Bindings/regulator/qcom,rpmh-regulator.txt | 9 + .../Bindings/regulator/qcom-labibb-regulator.yaml | 30 +- .../regulator/richtek,rt4831-regulator.yaml | 35 + .../Bindings/regulator/rohm,bd71837-regulator.yaml | 48 + .../Bindings/regulator/rohm,bd71847-regulator.yaml | 49 + .../Bindings/remoteproc/ingenic,vpu.yaml | 2 +- .../device-tree/Bindings/remoteproc/mtk,scp.txt | 8 +- .../device-tree/Bindings/remoteproc/qcom,adsp.txt | 12 + .../device-tree/Bindings/remoteproc/qcom,q6v5.txt | 12 +- .../Bindings/remoteproc/qcom,wcnss-pil.txt | 21 +- .../Bindings/remoteproc/st,stm32-rproc.yaml | 21 +- .../Bindings/remoteproc/ti,k3-r5f-rproc.yaml | 2 + .../Bindings/remoteproc/ti,omap-remoteproc.yaml | 3 + .../Bindings/remoteproc/ti,pru-rproc.yaml | 214 + .../reset/brcm,bcm4908-misc-pcie-reset.yaml | 39 + .../Bindings/reset/brcm,bcm6345-reset.yaml | 37 + .../Bindings/reset/canaan,k210-rst.yaml | 40 + .../Bindings/reset/hisilicon,hi3660-reset.yaml | 77 + .../device-tree/Bindings/reset/snps,dw-reset.txt | 2 +- sys/contrib/device-tree/Bindings/riscv/canaan.yaml | 47 + sys/contrib/device-tree/Bindings/riscv/cpus.yaml | 8 + .../Bindings/riscv/sifive-l2-cache.yaml | 35 +- sys/contrib/device-tree/Bindings/riscv/sifive.yaml | 17 +- .../Bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 1 - .../Bindings/rtc/atmel,at91rm9200-rtc.yaml | 1 + .../device-tree/Bindings/rtc/nxp,pcf2127.yaml | 51 + sys/contrib/device-tree/Bindings/rtc/pcf8563.txt | 3 +- sys/contrib/device-tree/Bindings/rtc/rtc.yaml | 7 +- .../device-tree/Bindings/rtc/trivial-rtc.yaml | 6 +- sys/contrib/device-tree/Bindings/serial/8250.yaml | 6 +- .../device-tree/Bindings/serial/fsl-imx-uart.yaml | 2 +- .../device-tree/Bindings/serial/fsl-mxs-auart.yaml | 2 +- .../Bindings/serial/litex,liteuart.yaml | 40 + .../device-tree/Bindings/serial/omap_serial.txt | 1 + sys/contrib/device-tree/Bindings/serial/pl011.yaml | 4 - .../device-tree/Bindings/serial/renesas,hscif.yaml | 3 + .../device-tree/Bindings/serial/renesas,scif.yaml | 3 + .../device-tree/Bindings/serial/renesas,scifa.yaml | 2 + .../device-tree/Bindings/serial/renesas,scifb.yaml | 2 + .../device-tree/Bindings/serial/sifive-serial.yaml | 5 +- .../device-tree/Bindings/serial/st,stm32-uart.yaml | 13 +- .../device-tree/Bindings/soc/imx/imx8m-soc.yaml | 86 + .../Bindings/soc/litex/litex,soc-controller.yaml | 41 + .../device-tree/Bindings/soc/mediatek/devapc.yaml | 60 + .../soc/microchip/atmel,at91rm9200-tcb.yaml | 34 +- .../Bindings/soc/qcom/qcom,aoss-qmp.txt | 1 + .../device-tree/Bindings/soc/qcom/qcom,smem.yaml | 72 + .../device-tree/Bindings/soc/ti/k3-ringacc.yaml | 2 +- .../device-tree/Bindings/soc/ti/ti,pruss.yaml | 76 + .../Bindings/soc/xilinx/xlnx,vcu-settings.yaml | 43 + .../device-tree/Bindings/soc/xilinx/xlnx,vcu.txt | 9 +- .../device-tree/Bindings/sound/adi,adau1372.yaml | 67 + .../device-tree/Bindings/sound/adi,adau1977.yaml | 92 + .../Bindings/sound/allwinner,sun4i-a10-codec.yaml | 3 +- .../Bindings/sound/allwinner,sun4i-a10-i2s.yaml | 6 +- .../Bindings/sound/audio-graph-card.yaml | 57 + .../Bindings/sound/audio-graph-port.yaml | 81 + .../device-tree/Bindings/sound/audio-graph.yaml | 45 + .../device-tree/Bindings/sound/fsl,aud2htx.yaml | 66 + .../device-tree/Bindings/sound/fsl,spdif.yaml | 5 + .../device-tree/Bindings/sound/fsl,xcvr.yaml | 104 + .../device-tree/Bindings/sound/fsl-asoc-card.txt | 2 + .../Bindings/sound/google,sc7180-trogdor.yaml | 139 + .../device-tree/Bindings/sound/imx-audio-hdmi.yaml | 52 + .../device-tree/Bindings/sound/ingenic,codec.yaml | 11 +- .../Bindings/sound/intel,keembay-i2s.yaml | 13 + .../Bindings/sound/marvell,mmp-sspa.yaml | 25 +- .../sound/mt8192-mt6359-rt1015-rt5682.yaml | 49 + sys/contrib/device-tree/Bindings/sound/nau8315.txt | 18 + .../sound/nvidia,tegra-audio-graph-card.yaml | 190 + .../Bindings/sound/nvidia,tegra186-dspk.yaml | 18 +- .../Bindings/sound/nvidia,tegra210-admaif.yaml | 13 +- .../Bindings/sound/nvidia,tegra210-ahub.yaml | 13 +- .../Bindings/sound/nvidia,tegra210-dmic.yaml | 18 +- .../Bindings/sound/nvidia,tegra210-i2s.yaml | 18 +- .../Bindings/sound/nvidia,tegra30-hda.yaml | 110 + .../Bindings/sound/qcom,lpass-rx-macro.yaml | 62 + .../Bindings/sound/qcom,lpass-tx-macro.yaml | 67 + .../Bindings/sound/qcom,lpass-va-macro.yaml | 67 + .../Bindings/sound/qcom,lpass-wsa-macro.yaml | 69 + .../device-tree/Bindings/sound/qcom,sm8250.yaml | 159 + .../device-tree/Bindings/sound/renesas,rsnd.txt | 520 --- .../device-tree/Bindings/sound/renesas,rsnd.yaml | 447 ++ sys/contrib/device-tree/Bindings/sound/rt5659.txt | 11 + sys/contrib/device-tree/Bindings/sound/rt5682.txt | 2 + .../Bindings/sound/samsung,aries-wm8994.yaml | 3 + .../Bindings/sound/samsung,midas-audio.yaml | 2 + .../device-tree/Bindings/sound/sgtl5000.yaml | 2 - .../Bindings/sound/simple-audio-mux.yaml | 41 + .../device-tree/Bindings/sound/simple-card.yaml | 6 +- .../device-tree/Bindings/sound/st,stm32-i2s.yaml | 4 + .../device-tree/Bindings/sound/st,stm32-sai.yaml | 200 + .../device-tree/Bindings/sound/tas2562.yaml | 2 + .../device-tree/Bindings/sound/tas2770.yaml | 2 + .../Bindings/sound/ti,j721e-cpb-audio.yaml | 4 +- .../Bindings/sound/ti,j721e-cpb-ivi-audio.yaml | 4 +- .../device-tree/Bindings/sound/tlv320adcx140.yaml | 1 + sys/contrib/device-tree/Bindings/sound/wm8962.txt | 4 + .../Bindings/spi/allwinner,sun6i-a31-spi.yaml | 1 + .../device-tree/Bindings/spi/cadence-quadspi.txt | 68 + .../Bindings/spi/nvidia,tegra210-quad.yaml | 117 + .../device-tree/Bindings/spi/realtek,rtl-spi.yaml | 41 + .../device-tree/Bindings/spi/renesas,rspi.yaml | 2 + .../device-tree/Bindings/spi/renesas,sh-msiof.yaml | 1 + .../device-tree/Bindings/spi/snps,dw-apb-ssi.yaml | 2 + .../device-tree/Bindings/spi/spi-controller.yaml | 33 +- .../device-tree/Bindings/spi/spi-sifive.yaml | 10 +- .../device-tree/Bindings/spi/xlnx,zynq-qspi.yaml | 59 + .../sram/allwinner,sun4i-a10-system-control.yaml | 1 + sys/contrib/device-tree/Bindings/sram/sram.yaml | 4 + .../device-tree/Bindings/submitting-patches.rst | 3 +- .../Bindings/thermal/allwinner,sun8i-a83t-ths.yaml | 12 +- .../Bindings/thermal/mediatek-thermal.txt | 3 +- .../Bindings/thermal/qcom-spmi-adc-tm5.yaml | 153 + .../Bindings/thermal/rcar-gen3-thermal.yaml | 17 +- .../device-tree/Bindings/thermal/rcar-thermal.yaml | 48 +- .../Bindings/timer/allwinner,sun4i-a10-timer.yaml | 2 + .../timer/allwinner,sun5i-a13-hstimer.yaml | 3 +- .../Bindings/timer/intel,ixp4xx-timer.yaml | 2 +- .../Bindings/timer/nuvoton,npcm7xx-timer.txt | 3 +- .../device-tree/Bindings/timer/renesas,tmu.yaml | 99 + .../device-tree/Bindings/timer/sifive,clint.yaml | 12 +- .../Bindings/timer/snps,dw-apb-timer.yaml | 10 +- .../device-tree/Bindings/trivial-devices.yaml | 208 +- .../Bindings/usb/allwinner,sun4i-a10-musb.yaml | 2 +- .../Bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml | 6 +- .../device-tree/Bindings/usb/brcm,usb-pinmap.yaml | 73 + .../device-tree/Bindings/usb/cdns,usb3.yaml | 5 + sys/contrib/device-tree/Bindings/usb/dwc3-st.txt | 4 +- .../device-tree/Bindings/usb/dwc3-xilinx.txt | 2 +- .../device-tree/Bindings/usb/exynos-usb.txt | 2 +- .../device-tree/Bindings/usb/fsl,imx8mp-dwc3.yaml | 105 + .../device-tree/Bindings/usb/generic-ehci.yaml | 53 +- .../device-tree/Bindings/usb/generic-ohci.yaml | 36 +- .../device-tree/Bindings/usb/generic-xhci.yaml | 65 + .../device-tree/Bindings/usb/ingenic,musb.yaml | 2 +- .../Bindings/usb/intel,keembay-dwc3.yaml | 9 +- .../device-tree/Bindings/usb/maxim,max33359.yaml | 75 + .../Bindings/usb/mediatek,mtk-xhci.yaml | 188 + .../device-tree/Bindings/usb/mediatek,mtu3.yaml | 287 ++ .../device-tree/Bindings/usb/mediatek,musb.yaml | 114 + sys/contrib/device-tree/Bindings/usb/omap-usb.txt | 2 +- .../device-tree/Bindings/usb/qcom,dwc3.yaml | 13 +- .../device-tree/Bindings/usb/renesas,usb-xhci.yaml | 5 +- .../Bindings/usb/renesas,usb3-peri.yaml | 7 +- .../device-tree/Bindings/usb/renesas,usbhs.yaml | 4 +- .../device-tree/Bindings/usb/rockchip,dwc3.yaml | 108 + .../device-tree/Bindings/usb/snps,dwc3.yaml | 332 ++ .../device-tree/Bindings/usb/st,stusb160x.yaml | 87 + .../device-tree/Bindings/usb/ti,hd3ss3220.yaml | 8 +- .../device-tree/Bindings/usb/ti,j721e-usb.yaml | 13 +- .../device-tree/Bindings/usb/ti,keystone-dwc3.yaml | 6 +- .../device-tree/Bindings/usb/usb-device.yaml | 124 + sys/contrib/device-tree/Bindings/usb/usb-drd.yaml | 78 + sys/contrib/device-tree/Bindings/usb/usb-hcd.yaml | 36 +- sys/contrib/device-tree/Bindings/usb/usb-xhci.yaml | 42 + sys/contrib/device-tree/Bindings/usb/usb.yaml | 63 + .../device-tree/Bindings/usb/usbmisc-imx.txt | 2 +- .../device-tree/Bindings/vendor-prefixes.yaml | 64 +- .../Bindings/watchdog/allwinner,sun4i-a10-wdt.yaml | 9 +- .../device-tree/Bindings/watchdog/fsl-imx-wdt.yaml | 16 + .../Bindings/watchdog/intel,keembay-wdt.yaml | 57 + .../device-tree/Bindings/watchdog/mtk-wdt.txt | 5 +- .../device-tree/Bindings/watchdog/qcom-wdt.yaml | 1 + .../device-tree/Bindings/watchdog/renesas,wdt.yaml | 1 + .../device-tree/Bindings/watchdog/snps,dw-wdt.yaml | 16 +- .../device-tree/Bindings/watchdog/ti,rti-wdt.yaml | 4 +- .../device-tree/Bindings/watchdog/watchdog.yaml | 1 - .../device-tree/include/dt-bindings/clock/at91.h | 11 + .../include/dt-bindings/clock/axg-clkc.h | 26 +- .../device-tree/include/dt-bindings/clock/dra7.h | 4 + .../include/dt-bindings/clock/fsl,qoriq-clockgen.h | 15 + .../include/dt-bindings/clock/g12a-clkc.h | 2 + .../include/dt-bindings/clock/imx8-clock.h | 2 + .../include/dt-bindings/clock/imx8-lpcg.h | 14 + .../include/dt-bindings/clock/imx8mm-clock.h | 10 +- .../include/dt-bindings/clock/imx8mn-clock.h | 9 +- .../include/dt-bindings/clock/imx8mq-clock.h | 16 +- .../include/dt-bindings/clock/ingenic,sysost.h | 10 +- .../include/dt-bindings/clock/k210-clk.h | 55 +- .../include/dt-bindings/clock/meson8b-clkc.h | 2 - .../include/dt-bindings/clock/mstar-msc313-mpll.h | 19 + .../include/dt-bindings/clock/qcom,camcc-sc7180.h | 121 + .../include/dt-bindings/clock/qcom,gcc-msm8998.h | 2 + .../include/dt-bindings/clock/qcom,gcc-sc7280.h | 226 + .../include/dt-bindings/clock/qcom,gcc-sc8180x.h | 309 ++ .../include/dt-bindings/clock/qcom,gcc-sdx55.h | 117 + .../include/dt-bindings/clock/qcom,gcc-sm8350.h | 266 ++ .../include/dt-bindings/clock/qcom,gpucc-sdm660.h | 28 + .../include/dt-bindings/clock/qcom,mmcc-sdm660.h | 162 + .../include/dt-bindings/clock/qcom,rpmh.h | 10 + .../dt-bindings/clock/qcom,sm8250-lpass-aoncc.h | 11 + .../dt-bindings/clock/qcom,sm8250-lpass-audiocc.h | 13 + .../dt-bindings/clock/qcom,videocc-sm8250.h | 2 + .../include/dt-bindings/clock/rk3368-cru.h | 3 + .../include/dt-bindings/clock/sifive-fu740-prci.h | 23 + .../include/dt-bindings/clock/sun50i-h6-r-ccu.h | 2 + .../include/dt-bindings/clock/sun50i-h616-ccu.h | 115 + .../include/dt-bindings/clock/tegra210-car.h | 2 +- .../include/dt-bindings/clock/xlnx-vcu.h | 15 + .../include/dt-bindings/dma/jz4775-dma.h | 44 + .../device-tree/include/dt-bindings/dma/qcom-gpi.h | 11 + .../include/dt-bindings/dma/x2000-dma.h | 54 + .../include/dt-bindings/firmware/imx/rsrc.h | 1 + .../include/dt-bindings/gpio/msc313-gpio.h | 53 + .../include/dt-bindings/gpio/tegra186-gpio.h | 4 +- .../include/dt-bindings/input/cros-ec-keyboard.h | 103 + .../dt-bindings/interconnect/qcom,msm8939.h | 105 + .../include/dt-bindings/interconnect/qcom,sdm845.h | 2 + .../include/dt-bindings/interconnect/qcom,sdx55.h | 76 + .../include/dt-bindings/memory/mt2701-larb-port.h | 4 +- .../include/dt-bindings/memory/mt2712-larb-port.h | 6 +- .../include/dt-bindings/memory/mt6779-larb-port.h | 6 +- .../include/dt-bindings/memory/mt8167-larb-port.h | 6 +- .../include/dt-bindings/memory/mt8173-larb-port.h | 6 +- .../include/dt-bindings/memory/mt8183-larb-port.h | 6 +- .../include/dt-bindings/memory/mt8192-larb-port.h | 243 ++ .../include/dt-bindings/memory/mtk-memory-port.h | 15 + .../include/dt-bindings/memory/tegra124-mc.h | 68 + .../include/dt-bindings/memory/tegra20-mc.h | 53 + .../include/dt-bindings/memory/tegra210-mc.h | 10 + .../include/dt-bindings/memory/tegra30-mc.h | 67 + .../include/dt-bindings/pinctrl/k210-fpioa.h | 276 ++ .../include/dt-bindings/power/mt8167-power.h | 17 + .../include/dt-bindings/power/mt8183-power.h | 26 + .../include/dt-bindings/power/mt8192-power.h | 32 + .../include/dt-bindings/power/qcom-rpmpd.h | 43 + .../dt-bindings/regulator/dlg,da9121-regulator.h | 22 + .../dt-bindings/reset-controller/mt8192-resets.h | 30 + .../include/dt-bindings/reset/bcm6318-reset.h | 20 + .../include/dt-bindings/reset/bcm63268-reset.h | 26 + .../include/dt-bindings/reset/bcm6328-reset.h | 18 + .../include/dt-bindings/reset/bcm6358-reset.h | 15 + .../include/dt-bindings/reset/bcm6362-reset.h | 22 + .../include/dt-bindings/reset/bcm6368-reset.h | 16 + .../include/dt-bindings/reset/k210-rst.h | 42 + .../include/dt-bindings/reset/sun50i-h6-r-ccu.h | 1 + .../include/dt-bindings/reset/sun50i-h616-ccu.h | 70 + .../device-tree/include/dt-bindings/soc/bcm-pmb.h | 11 + .../include/dt-bindings/sound/adi,adau1977.h | 15 + .../include/dt-bindings/sound/apq8016-lpass.h | 7 +- .../include/dt-bindings/sound/qcom,lpass.h | 15 + .../include/dt-bindings/sound/sc7180-lpass.h | 6 +- .../device-tree/include/dt-bindings/usb/pd.h | 319 +- sys/contrib/device-tree/src/arm/am335x-baltos.dtsi | 2 +- .../device-tree/src/arm/am335x-boneblue.dts | 54 + sys/contrib/device-tree/src/arm/am335x-cm-t335.dts | 2 +- sys/contrib/device-tree/src/arm/am335x-evm.dts | 15 +- sys/contrib/device-tree/src/arm/am335x-evmsk.dts | 14 +- sys/contrib/device-tree/src/arm/am335x-icev2.dts | 14 +- .../device-tree/src/arm/am335x-igep0033.dtsi | 2 +- .../device-tree/src/arm/am335x-myirtech-myc.dtsi | 267 ++ .../device-tree/src/arm/am335x-myirtech-myd.dts | 536 +++ sys/contrib/device-tree/src/arm/am335x-nano.dts | 1 - sys/contrib/device-tree/src/arm/am33xx-l4.dtsi | 151 +- sys/contrib/device-tree/src/arm/am33xx.dtsi | 185 +- sys/contrib/device-tree/src/arm/am4372.dtsi | 175 +- sys/contrib/device-tree/src/arm/am437x-l4.dtsi | 83 +- sys/contrib/device-tree/src/arm/am574x-idk.dts | 4 + sys/contrib/device-tree/src/arm/armada-375.dtsi | 2 +- .../src/arm/armada-382-rd-ac3x-48g4x2xl.dts | 112 + .../device-tree/src/arm/armada-385-linksys.dtsi | 2 + .../src/arm/armada-385-turris-omnia.dts | 179 +- .../device-tree/src/arm/armada-388-clearfog.dts | 4 +- .../device-tree/src/arm/armada-388-clearfog.dtsi | 10 +- .../device-tree/src/arm/armada-388-helios4.dts | 34 +- .../device-tree/src/arm/armada-xp-98dx3236.dtsi | 12 +- .../src/arm/armada-xp-crs305-1g-4s-bit.dts | 43 + .../device-tree/src/arm/armada-xp-crs305-1g-4s.dts | 17 + .../src/arm/armada-xp-crs305-1g-4s.dtsi | 104 + .../src/arm/armada-xp-crs326-24g-2s-bit.dts | 43 + .../src/arm/armada-xp-crs326-24g-2s.dts | 17 + .../src/arm/armada-xp-crs326-24g-2s.dtsi | 104 + .../src/arm/armada-xp-crs328-4c-20s-4s-bit.dts | 43 + .../src/arm/armada-xp-crs328-4c-20s-4s.dts | 17 + .../src/arm/armada-xp-crs328-4c-20s-4s.dtsi | 104 + .../device-tree/src/arm/aspeed-ast2600-evb.dts | 28 + .../src/arm/aspeed-bmc-amd-ethanolx.dts | 79 +- .../src/arm/aspeed-bmc-ampere-mtjade.dts | 558 +++ .../src/arm/aspeed-bmc-bytedance-g220a.dts | 928 ++++ .../src/arm/aspeed-bmc-facebook-galaxy100.dts | 57 + .../src/arm/aspeed-bmc-facebook-minipack.dts | 888 ++++ .../src/arm/aspeed-bmc-facebook-tiogapass.dts | 13 +- .../src/arm/aspeed-bmc-facebook-wedge100.dts | 120 +- .../src/arm/aspeed-bmc-facebook-wedge40.dts | 112 +- .../src/arm/aspeed-bmc-facebook-wedge400.dts | 4 +- .../device-tree/src/arm/aspeed-bmc-ibm-everest.dts | 775 ++++ .../src/arm/aspeed-bmc-ibm-rainier-4u.dts | 37 + .../device-tree/src/arm/aspeed-bmc-ibm-rainier.dts | 42 +- .../src/arm/aspeed-bmc-inspur-fp5280g2.dts | 37 +- .../src/arm/aspeed-bmc-intel-s2600wf.dts | 4 +- .../device-tree/src/arm/aspeed-bmc-opp-mihawk.dts | 16 +- .../device-tree/src/arm/aspeed-bmc-opp-mowgli.dts | 5 + .../device-tree/src/arm/aspeed-bmc-opp-tacoma.dts | 11 +- .../src/arm/aspeed-bmc-portwell-neptune.dts | 2 + .../src/arm/aspeed-bmc-supermicro-x11spi.dts | 137 + sys/contrib/device-tree/src/arm/aspeed-g4.dtsi | 6 + sys/contrib/device-tree/src/arm/aspeed-g5.dtsi | 6 + sys/contrib/device-tree/src/arm/aspeed-g6.dtsi | 14 +- .../src/arm/ast2400-facebook-netbmc-common.dtsi | 117 + sys/contrib/device-tree/src/arm/at91-kizbox.dts | 55 +- .../device-tree/src/arm/at91-kizbox2-common.dtsi | 8 +- .../device-tree/src/arm/at91-kizbox3-hs.dts | 16 +- .../device-tree/src/arm/at91-kizbox3_common.dtsi | 11 +- .../src/arm/at91-kizboxmini-common.dtsi | 8 +- sys/contrib/device-tree/src/arm/at91-sam9x60ek.dts | 13 +- .../device-tree/src/arm/at91-sama5d27_som1.dtsi | 2 +- .../device-tree/src/arm/at91-sama5d27_som1_ek.dts | 1 - .../device-tree/src/arm/at91-sama5d27_wlsom1.dtsi | 22 +- .../src/arm/at91-sama5d27_wlsom1_ek.dts | 1 - .../device-tree/src/arm/at91-sama5d2_icp.dts | 1 - .../device-tree/src/arm/at91-sama5d2_ptc_ek.dts | 1 - .../device-tree/src/arm/at91-sama5d2_xplained.dts | 1 - .../device-tree/src/arm/at91-sama5d3_xplained.dts | 7 + .../device-tree/src/arm/at91-sama5d4_xplained.dts | 7 + sys/contrib/device-tree/src/arm/at91-smartkiz.dts | 6 +- sys/contrib/device-tree/src/arm/at91sam9260.dtsi | 25 - sys/contrib/device-tree/src/arm/at91sam9g45.dtsi | 27 - .../device-tree/src/arm/at91sam9m10g45ek.dts | 10 +- sys/contrib/device-tree/src/arm/at91sam9rl.dtsi | 25 - sys/contrib/device-tree/src/arm/at91sam9rlek.dts | 10 +- sys/contrib/device-tree/src/arm/at91sam9x5.dtsi | 28 - sys/contrib/device-tree/src/arm/bcm-cygnus.dtsi | 1 - sys/contrib/device-tree/src/arm/bcm-nsp.dtsi | 8 +- sys/contrib/device-tree/src/arm/bcm21664.dtsi | 2 +- .../device-tree/src/arm/bcm2711-rpi-4-b.dts | 19 + sys/contrib/device-tree/src/arm/bcm2711.dtsi | 31 + .../device-tree/src/arm/bcm283x-rpi-usb-otg.dtsi | 2 +- .../src/arm/bcm283x-rpi-usb-peripheral.dtsi | 2 +- .../device-tree/src/arm/bcm4708-luxul-xap-1510.dts | 7 - .../device-tree/src/arm/bcm4708-luxul-xwc-1000.dts | 7 - .../src/arm/bcm4708-smartrg-sr400ac.dts | 3 - .../src/arm/bcm47081-buffalo-wzr-600dhp2.dts | 4 - .../src/arm/bcm47081-luxul-xap-1410.dts | 7 - .../src/arm/bcm47081-luxul-xwr-1200.dts | 7 - .../src/arm/bcm47081-tplink-archer-c5-v2.dts | 4 - sys/contrib/device-tree/src/arm/bcm4709.dtsi | 4 + .../src/arm/bcm47094-linksys-panamera.dts | 94 +- .../src/arm/bcm47094-luxul-xap-1610.dts | 3 - .../src/arm/bcm47094-luxul-xwc-2000.dts | 3 - .../src/arm/bcm47094-luxul-xwr-3100.dts | 3 - .../src/arm/bcm47094-luxul-xwr-3150-v1.dts | 7 +- sys/contrib/device-tree/src/arm/bcm47094.dtsi | 13 + sys/contrib/device-tree/src/arm/bcm5301x.dtsi | 67 +- sys/contrib/device-tree/src/arm/bcm53573.dtsi | 4 +- sys/contrib/device-tree/src/arm/bcm953012er.dts | 3 - sys/contrib/device-tree/src/arm/bcm958522er.dts | 4 + sys/contrib/device-tree/src/arm/bcm958525er.dts | 4 + sys/contrib/device-tree/src/arm/bcm958525xmc.dts | 4 + sys/contrib/device-tree/src/arm/bcm958622hr.dts | 3 - sys/contrib/device-tree/src/arm/bcm958623hr.dts | 3 - sys/contrib/device-tree/src/arm/bcm958625hr.dts | 3 - sys/contrib/device-tree/src/arm/bcm958625k.dts | 3 - sys/contrib/device-tree/src/arm/bcm988312hr.dts | 3 - sys/contrib/device-tree/src/arm/berlin2.dtsi | 12 +- .../src/arm/berlin2cd-google-chromecast.dts | 6 +- sys/contrib/device-tree/src/arm/berlin2cd.dtsi | 12 +- sys/contrib/device-tree/src/arm/berlin2q.dtsi | 12 +- .../device-tree/src/arm/cros-ec-keyboard.dtsi | 93 +- sys/contrib/device-tree/src/arm/dove-sbc-a510.dts | 1 + sys/contrib/device-tree/src/arm/dra7.dtsi | 185 +- sys/contrib/device-tree/src/arm/dra71-evm.dts | 2 + sys/contrib/device-tree/src/arm/dra76x.dtsi | 36 + sys/contrib/device-tree/src/arm/dra7xx-clocks.dtsi | 14 + sys/contrib/device-tree/src/arm/e60k02.dtsi | 6 + .../src/arm/exynos-mfc-reserved-memory.dtsi | 4 +- .../device-tree/src/arm/exynos3250-artik5-eval.dts | 26 + .../device-tree/src/arm/exynos3250-artik5.dtsi | 4 +- .../device-tree/src/arm/exynos3250-monk.dts | 10 +- *** 3469 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Thu Jul 1 15:34:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27332665FD7; Thu, 1 Jul 2021 15:34: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG2Lg0Td3z4T3s; Thu, 1 Jul 2021 15:34:03 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 ED08022EAE; Thu, 1 Jul 2021 15:34:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161FY28u067621; Thu, 1 Jul 2021 15:34:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161FY2BC067620; Thu, 1 Jul 2021 15:34:02 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:34:02 GMT Message-Id: <202107011534.161FY2BC067620@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1426907f4dd0 - main - hz.9: update stathz for current usage 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/main X-Git-Reftype: branch X-Git-Commit: 1426907f4dd017d978caf7d946d2d398d68673fd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:34:03 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1426907f4dd017d978caf7d946d2d398d68673fd commit 1426907f4dd017d978caf7d946d2d398d68673fd Author: Warner Losh AuthorDate: 2021-07-01 15:32:40 +0000 Commit: Warner Losh CommitDate: 2021-07-01 15:33:03 +0000 hz.9: update stathz for current usage Update the stathz description to reflect reality. profhz is the only thing we should deprecate. Add some implementation notes that describe the optimizations made to date. Discusssed with: emaste Reviewed by: kib (prior), jhb (prior), gbe Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30815 --- share/man/man9/hz.9 | 99 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 72 insertions(+), 27 deletions(-) diff --git a/share/man/man9/hz.9 b/share/man/man9/hz.9 index d0e5d1b1ff3e..73efcf3b0da3 100644 --- a/share/man/man9/hz.9 +++ b/share/man/man9/hz.9 @@ -22,7 +22,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 18, 2021 +.Dd July 1, 2021 .Dt HZ 9 .Os .Sh NAME @@ -36,7 +36,7 @@ .Pp .Vt extern int hz; .Vt extern int tick; -.Vt extern int stathz; /* deprecated */ +.Vt extern int stathz; .Vt extern int profhz; /* deprecated */ .Sh DESCRIPTION .Fx @@ -44,37 +44,34 @@ utilizes periodic, one-shot, global or per-CPU timing hardware using .Xr eventtimers 9 to produce traditional clock behavior. +These clocks regulate periodic events in the system. .Pp The main clock is used to update the system's notion of time via .Xr timecounters 9 -and to pace periodic system callbacks via -.Xr callout 9 , -.Xr epoch 9 , -and other methods documented in +and to pace periodic system processing as documented in .Xr hardclock 9 . -That routine will be called approximately +That routine may be called once every 1 / .Va hz -times per second. +seconds, though the call is omitted if no work is needed in the next tick and it +has not been 0.5 seconds since the last call. .Pp -The second clock, running at either +The stat clock running at .Va stathz -or -.Va profhz -was used to gather timing statistics, but has been replaced with the more -functional -.Xr hwpmc 4 . -These values are returned for -.Qq compatibility -with -.Bx 4.4 , -.St -p1003.1-2001 -and the -.Xr setitimer 2 -.Va ITIMER_PROF -flag, which were deprecated in -.St -p1003.1-2008 -in favor of -.Xr timer_settime 2 . +gathers statistics on the system and its processes. +It computes values for +.Xr getrusage 2 +and statistics displayed by +.Xr ps 1 +and +.Xr top 1 . +.Pp +Finally, a profiling clock may run at +.Vt profhz +to sample user program counter values for profiling purposes. +This profiling mechanism has been replaced by the more functional +.Xr hwpmc 4 +and may be removed in a future version of +.Fx . .Pp .Va tick is the length of time in microseconds of one system tick. @@ -88,6 +85,15 @@ and from .Xr sysctl 8 . .Pp +The current global and per-CPU CPU time usage is returned to the user in units +of 1 / +.Va stathz +ticks in the +.Sy kern.cp_time +and +.Sy kern.cp_times +sysctl MIBs. +.Pp The .Va hz rate may be overridden by defining @@ -103,12 +109,51 @@ Only override the default value if you really know what you are doing. Due to the adaptive nature of timeouts, changing this value has less effect than it had in the past. .Sh SEE ALSO +.Xr ps 1 , +.Xr top 1 , .Xr setitimer 2 , .Xr timer_settime 2 , .Xr loader.conf 5 , -.Xr callout 9 , .Xr eventtimers 9 , .Xr hardclock 9 , .Xr microtime 9 , .Xr time_second 9 , .Xr timecounters 9 +.Sh IMPLEMENTATION NOTES +Historically, both the +.Va stathz +and +.Va profhz +clocks have run off the same physical timer running at the slower rate when no +process is using the profile features, or at the higher rate when at least one +process is using it. +Although the interface is deprecated by +.St -p1003.1-2008 +in favor of +.Xr timer_settime 2 , +several programs still use +.Xr setitimer 2 +and +.Va ITIMER_PROF +for a higher-resolution periodic interrupt than has been traditionally +available. +.Pp +Historically, +.Xr hardclock 9 +has also been run off a separate interrupt, except on constrained platforms that +lack enough periodic interrupt sources. +.Fx +uses +.Xr eventtimers 9 +to abstract these details away, though some old code may still harbor +assumptions that are an imperfect fit to this abstraction. +.Pp +.Xr timecounters 9 +are limited to 32-bits and wrap after about a second, so we must update the +time hands they maintain at least every half second to get the proper wrapping +math. +In addition, +.Va kern.cp_times +needs to updated at least once a second so that the values displayed by +.Xr top 1 +update every second. From owner-dev-commits-src-main@freebsd.org Thu Jul 1 15:43:36 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3335F6660DB; Thu, 1 Jul 2021 15:43: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG2Yh0wX8z4TqD; Thu, 1 Jul 2021 15:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 07F9C2311F; Thu, 1 Jul 2021 15:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161FhZM9081384; Thu, 1 Jul 2021 15:43:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161FhZUA081383; Thu, 1 Jul 2021 15:43:35 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:43:35 GMT Message-Id: <202107011543.161FhZUA081383@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 82ea1a07b489 - main - Import device-tree files from Linux 5.12 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82ea1a07b4894bea20c61afbf702cc46f0711ead Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:43:36 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=82ea1a07b4894bea20c61afbf702cc46f0711ead commit 82ea1a07b4894bea20c61afbf702cc46f0711ead Merge: 1426907f4dd0 c7a3c7298ff5 Author: Emmanuel Vadot AuthorDate: 2021-07-01 15:41:47 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-01 15:41:57 +0000 Import device-tree files from Linux 5.12 Sponsored by: Diablotin Systems .../device-tree/Bindings/hwmon/ntc_thermistor.txt | 2 +- sys/contrib/device-tree/Bindings/i2c/i2c-gpio.yaml | 2 +- sys/contrib/device-tree/Bindings/i2c/i2c-imx.yaml | 2 +- .../device-tree/Bindings/iio/adc/ingenic,adc.yaml | 5 +- .../device-tree/Bindings/input/adc-joystick.yaml | 4 +- .../input/touchscreen/resistive-adc-touch.txt | 5 +- .../Bindings/leds/cznic,turris-omnia-leds.yaml | 2 +- sys/contrib/device-tree/Bindings/mfd/ab8500.txt | 4 +- .../device-tree/Bindings/mfd/motorola-cpcap.txt | 16 ++-- .../Bindings/net/brcm,bcm4908-enet.yaml | 2 +- .../Bindings/net/ethernet-controller.yaml | 2 +- .../device-tree/Bindings/net/micrel-ksz90x1.txt | 96 +++++++++++++++++++++- .../device-tree/include/dt-bindings/bus/moxtet.h | 2 +- sys/contrib/device-tree/src/arc/haps_hs.dts | 2 +- sys/contrib/device-tree/src/arm/am33xx.dtsi | 3 + .../src/arm/armada-385-turris-omnia.dts | 4 +- sys/contrib/device-tree/src/arm/at91-sam9x60ek.dts | 8 -- .../device-tree/src/arm/at91-sama5d27_som1.dtsi | 4 +- sys/contrib/device-tree/src/arm/bcm2711.dtsi | 12 --- .../device-tree/src/arm/imx6qdl-phytec-pfla02.dtsi | 2 + .../device-tree/src/arm/imx6ul-14x14-evk.dtsi | 22 +++-- .../src/arm/imx6ull-myir-mys-6ulx-eval.dts | 1 + sys/contrib/device-tree/src/arm/omap3.dtsi | 3 + sys/contrib/device-tree/src/arm/omap4.dtsi | 5 ++ .../device-tree/src/arm/omap44xx-clocks.dtsi | 8 -- sys/contrib/device-tree/src/arm/omap5.dtsi | 5 ++ sys/contrib/device-tree/src/arm/sam9x60.dtsi | 9 ++ .../src/arm64/allwinner/sun50i-a64-pine64-lts.dts | 4 + .../src/arm64/allwinner/sun50i-a64-sopine.dtsi | 2 +- .../src/arm64/allwinner/sun50i-h6-beelink-gs1.dts | 4 - .../device-tree/src/arm64/allwinner/sun50i-h6.dtsi | 4 +- .../src/arm64/freescale/fsl-ls1012a.dtsi | 1 + .../src/arm64/freescale/fsl-ls1043a.dtsi | 1 + .../src/arm64/freescale/fsl-ls1046a.dtsi | 1 + .../src/arm64/freescale/imx8mm-pinfunc.h | 2 +- .../arm64/freescale/imx8mp-phyboard-pollux-rdk.dts | 2 +- .../src/arm64/freescale/imx8mp-phycore-som.dtsi | 2 +- .../src/arm64/freescale/imx8mq-pinfunc.h | 2 +- .../src/arm64/marvell/armada-3720-turris-mox.dts | 2 +- .../src/arm64/marvell/armada-cp11x.dtsi | 6 +- .../src/arm64/nvidia/tegra186-p2771-0000.dts | 2 +- .../src/arm64/nvidia/tegra186-p3310.dtsi | 2 +- .../device-tree/src/arm64/nvidia/tegra186.dtsi | 2 +- .../src/arm64/nvidia/tegra194-p2972-0000.dts | 3 +- .../src/arm64/nvidia/tegra194-p3668-0000.dtsi | 4 + .../src/arm64/nvidia/tegra194-p3668-0001.dtsi | 4 + .../src/arm64/nvidia/tegra194-p3668.dtsi | 1 - 47 files changed, 203 insertions(+), 80 deletions(-) From owner-dev-commits-src-main@freebsd.org Thu Jul 1 15:51:23 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CD476663F6; Thu, 1 Jul 2021 15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG2kg01Vfz4VKG; Thu, 1 Jul 2021 15:51:23 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 DCBD323227; Thu, 1 Jul 2021 15:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161FpMnC094484; Thu, 1 Jul 2021 15:51:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161FpMD5094483; Thu, 1 Jul 2021 15:51:22 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:51:22 GMT Message-Id: <202107011551.161FpMD5094483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 2eb4d8dc723d - main - Import device-tree files from Linux 5.13 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2eb4d8dc723da3cf7d735a3226ae49da4c8c5dbc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:51:23 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2eb4d8dc723da3cf7d735a3226ae49da4c8c5dbc commit 2eb4d8dc723da3cf7d735a3226ae49da4c8c5dbc Merge: 82ea1a07b489 71ca10f8bbe6 Author: Emmanuel Vadot AuthorDate: 2021-07-01 15:50:54 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-01 15:51:01 +0000 Import device-tree files from Linux 5.13 Sponsored by: Diablotin Systems sys/contrib/device-tree/Bindings/.gitignore | 4 +- sys/contrib/device-tree/Bindings/Makefile | 7 +- sys/contrib/device-tree/Bindings/arm/amlogic.yaml | 3 + sys/contrib/device-tree/Bindings/arm/apple.yaml | 64 + .../device-tree/Bindings/arm/bcm/brcm,bcm4908.yaml | 1 + .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 25 +- sys/contrib/device-tree/Bindings/arm/cpus.yaml | 4 +- sys/contrib/device-tree/Bindings/arm/ete.yaml | 75 + sys/contrib/device-tree/Bindings/arm/fsl.yaml | 16 + .../arm/marvell/cp110-system-controller.txt | 4 +- sys/contrib/device-tree/Bindings/arm/mediatek.yaml | 36 + .../Bindings/arm/mediatek/mediatek,mmsys.txt | 1 + .../device-tree/Bindings/arm/msm/qcom,llcc.yaml | 1 + .../device-tree/Bindings/arm/mstar/mstar.yaml | 1 + .../device-tree/Bindings/arm/npcm/npcm.yaml | 29 + sys/contrib/device-tree/Bindings/arm/qcom.yaml | 20 + sys/contrib/device-tree/Bindings/arm/rockchip.yaml | 1 + .../device-tree/Bindings/arm/stm32/stm32.yaml | 21 + sys/contrib/device-tree/Bindings/arm/sunxi.yaml | 5 + sys/contrib/device-tree/Bindings/arm/ti/k3.yaml | 9 + sys/contrib/device-tree/Bindings/arm/trbe.yaml | 49 + sys/contrib/device-tree/Bindings/ata/ahci-ceva.txt | 4 + .../Bindings/ata/nvidia,tegra-ahci.yaml | 176 ++ .../clock/allwinner,sun4i-a10-pll1-clk.yaml | 2 +- .../Bindings/clock/armada3700-tbg-clock.txt | 2 +- .../Bindings/clock/idt,versaclock5.yaml | 2 - .../device-tree/Bindings/clock/imx8qxp-lpcg.yaml | 6 +- .../Bindings/clock/mediatek,mt7621-sysc.yaml | 68 + .../device-tree/Bindings/clock/milbeaut-clock.yaml | 12 +- .../Bindings/clock/qcom,gcc-sdm845.yaml | 82 + .../device-tree/Bindings/clock/qcom,gcc.yaml | 2 - .../Bindings/clock/rockchip,rk3568-cru.yaml | 60 + .../Bindings/connector/usb-connector.yaml | 25 + .../Bindings/counter/interrupt-counter.yaml | 62 + .../device-tree/Bindings/crypto/ti,sa2ul.yaml | 24 +- sys/contrib/device-tree/Bindings/ddr/lpddr3.txt | 5 + .../device-tree/Bindings/devfreq/rk3399_dmc.txt | 75 +- .../Bindings/display/allwinner,sun4i-a10-tcon.yaml | 1 - .../display/allwinner,sun8i-a83t-dw-hdmi.yaml | 4 +- .../Bindings/display/brcm,bcm2835-dsi0.yaml | 6 - .../Bindings/display/bridge/analogix,anx7625.yaml | 15 + .../Bindings/display/bridge/chipone,icn6211.yaml | 99 ++ .../Bindings/display/bridge/lontium,lt8912b.yaml | 102 ++ .../Bindings/display/bridge/renesas,dw-hdmi.yaml | 125 ++ .../Bindings/display/bridge/synopsys,dw-hdmi.yaml | 55 + .../device-tree/Bindings/display/fsl,lcdif.yaml | 110 ++ .../Bindings/display/imx/fsl,imx6-hdmi.yaml | 126 ++ .../Bindings/display/mediatek/mediatek,disp.txt | 2 +- .../Bindings/display/mediatek/mediatek,dpi.yaml | 12 +- .../device-tree/Bindings/display/msm/dpu.txt | 4 +- .../display/panel/kingdisplay,kd035g6-54nt.yaml | 1 - .../Bindings/display/panel/panel-dpi.yaml | 2 +- .../Bindings/display/panel/panel-simple.yaml | 2 + .../device-tree/Bindings/display/renesas,du.yaml | 834 ++++++++++ .../display/rockchip/rockchip,dw-hdmi.yaml | 156 ++ .../Bindings/display/simple-framebuffer.yaml | 5 + sys/contrib/device-tree/Bindings/dma/qcom,gpi.yaml | 3 +- .../Bindings/extcon/qcom,pm8941-misc.yaml | 62 + .../device-tree/Bindings/firmware/qcom,scm.txt | 2 + .../device-tree/Bindings/fpga/fpga-region.txt | 187 +-- .../Bindings/fpga/xilinx-pr-decoupler.txt | 24 +- .../Bindings/gpio/brcm,bcm6345-gpio.yaml | 86 + .../Bindings/gpio/fairchild,74hc595.yaml | 77 + .../Bindings/gpio/realtek,otto-gpio.yaml | 78 + .../Bindings/gpio/rockchip,gpio-bank.yaml | 82 + .../Bindings/gpio/socionext,uniphier-gpio.yaml | 3 +- .../device-tree/Bindings/gpu/arm,mali-bifrost.yaml | 2 + .../device-tree/Bindings/hwmon/ti,ads7828.yaml | 2 +- sys/contrib/device-tree/Bindings/i2c/i2c-mpc.yaml | 98 ++ .../Bindings/i2c/xlnx,xps-iic-2.00.a.yaml | 2 +- .../device-tree/Bindings/i3c/cdns,i3c-master.txt | 6 +- sys/contrib/device-tree/Bindings/i3c/i3c.yaml | 7 +- .../Bindings/i3c/silvaco,i3c-master.yaml | 2 +- .../Bindings/i3c/snps,dw-i3c-master.txt | 6 +- .../Bindings/iio/accel/bosch,bmi088.yaml | 68 + .../Bindings/iio/adc/brcm,iproc-static-adc.yaml | 5 - .../Bindings/iio/adc/mediatek,mt2701-auxadc.yaml | 1 + .../Bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 1 - .../device-tree/Bindings/iio/adc/ti,ads131e08.yaml | 181 ++ .../device-tree/Bindings/iio/cdc/adi,ad7150.yaml | 69 + .../Bindings/iio/gyroscope/nxp,fxas21002c.yaml | 2 +- .../Bindings/iio/imu/adi,adis16475.yaml | 9 - .../Bindings/iio/light/capella,cm3605.yaml | 1 - .../Bindings/iio/light/upisemi,us5182.yaml | 4 +- .../proximity/google,cros-ec-mkbp-proximity.yaml | 37 + .../device-tree/Bindings/iio/st,st-sensors.yaml | 1 + sys/contrib/device-tree/Bindings/index.rst | 7 +- .../Bindings/infiniband/hisilicon-hns-roce.txt | 2 +- .../device-tree/Bindings/input/atmel,maxtouch.yaml | 32 + sys/contrib/device-tree/Bindings/input/input.yaml | 7 +- .../device-tree/Bindings/input/iqs626a.yaml | 843 ++++++++++ .../Bindings/input/touchscreen/azoteq,iqs5xx.yaml | 75 + .../Bindings/input/touchscreen/hycon,hy46xx.yaml | 119 ++ .../Bindings/input/touchscreen/ilitek_ts_i2c.yaml | 73 + .../Bindings/input/touchscreen/melfas,mms114.yaml | 87 + .../Bindings/input/touchscreen/mstar,msg2638.yaml | 69 + .../Bindings/interconnect/qcom,rpmh.yaml | 11 +- .../Bindings/interconnect/qcom,sdm660.yaml | 147 ++ .../Bindings/interrupt-controller/apple,aic.yaml | 88 + .../interrupt-controller/idt,32434-pic.yaml | 52 + .../interrupt-controller/loongson,htpic.yaml | 2 +- .../interrupt-controller/loongson,liointc.yaml | 36 +- .../interrupt-controller/nuvoton,wpcm450-aic.yaml | 39 + .../Bindings/interrupt-controller/qcom,pdc.txt | 1 + .../device-tree/Bindings/iommu/arm,smmu.yaml | 1 + .../device-tree/Bindings/iommu/sprd,iommu.yaml | 57 + .../Bindings/leds/backlight/kinetic,ktd253.yaml | 9 +- .../Bindings/leds/backlight/qcom-wled.yaml | 1 + .../device-tree/Bindings/leds/leds-bcm6328.txt | 4 +- .../device-tree/Bindings/leds/leds-bcm6358.txt | 2 +- .../device-tree/Bindings/leds/leds-lgm.yaml | 26 +- .../device-tree/Bindings/leds/leds-rt4505.yaml | 57 + .../device-tree/Bindings/mailbox/fsl,mu.yaml | 5 +- .../device-tree/Bindings/mailbox/qcom-ipcc.yaml | 2 + .../device-tree/Bindings/mailbox/sprd-mailbox.yaml | 13 +- .../Bindings/mailbox/ti,secure-proxy.yaml | 79 + .../Bindings/media/allwinner,sun4i-a10-ir.yaml | 16 +- .../Bindings/media/mediatek-jpeg-decoder.txt | 2 +- .../Bindings/media/mediatek-jpeg-encoder.txt | 2 +- .../device-tree/Bindings/media/mediatek-mdp.txt | 2 +- .../device-tree/Bindings/media/mediatek-vcodec.txt | 57 +- .../Bindings/media/nxp,imx7-mipi-csi2.yaml | 108 +- .../device-tree/Bindings/media/nxp,imx8-jpeg.yaml | 84 + .../Bindings/media/qcom,msm8916-camss.yaml | 256 +++ .../Bindings/media/qcom,msm8996-camss.yaml | 387 +++++ .../Bindings/media/qcom,sdm660-camss.yaml | 398 +++++ .../Bindings/media/qcom,sdm845-camss.yaml | 371 +++++ .../Bindings/media/qcom,sm8250-venus.yaml | 167 ++ sys/contrib/device-tree/Bindings/media/rc.yaml | 5 + .../device-tree/Bindings/media/renesas,drif.yaml | 271 +++ .../device-tree/Bindings/media/renesas,vin.yaml | 46 +- .../Bindings/media/video-interfaces.yaml | 127 -- .../device-tree/Bindings/media/video-mux.yaml | 106 ++ .../memory-controllers/nvidia,tegra124-emc.yaml | 7 +- .../memory-controllers/nvidia,tegra20-emc.txt | 4 +- .../memory-controllers/nvidia,tegra20-mc.yaml | 79 + .../memory-controllers/nvidia,tegra210-emc.yaml | 2 +- .../memory-controllers/nvidia,tegra30-emc.yaml | 7 +- .../device-tree/Bindings/mfd/actions,atc260x.yaml | 183 ++ .../device-tree/Bindings/mfd/aspeed-lpc.txt | 100 +- .../Bindings/mfd/brcm,bcm6318-gpio-sysctl.yaml | 177 ++ .../Bindings/mfd/brcm,bcm63268-gpio-sysctl.yaml | 194 +++ .../Bindings/mfd/brcm,bcm6328-gpio-sysctl.yaml | 162 ++ .../Bindings/mfd/brcm,bcm6358-gpio-sysctl.yaml | 130 ++ .../Bindings/mfd/brcm,bcm6362-gpio-sysctl.yaml | 236 +++ .../Bindings/mfd/brcm,bcm6368-gpio-sysctl.yaml | 246 +++ .../device-tree/Bindings/mfd/google,cros-ec.yaml | 7 + .../device-tree/Bindings/mfd/netronix,ntxec.yaml | 76 + .../device-tree/Bindings/mfd/qcom-pm8xxx.yaml | 54 + .../device-tree/Bindings/mfd/ricoh,rn5t618.yaml | 111 ++ .../Bindings/mfd/rohm,bd71815-pmic.yaml | 201 +++ .../Bindings/mfd/rohm,bd71828-pmic.yaml | 6 + .../device-tree/Bindings/mfd/rohm,bd9576-pmic.yaml | 123 ++ .../device-tree/Bindings/mfd/ti,lp87524-q1.yaml | 4 + .../device-tree/Bindings/mfd/ti,lp87561-q1.yaml | 4 + .../device-tree/Bindings/mfd/ti,lp87565-q1.yaml | 4 + .../device-tree/Bindings/mmc/brcm,iproc-sdhci.yaml | 63 + .../device-tree/Bindings/mmc/fsl-imx-esdhc.yaml | 20 + .../device-tree/Bindings/mmc/mmc-spi-slot.txt | 6 +- sys/contrib/device-tree/Bindings/mmc/mtk-sd.yaml | 1 + .../Bindings/mmc/snps,dwcmshc-sdhci.yaml | 87 + .../device-tree/Bindings/mtd/nand-controller.yaml | 7 + .../mtd/partitions/linksys,ns-partitions.yaml | 74 + .../Bindings/mtd/partitions/nvmem-cells.yaml | 99 ++ .../device-tree/Bindings/mtd/qcom,nandc.yaml | 196 +++ .../device-tree/Bindings/net/actions,owl-emac.yaml | 92 ++ .../Bindings/net/brcm,bcm4908-enet.yaml | 17 +- .../Bindings/net/brcm,bcm6368-mdio-mux.yaml | 76 + .../Bindings/net/broadcom-bluetooth.yaml | 118 ++ .../device-tree/Bindings/net/can/fsl,flexcan.yaml | 1 - .../device-tree/Bindings/net/can/rcar_can.txt | 5 +- sys/contrib/device-tree/Bindings/net/dsa/dsa.yaml | 9 + .../device-tree/Bindings/net/dsa/lantiq-gswip.txt | 4 + .../Bindings/net/dsa/microchip,ksz.yaml | 2 + sys/contrib/device-tree/Bindings/net/fsl-enetc.txt | 15 + .../device-tree/Bindings/net/idt,3243x-emac.yaml | 73 + .../Bindings/net/intel,ixp4xx-ethernet.yaml | 102 ++ sys/contrib/device-tree/Bindings/net/mdio-gpio.txt | 1 + sys/contrib/device-tree/Bindings/net/qcom,ipa.yaml | 27 +- .../device-tree/Bindings/net/renesas,ether.yaml | 2 +- .../device-tree/Bindings/net/renesas,etheravb.yaml | 11 +- .../device-tree/Bindings/net/rockchip-dwmac.yaml | 120 ++ .../device-tree/Bindings/net/snps,dwmac.yaml | 13 +- .../Bindings/net/wireless/brcm,bcm4329-fmac.yaml | 109 ++ .../Bindings/net/wireless/ieee80211.yaml | 45 + .../Bindings/net/wireless/mediatek,mt76.yaml | 228 +++ .../device-tree/Bindings/net/xilinx_axienet.txt | 25 +- .../device-tree/Bindings/nvmem/brcm,nvram.yaml | 34 + .../device-tree/Bindings/nvmem/mtk-efuse.txt | 1 + .../device-tree/Bindings/nvmem/nvmem-consumer.yaml | 4 +- sys/contrib/device-tree/Bindings/nvmem/nvmem.yaml | 3 - .../device-tree/Bindings/nvmem/qcom,qfprom.yaml | 1 + .../Bindings/pci/mediatek-pcie-gen3.yaml | 181 ++ .../device-tree/Bindings/pci/rcar-pci-host.yaml | 12 +- .../Bindings/pci/sifive,fu740-pcie.yaml | 113 ++ .../device-tree/Bindings/pci/ti,j721e-pci-ep.yaml | 9 +- .../Bindings/pci/ti,j721e-pci-host.yaml | 20 +- .../device-tree/Bindings/pci/xilinx-nwl-pcie.txt | 2 + .../device-tree/Bindings/phy/bcm-ns-usb2-phy.yaml | 59 + .../device-tree/Bindings/phy/bcm-ns-usb3-phy.yaml | 62 + .../Bindings/phy/brcm,brcmstb-usb-phy.yaml | 3 + .../Bindings/phy/marvell,armada-3700-utmi-phy.yaml | 57 + .../phy/marvell,armada-cp110-utmi-phy.yaml | 109 ++ .../device-tree/Bindings/phy/mediatek,dsi-phy.yaml | 13 +- .../Bindings/phy/mediatek,hdmi-phy.yaml | 11 +- .../device-tree/Bindings/phy/mediatek,tphy.yaml | 3 +- .../device-tree/Bindings/phy/mediatek,ufs-phy.yaml | 7 +- .../Bindings/phy/microchip,sparx5-serdes.yaml | 100 ++ .../Bindings/phy/nvidia,tegra124-xusb-padctl.txt | 1 + .../Bindings/phy/phy-cadence-sierra.yaml | 17 +- .../Bindings/phy/phy-cadence-torrent.yaml | 24 +- .../Bindings/phy/phy-stm32-usbphyc.yaml | 5 + .../device-tree/Bindings/phy/qcom,qmp-phy.yaml | 2 + .../Bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 3 +- .../Bindings/phy/qcom,usb-snps-femto-v2.yaml | 1 + .../device-tree/Bindings/phy/ti,phy-j721e-wiz.yaml | 6 +- .../Bindings/pinctrl/brcm,bcm6318-pinctrl.yaml | 143 ++ .../Bindings/pinctrl/brcm,bcm63268-pinctrl.yaml | 164 ++ .../Bindings/pinctrl/brcm,bcm6328-pinctrl.yaml | 127 ++ .../Bindings/pinctrl/brcm,bcm6358-pinctrl.yaml | 93 ++ .../Bindings/pinctrl/brcm,bcm6362-pinctrl.yaml | 206 +++ .../Bindings/pinctrl/brcm,bcm6368-pinctrl.yaml | 217 +++ .../Bindings/pinctrl/ingenic,pinctrl.yaml | 23 +- .../Bindings/pinctrl/pinctrl-mt8195.yaml | 151 ++ .../Bindings/pinctrl/qcom,pmic-gpio.txt | 14 + .../Bindings/pinctrl/rockchip,pinctrl.txt | 59 +- .../Bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml | 336 ++++ .../device-tree/Bindings/power/brcm,bcm-pmb.yaml | 1 + .../device-tree/Bindings/power/qcom,rpmpd.yaml | 2 + .../Bindings/power/reset/ltc2952-poweroff.txt | 4 + .../power/supply/active-semi,act8945a-charger.yaml | 76 + .../device-tree/Bindings/power/supply/bq2415x.yaml | 98 ++ .../device-tree/Bindings/power/supply/bq24190.yaml | 92 ++ .../device-tree/Bindings/power/supply/bq24257.yaml | 124 ++ .../device-tree/Bindings/power/supply/bq24735.yaml | 89 + .../device-tree/Bindings/power/supply/bq256xx.yaml | 1 - .../device-tree/Bindings/power/supply/bq25890.yaml | 123 ++ .../device-tree/Bindings/power/supply/bq27xxx.yaml | 3 +- .../Bindings/power/supply/cpcap-battery.yaml | 87 + .../Bindings/power/supply/cpcap-charger.yaml | 106 ++ .../Bindings/power/supply/cw2015_battery.yaml | 2 +- .../Bindings/power/supply/dlg,da9150-charger.yaml | 52 + .../power/supply/dlg,da9150-fuel-gauge.yaml | 51 + .../device-tree/Bindings/power/supply/isp1704.yaml | 42 + .../Bindings/power/supply/lego,ev3-battery.yaml | 55 + .../Bindings/power/supply/lltc,lt3651-charger.yaml | 44 + .../Bindings/power/supply/lltc,ltc294x.yaml | 66 + .../Bindings/power/supply/ltc4162-l.yaml | 2 - .../Bindings/power/supply/maxim,ds2760.yaml | 43 + .../Bindings/power/supply/maxim,max14656.yaml | 45 + .../Bindings/power/supply/maxim,max17040.yaml | 95 ++ .../Bindings/power/supply/maxim,max17042.yaml | 78 + .../Bindings/power/supply/maxim,max8903.yaml | 67 + .../Bindings/power/supply/microchip,ucs1002.yaml | 51 + .../Bindings/power/supply/nokia,n900-battery.yaml | 49 + .../Bindings/power/supply/olpc-battery.yaml | 27 + .../Bindings/power/supply/power-supply.yaml | 22 - .../Bindings/power/supply/qcom,pm8941-charger.yaml | 169 ++ .../power/supply/qcom,pm8941-coincell.yaml | 57 + .../Bindings/power/supply/richtek,rt9455.yaml | 90 + .../Bindings/power/supply/rohm,bd99954.yaml | 2 +- .../Bindings/power/supply/sbs,sbs-battery.yaml | 7 +- .../Bindings/power/supply/sbs,sbs-charger.yaml | 55 + .../Bindings/power/supply/sbs,sbs-manager.yaml | 107 ++ .../Bindings/power/supply/sc2731-charger.yaml | 53 + .../Bindings/power/supply/sc27xx-fg.yaml | 98 ++ .../power/supply/stericsson,ab8500-battery.txt | 34 + .../power/supply/stericsson,ab8500-btemp.yaml | 73 + .../power/supply/stericsson,ab8500-chargalg.yaml | 37 + .../power/supply/stericsson,ab8500-charger.yaml | 123 ++ .../power/supply/stericsson,ab8500-fg.yaml | 72 + .../Bindings/power/supply/ti,lp8727.yaml | 90 + .../Bindings/power/supply/tps65090-charger.yaml | 36 + .../Bindings/power/supply/tps65217-charger.yaml | 43 + .../Bindings/power/supply/twl4030-charger.yaml | 68 + .../supply/x-powers,axp20x-ac-power-supply.yaml | 32 + .../x-powers,axp20x-battery-power-supply.yaml | 30 + .../supply/x-powers,axp20x-usb-power-supply.yaml | 33 + .../device-tree/Bindings/pwm/pwm-rockchip.yaml | 100 ++ .../Bindings/pwm/toshiba,pwm-visconti.yaml | 43 + .../device-tree/Bindings/regulator/fan53555.txt | 4 +- .../Bindings/regulator/qcom,rpmh-regulator.yaml | 162 ++ .../Bindings/regulator/qcom-labibb-regulator.yaml | 1 - .../Bindings/regulator/rohm,bd71815-regulator.yaml | 116 ++ .../Bindings/remoteproc/fsl,imx-rproc.yaml | 90 + .../device-tree/Bindings/remoteproc/qcom,adsp.txt | 4 + .../device-tree/Bindings/remoteproc/qcom,q6v5.txt | 15 + .../Bindings/remoteproc/qcom,wcnss-pil.txt | 6 + .../Bindings/remoteproc/st,stm32-rproc.yaml | 11 +- .../Bindings/remoteproc/ti,omap-remoteproc.yaml | 2 +- .../Bindings/reserved-memory/ramoops.txt | 10 +- .../device-tree/Bindings/riscv/microchip.yaml | 27 + .../device-tree/Bindings/rng/brcm,bcm2835.yaml | 21 + .../device-tree/Bindings/rtc/qcom-pm8xxx-rtc.yaml | 62 + sys/contrib/device-tree/Bindings/serial/8250.yaml | 35 +- .../Bindings/serial/brcm,bcm7271-uart.yaml | 95 ++ .../device-tree/Bindings/serial/ingenic,uart.yaml | 2 +- .../device-tree/Bindings/serial/mtk-uart.txt | 1 + .../device-tree/Bindings/serial/samsung_uart.yaml | 18 +- .../device-tree/Bindings/serial/serial.yaml | 12 +- .../device-tree/Bindings/serial/st,stm32-uart.yaml | 59 +- .../device-tree/Bindings/soc/mediatek/pwrap.txt | 1 + .../Bindings/soc/qcom/qcom,aoss-qmp.txt | 1 + .../device-tree/Bindings/soc/qcom/qcom,wcnss.txt | 7 + sys/contrib/device-tree/Bindings/sound/ak4642.yaml | 2 - sys/contrib/device-tree/Bindings/sound/ak5558.txt | 2 +- .../Bindings/sound/amlogic,gx-sound-card.yaml | 4 +- .../Bindings/sound/audio-graph-port.yaml | 104 +- .../device-tree/Bindings/sound/fsl,rpmsg.yaml | 108 ++ .../device-tree/Bindings/sound/fsl-asoc-card.txt | 2 + .../Bindings/sound/google,cros-ec-codec.yaml | 2 +- .../Bindings/sound/intel,keembay-i2s.yaml | 2 +- .../Bindings/sound/marvell,mmp-sspa.yaml | 6 +- .../device-tree/Bindings/sound/mchp,i2s-mcc.yaml | 108 ++ .../sound/mt8183-mt6358-ts3a227-max98357.txt | 1 + .../Bindings/sound/nvidia,tegra186-dspk.yaml | 11 +- .../Bindings/sound/nvidia,tegra210-admaif.yaml | 11 +- .../Bindings/sound/nvidia,tegra210-ahub.yaml | 27 +- .../Bindings/sound/nvidia,tegra210-dmic.yaml | 11 +- .../Bindings/sound/nvidia,tegra210-i2s.yaml | 11 +- .../device-tree/Bindings/sound/renesas,rsnd.yaml | 6 +- sys/contrib/device-tree/Bindings/sound/rt1019.yaml | 35 + sys/contrib/device-tree/Bindings/sound/rt5682.txt | 2 +- .../Bindings/sound/socionext,uniphier-aio.yaml | 8 +- .../Bindings/sound/socionext,uniphier-evea.yaml | 8 +- .../device-tree/Bindings/sound/tlv320aic3x.txt | 21 +- .../device-tree/Bindings/soundwire/qcom,sdw.txt | 20 + .../Bindings/spi/amlogic,meson-gx-spicc.yaml | 4 +- .../Bindings/spi/brcm,spi-bcm-qspi.yaml | 198 +++ .../device-tree/Bindings/spi/cdns,qspi-nor.yaml | 143 ++ .../device-tree/Bindings/spi/fsl,spi-fsl-qspi.yaml | 96 ++ .../Bindings/spi/mediatek,spi-mtk-nor.yaml | 1 + .../device-tree/Bindings/spi/spi-controller.yaml | 21 +- .../device-tree/Bindings/spi/spi-mt65xx.txt | 2 + sys/contrib/device-tree/Bindings/spi/spi-mux.yaml | 10 +- .../device-tree/Bindings/spi/spi-nxp-fspi.txt | 2 + .../device-tree/Bindings/spi/spi-slave-mt27xx.txt | 1 + .../device-tree/Bindings/spi/st,stm32-spi.yaml | 6 - .../device-tree/Bindings/submitting-patches.rst | 10 +- .../Bindings/thermal/brcm,ns-thermal.yaml | 60 + .../Bindings/thermal/qcom-spmi-adc-tm5.yaml | 2 - .../device-tree/Bindings/thermal/qcom-tsens.yaml | 59 +- .../Bindings/thermal/rcar-gen3-thermal.yaml | 43 +- .../Bindings/thermal/thermal-sensor.yaml | 3 + .../device-tree/Bindings/timer/arm,arch_timer.yaml | 19 + .../device-tree/Bindings/timer/ingenic,tcu.yaml | 30 +- .../Bindings/timer/mediatek,mtk-timer.txt | 1 + .../Bindings/timer/nuvoton,npcm7xx-timer.txt | 3 +- .../device-tree/Bindings/timer/renesas,cmt.yaml | 4 + .../device-tree/Bindings/timer/renesas,tmu.yaml | 6 + .../device-tree/Bindings/trivial-devices.yaml | 9 + .../device-tree/Bindings/ufs/ufshcd-pltfrm.txt | 2 + .../device-tree/Bindings/usb/dwc3-xilinx.txt | 28 +- .../device-tree/Bindings/usb/fsl,imx8mp-dwc3.yaml | 9 +- .../device-tree/Bindings/usb/generic-ehci.yaml | 6 + .../Bindings/usb/mediatek,mtk-xhci.yaml | 29 +- .../device-tree/Bindings/usb/mediatek,mtu3.yaml | 12 +- .../device-tree/Bindings/usb/qcom,dwc3.yaml | 1 + .../device-tree/Bindings/usb/snps,dwc3.yaml | 8 +- .../device-tree/Bindings/usb/usb-device.yaml | 6 +- .../device-tree/Bindings/usb/usb-nop-xceiv.yaml | 64 + sys/contrib/device-tree/Bindings/usb/usb.yaml | 1 - .../device-tree/Bindings/vendor-prefixes.yaml | 24 + .../Bindings/watchdog/nuvoton,npcm-wdt.txt | 3 +- .../device-tree/Bindings/writing-schema.rst | 183 ++ .../include/dt-bindings/clock/imx8mp-clock.h | 3 - .../include/dt-bindings/clock/mt7621-clk.h | 41 + .../device-tree/include/dt-bindings/clock/omap5.h | 2 + .../include/dt-bindings/clock/rk3568-cru.h | 926 +++++++++++ .../include/dt-bindings/clock/sifive-fu740-prci.h | 1 + .../include/dt-bindings/input/atmel-maxtouch.h | 10 + .../include/dt-bindings/input/linux-event-codes.h | 1 + .../include/dt-bindings/interconnect/qcom,sdm660.h | 116 ++ .../include/dt-bindings/interconnect/qcom,sm8350.h | 172 ++ .../dt-bindings/interrupt-controller/apple-aic.h | 15 + .../include/dt-bindings/mux/ti-serdes.h | 5 + .../include/dt-bindings/phy/phy-cadence.h | 20 + .../device-tree/include/dt-bindings/phy/phy-ti.h | 21 + .../device-tree/include/dt-bindings/pinctrl/k3.h | 5 +- .../include/dt-bindings/pinctrl/mt8195-pinfunc.h | 962 +++++++++++ .../include/dt-bindings/pinctrl/pinctrl-zynqmp.h | 19 + .../include/dt-bindings/power/qcom-rpmpd.h | 26 + .../dt-bindings/pwm/raspberrypi,firmware-poe-pwm.h | 13 + .../device-tree/include/dt-bindings/soc/bcm-pmb.h | 1 + .../device-tree/include/dt-bindings/usb/pd.h | 89 +- .../device-tree/src/arm/am335x-boneblack.dts | 132 +- .../device-tree/src/arm/am335x-pocketbeagle.dts | 140 +- sys/contrib/device-tree/src/arm/am33xx-l4.dtsi | 28 +- .../device-tree/src/arm/armada-385-atl-x530.dts | 235 +++ .../src/arm/aspeed-bmc-amd-ethanolx.dts | 30 + .../src/arm/aspeed-bmc-asrock-e3c246d4i.dts | 202 +++ .../src/arm/aspeed-bmc-facebook-tiogapass.dts | 5 + .../device-tree/src/arm/aspeed-bmc-ibm-everest.dts | 1747 ++++++++++++++++++-- .../src/arm/aspeed-bmc-ibm-rainier-1s4u.dts | 14 + .../src/arm/aspeed-bmc-ibm-rainier-4u.dts | 14 + .../device-tree/src/arm/aspeed-bmc-ibm-rainier.dts | 748 ++++++++- .../device-tree/src/arm/aspeed-bmc-opp-mihawk.dts | 33 + sys/contrib/device-tree/src/arm/aspeed-g4.dtsi | 76 +- sys/contrib/device-tree/src/arm/aspeed-g5.dtsi | 137 +- sys/contrib/device-tree/src/arm/aspeed-g6.dtsi | 137 +- sys/contrib/device-tree/src/arm/at91-sam9x60ek.dts | 3 +- .../device-tree/src/arm/at91-sama5d27_som1_ek.dts | 3 +- .../src/arm/at91-sama5d27_wlsom1_ek.dts | 3 +- .../device-tree/src/arm/at91-sama5d2_icp.dts | 3 +- .../device-tree/src/arm/at91-sama5d2_ptc_ek.dts | 3 +- .../device-tree/src/arm/at91-sama5d2_xplained.dts | 3 +- .../device-tree/src/arm/at91-sama5d3_xplained.dts | 3 +- sys/contrib/device-tree/src/arm/at91sam9260ek.dts | 3 +- .../device-tree/src/arm/at91sam9g20ek_common.dtsi | 3 +- .../device-tree/src/arm/bcm4708-asus-rt-ac56u.dts | 4 +- .../device-tree/src/arm/bcm4708-asus-rt-ac68u.dts | 4 +- .../src/arm/bcm4708-buffalo-wzr-1750dhp.dts | 4 +- .../src/arm/bcm4708-linksys-ea6300-v1.dts | 5 + .../device-tree/src/arm/bcm4708-netgear-r6250.dts | 4 +- .../src/arm/bcm4708-netgear-r6300-v2.dts | 4 +- .../src/arm/bcm4708-smartrg-sr400ac.dts | 4 +- .../device-tree/src/arm/bcm47081-asus-rt-n18u.dts | 4 +- .../src/arm/bcm47081-buffalo-wzr-600dhp2.dts | 4 +- .../src/arm/bcm47081-buffalo-wzr-900dhp.dts | 4 +- .../src/arm/bcm47081-luxul-xwr-1200.dts | 5 + .../device-tree/src/arm/bcm4709-asus-rt-ac87u.dts | 4 +- .../src/arm/bcm4709-buffalo-wxr-1900dhp.dts | 4 +- .../device-tree/src/arm/bcm4709-linksys-ea9200.dts | 9 +- .../device-tree/src/arm/bcm4709-netgear-r7000.dts | 4 +- .../device-tree/src/arm/bcm4709-netgear-r8000.dts | 4 +- .../src/arm/bcm47094-dlink-dir-885l.dts | 4 +- .../src/arm/bcm47094-linksys-panamera.dts | 26 +- .../src/arm/bcm47094-luxul-abr-4500.dts | 9 +- .../src/arm/bcm47094-luxul-xbr-4500.dts | 9 +- .../src/arm/bcm47094-luxul-xwc-2000.dts | 4 +- .../src/arm/bcm47094-luxul-xwr-3100.dts | 9 +- .../src/arm/bcm47094-luxul-xwr-3150-v1.dts | 9 +- .../device-tree/src/arm/bcm47094-netgear-r8500.dts | 4 +- .../device-tree/src/arm/bcm47094-phicomm-k3.dts | 4 +- sys/contrib/device-tree/src/arm/dra7-l4.dtsi | 79 +- sys/contrib/device-tree/src/arm/dra7.dtsi | 240 ++- sys/contrib/device-tree/src/arm/ep7209.dtsi | 18 +- sys/contrib/device-tree/src/arm/ep7211-edb7211.dts | 2 +- .../device-tree/src/arm/exynos3250-monk.dts | 4 +- .../device-tree/src/arm/exynos3250-rinato.dts | 4 +- .../device-tree/src/arm/exynos4210-i9100.dts | 56 +- .../device-tree/src/arm/exynos4412-midas.dtsi | 6 +- .../src/arm/exynos4412-odroid-common.dtsi | 5 +- .../device-tree/src/arm/exynos4412-odroidx.dts | 3 +- .../device-tree/src/arm/exynos4412-p4note.dtsi | 4 +- .../src/arm/exynos4412-ppmu-common.dtsi | 48 +- .../device-tree/src/arm/exynos5250-smdk5250.dts | 2 +- .../src/arm/exynos5250-snow-common.dtsi | 2 +- .../device-tree/src/arm/exynos5410-pinctrl.dtsi | 28 +- .../device-tree/src/arm/imx50-kobo-aura.dts | 16 +- sys/contrib/device-tree/src/arm/imx51.dtsi | 2 +- .../device-tree/src/arm/imx53-qsb-common.dtsi | 2 + sys/contrib/device-tree/src/arm/imx53.dtsi | 2 +- sys/contrib/device-tree/src/arm/imx6dl-plybas.dts | 6 +- .../device-tree/src/arm/imx6dl-yapp4-common.dtsi | 6 +- sys/contrib/device-tree/src/arm/imx6q-b450v3.dts | 5 + sys/contrib/device-tree/src/arm/imx6q-b650v3.dts | 5 + sys/contrib/device-tree/src/arm/imx6q-b850v3.dts | 5 + sys/contrib/device-tree/src/arm/imx6q-ba16.dtsi | 21 + sys/contrib/device-tree/src/arm/imx6q-bx50v3.dtsi | 12 +- .../device-tree/src/arm/imx6q-dhcom-som.dtsi | 12 + .../device-tree/src/arm/imx6qdl-emcon-avari.dtsi | 2 +- .../device-tree/src/arm/imx6qdl-gw52xx.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw53xx.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw54xx.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw551x.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw552x.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw560x.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw5903.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw5904.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw5907.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw5910.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw5912.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw5913.dtsi | 2 - .../device-tree/src/arm/imx6qdl-phytec-pbab01.dtsi | 6 +- .../device-tree/src/arm/imx6qdl-phytec-pfla02.dtsi | 38 +- .../device-tree/src/arm/imx6qdl-ts7970.dtsi | 1 - .../device-tree/src/arm/imx6qdl-wandboard.dtsi | 24 +- .../device-tree/src/arm/imx6sl-tolino-shine2hd.dts | 7 +- .../device-tree/src/arm/imx6ull-colibri.dtsi | 12 +- sys/contrib/device-tree/src/arm/imx7d-mba7.dts | 2 - .../device-tree/src/arm/imx7d-meerkat96.dts | 2 +- sys/contrib/device-tree/src/arm/imx7d-pico.dtsi | 2 +- .../device-tree/src/arm/imx7d-remarkable2.dts | 146 ++ .../device-tree/src/arm/iwg20d-q7-common.dtsi | 4 +- sys/contrib/device-tree/src/arm/ls1021a.dtsi | 3 +- .../src/arm/motorola-cpcap-mapphone.dtsi | 59 +- .../src/arm/mstar-infinity2m-ssd202d-unitv2.dts | 25 + sys/contrib/device-tree/src/arm/mstar-v7.dtsi | 23 + sys/contrib/device-tree/src/arm/mt2701.dtsi | 19 +- sys/contrib/device-tree/src/arm/mt6589.dtsi | 1 + sys/contrib/device-tree/src/arm/mt7623.dtsi | 26 +- sys/contrib/device-tree/src/arm/mt7623n.dtsi | 4 +- sys/contrib/device-tree/src/arm/mt7629.dtsi | 12 +- .../device-tree/src/arm/nuvoton-npcm730-gbs.dts | 1135 +++++++++++++ .../device-tree/src/arm/nuvoton-npcm750-evb.dts | 2 +- .../arm/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts | 40 + .../device-tree/src/arm/nuvoton-wpcm450.dtsi | 76 + sys/contrib/device-tree/src/arm/omap3-echo.dts | 476 ++++-- sys/contrib/device-tree/src/arm/omap4-l4.dtsi | 43 +- sys/contrib/device-tree/src/arm/omap4.dtsi | 169 +- sys/contrib/device-tree/src/arm/omap4460.dtsi | 13 +- sys/contrib/device-tree/src/arm/omap5-l4.dtsi | 67 +- sys/contrib/device-tree/src/arm/omap5.dtsi | 204 ++- .../device-tree/src/arm/owl-s500-roseapplepi.dts | 132 +- sys/contrib/device-tree/src/arm/qcom-ipq4019.dtsi | 2 +- .../src/arm/qcom-msm8974-lge-nexus5-hammerhead.dts | 6 +- .../src/arm/qcom-msm8974-samsung-klte.dts | 52 +- sys/contrib/device-tree/src/arm/qcom-msm8974.dtsi | 9 + sys/contrib/device-tree/src/arm/qcom-sdx55-t55.dts | 281 ++++ .../src/arm/qcom-sdx55-telit-fn980-tlb.dts | 282 ++++ sys/contrib/device-tree/src/arm/qcom-sdx55.dtsi | 207 ++- .../device-tree/src/arm/r7s9210-rza2mevb.dts | 55 +- .../src/arm/r8a7742-iwg21d-q7-dbcm-ca.dts | 159 +- .../arm/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi | 32 + .../arm/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi | 29 + .../device-tree/src/arm/r8a7742-iwg21d-q7.dts | 4 +- sys/contrib/device-tree/src/arm/r8a7742.dtsi | 4 +- .../device-tree/src/arm/r8a7743-sk-rzg1m.dts | 2 +- sys/contrib/device-tree/src/arm/r8a7743.dtsi | 2 +- sys/contrib/device-tree/src/arm/r8a7744.dtsi | 2 +- .../device-tree/src/arm/r8a7745-iwg22d-sodimm.dts | 4 +- .../device-tree/src/arm/r8a7745-sk-rzg1e.dts | 2 +- sys/contrib/device-tree/src/arm/r8a7745.dtsi | 2 +- sys/contrib/device-tree/src/arm/r8a77470.dtsi | 2 +- sys/contrib/device-tree/src/arm/r8a7790-lager.dts | 11 +- sys/contrib/device-tree/src/arm/r8a7790-stout.dts | 4 +- sys/contrib/device-tree/src/arm/r8a7790.dtsi | 4 +- .../device-tree/src/arm/r8a7791-koelsch.dts | 19 +- sys/contrib/device-tree/src/arm/r8a7791-porter.dts | 6 +- sys/contrib/device-tree/src/arm/r8a7791.dtsi | 2 +- .../device-tree/src/arm/r8a7792-blanche.dts | 2 +- sys/contrib/device-tree/src/arm/r8a7792-wheat.dts | 2 +- sys/contrib/device-tree/src/arm/r8a7792.dtsi | 2 +- sys/contrib/device-tree/src/arm/r8a7793-gose.dts | 11 +- sys/contrib/device-tree/src/arm/r8a7793.dtsi | 2 +- sys/contrib/device-tree/src/arm/r8a7794-alt.dts | 5 +- sys/contrib/device-tree/src/arm/r8a7794-silk.dts | 8 +- sys/contrib/device-tree/src/arm/r8a7794.dtsi | 2 +- sys/contrib/device-tree/src/arm/rk3036.dtsi | 4 - sys/contrib/device-tree/src/arm/rk3228-evb.dts | 4 + sys/contrib/device-tree/src/arm/rk3229-evb.dts | 4 + sys/contrib/device-tree/src/arm/rk3229-xms6.dts | 6 + sys/contrib/device-tree/src/arm/rk322x.dtsi | 5 +- sys/contrib/device-tree/src/arm/rk3288.dtsi | 4 - .../device-tree/src/arm/rv1108-elgin-r1.dts | 4 + sys/contrib/device-tree/src/arm/rv1108-evb.dts | 4 + sys/contrib/device-tree/src/arm/rv1108.dtsi | 6 +- .../device-tree/src/arm/s5pv210-fascinate4g.dts | 2 +- sys/contrib/device-tree/src/arm/sama5d2.dtsi | 6 +- sys/contrib/device-tree/src/arm/sama5d3.dtsi | 2 +- sys/contrib/device-tree/src/arm/ste-ab8500.dtsi | 4 +- .../src/arm/ste-href-tvk1281618-r2.dtsi | 214 ++- .../src/arm/ste-href-tvk1281618-r3.dtsi | 210 ++- .../device-tree/src/arm/ste-href520-tvk.dts | 4 +- .../device-tree/src/arm/ste-hrefprev60-tvk.dts | 2 +- .../device-tree/src/arm/ste-hrefv60plus-tvk.dts | 4 +- .../src/arm/ste-ux500-samsung-janice.dts | 48 +- .../device-tree/src/arm/stm32h7-pinctrl.dtsi | 275 +++ sys/contrib/device-tree/src/arm/stm32h743.dtsi | 177 +- .../device-tree/src/arm/stm32h743i-disco.dts | 2 +- .../device-tree/src/arm/stm32h743i-eval.dts | 2 +- sys/contrib/device-tree/src/arm/stm32h750.dtsi | 6 + .../device-tree/src/arm/stm32h750i-art-pi.dts | 229 +++ .../device-tree/src/arm/stm32mp15-pinctrl.dtsi | 21 +- sys/contrib/device-tree/src/arm/stm32mp151.dtsi | 32 +- .../src/arm/stm32mp153c-dhcom-drc02.dts | 4 + .../src/arm/stm32mp157a-icore-stm32mp1-ctouch2.dts | 47 + .../arm/stm32mp157a-icore-stm32mp1-edimm2.2.dts | 47 + .../src/arm/stm32mp157a-icore-stm32mp1.dtsi | 196 +++ ...m32mp157a-microgea-stm32mp1-microdev2.0-of7.dts | 154 ++ .../stm32mp157a-microgea-stm32mp1-microdev2.0.dts | 55 + .../src/arm/stm32mp157a-microgea-stm32mp1.dtsi | 148 ++ .../device-tree/src/arm/stm32mp157c-dhcom-pdk2.dts | 4 + .../src/arm/stm32mp157c-dhcom-picoitx.dts | 4 + .../src/arm/stm32mp15xx-dhcom-drc02.dtsi | 12 +- .../src/arm/stm32mp15xx-dhcom-picoitx.dtsi | 12 +- .../device-tree/src/arm/stm32mp15xx-dhcom-som.dtsi | 64 + .../src/arm/stm32mp15xx-dhcor-avenger96.dtsi | 35 + .../device-tree/src/arm/stm32mp15xx-dhcor-som.dtsi | 4 + .../device-tree/src/arm/sun4i-a10-topwise-a721.dts | 242 +++ .../device-tree/src/arm/sun6i-a31-hummingbird.dts | 2 +- sys/contrib/device-tree/src/arm/sun6i-a31-m9.dts | 2 +- .../src/arm/sun6i-a31-mele-a1000g-quad.dts | 2 +- sys/contrib/device-tree/src/arm/sun6i-a31.dtsi | 6 +- .../device-tree/src/arm/sun6i-a31s-primo81.dts | 2 +- .../src/arm/sun6i-a31s-sina31s-core.dtsi | 2 +- .../src/arm/sun6i-a31s-sinovoip-bpi-m2.dts | 2 +- .../src/arm/sun6i-a31s-yones-toptech-bs1078-v2.dts | 2 +- .../src/arm/sun6i-reference-design-tablet.dtsi | 2 +- sys/contrib/device-tree/src/arm/sun8i-a23-a33.dtsi | 6 +- .../device-tree/src/arm/sun8i-a33-olinuxino.dts | 2 +- .../src/arm/sun8i-a33-sinlinx-sina33.dts | 2 +- .../src/arm/sun8i-a83t-allwinner-h8homlet-v2.dts | 4 +- .../device-tree/src/arm/sun8i-a83t-bananapi-m3.dts | 4 +- .../src/arm/sun8i-a83t-cubietruck-plus.dts | 4 +- .../device-tree/src/arm/sun8i-a83t-tbs-a711.dts | 4 +- sys/contrib/device-tree/src/arm/sun8i-a83t.dtsi | 5 +- .../src/arm/sun8i-h2-plus-bananapi-m2-zero.dts | 25 + .../device-tree/src/arm/sun8i-h3-beelink-x2.dts | 11 + .../device-tree/src/arm/sun8i-r16-bananapi-m2m.dts | 2 +- .../device-tree/src/arm/sun8i-r16-parrot.dts | 2 +- .../src/arm/sun8i-reference-design-tablet.dtsi | 2 +- sys/contrib/device-tree/src/arm/sunxi-h3-h5.dtsi | 12 + .../src/arm/tegra124-peripherals-opp.dtsi | 5 + .../src/arm/tegra20-acer-a500-picasso.dts | 16 +- .../device-tree/src/arm/tegra20-cpu-opp.dtsi | 2 + sys/contrib/device-tree/src/arm/tegra20-paz00.dts | 14 +- .../src/arm/tegra20-peripherals-opp.dtsi | 1 + .../device-tree/src/arm/tegra20-ventana.dts | 78 +- .../device-tree/src/arm/tegra30-apalis.dtsi | 1 + .../arm/tegra30-asus-nexus7-grouper-common.dtsi | 14 +- .../arm/tegra30-asus-nexus7-grouper-ti-pmic.dtsi | 1 + sys/contrib/device-tree/src/arm/tegra30-beaver.dts | 1 + .../device-tree/src/arm/tegra30-cardhu-a04.dts | 48 - .../device-tree/src/arm/tegra30-cardhu.dtsi | 84 +- .../device-tree/src/arm/tegra30-colibri.dtsi | 1 + .../device-tree/src/arm/tegra30-cpu-opp.dtsi | 3 + sys/contrib/device-tree/src/arm/tegra30-ouya.dts | 16 +- .../src/arm/tegra30-peripherals-opp.dtsi | 3 + sys/contrib/device-tree/src/arm/uniphier-pxs2.dtsi | 2 +- .../arm64/allwinner/sun50i-a64-amarula-relic.dts | 2 +- .../arm64/allwinner/sun50i-a64-bananapi-m64.dts | 2 +- .../src/arm64/allwinner/sun50i-a64-nanopi-a64.dts | 2 +- .../src/arm64/allwinner/sun50i-a64-olinuxino.dts | 2 +- .../arm64/allwinner/sun50i-a64-orangepi-win.dts | 2 +- .../src/arm64/allwinner/sun50i-a64-pine64.dts | 2 +- .../src/arm64/allwinner/sun50i-a64-pinebook.dts | 2 +- .../src/arm64/allwinner/sun50i-a64-pinephone.dtsi | 2 +- .../src/arm64/allwinner/sun50i-a64-pinetab.dts | 2 +- .../src/arm64/allwinner/sun50i-a64-sopine.dtsi | 2 +- .../src/arm64/allwinner/sun50i-a64-teres-i.dts | 2 +- .../src/arm64/allwinner/sun50i-a64.dtsi | 6 +- .../src/arm64/allwinner/sun50i-h6-beelink-gs1.dts | 40 +- .../src/arm64/allwinner/sun50i-h6-orangepi-3.dts | 16 +- .../src/arm64/allwinner/sun50i-h6-orangepi.dtsi | 24 +- .../src/arm64/allwinner/sun50i-h6-pine-h64.dts | 4 +- .../device-tree/src/arm64/allwinner/sun50i-h6.dtsi | 8 +- .../device-tree/src/arm64/amlogic/meson-a1.dtsi | 4 +- .../device-tree/src/arm64/amlogic/meson-axg.dtsi | 1 - .../src/arm64/amlogic/meson-g12-common.dtsi | 20 +- .../src/arm64/amlogic/meson-g12b-gsking-x.dts | 2 +- .../src/arm64/amlogic/meson-g12b-gtking-pro.dts | 4 +- .../src/arm64/amlogic/meson-g12b-gtking.dts | 2 +- .../src/arm64/amlogic/meson-g12b-odroid-n2.dtsi | 56 +- .../device-tree/src/arm64/amlogic/meson-gx.dtsi | 6 + .../src/arm64/amlogic/meson-gxbb-odroidc2.dts | 2 +- .../amlogic/meson-gxl-s905d-mecool-kii-pro.dts | 86 + .../arm64/amlogic/meson-gxl-s905d-sml5442tw.dts | 8 +- .../arm64/amlogic/meson-gxm-mecool-kiii-pro.dts | 113 ++ .../src/arm64/amlogic/meson-gxm-minix-neo-u9h.dts | 120 ++ .../src/arm64/amlogic/meson-gxm-wetek-core2.dts | 2 +- .../src/arm64/amlogic/meson-khadas-vim3.dtsi | 4 +- .../src/arm64/amlogic/meson-sm1-odroid-c4.dts | 2 +- .../device-tree/src/arm64/apple/t8103-j274.dts | 45 + sys/contrib/device-tree/src/arm64/apple/t8103.dtsi | 135 ++ .../device-tree/src/arm64/arm/juno-base.dtsi | 5 +- sys/contrib/device-tree/src/arm64/arm/juno-r1.dts | 4 + sys/contrib/device-tree/src/arm64/arm/juno-r2.dts | 4 + .../broadcom/bcm4908/bcm4906-netgear-r8000p.dts | 107 +- .../bcm4908/bcm4906-tplink-archer-c2300-v1.dts | 182 ++ .../broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts | 44 +- .../src/arm64/broadcom/bcm4908/bcm4908.dtsi | 47 +- .../src/arm64/exynos/exynos5433-tm2-common.dtsi | 2 +- .../device-tree/src/arm64/exynos/exynos5433.dtsi | 6 +- .../freescale/fsl-ls1028a-kontron-sl28-var1.dts | 3 +- .../freescale/fsl-ls1028a-kontron-sl28-var4.dts | 5 +- .../arm64/freescale/fsl-ls1028a-kontron-sl28.dts | 80 +- .../src/arm64/freescale/fsl-ls1028a-qds.dts | 1 + .../src/arm64/freescale/fsl-ls1028a-rdb.dts | 1 + .../src/arm64/freescale/fsl-ls1028a.dtsi | 22 +- .../src/arm64/freescale/fsl-lx2160a-cex7.dtsi | 24 + .../arm64/freescale/fsl-lx2160a-clearfog-itx.dtsi | 64 + .../src/arm64/freescale/imx8-ss-adma.dtsi | 8 + .../src/arm64/freescale/imx8-ss-audio.dtsi | 68 + .../src/arm64/freescale/imx8-ss-conn.dtsi | 184 +++ .../src/arm64/freescale/imx8-ss-ddr.dtsi | 18 + .../src/arm64/freescale/imx8-ss-dma.dtsi | 202 +++ .../src/arm64/freescale/imx8-ss-lsio.dtsi | 311 ++++ .../arm64/freescale/imx8mm-icore-mx8mm-ctouch2.dts | 97 ++ .../freescale/imx8mm-icore-mx8mm-edimm2.2.dts | 97 ++ .../src/arm64/freescale/imx8mm-icore-mx8mm.dtsi | 232 +++ .../src/arm64/freescale/imx8mm-nitrogen-r2.dts | 314 +++- .../device-tree/src/arm64/freescale/imx8mm.dtsi | 2 +- .../src/arm64/freescale/imx8mn-beacon-som.dtsi | 6 +- .../device-tree/src/arm64/freescale/imx8mn.dtsi | 2 +- .../device-tree/src/arm64/freescale/imx8mp-evk.dts | 2 + .../arm64/freescale/imx8mp-phyboard-pollux-rdk.dts | 56 +- .../device-tree/src/arm64/freescale/imx8mp.dtsi | 43 +- .../arm64/freescale/imx8mq-kontron-pitx-imx8m.dts | 613 +++++++ .../src/arm64/freescale/imx8mq-librem5-devkit.dts | 70 +- .../src/arm64/freescale/imx8mq-librem5-r2.dts | 2 +- .../src/arm64/freescale/imx8mq-librem5-r3.dts | 4 + .../src/arm64/freescale/imx8mq-librem5.dtsi | 24 +- .../src/arm64/freescale/imx8mq-zii-ultra-rmb3.dts | 10 +- .../src/arm64/freescale/imx8mq-zii-ultra.dtsi | 23 +- .../device-tree/src/arm64/freescale/imx8qm-mek.dts | 144 ++ .../src/arm64/freescale/imx8qm-ss-conn.dtsi | 21 + .../src/arm64/freescale/imx8qm-ss-dma.dtsi | 51 + .../src/arm64/freescale/imx8qm-ss-lsio.dtsi | 61 + .../device-tree/src/arm64/freescale/imx8qm.dtsi | 176 ++ .../src/arm64/freescale/imx8qxp-ai_ml.dts | 20 +- .../arm64/freescale/imx8qxp-colibri-eval-v3.dtsi | 8 +- .../src/arm64/freescale/imx8qxp-colibri.dtsi | 12 +- .../src/arm64/freescale/imx8qxp-mek.dts | 50 +- .../src/arm64/freescale/imx8qxp-ss-adma.dtsi | 37 + .../src/arm64/freescale/imx8qxp-ss-conn.dtsi | 25 + .../src/arm64/freescale/imx8qxp-ss-lsio.dtsi | 61 + .../device-tree/src/arm64/freescale/imx8qxp.dtsi | 423 +---- .../src/arm64/intel/socfpga_agilex.dtsi | 222 +-- .../src/arm64/intel/socfpga_agilex_socdk.dts | 14 +- .../src/arm64/intel/socfpga_agilex_socdk_nand.dts | 18 +- .../src/arm64/intel/socfpga_n5x_socdk.dts | 12 +- .../device-tree/src/arm64/marvell/armada-37xx.dtsi | 3 +- .../src/arm64/marvell/armada-7040-db.dts | 14 +- .../arm64/marvell/armada-8040-clearfog-gt-8k.dts | 127 ++ .../src/arm64/marvell/armada-8040-db.dts | 21 +- .../src/arm64/marvell/armada-8040-mcbin.dtsi | 19 +- .../src/arm64/marvell/armada-cp11x.dtsi | 19 + .../device-tree/src/arm64/marvell/cn9130-db.dts | 12 +- .../device-tree/src/arm64/marvell/cn9131-db.dts | 9 +- .../device-tree/src/arm64/marvell/cn9132-db.dts | 11 +- .../device-tree/src/arm64/mediatek/mt2712e.dtsi | 8 +- .../device-tree/src/arm64/mediatek/mt7622-rfb1.dts | 12 + .../device-tree/src/arm64/mediatek/mt7622.dtsi | 9 +- .../device-tree/src/arm64/mediatek/mt8173-evb.dts | 6 +- .../device-tree/src/arm64/mediatek/mt8173.dtsi | 15 +- .../device-tree/src/arm64/mediatek/mt8183-evb.dts | 4 + .../arm64/mediatek/mt8183-kukui-jacuzzi-damu.dts | 31 + .../mt8183-kukui-jacuzzi-juniper-sku16.dts | 13 + .../mediatek/mt8183-kukui-jacuzzi-juniper.dtsi | 27 + .../src/arm64/mediatek/mt8183-kukui-jacuzzi.dtsi | 474 ++++++ .../src/arm64/mediatek/mt8183-kukui-kakadu.dts | 13 + .../src/arm64/mediatek/mt8183-kukui-kakadu.dtsi | 378 +++++ .../arm64/mediatek/mt8183-kukui-kodama-sku16.dts | 21 + .../arm64/mediatek/mt8183-kukui-kodama-sku272.dts | 21 + .../arm64/mediatek/mt8183-kukui-kodama-sku288.dts | 21 + .../arm64/mediatek/mt8183-kukui-kodama-sku32.dts | 21 + .../src/arm64/mediatek/mt8183-kukui-kodama.dtsi | 343 ++++ .../src/arm64/mediatek/mt8183-pumpkin.dts | 378 +++++ .../device-tree/src/arm64/mediatek/mt8183.dtsi | 160 +- .../device-tree/src/arm64/mediatek/mt8516.dtsi | 9 +- .../src/arm64/mediatek/pumpkin-common.dtsi | 3 +- .../device-tree/src/arm64/qcom/apq8016-sbc.dts | 2 +- .../device-tree/src/arm64/qcom/msm8916.dtsi | 8 +- .../device-tree/src/arm64/qcom/msm8994.dtsi | 4 +- .../src/arm64/qcom/msm8998-clamshell.dtsi | 4 + .../device-tree/src/arm64/qcom/msm8998-mtp.dtsi | 4 + .../arm64/qcom/msm8998-oneplus-cheeseburger.dts | 42 + .../src/arm64/qcom/msm8998-oneplus-common.dtsi | 514 ++++++ .../src/arm64/qcom/msm8998-oneplus-dumpling.dts | 25 + .../device-tree/src/arm64/qcom/msm8998.dtsi | 2 + sys/contrib/device-tree/src/arm64/qcom/pm8150.dtsi | 4 +- sys/contrib/device-tree/src/arm64/qcom/pm8350.dtsi | 25 + .../device-tree/src/arm64/qcom/pm8350b.dtsi | 25 + .../device-tree/src/arm64/qcom/pm8350c.dtsi | 25 + .../device-tree/src/arm64/qcom/pmk8350.dtsi | 25 + .../device-tree/src/arm64/qcom/pmr735a.dtsi | 25 + .../device-tree/src/arm64/qcom/pmr735b.dtsi | 25 + .../device-tree/src/arm64/qcom/qrb5165-rb5.dts | 18 +- .../arm64/qcom/sc7180-trogdor-coachz-r1-lte.dts | 18 + .../src/arm64/qcom/sc7180-trogdor-coachz-r1.dts | 141 ++ .../arm64/qcom/sc7180-trogdor-coachz-r2-lte.dts | 18 + .../src/arm64/qcom/sc7180-trogdor-coachz-r2.dts | 15 + .../src/arm64/qcom/sc7180-trogdor-coachz.dtsi | 266 +++ .../qcom/sc7180-trogdor-lazor-limozeen-nots-r4.dts | 34 + .../qcom/sc7180-trogdor-lazor-limozeen-nots.dts | 26 + .../arm64/qcom/sc7180-trogdor-lazor-limozeen.dts | 42 + .../src/arm64/qcom/sc7180-trogdor-lazor-r0.dts | 9 + .../src/arm64/qcom/sc7180-trogdor-lazor-r1.dts | 9 + .../src/arm64/qcom/sc7180-trogdor-lazor-r3-kb.dts | 5 +- .../src/arm64/qcom/sc7180-trogdor-lazor-r3-lte.dts | 4 +- .../src/arm64/qcom/sc7180-trogdor-lazor-r3.dts | 10 + .../src/arm64/qcom/sc7180-trogdor-lazor.dtsi | 39 +- .../arm64/qcom/sc7180-trogdor-pompom-r1-lte.dts | 14 + .../src/arm64/qcom/sc7180-trogdor-pompom-r1.dts | 26 + .../arm64/qcom/sc7180-trogdor-pompom-r2-lte.dts | 14 + .../src/arm64/qcom/sc7180-trogdor-pompom-r2.dts | 44 + .../src/arm64/qcom/sc7180-trogdor-pompom.dtsi | 295 ++++ .../src/arm64/qcom/sc7180-trogdor-r1.dts | 35 +- .../device-tree/src/arm64/qcom/sc7180-trogdor.dtsi | 222 ++- sys/contrib/device-tree/src/arm64/qcom/sc7180.dtsi | 58 +- .../device-tree/src/arm64/qcom/sc7280-idp.dts | 259 +++ sys/contrib/device-tree/src/arm64/qcom/sc7280.dtsi | 1128 +++++++++++++ .../device-tree/src/arm64/qcom/sdm845-db845c.dts | 31 +- .../src/arm64/qcom/sdm845-xiaomi-beryllium.dts | 71 + sys/contrib/device-tree/src/arm64/qcom/sdm845.dtsi | 155 +- sys/contrib/device-tree/src/arm64/qcom/sm8150.dtsi | 555 ++++++- .../device-tree/src/arm64/qcom/sm8250-mtp.dts | 4 - sys/contrib/device-tree/src/arm64/qcom/sm8250.dtsi | 676 ++++---- .../device-tree/src/arm64/qcom/sm8350-hdk.dts | 319 ++++ .../device-tree/src/arm64/qcom/sm8350-mtp.dts | 116 ++ sys/contrib/device-tree/src/arm64/qcom/sm8350.dtsi | 1637 +++++++++++++++++- .../arm64/renesas/beacon-renesom-baseboard.dtsi | 4 +- .../src/arm64/renesas/hihope-common.dtsi | 3 + .../device-tree/src/arm64/renesas/hihope-rev4.dtsi | 2 +- ...hope-rzg2-ex-aistarvision-mipi-adapter-2.1.dtsi | 2 - .../arm64/renesas/r8a774a1-beacon-rzg2m-kit.dts | 3 + .../device-tree/src/arm64/renesas/r8a774a1.dtsi | 8 + .../arm64/renesas/r8a774b1-beacon-rzg2n-kit.dts | 3 + .../device-tree/src/arm64/renesas/r8a774b1.dtsi | 8 + .../src/arm64/renesas/r8a774c0-cat874.dts | 6 +- .../src/arm64/renesas/r8a774c0-ek874-mipi-2.1.dts | 2 +- .../device-tree/src/arm64/renesas/r8a774c0.dtsi | 4 + .../arm64/renesas/r8a774e1-beacon-rzg2h-kit.dts | 3 + .../device-tree/src/arm64/renesas/r8a774e1.dtsi | 8 + .../src/arm64/renesas/r8a77950-salvator-x.dts | 37 +- .../device-tree/src/arm64/renesas/r8a77950.dtsi | 9 + .../src/arm64/renesas/r8a77951-salvator-x.dts | 37 +- .../src/arm64/renesas/r8a77951-salvator-xs.dts | 37 +- .../device-tree/src/arm64/renesas/r8a77951.dtsi | 12 + .../src/arm64/renesas/r8a77960-salvator-x.dts | 46 - .../src/arm64/renesas/r8a77960-salvator-xs.dts | 46 - .../device-tree/src/arm64/renesas/r8a77960.dtsi | 8 + .../src/arm64/renesas/r8a77961-salvator-xs.dts | 46 - .../src/arm64/renesas/r8a77961-ulcb.dts | 11 + .../device-tree/src/arm64/renesas/r8a77961.dtsi | 348 +++- .../src/arm64/renesas/r8a77965-salvator-x.dts | 45 - .../src/arm64/renesas/r8a77965-salvator-xs.dts | 45 - .../device-tree/src/arm64/renesas/r8a77965.dtsi | 8 + .../device-tree/src/arm64/renesas/r8a77970.dtsi | 4 + .../device-tree/src/arm64/renesas/r8a77980.dtsi | 24 +- .../src/arm64/renesas/r8a77990-ebisu.dts | 11 +- .../device-tree/src/arm64/renesas/r8a77990.dtsi | 4 + .../src/arm64/renesas/r8a779a0-falcon-cpu.dtsi | 79 +- .../src/arm64/renesas/r8a779a0-falcon-csi-dsi.dtsi | 15 + .../arm64/renesas/r8a779a0-falcon-ethernet.dtsi | 15 + .../src/arm64/renesas/r8a779a0-falcon.dts | 50 +- .../device-tree/src/arm64/renesas/r8a779a0.dtsi | 263 ++- .../src/arm64/renesas/salvator-common.dtsi | 55 +- .../device-tree/src/arm64/renesas/ulcb-kf.dtsi | 1 + .../device-tree/src/arm64/renesas/ulcb.dtsi | 12 +- .../src/arm64/rockchip/px30-engicam-common.dtsi | 5 + .../src/arm64/rockchip/px30-engicam-px30-core.dtsi | 4 + .../device-tree/src/arm64/rockchip/px30-evb.dts | 6 + .../device-tree/src/arm64/rockchip/px30.dtsi | 27 +- .../src/arm64/rockchip/rk3308-roc-cc.dts | 6 + .../device-tree/src/arm64/rockchip/rk3308.dtsi | 5 +- .../src/arm64/rockchip/rk3318-a95x-z2.dts | 11 + .../src/arm64/rockchip/rk3326-odroid-go2.dts | 4 + .../device-tree/src/arm64/rockchip/rk3328-a1.dts | 5 + .../device-tree/src/arm64/rockchip/rk3328-evb.dts | 6 + .../src/arm64/rockchip/rk3328-nanopi-r2s.dts | 4 + .../src/arm64/rockchip/rk3328-roc-cc.dts | 5 + .../src/arm64/rockchip/rk3328-rock-pi-e.dts | 5 + .../src/arm64/rockchip/rk3328-rock64.dts | 5 + .../device-tree/src/arm64/rockchip/rk3328.dtsi | 28 +- .../device-tree/src/arm64/rockchip/rk3368-evb.dtsi | 4 + .../src/arm64/rockchip/rk3368-geekbox.dts | 4 + .../src/arm64/rockchip/rk3368-lion-haikou.dts | 4 + .../src/arm64/rockchip/rk3368-lion.dtsi | 4 + .../src/arm64/rockchip/rk3368-orion-r68-meta.dts | 5 + .../src/arm64/rockchip/rk3368-px5-evb.dts | 5 + .../device-tree/src/arm64/rockchip/rk3368-r88.dts | 5 + .../device-tree/src/arm64/rockchip/rk3368.dtsi | 9 +- .../device-tree/src/arm64/rockchip/rk3399-evb.dts | 4 + .../src/arm64/rockchip/rk3399-firefly.dts | 6 + .../device-tree/src/arm64/rockchip/rk3399-gru.dtsi | 5 + .../src/arm64/rockchip/rk3399-hugsun-x99.dts | 6 + .../src/arm64/rockchip/rk3399-khadas-edge.dtsi | 6 + .../src/arm64/rockchip/rk3399-kobol-helios64.dts | 5 + .../src/arm64/rockchip/rk3399-leez-p710.dts | 6 + .../src/arm64/rockchip/rk3399-nanopi-r4s.dts | 133 ++ .../src/arm64/rockchip/rk3399-nanopi4.dtsi | 6 + .../device-tree/src/arm64/rockchip/rk3399-opp.dtsi | 40 +- .../src/arm64/rockchip/rk3399-orangepi.dts | 6 + .../src/arm64/rockchip/rk3399-pinebook-pro.dts | 6 + .../src/arm64/rockchip/rk3399-puma-haikou.dts | 4 + .../src/arm64/rockchip/rk3399-puma.dtsi | 55 +- .../src/arm64/rockchip/rk3399-roc-pc-mezzanine.dts | 4 + .../src/arm64/rockchip/rk3399-roc-pc.dtsi | 5 + .../src/arm64/rockchip/rk3399-rock-pi-4.dtsi | 5 + .../src/arm64/rockchip/rk3399-rock-pi-4b.dts | 4 + .../src/arm64/rockchip/rk3399-rock-pi-4c.dts | 4 + .../src/arm64/rockchip/rk3399-rock960.dtsi | 6 + .../src/arm64/rockchip/rk3399-rockpro64.dtsi | 19 + .../arm64/rockchip/rk3399-sapphire-excavator.dts | 4 + .../src/arm64/rockchip/rk3399-sapphire.dtsi | 5 + .../device-tree/src/arm64/rockchip/rk3399.dtsi | 9 +- .../src/arm64/rockchip/rk3399pro-vmarc-som.dtsi | 5 + .../src/arm64/socionext/uniphier-ld20.dtsi | 2 +- .../src/arm64/socionext/uniphier-pxs3.dtsi | 4 +- .../device-tree/src/arm64/ti/k3-am64-main.dtsi | 676 ++++++++ .../device-tree/src/arm64/ti/k3-am64-mcu.dtsi | 104 ++ sys/contrib/device-tree/src/arm64/ti/k3-am64.dtsi | 105 ++ .../device-tree/src/arm64/ti/k3-am642-evm.dts | 468 ++++++ .../device-tree/src/arm64/ti/k3-am642-sk.dts | 334 ++++ sys/contrib/device-tree/src/arm64/ti/k3-am642.dtsi | 65 + .../src/arm64/ti/k3-am65-iot2050-common.dtsi | 655 ++++++++ .../device-tree/src/arm64/ti/k3-am65-main.dtsi | 405 ++++- .../device-tree/src/arm64/ti/k3-am65-mcu.dtsi | 13 +- .../device-tree/src/arm64/ti/k3-am65-wakeup.dtsi | 13 +- .../src/arm64/ti/k3-am6528-iot2050-basic.dts | 61 + .../src/arm64/ti/k3-am654-base-board.dts | 35 +- .../src/arm64/ti/k3-am6548-iot2050-advanced.dts | 60 + .../src/arm64/ti/k3-j7200-common-proc-board.dts | 94 ++ .../device-tree/src/arm64/ti/k3-j7200-main.dtsi | 94 +- .../src/arm64/ti/k3-j7200-mcu-wakeup.dtsi | 58 +- .../device-tree/src/arm64/ti/k3-j7200-som-p0.dtsi | 36 + .../device-tree/src/arm64/ti/k3-j721e-main.dtsi | 289 +++- .../src/arm64/ti/k3-j721e-mcu-wakeup.dtsi | 15 +- .../device-tree/src/arm64/ti/k3-j721e-som-p0.dtsi | 4 +- .../src/arm64/xilinx/zynqmp-zcu102-revA.dts | 20 +- .../src/arm64/xilinx/zynqmp-zcu106-revA.dts | 20 +- .../device-tree/src/arm64/xilinx/zynqmp.dtsi | 1 + .../src/mips/brcm/bcm3368-netgear-cvg834g.dts | 2 +- sys/contrib/device-tree/src/mips/brcm/bcm3368.dtsi | 5 +- .../src/mips/brcm/bcm63268-comtrend-vr-3032u.dts | 2 +- .../device-tree/src/mips/brcm/bcm63268.dtsi | 137 +- sys/contrib/device-tree/src/mips/brcm/bcm6328.dtsi | 124 +- .../src/mips/brcm/bcm6358-neufbox4-sercomm.dts | 2 +- sys/contrib/device-tree/src/mips/brcm/bcm6358.dtsi | 89 +- .../src/mips/brcm/bcm6362-neufbox6-sercomm.dts | 2 +- sys/contrib/device-tree/src/mips/brcm/bcm6362.dtsi | 134 +- sys/contrib/device-tree/src/mips/brcm/bcm6368.dtsi | 133 +- .../device-tree/src/mips/brcm/bcm93384wvg.dts | 2 +- .../src/mips/brcm/bcm93384wvg_viper.dts | 2 +- .../device-tree/src/mips/brcm/bcm96368mvwg.dts | 2 +- .../device-tree/src/mips/brcm/bcm97125cbmb.dts | 2 +- .../device-tree/src/mips/brcm/bcm97346dbsmb.dts | 4 +- .../device-tree/src/mips/brcm/bcm97358svmb.dts | 4 +- .../device-tree/src/mips/brcm/bcm97360svmb.dts | 2 +- .../device-tree/src/mips/brcm/bcm97362svmb.dts | 4 +- .../device-tree/src/mips/brcm/bcm97420c.dts | 2 +- .../device-tree/src/mips/brcm/bcm97425svmb.dts | 4 +- .../device-tree/src/mips/brcm/bcm97435svmb.dts | 4 +- .../device-tree/src/mips/brcm/bcm9ejtagprb.dts | 2 +- sys/contrib/device-tree/src/mips/ingenic/gcw0.dts | 1 - .../src/mips/loongson/loongson64-2k1000.dtsi | 243 +++ .../src/mips/loongson/loongson64_2core_2k1000.dts | 10 + .../src/powerpc/fsl/bsc9131si-post.dtsi | 4 - .../src/powerpc/fsl/bsc9132si-post.dtsi | 4 - .../device-tree/src/powerpc/fsl/c293si-post.dtsi | 4 - .../device-tree/src/powerpc/fsl/p1010si-post.dtsi | 29 +- .../device-tree/src/powerpc/fsl/p2041si-post.dtsi | 16 + sys/contrib/device-tree/src/powerpc/icon.dts | 7 - .../riscv/microchip/microchip-mpfs-icicle-kit.dts | 72 + .../src/riscv/microchip/microchip-mpfs.dtsi | 329 ++++ .../device-tree/src/riscv/sifive/fu740-c000.dtsi | 35 +- 939 files changed, 49981 insertions(+), 4582 deletions(-) diff --cc sys/contrib/device-tree/Bindings/arm/apple.yaml index 000000000000,1e772c85206c..1e772c85206c mode 000000,100644..100644 --- a/sys/contrib/device-tree/Bindings/arm/apple.yaml +++ b/sys/contrib/device-tree/Bindings/arm/apple.yaml diff --cc sys/contrib/device-tree/Bindings/arm/ete.yaml index 000000000000,7f9b2d1e1147..7f9b2d1e1147 mode 000000,100644..100644 --- a/sys/contrib/device-tree/Bindings/arm/ete.yaml +++ b/sys/contrib/device-tree/Bindings/arm/ete.yaml diff --cc sys/contrib/device-tree/Bindings/arm/npcm/npcm.yaml index 000000000000,95e51378089c..95e51378089c mode 000000,100644..100644 --- a/sys/contrib/device-tree/Bindings/arm/npcm/npcm.yaml +++ b/sys/contrib/device-tree/Bindings/arm/npcm/npcm.yaml diff --cc sys/contrib/device-tree/Bindings/arm/trbe.yaml index 000000000000,4402d7bfd1fc..4402d7bfd1fc mode 000000,100644..100644 --- a/sys/contrib/device-tree/Bindings/arm/trbe.yaml +++ b/sys/contrib/device-tree/Bindings/arm/trbe.yaml diff --cc sys/contrib/device-tree/Bindings/ata/nvidia,tegra-ahci.yaml index 000000000000,a75e9a8f539a..a75e9a8f539a mode 000000,100644..100644 --- a/sys/contrib/device-tree/Bindings/ata/nvidia,tegra-ahci.yaml +++ b/sys/contrib/device-tree/Bindings/ata/nvidia,tegra-ahci.yaml diff --cc sys/contrib/device-tree/Bindings/clock/mediatek,mt7621-sysc.yaml index 000000000000,915f84efd763..915f84efd763 mode 000000,100644..100644 --- a/sys/contrib/device-tree/Bindings/clock/mediatek,mt7621-sysc.yaml +++ b/sys/contrib/device-tree/Bindings/clock/mediatek,mt7621-sysc.yaml diff --cc sys/contrib/device-tree/Bindings/clock/qcom,gcc-sdm845.yaml *** 1264 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Thu Jul 1 15:52:40 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9D9066681D; Thu, 1 Jul 2021 15:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG2m844f1z4Vmy; Thu, 1 Jul 2021 15:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 7449B232A3; Thu, 1 Jul 2021 15:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161Fqewt094769; Thu, 1 Jul 2021 15:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161FqeER094768; Thu, 1 Jul 2021 15:52:40 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:52:40 GMT Message-Id: <202107011552.161FqeER094768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: 1f7d11e636ab - main - build.7: remove documentation of "make update" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f7d11e636abf68d92b052fefe63b687d84c966a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:52:40 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1f7d11e636abf68d92b052fefe63b687d84c966a commit 1f7d11e636abf68d92b052fefe63b687d84c966a Author: Ceri Davies AuthorDate: 2021-07-01 15:04:33 +0000 Commit: Ceri Davies CommitDate: 2021-07-01 15:52:32 +0000 build.7: remove documentation of "make update" update target was removed in e290182bcf3895ca659dff111bca6a077c4708b1 --- share/man/man7/build.7 | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 62c24eaed0dc..9d311a2f2f6c 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 15, 2021 +.Dd July 1, 2021 .Dt BUILD 7 .Os .Sh NAME @@ -310,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 @@ -760,26 +757,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 owner-dev-commits-src-main@freebsd.org Thu Jul 1 16:47:09 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A3936675B4; Thu, 1 Jul 2021 16:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG3z11gJ5z4bGy; Thu, 1 Jul 2021 16:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 2179B23E7D; Thu, 1 Jul 2021 16:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161Gl96I062530; Thu, 1 Jul 2021 16:47:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161Gl9MM062529; Thu, 1 Jul 2021 16:47:09 GMT (envelope-from git) Date: Thu, 1 Jul 2021 16:47:09 GMT Message-Id: <202107011647.161Gl9MM062529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 993e8236c30a - main - arm64: allwinner: Add r_intc driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 993e8236c30a03980a563c63d1e6eae6b6dfbf59 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 16:47:09 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=993e8236c30a03980a563c63d1e6eae6b6dfbf59 commit 993e8236c30a03980a563c63d1e6eae6b6dfbf59 Author: Emmanuel Vadot AuthorDate: 2021-07-01 16:41:05 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-01 16:46:38 +0000 arm64: allwinner: Add r_intc driver The r intc interrupt controller seems to do a lot of things : - It can handle the NMI interrupt - It have local interrupts for some device that also can be muxed with GIC - It can serve as an forwarder for the GIC It's mostly used for deepsleep/wakeup if I understood correctly and we do not support this on arm64. For now just forward everything to the GIC so interrupts works again for device which now have this interrupts controller set since dts v5.12 Sponsored by: Diablotin Systems --- sys/arm/allwinner/aw_r_intc.c | 299 ++++++++++++++++++++++++++++++++++++++++++ sys/arm64/conf/GENERIC | 1 + sys/conf/files.arm64 | 1 + 3 files changed, 301 insertions(+) diff --git a/sys/arm/allwinner/aw_r_intc.c b/sys/arm/allwinner/aw_r_intc.c new file mode 100644 index 000000000000..6d9369e12dca --- /dev/null +++ b/sys/arm/allwinner/aw_r_intc.c @@ -0,0 +1,299 @@ +/*- + * Copyright (c) 2021 Emmanuel Vadot + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "pic_if.h" + +struct aw_r_intc_gicp_softc { + device_t dev; + device_t parent; + struct resource *res; + + struct intr_map_data_fdt *parent_map_data; +}; + +static struct ofw_compat_data compat_data[] = { + {"allwinner,sun6i-a31-r-intc", 1}, + {NULL, 0} +}; + +static int +aw_r_intc_gicp_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Allwinner R INTC"); + return (BUS_PROBE_DEFAULT); +} + +static int +aw_r_intc_gicp_attach(device_t dev) +{ + struct aw_r_intc_gicp_softc *sc; + phandle_t node, xref, intr_parent; + + sc = device_get_softc(dev); + sc->dev = dev; + node = ofw_bus_get_node(dev); + + /* Look for our parent */ + if ((intr_parent = ofw_bus_find_iparent(node)) == 0) { + device_printf(dev, + "Cannot find our parent interrupt controller\n"); + return (ENXIO); + } + if ((sc->parent = OF_device_from_xref(intr_parent)) == NULL) { + device_printf(dev, + "cannot find parent interrupt controller device\n"); + return (ENXIO); + } + + /* Register ourself as a interrupt controller */ + xref = OF_xref_from_node(node); + if (intr_pic_register(dev, xref) == NULL) { + device_printf(dev, "Cannot register GICP\n"); + return (ENXIO); + } + + /* Allocate GIC compatible mapping */ + sc->parent_map_data = (struct intr_map_data_fdt *)intr_alloc_map_data( + INTR_MAP_DATA_FDT, sizeof(struct intr_map_data_fdt) + + + 3 * sizeof(phandle_t), M_WAITOK | M_ZERO); + + /* Register ourself to device can find us */ + OF_device_register_xref(xref, dev); + + return (0); +} + +static int +aw_r_intc_gicp_detach(device_t dev) +{ + + return (EBUSY); +} + +static struct intr_map_data * +aw_r_intc_gicp_convert_map_data(struct aw_r_intc_gicp_softc *sc, + struct intr_map_data *data) +{ + struct intr_map_data_fdt *daf; + + daf = (struct intr_map_data_fdt *)data; + + /* We only support GIC forward for now */ + if (daf->ncells != 3) + return (NULL); + + /* Check if this is a GIC_SPI type */ + if (daf->cells[0] != 0) + return (NULL); + + sc->parent_map_data->ncells = 3; + sc->parent_map_data->cells[0] = 0; + sc->parent_map_data->cells[1] = daf->cells[1]; + sc->parent_map_data->cells[2] = daf->cells[2]; + + return ((struct intr_map_data *)sc->parent_map_data); +} + +static int +aw_r_intc_gicp_activate_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + data = aw_r_intc_gicp_convert_map_data(sc, data); + if (data == NULL) + return (EINVAL); + + return (PIC_ACTIVATE_INTR(sc->parent, isrc, res, data)); +} + +static void +aw_r_intc_gicp_enable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_ENABLE_INTR(sc->parent, isrc); +} + +static void +aw_r_intc_gicp_disable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_DISABLE_INTR(sc->parent, isrc); +} + +static int +aw_r_intc_gicp_map_intr(device_t dev, struct intr_map_data *data, + struct intr_irqsrc **isrcp) +{ + struct aw_r_intc_gicp_softc *sc; + int ret; + + sc = device_get_softc(dev); + + if (data->type != INTR_MAP_DATA_FDT) + return (ENOTSUP); + + data = aw_r_intc_gicp_convert_map_data(sc, data); + if (data == NULL) + return (EINVAL); + + ret = PIC_MAP_INTR(sc->parent, data, isrcp); + (*isrcp)->isrc_dev = sc->dev; + return(ret); +} + +static int +aw_r_intc_gicp_deactivate_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + + data = aw_r_intc_gicp_convert_map_data(sc, data); + if (data == NULL) + return (EINVAL); + + return (PIC_DEACTIVATE_INTR(sc->parent, isrc, res, data)); +} + +static int +aw_r_intc_gicp_setup_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + data = aw_r_intc_gicp_convert_map_data(sc, data); + if (data == NULL) + return (EINVAL); + + return (PIC_SETUP_INTR(sc->parent, isrc, res, data)); +} + +static int +aw_r_intc_gicp_teardown_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + data = aw_r_intc_gicp_convert_map_data(sc, data); + if (data == NULL) + return (EINVAL); + + return (PIC_TEARDOWN_INTR(sc->parent, isrc, res, data)); +} + +static void +aw_r_intc_gicp_pre_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_PRE_ITHREAD(sc->parent, isrc); +} + +static void +aw_r_intc_gicp_post_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_POST_ITHREAD(sc->parent, isrc); +} + +static void +aw_r_intc_gicp_post_filter(device_t dev, struct intr_irqsrc *isrc) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_POST_FILTER(sc->parent, isrc); +} + +static device_method_t aw_r_intc_gicp_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, aw_r_intc_gicp_probe), + DEVMETHOD(device_attach, aw_r_intc_gicp_attach), + DEVMETHOD(device_detach, aw_r_intc_gicp_detach), + + /* Interrupt controller interface */ + DEVMETHOD(pic_activate_intr, aw_r_intc_gicp_activate_intr), + DEVMETHOD(pic_disable_intr, aw_r_intc_gicp_disable_intr), + DEVMETHOD(pic_enable_intr, aw_r_intc_gicp_enable_intr), + DEVMETHOD(pic_map_intr, aw_r_intc_gicp_map_intr), + DEVMETHOD(pic_deactivate_intr, aw_r_intc_gicp_deactivate_intr), + DEVMETHOD(pic_setup_intr, aw_r_intc_gicp_setup_intr), + DEVMETHOD(pic_teardown_intr, aw_r_intc_gicp_teardown_intr), + DEVMETHOD(pic_post_filter, aw_r_intc_gicp_post_filter), + DEVMETHOD(pic_post_ithread, aw_r_intc_gicp_post_ithread), + DEVMETHOD(pic_pre_ithread, aw_r_intc_gicp_pre_ithread), + + DEVMETHOD_END +}; + +static devclass_t aw_r_intc_gicp_devclass; + +static driver_t aw_r_intc_gicp_driver = { + "aw_r_intc_gicp", + aw_r_intc_gicp_methods, + sizeof(struct aw_r_intc_gicp_softc), +}; + +EARLY_DRIVER_MODULE(aw_r_intc_gicp, simplebus, aw_r_intc_gicp_driver, + aw_r_intc_gicp_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC index 954631ca68b2..473578f8fbe1 100644 --- a/sys/arm64/conf/GENERIC +++ b/sys/arm64/conf/GENERIC @@ -211,6 +211,7 @@ device aw_ccu # Allwinner clock controller # Interrupt controllers device aw_nmi # Allwinner NMI support +device aw_r_intc # Allwinner RINTC support device mv_cp110_icu # Marvell CP110 ICU device mv_ap806_gicp # Marvell AP806 GICP device mv_ap806_sei # Marvell AP806 SEI diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 94530ee4d3b0..48ad00e064d5 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -323,6 +323,7 @@ arm/allwinner/aw_mmc.c optional mmc aw_mmc fdt | mmccam aw_mmc fdt arm/allwinner/aw_nmi.c optional aw_nmi fdt \ compile-with "${NORMAL_C} -I$S/contrib/device-tree/include" arm/allwinner/aw_pwm.c optional aw_pwm fdt +arm/allwinner/aw_r_intc.c optional aw_r_intc fdt arm/allwinner/aw_rsb.c optional aw_rsb fdt arm/allwinner/aw_rtc.c optional aw_rtc fdt arm/allwinner/aw_sid.c optional aw_sid nvmem fdt From owner-dev-commits-src-main@freebsd.org Thu Jul 1 16:49:07 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 645CE667883; Thu, 1 Jul 2021 16:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG41H2TQjz4b8s; Thu, 1 Jul 2021 16:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 3EA0123F70; Thu, 1 Jul 2021 16:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161Gn77k062766; Thu, 1 Jul 2021 16:49:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161Gn7ii062765; Thu, 1 Jul 2021 16:49:07 GMT (envelope-from git) Date: Thu, 1 Jul 2021 16:49:07 GMT Message-Id: <202107011649.161Gn7ii062765@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 2ca21223c520 - main - dts: Bump the freebsd branding version to 5.13 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ca21223c52068e1111a7901e08a5cf09d0aaa8e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 16:49:07 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2ca21223c52068e1111a7901e08a5cf09d0aaa8e commit 2ca21223c52068e1111a7901e08a5cf09d0aaa8e Author: Emmanuel Vadot AuthorDate: 2021-07-01 16:48:44 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-01 16:48:56 +0000 dts: Bump the freebsd branding version to 5.13 Sponsored by: Diablotin Systems --- sys/dts/freebsd-compatible.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dts/freebsd-compatible.dts b/sys/dts/freebsd-compatible.dts index 5b1f4f2462f2..eb1a50401d6e 100644 --- a/sys/dts/freebsd-compatible.dts +++ b/sys/dts/freebsd-compatible.dts @@ -1,3 +1,3 @@ / { - freebsd,dts-version = "5.10"; + freebsd,dts-version = "5.13"; }; From owner-dev-commits-src-main@freebsd.org Thu Jul 1 18:13:32 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91C27650079; Thu, 1 Jul 2021 18:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG5th3Xmrz4hX1; Thu, 1 Jul 2021 18:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 61D102539C; Thu, 1 Jul 2021 18:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161IDWfo082030; Thu, 1 Jul 2021 18:13:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161IDWwD082029; Thu, 1 Jul 2021 18:13:32 GMT (envelope-from git) Date: Thu, 1 Jul 2021 18:13:32 GMT Message-Id: <202107011813.161IDWwD082029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 8df71ea1aa3b - main - tegra_pcie: use switch instead of if in tegra_pcib_pex_ctrl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8df71ea1aa3b39f84e7ee3122a333caab57c3e1a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 18:13:32 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=8df71ea1aa3b39f84e7ee3122a333caab57c3e1a commit 8df71ea1aa3b39f84e7ee3122a333caab57c3e1a Author: Ferhat Gecdogan AuthorDate: 2021-07-01 18:09:46 +0000 Commit: Marcin Wojtas CommitDate: 2021-07-01 18:09:46 +0000 tegra_pcie: use switch instead of if in tegra_pcib_pex_ctrl Simplify obtaining per-port data in tegra_pcib_pex_ctrl() routine. Reviewed by: imp, mw Pull Request: https://github.com/freebsd/freebsd-src/pull/481 --- sys/arm/nvidia/tegra_pcie.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index aa488bb8c0e4..ec8f361cff7f 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -835,17 +835,16 @@ tegra_pcib_msi_map_msi(device_t dev, device_t child, struct intr_irqsrc *isrc, static bus_size_t tegra_pcib_pex_ctrl(struct tegra_pcib_softc *sc, int port) { - if (port >= TEGRA_PCIB_MAX_PORTS) - panic("invalid port number: %d\n", port); - - if (port == 0) + switch (port) { + case 0: return (AFI_PEX0_CTRL); - else if (port == 1) + case 1: return (AFI_PEX1_CTRL); - else if (port == 2) + case 2: return (AFI_PEX2_CTRL); - else + default: panic("invalid port number: %d\n", port); + } } static int From owner-dev-commits-src-main@freebsd.org Thu Jul 1 18:25:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7314F6503E6; Thu, 1 Jul 2021 18:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG68V2hgQz4jT5; Thu, 1 Jul 2021 18:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 451E02534F; Thu, 1 Jul 2021 18:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161IPUnp095885; Thu, 1 Jul 2021 18:25:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161IPUjN095884; Thu, 1 Jul 2021 18:25:30 GMT (envelope-from git) Date: Thu, 1 Jul 2021 18:25:30 GMT Message-Id: <202107011825.161IPUjN095884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: ddb928096bff - main - dts: fsl-ls1028a: Correct ECAM PCIE window ranges MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddb928096bff38faf243af83d6b861f2337d955a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 18:25:30 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=ddb928096bff38faf243af83d6b861f2337d955a commit ddb928096bff38faf243af83d6b861f2337d955a Author: Kornel Duleba AuthorDate: 2021-07-01 18:21:17 +0000 Commit: Marcin Wojtas CommitDate: 2021-07-01 18:23:40 +0000 dts: fsl-ls1028a: Correct ECAM PCIE window ranges Currently all PCIE windows point to bus address 0x0, which does not match the values obtained from hardware during EA. Replace those values with CPU addresses, since in reality we have a 1:1 mapping between the two. This patch is queued for Linux v5.14 in linux-next tree: 6bee93d93111 "arm64: dts: fsl-ls1028a: Correct ECAM PCIE window ranges" --- .../device-tree/src/arm64/freescale/fsl-ls1028a.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi index a30249ebffa8..63ff60bd8ec9 100644 --- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi +++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi @@ -990,19 +990,19 @@ msi-map = <0 &its 0x17 0xe>; iommu-map = <0 &smmu 0x17 0xe>; /* PF0-6 BAR0 - non-prefetchable memory */ - ranges = <0x82000000 0x0 0x00000000 0x1 0xf8000000 0x0 0x160000 + ranges = <0x82000000 0x1 0xf8000000 0x1 0xf8000000 0x0 0x160000 /* PF0-6 BAR2 - prefetchable memory */ - 0xc2000000 0x0 0x00000000 0x1 0xf8160000 0x0 0x070000 + 0xc2000000 0x1 0xf8160000 0x1 0xf8160000 0x0 0x070000 /* PF0: VF0-1 BAR0 - non-prefetchable memory */ - 0x82000000 0x0 0x00000000 0x1 0xf81d0000 0x0 0x020000 + 0x82000000 0x1 0xf81d0000 0x1 0xf81d0000 0x0 0x020000 /* PF0: VF0-1 BAR2 - prefetchable memory */ - 0xc2000000 0x0 0x00000000 0x1 0xf81f0000 0x0 0x020000 + 0xc2000000 0x1 0xf81f0000 0x1 0xf81f0000 0x0 0x020000 /* PF1: VF0-1 BAR0 - non-prefetchable memory */ - 0x82000000 0x0 0x00000000 0x1 0xf8210000 0x0 0x020000 + 0x82000000 0x1 0xf8210000 0x1 0xf8210000 0x0 0x020000 /* PF1: VF0-1 BAR2 - prefetchable memory */ - 0xc2000000 0x0 0x00000000 0x1 0xf8230000 0x0 0x020000 + 0xc2000000 0x1 0xf8230000 0x1 0xf8230000 0x0 0x020000 /* BAR4 (PF5) - non-prefetchable memory */ - 0x82000000 0x0 0x00000000 0x1 0xfc000000 0x0 0x400000>; + 0x82000000 0x1 0xfc000000 0x1 0xfc000000 0x0 0x400000>; enetc_port0: ethernet@0,0 { compatible = "fsl,enetc"; From owner-dev-commits-src-main@freebsd.org Thu Jul 1 18:33:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91EB9650D87 for ; Thu, 1 Jul 2021 18:33:00 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG6K76q7Jz4k4T for ; Thu, 1 Jul 2021 18:32:59 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-yb1-xb2d.google.com with SMTP id o139so12335660ybg.9 for ; Thu, 01 Jul 2021 11:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Im7Fp8N/9lKecAGFNhX2fWeGHfBZclm5W+RnT4iQiqw=; b=m/gOrBpZuFbnh27SL3Hvsvy/9yuVzxhXA3YTarsYDq54W12ynT1diISu92cn1u8FtB nETTJdPMFHwru0SbrFigELNbTEmDXm60zhW1iU6w4+5qCnKsrWnd4SXz0LWAm4A+8826 kUhLeiPiLrZUFPq8mw7/6iFLzU1IVJdqRHWjk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Im7Fp8N/9lKecAGFNhX2fWeGHfBZclm5W+RnT4iQiqw=; b=tfVOy0j2DONgULbWLxHEekSOPYUjvlXpAhBusimusiSjN0EdP749IL2cU86etgZOIt mm3sdFvb9RsoHSQEN6lf4kXjzrqp5JrZXJgmBw74eUpSkJ4FPku3jPsSq20tTvU9HHHW JFdOzIYq/itdvRQjkJSqYqoGwWsJCfuZ+DL94CGfiBczeX6Ffb4VLxISswqlm42U0Uwj 3vg0nPfTqA5l+ydNsw7TQMKHl0rx1CFnca8+lSkXfteo3vwePOXXHVvbJ2h1dKf542qu fFYDnHsXJprh5mYuhE6Yb3xPh4FzYkEziwDTuLe3xm0sinApElTEBY+KQg/GcLAZplR7 Cw6w== X-Gm-Message-State: AOAM532ddN1dAckS0qebhNz5JOd7lTRq4Ufm6Q1V4FkphdhCQKnXM21B szsz/M1mCtuBSI7NleavfJ13UGdBkRBBMEInoklGwQ== X-Google-Smtp-Source: ABdhPJwQvSjrmqqQKSP7NUHzk8l8J0kMzJalBZOKZ4aKa99GI+py+KAsyjgJ6l2gUrVeM7ef8ESWtVYwzAZIDpdnxIA= X-Received: by 2002:a25:c7d1:: with SMTP id w200mr1455163ybe.455.1625164378202; Thu, 01 Jul 2021 11:32:58 -0700 (PDT) MIME-Version: 1.0 References: <202106211449.15LEnsxM086627@gitrepo.freebsd.org> In-Reply-To: <202106211449.15LEnsxM086627@gitrepo.freebsd.org> From: Kevin Bowling Date: Thu, 1 Jul 2021 11:32:46 -0700 Message-ID: Subject: Re: git: c6b2d024d7ee - main - Retore the vnet before returning an error. To: "George V. Neville-Neil" Cc: src-committers , "" , "dev-commits-src-main@FreeBSD.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GG6K76q7Jz4k4T X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none (invalid DKIM record) header.d=kev009.com header.s=google header.b=m/gOrBpZ; dmarc=none; spf=pass (mx1.freebsd.org: domain of kevin.bowling@kev009.com designates 2607:f8b0:4864:20::b2d as permitted sender) smtp.mailfrom=kevin.bowling@kev009.com X-Spamd-Result: default: False [0.25 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[kev009.com]; NEURAL_SPAM_MEDIUM(0.79)[0.786]; NEURAL_SPAM_SHORT(0.77)[0.769]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::b2d:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[kev009.com:~]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b2d:from]; R_DKIM_PERMFAIL(0.00)[kev009.com:s=google]; NEURAL_HAM_LONG(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::b2d:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 18:33:00 -0000 Hi George, After the git transition we use the commit author field itself to communicate authorship. The obtained field should say Netapp, Inc. See section 9.14 https://docs.freebsd.org/en/articles/committers-guide/#commit-log-message Regards, Kevin On Mon, Jun 21, 2021 at 7:50 AM George V. Neville-Neil wrote: > > The branch main has been updated by gnn: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c6b2d024d7eedbf32f52a17bc029c92f5a4d1a54 > > commit c6b2d024d7eedbf32f52a17bc029c92f5a4d1a54 > Author: George V. Neville-Neil > AuthorDate: 2021-06-21 14:46:20 +0000 > Commit: George V. Neville-Neil > CommitDate: 2021-06-21 14:46:20 +0000 > > Retore the vnet before returning an error. > > Obtained from: Kanndula, Dheeraj > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D30741 > --- > sys/net/if_vlan.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c > index bd3a5335a97f..39f767c2a603 100644 > --- a/sys/net/if_vlan.c > +++ b/sys/net/if_vlan.c > @@ -609,6 +609,7 @@ vlan_setmulti(struct ifnet *ifp) > mc = malloc(sizeof(struct vlan_mc_entry), M_VLAN, M_NOWAIT); > if (mc == NULL) { > IF_ADDR_WUNLOCK(ifp); > + CURVNET_RESTORE(); > return (ENOMEM); > } > bcopy(ifma->ifma_addr, &mc->mc_addr, ifma->ifma_addr->sa_len); > @@ -619,8 +620,10 @@ vlan_setmulti(struct ifnet *ifp) > CK_SLIST_FOREACH (mc, &sc->vlan_mc_listhead, mc_entries) { > error = if_addmulti(ifp_p, (struct sockaddr *)&mc->mc_addr, > NULL); > - if (error) > + if (error) { > + CURVNET_RESTORE(); > return (error); > + } > } > > CURVNET_RESTORE(); > _______________________________________________ > dev-commits-src-main@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe@freebsd.org" From owner-dev-commits-src-main@freebsd.org Thu Jul 1 18:35:53 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C70B650B4E; Thu, 1 Jul 2021 18:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG6NT45Zwz4kLL; Thu, 1 Jul 2021 18:35:53 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 75116253F9; Thu, 1 Jul 2021 18:35:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161IZrh9009201; Thu, 1 Jul 2021 18:35:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161IZrAt009200; Thu, 1 Jul 2021 18:35:53 GMT (envelope-from git) Date: Thu, 1 Jul 2021 18:35:53 GMT Message-Id: <202107011835.161IZrAt009200@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 94287656264f - main - ofw_pci: fix probing for non-DT cases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94287656264fe1f984586220cb7fd2a2e6f89708 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 18:35:53 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=94287656264fe1f984586220cb7fd2a2e6f89708 commit 94287656264fe1f984586220cb7fd2a2e6f89708 Author: Kornel Duleba AuthorDate: 2021-07-01 18:27:41 +0000 Commit: Marcin Wojtas CommitDate: 2021-07-01 18:35:23 +0000 ofw_pci: fix probing for non-DT cases phandle_t is a uint32_t type, <= 0 comparison doesn't work with it as intended. This caused the ofw_pci code to attach to PCI bus on ACPI based systems. Since 3eae4e106ac7 ("Fix error value returned by ofw_bus_gen_get_node().") ofw subsystem can only return -1 for invalid nodes. Use that. MFC after: 4 weeks Reviewed by: mw Differential revision: https://reviews.freebsd.org/D30953 --- sys/dev/ofw/ofw_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ofw/ofw_pci.c b/sys/dev/ofw/ofw_pci.c index c7ed7c5c8fe9..7f7aad379ddc 100644 --- a/sys/dev/ofw/ofw_pci.c +++ b/sys/dev/ofw/ofw_pci.c @@ -77,7 +77,7 @@ ofw_pci_probe(device_t dev) device_t parent; parent = device_get_parent(dev); - if (ofw_bus_get_node(parent) <= 0) + if (ofw_bus_get_node(parent) == -1) return (ENXIO); device_set_desc(dev, "OFW PCI bus"); From owner-dev-commits-src-main@freebsd.org Thu Jul 1 19:35:20 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E76B651CA1; Thu, 1 Jul 2021 19:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG7j40mRDz4q2s; Thu, 1 Jul 2021 19:35:20 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0233126584; Thu, 1 Jul 2021 19:35:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161JZJSQ088686; Thu, 1 Jul 2021 19:35:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161JZJ1B088685; Thu, 1 Jul 2021 19:35:19 GMT (envelope-from git) Date: Thu, 1 Jul 2021 19:35:19 GMT Message-Id: <202107011935.161JZJ1B088685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 8f76eebce424 - main - dummynet: fix sysctls 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/main X-Git-Reftype: branch X-Git-Commit: 8f76eebce424de064f65fec5cdd105446a2de3bd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 19:35:20 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8f76eebce424de064f65fec5cdd105446a2de3bd commit 8f76eebce424de064f65fec5cdd105446a2de3bd Author: Kristof Provost AuthorDate: 2021-07-01 07:42:34 +0000 Commit: Kristof Provost CommitDate: 2021-07-01 19:34:08 +0000 dummynet: fix sysctls The sysctl nodes which use V_dn_cfg must be marked as CTLFLAG_VNET so that we use the correct per-vnet offset PR: 256819 Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30974 --- sys/netpfil/ipfw/ip_dn_io.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/sys/netpfil/ipfw/ip_dn_io.c b/sys/netpfil/ipfw/ip_dn_io.c index 39bea3eb99dd..11357b44e05e 100644 --- a/sys/netpfil/ipfw/ip_dn_io.c +++ b/sys/netpfil/ipfw/ip_dn_io.c @@ -169,55 +169,55 @@ SYSCTL_PROC(_net_inet_ip_dummynet, OID_AUTO, pipe_byte_limit, 0, 0, sysctl_limits, "L", "Upper limit in bytes for pipe queue."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, io_fast, - CTLFLAG_RW, DC(io_fast), 0, "Enable fast dummynet io."); + CTLFLAG_RW | CTLFLAG_VNET, DC(io_fast), 0, "Enable fast dummynet io."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, debug, - CTLFLAG_RW, DC(debug), 0, "Dummynet debug level"); + CTLFLAG_RW | CTLFLAG_VNET, DC(debug), 0, "Dummynet debug level"); /* RED parameters */ SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_lookup_depth, - CTLFLAG_RD, DC(red_lookup_depth), 0, "Depth of RED lookup table"); + CTLFLAG_RD | CTLFLAG_VNET, DC(red_lookup_depth), 0, "Depth of RED lookup table"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_avg_pkt_size, - CTLFLAG_RD, DC(red_avg_pkt_size), 0, "RED Medium packet size"); + CTLFLAG_RD | CTLFLAG_VNET, DC(red_avg_pkt_size), 0, "RED Medium packet size"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_max_pkt_size, - CTLFLAG_RD, DC(red_max_pkt_size), 0, "RED Max packet size"); + CTLFLAG_RD | CTLFLAG_VNET, DC(red_max_pkt_size), 0, "RED Max packet size"); /* time adjustment */ SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_delta, - CTLFLAG_RD, DC(tick_delta), 0, "Last vs standard tick difference (usec)."); + CTLFLAG_RD | CTLFLAG_VNET, DC(tick_delta), 0, "Last vs standard tick difference (usec)."); SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_delta_sum, - CTLFLAG_RD, DC(tick_delta_sum), 0, "Accumulated tick difference (usec)."); + CTLFLAG_RD | CTLFLAG_VNET, DC(tick_delta_sum), 0, "Accumulated tick difference (usec)."); SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_adjustment, - CTLFLAG_RD, DC(tick_adjustment), 0, "Tick adjustments done."); + CTLFLAG_RD | CTLFLAG_VNET, DC(tick_adjustment), 0, "Tick adjustments done."); SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_diff, - CTLFLAG_RD, DC(tick_diff), 0, + CTLFLAG_RD | CTLFLAG_VNET, DC(tick_diff), 0, "Adjusted vs non-adjusted curr_time difference (ticks)."); SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_lost, - CTLFLAG_RD, DC(tick_lost), 0, + CTLFLAG_RD | CTLFLAG_VNET, DC(tick_lost), 0, "Number of ticks coalesced by dummynet taskqueue."); /* Drain parameters */ SYSCTL_UINT(_net_inet_ip_dummynet, OID_AUTO, expire, - CTLFLAG_RW, DC(expire), 0, "Expire empty queues/pipes"); + CTLFLAG_RW | CTLFLAG_VNET, DC(expire), 0, "Expire empty queues/pipes"); SYSCTL_UINT(_net_inet_ip_dummynet, OID_AUTO, expire_cycle, - CTLFLAG_RD, DC(expire_cycle), 0, "Expire cycle for queues/pipes"); + CTLFLAG_RD | CTLFLAG_VNET, DC(expire_cycle), 0, "Expire cycle for queues/pipes"); /* statistics */ SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, schk_count, - CTLFLAG_RD, DC(schk_count), 0, "Number of schedulers"); + CTLFLAG_RD | CTLFLAG_VNET, DC(schk_count), 0, "Number of schedulers"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, si_count, - CTLFLAG_RD, DC(si_count), 0, "Number of scheduler instances"); + CTLFLAG_RD | CTLFLAG_VNET, DC(si_count), 0, "Number of scheduler instances"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, fsk_count, - CTLFLAG_RD, DC(fsk_count), 0, "Number of flowsets"); + CTLFLAG_RD | CTLFLAG_VNET, DC(fsk_count), 0, "Number of flowsets"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, queue_count, - CTLFLAG_RD, DC(queue_count), 0, "Number of queues"); + CTLFLAG_RD | CTLFLAG_VNET, DC(queue_count), 0, "Number of queues"); SYSCTL_ULONG(_net_inet_ip_dummynet, OID_AUTO, io_pkt, - CTLFLAG_RD, DC(io_pkt), 0, + CTLFLAG_RD | CTLFLAG_VNET, DC(io_pkt), 0, "Number of packets passed to dummynet."); SYSCTL_ULONG(_net_inet_ip_dummynet, OID_AUTO, io_pkt_fast, - CTLFLAG_RD, DC(io_pkt_fast), 0, + CTLFLAG_RD | CTLFLAG_VNET, DC(io_pkt_fast), 0, "Number of packets bypassed dummynet scheduler."); SYSCTL_ULONG(_net_inet_ip_dummynet, OID_AUTO, io_pkt_drop, - CTLFLAG_RD, DC(io_pkt_drop), 0, + CTLFLAG_RD | CTLFLAG_VNET, DC(io_pkt_drop), 0, "Number of packets dropped by dummynet."); #undef DC SYSEND From owner-dev-commits-src-main@freebsd.org Thu Jul 1 19:35:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47592651CA6; Thu, 1 Jul 2021 19:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG7j51TC9z4plH; Thu, 1 Jul 2021 19:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 1B65026585; Thu, 1 Jul 2021 19:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161JZLKr088710; Thu, 1 Jul 2021 19:35:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161JZLGi088709; Thu, 1 Jul 2021 19:35:21 GMT (envelope-from git) Date: Thu, 1 Jul 2021 19:35:21 GMT Message-Id: <202107011935.161JZLGi088709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 8923ea6c867f - main - ftp-proxy: Revert incorrect migration to libpfctl 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/main X-Git-Reftype: branch X-Git-Commit: 8923ea6c867fd75b08b76883ec122c429a4018f9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 19:35:21 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8923ea6c867fd75b08b76883ec122c429a4018f9 commit 8923ea6c867fd75b08b76883ec122c429a4018f9 Author: Kristof Provost AuthorDate: 2021-07-01 15:16:10 +0000 Commit: Kristof Provost CommitDate: 2021-07-01 19:34:40 +0000 ftp-proxy: Revert incorrect migration to libpfctl libpfctl supports creating rules, but not (yet) adding addresses to a pool. Adding addresses certainly does not work through adding a rule. PR: 256917 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- contrib/pf/ftp-proxy/filter.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/contrib/pf/ftp-proxy/filter.c b/contrib/pf/ftp-proxy/filter.c index dad6324808bc..e4787985e99f 100644 --- a/contrib/pf/ftp-proxy/filter.c +++ b/contrib/pf/ftp-proxy/filter.c @@ -103,8 +103,7 @@ add_nat(u_int32_t id, struct sockaddr *src, struct sockaddr *dst, &satosin6(nat)->sin6_addr.s6_addr, 16); memset(&pfp.addr.addr.v.a.mask.addr8, 255, 16); } - if (pfctl_add_rule(dev, &pfrule, pfanchor, pfanchor_call, - pfticket, pfpool_ticket)) + if (ioctl(dev, DIOCADDADDR, &pfp) == -1) return (-1); pfrule.rpool.proxy_port[0] = nat_range_low; @@ -138,8 +137,7 @@ add_rdr(u_int32_t id, struct sockaddr *src, struct sockaddr *dst, &satosin6(rdr)->sin6_addr.s6_addr, 16); memset(&pfp.addr.addr.v.a.mask.addr8, 255, 16); } - if (pfctl_add_rule(dev, &pfrule, pfanchor, pfanchor_call, - pfticket, pfpool_ticket)) + if (ioctl(dev, DIOCADDADDR, &pfp) == -1) return (-1); pfrule.rpool.proxy_port[0] = rdr_port; From owner-dev-commits-src-main@freebsd.org Thu Jul 1 19:35:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF19A6514E5; Thu, 1 Jul 2021 19:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG7j63vJHz4px6; Thu, 1 Jul 2021 19:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 408862623A; Thu, 1 Jul 2021 19:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161JZMZD088740; Thu, 1 Jul 2021 19:35:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161JZMR0088739; Thu, 1 Jul 2021 19:35:22 GMT (envelope-from git) Date: Thu, 1 Jul 2021 19:35:22 GMT Message-Id: <202107011935.161JZMR0088739@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: dd82fd354302 - main - pf tests: ftp-proxy test 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/main X-Git-Reftype: branch X-Git-Commit: dd82fd3543022017b84007ac1a0d45fc683f9850 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 19:35:22 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=dd82fd3543022017b84007ac1a0d45fc683f9850 commit dd82fd3543022017b84007ac1a0d45fc683f9850 Author: Kristof Provost AuthorDate: 2021-07-01 15:15:36 +0000 Commit: Kristof Provost CommitDate: 2021-07-01 19:34:40 +0000 pf tests: ftp-proxy test Basic test case for ftp-proxy PR: 256917 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/proxy.sh | 95 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index b43a0a5a77b3..8bbc498f38c5 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -18,6 +18,7 @@ ATF_TESTS_SH+= altq \ nat \ pass_block \ pfsync \ + proxy \ rdr \ route_to \ rules_counter \ diff --git a/tests/sys/netpfil/pf/proxy.sh b/tests/sys/netpfil/pf/proxy.sh new file mode 100644 index 000000000000..bb5286103e85 --- /dev/null +++ b/tests/sys/netpfil/pf/proxy.sh @@ -0,0 +1,95 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/utils.subr + +common_dir=$(atf_get_srcdir)/../common + +atf_test_case "ftp" "cleanup" +ftp_head() +{ + atf_set descr 'Test ftp-proxy' + atf_set require.user root + atf_set require.progs twistd +} + +ftp_body() +{ + pft_init + + epair_client=$(vnet_mkepair) + epair_link=$(vnet_mkepair) + + ifconfig ${epair_client}a 192.0.2.2/24 up + route add -net 198.51.100.0/24 192.0.2.1 + + vnet_mkjail fwd ${epair_client}b ${epair_link}a + jexec fwd ifconfig ${epair_client}b 192.0.2.1/24 up + jexec fwd ifconfig ${epair_link}a 198.51.100.1/24 up + jexec fwd ifconfig lo0 127.0.0.1/8 up + jexec fwd sysctl net.inet.ip.forwarding=1 + + vnet_mkjail srv ${epair_link}b + jexec srv ifconfig ${epair_link}b 198.51.100.2/24 up + jexec srv route add default 198.51.100.1 + + # Start FTP server in srv + jexec srv twistd ftp -r `pwd` -p 21 + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 1 198.51.100.2 + + jexec fwd pfctl -e + pft_set_rules fwd \ + "nat on ${epair_link}a inet from 192.0.2.0/24 to any -> (${epair_link}a)" \ + "nat-anchor \"ftp-proxy/*\"" \ + "rdr-anchor \"ftp-proxy/*\"" \ + "rdr pass on ${epair_client}b proto tcp from 192.0.2.0/24 to any port 21 -> 127.0.0.1 port 8021" \ + "anchor \"ftp-proxy/*\"" \ + "pass out proto tcp from 127.0.0.1 to any port 21" + jexec fwd /usr/sbin/ftp-proxy + + # Create a dummy file to download + echo 'foo' > remote.txt + echo 'get remote.txt local.txt' | ftp -a 198.51.100.2 + + # Compare the downloaded file to the original + if ! diff -q local.txt remote.txt; + then + atf_fail 'Failed to retrieve file' + fi +} + +ftp_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "ftp" +} From owner-dev-commits-src-main@freebsd.org Thu Jul 1 19:37:08 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF631651B6E; Thu, 1 Jul 2021 19:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG7l85b4Xz4qM9; Thu, 1 Jul 2021 19:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 A924D264BA; Thu, 1 Jul 2021 19:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161Jb89B089024; Thu, 1 Jul 2021 19:37:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161Jb85H089023; Thu, 1 Jul 2021 19:37:08 GMT (envelope-from git) Date: Thu, 1 Jul 2021 19:37:08 GMT Message-Id: <202107011937.161Jb85H089023@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: fa3d57c25610 - main - mrsas(4): Report more correct maximum I/O size. 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/main X-Git-Reftype: branch X-Git-Commit: fa3d57c256104649217b5022947de9c1c59a326e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 19:37:09 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=fa3d57c256104649217b5022947de9c1c59a326e commit fa3d57c256104649217b5022947de9c1c59a326e Author: Alexander Motin AuthorDate: 2021-07-01 19:28:55 +0000 Commit: Alexander Motin CommitDate: 2021-07-01 19:37:01 +0000 mrsas(4): Report more correct maximum I/O size. Subtract one SGE for the case of misaligned address. Also take into account maximum number of sectors reported by firmware, that gives nicer 256KB limit instead of 276KB calculated from the SGE limit. While there, remove number of I/O size checks, duplicating what is already checked by CAM and busdma(9). MFC after: 1 month Sponsored by: iXsystems, Inc. --- sys/dev/mrsas/mrsas.c | 11 ++++++----- sys/dev/mrsas/mrsas_cam.c | 36 +----------------------------------- 2 files changed, 7 insertions(+), 40 deletions(-) diff --git a/sys/dev/mrsas/mrsas.c b/sys/dev/mrsas/mrsas.c index 01173387c8d4..8814642fccd0 100644 --- a/sys/dev/mrsas/mrsas.c +++ b/sys/dev/mrsas/mrsas.c @@ -1914,15 +1914,16 @@ mrsas_alloc_mem(struct mrsas_softc *sc) /* * Allocate parent DMA tag */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create( + bus_get_dma_tag(sc->mrsas_dev), /* parent */ 1, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - maxphys, /* maxsize */ - sc->max_num_sge, /* nsegments */ - maxphys, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ &sc->mrsas_parent_tag /* tag */ @@ -2533,7 +2534,7 @@ mrsas_init_fw(struct mrsas_softc *sc) sc->ctrl_info->max_strips_per_io; max_sectors_2 = sc->ctrl_info->max_request_size; tmp_sectors = min(max_sectors_1, max_sectors_2); - sc->max_sectors_per_req = sc->max_num_sge * MRSAS_PAGE_SIZE / 512; + sc->max_sectors_per_req = (sc->max_num_sge - 1) * MRSAS_PAGE_SIZE / 512; if (tmp_sectors && (sc->max_sectors_per_req > tmp_sectors)) sc->max_sectors_per_req = tmp_sectors; diff --git a/sys/dev/mrsas/mrsas_cam.c b/sys/dev/mrsas/mrsas_cam.c index 3557782dae49..85dacdb9f306 100644 --- a/sys/dev/mrsas/mrsas_cam.c +++ b/sys/dev/mrsas/mrsas_cam.c @@ -369,7 +369,7 @@ mrsas_action(struct cam_sim *sim, union ccb *ccb) else ccb->cpi.max_target = MRSAS_MAX_LD_IDS - 1; #if (__FreeBSD_version > 704000) - ccb->cpi.maxio = sc->max_num_sge * MRSAS_PAGE_SIZE; + ccb->cpi.maxio = sc->max_sectors_per_req * 512; #endif ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); @@ -513,21 +513,11 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim *sim, ccb_h->status = CAM_REQ_INVALID; goto done; case CAM_DATA_VADDR: - if (csio->dxfer_len > (sc->max_num_sge * MRSAS_PAGE_SIZE)) { - mrsas_release_mpt_cmd(cmd); - ccb_h->status = CAM_REQ_TOO_BIG; - goto done; - } cmd->length = csio->dxfer_len; if (cmd->length) cmd->data = csio->data_ptr; break; case CAM_DATA_BIO: - if (csio->dxfer_len > (sc->max_num_sge * MRSAS_PAGE_SIZE)) { - mrsas_release_mpt_cmd(cmd); - ccb_h->status = CAM_REQ_TOO_BIG; - goto done; - } cmd->length = csio->dxfer_len; if (cmd->length) cmd->data = csio->data_ptr; @@ -539,11 +529,6 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim *sim, #else if (!(ccb_h->flags & CAM_DATA_PHYS)) { /* Virtual data address */ if (!(ccb_h->flags & CAM_SCATTER_VALID)) { - if (csio->dxfer_len > (sc->max_num_sge * MRSAS_PAGE_SIZE)) { - mrsas_release_mpt_cmd(cmd); - ccb_h->status = CAM_REQ_TOO_BIG; - goto done; - } cmd->length = csio->dxfer_len; if (cmd->length) cmd->data = csio->data_ptr; @@ -867,11 +852,6 @@ mrsas_build_ldio_rw(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd, io_request->DataLength = htole32(cmd->length); if (mrsas_map_request(sc, cmd, ccb) == SUCCESS) { - if (cmd->sge_count > sc->max_num_sge) { - device_printf(sc->mrsas_dev, "Error: sge_count (0x%x) exceeds" - "max (0x%x) allowed\n", cmd->sge_count, sc->max_num_sge); - return (FAIL); - } if (sc->is_ventura || sc->is_aero) io_request->RaidContext.raid_context_g35.numSGE = cmd->sge_count; else { @@ -1234,11 +1214,6 @@ mrsas_build_ldio_nonrw(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd, io_request->DataLength = cmd->length; if (mrsas_map_request(sc, cmd, ccb) == SUCCESS) { - if (cmd->sge_count > sc->max_num_sge) { - device_printf(sc->mrsas_dev, "Error: sge_count (0x%x) exceeds" - "max (0x%x) allowed\n", cmd->sge_count, sc->max_num_sge); - return (1); - } if (sc->is_ventura || sc->is_aero) io_request->RaidContext.raid_context_g35.numSGE = cmd->sge_count; else { @@ -1364,11 +1339,6 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd, io_request->DataLength = htole32(cmd->length); if (mrsas_map_request(sc, cmd, ccb) == SUCCESS) { - if (cmd->sge_count > sc->max_num_sge) { - device_printf(sc->mrsas_dev, "Error: sge_count (0x%x) exceeds" - "max (0x%x) allowed\n", cmd->sge_count, sc->max_num_sge); - return (1); - } if (sc->is_ventura || sc->is_aero) io_request->RaidContext.raid_context_g35.numSGE = cmd->sge_count; else { @@ -1714,10 +1684,6 @@ mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error) if (cmd->flags & MRSAS_DIR_OUT) bus_dmamap_sync(cmd->sc->data_tag, cmd->data_dmamap, BUS_DMASYNC_PREWRITE); - if (nseg > sc->max_num_sge) { - device_printf(sc->mrsas_dev, "SGE count is too large or 0.\n"); - return; - } /* Check for whether PRPs should be built or IEEE SGLs*/ if ((cmd->io_request->IoFlags & MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) && From owner-dev-commits-src-main@freebsd.org Thu Jul 1 21:31:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8FB266529E3; Thu, 1 Jul 2021 21:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGBHV3Yspz3GcP; Thu, 1 Jul 2021 21:31:50 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 62C1F27DCE; Thu, 1 Jul 2021 21:31:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161LVoaM046533; Thu, 1 Jul 2021 21:31:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161LVoHh046532; Thu, 1 Jul 2021 21:31:50 GMT (envelope-from git) Date: Thu, 1 Jul 2021 21:31:50 GMT Message-Id: <202107012131.161LVoHh046532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 858937bea459 - main - pfctl: cache getprotobynumber results MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 858937bea4599d254a97ee6321683f8629604e15 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 21:31:50 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=858937bea4599d254a97ee6321683f8629604e15 commit 858937bea4599d254a97ee6321683f8629604e15 Author: Mateusz Guzik AuthorDate: 2021-07-01 19:25:43 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-01 21:31:45 +0000 pfctl: cache getprotobynumber results As for example pfctl -ss keeps calling it, it saves a lot of overhead from elided parsing of /etc/nsswitch.conf and /etc/protocols. Sample result when running a pre-nvlist binary with nfs root and dumping 7 mln states: before: 24.817u 62.993s 1:28.52 99.1% after: 8.064u 1.117s 0:18.87 48.5% Idea by Jim Thompson Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 8 ++++---- sbin/pfctl/pf_print_state.c | 6 +++--- sbin/pfctl/pfctl.c | 43 +++++++++++++++++++++++++++++++++++++++++++ sbin/pfctl/pfctl.h | 2 ++ sbin/pfctl/pfctl_parser.c | 6 +++--- 5 files changed, 55 insertions(+), 10 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 4448a8255ce1..acd90e280b53 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -5017,13 +5017,13 @@ expand_label_port(const char *name, char *label, size_t len, void expand_label_proto(const char *name, char *label, size_t len, u_int8_t proto) { - struct protoent *pe; + const char *protoname; char n[4]; if (strstr(label, name) != NULL) { - pe = getprotobynumber(proto); - if (pe != NULL) - expand_label_str(label, len, name, pe->p_name); + protoname = pfctl_proto2name(proto); + if (protoname != NULL) + expand_label_str(label, len, name, protoname); else { snprintf(n, sizeof(n), "%u", proto); expand_label_str(label, len, name, n); diff --git a/sbin/pfctl/pf_print_state.c b/sbin/pfctl/pf_print_state.c index b1f0079154cf..b66a296d6080 100644 --- a/sbin/pfctl/pf_print_state.c +++ b/sbin/pfctl/pf_print_state.c @@ -211,7 +211,7 @@ print_state(struct pfctl_state *s, int opts) { struct pfctl_state_peer *src, *dst; struct pfctl_state_key *key, *sk, *nk; - struct protoent *p; + const char *protoname; int min, sec; sa_family_t af; uint8_t proto; @@ -243,8 +243,8 @@ print_state(struct pfctl_state *s, int opts) sk->port[1] = nk->port[1]; } printf("%s ", s->ifname); - if ((p = getprotobynumber(proto)) != NULL) - printf("%s ", p->p_name); + if ((protoname = pfctl_proto2name(proto)) != NULL) + printf("%s ", protoname); else printf("%u ", proto); diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index f82d75198d61..14b7f3a01657 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -254,6 +254,49 @@ usage(void) exit(1); } +/* + * Cache protocol number to name translations. + * + * Translation is performed a lot e.g., when dumping states and + * getprotobynumber is incredibly expensive. + * + * Note from the getprotobynumber(3) manpage: + * + * These functions use a thread-specific data space; if the data is needed + * for future use, it should be copied before any subsequent calls overwrite + * it. Only the Internet protocols are currently understood. + * + * + * Consequently we only cache the name and strdup it for safety. + * + * At the time of writing this comment the last entry in /etc/protocols is: + * divert 258 DIVERT # Divert pseudo-protocol [non IANA] + */ +const char * +pfctl_proto2name(int proto) +{ + static const char *pfctl_proto_cache[259]; + struct protoent *p; + + if (proto >= nitems(pfctl_proto_cache)) { + p = getprotobynumber(proto); + if (p == NULL) { + return (NULL); + } + return (p->p_name); + } + + if (pfctl_proto_cache[proto] == NULL) { + p = getprotobynumber(proto); + if (p == NULL) { + return (NULL); + } + pfctl_proto_cache[proto] = strdup(p->p_name); + } + + return (pfctl_proto_cache[proto]); +} + int pfctl_enable(int dev, int opts) { diff --git a/sbin/pfctl/pfctl.h b/sbin/pfctl/pfctl.h index f8ff5012e01b..80ef184fa90f 100644 --- a/sbin/pfctl/pfctl.h +++ b/sbin/pfctl/pfctl.h @@ -138,4 +138,6 @@ void pf_remove_if_empty_ruleset(struct pfctl_ruleset *); struct pfctl_ruleset *pf_find_ruleset(const char *); struct pfctl_ruleset *pf_find_or_create_ruleset(const char *); +const char *pfctl_proto2name(int); + #endif /* _PFCTL_H_ */ diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index ce460ab691ca..b4a1cde967bd 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -812,10 +812,10 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer printf(" inet6"); } if (r->proto) { - struct protoent *p; + const char *protoname; - if ((p = getprotobynumber(r->proto)) != NULL) - printf(" proto %s", p->p_name); + if ((protoname = pfctl_proto2name(r->proto)) != NULL) + printf(" proto %s", protoname); else printf(" proto %u", r->proto); } From owner-dev-commits-src-main@freebsd.org Thu Jul 1 21:54:35 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1FB60653C01; Thu, 1 Jul 2021 21: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGBnl0JkPz3JvP; Thu, 1 Jul 2021 21:54:35 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 DFAC3581; Thu, 1 Jul 2021 21:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161LsYuj075391; Thu, 1 Jul 2021 21:54:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161LsYwf075390; Thu, 1 Jul 2021 21:54:34 GMT (envelope-from git) Date: Thu, 1 Jul 2021 21:54:34 GMT Message-Id: <202107012154.161LsYwf075390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: cd4346a0e4d8 - main - cd(9): correct minor typo in manpage. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd4346a0e4d8cd033514edde4011160c4539857b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 21:54:35 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=cd4346a0e4d8cd033514edde4011160c4539857b commit cd4346a0e4d8cd033514edde4011160c4539857b Author: Ceri Davies AuthorDate: 2021-07-01 21:10:34 +0000 Commit: Ceri Davies CommitDate: 2021-07-01 21:54:25 +0000 cd(9): correct minor typo in manpage. --- share/man/man9/cd.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/cd.9 b/share/man/man9/cd.9 index 1beb518a86c3..44c6b7df4a01 100644 --- a/share/man/man9/cd.9 +++ b/share/man/man9/cd.9 @@ -51,7 +51,7 @@ device can have different interpretations of the .Tn SCSI spec. This can lead to drives requiring special handling in the driver. -The following is a list of quirks that the driver recognize. +The following is a list of quirks that the driver recognizes. .Bl -tag -width CD_Q_BCD_TRACKS .It Dv CD_Q_NO_TOUCH This flag tells the driver not to probe the drive at attach time to see if From owner-dev-commits-src-main@freebsd.org Thu Jul 1 21:54:36 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5311365375D; Thu, 1 Jul 2021 21:54: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGBnm17FGz3Jmw; Thu, 1 Jul 2021 21:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 01CC6327; Thu, 1 Jul 2021 21:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161LsZm7075415; Thu, 1 Jul 2021 21:54:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161LsZL2075414; Thu, 1 Jul 2021 21:54:35 GMT (envelope-from git) Date: Thu, 1 Jul 2021 21:54:35 GMT Message-Id: <202107012154.161LsZL2075414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: 40944510db1e - main - rc.conf.5: add .Xr to firewall(7), growfs(7), and tuning(7) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40944510db1e9f4c9cf758087977010ee7c36199 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 21:54:36 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=40944510db1e9f4c9cf758087977010ee7c36199 commit 40944510db1e9f4c9cf758087977010ee7c36199 Author: Ceri Davies AuthorDate: 2021-07-01 21:35:14 +0000 Commit: Ceri Davies CommitDate: 2021-07-01 21:54:26 +0000 rc.conf.5: add .Xr to firewall(7), growfs(7), and tuning(7) --- share/man/man5/rc.conf.5 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index bf9289f30417..d32a96b706ec 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 18, 2021 +.Dd July 1, 2021 .Dt RC.CONF 5 .Os .Sh NAME @@ -4618,7 +4618,10 @@ it will be made permanently active. .Xr motd 5 , .Xr newsyslog.conf 5 , .Xr pf.conf 5 , +.Xr firewall 7 , +.Xr growfs 7 , .Xr security 7 , +.Xr tuning 7 , .Xr accton 8 , .Xr amd 8 , .Xr apm 8 , From owner-dev-commits-src-main@freebsd.org Thu Jul 1 21:54:37 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4726653C80; Thu, 1 Jul 2021 21: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGBnn2mZSz3JvW; Thu, 1 Jul 2021 21:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 24B87582; Thu, 1 Jul 2021 21:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161LsbOc075439; Thu, 1 Jul 2021 21:54:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161LsbqN075438; Thu, 1 Jul 2021 21:54:37 GMT (envelope-from git) Date: Thu, 1 Jul 2021 21:54:37 GMT Message-Id: <202107012154.161LsbqN075438@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: 2ce58512957e - main - rc.conf.5: -Tlint fixes. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ce58512957ec373abfb71712687d7e7b6abea82 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 21:54:37 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=2ce58512957ec373abfb71712687d7e7b6abea82 commit 2ce58512957ec373abfb71712687d7e7b6abea82 Author: Ceri Davies AuthorDate: 2021-07-01 21:51:37 +0000 Commit: Ceri Davies CommitDate: 2021-07-01 21:54:26 +0000 rc.conf.5: -Tlint fixes. --- share/man/man5/rc.conf.5 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index d32a96b706ec..5692228c4db5 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -1391,7 +1391,7 @@ ifconfig_em0_aliases="\\ It also supports CIDR notation. .Pp If the -.Pa /etc/start_if. Ns Aq Ar interface +.Pa /etc/start_if . Ns Aq Ar interface file is present, it is read and executed by the .Xr sh 1 interpreter @@ -1517,7 +1517,7 @@ will use the settings from Finally, you can add .Xr ifconfig 8 options in this variable, in addition to the -.Pa /etc/start_if. Ns Aq Ar interface +.Pa /etc/start_if . Ns Aq Ar interface file. For instance, to configure an .Xr ath 4 @@ -1887,16 +1887,16 @@ The value of this variable is used to configure the link layer of the tunnel using the .Cm tunnel option to -.Xr ifconfig . +.Xr ifconfig 8 . Additionally, this option ensures that each listed interface is created via the .Cm create option to -.Xr ifconfig +.Xr ifconfig 8 before attempting to configure it. .Pp For example, configure two -.Xr gif +.Xr gif 4 interfaces with: .Bd -literal gif_interfaces="gif0 gif1" @@ -3896,7 +3896,7 @@ For backward compatibility, when per-jail configuration variables are defined, .Xr jail 8 configuration files are created as -.Pa /var/run/jail. Ns Ao Ar jname Ac Ns Pa .conf +.Pa /var/run/jail . Ns Ao Ar jname Ac Ns Pa .conf and used. .Pp The following per-jail parameters are handled by @@ -4593,7 +4593,6 @@ it will be made permanently active. .Xr gdb 1 , .Xr info 1 , .Xr kbdcontrol 1 , -.Xr makewhatis 1 , .Xr sh 1 , .Xr vi 1 , .Xr vidcontrol 1 , @@ -4645,6 +4644,7 @@ it will be made permanently active. .Xr kldxref 8 , .Xr loader 8 , .Xr lpd 8 , +.Xr makewhatis 8 , .Xr mdconfig 8 , .Xr mdmfs 8 , .Xr mixer 8 , From owner-dev-commits-src-main@freebsd.org Fri Jul 2 00:29:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEC79657BE3; Fri, 2 Jul 2021 00:29:26 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGGDQ2MGlz3nnd; Fri, 2 Jul 2021 00:29:25 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: (Authenticated sender: gnn@neville-neil.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 55A6A240004; Fri, 2 Jul 2021 00:29:21 +0000 (UTC) From: George Neville-Neil To: Kevin Bowling Cc: src-committers , dev-commits-src-all@freebsd.org, "dev-commits-src-main@FreeBSD.org" Subject: Re: git: c6b2d024d7ee - main - Retore the vnet before returning an error. Date: Thu, 01 Jul 2021 17:29:17 -0700 X-Mailer: MailMate (1.14r5798) Message-ID: <296A20BE-34D2-400F-944E-306FC19B6B84@freebsd.org> In-Reply-To: References: <202106211449.15LEnsxM086627@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4GGGDQ2MGlz3nnd X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 00:29:26 -0000 Good to know. Thanks, George On 1 Jul 2021, at 11:32, Kevin Bowling wrote: > Hi George, > > After the git transition we use the commit author field itself to > communicate authorship. The obtained field should say Netapp, Inc. > See section 9.14 > https://docs.freebsd.org/en/articles/committers-guide/#commit-log-messa= ge > > Regards, > Kevin > > On Mon, Jun 21, 2021 at 7:50 AM George V. Neville-Neil = > wrote: >> >> The branch main has been updated by gnn: >> >> URL: = >> https://cgit.FreeBSD.org/src/commit/?id=3Dc6b2d024d7eedbf32f52a17bc029= c92f5a4d1a54 >> >> commit c6b2d024d7eedbf32f52a17bc029c92f5a4d1a54 >> Author: George V. Neville-Neil >> AuthorDate: 2021-06-21 14:46:20 +0000 >> Commit: George V. Neville-Neil >> CommitDate: 2021-06-21 14:46:20 +0000 >> >> Retore the vnet before returning an error. >> >> Obtained from: Kanndula, Dheeraj >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D30741 >> --- >> sys/net/if_vlan.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c >> index bd3a5335a97f..39f767c2a603 100644 >> --- a/sys/net/if_vlan.c >> +++ b/sys/net/if_vlan.c >> @@ -609,6 +609,7 @@ vlan_setmulti(struct ifnet *ifp) >> mc =3D malloc(sizeof(struct vlan_mc_entry), M_VLAN, = >> M_NOWAIT); >> if (mc =3D=3D NULL) { >> IF_ADDR_WUNLOCK(ifp); >> + CURVNET_RESTORE(); >> return (ENOMEM); >> } >> bcopy(ifma->ifma_addr, &mc->mc_addr, = >> ifma->ifma_addr->sa_len); >> @@ -619,8 +620,10 @@ vlan_setmulti(struct ifnet *ifp) >> CK_SLIST_FOREACH (mc, &sc->vlan_mc_listhead, mc_entries) { >> error =3D if_addmulti(ifp_p, (struct sockaddr = >> *)&mc->mc_addr, >> NULL); >> - if (error) >> + if (error) { >> + CURVNET_RESTORE(); >> return (error); >> + } >> } >> >> CURVNET_RESTORE(); >> _______________________________________________ >> dev-commits-src-main@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main >> To unsubscribe, send any mail to = >> "dev-commits-src-main-unsubscribe@freebsd.org" From owner-dev-commits-src-main@freebsd.org Fri Jul 2 05:25:43 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4ADE565EFE7; Fri, 2 Jul 2021 05:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGNpH1VyBz4grG; Fri, 2 Jul 2021 05:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 1C0B861F9; Fri, 2 Jul 2021 05:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1625PhR4078351; Fri, 2 Jul 2021 05:25:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1625PhAd078350; Fri, 2 Jul 2021 05:25:43 GMT (envelope-from git) Date: Fri, 2 Jul 2021 05:25:43 GMT Message-Id: <202107020525.1625PhAd078350@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 5bd70f050072 - main - stress2: Improve cleanup code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5bd70f050072bced1f0b7a566932857b3dd506ef Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 05:25:43 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=5bd70f050072bced1f0b7a566932857b3dd506ef commit 5bd70f050072bced1f0b7a566932857b3dd506ef Author: Peter Holm AuthorDate: 2021-07-02 05:22:18 +0000 Commit: Peter Holm CommitDate: 2021-07-02 05:22:18 +0000 stress2: Improve cleanup code --- tools/test/stress2/misc/mmap3.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/mmap3.sh b/tools/test/stress2/misc/mmap3.sh index bc5905dd920e..9175b77842f3 100755 --- a/tools/test/stress2/misc/mmap3.sh +++ b/tools/test/stress2/misc/mmap3.sh @@ -42,11 +42,12 @@ while [ `date '+%s'` -lt $((start + 5 * 60)) ]; do ./mmap3 done echo "Expect Segmentation faults" +trap "rm -f /tmp/mmap3.0*" EXIT INT start=`date '+%s'` while [ `date '+%s'` -lt $((start + 5 * 60)) ]; do ./mmap3 random done -rm -f mmap3 mmap3.core /tmp/mmap.0* +rm -f mmap3 mmap3.core /tmp/mmap3.0* exit EOF @@ -102,7 +103,7 @@ work(int nr) p = (void *)STARTADDR; len = ADRSPACE; - sprintf(path, "/tmp/mmap.%06d.%04d", getpid(), nr); + sprintf(path, "/tmp/mmap3.%06d.%04d", getpid(), nr); if ((fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0622)) == -1) err(1,"open()"); if (ftruncate(fd, len) == -1) From owner-dev-commits-src-main@freebsd.org Fri Jul 2 05:25:44 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B5B065F467; Fri, 2 Jul 2021 05:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGNpJ2BFcz4gV7; Fri, 2 Jul 2021 05:25:44 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 3416B66FC; Fri, 2 Jul 2021 05:25:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1625Pi3B078375; Fri, 2 Jul 2021 05:25:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1625Pixg078374; Fri, 2 Jul 2021 05:25:44 GMT (envelope-from git) Date: Fri, 2 Jul 2021 05:25:44 GMT Message-Id: <202107020525.1625Pixg078374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: e02046f74728 - main - stress2: Update the list of test not to run MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e02046f7472898215356c22b0f94f77731fb17aa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 05:25:44 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=e02046f7472898215356c22b0f94f77731fb17aa commit e02046f7472898215356c22b0f94f77731fb17aa Author: Peter Holm AuthorDate: 2021-07-02 05:23:05 +0000 Commit: Peter Holm CommitDate: 2021-07-02 05:23:05 +0000 stress2: Update the list of test not to run --- tools/test/stress2/misc/all.exclude | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index 62ddde1b7ca8..9e9226c28574 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -41,9 +41,7 @@ nfs16.sh panic: Failed to register NFS lock locally - error=11 20160608 oom2.sh Hang in pfault 20180324 overcommit2.sh CAM stuck in vmwait seen 20200112 pageout.sh panic: handle_written_filepage: not started 20190218 -pmc4.sh ld: error: /usr/lib/libpmc.so: undefined reference 20210124 -pmc5.sh ld: error: /usr/lib/libpmc.so: undefined reference 20210124 -pmc6.sh ld: error: /usr/lib/libpmc.so: undefined reference 20210124 +pmc8.sh panic: [pmc,2749] (ri21, rc1) waiting too long for pmc to ... 20210621 quota10.sh people.freebsd.org/~pho/stress/log/quota10-2.txt 20200525 quota2.sh panic: dqflush: stray dquot 20120221 quota3.sh panic: softdep_deallocate_dependencies: unrecovered ... 20111222 @@ -51,13 +49,13 @@ quota7.sh panic: dqflush: stray dquot 20120221 sctp3.sh panic: Queues are not empty when handling SHUTDOWN-COMPLETE 20210211 sendfile25.sh WiP 20200611 signal.sh Timing issues. Needs fixing 20171116 -snap8.sh panic: handle_workitem_remove: bad dir delta 20210619 swapoff2.sh swap_pager_force_pagein: read from swap failed 20171223 swapoff5.sh log0005.txt, known issue 20210111 systrace.sh WiP 20200227 systrace2.sh WiP 20200227 syzkaller11.sh WiP 20200721 syzkaller15.sh WiP 20200712 +syzkaller16.sh WiP 20210722 syzkaller19.sh WiP 20200712 syzkaller25.sh WiP 20201116 syzkaller28.sh WiP 20201120 From owner-dev-commits-src-main@freebsd.org Fri Jul 2 05:25:45 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE80D65F360; Fri, 2 Jul 2021 05:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGNpK3mwbz4ggM; Fri, 2 Jul 2021 05:25:45 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 5F02666FD; Fri, 2 Jul 2021 05:25:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1625PjTu078399; Fri, 2 Jul 2021 05:25:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1625Pjkk078398; Fri, 2 Jul 2021 05:25:45 GMT (envelope-from git) Date: Fri, 2 Jul 2021 05:25:45 GMT Message-Id: <202107020525.1625Pjkk078398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: fe5d22f8f487 - main - stress2: Added a test scenario from Bug 227041 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe5d22f8f487f31fd6c5e5017e7d9dd59b5e072e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 05:25:46 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=fe5d22f8f487f31fd6c5e5017e7d9dd59b5e072e commit fe5d22f8f487f31fd6c5e5017e7d9dd59b5e072e Author: Peter Holm AuthorDate: 2021-07-02 05:24:38 +0000 Commit: Peter Holm CommitDate: 2021-07-02 05:24:38 +0000 stress2: Added a test scenario from Bug 227041 --- tools/test/stress2/misc/pmc8.sh | 116 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/tools/test/stress2/misc/pmc8.sh b/tools/test/stress2/misc/pmc8.sh new file mode 100755 index 000000000000..6695b0b52f2a --- /dev/null +++ b/tools/test/stress2/misc/pmc8.sh @@ -0,0 +1,116 @@ +#!/bin/sh + +# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227041 + +# panic: [pmc,2749] (ri21, rc1) waiting too long for pmc to be free +# cpuid = 23 +# time = 1624293771 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01ab083850 +# vpanic() at vpanic+0x181/frame 0xfffffe01ab0838a0 +# panic() at panic+0x43/frame 0xfffffe01ab083900 +# pmc_wait_for_pmc_idle() at pmc_wait_for_pmc_idle+0xa2/frame 0xfffffe01ab083930 +# pmc_release_pmc_descriptor() at pmc_release_pmc_descriptor+0x20b/frame 0xfffffe01ab083980 +# pmc_syscall_handler() at pmc_syscall_handler+0x4bd/frame 0xfffffe01ab083ac0 +# amd64_syscall() at amd64_syscall+0x762/frame 0xfffffe01ab083bf0 +# fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01ab083bf0 +# --- syscall (0, FreeBSD ELF64, nosys), rip = 0x8009c154a, rsp = 0x7fffffffe4d8, rbp = 0x7fffffffe500 --- +# KDB: enter: panic +# [ thread pid 3123 tid 100454 ] +# Stopped at kdb_enter+0x37: movq $0,0x1285d1e(%rip) +# db> x/s version +# version: FreeBSD 14.0-CURRENT #1 ufs-n247476-f77f86ecfea: Mon Jun 21 08:40:40 CEST 2021 +# pho@t2.osted.lan:/var/tmp/deviant3/sys/amd64/compile/PHO +# db> + +. ../default.cfg +cat > /tmp/pmc-crash.c < + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + clang -lpmc pmc-crash.c -o pmc-crash +*/ + +#include +#include +#include +#include +#include +#include +#include + +int main(void) +{ + if (pmc_init() != 0) + { + printf("pmc_init %s", strerror(errno)); + exit(-1); + } + + pmc_id_t pmc_id = 0; + if (pmc_allocate("inst_retired.any", PMC_MODE_TC, 0, PMC_CPU_ANY, + &pmc_id, 1024) != 0) + { + printf("pmc_allocate %s", strerror(errno)); + exit(-1); + } + + printf("attaching to self\n"); + if (pmc_attach(pmc_id, 0) != 0) + { + printf("pmc_attach %s", strerror(errno)); + exit(-1); + } + + if (pmc_start(pmc_id) != 0) + { + printf("pmc_start %s", strerror(errno)); + exit(-1); + } + + pmc_value_t v = 0; + for (int i = 0; i < 100; i++) + { + pmc_read(pmc_id, &v); + } + pmc_stop(pmc_id); + + printf("success, detaching...\n"); + pmc_detach(pmc_id, 0); + pmc_release(pmc_id); + + printf("ok?"); +} +EOF +mycc -o /tmp/pmc-crash -Wall -Wextra -O0 /tmp/pmc-crash.c -lpmc || exit +kldstat -v | grep -q hwpmc || { kldload hwpmc; loaded=1; } +here=`pwd` +cd /tmp +./pmc-crash; s=$? +cd $here +rm -f /tmp/pmc-crash /tmp/pmc-crash.core /tmp/pmc-crash.c +[ $loaded ] && kldunload hwpmc +exit $s From owner-dev-commits-src-main@freebsd.org Fri Jul 2 06:43:53 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 87843661683; Fri, 2 Jul 2021 06:43: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGQXT3Fzgz4q55; Fri, 2 Jul 2021 06:43:53 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 586577079; Fri, 2 Jul 2021 06:43:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1626hrku083969; Fri, 2 Jul 2021 06:43:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1626hrKf083968; Fri, 2 Jul 2021 06:43:53 GMT (envelope-from git) Date: Fri, 2 Jul 2021 06:43:53 GMT Message-Id: <202107020643.1626hrKf083968@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: c5b8d7b7c14f - main - netstat: Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5b8d7b7c14f72a4ad12e610222642c69374dd4a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 06:43:53 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=c5b8d7b7c14f72a4ad12e610222642c69374dd4a commit c5b8d7b7c14f72a4ad12e610222642c69374dd4a Author: Stefan Eßer AuthorDate: 2021-07-02 06:38:42 +0000 Commit: Stefan Eßer CommitDate: 2021-07-02 06:42:34 +0000 netstat: Fix typo Correct spelling of "received packers" to "received packets". PR: 256926 Reported by: ghuckriede@blackberry.com MFC after: 3 days --- usr.bin/netstat/inet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 1143c09734e4..45c5f05e60b8 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1115,7 +1115,7 @@ arp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) "{N:/ARP request%s received}\n"); p2(rxreplies, "{:received-replies/%ju} " "{N:/ARP repl%s received}\n"); - p(received, "{:received-packers/%ju} " + p(received, "{:received-packets/%ju} " "{N:/ARP packet%s received}\n"); p(dropped, "{:dropped-no-entry/%ju} " "{N:/total packet%s dropped due to no ARP entry}\n"); From owner-dev-commits-src-main@freebsd.org Fri Jul 2 07:21:07 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 278D2663AE4; Fri, 2 Jul 2021 07:21: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGRMR0Nvpz4vVP; Fri, 2 Jul 2021 07:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 E9EA17DC7; Fri, 2 Jul 2021 07:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1627L6De032949; Fri, 2 Jul 2021 07:21:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1627L6di032948; Fri, 2 Jul 2021 07:21:06 GMT (envelope-from git) Date: Fri, 2 Jul 2021 07:21:06 GMT Message-Id: <202107020721.1627L6di032948@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ganbold Tsagaankhuu Subject: git: 3416513a413e - main - dtb: rockchip: Add NanoPI-R4S and RockPI E to the build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ganbold X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3416513a413e9e9670adb0c8f8526800ffaf4f76 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 07:21:07 -0000 The branch main has been updated by ganbold: URL: https://cgit.FreeBSD.org/src/commit/?id=3416513a413e9e9670adb0c8f8526800ffaf4f76 commit 3416513a413e9e9670adb0c8f8526800ffaf4f76 Author: Ganbold Tsagaankhuu AuthorDate: 2021-07-02 07:20:25 +0000 Commit: Ganbold Tsagaankhuu CommitDate: 2021-07-02 07:20:25 +0000 dtb: rockchip: Add NanoPI-R4S and RockPI E to the build --- sys/modules/dtb/rockchip/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/modules/dtb/rockchip/Makefile b/sys/modules/dtb/rockchip/Makefile index 4d665f503526..93ad5c6676ab 100644 --- a/sys/modules/dtb/rockchip/Makefile +++ b/sys/modules/dtb/rockchip/Makefile @@ -12,7 +12,9 @@ DTS= \ rockchip/rk3399-khadas-edge-v.dts \ rockchip/rk3399-nanopc-t4.dts \ rockchip/rk3328-nanopi-r2s.dts \ + rockchip/rk3399-nanopi-r4s.dts \ rockchip/rk3399-rock-pi-4.dts \ + rockchip/rk3328-rock-pi-e.dts \ rockchip/rk3328-rock64.dts \ rockchip/rk3399-firefly.dts \ rockchip/rk3399-rockpro64.dts From owner-dev-commits-src-main@freebsd.org Fri Jul 2 07:51:18 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C9276646E6; Fri, 2 Jul 2021 07: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGS2G2gzpz3G5C; Fri, 2 Jul 2021 07:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 45554105E3; Fri, 2 Jul 2021 07:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1627pIq4075187; Fri, 2 Jul 2021 07:51:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1627pIkV075186; Fri, 2 Jul 2021 07:51:18 GMT (envelope-from git) Date: Fri, 2 Jul 2021 07:51:18 GMT Message-Id: <202107020751.1627pIkV075186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: acb1f1269c6f - main - proccontrol(1): implement 'nonewprivs' MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: acb1f1269c6f4ff89a0d28ba742f6687e9ef779d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 07:51:18 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=acb1f1269c6f4ff89a0d28ba742f6687e9ef779d commit acb1f1269c6f4ff89a0d28ba742f6687e9ef779d Author: Edward Tomasz Napierala AuthorDate: 2021-07-02 07:49:20 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-07-02 07:50:36 +0000 proccontrol(1): implement 'nonewprivs' This adds the 'nonewprivs' mode, corresponding to newly added procctl(2) commands PROC_NO_NEW_PRIVS_CTL and PROC_NO_NEW_PRIVS_STATUS. Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30940 --- usr.bin/proccontrol/proccontrol.1 | 5 ++++- usr.bin/proccontrol/proccontrol.c | 23 ++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/usr.bin/proccontrol/proccontrol.1 b/usr.bin/proccontrol/proccontrol.1 index 4445bb5f9f8e..b4ed6c268a6a 100644 --- a/usr.bin/proccontrol/proccontrol.1 +++ b/usr.bin/proccontrol/proccontrol.1 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 28, 2019 +.Dd July 2, 2021 .Dt PROCCONTROL 1 .Os .Sh NAME @@ -69,6 +69,9 @@ Controls the signalling of capability mode access violations. .It Ar protmax Controls the implicit PROT_MAX application for .Xr mmap 2 . +.It Ar nonewprivs +Controls disabling the setuid and sgid bits for +.Xr execve 2 . .It Ar kpti Controls the KPTI enable, AMD64 only. .It Ar la48 diff --git a/usr.bin/proccontrol/proccontrol.c b/usr.bin/proccontrol/proccontrol.c index edcc23a3cb34..9f185de025c1 100644 --- a/usr.bin/proccontrol/proccontrol.c +++ b/usr.bin/proccontrol/proccontrol.c @@ -45,6 +45,7 @@ enum { MODE_TRAPCAP, MODE_PROTMAX, MODE_STACKGAP, + MODE_NO_NEW_PRIVS, #ifdef PROC_KPTI_CTL MODE_KPTI, #endif @@ -84,7 +85,7 @@ usage(void) { fprintf(stderr, "Usage: proccontrol -m (aslr|protmax|trace|trapcap|" - "stackgap"KPTI_USAGE LA_USAGE") [-q] " + "stackgap|nonewprivs"KPTI_USAGE LA_USAGE") [-q] " "[-s (enable|disable)] [-p pid | command]\n"); exit(1); } @@ -113,6 +114,8 @@ main(int argc, char *argv[]) mode = MODE_TRAPCAP; else if (strcmp(optarg, "stackgap") == 0) mode = MODE_STACKGAP; + else if (strcmp(optarg, "nonewprivs") == 0) + mode = MODE_NO_NEW_PRIVS; #ifdef PROC_KPTI_CTL else if (strcmp(optarg, "kpti") == 0) mode = MODE_KPTI; @@ -174,6 +177,9 @@ main(int argc, char *argv[]) case MODE_STACKGAP: error = procctl(P_PID, pid, PROC_STACKGAP_STATUS, &arg); break; + case MODE_NO_NEW_PRIVS: + error = procctl(P_PID, pid, PROC_NO_NEW_PRIVS_STATUS, &arg); + break; #ifdef PROC_KPTI_CTL case MODE_KPTI: error = procctl(P_PID, pid, PROC_KPTI_STATUS, &arg); @@ -264,6 +270,16 @@ main(int argc, char *argv[]) break; } break; + case MODE_NO_NEW_PRIVS: + switch (arg) { + case PROC_NO_NEW_PRIVS_ENABLE: + printf("enabled\n"); + break; + case PROC_NO_NEW_PRIVS_DISABLE: + printf("disabled\n"); + break; + } + break; #ifdef PROC_KPTI_CTL case MODE_KPTI: switch (arg & ~PROC_KPTI_STATUS_ACTIVE) { @@ -330,6 +346,11 @@ main(int argc, char *argv[]) PROC_STACKGAP_DISABLE_EXEC); error = procctl(P_PID, pid, PROC_STACKGAP_CTL, &arg); break; + case MODE_NO_NEW_PRIVS: + arg = enable ? PROC_NO_NEW_PRIVS_ENABLE : + PROC_NO_NEW_PRIVS_DISABLE; + error = procctl(P_PID, pid, PROC_NO_NEW_PRIVS_CTL, &arg); + break; #ifdef PROC_KPTI_CTL case MODE_KPTI: arg = enable ? PROC_KPTI_CTL_ENABLE_ON_EXEC : From owner-dev-commits-src-main@freebsd.org Fri Jul 2 08:28:43 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F136665AD7; Fri, 2 Jul 2021 08:28: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGSsR34wPz3KRr; Fri, 2 Jul 2021 08:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 4E09210F26; Fri, 2 Jul 2021 08:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1628ShgK018761; Fri, 2 Jul 2021 08:28:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628Shvv018760; Fri, 2 Jul 2021 08:28:43 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:28:43 GMT Message-Id: <202107020828.1628Shvv018760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 2eb9ad427475 - main - Simplify and speed up the kyua build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2eb9ad427475190e87d026de4ca7fc296947f2a0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:28:43 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=2eb9ad427475190e87d026de4ca7fc296947f2a0 commit 2eb9ad427475190e87d026de4ca7fc296947f2a0 Author: Alex Richardson AuthorDate: 2021-07-02 08:21:04 +0000 Commit: Alex Richardson CommitDate: 2021-07-02 08:21:05 +0000 Simplify and speed up the kyua build Instead of having multiple kyua libraries, just include the files as part of usr.bin/kyua. Previously, we would build each kyua source up to four times: once as a .o file and once as a .pieo. Additionally, the kyua libraries might be built again for compat32. As all the kyua libraries amount to 102 C++ sources the build time is significant (especially when using an assertions enabled compiler). This change ensures that we build 306 fewer .cpp source files as part of buildworld. Reviewed By: brooks MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30967 --- lib/kyua/Makefile | 10 --- lib/kyua/Makefile.inc | 20 ----- lib/kyua/Makefile.kyua | 11 --- lib/kyua/cli/Makefile | 29 -------- lib/kyua/drivers/Makefile | 12 --- lib/kyua/engine/Makefile | 22 ------ lib/kyua/model/Makefile | 13 ---- lib/kyua/store/Makefile | 18 ----- lib/kyua/utils/Makefile | 65 ---------------- share/mk/src.libnames.mk | 30 -------- usr.bin/kyua/Makefile | 140 +++++++++++++++++++++++++++++++++-- {lib => usr.bin}/kyua/config.h | 0 {lib => usr.bin}/kyua/utils/defs.hpp | 0 13 files changed, 135 insertions(+), 235 deletions(-) diff --git a/lib/kyua/Makefile b/lib/kyua/Makefile deleted file mode 100644 index 1a1ea8bf5828..000000000000 --- a/lib/kyua/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# $FreeBSD$ - -SUBDIR= cli \ - drivers \ - engine \ - model \ - store \ - utils - -.include diff --git a/lib/kyua/Makefile.inc b/lib/kyua/Makefile.inc deleted file mode 100644 index 52f19d3140b3..000000000000 --- a/lib/kyua/Makefile.inc +++ /dev/null @@ -1,20 +0,0 @@ -# $FreeBSD$ - -KYUA_LIBDIR:= ${.PARSEDIR} - -.include "${KYUA_LIBDIR}/Makefile.kyua" - -LIB_CXX= kyua_${KYUA_LIB} -INTERNALLIB= - -.PATH: ${KYUA_SRCDIR}/${KYUA_LIB} -CFLAGS+= -I${KYUA_LIBDIR} \ - -I${KYUA_SRCDIR} \ - -I${SRCTOP}/contrib/lutok/include - -CFLAGS+= -DHAVE_CONFIG_H - -# kyua uses auto_ptr -CFLAGS+= -Wno-deprecated-declarations - -.include "${.PARSEDIR}/../Makefile.inc" diff --git a/lib/kyua/Makefile.kyua b/lib/kyua/Makefile.kyua deleted file mode 100644 index 1fd30a135409..000000000000 --- a/lib/kyua/Makefile.kyua +++ /dev/null @@ -1,11 +0,0 @@ -# $FreeBSD$ - -KYUA_VERSION= 0.13 - -KYUA_CONFDIR= /etc/kyua -KYUA_DOCDIR= /usr/share/doc/kyua -KYUA_EGDIR= /usr/share/examples/kyua -KYUA_MISCDIR= /usr/share/kyua/misc -KYUA_STOREDIR= /usr/share/kyua/store - -KYUA_SRCDIR= ${SRCTOP}/contrib/kyua diff --git a/lib/kyua/cli/Makefile b/lib/kyua/cli/Makefile deleted file mode 100644 index b5de51607c12..000000000000 --- a/lib/kyua/cli/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= cli -INTERNALLIB= -LIBADD= kyua_drivers kyua_engine kyua_model kyua_store kyua_utils -CFLAGS+= -DKYUA_CONFDIR=\"${KYUA_CONFDIR}\" \ - -DKYUA_DOCDIR=\"${KYUA_DOCDIR}\" \ - -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\" \ - -DPACKAGE=\"kyua\" \ - -DPACKAGE_NAME=\"Kyua\" \ - -DPACKAGE_VERSION=\"${KYUA_VERSION}\" \ - -DVERSION=\"${KYUA_VERSION}\" - -SRCS= cmd_about.cpp \ - cmd_config.cpp \ - cmd_db_exec.cpp \ - cmd_db_migrate.cpp \ - cmd_debug.cpp \ - cmd_help.cpp \ - cmd_list.cpp \ - cmd_report.cpp \ - cmd_report_html.cpp \ - cmd_report_junit.cpp \ - cmd_test.cpp \ - common.cpp \ - config.cpp \ - main.cpp - -.include diff --git a/lib/kyua/drivers/Makefile b/lib/kyua/drivers/Makefile deleted file mode 100644 index adf9c0601269..000000000000 --- a/lib/kyua/drivers/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= drivers -LIBADD= kyua_model kyua_engine kyua_store - -SRCS= debug_test.cpp \ - list_tests.cpp \ - report_junit.cpp \ - run_tests.cpp \ - scan_results.cpp - -.include diff --git a/lib/kyua/engine/Makefile b/lib/kyua/engine/Makefile deleted file mode 100644 index 4f0c9053c692..000000000000 --- a/lib/kyua/engine/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= engine -LIBADD= lutok kyua_utils -CFLAGS= -DKYUA_ARCHITECTURE=\"${MACHINE_ARCH}\" \ - -DKYUA_PLATFORM=\"${MACHINE}\" - -SRCS= atf.cpp \ - atf_list.cpp \ - atf_result.cpp \ - config.cpp \ - exceptions.cpp \ - filters.cpp \ - kyuafile.cpp \ - plain.cpp \ - requirements.cpp \ - scanner.cpp \ - tap.cpp \ - tap_parser.cpp \ - scheduler.cpp - -.include diff --git a/lib/kyua/model/Makefile b/lib/kyua/model/Makefile deleted file mode 100644 index d4a0b91587e7..000000000000 --- a/lib/kyua/model/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= model -LIBADD= lutok - -SRCS= context.cpp \ - exceptions.cpp \ - metadata.cpp \ - test_case.cpp \ - test_program.cpp \ - test_result.cpp - -.include diff --git a/lib/kyua/store/Makefile b/lib/kyua/store/Makefile deleted file mode 100644 index 39753691873e..000000000000 --- a/lib/kyua/store/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= store -LIBADD= kyua_model kyua_utils sqlite3 - -CFLAGS+= -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\" - -SRCS= dbtypes.cpp \ - exceptions.cpp \ - layout.cpp \ - metadata.cpp \ - migrate.cpp \ - read_backend.cpp \ - read_transaction.cpp \ - write_backend.cpp \ - write_transaction.cpp - -.include diff --git a/lib/kyua/utils/Makefile b/lib/kyua/utils/Makefile deleted file mode 100644 index 740b395d6951..000000000000 --- a/lib/kyua/utils/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= utils -LIBADD= lutok - -CFLAGS+= -I${SRCTOP}/contrib/sqlite3 -CFLAGS+= -DGDB=\"/usr/local/bin/gdb\" - -SRCS= datetime.cpp \ - env.cpp \ - memory.cpp \ - passwd.cpp \ - sanity.cpp \ - stacktrace.cpp \ - stream.cpp \ - units.cpp \ - cmdline/base_command.cpp \ - cmdline/exceptions.cpp \ - cmdline/globals.cpp \ - cmdline/options.cpp \ - cmdline/parser.cpp \ - cmdline/ui.cpp \ - cmdline/ui_mock.cpp \ - config/exceptions.cpp \ - config/keys.cpp \ - config/lua_module.cpp \ - config/nodes.cpp \ - config/parser.cpp \ - config/tree.cpp \ - format/exceptions.cpp \ - format/formatter.cpp \ - fs/auto_cleaners.cpp \ - fs/directory.cpp \ - fs/exceptions.cpp \ - fs/lua_module.cpp \ - fs/operations.cpp \ - fs/path.cpp \ - logging/operations.cpp \ - process/child.cpp \ - process/deadline_killer.cpp \ - process/exceptions.cpp \ - process/executor.cpp \ - process/fdstream.cpp \ - process/isolation.cpp \ - process/operations.cpp \ - process/status.cpp \ - process/system.cpp \ - process/systembuf.cpp \ - signals/exceptions.cpp \ - signals/interrupts.cpp \ - signals/misc.cpp \ - signals/programmer.cpp \ - signals/timer.cpp \ - sqlite/c_gate.cpp \ - sqlite/database.cpp \ - sqlite/exceptions.cpp \ - sqlite/statement.cpp \ - sqlite/transaction.cpp \ - text/exceptions.cpp \ - text/operations.cpp \ - text/regex.cpp \ - text/table.cpp \ - text/templates.cpp \ - -.include diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 61373dceb4d1..2db4a0dee4d8 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -41,12 +41,6 @@ _INTERNALLIBS= \ fifolog \ ifconfig \ ipf \ - kyua_cli \ - kyua_drivers \ - kyua_engine \ - kyua_model \ - kyua_store \ - kyua_utils \ lpr \ lua \ lutok \ @@ -286,12 +280,6 @@ _DP_bsnmp= crypto _DP_geom= bsdxml sbuf _DP_cam= sbuf _DP_kvm= elf -_DP_kyua_cli= kyua_drivers kyua_engine kyua_model kyua_store kyua_utils -_DP_kyua_drivers= kyua_model kyua_engine kyua_store -_DP_kyua_engine= lutok kyua_utils -_DP_kyua_model= lutok -_DP_kyua_utils= lutok -_DP_kyua_store= kyua_model kyua_utils sqlite3 _DP_casper= nv _DP_cap_dns= nv _DP_cap_fileargs= nv @@ -510,24 +498,6 @@ _LIB_OBJTOP?= ${OBJTOP} LIBELFTCDIR= ${_LIB_OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc${PIE_SUFFIX}.a -LIBKYUA_CLIDIR= ${_LIB_OBJTOP}/lib/kyua/cli -LIBKYUA_CLI?= ${LIBKYUA_CLIDIR}/libkyua_cli${PIE_SUFFIX}.a - -LIBKYUA_DRIVERSDIR= ${_LIB_OBJTOP}/lib/kyua/drivers -LIBKYUA_DRIVERS?= ${LIBKYUA_DRIVERSDIR}/libkyua_drivers${PIE_SUFFIX}.a - -LIBKYUA_ENGINEDIR= ${_LIB_OBJTOP}/lib/kyua/engine -LIBKYUA_ENGINE?= ${LIBKYUA_ENGINEDIR}/libkyua_engine${PIE_SUFFIX}.a - -LIBKYUA_MODELDIR= ${_LIB_OBJTOP}/lib/kyua/model -LIBKYUA_MODEL?= ${LIBKYUA_MODELDIR}/libkyua_model${PIE_SUFFIX}.a - -LIBKYUA_STOREDIR= ${_LIB_OBJTOP}/lib/kyua/store -LIBKYUA_STORE?= ${LIBKYUA_STOREDIR}/libkyua_store${PIE_SUFFIX}.a - -LIBKYUA_UTILSDIR= ${_LIB_OBJTOP}/lib/kyua/utils -LIBKYUA_UTILS?= ${LIBKYUA_UTILSDIR}/libkyua_utils${PIE_SUFFIX}.a - LIBLUADIR= ${_LIB_OBJTOP}/lib/liblua LIBLUA?= ${LIBLUADIR}/liblua${PIE_SUFFIX}.a diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index e27c8603f11b..966927709a06 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -2,14 +2,20 @@ .include -.include "${SRCTOP}/lib/kyua/Makefile.kyua" - +KYUA_CONFDIR= /etc/kyua +KYUA_DOCDIR= /usr/share/doc/kyua +KYUA_EGDIR= /usr/share/examples/kyua +KYUA_MISCDIR= /usr/share/kyua/misc +KYUA_STOREDIR= /usr/share/kyua/store +KYUA_VERSION= 0.13 + +KYUA_SRCDIR= ${SRCTOP}/contrib/kyua .PATH: ${KYUA_SRCDIR} PACKAGE= tests PROG_CXX= kyua SRCS= main.cpp -LIBADD= kyua_cli kyua_drivers kyua_engine kyua_model kyua_store +LIBADD= lutok sqlite3 MAN= kyua-about.1 \ kyua-config.1 \ @@ -26,10 +32,134 @@ MAN= kyua-about.1 \ kyua.conf.5 \ kyuafile.5 -CFLAGS+= -I${KYUA_SRCDIR} - +CFLAGS+= -I${KYUA_SRCDIR} -I${.CURDIR} +CFLAGS+= -I${SRCTOP}/contrib/lutok/include +CFLAGS+= -I${SRCTOP}/contrib/sqlite3 # kyua uses auto_ptr CFLAGS+= -Wno-deprecated-declarations +CFLAGS+= -DHAVE_CONFIG_H + +# We compile the kyua libraries as part of the main executable as this saves +# compile time and we don't install them anyway. +CFLAGS+= -DGDB=\"/usr/local/bin/gdb\" \ + -DKYUA_ARCHITECTURE=\"${MACHINE_ARCH}\" \ + -DKYUA_CONFDIR=\"${KYUA_CONFDIR}\" \ + -DKYUA_DOCDIR=\"${KYUA_DOCDIR}\" \ + -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\" \ + -DKYUA_PLATFORM=\"${MACHINE}\" \ + -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\" \ + -DPACKAGE=\"kyua\" \ + -DPACKAGE_NAME=\"Kyua\" \ + -DPACKAGE_VERSION=\"${KYUA_VERSION}\" \ + -DVERSION=\"${KYUA_VERSION}\" + +SRCS+= utils/datetime.cpp \ + utils/env.cpp \ + utils/memory.cpp \ + utils/passwd.cpp \ + utils/sanity.cpp \ + utils/stacktrace.cpp \ + utils/stream.cpp \ + utils/units.cpp \ + utils/cmdline/base_command.cpp \ + utils/cmdline/exceptions.cpp \ + utils/cmdline/globals.cpp \ + utils/cmdline/options.cpp \ + utils/cmdline/parser.cpp \ + utils/cmdline/ui.cpp \ + utils/cmdline/ui_mock.cpp \ + utils/config/exceptions.cpp \ + utils/config/keys.cpp \ + utils/config/lua_module.cpp \ + utils/config/nodes.cpp \ + utils/config/parser.cpp \ + utils/config/tree.cpp \ + utils/format/exceptions.cpp \ + utils/format/formatter.cpp \ + utils/fs/auto_cleaners.cpp \ + utils/fs/directory.cpp \ + utils/fs/exceptions.cpp \ + utils/fs/lua_module.cpp \ + utils/fs/operations.cpp \ + utils/fs/path.cpp \ + utils/logging/operations.cpp \ + utils/process/child.cpp \ + utils/process/deadline_killer.cpp \ + utils/process/exceptions.cpp \ + utils/process/executor.cpp \ + utils/process/fdstream.cpp \ + utils/process/isolation.cpp \ + utils/process/operations.cpp \ + utils/process/status.cpp \ + utils/process/system.cpp \ + utils/process/systembuf.cpp \ + utils/signals/exceptions.cpp \ + utils/signals/interrupts.cpp \ + utils/signals/misc.cpp \ + utils/signals/programmer.cpp \ + utils/signals/timer.cpp \ + utils/sqlite/c_gate.cpp \ + utils/sqlite/database.cpp \ + utils/sqlite/exceptions.cpp \ + utils/sqlite/statement.cpp \ + utils/sqlite/transaction.cpp \ + utils/text/exceptions.cpp \ + utils/text/operations.cpp \ + utils/text/regex.cpp \ + utils/text/table.cpp \ + utils/text/templates.cpp + +SRCS+= model/context.cpp \ + model/exceptions.cpp \ + model/metadata.cpp \ + model/test_case.cpp \ + model/test_program.cpp \ + model/test_result.cpp + +SRCS+= engine/atf.cpp \ + engine/atf_list.cpp \ + engine/atf_result.cpp \ + engine/config.cpp \ + engine/exceptions.cpp \ + engine/filters.cpp \ + engine/kyuafile.cpp \ + engine/plain.cpp \ + engine/requirements.cpp \ + engine/scanner.cpp \ + engine/tap.cpp \ + engine/tap_parser.cpp \ + engine/scheduler.cpp + +SRCS+= store/dbtypes.cpp \ + store/exceptions.cpp \ + store/layout.cpp \ + store/metadata.cpp \ + store/migrate.cpp \ + store/read_backend.cpp \ + store/read_transaction.cpp \ + store/write_backend.cpp \ + store/write_transaction.cpp + +SRCS+= drivers/debug_test.cpp \ + drivers/list_tests.cpp \ + drivers/report_junit.cpp \ + drivers/run_tests.cpp \ + drivers/scan_results.cpp + +SRCS+= cli/cmd_about.cpp \ + cli/cmd_config.cpp \ + cli/cmd_db_exec.cpp \ + cli/cmd_db_migrate.cpp \ + cli/cmd_debug.cpp \ + cli/cmd_help.cpp \ + cli/cmd_list.cpp \ + cli/cmd_report.cpp \ + cli/cmd_report_html.cpp \ + cli/cmd_report_junit.cpp \ + cli/cmd_test.cpp \ + cli/common.cpp \ + cli/config.cpp \ + cli/main.cpp FILESGROUPS= DOCS MISC STORE diff --git a/lib/kyua/config.h b/usr.bin/kyua/config.h similarity index 100% rename from lib/kyua/config.h rename to usr.bin/kyua/config.h diff --git a/lib/kyua/utils/defs.hpp b/usr.bin/kyua/utils/defs.hpp similarity index 100% rename from lib/kyua/utils/defs.hpp rename to usr.bin/kyua/utils/defs.hpp From owner-dev-commits-src-main@freebsd.org Fri Jul 2 08:30:27 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F41D6665F07; Fri, 2 Jul 2021 08:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGSvQ6XNxz3KNK; Fri, 2 Jul 2021 08:30:26 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C9C7F110E4; Fri, 2 Jul 2021 08:30:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1628UQxY027225; Fri, 2 Jul 2021 08:30:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628UQJW027224; Fri, 2 Jul 2021 08:30:26 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:30:26 GMT Message-Id: <202107020830.1628UQJW027224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: fb32c8dbeb6f - main - iflib: retire MB_DTOR_SKIP MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb32c8dbeb6fb0cc01756fb2fb90ca06e4b7c53e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:30:27 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=fb32c8dbeb6fb0cc01756fb2fb90ca06e4b7c53e commit fb32c8dbeb6fb0cc01756fb2fb90ca06e4b7c53e Author: Mateusz Guzik AuthorDate: 2021-06-30 13:09:40 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-02 08:30:22 +0000 iflib: retire MB_DTOR_SKIP The flag was added in 2016 but remains unused. Reviewed by: kbowling Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30958 --- sys/kern/kern_mbuf.c | 3 ++- sys/sys/mbuf.h | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index a46c576bad90..f814d3cab6e8 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -658,7 +658,8 @@ mb_dtor_mbuf(void *mem, int size, void *arg) flags = (unsigned long)arg; KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__)); - if (!(flags & MB_DTOR_SKIP) && (m->m_flags & M_PKTHDR) && !SLIST_EMPTY(&m->m_pkthdr.tags)) + KASSERT((flags & 0x1) == 0, ("%s: obsolete MB_DTOR_SKIP passed", __func__)); + if ((m->m_flags & M_PKTHDR) && !SLIST_EMPTY(&m->m_pkthdr.tags)) m_tag_delete_chain(m, NULL); } diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index e37b872c74fe..ffc574817249 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -478,8 +478,6 @@ m_epg_pagelen(const struct mbuf *m, int pidx, int pgoff) #define M_PROTO10 0x00400000 /* protocol-specific */ #define M_PROTO11 0x00800000 /* protocol-specific */ -#define MB_DTOR_SKIP 0x1 /* don't pollute the cache by touching a freed mbuf */ - /* * Flags to purge when crossing layers. */ From owner-dev-commits-src-main@freebsd.org Fri Jul 2 08:30:28 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5D74B665EB1; Fri, 2 Jul 2021 08:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGSvS14FXz3Kc6; Fri, 2 Jul 2021 08:30:28 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 06AE010F28; Fri, 2 Jul 2021 08:30:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1628URFJ027249; Fri, 2 Jul 2021 08:30:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628URtR027248; Fri, 2 Jul 2021 08:30:27 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:30:27 GMT Message-Id: <202107020830.1628URtR027248@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 05462babd424 - main - mbuf: add m_free_raw to be used instead of directly calling uma_zfree MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05462babd424124762375dca186802d7355af566 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:30:28 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=05462babd424124762375dca186802d7355af566 commit 05462babd424124762375dca186802d7355af566 Author: Mateusz Guzik AuthorDate: 2021-06-30 14:15:25 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-02 08:30:22 +0000 mbuf: add m_free_raw to be used instead of directly calling uma_zfree The intent is to remove all direct zone_mbuf consumers so that ctor/dtor from that zone can be reimplemented as wrappers around uma, avoiding an indirect function call. Reviewed by: kbowling Discussed with: gallatin Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30959 --- sys/kern/kern_mbuf.c | 10 ++++++++++ sys/sys/mbuf.h | 1 + 2 files changed, 11 insertions(+) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index f814d3cab6e8..2333bf887354 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -1526,6 +1526,16 @@ m_freem(struct mbuf *mb) mb = m_free(mb); } +/* + * Temporary primitive to allow freeing without going through m_free. + */ +void +m_free_raw(struct mbuf *mb) +{ + + uma_zfree(zone_mbuf, mb); +} + int m_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **mstp) diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index ffc574817249..1dac5fcf32b7 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -825,6 +825,7 @@ void m_extadd(struct mbuf *, char *, u_int, m_ext_free_t, u_int m_fixhdr(struct mbuf *); struct mbuf *m_fragment(struct mbuf *, int, int); void m_freem(struct mbuf *); +void m_free_raw(struct mbuf *); struct mbuf *m_get2(int, int, short, int); struct mbuf *m_getjcl(int, short, int, int); struct mbuf *m_getm2(struct mbuf *, int, int, short, int); From owner-dev-commits-src-main@freebsd.org Fri Jul 2 08:30:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47FB4665C6C; Fri, 2 Jul 2021 08:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGSvT1VNGz3KYq; Fri, 2 Jul 2021 08:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 1B0C310F29; Fri, 2 Jul 2021 08:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1628UTqM027273; Fri, 2 Jul 2021 08:30:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628UT1x027272; Fri, 2 Jul 2021 08:30:29 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:30:29 GMT Message-Id: <202107020830.1628UT1x027272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: bad5f0b6c294 - main - iflib: switch bare zone_mbuf use to m_free_raw MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bad5f0b6c2944453db2d70a982e8abf203f21669 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:30:29 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=bad5f0b6c2944453db2d70a982e8abf203f21669 commit bad5f0b6c2944453db2d70a982e8abf203f21669 Author: Mateusz Guzik AuthorDate: 2021-06-30 14:17:29 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-02 08:30:22 +0000 iflib: switch bare zone_mbuf use to m_free_raw Reviewed by: kbowling Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30961 --- sys/net/iflib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index ea3754a07ee6..0b36e880e15e 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2238,7 +2238,7 @@ iflib_fl_bufs_free(iflib_fl_t fl) *sd_cl = NULL; if (*sd_m != NULL) { m_init(*sd_m, M_NOWAIT, MT_DATA, 0); - uma_zfree(zone_mbuf, *sd_m); + m_free_raw(*sd_m); *sd_m = NULL; } } else { From owner-dev-commits-src-main@freebsd.org Fri Jul 2 08:30:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6ACC665C6F; Fri, 2 Jul 2021 08:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGSvV3HKgz3KHb; Fri, 2 Jul 2021 08:30:30 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 3D83A11107; Fri, 2 Jul 2021 08:30:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1628UU8C027297; Fri, 2 Jul 2021 08:30:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628UUR8027296; Fri, 2 Jul 2021 08:30:30 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:30:30 GMT Message-Id: <202107020830.1628UUR8027296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 904a08f3427c - main - ktls: switch bare zone_mbuf use to m_free_raw MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 904a08f3427c8ae42b667c1f5dc3e441b48a8e84 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:30:30 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=904a08f3427c8ae42b667c1f5dc3e441b48a8e84 commit 904a08f3427c8ae42b667c1f5dc3e441b48a8e84 Author: Mateusz Guzik AuthorDate: 2021-06-30 13:02:45 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-02 08:30:22 +0000 ktls: switch bare zone_mbuf use to m_free_raw Reviewed by: gallatin Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30955 --- sys/kern/uipc_ktls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 8eb52cd02afe..7e87e7c740e3 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -2174,7 +2174,7 @@ ktls_work_thread(void *ctx) STAILQ_FOREACH_SAFE(m, &local_m_head, m_epg_stailq, n) { if (m->m_epg_flags & EPG_FLAG_2FREE) { ktls_free(m->m_epg_tls); - uma_zfree(zone_mbuf, m); + m_free_raw(m); } else { ktls_encrypt(wq, m); counter_u64_add(ktls_cnt_tx_queued, -1); From owner-dev-commits-src-main@freebsd.org Fri Jul 2 08:30:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CED90665EC5; Fri, 2 Jul 2021 08:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGSvW3fqwz3KHf; Fri, 2 Jul 2021 08:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 5734F10ED1; Fri, 2 Jul 2021 08:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1628UVnd027323; Fri, 2 Jul 2021 08:30:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628UVxx027322; Fri, 2 Jul 2021 08:30:31 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:30:31 GMT Message-Id: <202107020830.1628UVxx027322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 48d5b86364fa - main - pf: make DIOCGETSTATESNV iterations killable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48d5b86364fa8e86318805d0078ccf9066e94ae8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:30:32 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=48d5b86364fa8e86318805d0078ccf9066e94ae8 commit 48d5b86364fa8e86318805d0078ccf9066e94ae8 Author: Mateusz Guzik AuthorDate: 2021-07-02 07:28:48 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-02 08:30:22 +0000 pf: make DIOCGETSTATESNV iterations killable Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_ioctl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 928e4a1259cc..a802780277aa 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -5059,6 +5059,11 @@ pf_getstates(struct pfioc_nv *nv) if (s->timeout == PFTM_UNLINKED) continue; + if (SIGPENDING(curthread)) { + PF_HASHROW_UNLOCK(ih); + ERROUT(EINTR); + } + nvls = pf_state_to_nvstate(s); if (nvls == NULL) { PF_HASHROW_UNLOCK(ih); From owner-dev-commits-src-main@freebsd.org Fri Jul 2 08:56:16 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 496436669FE; Fri, 2 Jul 2021 08:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGTTD1gc3z3Mfr; Fri, 2 Jul 2021 08:56:16 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 21E02112D8; Fri, 2 Jul 2021 08:56:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1628uGPN058307; Fri, 2 Jul 2021 08:56:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628uG83058306; Fri, 2 Jul 2021 08:56:16 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:56:16 GMT Message-Id: <202107020856.1628uG83058306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 8ec4ba8a76aa - main - Remove lib/kyua from the build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ec4ba8a76aaf256942ac5996d45cc29022641ae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:56:16 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=8ec4ba8a76aaf256942ac5996d45cc29022641ae commit 8ec4ba8a76aaf256942ac5996d45cc29022641ae Author: Alex Richardson AuthorDate: 2021-07-02 08:54:11 +0000 Commit: Alex Richardson CommitDate: 2021-07-02 08:56:05 +0000 Remove lib/kyua from the build I forgot to include this line in 2eb9ad427475190e87d026de4ca7fc296947f2a0. Reported by: Jenkins CI MFC after: 1 week Fixes: 2eb9ad427475190ei ("Simplify and speed up the kyua build") --- usr.bin/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 206da7154ac2..698dbc25b5e8 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -247,7 +247,6 @@ SUBDIR.${MK_QUOTAS}+= quota SUBDIR.${MK_SENDMAIL}+= vacation SUBDIR.${MK_TALK}+= talk SUBDIR.${MK_TELNET}+= telnet -SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= kyua SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_TEXTPROC}+= ul SUBDIR.${MK_TFTP}+= tftp From owner-dev-commits-src-main@freebsd.org Fri Jul 2 09:18:33 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7083667766; Fri, 2 Jul 2021 09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGTyx4n81z3P32; Fri, 2 Jul 2021 09:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 8D32F11A8D; Fri, 2 Jul 2021 09:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1629IXCJ085844; Fri, 2 Jul 2021 09:18:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1629IXuj085843; Fri, 2 Jul 2021 09:18:33 GMT (envelope-from git) Date: Fri, 2 Jul 2021 09:18:33 GMT Message-Id: <202107020918.1629IXuj085843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 89da04fcaa33 - main - Revert "Remove lib/kyua from the build" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89da04fcaa33f100a60d06770f7424e5b7f1312f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 09:18:33 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=89da04fcaa33f100a60d06770f7424e5b7f1312f commit 89da04fcaa33f100a60d06770f7424e5b7f1312f Author: Alex Richardson AuthorDate: 2021-07-02 09:17:03 +0000 Commit: Alex Richardson CommitDate: 2021-07-02 09:17:03 +0000 Revert "Remove lib/kyua from the build" Accidentally removed it from the wrong file... This reverts commit 8ec4ba8a76aaf256942ac5996d45cc29022641ae. --- usr.bin/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 698dbc25b5e8..206da7154ac2 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -247,6 +247,7 @@ SUBDIR.${MK_QUOTAS}+= quota SUBDIR.${MK_SENDMAIL}+= vacation SUBDIR.${MK_TALK}+= talk SUBDIR.${MK_TELNET}+= telnet +SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= kyua SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_TEXTPROC}+= ul SUBDIR.${MK_TFTP}+= tftp From owner-dev-commits-src-main@freebsd.org Fri Jul 2 09:18:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB988667620; Fri, 2 Jul 2021 09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGTyy67J1z3P34; Fri, 2 Jul 2021 09:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 B1E0011A8E; Fri, 2 Jul 2021 09:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1629IYQw085870; Fri, 2 Jul 2021 09:18:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1629IYwK085869; Fri, 2 Jul 2021 09:18:34 GMT (envelope-from git) Date: Fri, 2 Jul 2021 09:18:34 GMT Message-Id: <202107020918.1629IYwK085869@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: c95156691588 - main - Remove lib/kyua from the build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c951566915886330612bee880d6ece0d65bf9f5d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 09:18:35 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=c951566915886330612bee880d6ece0d65bf9f5d commit c951566915886330612bee880d6ece0d65bf9f5d Author: Alex Richardson AuthorDate: 2021-07-02 09:18:00 +0000 Commit: Alex Richardson CommitDate: 2021-07-02 09:18:00 +0000 Remove lib/kyua from the build I forgot to include this line in 2eb9ad427475190e87d026de4ca7fc296947f2a0. Reported by: Jenkins CI MFC after: 1 week Fixes: 2eb9ad427475190ei ("Simplify and speed up the kyua build") --- lib/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile index 26b867ec00e1..a06e77dee022 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -216,7 +216,6 @@ SUBDIR.${MK_RADIUS_SUPPORT}+= libradius SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil SUBDIR.${MK_TELNET}+= libtelnet SUBDIR.${MK_TESTS_SUPPORT}+= atf -SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= kyua SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= liblutok SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_UNBOUND}+= libunbound From owner-dev-commits-src-main@freebsd.org Fri Jul 2 09:18:44 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6E36667933; Fri, 2 Jul 2021 09:18:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGTz83HKLz3P6B; Fri, 2 Jul 2021 09:18:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 263FB26D04; Fri, 2 Jul 2021 09:18:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 7CF8A3D004; Fri, 2 Jul 2021 11:18:42 +0200 (CEST) From: "Kristof Provost" To: "Gleb Smirnoff" Cc: "Warner Losh" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f13da24715a7 - main - net/bpf: Fix writing of buffer bigger than PAGESIZE Date: Fri, 02 Jul 2021 11:18:41 +0200 X-Mailer: MailMate (1.13.2r5673) Message-ID: <4EAFAECE-9E03-48A7-840B-26E7D871FE29@FreeBSD.org> In-Reply-To: References: <202106231641.15NGf1xH083695@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 09:18:44 -0000 On 23 Jun 2021, at 22:35, Gleb Smirnoff wrote: > Warner, Kristof, > > On Wed, Jun 23, 2021 at 04:41:01PM +0000, Warner Losh wrote: > W> net/bpf: Fix writing of buffer bigger than PAGESIZE > W> > W> When allocating the mbuf we used m_get2 which fails > W> if len is superior to MJUMPAGESIZE, if its the case, > W> use m_getjcl instead. > W> > W> Reviewed by: kp@ > W> PR: 205164 > W> Pull Request: https://github.com/freebsd/freebsd-src/pull/131 > > m_get2() used to provide jumbo mbufs in the past, see > 3112ae76449ae0931d207603f14b083627bd731d. > > IMHO, makes sense to create m_get3() and use it in bpf. What do you > think? > Do you mean, create an m_get3() like this (untested): diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index a46c576bad90..202a1c1a5b41 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -1370,6 +1370,51 @@ m_get2(int size, int how, short type, int flags) return (m); } +/* + * m_get3() allocates minimum mbuf that would fit "size" argument. + * Unlike m_get2() is can allocate clusters up to MJUM16BYTES. + */ +struct mbuf * +m_get3(int size, int how, short type, int flags) +{ + struct mb_args args; + struct mbuf *m, *n; + uma_zone_t zone; + + args.flags = flags; + args.type = type; + + if (size <= MHLEN || (size <= MLEN && (flags & M_PKTHDR) == 0)) + return (uma_zalloc_arg(zone_mbuf, &args, how)); + if (size <= MCLBYTES) + return (uma_zalloc_arg(zone_pack, &args, how)); + + if (size > MJUM16BYTES) + return (NULL); + + m = uma_zalloc_arg(zone_mbuf, &args, how); + if (m == NULL) + return (NULL); + +#if MJUMPAGESIZE != MCLBYTES + if (size <= MJUMPAGESIZE) + zone = zone_jumbop; + else +#endif + if (size <= MJUM9BYTES) + zone = zone_jumbo9; + else + zone = zone_jumbo16; + + n = uma_zalloc_arg(zone_jumbop, m, how); + if (n == NULL) { + uma_zfree(zone_mbuf, m); + return (NULL); + } + + return (m); +} + /* * m_getjcl() returns an mbuf with a cluster of the specified size attached. * For size it takes MCLBYTES, MJUMPAGESIZE, MJUM9BYTES, MJUM16BYTES. diff --git a/sys/net/bpf.c b/sys/net/bpf.c index ec05dd6d337b..ef7285241fdf 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -641,15 +641,7 @@ bpf_movein(struct uio *uio, int linktype, struct ifnet *ifp, struct mbuf **mp, if (len < hlen || len - hlen > ifp->if_mtu) return (EMSGSIZE); - /* Allocate a mbuf for our write, since m_get2 fails if len >= to MJUMPAGESIZE, use m_getjcl for bigger buffers */ - if (len < MJUMPAGESIZE) - m = m_get2(len, M_WAITOK, MT_DATA, M_PKTHDR); - else if (len <= MJUM9BYTES) - m = m_getjcl(M_WAITOK, MT_DATA, M_PKTHDR, MJUM9BYTES); - else if (len <= MJUM16BYTES) - m = m_getjcl(M_WAITOK, MT_DATA, M_PKTHDR, MJUM16BYTES); - else - m = NULL; + m = m_get3(len, M_WAITOK, MT_DATA, M_PKTHDR); if (m == NULL) return (EIO); m->m_pkthdr.len = m->m_len = len; diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index e37b872c74fe..b9211aaedc3c 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -828,6 +828,7 @@ u_int m_fixhdr(struct mbuf *); struct mbuf *m_fragment(struct mbuf *, int, int); void m_freem(struct mbuf *); struct mbuf *m_get2(int, int, short, int); +struct mbuf *m_get3(int, int, short, int); struct mbuf *m_getjcl(int, short, int, int); struct mbuf *m_getm2(struct mbuf *, int, int, short, int); struct mbuf *m_getptr(struct mbuf *, int, int *); — Kristof From owner-dev-commits-src-main@freebsd.org Fri Jul 2 13:49:15 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D479B66CEAD; Fri, 2 Jul 2021 13:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGbzH5jPSz4c9V; Fri, 2 Jul 2021 13:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 A817B1535C; Fri, 2 Jul 2021 13:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162DnFeR045398; Fri, 2 Jul 2021 13:49:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162DnF4N045397; Fri, 2 Jul 2021 13:49:15 GMT (envelope-from git) Date: Fri, 2 Jul 2021 13:49:15 GMT Message-Id: <202107021349.162DnF4N045397@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: d8d43b2de1fa - main - pf tests: Stress state retrieval 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/main X-Git-Reftype: branch X-Git-Commit: d8d43b2de1fa679179f7089cb3c31e6780ec82af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 13:49:15 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d8d43b2de1fa679179f7089cb3c31e6780ec82af commit d8d43b2de1fa679179f7089cb3c31e6780ec82af Author: Kristof Provost AuthorDate: 2021-06-28 10:48:20 +0000 Commit: Kristof Provost CommitDate: 2021-07-02 12:46:32 +0000 pf tests: Stress state retrieval Create and retrieve 20.000 states. There have been issues with nvlists causing very slow state retrieval. We don't impose a specific limit on the time required to retrieve the states, but do log it. In excessive cases the Kyua timeout will fail this test. Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30943 --- tests/sys/netpfil/common/Makefile | 2 + tests/sys/netpfil/common/pft_synflood.py | 62 ++++++++++++++++++++++++ tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/get_state.sh | 81 ++++++++++++++++++++++++++++++++ 4 files changed, 146 insertions(+) diff --git a/tests/sys/netpfil/common/Makefile b/tests/sys/netpfil/common/Makefile index f4d5fb2be3fc..749e0dd99469 100644 --- a/tests/sys/netpfil/common/Makefile +++ b/tests/sys/netpfil/common/Makefile @@ -17,8 +17,10 @@ ${PACKAGE}FILES+= \ utils.subr \ runner.subr \ pft_ping.py \ + pft_synflood.py \ sniffer.py ${PACKAGE}FILESMODE_pft_ping.py= 0555 +${PACKAGE}FILESMODE_pft_synflood.py= 0555 .include diff --git a/tests/sys/netpfil/common/pft_synflood.py b/tests/sys/netpfil/common/pft_synflood.py new file mode 100644 index 000000000000..3d37724593e2 --- /dev/null +++ b/tests/sys/netpfil/common/pft_synflood.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) +import scapy.all as sp + +def syn_flood(args): + s = sp.conf.L2socket(iface=args.sendif[0]) + + # Set a src mac, to avoid doing lookups which really slow us down. + ether = sp.Ether(src='01:02:03:04:05') + ip = sp.IP(dst=args.to[0]) + for i in range(int(args.count[0])): + tcp = sp.TCP(flags='S', sport=1+i, dport=22, seq=500+i) + pkt = ether / ip / tcp + s.send(pkt) + +def main(): + parser = argparse.ArgumentParser("pft_synflood.py", + description="SYN flooding tool") + parser.add_argument('--sendif', nargs=1, + required=True, + help='The interface through which the packet(s) will be sent') + parser.add_argument('--to', nargs=1, + required=True, + help='The destination IP address for the SYN packets') + parser.add_argument('--count', nargs=1, + required=True, + help='The number of packets to send') + + args = parser.parse_args() + + syn_flood(args) + +if __name__ == '__main__': + main() diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 8bbc498f38c5..2f92d835772b 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -11,6 +11,7 @@ ATF_TESTS_SH+= altq \ dup \ forward \ fragmentation \ + get_state \ icmp \ killstate \ map_e \ diff --git a/tests/sys/netpfil/pf/get_state.sh b/tests/sys/netpfil/pf/get_state.sh new file mode 100644 index 000000000000..5e6a9040e016 --- /dev/null +++ b/tests/sys/netpfil/pf/get_state.sh @@ -0,0 +1,81 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/utils.subr + +common_dir=$(atf_get_srcdir)/../common + +atf_test_case "many" "cleanup" +many_head() +{ + atf_set descr 'Test retrieving many states' + atf_set require.user root + atf_set require.progs scapy +} + +many_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + jexec alcatraz pfctl -e + + pft_set_rules alcatraz "set timeout tcp.closed 60000" \ + "pass in proto icmp" \ + "pass in proto tcp" + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 1 -W 1 192.0.2.2 + + # Now syn flood to create many states + ${common_dir}/pft_synflood.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --count 20000 + + count=$(time jexec alcatraz pfctl -ss | wc -l 2>time.txt) + echo "Found $count states in `cat time.txt`" + if [ $count -lt 20000 ]; + then + atf_fail "Fail to retrieve states" + fi +} + +many_cleanup() +{ + rm -f time.txt + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "many" +} From owner-dev-commits-src-main@freebsd.org Fri Jul 2 13:49:16 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E531E66C6F1; Fri, 2 Jul 2021 13:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGbzJ5lF0z4c7G; Fri, 2 Jul 2021 13:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 AC94714FF6; Fri, 2 Jul 2021 13:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162DnG34045422; Fri, 2 Jul 2021 13:49:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162DnGI1045421; Fri, 2 Jul 2021 13:49:16 GMT (envelope-from git) Date: Fri, 2 Jul 2021 13:49:16 GMT Message-Id: <202107021349.162DnGI1045421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 34285eefddc9 - main - pf: Reduce the data returned in DIOCGETSTATESNV 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/main X-Git-Reftype: branch X-Git-Commit: 34285eefddc99c994c3e5374ba7836cc7cfc8e2e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 13:49:17 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=34285eefddc99c994c3e5374ba7836cc7cfc8e2e commit 34285eefddc99c994c3e5374ba7836cc7cfc8e2e Author: Kristof Provost AuthorDate: 2021-06-29 08:26:40 +0000 Commit: Kristof Provost CommitDate: 2021-07-02 12:47:23 +0000 pf: Reduce the data returned in DIOCGETSTATESNV This call is particularly slow due to the large amount of data it returns. Remove all fields pfctl does not use. There is no functional impact to pfctl, but it somewhat speeds up the call. It might affect other (i.e. non-FreeBSD) code that uses the new interface, but this call is very new, so there's unlikely to be any. No releases contained the previous version, so we choose to live with the ABI modification. Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30944 --- lib/libpfctl/libpfctl.c | 22 ---------------------- lib/libpfctl/libpfctl.h | 12 ------------ sys/netpfil/pf/pf_nv.c | 34 +--------------------------------- 3 files changed, 1 insertion(+), 67 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 52cd0ed7f36c..524e2472238e 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -636,35 +636,15 @@ pfctl_nv_add_state_cmp(nvlist_t *nvl, const char *name, nvlist_destroy(nv); } -static void -pf_nvstate_scrub_to_state_scrub(const nvlist_t *nvl, - struct pfctl_state_scrub *scrub) -{ - bzero(scrub, sizeof(*scrub)); - - scrub->timestamp = nvlist_get_bool(nvl, "timestamp"); - scrub->ttl = nvlist_get_number(nvl, "ttl"); - scrub->ts_mod = nvlist_get_number(nvl, "ts_mod"); -} - static void pf_nvstate_peer_to_state_peer(const nvlist_t *nvl, struct pfctl_state_peer *peer) { bzero(peer, sizeof(*peer)); - if (nvlist_exists_nvlist(nvl, "scrub")) { - peer->scrub = malloc(sizeof(*peer->scrub)); - pf_nvstate_scrub_to_state_scrub( - nvlist_get_nvlist(nvl, "scrub"), - peer->scrub); - } - peer->seqlo = nvlist_get_number(nvl, "seqlo"); peer->seqhi = nvlist_get_number(nvl, "seqhi"); peer->seqdiff = nvlist_get_number(nvl, "seqdiff"); - peer->max_win = nvlist_get_number(nvl, "max_win"); - peer->mss = nvlist_get_number(nvl, "mss"); peer->state = nvlist_get_number(nvl, "state"); peer->wscale = nvlist_get_number(nvl, "wscale"); } @@ -721,9 +701,7 @@ pf_nvstate_to_state(const nvlist_t *nvl, struct pfctl_state *s) pf_nvuint_64_array(nvl, "packets", 2, s->packets, NULL); pf_nvuint_64_array(nvl, "bytes", 2, s->bytes, NULL); - s->log = nvlist_get_number(nvl, "log"); s->state_flags = nvlist_get_number(nvl, "state_flags"); - s->timeout = nvlist_get_number(nvl, "timeout"); s->sync_flags = nvlist_get_number(nvl, "sync_flags"); } diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index a54ee9db6ec7..62866e17f904 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -197,19 +197,10 @@ struct pfctl_kill { bool kill_match; }; -struct pfctl_state_scrub { - bool timestamp; - uint8_t ttl; - uint32_t ts_mod; -}; - struct pfctl_state_peer { - struct pfctl_state_scrub *scrub; uint32_t seqlo; uint32_t seqhi; uint32_t seqdiff; - uint16_t max_win; - uint16_t mss; uint8_t state; uint8_t wscale; }; @@ -243,10 +234,7 @@ struct pfctl_state { uint32_t creation; uint32_t expire; uint32_t pfsync_time; - uint16_t tag; - uint8_t log; uint8_t state_flags; - uint8_t timeout; uint32_t sync_flags; }; diff --git a/sys/netpfil/pf/pf_nv.c b/sys/netpfil/pf/pf_nv.c index 553290c88586..e52d52642eab 100644 --- a/sys/netpfil/pf/pf_nv.c +++ b/sys/netpfil/pf/pf_nv.c @@ -874,52 +874,22 @@ errout: return (NULL); } -static nvlist_t * -pf_state_scrub_to_nvstate_scrub(const struct pf_state_scrub *scrub) -{ - nvlist_t *nvl; - - nvl = nvlist_create(0); - if (nvl == NULL) - return (NULL); - - nvlist_add_bool(nvl, "timestamp", scrub->pfss_flags & PFSS_TIMESTAMP); - nvlist_add_number(nvl, "ttl", scrub->pfss_ttl); - nvlist_add_number(nvl, "ts_mod", scrub->pfss_ts_mod); - - return (nvl); -} - static nvlist_t * pf_state_peer_to_nvstate_peer(const struct pf_state_peer *peer) { - nvlist_t *nvl, *tmp; + nvlist_t *nvl; nvl = nvlist_create(0); if (nvl == NULL) return (NULL); - if (peer->scrub) { - tmp = pf_state_scrub_to_nvstate_scrub(peer->scrub); - if (tmp == NULL) - goto errout; - nvlist_add_nvlist(nvl, "scrub", tmp); - nvlist_destroy(tmp); - } - nvlist_add_number(nvl, "seqlo", peer->seqlo); nvlist_add_number(nvl, "seqhi", peer->seqhi); nvlist_add_number(nvl, "seqdiff", peer->seqdiff); - nvlist_add_number(nvl, "max_win", peer->max_win); - nvlist_add_number(nvl, "mss", peer->mss); nvlist_add_number(nvl, "state", peer->state); nvlist_add_number(nvl, "wscale", peer->wscale); return (nvl); - -errout: - nvlist_destroy(nvl); - return (NULL); } nvlist_t * @@ -989,9 +959,7 @@ pf_state_to_nvstate(const struct pf_state *s) nvlist_add_number(nvl, "creatorid", s->creatorid); nvlist_add_number(nvl, "direction", s->direction); - nvlist_add_number(nvl, "log", s->log); nvlist_add_number(nvl, "state_flags", s->state_flags); - nvlist_add_number(nvl, "timeout", s->timeout); if (s->src_node) flags |= PFSYNC_FLAG_SRCNODE; if (s->nat_src_node) From owner-dev-commits-src-main@freebsd.org Fri Jul 2 13:49:18 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AFD066D2C7; Fri, 2 Jul 2021 13:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGbzL1yyRz4cFZ; Fri, 2 Jul 2021 13:49:18 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 D863E154B4; Fri, 2 Jul 2021 13:49:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162DnHRb045446; Fri, 2 Jul 2021 13:49:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162DnHE5045445; Fri, 2 Jul 2021 13:49:17 GMT (envelope-from git) Date: Fri, 2 Jul 2021 13:49:17 GMT Message-Id: <202107021349.162DnHE5045445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a19ff8ce9b58 - main - pf: getstates: avoid taking the hashrow lock if the row is empty 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/main X-Git-Reftype: branch X-Git-Commit: a19ff8ce9b58548a5f965db2c46eb03c38b15edb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 13:49:18 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a19ff8ce9b58548a5f965db2c46eb03c38b15edb commit a19ff8ce9b58548a5f965db2c46eb03c38b15edb Author: Kristof Provost AuthorDate: 2021-06-29 09:34:49 +0000 Commit: Kristof Provost CommitDate: 2021-07-02 12:47:54 +0000 pf: getstates: avoid taking the hashrow lock if the row is empty Reviewed by: mjg MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30946 --- sys/netpfil/pf/pf_ioctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index a802780277aa..9acfe56b7208 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -5054,6 +5054,10 @@ pf_getstates(struct pfioc_nv *nv) for (int i = 0; i < pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; + /* Avoid taking the lock if there are no states in the row. */ + if (LIST_EMPTY(&ih->states)) + continue; + PF_HASHROW_LOCK(ih); LIST_FOREACH(s, &ih->states, entry) { if (s->timeout == PFTM_UNLINKED) From owner-dev-commits-src-main@freebsd.org Fri Jul 2 13:49:19 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6DA5366D199; Fri, 2 Jul 2021 13:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGbzM1crTz4c7W; Fri, 2 Jul 2021 13:49:19 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0AE631524F; Fri, 2 Jul 2021 13:49:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162DnIWE045477; Fri, 2 Jul 2021 13:49:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162DnIrX045476; Fri, 2 Jul 2021 13:49:18 GMT (envelope-from git) Date: Fri, 2 Jul 2021 13:49:18 GMT Message-Id: <202107021349.162DnIrX045476@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 0e9f1892ec73 - main - libpfctl: memory leak fix 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/main X-Git-Reftype: branch X-Git-Commit: 0e9f1892ec739d7fbd854af699507167a0a5dde2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 13:49:19 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0e9f1892ec739d7fbd854af699507167a0a5dde2 commit 0e9f1892ec739d7fbd854af699507167a0a5dde2 Author: Kristof Provost AuthorDate: 2021-06-30 11:02:35 +0000 Commit: Kristof Provost CommitDate: 2021-07-02 12:48:25 +0000 libpfctl: memory leak fix We must remember to free the nvlist we create from the kernel's response to DIOCGETSTATESNV, on every iteration. Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30957 --- lib/libpfctl/libpfctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 524e2472238e..bbb53edf8bc1 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -727,6 +727,7 @@ pfctl_get_states(int dev, struct pfctl_states *states) goto out; } + nvlist_destroy(nvl); nvl = nvlist_unpack(nv.data, nv.len, 0); if (nvl == NULL) { error = EIO; From owner-dev-commits-src-main@freebsd.org Fri Jul 2 18:43:25 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0392E670EA5; Fri, 2 Jul 2021 18:43: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGkVh6VnJz3LgN; Fri, 2 Jul 2021 18:43:24 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C78A0192E4; Fri, 2 Jul 2021 18:43:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162IhOmV044931; Fri, 2 Jul 2021 18:43:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162IhOQ1044930; Fri, 2 Jul 2021 18:43:24 GMT (envelope-from git) Date: Fri, 2 Jul 2021 18:43:24 GMT Message-Id: <202107021843.162IhOQ1044930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: db6eac682189 - main - nvmem(9): install the manpage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db6eac6821895ae57b25953146a14232503fd397 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 18:43:25 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=db6eac6821895ae57b25953146a14232503fd397 commit db6eac6821895ae57b25953146a14232503fd397 Author: Ceri Davies AuthorDate: 2021-07-02 18:35:59 +0000 Commit: Ceri Davies CommitDate: 2021-07-02 18:43:02 +0000 nvmem(9): install the manpage This is being installed on all architectures in line with the OF_* pages. Discussed with: fernape, manu --- share/man/man9/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 19da0a012912..ac4cf67f52f7 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -228,6 +228,7 @@ MAN= accept_filter.9 \ namei.9 \ netisr.9 \ nv.9 \ + nvmem.9 \ OF_child.9 \ OF_device_from_xref.9 \ OF_finddevice.9 \ From owner-dev-commits-src-main@freebsd.org Fri Jul 2 18:43:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23686671004; Fri, 2 Jul 2021 18:43: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGkVk0Pdtz3M8d; Fri, 2 Jul 2021 18:43:26 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 E9F6A19271; Fri, 2 Jul 2021 18:43:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162IhPoe044963; Fri, 2 Jul 2021 18:43:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162IhPvS044962; Fri, 2 Jul 2021 18:43:25 GMT (envelope-from git) Date: Fri, 2 Jul 2021 18:43:25 GMT Message-Id: <202107021843.162IhPvS044962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: 202edfe35798 - main - committers-doc.dot: move myself out of alumni MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 202edfe3579850683bb8093c6ef83033836d55aa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 18:43:26 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=202edfe3579850683bb8093c6ef83033836d55aa commit 202edfe3579850683bb8093c6ef83033836d55aa Author: Ceri Davies AuthorDate: 2021-07-02 18:42:14 +0000 Commit: Ceri Davies CommitDate: 2021-07-02 18:43:02 +0000 committers-doc.dot: move myself out of alumni --- share/misc/committers-doc.dot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/misc/committers-doc.dot b/share/misc/committers-doc.dot index a4e76cddd9ed..4cb33ba7a875 100644 --- a/share/misc/committers-doc.dot +++ b/share/misc/committers-doc.dot @@ -32,7 +32,6 @@ node [color=grey62, style=filled, bgcolor=black]; ache [label="Andrey Chernov\nache@FreeBSD.org\n1997/06/13\n2010/12/11"] bmah [label="Bruce A. Mah\nbmah@FreeBSD.org\n2000/08/22\n2009/09/13"] bvs [label="Vitaly Bogdanov\nbvs@FreeBSD.org\n2005/10/03\n2010/12/11"] -ceri [label="Ceri Davies\nceri@FreeBSD.org\n2002/03/17\n2012/02/29"] den [label="Denis Peplin\nden@FreeBSD.org\n2003/09/13\n2009/07/09"] garys [label="Gary W. Swearingen\ngarys@FreeBSD.org\n2005/08/21\n2008/03/02"] jcamou [label="Jesus R. Camou\njcamou@FreeBSD.org\n2005/03/02\n2008/12/20"] @@ -59,6 +58,7 @@ blackend [label="Marc Fonvieille\nblackend@FreeBSD.org\n2002/06/16"] brd [label="Brad Davis\nbrd@FreeBSD.org\n2005/06/01"] brueffer [label="Christian Brueffer\nbrueffer@FreeBSD.org\n2003/01/13"] carlavilla [label="Sergio Carlavilla\ncarlavilla@FreeBSD.org\n2019/05/16"] +ceri [label="Ceri Davies\nceri@FreeBSD.org\n2002/03/17"] chinsan [label="Chinsan Huang\nchinsan@FreeBSD.org\n2006/09/20"] crees [label="Chris Rees\ncrees@FreeBSD.org\n2013/05/27"] danger [label="Daniel Gerzo\ndanger@FreeBSD.org\n2006/08/20"] @@ -127,6 +127,7 @@ bcr -> gbe bcr -> debdrup blackend -> ale +blackend -> ceri brueffer -> joel From owner-dev-commits-src-main@freebsd.org Fri Jul 2 22:05:37 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0499867358E; Fri, 2 Jul 2021 22:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGq006X6Kz4VQt; Fri, 2 Jul 2021 22:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 BB2D51BDD8; Fri, 2 Jul 2021 22:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162M5aR4010231; Fri, 2 Jul 2021 22:05:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162M5aRk010230; Fri, 2 Jul 2021 22:05:36 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:05:36 GMT Message-Id: <202107022205.162M5aRk010230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 80a75155e160 - main - nvme: style nit 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/main X-Git-Reftype: branch X-Git-Commit: 80a75155e1601bddc2c595c06ab6ea916c603071 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:05:37 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=80a75155e1601bddc2c595c06ab6ea916c603071 commit 80a75155e1601bddc2c595c06ab6ea916c603071 Author: Warner Losh AuthorDate: 2021-07-02 21:58:14 +0000 Commit: Warner Losh CommitDate: 2021-07-02 22:05:19 +0000 nvme: style nit Put the { on the same line as the struct nvme_foo when we define these structures. It's FreeBSD standard and these were inconsistent. Sponsored by: Netflix --- sys/dev/nvme/nvme.h | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index b28a8d4348db..d63a074f321d 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -546,8 +546,7 @@ enum shst_value { NVME_SHST_COMPLETE = 0x2, }; -struct nvme_registers -{ +struct nvme_registers { uint32_t cap_lo; /* controller capabilities */ uint32_t cap_hi; uint32_t vs; /* version */ @@ -584,8 +583,7 @@ struct nvme_registers _Static_assert(sizeof(struct nvme_registers) == 0x1008, "bad size for nvme_registers"); -struct nvme_command -{ +struct nvme_command { /* dword 0 */ uint8_t opc; /* opcode */ uint8_t fuse; /* fused operation */ @@ -1446,8 +1444,7 @@ struct nvme_sanitize_status_page { _Static_assert(sizeof(struct nvme_sanitize_status_page) == 512, "bad size for nvme_sanitize_status_page"); -struct intel_log_temp_stats -{ +struct intel_log_temp_stats { uint64_t current; uint64_t overtemp_flag_last; uint64_t overtemp_flag_life; @@ -1461,8 +1458,7 @@ struct intel_log_temp_stats _Static_assert(sizeof(struct intel_log_temp_stats) == 13 * 8, "bad size for intel_log_temp_stats"); -struct nvme_resv_reg_ctrlr -{ +struct nvme_resv_reg_ctrlr { uint16_t ctrlr_id; /* Controller ID */ uint8_t rcsts; /* Reservation Status */ uint8_t reserved3[5]; @@ -1472,8 +1468,7 @@ struct nvme_resv_reg_ctrlr _Static_assert(sizeof(struct nvme_resv_reg_ctrlr) == 24, "bad size for nvme_resv_reg_ctrlr"); -struct nvme_resv_reg_ctrlr_ext -{ +struct nvme_resv_reg_ctrlr_ext { uint16_t ctrlr_id; /* Controller ID */ uint8_t rcsts; /* Reservation Status */ uint8_t reserved3[5]; @@ -1484,8 +1479,7 @@ struct nvme_resv_reg_ctrlr_ext _Static_assert(sizeof(struct nvme_resv_reg_ctrlr_ext) == 64, "bad size for nvme_resv_reg_ctrlr_ext"); -struct nvme_resv_status -{ +struct nvme_resv_status { uint32_t gen; /* Generation */ uint8_t rtype; /* Reservation Type */ uint8_t regctl[2]; /* Number of Registered Controllers */ @@ -1497,8 +1491,7 @@ struct nvme_resv_status _Static_assert(sizeof(struct nvme_resv_status) == 24, "bad size for nvme_resv_status"); -struct nvme_resv_status_ext -{ +struct nvme_resv_status_ext { uint32_t gen; /* Generation */ uint8_t rtype; /* Reservation Type */ uint8_t regctl[2]; /* Number of Registered Controllers */ From owner-dev-commits-src-main@freebsd.org Fri Jul 2 22:05:38 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 33B44673590; Fri, 2 Jul 2021 22:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGq0208rCz4Vdl; Fri, 2 Jul 2021 22:05:38 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 DD7F41BDD9; Fri, 2 Jul 2021 22:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162M5bnL010255; Fri, 2 Jul 2021 22:05:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162M5b87010254; Fri, 2 Jul 2021 22:05:37 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:05:37 GMT Message-Id: <202107022205.162M5b87010254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: fea3cf1d6da0 - main - nvme: Fix alignment on nvme structures 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/main X-Git-Reftype: branch X-Git-Commit: fea3cf1d6da0acf40bc1d3dadeeea7eeccbc10dd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:05:38 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fea3cf1d6da0acf40bc1d3dadeeea7eeccbc10dd commit fea3cf1d6da0acf40bc1d3dadeeea7eeccbc10dd Author: Warner Losh AuthorDate: 2021-07-02 21:58:19 +0000 Commit: Warner Losh CommitDate: 2021-07-02 22:05:19 +0000 nvme: Fix alignment on nvme structures Remove __packed from nvme_command, nvme_completion and nvme_dsm_trim. Add super-alignment to nvme_completion since it's always at least that aligned in hardware (and in our existing uses of it embedded in structures). It generates better code in nvme_qpair_process_completions on riscv64 because otherwise the ABI assumes a 4-byte alignment, and the same on all other platforms. Reviewed by: jrtc27@, mav@, chuck@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31001 --- sys/dev/nvme/nvme.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index d63a074f321d..7d153c61165c 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -578,8 +578,8 @@ struct nvme_registers { struct { uint32_t sq_tdbl; /* submission queue tail doorbell */ uint32_t cq_hdbl; /* completion queue head doorbell */ - } doorbell[1] __packed; -} __packed; + } doorbell[1]; +}; _Static_assert(sizeof(struct nvme_registers) == 0x1008, "bad size for nvme_registers"); @@ -612,7 +612,7 @@ struct nvme_command { uint32_t cdw13; /* command-specific */ uint32_t cdw14; /* command-specific */ uint32_t cdw15; /* command-specific */ -} __packed; +}; _Static_assert(sizeof(struct nvme_command) == 16 * 4, "bad size for nvme_command"); @@ -630,7 +630,7 @@ struct nvme_completion { /* dword 3 */ uint16_t cid; /* command identifier */ uint16_t status; -} __packed; +} __aligned(8); /* riscv: nvme_qpair_process_completions has better code gen */ _Static_assert(sizeof(struct nvme_completion) == 4 * 4, "bad size for nvme_completion"); @@ -638,7 +638,7 @@ struct nvme_dsm_range { uint32_t attributes; uint32_t length; uint64_t starting_lba; -} __packed; +}; /* Largest DSM Trim that can be done */ #define NVME_MAX_DSM_TRIM 4096 From owner-dev-commits-src-main@freebsd.org Fri Jul 2 22:05:39 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60D2A673299; Fri, 2 Jul 2021 22:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGq0323Qyz4Vbf; Fri, 2 Jul 2021 22:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 154631BEBD; Fri, 2 Jul 2021 22:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162M5c68010286; Fri, 2 Jul 2021 22:05:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162M5cbP010285; Fri, 2 Jul 2021 22:05:38 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:05:38 GMT Message-Id: <202107022205.162M5cbP010285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: aa0ab681ae75 - main - nvme: coherently read status of completion records 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/main X-Git-Reftype: branch X-Git-Commit: aa0ab681ae755e01cd69435fab50f6852f248c42 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:05:39 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=aa0ab681ae755e01cd69435fab50f6852f248c42 commit aa0ab681ae755e01cd69435fab50f6852f248c42 Author: Warner Losh AuthorDate: 2021-07-02 22:00:42 +0000 Commit: Warner Losh CommitDate: 2021-07-02 22:05:19 +0000 nvme: coherently read status of completion records Coherently read the phase bit of the status completion record. We loop over the completion record array, looking for all the transactions in the same phase that have been completed. In doing that, we have to be careful to read the status field first, and if it indicates a complete record, we need to read and process that record. Otherwise, the host might be overtaken by device when reading this completion record, leading to a mistaken belief that the record is in phase. This leads to the code using old values and looking at an already completed entry, which has no current tracker. To work around this problem, we read the status and make sure it is in phase, we then re-read the entire completion record guaranteeing it's complete, valid, and consistent . In addition we resync the dmatag to reflect changes since the prior loop for the bouncing dma case. Reviewed by: jrtc27@, chuck@ Found by: jrtc27 (this fix is based in part on her D30995 fix) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31002 --- sys/dev/nvme/nvme_qpair.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 0726ca248442..12770f38d42e 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -583,13 +583,30 @@ nvme_qpair_process_completions(struct nvme_qpair *qpair) } while (1) { - cpl = qpair->cpl[qpair->cq_head]; + uint16_t status; - /* Convert to host endian */ + /* + * We need to do this dance to avoid a race between the host and + * the device where the device overtakes the host while the host + * is reading this record, leaving the status field 'new' and + * the sqhd and cid fields potentially stale. If the phase + * doesn't match, that means status hasn't yet been updated and + * we'll get any pending changes next time. It also means that + * the phase must be the same the second time. We have to sync + * before reading to ensure any bouncing completes. + */ + status = le16toh(qpair->cpl[qpair->cq_head].status); + if (NVME_STATUS_GET_P(status) != qpair->phase) + break; + + bus_dmamap_sync(qpair->dma_tag, qpair->queuemem_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + cpl = qpair->cpl[qpair->cq_head]; nvme_completion_swapbytes(&cpl); - if (NVME_STATUS_GET_P(cpl.status) != qpair->phase) - break; + KASSERT( + NVME_STATUS_GET_P(status) == NVME_STATUS_GET_P(cpl.status), + ("Phase unexpectedly inconsistent")); tr = qpair->act_tr[cpl.cid]; From owner-dev-commits-src-main@freebsd.org Fri Jul 2 22:24:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D38B673A85; Fri, 2 Jul 2021 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGqPn1kVlz4Wff; Fri, 2 Jul 2021 22:24:29 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 221571C1D7; Fri, 2 Jul 2021 22:24:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162MOTLb037057; Fri, 2 Jul 2021 22:24:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162MOT6I037056; Fri, 2 Jul 2021 22:24:29 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:24:29 GMT Message-Id: <202107022224.162MOT6I037056@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: dc3548453689 - main - dumpfs(8): add option to only print superblock information MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc3548453689b30ad712e4391a99d3e7df0cad40 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:24:29 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=dc3548453689b30ad712e4391a99d3e7df0cad40 commit dc3548453689b30ad712e4391a99d3e7df0cad40 Author: Robert Wing AuthorDate: 2021-07-02 22:18:17 +0000 Commit: Robert Wing CommitDate: 2021-07-02 22:18:17 +0000 dumpfs(8): add option to only print superblock information Add an option to dumpfs, `-s`, that only prints the super block information. Reviewed by: chs, imp Differential Revision: https://reviews.freebsd.org/D30881 --- sbin/dumpfs/dumpfs.8 | 12 +++++++++--- sbin/dumpfs/dumpfs.c | 17 +++++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/sbin/dumpfs/dumpfs.8 b/sbin/dumpfs/dumpfs.8 index 5938282cc257..ec5b12550447 100644 --- a/sbin/dumpfs/dumpfs.8 +++ b/sbin/dumpfs/dumpfs.8 @@ -28,7 +28,7 @@ .\" @(#)dumpfs.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 16, 2013 +.Dd July 2, 2021 .Dt DUMPFS 8 .Os .Sh NAME @@ -39,6 +39,7 @@ .Op Fl f .Op Fl l .Op Fl m +.Op Fl s .Ar filesys | device .Sh DESCRIPTION The @@ -46,9 +47,10 @@ The utility prints out the UFS super block and cylinder group information for the file system or special device specified, unless the .Fl f , -.Fl l +.Fl l , +.Fl m , or -.Fl m +.Fl s flag is specified. The listing is very long and detailed. This @@ -97,6 +99,10 @@ The .Fl r flag is needed if the filesystem uses .Xr gjournal 8 . +.Pp +If +.Fl s +is specified, only the super block information is printed. .Sh SEE ALSO .Xr fs 5 , .Xr fsck 8 , diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 3ac59ccc0875..7c43cf4489a8 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -81,7 +81,7 @@ static const char rcsid[] = static struct uufsd disk; -static int dumpfs(const char *); +static int dumpfs(const char *, int); static int dumpfsid(void); static int dumpcg(void); static int dumpfreespace(const char *, int); @@ -96,11 +96,11 @@ int main(int argc, char *argv[]) { const char *name; - int ch, dofreespace, domarshal, dolabel, eval; + int ch, dofreespace, domarshal, dolabel, dosb, eval; - dofreespace = domarshal = dolabel = eval = 0; + dofreespace = domarshal = dolabel = dosb = eval = 0; - while ((ch = getopt(argc, argv, "lfm")) != -1) { + while ((ch = getopt(argc, argv, "lfms")) != -1) { switch (ch) { case 'f': dofreespace++; @@ -111,6 +111,9 @@ main(int argc, char *argv[]) case 'l': dolabel = 1; break; + case 's': + dosb = 1; + break; case '?': default: usage(); @@ -139,7 +142,7 @@ main(int argc, char *argv[]) else if (dolabel) eval |= dumpfsid(); else - eval |= dumpfs(name); + eval |= dumpfs(name, dosb); ufs_disk_close(&disk); } exit(eval); @@ -154,7 +157,7 @@ dumpfsid(void) } static int -dumpfs(const char *name) +dumpfs(const char *name, int dosb) { time_t fstime, fsmtime; int64_t fssize; @@ -324,6 +327,8 @@ dumpfs(const char *name) printf("blocks in last group %ld\n\n", (long)((fssize % afs.fs_fpg) / afs.fs_frag)); } + if (dosb) + return (0); while ((i = cgread(&disk)) != 0) { if (i == -1 || dumpcg()) goto err; From owner-dev-commits-src-main@freebsd.org Fri Jul 2 22:32:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3A48673C80; Fri, 2 Jul 2021 22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGqb26Y01z4XYw; Fri, 2 Jul 2021 22:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 CA1751C706; Fri, 2 Jul 2021 22:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162MWUCG049890; Fri, 2 Jul 2021 22:32:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162MWUIY049889; Fri, 2 Jul 2021 22:32:30 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:32:30 GMT Message-Id: <202107022232.162MWUIY049889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 25392fac9488 - main - libalias: Fix splay comparsion bug MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25392fac9488bcae5c451500df2e2945430484a6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:32:31 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=25392fac9488bcae5c451500df2e2945430484a6 commit 25392fac9488bcae5c451500df2e2945430484a6 Author: Lutz Donnerhacke AuthorDate: 2021-07-02 21:41:25 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-07-02 22:31:53 +0000 libalias: Fix splay comparsion bug Comparing elements in a tree requires transitiviy. If a < b and b < c then a must be smaller than c. This way the tree elements are always pairwise comparable. Tristate comparsion functions returning values lower, equal, or greater than zero, are usually implemented by a simple subtraction of the operands. If the size of the operands are equal to the size of the result, integer modular arithmetics kick in and violates the transitivity. Example: Working on byte with 0, 120, and 240. Now computing the differences: 120 - 0 = 120 240 - 120 = 120 240 - 0 = -16 MFC after: 3 days --- sys/netinet/libalias/alias_db.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/netinet/libalias/alias_db.h b/sys/netinet/libalias/alias_db.h index ec0b69c01f82..971ca305c1a6 100644 --- a/sys/netinet/libalias/alias_db.h +++ b/sys/netinet/libalias/alias_db.h @@ -351,10 +351,10 @@ static inline int cmp_out(struct alias_link *a, struct alias_link *b) { int i = a->src_port - b->src_port; if (i != 0) return (i); - i = a->src_addr.s_addr - b->src_addr.s_addr; - if (i != 0) return (i); - i = a->dst_addr.s_addr - b->dst_addr.s_addr; - if (i != 0) return (i); + if (a->src_addr.s_addr > b->src_addr.s_addr) return (1); + if (a->src_addr.s_addr < b->src_addr.s_addr) return (-1); + if (a->dst_addr.s_addr > b->dst_addr.s_addr) return (1); + if (a->dst_addr.s_addr < b->dst_addr.s_addr) return (-1); i = a->dst_port - b->dst_port; if (i != 0) return (i); i = a->link_type - b->link_type; @@ -368,8 +368,9 @@ cmp_in(struct group_in *a, struct group_in *b) { if (i != 0) return (i); i = a->link_type - b->link_type; if (i != 0) return (i); - i = a->alias_addr.s_addr - b->alias_addr.s_addr; - return (i); + if (a->alias_addr.s_addr > b->alias_addr.s_addr) return (1); + if (a->alias_addr.s_addr < b->alias_addr.s_addr) return (-1); + return (0); } SPLAY_PROTOTYPE(splay_in, group_in, in, cmp_in); From owner-dev-commits-src-main@freebsd.org Fri Jul 2 22:32:32 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 316436732FC; Fri, 2 Jul 2021 22:32: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGqb40kylz4XC2; Fri, 2 Jul 2021 22:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 ECE101C707; Fri, 2 Jul 2021 22:32:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162MWVv0049914; Fri, 2 Jul 2021 22:32:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162MWVH3049913; Fri, 2 Jul 2021 22:32:31 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:32:31 GMT Message-Id: <202107022232.162MWVH3049913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: b3dc6f137b8d - main - tests/libalias: Bugfix in used variables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3dc6f137b8d626c4415a5fa9c9874ac4ca78658 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:32:32 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=b3dc6f137b8d626c4415a5fa9c9874ac4ca78658 commit b3dc6f137b8d626c4415a5fa9c9874ac4ca78658 Author: Lutz Donnerhacke AuthorDate: 2021-07-02 21:58:16 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-07-02 22:31:54 +0000 tests/libalias: Bugfix in used variables Fix two copy and waste errors (referencing the wrong variable). MFC after: 3 days --- tests/sys/netinet/libalias/3_natin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/netinet/libalias/3_natin.c b/tests/sys/netinet/libalias/3_natin.c index e8e5257e4baa..3bc088ce3da9 100644 --- a/tests/sys/netinet/libalias/3_natin.c +++ b/tests/sys/netinet/libalias/3_natin.c @@ -112,7 +112,7 @@ ATF_TC_BODY(1_portforward, dummy) LibAliasSetAddress(la, masq); /* delete and try again */ - LibAliasRedirectDelete(la, pf2); + LibAliasRedirectDelete(la, pf3); UDP_UNNAT_FAIL(p, u, ext, 0x5678, masq, 0xabcd); /* @@ -133,7 +133,7 @@ ATF_TC_BODY(1_portforward, dummy) LibAliasSetAddress(la, masq); /* delete and try again */ - LibAliasRedirectDelete(la, pf2); + LibAliasRedirectDelete(la, pf4); UDP_UNNAT_FAIL(p, u, ext, 0x5678, masq, 0xabcd); free(p); From owner-dev-commits-src-main@freebsd.org Fri Jul 2 22:36:20 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AE1A673C9F; Fri, 2 Jul 2021 22:36: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGqgS3kl7z4XJJ; Fri, 2 Jul 2021 22:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 688A21C709; Fri, 2 Jul 2021 22:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162MaKhI050352; Fri, 2 Jul 2021 22:36:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162MaKva050351; Fri, 2 Jul 2021 22:36:20 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:36:20 GMT Message-Id: <202107022236.162MaKva050351@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 5866c369e4fd - main - Revert libunwind change to fix backtrace segfault on aarch64 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/main X-Git-Reftype: branch X-Git-Commit: 5866c369e4fd917c0d456f0f10b92ee354b82279 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:36:20 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5866c369e4fd917c0d456f0f10b92ee354b82279 commit 5866c369e4fd917c0d456f0f10b92ee354b82279 Author: Dimitry Andric AuthorDate: 2021-07-02 22:35:42 +0000 Commit: Dimitry Andric CommitDate: 2021-07-02 22:35:49 +0000 Revert libunwind change to fix backtrace segfault on aarch64 Revert commit 22b615a96593 from llvm git (by Daniel Kiss): [libunwind] Support for leaf function unwinding. Unwinding leaf function is useful in cases when the backtrace finds a leaf function for example when it caused a signal. This patch also add the support for the DW_CFA_undefined because it marks the end of the frames. Ryan Prichard provided code for the tests. Reviewed By: #libunwind, mstorsjo Differential Revision: https://reviews.llvm.org/D83573 Reland with limit the test to the x86_64-linux target. Bisection has shown that this particular upstream commit causes programs using backtrace(3) on aarch64 to segfault. This affects the lang/rust port, for instance. Until we can upstream to fix this problem, revert the commit for now. Reported by: mikael PR: 256864 --- contrib/llvm-project/libunwind/src/DwarfInstructions.hpp | 9 +-------- contrib/llvm-project/libunwind/src/DwarfParser.hpp | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/contrib/llvm-project/libunwind/src/DwarfInstructions.hpp b/contrib/llvm-project/libunwind/src/DwarfInstructions.hpp index c39cabe1f783..ee98f538d437 100644 --- a/contrib/llvm-project/libunwind/src/DwarfInstructions.hpp +++ b/contrib/llvm-project/libunwind/src/DwarfInstructions.hpp @@ -93,8 +93,7 @@ typename A::pint_t DwarfInstructions::getSavedRegister( case CFI_Parser::kRegisterInRegister: return registers.getRegister((int)savedReg.value); - case CFI_Parser::kRegisterUndefined: - return 0; + case CFI_Parser::kRegisterUnused: case CFI_Parser::kRegisterOffsetFromCFA: // FIX ME @@ -118,7 +117,6 @@ double DwarfInstructions::getSavedFloatRegister( case CFI_Parser::kRegisterIsExpression: case CFI_Parser::kRegisterUnused: - case CFI_Parser::kRegisterUndefined: case CFI_Parser::kRegisterOffsetFromCFA: case CFI_Parser::kRegisterInRegister: // FIX ME @@ -142,7 +140,6 @@ v128 DwarfInstructions::getSavedVectorRegister( case CFI_Parser::kRegisterIsExpression: case CFI_Parser::kRegisterUnused: - case CFI_Parser::kRegisterUndefined: case CFI_Parser::kRegisterOffsetFromCFA: case CFI_Parser::kRegisterInRegister: // FIX ME @@ -193,10 +190,6 @@ int DwarfInstructions::stepWithDwarf(A &addressSpace, pint_t pc, prolog.savedRegisters[i])); else return UNW_EBADREG; - } else if (i == (int)cieInfo.returnAddressRegister) { - // Leaf function keeps the return address in register and there is no - // explicit intructions how to restore it. - returnAddress = registers.getRegister(cieInfo.returnAddressRegister); } } diff --git a/contrib/llvm-project/libunwind/src/DwarfParser.hpp b/contrib/llvm-project/libunwind/src/DwarfParser.hpp index de0eb6de9d70..b41cc7bcfda2 100644 --- a/contrib/llvm-project/libunwind/src/DwarfParser.hpp +++ b/contrib/llvm-project/libunwind/src/DwarfParser.hpp @@ -69,7 +69,6 @@ public: }; enum RegisterSavedWhere { kRegisterUnused, - kRegisterUndefined, kRegisterInCFA, kRegisterOffsetFromCFA, kRegisterInRegister, @@ -503,7 +502,7 @@ bool CFI_Parser::parseFDEInstructions(A &addressSpace, "malformed DW_CFA_undefined DWARF unwind, reg too big"); return false; } - results->setRegisterLocation(reg, kRegisterUndefined, initialState); + results->setRegisterLocation(reg, kRegisterUnused, initialState); _LIBUNWIND_TRACE_DWARF("DW_CFA_undefined(reg=%" PRIu64 ")\n", reg); break; case DW_CFA_same_value: From owner-dev-commits-src-main@freebsd.org Fri Jul 2 23:09:28 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 214F8673ED9; Fri, 2 Jul 2021 23:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGrPh09mnz4ZV7; Fri, 2 Jul 2021 23:09:28 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 DE2EB1CB2A; Fri, 2 Jul 2021 23:09:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162N9ReK090775; Fri, 2 Jul 2021 23:09:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162N9RPj090774; Fri, 2 Jul 2021 23:09:27 GMT (envelope-from git) Date: Fri, 2 Jul 2021 23:09:27 GMT Message-Id: <202107022309.162N9RPj090774@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: b50a4dce1854 - main - libalias: Avoid uninitialized expiration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b50a4dce185481bebf8096c27588ae04a4a2fd7c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 23:09:28 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=b50a4dce185481bebf8096c27588ae04a4a2fd7c commit b50a4dce185481bebf8096c27588ae04a4a2fd7c Author: Lutz Donnerhacke AuthorDate: 2021-07-02 23:02:53 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-07-02 23:09:18 +0000 libalias: Avoid uninitialized expiration The expiration time of direct address mappings is explicitly uninitialized. Expire times are always compared during housekeeping. Despite the uninitialized value does not harm, it's simpler to just set it to a reasonable default. This was detected during valgrinding the test suite. MFC after: 3 days --- sys/netinet/libalias/alias_db.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c index 19529271f49f..9f8c6064d2a7 100644 --- a/sys/netinet/libalias/alias_db.c +++ b/sys/netinet/libalias/alias_db.c @@ -613,8 +613,6 @@ AddLink(struct libalias *la, struct in_addr src_addr, struct in_addr dst_addr, case LINK_FRAGMENT_PTR: lnk->expire.time = FRAGMENT_PTR_EXPIRE_TIME; break; - case LINK_ADDR: - break; default: lnk->expire.time = PROTO_EXPIRE_TIME; break; From owner-dev-commits-src-main@freebsd.org Fri Jul 2 23:10:42 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5965673CF2; Fri, 2 Jul 2021 23:10: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGrR65dXZz4ZMj; Fri, 2 Jul 2021 23:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 AA7D21CB9A; Fri, 2 Jul 2021 23:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162NAgDt099174; Fri, 2 Jul 2021 23:10:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162NAgLH099173; Fri, 2 Jul 2021 23:10:42 GMT (envelope-from git) Date: Fri, 2 Jul 2021 23:10:42 GMT Message-Id: <202107022310.162NAgLH099173@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6329ca325e02 - main - hardclock.9: Refine some details 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/main X-Git-Reftype: branch X-Git-Commit: 6329ca325e02af4566346e725e2d07c85d4b3444 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 23:10:42 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6329ca325e02af4566346e725e2d07c85d4b3444 commit 6329ca325e02af4566346e725e2d07c85d4b3444 Author: Warner Losh AuthorDate: 2021-07-02 23:09:19 +0000 Commit: Warner Losh CommitDate: 2021-07-02 23:10:35 +0000 hardclock.9: Refine some details Refine mistakes from adaptaton of NetBSD's hardclock man page to FreeBSD: o clarify what usermode means o clarify how often hardclock is called o remove Xr callout(9) since that's done elsewhere Reviewed by: mav@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30982 --- share/man/man9/hardclock.9 | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/share/man/man9/hardclock.9 b/share/man/man9/hardclock.9 index 2aab68cb5f85..451ad8a28a93 100644 --- a/share/man/man9/hardclock.9 +++ b/share/man/man9/hardclock.9 @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 25, 2010 +.Dd July 1, 2021 .Dt HARDCLOCK 9 .Os .Sh NAME @@ -39,19 +39,26 @@ .Sh DESCRIPTION The .Fn hardclock -function is called -.Xr hz 9 -times per second. -It implements the real-time system clock. -The argument +function is called periodically based on pending work. +The rate ranges from +.Va hz +times per second on a very busy system, to twice a second on an idle system. +The .Va cnt -is the estimated number of ticks since the last call to -.Fn hardclock . +argument reports an estimate of the number of ticks since the last call. +The sum of +.Va cnt +over a second averages +.Va hz +over the long haul. +See +.Xr hz 9 +for important details over shorter time scales. The argument .Va usermode is none-zero when .Fn hardclock -is called from a user-mode context. +is called from an context that interrupted usermode execution. .Pp .Fn hardclock may perform different tasks such as: @@ -96,5 +103,4 @@ processing. .Xr ntp_adjtime 2 , .Xr signal 3 , .Xr ntpd 8 , -.Xr callout 9 , .Xr hz 9 From owner-dev-commits-src-main@freebsd.org Sat Jul 3 06:17:02 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A99A964BEEE; Sat, 3 Jul 2021 06:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GH1v248jrz3nsV; Sat, 3 Jul 2021 06:17:02 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 735A322540; Sat, 3 Jul 2021 06:17:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1636H28Z062746; Sat, 3 Jul 2021 06:17:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1636H22I062745; Sat, 3 Jul 2021 06:17:02 GMT (envelope-from git) Date: Sat, 3 Jul 2021 06:17:02 GMT Message-Id: <202107030617.1636H22I062745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ef790cc7407e - main - hdaa: update pin patch configurations 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/main X-Git-Reftype: branch X-Git-Commit: ef790cc7407e827db9563d08a52a71ab36436986 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 06:17:02 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ef790cc7407e827db9563d08a52a71ab36436986 commit ef790cc7407e827db9563d08a52a71ab36436986 Author: K Staring AuthorDate: 2021-07-03 06:15:49 +0000 Commit: Warner Losh CommitDate: 2021-07-03 06:15:49 +0000 hdaa: update pin patch configurations A number of structural changes: - Use decimal nid numbers instead of hex - updated the branch to incoorporate the suggestions made in the ALC280 pull request github thread - Convert magic pin values into strings. - Also update hdaa_patches to use clearer enums.. - made pin patch type enum clearer, add macro for 'string' type patches - Added pin_patch structures to separate data from logic. - Integrated Realtek patches into new structure. These incorporate fixes for ALC255, ALC256, ALC260, ALC262, ALC268, ALC269, ALC280, ALC282, ALC283, ALC286, ALC290, ALC293, ALC296, ALC2880 And have definitions for a number of Dell and HP laptops. Much of this data has been mined fromt he tables in the Linux driver. imp squashed these into one commit because the changes from the github pull requests no longer cleanly apply individually and made light style changes after feedback from jhb. Pull Request: https://github.com/freebsd/freebsd-src/pull/139 Pull Request: https://github.com/freebsd/freebsd-src/pull/140 Pull Request: https://github.com/freebsd/freebsd-src/pull/141 Pull Request: https://github.com/freebsd/freebsd-src/pull/142 Pull Request: https://github.com/freebsd/freebsd-src/pull/143 Pull Request: https://github.com/freebsd/freebsd-src/pull/144 Pull Request: https://github.com/freebsd/freebsd-src/pull/145 Pull Request: https://github.com/freebsd/freebsd-src/pull/146 Pull Request: https://github.com/freebsd/freebsd-src/pull/147 Pull Request: https://github.com/freebsd/freebsd-src/pull/148 Pull Request: https://github.com/freebsd/freebsd-src/pull/149 Pull Request: https://github.com/freebsd/freebsd-src/pull/150 Differential Revision: https://reviews.freebsd.org/D30619 --- sys/dev/sound/pci/hda/hdaa_patches.c | 259 +++----- sys/dev/sound/pci/hda/hdac.h | 145 ++++- sys/dev/sound/pci/hda/pin_patch.h | 121 ++++ sys/dev/sound/pci/hda/pin_patch_realtek.h | 992 ++++++++++++++++++++++++++++++ 4 files changed, 1327 insertions(+), 190 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 590c9e4d46fb..69299ee4344f 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -44,6 +44,9 @@ #include #include +#include "pin_patch.h" +#include "pin_patch_realtek.h" + SND_DECLARE_FILE("$FreeBSD$"); static const struct { @@ -145,10 +148,28 @@ static const struct { 0 } }; +static struct pin_patch_t * +match_pin_patches(int vendor_id, int vendor_subid) +{ + for (int ci = 0; ci < nitems(realtek_model_pin_patches); ci++) { + struct hdaa_model_pin_patch_t *p = &realtek_model_pin_patches[ci]; + if (vendor_id != p->id) + continue; + for (struct model_pin_patch_t *pp = p->patches; pp->models; pp++) { + for (struct pin_machine_model_t *model = pp->models; model->id != 0; model++) { + if (vendor_subid == model->id) + return (pp->pin_patches); + } + } + } + + return (0); +} + static void hdac_pin_patch(struct hdaa_widget *w) { - const char *patch = NULL; + const char *patch_str = NULL; uint32_t config, orig, id, subid; nid_t nid = w->nid; @@ -156,54 +177,7 @@ hdac_pin_patch(struct hdaa_widget *w) id = hdaa_codec_id(w->devinfo); subid = hdaa_card_id(w->devinfo); - /* XXX: Old patches require complete review. - * Now they may create more problem then solve due to - * incorrect associations. - */ - if (id == HDA_CODEC_ALC880 && subid == LG_LW20_SUBVENDOR) { - switch (nid) { - case 26: - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; - break; - case 27: - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT; - break; - default: - break; - } - } else if (id == HDA_CODEC_ALC880 && - (subid == CLEVO_D900T_SUBVENDOR || - subid == ASUS_M5200_SUBVENDOR)) { - /* - * Super broken BIOS - */ - switch (nid) { - case 24: /* MIC1 */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; - break; - case 25: /* XXX MIC2 */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; - break; - case 26: /* LINE1 */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; - break; - case 27: /* XXX LINE2 */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; - break; - case 28: /* CD */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_CD; - break; - } - } else if (id == HDA_CODEC_ALC883 && - (subid == MSI_MS034A_SUBVENDOR || - HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid))) { + if (id == HDA_CODEC_ALC883 && HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid)) { switch (nid) { case 25: config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | @@ -247,42 +221,6 @@ hdac_pin_patch(struct hdaa_widget *w) config |= HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE; break; } - } else if (id == HDA_CODEC_ALC861 && subid == - ASUS_W6F_SUBVENDOR) { - switch (nid) { - case 11: - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); - break; - case 12: - case 14: - case 16: - case 31: - case 32: - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); - break; - case 15: - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); - break; - } - } else if (id == HDA_CODEC_ALC861 && subid == - UNIWILL_9075_SUBVENDOR) { - switch (nid) { - case 15: - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); - break; - } } /* New patches */ @@ -290,10 +228,10 @@ hdac_pin_patch(struct hdaa_widget *w) subid == LENOVO_X300_SUBVENDOR) { switch (nid) { case 17: /* Headphones with redirection */ - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; case 20: /* Two mics together */ - patch = "as=2 seq=15"; + patch_str = "as=2 seq=15"; break; } } else if (id == HDA_CODEC_AD1986A && @@ -302,60 +240,45 @@ hdac_pin_patch(struct hdaa_widget *w) subid == ASUS_P5PL2_SUBVENDOR)) { switch (nid) { case 26: /* Headphones with redirection */ - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; case 28: /* 5.1 out => 2.0 out + 1 input */ - patch = "device=Line-in as=8 seq=1"; + patch_str = "device=Line-in as=8 seq=1"; break; case 29: /* Can't use this as input, as the only available mic * preamplifier is busy by front panel mic (nid 31). * If you want to use this rear connector as mic input, * you have to disable the front panel one. */ - patch = "as=0"; + patch_str = "as=0"; break; case 31: /* Lot of inputs configured with as=15 and unusable */ - patch = "as=8 seq=3"; + patch_str = "as=8 seq=3"; break; case 32: - patch = "as=8 seq=4"; + patch_str = "as=8 seq=4"; break; case 34: - patch = "as=8 seq=5"; + patch_str = "as=8 seq=5"; break; case 36: - patch = "as=8 seq=6"; - break; - } - } else if (id == HDA_CODEC_ALC260 && - HDA_DEV_MATCH(SONY_S5_SUBVENDOR, subid)) { - switch (nid) { - case 16: - patch = "seq=15 device=Headphones"; - break; - } - } else if (id == HDA_CODEC_ALC268) { - if (subid == ACER_T5320_SUBVENDOR) { - switch (nid) { - case 20: /* Headphones Jack */ - patch = "as=1 seq=15"; + patch_str = "as=8 seq=6"; break; } - } } else if (id == HDA_CODEC_CX20561 && subid == LENOVO_B450_SUBVENDOR) { switch (nid) { case 22: - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; } } else if (id == HDA_CODEC_CX20561 && subid == LENOVO_T400_SUBVENDOR) { switch (nid) { case 22: - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; case 26: - patch = "as=1 seq=0"; + patch_str = "as=1 seq=0"; break; } } else if (id == HDA_CODEC_CX20590 && @@ -366,102 +289,62 @@ hdac_pin_patch(struct hdaa_widget *w) subid == LENOVO_G580_SUBVENDOR)) { switch (nid) { case 25: - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; /* * Group onboard mic and headphone mic * together. Fixes onboard mic. */ case 27: - patch = "as=2 seq=15"; + patch_str = "as=2 seq=15"; break; case 35: - patch = "as=2"; - break; - } - } else if (id == HDA_CODEC_ALC269 && - (subid == LENOVO_X1CRBN_SUBVENDOR || - subid == LENOVO_T430_SUBVENDOR || - subid == LENOVO_T430S_SUBVENDOR || - subid == LENOVO_T530_SUBVENDOR)) { - switch (nid) { - case 21: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC285 && - (subid == LENOVO_X120KH_SUBVENDOR || - subid == LENOVO_X120QD_SUBVENDOR)) { - switch (nid) { - case 33: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC269 && - subid == ASUS_UX31A_SUBVENDOR) { - switch (nid) { - case 33: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC892 && - subid == INTEL_DH87RL_SUBVENDOR) { - switch (nid) { - case 27: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC292 && - subid == LENOVO_X120BS_SUBVENDOR) { - switch (nid) { - case 21: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC295 && subid == HP_AF006UR_SUBVENDOR) { - switch (nid) { - case 18: - patch = "as=2"; - break; - case 25: - patch = "as=2 seq=15"; - break; - case 33: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC298 && HDA_DEV_MATCH(LENOVO_ALL_SUBVENDOR, subid)) { - switch (nid) { - case 23: - config = 0x03a1103f; - break; - case 33: - config = 0x2121101f; - break; - } - } else if (id == HDA_CODEC_ALC298 && subid == DELL_XPS9560_SUBVENDOR) { - switch (nid) { - case 24: - config = 0x01a1913c; - break; - case 26: - config = 0x01a1913d; + patch_str = "as=2"; break; } } else if (id == HDA_CODEC_ALC256 && (subid == DELL_I7577_SUBVENDOR || subid == DELL_L7480_SUBVENDOR)) { switch (nid) { case 20: - patch = "as=1 seq=0"; + patch_str = "as=1 seq=0"; break; case 33: - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; } + } else { + /* + * loop over hdaa_model_pin_patch + */ + struct pin_patch_t *pin_patches = NULL; + + pin_patches = match_pin_patches(id, subid); + + if (pin_patches != NULL) { + for (struct pin_patch_t *patch = pin_patches; patch->type; patch++) { + if (nid == patch->nid) { + switch (patch->type) { + case PIN_PATCH_TYPE_STRING: + patch_str = patch->patch.string; + case PIN_PATCH_TYPE_MASK: + config &= ~patch->patch.mask[0]; + config |= patch->patch.mask[1]; + break; + case PIN_PATCH_TYPE_OVERRIDE: + config = patch->patch.override; + break; + default: + /* should panic hard */ + break; + } + break; + } + } + } } - if (patch != NULL) - config = hdaa_widget_pin_patch(config, patch); + if (patch_str != NULL) + config = hdaa_widget_pin_patch(config, patch_str); HDA_BOOTVERBOSE( if (config != orig) device_printf(w->devinfo->dev, diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 8e427d3412da..611cb98badd8 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -61,6 +61,7 @@ #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) +#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) #define HDA_INTEL_JLK HDA_MODEL_CONSTRUCT(INTEL, 0x38c8) #define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) #define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) @@ -91,7 +92,16 @@ #define HDA_INTEL_CMLKLP HDA_MODEL_CONSTRUCT(INTEL, 0x02c8) #define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) #define HDA_INTEL_TGLK HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8) -#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) +#define INTEL_A100ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xa100) +#define INTEL_D400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd400) +#define INTEL_D401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd401) +#define INTEL_D402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd402) +#define INTEL_E305ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe305) +#define INTEL_E308ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe308) +#define INTEL_E224ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe224) +#define INTEL_E400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe400) +#define INTEL_E401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe401) +#define INTEL_E402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe402) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) /* Nvidia */ @@ -198,6 +208,10 @@ /* HP/Compaq */ #define HP_VENDORID 0x103c +#define HP_Z200_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x103c) +#define HP_225AID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x225a) +#define HP_2272ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2272) +#define HP_2273ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2273) #define HP_V3000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30b5) #define HP_NX7400_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a2) #define HP_NX6310_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30aa) @@ -207,6 +221,7 @@ #define HP_DV5000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a5) #define HP_DC7700S_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2801) #define HP_DC7700_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2802) +#define HP_DC5750_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x280a) #define HP_AF006UR_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x83a2) #define HP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0xffff) /* What is wrong with XN 2563 anyway? (Got the picture ?) */ @@ -222,7 +237,28 @@ #define DELL_L7480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07a0) #define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7) #define DELL_OPLX745_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01da) +#define DELL_05F4ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f4) +#define DELL_05F5ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f5) +#define DELL_05F6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f6) +#define DELL_V5470_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0615) +#define DELL_V5470_1_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0616) +#define DELL_064AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064a) +#define DELL_064BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064b) +#define DELL_9020M_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0669) +#define DELL_V5480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x069a) +#define DELL_06D9ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06d9) +#define DELL_06DAID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06da) +#define DELL_06DBID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06db) +#define DELL_06DDID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06dd) +#define DELL_06DEID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06de) +#define DELL_06DFID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06df) +#define DELL_06E0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06e0) +#define DELL_7559_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0706) +#define DELL_7000_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0798) #define DELL_XPS9560_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07be) +#define DELL_E7240_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05ca) +#define DELL_164AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164a) +#define DELL_164BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164b) #define DELL_I7577_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0802) #define DELL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0xffff) @@ -233,34 +269,66 @@ /* Acer */ #define ACER_VENDORID 0x1025 +#define ACER_0070ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0070) +#define ACER_0077ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0077) +#define ACER_0078ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0078) +#define ACER_0087ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0087) #define ACER_A5050_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x010f) #define ACER_A4520_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0127) #define ACER_A4710_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x012f) #define ACER_A4715_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0133) +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) #define ACER_3681WXM_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0110) #define ACER_T6292_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011b) #define ACER_T5320_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011f) +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) +#define ACER_AC700_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x047c) +#define ACER_V5_571G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x072d) +#define ACER_AO725_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0740) +#define ACER_AO756_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0742) +#define ACER_E1_472_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0762) +#define ACER_E1_572_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0775) +#define ACER_V5_573G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x079b) +#define ACER_CB_14_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x106d) +#define ACER_V5_122P_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa80d) +#define ACER_APFV_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa884) +#define ACER_E309ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe309) +#define ACER_E310ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe310) #define ACER_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xffff) /* Asus */ #define ASUS_VENDORID 0x1043 +#define ASUS_X540A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x103e) +#define ASUS_X540SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c0) +#define ASUS_X556UR_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x11c0) +#define ASUS_W5A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c3) +#define ASUS_X540LA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10d0) #define ASUS_A8X_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1153) #define ASUS_U5F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) #define ASUS_W6F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) +#define ASUS_X541SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12e0) +#define ASUS_X541UV_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12f0) #define ASUS_A7M_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1323) #define ASUS_F3JC_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1338) #define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339) +#define ASUS_Z550SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13b0) #define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2) #define ASUS_UX31A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1517) +#define ASUS_Z71V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1964) #define ASUS_W2J_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1971) #define ASUS_M5200_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1993) +#define ASUS_G73JW_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a13) +#define ASUS_X705UD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a30) +#define ASUS_Z550MA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1bbd) +#define ASUS_X555UB_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1ccd) #define ASUS_P5PL2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x817f) #define ASUS_P1AH2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) #define ASUS_M2NPVMX_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) #define ASUS_M2V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81e7) #define ASUS_P5BWD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81ec) #define ASUS_M2N_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8234) -#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(NVIDIA, 0xcb84) +#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xcb84) +#define ASUS_X101CH_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8516) #define ASUS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xffff) /* IBM / Lenovo */ @@ -287,7 +355,11 @@ #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) #define LENOVO_T530_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6) +#define LENOVO_X230_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fa) +#define LENOVO_X230T_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2203) +#define LENOVO_T431S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2208) #define LENOVO_G580_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3977) +#define LENOVO_3000_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */ @@ -307,8 +379,19 @@ /* Sony */ #define SONY_VENDORID 0x104d #define SONY_S5_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81cc) +#define SONY_81A0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81a0) +#define SONY_81D6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81d6) +#define SONY_81BBID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81bb) +#define SONY_VAIO_TX_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81e2) +#define SONY_VAIO_S13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x9099) +#define SONY_VAIO_P11_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b5) +#define SONY_VAIO_P13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b6) #define SONY_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0xffff) +/* Tyan? */ +#define TYAN_VENDORID 0x10f1 +#define TYAN_N6650W_SUBVENDOR HDA_MODEL_CONSTRUCT(TYAN, 0x2915) + /* * Apple Intel MacXXXX seems using Sigmatel codec/vendor id * instead of their own, which is beyond my comprehension @@ -322,18 +405,32 @@ /* LG Electronics */ #define LG_VENDORID 0x1854 #define LG_LW20_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0018) +#define LG_M1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x003b) +#define LG_P1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x005f) +#define LG_W1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0068) +#define LG_LW25_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0077) #define LG_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0xffff) /* Fujitsu Siemens */ #define FS_VENDORID 0x1734 #define FS_PA1510_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b8) #define FS_SI1848_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10cd) +#define FS_AMILO_M1437_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x107c) +#define FS_AMILO_M1451G_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1094) +#define FS_AMILO_PI1556_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b0) +#define FS_AMILO_XI1526_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10ac) +#define FS_H270_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1147) #define FS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0xffff) /* Fujitsu Limited */ #define FL_VENDORID 0x10cf #define FL_S7020D_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1326) +#define FL_LB_S7110_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1397) #define FL_U1010_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x142d) +#define FL_1475ID_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1475) +#define FL_LB_U904_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1845) +#define FL_LB_T731_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x15dc) +#define FL_LB_E725_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1757) #define FL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0xffff) /* Toshiba */ @@ -346,18 +443,61 @@ #define MSI_VENDORID 0x1462 #define MSI_MS1034_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x0349) #define MSI_MS034A_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x034a) +#define MSI_1150ID_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x1150) +#define MSI_MS_B120_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xb120) #define MSI_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xffff) /* Giga-Byte Technology */ #define GB_VENDORID 0x1458 #define GB_G33S2H_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa022) +#define GB_K8_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa102) +#define GB_BXBT2807_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xfa53) #define GP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xffff) /* Uniwill ? */ #define UNIWILL_VENDORID 0x1584 #define UNIWILL_9075_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9075) +#define UNIWILL_9050_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9050) +#define UNIWILL_9054_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9054) +#define UNIWILL_9070_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9070) #define UNIWILL_9080_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9080) +/* Coeus / Elitegroup */ +#define COEUS_VENDORID 0x1019 +#define COEUS_G610P_SUBVENDOR HDA_MODEL_CONSTRUCT(COEUS, 0x0f69) +#define COEUS_A880ID_SUBVENDOR HDA_MODEL_CONSTRUCT(COEUS, 0xa880) + +/* Arima */ +#define ARIMA_VENDORID 0x161f +#define ARIMA_W810_SUBVENDOR HDA_MODEL_CONSTRUCT(ARIMA, 0x0f69) + +/* Shuttle Computer */ +#define SHUTTLE_VENDORID 0x1039 +#define SHUTTLE_ST20G5_SUBVENDOR HDA_MODEL_CONSTRUCT(SHUTTLE, 0xc790) + +/* First International Computer */ +#define FIC_VENDORID 0x1509 +#define FIC_P4M_SUBVENDOR HDA_MODEL_CONSTRUCT(FIC, 0x925d) + +/* Gateway 2000 */ +#define GATEWAY_VENDORID 0x107b +#define GATEWAY_3032ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3032) +#define GATEWAY_3033ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3033) +#define GATEWAY_4039ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x4039) + +/* Biostar */ +#define BIOSTAR_VENDORID 0x1565 +#define BIOSTAR_8202ID_SUBVENDOR HDA_MODEL_CONSTRUCT(BIOSTAR, 0x8202) + +/* EPoX Computer Co., Ltd. */ +#define EPOX_VENDORID 0x1695 +#define EPOX_400DID_SUBVENDOR HDA_MODEL_CONSTRUCT(EPOX, 0x400d) +#define EPOX_EP5LDA_SUBVENDOR HDA_MODEL_CONSTRUCT(EPOX, 0x4012) + +/* AOpen */ +#define AOPEN_VENDORID 0xa0a0 +#define AOPEN_I915GMMHFS_SUBVENDOR HDA_MODEL_CONSTRUCT(AOPEN, 0x8202) + /* All codecs you can eat... */ #define HDA_CODEC_CONSTRUCT(vendor, id) \ (((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0xffff)) @@ -390,6 +530,7 @@ #define HDA_CODEC_ALC268 HDA_CODEC_CONSTRUCT(REALTEK, 0x0268) #define HDA_CODEC_ALC269 HDA_CODEC_CONSTRUCT(REALTEK, 0x0269) #define HDA_CODEC_ALC270 HDA_CODEC_CONSTRUCT(REALTEK, 0x0270) +#define HDA_CODEC_ALC271 HDA_CODEC_CONSTRUCT(REALTEK, 0x0271) #define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272) #define HDA_CODEC_ALC273 HDA_CODEC_CONSTRUCT(REALTEK, 0x0273) #define HDA_CODEC_ALC274 HDA_CODEC_CONSTRUCT(REALTEK, 0x0274) diff --git a/sys/dev/sound/pci/hda/pin_patch.h b/sys/dev/sound/pci/hda/pin_patch.h new file mode 100644 index 000000000000..8e2c9875906f --- /dev/null +++ b/sys/dev/sound/pci/hda/pin_patch.h @@ -0,0 +1,121 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Khamba Staring + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +#ifndef PIN_PATCH_H +#define PIN_PATCH_H + +#include "hdac.h" + +#define PIN_SUBVENDOR(sv) { .id = sv } + + +#define PIN_PATCH_STRING(n, patchstr) { \ + .nid = n, \ + .type = PIN_PATCH_TYPE_STRING, \ + .patch.string = patchstr \ +} +#define PIN_OVERRIDE(n, newvalue) { \ + .nid = n, \ + .type = PIN_PATCH_TYPE_OVERRIDE, \ + .patch.override = newvalue \ +} +#define PIN_PATCH_NOT_APPLICABLE(n) \ + PIN_PATCH_STRING(n, "as=15 misc=1 color=Black ctype=1/8 device=Speaker loc=Rear conn=None") +#define PIN_PATCH_HP_OUT(n) \ + PIN_PATCH_STRING(n, "seq=15 as=1 color=Green ctype=1/8 device=Headphones loc=Rear") +#define PIN_PATCH_HP(n) \ + PIN_PATCH_STRING(n, "seq=15 as=1 misc=1 color=Green ctype=1/8 device=Headphones loc=Rear") +#define PIN_PATCH_SPEAKER(n) \ + PIN_PATCH_STRING(n, "as=2 misc=1 ctype=ATAPI loc=Onboard conn=Fixed") +#define PIN_PATCH_BASS_SPEAKER(n) \ + PIN_PATCH_STRING(n, "as=3 misc=1 ctype=ATAPI loc=Onboard conn=Fixed") +#define PIN_PATCH_MIC_IN(n) \ + PIN_PATCH_STRING(n, "as=5 misc=9 color=Pink ctype=1/8 device=Mic loc=Rear") +#define PIN_PATCH_MIC_INTERNAL(n) \ + PIN_PATCH_STRING(n, "as=6 misc=1 ctype=Digital device=Mic loc=Internal conn=Fixed") +#define PIN_PATCH_MIC_FRONT(n) \ + PIN_PATCH_STRING(n, "as=4 misc=12 color=Pink ctype=1/8 device=Mic loc=Front") +#define PIN_PATCH_LINE_IN(n) \ + PIN_PATCH_STRING(n, "seq=1 as=3 color=Blue ctype=1/8 device=Line-in loc=Rear") +#define PIN_PATCH_LINE_OUT(n) \ + PIN_PATCH_STRING(n, "as=1 color=Green ctype=1/8 loc=Rear") +#define PIN_PATCH_SPDIF_OUT(n) \ + PIN_PATCH_STRING(n, "as=4 misc=1 color=Green ctype=Optical device=SPDIF-out loc=Rear") +#define PIN_PATCH_JACK_WO_DETECT(n) \ + PIN_PATCH_STRING(n, "seq=12 as=3 misc=1 color=Pink ctype=1/8 device=Mic loc=Rear") +#define PIN_PATCH_HPMIC_WO_DETECT(n) \ + PIN_PATCH_STRING(n, "seq=13 as=3 misc=1 color=Pink ctype=1/8 device=Mic loc=Rear") +#define PIN_PATCH_HPMIC_WITH_DETECT(n) \ + PIN_PATCH_STRING(n, "seq=12 as=3 color=Pink ctype=1/8 device=Mic loc=Rear") +#define PIN_PATCH_CLFE(n) \ + PIN_PATCH_STRING(n, "seq=1 as=1 misc=4 color=Black ctype=1/8 loc=Rear") +#define PIN_PATCH_SURROUND(n) \ + PIN_PATCH_STRING(n, "seq=2 as=1 misc=4 color=Orange ctype=1/8 loc=Rear") +#define PIN_PATCH_SUBWOOFER(n) \ + PIN_PATCH_STRING(n, "seq=1 as=1 misc=1 ctype=ATAPI device=Speaker loc=Onboard conn=Fixed") +#define PIN_PATCH_DOCK_LINE_OUT(n) \ + PIN_PATCH_STRING(n, "seq=15 as=3 color=Black ctype=1/8 loc=Ext-Rear") +#define PIN_PATCH_DOCK_HP(n) \ + PIN_PATCH_STRING(n, "seq=15 as=3 color=Black ctype=1/8 device=Headphones loc=Ext-Rear") +#define PIN_PATCH_DOCK_MIC_IN(n) \ + PIN_PATCH_STRING(n, "as=4 color=Black ctype=1/8 device=Mic loc=Ext-Left") + +enum { + PIN_PATCH_TYPE_EOL, /* end-of-list */ + PIN_PATCH_TYPE_STRING, + PIN_PATCH_TYPE_MASK, + PIN_PATCH_TYPE_OVERRIDE +}; + +struct pin_patch_t { + nid_t nid; /* nid to patch */ + int type; /* patch type */ + union { + const char *string; /* patch string */ + uint32_t mask[2]; /* pin config mask */ + uint32_t override; /* pin config override */ + } patch; +}; + +struct pin_machine_model_t { + uint32_t id; /* vendor machine id */ +}; + +struct model_pin_patch_t { + struct pin_machine_model_t *models; /* list of machine models */ + struct pin_patch_t *pin_patches; /* hardcoded overrides */ + void (*fixup_func)(struct hdaa_widget *); /* for future use */ +}; + +struct hdaa_model_pin_patch_t { + uint32_t id; /* the hdaa id */ + struct model_pin_patch_t *patches; /* list of machine patches */ +}; + +#endif /* PIN_PATCH_H */ diff --git a/sys/dev/sound/pci/hda/pin_patch_realtek.h b/sys/dev/sound/pci/hda/pin_patch_realtek.h new file mode 100644 index 000000000000..ddaeeaef5345 --- /dev/null +++ b/sys/dev/sound/pci/hda/pin_patch_realtek.h @@ -0,0 +1,992 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Khamba Staring + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef PIN_PATCH_REALTEK_H +#define PIN_PATCH_REALTEK_H + +#include "hdac.h" +#include "pin_patch.h" + +/* + * Pin patches + */ +static struct pin_patch_t pin_patches_lg_lw20[] = { + { + .nid = 26, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } + }, { + .nid = 27, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT } + }, { } +}; + +static struct pin_patch_t pin_patches_clevo_d900t_asus_m5200[] = { + { + .nid = 24, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } + }, { + .nid = 25, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN } + }, { + .nid = 26, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } + }, { + .nid = 27, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } + }, { + .nid = 28, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_CD } + }, { } +}; + +static struct pin_patch_t pin_patches_msi_ms034a[] = { + { + .nid = 25, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { + .nid = 28, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_CD | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { } +}; + +static struct pin_patch_t pin_patches_asus_w6f[] = { + { + .nid = 11, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { + .nid = 12, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { + .nid = 14, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { + .nid = 15, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK } + }, { + .nid = 16, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { + .nid = 31, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { + .nid = 32, *** 839 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Sat Jul 3 07:41:19 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B20264D29D; Sat, 3 Jul 2021 07:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GH3mH03dkz3vhq; Sat, 3 Jul 2021 07:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 DEC8E23B71; Sat, 3 Jul 2021 07:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1637fIft077632; Sat, 3 Jul 2021 07:41:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1637fI1e077631; Sat, 3 Jul 2021 07:41:18 GMT (envelope-from git) Date: Sat, 3 Jul 2021 07:41:18 GMT Message-Id: <202107030741.1637fI1e077631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 45d99014ca3a - main - linux(4): implement coredumps on arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45d99014ca3a57fcc6b603cf4494516b4dadda1b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 07:41:19 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=45d99014ca3a57fcc6b603cf4494516b4dadda1b commit 45d99014ca3a57fcc6b603cf4494516b4dadda1b Author: Edward Tomasz Napierala AuthorDate: 2021-07-03 07:05:44 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-07-03 07:06:31 +0000 linux(4): implement coredumps on arm64 Previously they only worked on amd64. Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30975 --- sys/arm64/linux/linux.h | 12 ++++++++++++ sys/arm64/linux/linux_machdep.c | 16 ++++++++++++++++ sys/arm64/linux/linux_sysvec.c | 4 ++-- sys/modules/linux64/Makefile | 5 ++--- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h index 5d4739223275..2e683b77f8e8 100644 --- a/sys/arm64/linux/linux.h +++ b/sys/arm64/linux/linux.h @@ -298,4 +298,16 @@ struct linux_robust_list_head { l_uintptr_t pending_list; }; +struct linux_pt_regset { + l_ulong x[31]; + l_ulong sp; + l_ulong pc; + l_ulong cpsr; +}; + +struct reg; + +void bsd_to_linux_regset(struct reg *b_reg, + struct linux_pt_regset *l_regset); + #endif /* _ARM64_LINUX_H_ */ diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c index 8e10fc9d26a1..d9b13fa631fc 100644 --- a/sys/arm64/linux/linux_machdep.c +++ b/sys/arm64/linux/linux_machdep.c @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include +#include + #include #include #include @@ -149,3 +151,17 @@ linux_set_cloned_tls(struct thread *td, void *desc) return (cpu_set_user_tls(td, desc)); } + +void +bsd_to_linux_regset(struct reg *b_reg, struct linux_pt_regset *l_regset) +{ + + KASSERT(sizeof(l_regset->x) == sizeof(b_reg->x) + sizeof(l_ulong), + ("%s: size mismatch\n", __func__)); + memcpy(l_regset->x, b_reg->x, sizeof(b_reg->x)); + + l_regset->x[30] = b_reg->lr; + l_regset->sp = b_reg->sp; + l_regset->pc = b_reg->elr; + l_regset->cpsr = b_reg->spsr; +} diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 33bc303b5ada..e1d3708b70e9 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -417,8 +417,8 @@ struct sysentvec elf_linux_sysvec = { .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, .sv_elf_core_osabi = ELFOSABI_NONE, - .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, - .sv_elf_core_prepare_notes = elf64_prepare_notes, + .sv_elf_core_abi_vendor = LINUX_ABI_VENDOR, + .sv_elf_core_prepare_notes = linux64_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index d70983354407..5f3f0fd03574 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -8,8 +8,8 @@ VDSO= linux_vdso KMOD= linux64 -SRCS= linux_fork.c linux_dummy_machdep.c linux_file.c linux_event.c \ - linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c \ +SRCS= linux_elf64.c linux_fork.c linux_dummy_machdep.c linux_file.c \ + linux_event.c linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c \ linux_machdep.c linux_misc.c linux_ptrace.c linux_signal.c \ linux_socket.c linux_stats.c linux_sysctl.c linux_sysent.c \ linux_sysvec.c linux_time.c linux_vdso.c linux_timer.c \ @@ -18,7 +18,6 @@ SRCS= linux_fork.c linux_dummy_machdep.c linux_file.c linux_event.c \ linux_support.s .if ${MACHINE_CPUARCH} == "amd64" SRCS+= linux_dummy_x86.c -SRCS+= linux_elf64.c .endif DPSRCS= assym.inc linux_genassym.c From owner-dev-commits-src-main@freebsd.org Sat Jul 3 07:59:53 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A152164D5AD; Sat, 3 Jul 2021 07:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GH49j3mmHz4RCl; Sat, 3 Jul 2021 07:59:53 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 69C5D238E8; Sat, 3 Jul 2021 07:59:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1637xrZY095435; Sat, 3 Jul 2021 07:59:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1637xrVa095434; Sat, 3 Jul 2021 07:59:53 GMT (envelope-from git) Date: Sat, 3 Jul 2021 07:59:53 GMT Message-Id: <202107030759.1637xrVa095434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 2f514e6f13de - main - linux(4): implement PR_SET_NO_NEW_PRIVS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f514e6f13de41aa9ad5f563ed0decc66e91f99c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 07:59:53 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=2f514e6f13de41aa9ad5f563ed0decc66e91f99c commit 2f514e6f13de41aa9ad5f563ed0decc66e91f99c Author: Edward Tomasz Napierala AuthorDate: 2021-07-03 07:41:59 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-07-03 07:42:37 +0000 linux(4): implement PR_SET_NO_NEW_PRIVS This makes prctl(2) support PR_SET_NO_NEW_PRIVS, by mapping it to the native PROC_NO_NEW_PRIVS_CTL procctl(2). Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30973 --- sys/compat/linux/linux_misc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 65a5b0dd24d7..559eb6463da0 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1982,7 +1982,7 @@ linux_capset(struct thread *td, struct linux_capset_args *uap) int linux_prctl(struct thread *td, struct linux_prctl_args *args) { - int error = 0, max_size; + int error = 0, max_size, arg; struct proc *p = td->td_proc; char comm[LINUX_MAX_COMM_LEN]; int pdeath_signal, trace_state; @@ -2113,8 +2113,10 @@ linux_prctl(struct thread *td, struct linux_prctl_args *args) error = EINVAL; break; case LINUX_PR_SET_NO_NEW_PRIVS: - linux_msg(td, "unsupported prctl PR_SET_NO_NEW_PRIVS"); - error = EINVAL; + arg = args->arg2 == 1 ? + PROC_NO_NEW_PRIVS_ENABLE : PROC_NO_NEW_PRIVS_DISABLE; + error = kern_procctl(td, P_PID, p->p_pid, + PROC_NO_NEW_PRIVS_CTL, &arg); break; case LINUX_PR_SET_PTRACER: linux_msg(td, "unsupported prctl PR_SET_PTRACER"); From owner-dev-commits-src-main@freebsd.org Sat Jul 3 17:15:40 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B8A865506C; Sat, 3 Jul 2021 17:15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHJW02NbGz3vry; Sat, 3 Jul 2021 17:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 3A2642B312; Sat, 3 Jul 2021 17:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 163HFe98038663; Sat, 3 Jul 2021 17:15:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 163HFeJC038662; Sat, 3 Jul 2021 17:15:40 GMT (envelope-from git) Date: Sat, 3 Jul 2021 17:15:40 GMT Message-Id: <202107031715.163HFeJC038662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: d12d651f8692 - main - EFI RT: resurrect EFIIOC_GET_TABLE 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/main X-Git-Reftype: branch X-Git-Commit: d12d651f8692cfcaf6fd0a6e8264c29547f644c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 17:15:40 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d12d651f8692cfcaf6fd0a6e8264c29547f644c9 commit d12d651f8692cfcaf6fd0a6e8264c29547f644c9 Author: Pavel Balaev AuthorDate: 2021-07-01 16:27:25 +0000 Commit: Konstantin Belousov CommitDate: 2021-07-03 17:06:48 +0000 EFI RT: resurrect EFIIOC_GET_TABLE Make it work, but change the interface to be safe for non-root users. In particular, right now interface only works for the tables which can be minimally parsed by kernel to determine the table size. Then, userspace can query the table size, after that it provides a buffer of needed size and kernel copies out just table to userspace. Main advantage is that user no longer need to be able to read /dev/mem, the disadvantage is the need to have minimal parsers aware of the table types. Right now the parsers are implemented for ESRT and PROP tables. Future extension of the present interface might be a return of only the table physical address, in case kernel does not have suitable parser yet. Then, a privileged user could read the table from /dev/mem. This extension, which logically equivalent to the old (non-worked) EFIIOC_GET_TABLE variant, is not implemented until needed. Submitted by: Pavel Balaev MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D30104 --- share/man/man4/efidev.4 | 23 +++++++-- sys/dev/efidev/efidev.c | 23 +++++++++ sys/dev/efidev/efirt.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/efi.h | 39 +++++++++++++++ sys/sys/efiio.h | 9 ++++ 5 files changed, 219 insertions(+), 3 deletions(-) diff --git a/share/man/man4/efidev.4 b/share/man/man4/efidev.4 index b32a44325f92..2cadada51e9c 100644 --- a/share/man/man4/efidev.4 +++ b/share/man/man4/efidev.4 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 12, 2018 +.Dd June 18, 2021 .Dt EFIDEV 4 .Os .Sh NAME @@ -71,11 +71,28 @@ with supplemental structures and constants defined in .In sys/efi.h : .Bl -tag -width indent .It Dv EFIIOC_GET_TABLE Pq Vt "struct efi_get_table_ioc" -Get a table by uuid from the UEFI system table. +Copy the UEFI table specified by the +.Va uuid +field of the +.Vt struct efi_get_table_ioc +into the +.Va buf +field. +The memory size for the buf field can be queried by passing +.Dv NULL +pointer as a buf value. +The required size will be stored in the +.Va table_len +field. +The size of the allocated memory must be specified in the +.Va buf_len +field. .Bd -literal -offset indent struct efi_get_table_ioc { + void *buf; struct uuid uuid; - void *ptr; + size_t table_len; + size_t buf_len; }; .Ed .It Dv EFIIOC_GET_TIME Pq Vt "struct efi_tm" diff --git a/sys/dev/efidev/efidev.c b/sys/dev/efidev/efidev.c index 303b10c1d0ba..79d98956ed24 100644 --- a/sys/dev/efidev/efidev.c +++ b/sys/dev/efidev/efidev.c @@ -53,6 +53,29 @@ efidev_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr, int error; switch (cmd) { + case EFIIOC_GET_TABLE: + { + struct efi_get_table_ioc *egtioc = + (struct efi_get_table_ioc *)addr; + void *buf = NULL; + + error = efi_copy_table(&egtioc->uuid, egtioc->buf ? &buf : NULL, + egtioc->buf_len, &egtioc->table_len); + + if (error != 0 || egtioc->buf == NULL) + break; + + if (egtioc->buf_len < egtioc->table_len) { + error = EINVAL; + free(buf, M_TEMP); + break; + } + + error = copyout(buf, egtioc->buf, egtioc->buf_len); + free(buf, M_TEMP); + + break; + } case EFIIOC_GET_TIME: { struct efi_tm *tm = (struct efi_tm *)addr; diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index aa7e9afdb69d..9ba0508f1902 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -47,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -58,6 +60,8 @@ __FBSDID("$FreeBSD$"); #include #include +#define EFI_TABLE_ALLOC_MAX 0x800000 + static struct efi_systbl *efi_systbl; static eventhandler_tag efi_shutdown_tag; /* @@ -96,6 +100,11 @@ static int efi_status2err[25] = { EPROTO /* EFI_PROTOCOL_ERROR */ }; +enum efi_table_type { + TYPE_ESRT = 0, + TYPE_PROP +}; + static int efi_enter(void); static void efi_leave(void); @@ -336,6 +345,124 @@ get_table(struct uuid *uuid, void **ptr) return (ENOENT); } +static int +get_table_length(enum efi_table_type type, size_t *table_len, void **taddr) +{ + switch (type) { + case TYPE_ESRT: + { + struct efi_esrt_table *esrt = NULL; + struct uuid uuid = EFI_TABLE_ESRT; + uint32_t fw_resource_count = 0; + size_t len = sizeof(*esrt); + int error; + void *buf; + + error = efi_get_table(&uuid, (void **)&esrt); + if (error != 0) + return (error); + + buf = malloc(len, M_TEMP, M_WAITOK); + error = physcopyout((vm_paddr_t)esrt, buf, len); + if (error != 0) { + free(buf, M_TEMP); + return (error); + } + + /* Check ESRT version */ + if (((struct efi_esrt_table *)buf)->fw_resource_version != + ESRT_FIRMWARE_RESOURCE_VERSION) { + free(buf, M_TEMP); + return (ENODEV); + } + + fw_resource_count = ((struct efi_esrt_table *)buf)-> + fw_resource_count; + if (fw_resource_count > EFI_TABLE_ALLOC_MAX / + sizeof(struct efi_esrt_entry_v1)) { + free(buf, M_TEMP); + return (ENOMEM); + } + + len += fw_resource_count * sizeof(struct efi_esrt_entry_v1); + *table_len = len; + + if (taddr != NULL) + *taddr = esrt; + free(buf, M_TEMP); + return (0); + } + case TYPE_PROP: + { + struct uuid uuid = EFI_PROPERTIES_TABLE; + struct efi_prop_table *prop; + size_t len = sizeof(*prop); + uint32_t prop_len; + int error; + void *buf; + + error = efi_get_table(&uuid, (void **)&prop); + if (error != 0) + return (error); + + buf = malloc(len, M_TEMP, M_WAITOK); + error = physcopyout((vm_paddr_t)prop, buf, len); + if (error != 0) { + free(buf, M_TEMP); + return (error); + } + + prop_len = ((struct efi_prop_table *)buf)->length; + if (prop_len > EFI_TABLE_ALLOC_MAX) { + free(buf, M_TEMP); + return (ENOMEM); + } + *table_len = prop_len; + + if (taddr != NULL) + *taddr = prop; + free(buf, M_TEMP); + return (0); + } + } + return (ENOENT); +} + +static int +copy_table(struct uuid *uuid, void **buf, size_t buf_len, size_t *table_len) +{ + static const struct known_table { + struct uuid uuid; + enum efi_table_type type; + } tables[] = { + { EFI_TABLE_ESRT, TYPE_ESRT }, + { EFI_PROPERTIES_TABLE, TYPE_PROP } + }; + size_t table_idx; + void *taddr; + int rc; + + for (table_idx = 0; table_idx < nitems(tables); table_idx++) { + if (!bcmp(&tables[table_idx].uuid, uuid, sizeof(*uuid))) + break; + } + + if (table_idx == nitems(tables)) + return (EINVAL); + + rc = get_table_length(tables[table_idx].type, table_len, &taddr); + if (rc != 0) + return rc; + + /* return table length to userspace */ + if (buf == NULL) + return (0); + + *buf = malloc(*table_len, M_TEMP, M_WAITOK); + rc = physcopyout((vm_paddr_t)taddr, *buf, *table_len); + return (rc); +} + static int efi_rt_handle_faults = EFI_RT_HANDLE_FAULTS_DEFAULT; SYSCTL_INT(_machdep, OID_AUTO, efi_rt_handle_faults, CTLFLAG_RWTUN, &efi_rt_handle_faults, 0, @@ -568,6 +695,7 @@ var_set(efi_char *name, struct uuid *vendor, uint32_t attrib, const static struct efi_ops efi_ops = { .rt_ok = rt_ok, .get_table = get_table, + .copy_table = copy_table, .get_time = get_time, .get_time_capabilities = get_time_capabilities, .reset_system = reset_system, diff --git a/sys/sys/efi.h b/sys/sys/efi.h index 7f9408d19b39..6ace7dd6e523 100644 --- a/sys/sys/efi.h +++ b/sys/sys/efi.h @@ -40,6 +40,10 @@ {0xeb9d2d31,0x2d88,0x11d3,0x9a,0x16,{0x00,0x90,0x27,0x3f,0xc1,0x4d}} #define EFI_TABLE_SMBIOS3 \ {0xf2fd1544,0x9794,0x4a2c,0x99,0x2e,{0xe5,0xbb,0xcf,0x20,0xe3,0x94}} +#define EFI_TABLE_ESRT \ + {0xb122a263,0x3661,0x4f68,0x99,0x29,{0x78,0xf8,0xb0,0xd6,0x21,0x80}} +#define EFI_PROPERTIES_TABLE \ + {0x880aaca3,0x4adc,0x4a04,0x90,0x79,{0xb7,0x47,0x34,0x08,0x25,0xe5}} enum efi_reset { EFI_RESET_COLD = 0, @@ -123,6 +127,31 @@ struct efi_tblhdr { uint32_t __res; }; +#define ESRT_FIRMWARE_RESOURCE_VERSION 1 + +struct efi_esrt_table { + uint32_t fw_resource_count; + uint32_t fw_resource_count_max; + uint64_t fw_resource_version; + uint8_t entries[]; +}; + +struct efi_esrt_entry_v1 { + struct uuid fw_class; + uint32_t fw_type; + uint32_t fw_version; + uint32_t lowest_supported_fw_version; + uint32_t capsule_flags; + uint32_t last_attempt_version; + uint32_t last_attempt_status; +}; + +struct efi_prop_table { + uint32_t version; + uint32_t length; + uint64_t memory_protection_attribute; +}; + #ifdef _KERNEL #ifdef EFIABI_ATTR @@ -188,6 +217,7 @@ struct efi_ops { */ int (*rt_ok)(void); int (*get_table)(struct uuid *, void **); + int (*copy_table)(struct uuid *, void **, size_t, size_t *); int (*get_time)(struct efi_tm *); int (*get_time_capabilities)(struct efi_tmcap *); int (*reset_system)(enum efi_reset); @@ -216,6 +246,15 @@ static inline int efi_get_table(struct uuid *uuid, void **ptr) return (active_efi_ops->get_table(uuid, ptr)); } +static inline int efi_copy_table(struct uuid *uuid, void **buf, + size_t buf_len, size_t *table_len) +{ + + if (active_efi_ops->copy_table == NULL) + return (ENXIO); + return (active_efi_ops->copy_table(uuid, buf, buf_len, table_len)); +} + static inline int efi_get_time(struct efi_tm *tm) { diff --git a/sys/sys/efiio.h b/sys/sys/efiio.h index e5a0763536a3..803aed6a965e 100644 --- a/sys/sys/efiio.h +++ b/sys/sys/efiio.h @@ -32,6 +32,14 @@ #include #include +struct efi_get_table_ioc +{ + void *buf; /* Pointer to userspace buffer */ + struct uuid uuid; /* UUID to look up */ + size_t table_len; /* Table size */ + size_t buf_len; /* Size of the buffer */ +}; + struct efi_var_ioc { efi_char *name; /* User pointer to name, in wide chars */ @@ -42,6 +50,7 @@ struct efi_var_ioc size_t datasize; /* Number of *bytes* in the data */ }; +#define EFIIOC_GET_TABLE _IOWR('E', 1, struct efi_get_table_ioc) #define EFIIOC_GET_TIME _IOR('E', 2, struct efi_tm) #define EFIIOC_SET_TIME _IOW('E', 3, struct efi_tm) #define EFIIOC_VAR_GET _IOWR('E', 4, struct efi_var_ioc) From owner-dev-commits-src-main@freebsd.org Sat Jul 3 17:15:41 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5F3065531B; Sat, 3 Jul 2021 17:15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHJW13Gryz3vx4; Sat, 3 Jul 2021 17:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 54A932B0A9; Sat, 3 Jul 2021 17:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 163HFf5K038687; Sat, 3 Jul 2021 17:15:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 163HFfG2038686; Sat, 3 Jul 2021 17:15:41 GMT (envelope-from git) Date: Sat, 3 Jul 2021 17:15:41 GMT Message-Id: <202107031715.163HFfG2038686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 24f398e7a153 - main - Add efitable(8), a userspace tool to fetch and parse EFI tables 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/main X-Git-Reftype: branch X-Git-Commit: 24f398e7a153a05a7e94ae8dd623e2b6d28d94eb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 17:15:41 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=24f398e7a153a05a7e94ae8dd623e2b6d28d94eb commit 24f398e7a153a05a7e94ae8dd623e2b6d28d94eb Author: Pavel Balaev AuthorDate: 2021-07-01 16:29:36 +0000 Commit: Konstantin Belousov CommitDate: 2021-07-03 17:14:16 +0000 Add efitable(8), a userspace tool to fetch and parse EFI tables Only ESRT and PROP tables are handled at the moment. Submitted by: Pavel Balaev MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D30104 --- usr.sbin/Makefile | 2 +- usr.sbin/efitable/Makefile | 9 ++ usr.sbin/efitable/efitable.8 | 70 +++++++++++++ usr.sbin/efitable/efitable.c | 239 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 319 insertions(+), 1 deletion(-) diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index f19af2a5566d..a5d2a476538f 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -127,7 +127,7 @@ SUBDIR.${MK_OPENSSL}+= certctl .endif SUBDIR.${MK_CXGBETOOL}+= cxgbetool SUBDIR.${MK_DIALOG}+= bsdconfig -SUBDIR.${MK_EFI}+= efivar efidp efibootmgr +SUBDIR.${MK_EFI}+= efivar efidp efibootmgr efitable .if ${MK_OPENSSL} != "no" SUBDIR.${MK_EFI}+= uefisign .endif diff --git a/usr.sbin/efitable/Makefile b/usr.sbin/efitable/Makefile new file mode 100644 index 000000000000..83db6d9f74a6 --- /dev/null +++ b/usr.sbin/efitable/Makefile @@ -0,0 +1,9 @@ +# $FreeBSD$ + +PROG= efitable +MAN= efitable.8 +SRCS= efitable.c + +LIBADD= xo + +.include diff --git a/usr.sbin/efitable/efitable.8 b/usr.sbin/efitable/efitable.8 new file mode 100644 index 000000000000..2bea4f9fb2c1 --- /dev/null +++ b/usr.sbin/efitable/efitable.8 @@ -0,0 +1,70 @@ +.\" +.\" Copyright (c) 2021 3mdeb Embedded Systems Consulting +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 10, 2021 +.Dt EFITABLE 8 +.Os +.Sh NAME +.Nm efitable +.Nd Dump UEFI tables +.Sh SYNOPSIS +.Nm +.Op Fl u Ar uuid | Fl t Ar name +.Op Fl -libxo +.Sh DESCRIPTION +This program prints data from +.Dq Unified Extensible Firmware Interface +.Pq UEFI +tables. +.Pp +The following options are available: +.Bl -tag -width 20m +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. +.It Fl t Ar name Fl -table Ar name +Specify the name of the table to print. +Currently supported tables: +.Pp +.Bl -tag -width indent -compact +.It Cm esrt +EFI System Resource Table +.It Cm prop +EFI Properties Table +.El +.It Fl Ar uuid Fl -uuid Ar uuid +Specify the UUID of the table to print. +.El +.Pp +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 14.0 . diff --git a/usr.sbin/efitable/efitable.c b/usr.sbin/efitable/efitable.c new file mode 100644 index 000000000000..367ce3f033b1 --- /dev/null +++ b/usr.sbin/efitable/efitable.c @@ -0,0 +1,239 @@ +/*- + * Copyright (c) 2021 3mdeb Embedded Systems Consulting + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define TABLE_MAX_LEN 30 +#define EFITABLE_XO_VERSION "1" + +static void efi_table_print_esrt(const void *data); +static void efi_table_print_prop(const void *data); +static void usage(void); + +struct efi_table_op { + char name[TABLE_MAX_LEN]; + void (*parse) (const void *); + struct uuid uuid; +}; + +static const struct efi_table_op efi_table_ops[] = { + { .name = "esrt", .parse = efi_table_print_esrt, + .uuid = EFI_TABLE_ESRT }, + { .name = "prop", .parse = efi_table_print_prop, + .uuid = EFI_PROPERTIES_TABLE } +}; + +int +main(int argc, char **argv) +{ + struct efi_get_table_ioc table = { + .buf = NULL, + .buf_len = 0, + .table_len = 0 + }; + int efi_fd, ch, rc = 1, efi_idx = -1; + bool got_table = false; + bool table_set = false; + bool uuid_set = false; + struct option longopts[] = { + { "uuid", required_argument, NULL, 'u' }, + { "table", required_argument, NULL, 't' }, + { NULL, 0, NULL, 0 } + }; + + argc = xo_parse_args(argc, argv); + if (argc < 0) + exit(EXIT_FAILURE); + + while ((ch = getopt_long(argc, argv, "u:t:", longopts, NULL)) != -1) { + switch (ch) { + case 'u': + { + char *uuid_str = optarg; + struct uuid uuid; + uint32_t status; + + uuid_set = 1; + + uuid_from_string(uuid_str, &uuid, &status); + if (status != uuid_s_ok) + xo_errx(EX_DATAERR, "invalid UUID"); + + for (size_t n = 0; n < nitems(efi_table_ops); n++) { + if (!memcmp(&uuid, &efi_table_ops[n].uuid, + sizeof(uuid))) { + efi_idx = n; + got_table = true; + break; + } + } + break; + } + case 't': + { + char *table_name = optarg; + + table_set = true; + + for (size_t n = 0; n < nitems(efi_table_ops); n++) { + if (!strcmp(table_name, + efi_table_ops[n].name)) { + efi_idx = n; + got_table = true; + break; + } + } + + if (!got_table) + xo_errx(EX_DATAERR, "unsupported efi table"); + + break; + } + default: + usage(); + } + } + + if (!table_set && !uuid_set) + xo_errx(EX_USAGE, "table is not set"); + + if (!got_table) + xo_errx(EX_DATAERR, "unsupported table"); + + efi_fd = open("/dev/efi", O_RDWR); + if (efi_fd < 0) + xo_err(EX_OSFILE, "/dev/efi"); + + table.uuid = efi_table_ops[efi_idx].uuid; + if (ioctl(efi_fd, EFIIOC_GET_TABLE, &table) == -1) + xo_err(EX_OSERR, NULL); + + table.buf = malloc(table.table_len); + table.buf_len = table.table_len; + + if (ioctl(efi_fd, EFIIOC_GET_TABLE, &table) == -1) + xo_err(EX_OSERR, NULL); + + efi_table_ops[efi_idx].parse(table.buf); + close(efi_fd); + + return (rc); +} + +static void +efi_table_print_esrt(const void *data) +{ + const struct efi_esrt_entry_v1 *entries_v1; + const struct efi_esrt_table *esrt; + + esrt = (const struct efi_esrt_table *)data; + + xo_set_version(EFITABLE_XO_VERSION); + xo_open_container("esrt"); + xo_emit("{Lwc:FwResourceCount}{:fw_resource_count/%u}\n", + esrt->fw_resource_count); + xo_emit("{Lwc:FwResourceCountMax}{:fw_resource_count_max/%u}\n", + esrt->fw_resource_count_max); + xo_emit("{Lwc:FwResourceVersion}{:fw_resource_version/%u}\n", + esrt->fw_resource_version); + xo_open_list("entries"); + xo_emit("\nEntries:\n"); + + entries_v1 = (const void *) esrt->entries; + for (uint32_t i = 0; i < esrt->fw_resource_count; i++) { + const struct efi_esrt_entry_v1 *e = &entries_v1[i]; + uint32_t status; + char *uuid; + + uuid_to_string(&e->fw_class, &uuid, &status); + if (status != uuid_s_ok) { + xo_errx(EX_DATAERR, "uuid_to_string error"); + } + + xo_open_instance("entries"); + xo_emit("\n"); + xo_emit("{P: }{Lwc:FwClass}{:fw_class/%s}\n", uuid); + xo_emit("{P: }{Lwc:FwType}{:fw_type/%u}\n", e->fw_type); + xo_emit("{P: }{Lwc:FwVersion}{:fw_version/%u}\n", + e->fw_version); + xo_emit("{P: }{Lwc:LowestSupportedFwVersion}" + "{:lowest_supported_fw_version/%u}\n", + e->lowest_supported_fw_version); + xo_emit("{P: }{Lwc:CapsuleFlags}{:capsule_flags/%#x}\n", + e->capsule_flags); + xo_emit("{P: }{Lwc:LastAttemptVersion" + "}{:last_attempt_version/%u}\n", e->last_attempt_version); + xo_emit("{P: }{Lwc:LastAttemptStatus" + "}{:last_attempt_status/%u}\n", e->last_attempt_status); + + xo_close_instance("entries"); + } + + xo_close_list("entries"); + xo_close_container("esrt"); + xo_finish(); +} + +static void +efi_table_print_prop(const void *data) +{ + const struct efi_prop_table *prop; + + prop = (const struct efi_prop_table *)data; + + xo_set_version(EFITABLE_XO_VERSION); + xo_open_container("prop"); + xo_emit("{Lwc:Version}{:version/%#x}\n", prop->version); + xo_emit("{Lwc:Length}{:length/%u}\n", prop->length); + xo_emit("{Lwc:MemoryProtectionAttribute}" + "{:memory_protection_attribute/%#lx}\n", + prop->memory_protection_attribute); + xo_close_container("prop"); + xo_finish(); +} + +static void usage(void) +{ + xo_error("usage: efitable [-d uuid | -t name] [--libxo]\n"); + exit(EX_USAGE); +} From owner-dev-commits-src-main@freebsd.org Sat Jul 3 21:12:04 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B984658DDD; Sat, 3 Jul 2021 21:12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHPlm2yy5z4lpH; Sat, 3 Jul 2021 21:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 4CA622E330; Sat, 3 Jul 2021 21:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 163LC4jD056427; Sat, 3 Jul 2021 21:12:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 163LC4n4056426; Sat, 3 Jul 2021 21:12:04 GMT (envelope-from git) Date: Sat, 3 Jul 2021 21:12:04 GMT Message-Id: <202107032112.163LC4n4056426@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: f28455344483 - main - libalias: Fix API bug on initialization MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f28455344483310cfd1aa5c0bdd4d014810c0e32 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 21:12:04 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=f28455344483310cfd1aa5c0bdd4d014810c0e32 commit f28455344483310cfd1aa5c0bdd4d014810c0e32 Author: Lutz Donnerhacke AuthorDate: 2021-07-03 21:03:07 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-07-03 21:03:07 +0000 libalias: Fix API bug on initialization The kernel part of ipfw(8) does initialize LibAlias uncondistionally with an zeroized port range (allowed ports from 0 to 0). During restucturing of libalias, port ranges are used everytime and are therefor initialized with different values than zero. The secondary initialization from ipfw (and probably others) overrides the new default values and leave the instance in an unfunctional state. The obvious solution is to detect such reinitializations and use the new default value instead. MFC after: 3 days --- sys/netinet/libalias/alias_db.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c index 9f8c6064d2a7..5b53067705bf 100644 --- a/sys/netinet/libalias/alias_db.c +++ b/sys/netinet/libalias/alias_db.c @@ -2048,9 +2048,15 @@ LibAliasSetAliasPortRange(struct libalias *la, u_short port_low, u_short port_high) { LIBALIAS_LOCK(la); - la->aliasPortLower = port_low; - /* Add 1 to the aliasPortLength as modulo has range of 1 to n-1 */ - la->aliasPortLength = port_high - port_low + 1; + if (port_low) { + la->aliasPortLower = port_low; + /* Add 1 to the aliasPortLength as modulo has range of 1 to n-1 */ + la->aliasPortLength = port_high - port_low + 1; + } else { + /* Set default values */ + la->aliasPortLower = 0x8000; + la->aliasPortLength = 0x8000; + } LIBALIAS_UNLOCK(la); } From owner-dev-commits-src-main@freebsd.org Sun Jul 4 13:54:41 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EFBE3664CE3; Sun, 4 Jul 2021 13:54: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHr0d6Gv7z58Kn; Sun, 4 Jul 2021 13:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 BFB1613C5C; Sun, 4 Jul 2021 13:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 164DsfRM082664; Sun, 4 Jul 2021 13:54:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164DsfWs082663; Sun, 4 Jul 2021 13:54:41 GMT (envelope-from git) Date: Sun, 4 Jul 2021 13:54:41 GMT Message-Id: <202107041354.164DsfWs082663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 86d0d3aadb48 - main - freebsd-update: Update URL of supported platforms information 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/main X-Git-Reftype: branch X-Git-Commit: 86d0d3aadb48a9a917167078ed197a061179fa4f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 13:54:42 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=86d0d3aadb48a9a917167078ed197a061179fa4f commit 86d0d3aadb48a9a917167078ed197a061179fa4f Author: Li-Wen Hsu AuthorDate: 2021-07-04 13:45:08 +0000 Commit: Li-Wen Hsu CommitDate: 2021-07-04 13:45:08 +0000 freebsd-update: Update URL of supported platforms information MFC after: 3 days --- usr.sbin/freebsd-update/freebsd-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 7f9b06f0221f..f82ec7d7730c 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -1041,7 +1041,7 @@ fetch_pick_server () { This may be because upgrading from this platform (${ARCH}) or release (${RELNUM}) is unsupported by `basename $0`. Only platforms with Tier 1 support can be upgraded by `basename $0`. - See https://www.freebsd.org/platforms/index.html for more info. + See https://www.freebsd.org/platforms/ for more info. If unsupported, FreeBSD must be upgraded by source. EOF From owner-dev-commits-src-main@freebsd.org Sun Jul 4 13:55:49 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E106665823; Sun, 4 Jul 2021 13:55:49 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHr1w2WDqz58TG; Sun, 4 Jul 2021 13:55:47 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 164Dte9Q021028; Sun, 4 Jul 2021 06:55:40 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 164Dtexu021027; Sun, 4 Jul 2021 06:55:40 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202107041355.164Dtexu021027@gndrsh.dnsmgr.net> Subject: Re: git: 5bd70f050072 - main - stress2: Improve cleanup code In-Reply-To: <202107020525.1625PhAd078350@gitrepo.freebsd.org> To: Peter Holm Date: Sun, 4 Jul 2021 06:55:40 -0700 (PDT) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4GHr1w2WDqz58TG X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [3.90 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[69.59.192.140:from]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[dnsmgr.net]; SPAMHAUS_ZRD(0.00)[69.59.192.140:from:127.0.2.255]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; RCVD_TLS_LAST(0.00)[]; NEURAL_SPAM_SHORT(1.00)[0.999]; NEURAL_SPAM_LONG(1.00)[1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 13:55:49 -0000 > The branch main has been updated by pho: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5bd70f050072bced1f0b7a566932857b3dd506ef > > commit 5bd70f050072bced1f0b7a566932857b3dd506ef > Author: Peter Holm > AuthorDate: 2021-07-02 05:22:18 +0000 > Commit: Peter Holm > CommitDate: 2021-07-02 05:22:18 +0000 > > stress2: Improve cleanup code > --- > tools/test/stress2/misc/mmap3.sh | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tools/test/stress2/misc/mmap3.sh b/tools/test/stress2/misc/mmap3.sh > index bc5905dd920e..9175b77842f3 100755 > --- a/tools/test/stress2/misc/mmap3.sh > +++ b/tools/test/stress2/misc/mmap3.sh > @@ -42,11 +42,12 @@ while [ `date '+%s'` -lt $((start + 5 * 60)) ]; do > ./mmap3 > done > echo "Expect Segmentation faults" > +trap "rm -f /tmp/mmap3.0*" EXIT INT > start=`date '+%s'` > while [ `date '+%s'` -lt $((start + 5 * 60)) ]; do > ./mmap3 random > done > -rm -f mmap3 mmap3.core /tmp/mmap.0* > +rm -f mmap3 mmap3.core /tmp/mmap3.0* I have never liked the use of * in a "cleanup" when there is more information about the form of the file name: mmap3.??????.???? would be better, and it also fixes the assumption that there is always a leading zero, which the format string does not specify (yes, it says to leading zero fill, but that does not mean it shall always start with a zero). A more precise: mmap3.[0-9][0-9][0-9][0-9][0-9][0-9].[0-9][0-9][0-9][0-9] could also be used, but is kinda long winded. > exit > > EOF > @@ -102,7 +103,7 @@ work(int nr) > p = (void *)STARTADDR; > len = ADRSPACE; > > - sprintf(path, "/tmp/mmap.%06d.%04d", getpid(), nr); > + sprintf(path, "/tmp/mmap3.%06d.%04d", getpid(), nr); > if ((fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0622)) == -1) > err(1,"open()"); > if (ftruncate(fd, len) == -1) > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Sun Jul 4 14:01:20 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 527FF66565B; Sun, 4 Jul 2021 14:01: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHr8J202zz58pR; Sun, 4 Jul 2021 14:01:20 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 2CBC013B48; Sun, 4 Jul 2021 14:01:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 164E1Keh094611; Sun, 4 Jul 2021 14:01:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164E1KXH094610; Sun, 4 Jul 2021 14:01:20 GMT (envelope-from git) Date: Sun, 4 Jul 2021 14:01:20 GMT Message-Id: <202107041401.164E1KXH094610@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: ffe6afc4f012 - main - freebsd-tips: Use a fetchable URL as example 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/main X-Git-Reftype: branch X-Git-Commit: ffe6afc4f0121f1909f2fa88694228f771dd3fcb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 14:01:20 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=ffe6afc4f0121f1909f2fa88694228f771dd3fcb commit ffe6afc4f0121f1909f2fa88694228f771dd3fcb Author: Li-Wen Hsu AuthorDate: 2021-07-04 14:00:46 +0000 Commit: Li-Wen Hsu CommitDate: 2021-07-04 14:00:46 +0000 freebsd-tips: Use a fetchable URL as example MFC after: 3 days --- usr.bin/fortune/datfiles/freebsd-tips | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips index cbbaff9eb84f..c747c689791b 100644 --- a/usr.bin/fortune/datfiles/freebsd-tips +++ b/usr.bin/fortune/datfiles/freebsd-tips @@ -439,7 +439,7 @@ You can use "pkg info" to see a list of packages you have installed. % You can use the 'fetch' command to retrieve files over ftp, http or https. - fetch https://www.FreeBSD.org/index.html + fetch https://www.FreeBSD.org/images/beastie.png will download the front page of the FreeBSD web site. % From owner-dev-commits-src-main@freebsd.org Sun Jul 4 14:03:47 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34706665957; Sun, 4 Jul 2021 14:03:47 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHrC55yZmz596L; Sun, 4 Jul 2021 14:03:45 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 164E3iWp021064; Sun, 4 Jul 2021 07:03:44 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 164E3i0C021063; Sun, 4 Jul 2021 07:03:44 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202107041403.164E3i0C021063@gndrsh.dnsmgr.net> Subject: Re: git: ef790cc7407e - main - hdaa: update pin patch configurations In-Reply-To: <202107030617.1636H22I062745@gitrepo.freebsd.org> To: Warner Losh Date: Sun, 4 Jul 2021 07:03:44 -0700 (PDT) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4GHrC55yZmz596L X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [3.89 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.99)[0.995]; SPAMHAUS_ZRD(0.00)[69.59.192.140:from:127.0.2.255]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[69.59.192.140:from]; NEURAL_SPAM_LONG(1.00)[1.000]; NEURAL_SPAM_SHORT(1.00)[0.997]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 14:03:47 -0000 > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ef790cc7407e827db9563d08a52a71ab36436986 > > commit ef790cc7407e827db9563d08a52a71ab36436986 > Author: K Staring > AuthorDate: 2021-07-03 06:15:49 +0000 > Commit: Warner Losh > CommitDate: 2021-07-03 06:15:49 +0000 > > hdaa: update pin patch configurations > > A number of structural changes: > - Use decimal nid numbers instead of hex > - updated the branch to incoorporate the suggestions made in the > ALC280 pull request github thread > - Convert magic pin values into strings. > - Also update hdaa_patches to use clearer enums.. > - made pin patch type enum clearer, add macro for 'string' type > patches > - Added pin_patch structures to separate data from logic. > - Integrated Realtek patches into new structure. > > These incorporate fixes for ALC255, ALC256, ALC260, ALC262, ALC268, > ALC269, ALC280, ALC282, ALC283, ALC286, ALC290, ALC293, ALC296, ALC2880 > > And have definitions for a number of Dell and HP laptops. > > Much of this data has been mined fromt he tables in the Linux driver. > > imp squashed these into one commit because the changes from the github > pull requests no longer cleanly apply individually and made light style > changes after feedback from jhb. > > Pull Request: https://github.com/freebsd/freebsd-src/pull/139 > Pull Request: https://github.com/freebsd/freebsd-src/pull/140 > Pull Request: https://github.com/freebsd/freebsd-src/pull/141 > Pull Request: https://github.com/freebsd/freebsd-src/pull/142 > Pull Request: https://github.com/freebsd/freebsd-src/pull/143 > Pull Request: https://github.com/freebsd/freebsd-src/pull/144 > Pull Request: https://github.com/freebsd/freebsd-src/pull/145 > Pull Request: https://github.com/freebsd/freebsd-src/pull/146 > Pull Request: https://github.com/freebsd/freebsd-src/pull/147 > Pull Request: https://github.com/freebsd/freebsd-src/pull/148 > Pull Request: https://github.com/freebsd/freebsd-src/pull/149 > Pull Request: https://github.com/freebsd/freebsd-src/pull/150 > Differential Revision: https://reviews.freebsd.org/D30619 Is there any intent to merge this to stable-13/12? The out of box "audio" experience on many of the "fixed" devices in this as it stands now is poor, and iirc this fixes many of the issues with "no sound" when using anything but the builtin speakers. Thanks, Rod > --- > sys/dev/sound/pci/hda/hdaa_patches.c | 259 +++----- > sys/dev/sound/pci/hda/hdac.h | 145 ++++- > sys/dev/sound/pci/hda/pin_patch.h | 121 ++++ > sys/dev/sound/pci/hda/pin_patch_realtek.h | 992 ++++++++++++++++++++++++++++++ > 4 files changed, 1327 insertions(+), 190 deletions(-) > > diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c > index 590c9e4d46fb..69299ee4344f 100644 > --- a/sys/dev/sound/pci/hda/hdaa_patches.c > +++ b/sys/dev/sound/pci/hda/hdaa_patches.c > @@ -44,6 +44,9 @@ > #include > #include > > +#include "pin_patch.h" > +#include "pin_patch_realtek.h" > + > SND_DECLARE_FILE("$FreeBSD$"); > > static const struct { > @@ -145,10 +148,28 @@ static const struct { > 0 } > }; > > +static struct pin_patch_t * > +match_pin_patches(int vendor_id, int vendor_subid) > +{ > + for (int ci = 0; ci < nitems(realtek_model_pin_patches); ci++) { > + struct hdaa_model_pin_patch_t *p = &realtek_model_pin_patches[ci]; > + if (vendor_id != p->id) > + continue; > + for (struct model_pin_patch_t *pp = p->patches; pp->models; pp++) { > + for (struct pin_machine_model_t *model = pp->models; model->id != 0; model++) { > + if (vendor_subid == model->id) > + return (pp->pin_patches); > + } > + } > + } > + > + return (0); > +} > + > static void > hdac_pin_patch(struct hdaa_widget *w) > { > - const char *patch = NULL; > + const char *patch_str = NULL; > uint32_t config, orig, id, subid; > nid_t nid = w->nid; > > @@ -156,54 +177,7 @@ hdac_pin_patch(struct hdaa_widget *w) > id = hdaa_codec_id(w->devinfo); > subid = hdaa_card_id(w->devinfo); > > - /* XXX: Old patches require complete review. > - * Now they may create more problem then solve due to > - * incorrect associations. > - */ > - if (id == HDA_CODEC_ALC880 && subid == LG_LW20_SUBVENDOR) { > - switch (nid) { > - case 26: > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > - break; > - case 27: > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT; > - break; > - default: > - break; > - } > - } else if (id == HDA_CODEC_ALC880 && > - (subid == CLEVO_D900T_SUBVENDOR || > - subid == ASUS_M5200_SUBVENDOR)) { > - /* > - * Super broken BIOS > - */ > - switch (nid) { > - case 24: /* MIC1 */ > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; > - break; > - case 25: /* XXX MIC2 */ > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; > - break; > - case 26: /* LINE1 */ > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > - break; > - case 27: /* XXX LINE2 */ > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > - break; > - case 28: /* CD */ > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_CD; > - break; > - } > - } else if (id == HDA_CODEC_ALC883 && > - (subid == MSI_MS034A_SUBVENDOR || > - HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid))) { > + if (id == HDA_CODEC_ALC883 && HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid)) { > switch (nid) { > case 25: > config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > @@ -247,42 +221,6 @@ hdac_pin_patch(struct hdaa_widget *w) > config |= HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE; > break; > } > - } else if (id == HDA_CODEC_ALC861 && subid == > - ASUS_W6F_SUBVENDOR) { > - switch (nid) { > - case 11: > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); > - break; > - case 12: > - case 14: > - case 16: > - case 31: > - case 32: > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); > - break; > - case 15: > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); > - break; > - } > - } else if (id == HDA_CODEC_ALC861 && subid == > - UNIWILL_9075_SUBVENDOR) { > - switch (nid) { > - case 15: > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); > - break; > - } > } > > /* New patches */ > @@ -290,10 +228,10 @@ hdac_pin_patch(struct hdaa_widget *w) > subid == LENOVO_X300_SUBVENDOR) { > switch (nid) { > case 17: /* Headphones with redirection */ > - patch = "as=1 seq=15"; > + patch_str = "as=1 seq=15"; > break; > case 20: /* Two mics together */ > - patch = "as=2 seq=15"; > + patch_str = "as=2 seq=15"; > break; > } > } else if (id == HDA_CODEC_AD1986A && > @@ -302,60 +240,45 @@ hdac_pin_patch(struct hdaa_widget *w) > subid == ASUS_P5PL2_SUBVENDOR)) { > switch (nid) { > case 26: /* Headphones with redirection */ > - patch = "as=1 seq=15"; > + patch_str = "as=1 seq=15"; > break; > case 28: /* 5.1 out => 2.0 out + 1 input */ > - patch = "device=Line-in as=8 seq=1"; > + patch_str = "device=Line-in as=8 seq=1"; > break; > case 29: /* Can't use this as input, as the only available mic > * preamplifier is busy by front panel mic (nid 31). > * If you want to use this rear connector as mic input, > * you have to disable the front panel one. */ > - patch = "as=0"; > + patch_str = "as=0"; > break; > case 31: /* Lot of inputs configured with as=15 and unusable */ > - patch = "as=8 seq=3"; > + patch_str = "as=8 seq=3"; > break; > case 32: > - patch = "as=8 seq=4"; > + patch_str = "as=8 seq=4"; > break; > case 34: > - patch = "as=8 seq=5"; > + patch_str = "as=8 seq=5"; > break; > case 36: > - patch = "as=8 seq=6"; > - break; > - } > - } else if (id == HDA_CODEC_ALC260 && > - HDA_DEV_MATCH(SONY_S5_SUBVENDOR, subid)) { > - switch (nid) { > - case 16: > - patch = "seq=15 device=Headphones"; > - break; > - } > - } else if (id == HDA_CODEC_ALC268) { > - if (subid == ACER_T5320_SUBVENDOR) { > - switch (nid) { > - case 20: /* Headphones Jack */ > - patch = "as=1 seq=15"; > + patch_str = "as=8 seq=6"; > break; > } > - } > } else if (id == HDA_CODEC_CX20561 && > subid == LENOVO_B450_SUBVENDOR) { > switch (nid) { > case 22: > - patch = "as=1 seq=15"; > + patch_str = "as=1 seq=15"; > break; > } > } else if (id == HDA_CODEC_CX20561 && > subid == LENOVO_T400_SUBVENDOR) { > switch (nid) { > case 22: > - patch = "as=1 seq=15"; > + patch_str = "as=1 seq=15"; > break; > case 26: > - patch = "as=1 seq=0"; > + patch_str = "as=1 seq=0"; > break; > } > } else if (id == HDA_CODEC_CX20590 && > @@ -366,102 +289,62 @@ hdac_pin_patch(struct hdaa_widget *w) > subid == LENOVO_G580_SUBVENDOR)) { > switch (nid) { > case 25: > - patch = "as=1 seq=15"; > + patch_str = "as=1 seq=15"; > break; > /* > * Group onboard mic and headphone mic > * together. Fixes onboard mic. > */ > case 27: > - patch = "as=2 seq=15"; > + patch_str = "as=2 seq=15"; > break; > case 35: > - patch = "as=2"; > - break; > - } > - } else if (id == HDA_CODEC_ALC269 && > - (subid == LENOVO_X1CRBN_SUBVENDOR || > - subid == LENOVO_T430_SUBVENDOR || > - subid == LENOVO_T430S_SUBVENDOR || > - subid == LENOVO_T530_SUBVENDOR)) { > - switch (nid) { > - case 21: > - patch = "as=1 seq=15"; > - break; > - } > - } else if (id == HDA_CODEC_ALC285 && > - (subid == LENOVO_X120KH_SUBVENDOR || > - subid == LENOVO_X120QD_SUBVENDOR)) { > - switch (nid) { > - case 33: > - patch = "as=1 seq=15"; > - break; > - } > - } else if (id == HDA_CODEC_ALC269 && > - subid == ASUS_UX31A_SUBVENDOR) { > - switch (nid) { > - case 33: > - patch = "as=1 seq=15"; > - break; > - } > - } else if (id == HDA_CODEC_ALC892 && > - subid == INTEL_DH87RL_SUBVENDOR) { > - switch (nid) { > - case 27: > - patch = "as=1 seq=15"; > - break; > - } > - } else if (id == HDA_CODEC_ALC292 && > - subid == LENOVO_X120BS_SUBVENDOR) { > - switch (nid) { > - case 21: > - patch = "as=1 seq=15"; > - break; > - } > - } else if (id == HDA_CODEC_ALC295 && subid == HP_AF006UR_SUBVENDOR) { > - switch (nid) { > - case 18: > - patch = "as=2"; > - break; > - case 25: > - patch = "as=2 seq=15"; > - break; > - case 33: > - patch = "as=1 seq=15"; > - break; > - } > - } else if (id == HDA_CODEC_ALC298 && HDA_DEV_MATCH(LENOVO_ALL_SUBVENDOR, subid)) { > - switch (nid) { > - case 23: > - config = 0x03a1103f; > - break; > - case 33: > - config = 0x2121101f; > - break; > - } > - } else if (id == HDA_CODEC_ALC298 && subid == DELL_XPS9560_SUBVENDOR) { > - switch (nid) { > - case 24: > - config = 0x01a1913c; > - break; > - case 26: > - config = 0x01a1913d; > + patch_str = "as=2"; > break; > } > } else if (id == HDA_CODEC_ALC256 && (subid == DELL_I7577_SUBVENDOR || > subid == DELL_L7480_SUBVENDOR)) { > switch (nid) { > case 20: > - patch = "as=1 seq=0"; > + patch_str = "as=1 seq=0"; > break; > case 33: > - patch = "as=1 seq=15"; > + patch_str = "as=1 seq=15"; > break; > } > + } else { > + /* > + * loop over hdaa_model_pin_patch > + */ > + struct pin_patch_t *pin_patches = NULL; > + > + pin_patches = match_pin_patches(id, subid); > + > + if (pin_patches != NULL) { > + for (struct pin_patch_t *patch = pin_patches; patch->type; patch++) { > + if (nid == patch->nid) { > + switch (patch->type) { > + case PIN_PATCH_TYPE_STRING: > + patch_str = patch->patch.string; > + case PIN_PATCH_TYPE_MASK: > + config &= ~patch->patch.mask[0]; > + config |= patch->patch.mask[1]; > + break; > + case PIN_PATCH_TYPE_OVERRIDE: > + config = patch->patch.override; > + break; > + default: > + /* should panic hard */ > + break; > + } > + break; > + } > + } > + } > } > > - if (patch != NULL) > - config = hdaa_widget_pin_patch(config, patch); > + if (patch_str != NULL) > + config = hdaa_widget_pin_patch(config, patch_str); > HDA_BOOTVERBOSE( > if (config != orig) > device_printf(w->devinfo->dev, > diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h > index 8e427d3412da..611cb98badd8 100644 > --- a/sys/dev/sound/pci/hda/hdac.h > +++ b/sys/dev/sound/pci/hda/hdac.h > @@ -61,6 +61,7 @@ > #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) > #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) > #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) > +#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) > #define HDA_INTEL_JLK HDA_MODEL_CONSTRUCT(INTEL, 0x38c8) > #define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) > #define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) > @@ -91,7 +92,16 @@ > #define HDA_INTEL_CMLKLP HDA_MODEL_CONSTRUCT(INTEL, 0x02c8) > #define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) > #define HDA_INTEL_TGLK HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8) > -#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) > +#define INTEL_A100ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xa100) > +#define INTEL_D400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd400) > +#define INTEL_D401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd401) > +#define INTEL_D402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd402) > +#define INTEL_E305ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe305) > +#define INTEL_E308ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe308) > +#define INTEL_E224ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe224) > +#define INTEL_E400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe400) > +#define INTEL_E401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe401) > +#define INTEL_E402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe402) > #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) > > /* Nvidia */ > @@ -198,6 +208,10 @@ > > /* HP/Compaq */ > #define HP_VENDORID 0x103c > +#define HP_Z200_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x103c) > +#define HP_225AID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x225a) > +#define HP_2272ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2272) > +#define HP_2273ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2273) > #define HP_V3000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30b5) > #define HP_NX7400_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a2) > #define HP_NX6310_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30aa) > @@ -207,6 +221,7 @@ > #define HP_DV5000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a5) > #define HP_DC7700S_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2801) > #define HP_DC7700_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2802) > +#define HP_DC5750_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x280a) > #define HP_AF006UR_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x83a2) > #define HP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0xffff) > /* What is wrong with XN 2563 anyway? (Got the picture ?) */ > @@ -222,7 +237,28 @@ > #define DELL_L7480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07a0) > #define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7) > #define DELL_OPLX745_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01da) > +#define DELL_05F4ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f4) > +#define DELL_05F5ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f5) > +#define DELL_05F6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f6) > +#define DELL_V5470_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0615) > +#define DELL_V5470_1_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0616) > +#define DELL_064AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064a) > +#define DELL_064BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064b) > +#define DELL_9020M_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0669) > +#define DELL_V5480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x069a) > +#define DELL_06D9ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06d9) > +#define DELL_06DAID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06da) > +#define DELL_06DBID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06db) > +#define DELL_06DDID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06dd) > +#define DELL_06DEID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06de) > +#define DELL_06DFID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06df) > +#define DELL_06E0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06e0) > +#define DELL_7559_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0706) > +#define DELL_7000_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0798) > #define DELL_XPS9560_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07be) > +#define DELL_E7240_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05ca) > +#define DELL_164AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164a) > +#define DELL_164BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164b) > #define DELL_I7577_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0802) > #define DELL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0xffff) > > @@ -233,34 +269,66 @@ > > /* Acer */ > #define ACER_VENDORID 0x1025 > +#define ACER_0070ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0070) > +#define ACER_0077ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0077) > +#define ACER_0078ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0078) > +#define ACER_0087ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0087) > #define ACER_A5050_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x010f) > #define ACER_A4520_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0127) > #define ACER_A4710_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x012f) > #define ACER_A4715_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0133) > +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) > #define ACER_3681WXM_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0110) > #define ACER_T6292_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011b) > #define ACER_T5320_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011f) > +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) > +#define ACER_AC700_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x047c) > +#define ACER_V5_571G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x072d) > +#define ACER_AO725_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0740) > +#define ACER_AO756_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0742) > +#define ACER_E1_472_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0762) > +#define ACER_E1_572_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0775) > +#define ACER_V5_573G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x079b) > +#define ACER_CB_14_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x106d) > +#define ACER_V5_122P_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa80d) > +#define ACER_APFV_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa884) > +#define ACER_E309ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe309) > +#define ACER_E310ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe310) > #define ACER_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xffff) > > /* Asus */ > #define ASUS_VENDORID 0x1043 > +#define ASUS_X540A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x103e) > +#define ASUS_X540SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c0) > +#define ASUS_X556UR_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x11c0) > +#define ASUS_W5A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c3) > +#define ASUS_X540LA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10d0) > #define ASUS_A8X_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1153) > #define ASUS_U5F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) > #define ASUS_W6F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) > +#define ASUS_X541SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12e0) > +#define ASUS_X541UV_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12f0) > #define ASUS_A7M_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1323) > #define ASUS_F3JC_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1338) > #define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339) > +#define ASUS_Z550SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13b0) > #define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2) > #define ASUS_UX31A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1517) > +#define ASUS_Z71V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1964) > #define ASUS_W2J_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1971) > #define ASUS_M5200_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1993) > +#define ASUS_G73JW_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a13) > +#define ASUS_X705UD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a30) > +#define ASUS_Z550MA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1bbd) > +#define ASUS_X555UB_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1ccd) > #define ASUS_P5PL2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x817f) > #define ASUS_P1AH2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) > #define ASUS_M2NPVMX_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) > #define ASUS_M2V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81e7) > #define ASUS_P5BWD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81ec) > #define ASUS_M2N_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8234) > -#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(NVIDIA, 0xcb84) > +#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xcb84) > +#define ASUS_X101CH_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8516) > #define ASUS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xffff) > > /* IBM / Lenovo */ > @@ -287,7 +355,11 @@ > #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) > #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) > #define LENOVO_T530_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6) > +#define LENOVO_X230_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fa) > +#define LENOVO_X230T_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2203) > +#define LENOVO_T431S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2208) > #define LENOVO_G580_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3977) > +#define LENOVO_3000_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e) > #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) > > /* Samsung */ > @@ -307,8 +379,19 @@ > /* Sony */ > #define SONY_VENDORID 0x104d > #define SONY_S5_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81cc) > +#define SONY_81A0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81a0) > +#define SONY_81D6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81d6) > +#define SONY_81BBID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81bb) > +#define SONY_VAIO_TX_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81e2) > +#define SONY_VAIO_S13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x9099) > +#define SONY_VAIO_P11_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b5) > +#define SONY_VAIO_P13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b6) > #define SONY_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0xffff) > > +/* Tyan? */ > +#define TYAN_VENDORID 0x10f1 > +#define TYAN_N6650W_SUBVENDOR HDA_MODEL_CONSTRUCT(TYAN, 0x2915) > + > /* > * Apple Intel MacXXXX seems using Sigmatel codec/vendor id > * instead of their own, which is beyond my comprehension > @@ -322,18 +405,32 @@ > /* LG Electronics */ > #define LG_VENDORID 0x1854 > #define LG_LW20_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0018) > +#define LG_M1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x003b) > +#define LG_P1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x005f) > +#define LG_W1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0068) > +#define LG_LW25_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0077) > #define LG_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0xffff) > > /* Fujitsu Siemens */ > #define FS_VENDORID 0x1734 > #define FS_PA1510_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b8) > #define FS_SI1848_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10cd) > +#define FS_AMILO_M1437_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x107c) > +#define FS_AMILO_M1451G_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1094) > +#define FS_AMILO_PI1556_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b0) > +#define FS_AMILO_XI1526_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10ac) > +#define FS_H270_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1147) > #define FS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0xffff) > > /* Fujitsu Limited */ > #define FL_VENDORID 0x10cf > #define FL_S7020D_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1326) > +#define FL_LB_S7110_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1397) > #define FL_U1010_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x142d) > +#define FL_1475ID_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1475) > +#define FL_LB_U904_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1845) > +#define FL_LB_T731_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x15dc) > +#define FL_LB_E725_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1757) > #define FL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0xffff) > > /* Toshiba */ > @@ -346,18 +443,61 @@ > #define MSI_VENDORID 0x1462 > #define MSI_MS1034_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x0349) > #define MSI_MS034A_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x034a) > +#define MSI_1150ID_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x1150) > +#define MSI_MS_B120_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xb120) > #define MSI_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xffff) > > /* Giga-Byte Technology */ > #define GB_VENDORID 0x1458 > #define GB_G33S2H_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa022) > +#define GB_K8_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa102) > +#define GB_BXBT2807_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xfa53) > #define GP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xffff) > > /* Uniwill ? */ > #define UNIWILL_VENDORID 0x1584 > #define UNIWILL_9075_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9075) > +#define UNIWILL_9050_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9050) > +#define UNIWILL_9054_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9054) > +#define UNIWILL_9070_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9070) > #define UNIWILL_9080_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9080) > > +/* Coeus / Elitegroup */ > +#define COEUS_VENDORID 0x1019 > +#define COEUS_G610P_SUBVENDOR HDA_MODEL_CONSTRUCT(COEUS, 0x0f69) > +#define COEUS_A880ID_SUBVENDOR HDA_MODEL_CONSTRUCT(COEUS, 0xa880) > + > +/* Arima */ > +#define ARIMA_VENDORID 0x161f > +#define ARIMA_W810_SUBVENDOR HDA_MODEL_CONSTRUCT(ARIMA, 0x0f69) > + > +/* Shuttle Computer */ > +#define SHUTTLE_VENDORID 0x1039 > +#define SHUTTLE_ST20G5_SUBVENDOR HDA_MODEL_CONSTRUCT(SHUTTLE, 0xc790) > + > +/* First International Computer */ > +#define FIC_VENDORID 0x1509 > +#define FIC_P4M_SUBVENDOR HDA_MODEL_CONSTRUCT(FIC, 0x925d) > + > +/* Gateway 2000 */ > +#define GATEWAY_VENDORID 0x107b > +#define GATEWAY_3032ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3032) > +#define GATEWAY_3033ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3033) > +#define GATEWAY_4039ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x4039) > + > +/* Biostar */ > +#define BIOSTAR_VENDORID 0x1565 > +#define BIOSTAR_8202ID_SUBVENDOR HDA_MODEL_CONSTRUCT(BIOSTAR, 0x8202) > + > +/* EPoX Computer Co., Ltd. */ > +#define EPOX_VENDORID 0x1695 > +#define EPOX_400DID_SUBVENDOR HDA_MODEL_CONSTRUCT(EPOX, 0x400d) > +#define EPOX_EP5LDA_SUBVENDOR HDA_MODEL_CONSTRUCT(EPOX, 0x4012) > + > +/* AOpen */ > +#define AOPEN_VENDORID 0xa0a0 > +#define AOPEN_I915GMMHFS_SUBVENDOR HDA_MODEL_CONSTRUCT(AOPEN, 0x8202) > + > /* All codecs you can eat... */ > #define HDA_CODEC_CONSTRUCT(vendor, id) \ > (((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0xffff)) > @@ -390,6 +530,7 @@ > #define HDA_CODEC_ALC268 HDA_CODEC_CONSTRUCT(REALTEK, 0x0268) > #define HDA_CODEC_ALC269 HDA_CODEC_CONSTRUCT(REALTEK, 0x0269) > #define HDA_CODEC_ALC270 HDA_CODEC_CONSTRUCT(REALTEK, 0x0270) > +#define HDA_CODEC_ALC271 HDA_CODEC_CONSTRUCT(REALTEK, 0x0271) > #define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272) > #define HDA_CODEC_ALC273 HDA_CODEC_CONSTRUCT(REALTEK, 0x0273) > #define HDA_CODEC_ALC274 HDA_CODEC_CONSTRUCT(REALTEK, 0x0274) > diff --git a/sys/dev/sound/pci/hda/pin_patch.h b/sys/dev/sound/pci/hda/pin_patch.h > new file mode 100644 > index 000000000000..8e2c9875906f > --- /dev/null > +++ b/sys/dev/sound/pci/hda/pin_patch.h > @@ -0,0 +1,121 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2018 Khamba Staring > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > +#ifndef PIN_PATCH_H > +#define PIN_PATCH_H > + > +#include "hdac.h" > + > +#define PIN_SUBVENDOR(sv) { .id = sv } > + > + > +#define PIN_PATCH_STRING(n, patchstr) { \ > + .nid = n, \ > + .type = PIN_PATCH_TYPE_STRING, \ > + .patch.string = patchstr \ > +} > +#define PIN_OVERRIDE(n, newvalue) { \ > + .nid = n, \ > + .type = PIN_PATCH_TYPE_OVERRIDE, \ > + .patch.override = newvalue \ > +} > +#define PIN_PATCH_NOT_APPLICABLE(n) \ > + PIN_PATCH_STRING(n, "as=15 misc=1 color=Black ctype=1/8 device=Speaker loc=Rear conn=None") > +#define PIN_PATCH_HP_OUT(n) \ > + PIN_PATCH_STRING(n, "seq=15 as=1 color=Green ctype=1/8 device=Headphones loc=Rear") > +#define PIN_PATCH_HP(n) \ > + PIN_PATCH_STRING(n, "seq=15 as=1 misc=1 color=Green ctype=1/8 device=Headphones loc=Rear") > +#define PIN_PATCH_SPEAKER(n) \ > + PIN_PATCH_STRING(n, "as=2 misc=1 ctype=ATAPI loc=Onboard conn=Fixed") > +#define PIN_PATCH_BASS_SPEAKER(n) \ > + PIN_PATCH_STRING(n, "as=3 misc=1 ctype=ATAPI loc=Onboard conn=Fixed") > +#define PIN_PATCH_MIC_IN(n) \ > + PIN_PATCH_STRING(n, "as=5 misc=9 color=Pink ctype=1/8 device=Mic loc=Rear") > +#define PIN_PATCH_MIC_INTERNAL(n) \ > + PIN_PATCH_STRING(n, "as=6 misc=1 ctype=Digital device=Mic loc=Internal conn=Fixed") > +#define PIN_PATCH_MIC_FRONT(n) \ > + PIN_PATCH_STRING(n, "as=4 misc=12 color=Pink ctype=1/8 device=Mic loc=Front") > +#define PIN_PATCH_LINE_IN(n) \ > + PIN_PATCH_STRING(n, "seq=1 as=3 color=Blue ctype=1/8 device=Line-in loc=Rear") > +#define PIN_PATCH_LINE_OUT(n) \ > + PIN_PATCH_STRING(n, "as=1 color=Green ctype=1/8 loc=Rear") > +#define PIN_PATCH_SPDIF_OUT(n) \ > + PIN_PATCH_STRING(n, "as=4 misc=1 color=Green ctype=Optical device=SPDIF-out loc=Rear") > +#define PIN_PATCH_JACK_WO_DETECT(n) \ > + PIN_PATCH_STRING(n, "seq=12 as=3 misc=1 color=Pink ctype=1/8 device=Mic loc=Rear") > +#define PIN_PATCH_HPMIC_WO_DETECT(n) \ > + PIN_PATCH_STRING(n, "seq=13 as=3 misc=1 color=Pink ctype=1/8 device=Mic loc=Rear") > +#define PIN_PATCH_HPMIC_WITH_DETECT(n) \ > + PIN_PATCH_STRING(n, "seq=12 as=3 color=Pink ctype=1/8 device=Mic loc=Rear") > +#define PIN_PATCH_CLFE(n) \ > + PIN_PATCH_STRING(n, "seq=1 as=1 misc=4 color=Black ctype=1/8 loc=Rear") > +#define PIN_PATCH_SURROUND(n) \ > + PIN_PATCH_STRING(n, "seq=2 as=1 misc=4 color=Orange ctype=1/8 loc=Rear") > +#define PIN_PATCH_SUBWOOFER(n) \ > + PIN_PATCH_STRING(n, "seq=1 as=1 misc=1 ctype=ATAPI device=Speaker loc=Onboard conn=Fixed") > +#define PIN_PATCH_DOCK_LINE_OUT(n) \ > + PIN_PATCH_STRING(n, "seq=15 as=3 color=Black ctype=1/8 loc=Ext-Rear") > +#define PIN_PATCH_DOCK_HP(n) \ > + PIN_PATCH_STRING(n, "seq=15 as=3 color=Black ctype=1/8 device=Headphones loc=Ext-Rear") > +#define PIN_PATCH_DOCK_MIC_IN(n) \ > + PIN_PATCH_STRING(n, "as=4 color=Black ctype=1/8 device=Mic loc=Ext-Left") > + > +enum { > + PIN_PATCH_TYPE_EOL, /* end-of-list */ > + PIN_PATCH_TYPE_STRING, > + PIN_PATCH_TYPE_MASK, > + PIN_PATCH_TYPE_OVERRIDE > +}; > + > +struct pin_patch_t { > + nid_t nid; /* nid to patch */ > + int type; /* patch type */ > + union { > + const char *string; /* patch string */ > + uint32_t mask[2]; /* pin config mask */ > + uint32_t override; /* pin config override */ > + } patch; > +}; > + > +struct pin_machine_model_t { > + uint32_t id; /* vendor machine id */ > +}; > + > +struct model_pin_patch_t { > + struct pin_machine_model_t *models; /* list of machine models */ > + struct pin_patch_t *pin_patches; /* hardcoded overrides */ > + void (*fixup_func)(struct hdaa_widget *); /* for future use */ > +}; > + > +struct hdaa_model_pin_patch_t { > + uint32_t id; /* the hdaa id */ > + struct model_pin_patch_t *patches; /* list of machine patches */ > +}; > + > +#endif /* PIN_PATCH_H */ > diff --git a/sys/dev/sound/pci/hda/pin_patch_realtek.h b/sys/dev/sound/pci/hda/pin_patch_realtek.h > new file mode 100644 > index 000000000000..ddaeeaef5345 > --- /dev/null > +++ b/sys/dev/sound/pci/hda/pin_patch_realtek.h > @@ -0,0 +1,992 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2018 Khamba Staring > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef PIN_PATCH_REALTEK_H > +#define PIN_PATCH_REALTEK_H > + > +#include "hdac.h" > +#include "pin_patch.h" > + > +/* > + * Pin patches > + */ > +static struct pin_patch_t pin_patches_lg_lw20[] = { > + { > + .nid = 26, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > + }, { > + .nid = 27, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT } > + }, { } > +}; > + > +static struct pin_patch_t pin_patches_clevo_d900t_asus_m5200[] = { > + { > + .nid = 24, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > + }, { > + .nid = 25, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN } > + }, { > + .nid = 26, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > + }, { > + .nid = 27, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > + }, { > + .nid = 28, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_CD } > + }, { } > +}; > + > +static struct pin_patch_t pin_patches_msi_ms034a[] = { > + { > + .nid = 25, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { > + .nid = 28, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_CD | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { } > +}; > + > +static struct pin_patch_t pin_patches_asus_w6f[] = { > + { > + .nid = 11, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { > + .nid = 12, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { > + .nid = 14, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { > + .nid = 15, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK } > + }, { > + .nid = 16, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { > + .nid = 31, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { > + .nid = 32, > *** 839 LINES SKIPPED *** > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Sun Jul 4 14:05:08 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B5F76659B7; Sun, 4 Jul 2021 14:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHrDh3bmrz59Pw; Sun, 4 Jul 2021 14:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 635241408B; Sun, 4 Jul 2021 14:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 164E58FN096904; Sun, 4 Jul 2021 14:05:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164E581T096903; Sun, 4 Jul 2021 14:05:08 GMT (envelope-from git) Date: Sun, 4 Jul 2021 14:05:08 GMT Message-Id: <202107041405.164E581T096903@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 89c0640c7090 - main - share/misc: Update FreeBSD.org URLs 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/main X-Git-Reftype: branch X-Git-Commit: 89c0640c7090d5dfbe46adbe50186399923f360f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 14:05:08 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=89c0640c7090d5dfbe46adbe50186399923f360f commit 89c0640c7090d5dfbe46adbe50186399923f360f Author: Li-Wen Hsu AuthorDate: 2021-07-04 14:04:33 +0000 Commit: Li-Wen Hsu CommitDate: 2021-07-04 14:04:33 +0000 share/misc: Update FreeBSD.org URLs MFC after: 3 days --- share/misc/iso3166 | 2 +- share/misc/organization.dot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/misc/iso3166 b/share/misc/iso3166 index 1e4cf98df12d..2410a9507ab7 100644 --- a/share/misc/iso3166 +++ b/share/misc/iso3166 @@ -1,6 +1,6 @@ # $FreeBSD$ # -# Please consult with https://www.FreeBSD.org/internal/i18n.html before +# Please consult with https://www.FreeBSD.org/internal/i18n/ before # making changes to this file. # # ISO 3166 country codes diff --git a/share/misc/organization.dot b/share/misc/organization.dot index 33a00452c607..b730b86be5b4 100644 --- a/share/misc/organization.dot +++ b/share/misc/organization.dot @@ -5,7 +5,7 @@ # each other. # For a detailed description of the responsibilities and duties of the listed # teams, please see our Administration page at -# https://www.freebsd.org/administration.html . +# https://www.freebsd.org/administration/ . # # The graphical output can be generated from this file with the following # command: From owner-dev-commits-src-main@freebsd.org Sun Jul 4 14:08:15 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 30621665E0A; Sun, 4 Jul 2021 14:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHrJG6n3dz59NY; Sun, 4 Jul 2021 14:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 D22C113F44; Sun, 4 Jul 2021 14:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 164E8EtK097505; Sun, 4 Jul 2021 14:08:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164E8E7V097504; Sun, 4 Jul 2021 14:08:14 GMT (envelope-from git) Date: Sun, 4 Jul 2021 14:08:14 GMT Message-Id: <202107041408.164E8E7V097504@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 8dfb00245701 - main - man7: Update FreeBSD.org URLs 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/main X-Git-Reftype: branch X-Git-Commit: 8dfb00245701a4f9290cd3a24e9bdcafa55a075b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 14:08:15 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=8dfb00245701a4f9290cd3a24e9bdcafa55a075b commit 8dfb00245701a4f9290cd3a24e9bdcafa55a075b Author: Li-Wen Hsu AuthorDate: 2021-07-04 14:07:23 +0000 Commit: Li-Wen Hsu CommitDate: 2021-07-04 14:07:23 +0000 man7: Update FreeBSD.org URLs MFC after: 3 days --- share/man/man7/ports.7 | 4 ++-- share/man/man7/tests.7 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index 3a62a23d5a13..c6f3d4b8c977 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -127,7 +127,7 @@ in .No \&: .Sm on .Pp -.Lk https://www.FreeBSD.org/doc/en/books/handbook/ports.html +.Lk https://docs.FreeBSD.org/en/books/handbook/ports/ .Pp For information about creating new ports, see .Sm off @@ -135,7 +135,7 @@ For information about creating new ports, see .No \&: .Sm on .Pp -.Lk https://www.FreeBSD.org/doc/en/books/porters-handbook/ +.Lk https://docs.FreeBSD.org/en/books/porters-handbook/ .Sh TARGETS Some of the .Xr make 1 diff --git a/share/man/man7/tests.7 b/share/man/man7/tests.7 index cb75b7f389f5..ab1a3fd1262f 100644 --- a/share/man/man7/tests.7 +++ b/share/man/man7/tests.7 @@ -194,7 +194,7 @@ For more details please refer to: .It .Lk https://lists.freebsd.org/ "FreeBSD Mailing Lists" .It -.Lk https://www.freebsd.org/support.html "Problem Reporting" +.Lk https://www.freebsd.org/support/ "Problem Reporting" .El .Sh FILES .Bl -tag -compact -width "/etc/kyua/kyua.conf" From owner-dev-commits-src-main@freebsd.org Sun Jul 4 14:51:18 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8327E6661DA for ; Sun, 4 Jul 2021 14:51:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHsFy0pV8z3FP2 for ; Sun, 4 Jul 2021 14:51:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x835.google.com with SMTP id w13so10510689qtc.0 for ; Sun, 04 Jul 2021 07:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LAvM9CAV6AG8mmMPIy45BS3au+Ds8mmWJcVL9ZyFqMU=; b=rboE5MJrLFc0hVjV2u+WscTVXutH2J2VpehDJ985e1LLIpIefrxFUnn1fDpVDZAJyk qb0QzPqo20mp2HL7Y+yF7uOYktM1hB6JkP9lN6mbmfFzlVFs/cGqsCu+FdaWLBIZuJ2g miodJB1ulO7Duyie6k2SQ7QSCv0QA1wLebEyihs8TBXEWQycNR+tSTsf8xTa97jBXnPg W6jLk9KCWiXDWZ4NNP/Aqof/jB8RTL+dea+Ls1DIbEA88K5qNFMV+1zwO5t5XKi7jX9c a19UUmDVR9GGhnRj70JFu6FRECU0zGiRNRvdo440Ll3AjPIqTEddcko01c6I8a8G4SG8 i5Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LAvM9CAV6AG8mmMPIy45BS3au+Ds8mmWJcVL9ZyFqMU=; b=J0joC2gtug2iKZqHhusFEOrj2JTg8q93nOsHMgGfNTPGTDKDDOJIoOwfdyu3ka5vN6 D4KqLjZbxFlxAoy5TI4plShmcHsV9X6IME/d8ifQyQ8Epn5Uak7uX8KBF6sNziuviuP8 dSrOiIEhjSSgB6ssUK8Zwgji8HaUOZIDEPZGBZQmT0Q43AtMT46AtsbVm9eCw0OHCjU9 1xTi96aPUxfjj4wsYwHglVLKoOg8g2xJO3Tp3I8q8F6OE3tvTPXTbT9/xarKxCtNVBIx Gu6A9O3QZgiw+mgAxzdQj/srUbrgTMnXWSkK9rFTlaJCkAFYA989F3Axd8NBT+ORViXl eXaA== X-Gm-Message-State: AOAM532X/ChwfZeVXV/4ZRjqm0oY8Vnn1RH79vmvheEtqSbasCW4YjQl q4offV3CUbYqmC4KnfbReON2kRbaV4gkX0Vjfr4bGA== X-Google-Smtp-Source: ABdhPJxqpOSxin5aBoETr9RJuumgAwPQtnQPtzpiiXRLz7Yg6jwzODS/qiAgu3bF0NlAC5WZOmBBhWILzWT8KUqiBpc= X-Received: by 2002:ac8:7d87:: with SMTP id c7mr8448443qtd.49.1625410276881; Sun, 04 Jul 2021 07:51:16 -0700 (PDT) MIME-Version: 1.0 References: <202107030617.1636H22I062745@gitrepo.freebsd.org> <202107041403.164E3i0C021063@gndrsh.dnsmgr.net> In-Reply-To: <202107041403.164E3i0C021063@gndrsh.dnsmgr.net> From: Warner Losh Date: Sun, 4 Jul 2021 08:51:05 -0600 Message-ID: Subject: Re: git: ef790cc7407e - main - hdaa: update pin patch configurations To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4GHsFy0pV8z3FP2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 14:51:18 -0000 On Sun, Jul 4, 2021, 8:03 AM Rodney W. Grimes wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=ef790cc7407e827db9563d08a52a71ab36436986 > > > > commit ef790cc7407e827db9563d08a52a71ab36436986 > > Author: K Staring > > AuthorDate: 2021-07-03 06:15:49 +0000 > > Commit: Warner Losh > > CommitDate: 2021-07-03 06:15:49 +0000 > > > > hdaa: update pin patch configurations > > > > A number of structural changes: > > - Use decimal nid numbers instead of hex > > - updated the branch to incoorporate the suggestions made in the > > ALC280 pull request github thread > > - Convert magic pin values into strings. > > - Also update hdaa_patches to use clearer enums.. > > - made pin patch type enum clearer, add macro for 'string' type > > patches > > - Added pin_patch structures to separate data from logic. > > - Integrated Realtek patches into new structure. > > > > These incorporate fixes for ALC255, ALC256, ALC260, ALC262, ALC268, > > ALC269, ALC280, ALC282, ALC283, ALC286, ALC290, ALC293, ALC296, > ALC2880 > > > > And have definitions for a number of Dell and HP laptops. > > > > Much of this data has been mined fromt he tables in the Linux driver. > > > > imp squashed these into one commit because the changes from the > github > > pull requests no longer cleanly apply individually and made light > style > > changes after feedback from jhb. > > > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/139 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/140 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/141 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/142 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/143 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/144 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/145 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/146 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/147 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/148 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/149 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/150 > > Differential Revision: https://reviews.freebsd.org/D30619 > > Is there any intent to merge this to stable-13/12? The out of box "audio" > experience on many of the "fixed" devices in this as it stands now is > poor, and iirc this fixes many of the issues with "no sound" when using > anything but the builtin speakers. > I'd like to. That said, there was an interesting hiccup when I did my last suspend/resume cycle on my YOGA that might be related. Warner Thanks, > Rod > > --- > > sys/dev/sound/pci/hda/hdaa_patches.c | 259 +++----- > > sys/dev/sound/pci/hda/hdac.h | 145 ++++- > > sys/dev/sound/pci/hda/pin_patch.h | 121 ++++ > > sys/dev/sound/pci/hda/pin_patch_realtek.h | 992 > ++++++++++++++++++++++++++++++ > > 4 files changed, 1327 insertions(+), 190 deletions(-) > > > > diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c > b/sys/dev/sound/pci/hda/hdaa_patches.c > > index 590c9e4d46fb..69299ee4344f 100644 > > --- a/sys/dev/sound/pci/hda/hdaa_patches.c > > +++ b/sys/dev/sound/pci/hda/hdaa_patches.c > > @@ -44,6 +44,9 @@ > > #include > > #include > > > > +#include "pin_patch.h" > > +#include "pin_patch_realtek.h" > > + > > SND_DECLARE_FILE("$FreeBSD$"); > > > > static const struct { > > @@ -145,10 +148,28 @@ static const struct { > > 0 } > > }; > > > > +static struct pin_patch_t * > > +match_pin_patches(int vendor_id, int vendor_subid) > > +{ > > + for (int ci = 0; ci < nitems(realtek_model_pin_patches); ci++) { > > + struct hdaa_model_pin_patch_t *p = > &realtek_model_pin_patches[ci]; > > + if (vendor_id != p->id) > > + continue; > > + for (struct model_pin_patch_t *pp = p->patches; > pp->models; pp++) { > > + for (struct pin_machine_model_t *model = > pp->models; model->id != 0; model++) { > > + if (vendor_subid == model->id) > > + return (pp->pin_patches); > > + } > > + } > > + } > > + > > + return (0); > > +} > > + > > static void > > hdac_pin_patch(struct hdaa_widget *w) > > { > > - const char *patch = NULL; > > + const char *patch_str = NULL; > > uint32_t config, orig, id, subid; > > nid_t nid = w->nid; > > > > @@ -156,54 +177,7 @@ hdac_pin_patch(struct hdaa_widget *w) > > id = hdaa_codec_id(w->devinfo); > > subid = hdaa_card_id(w->devinfo); > > > > - /* XXX: Old patches require complete review. > > - * Now they may create more problem then solve due to > > - * incorrect associations. > > - */ > > - if (id == HDA_CODEC_ALC880 && subid == LG_LW20_SUBVENDOR) { > > - switch (nid) { > > - case 26: > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > > - break; > > - case 27: > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT; > > - break; > > - default: > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC880 && > > - (subid == CLEVO_D900T_SUBVENDOR || > > - subid == ASUS_M5200_SUBVENDOR)) { > > - /* > > - * Super broken BIOS > > - */ > > - switch (nid) { > > - case 24: /* MIC1 */ > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; > > - break; > > - case 25: /* XXX MIC2 */ > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; > > - break; > > - case 26: /* LINE1 */ > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > > - break; > > - case 27: /* XXX LINE2 */ > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > > - break; > > - case 28: /* CD */ > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_CD; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC883 && > > - (subid == MSI_MS034A_SUBVENDOR || > > - HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid))) { > > + if (id == HDA_CODEC_ALC883 && HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, > subid)) { > > switch (nid) { > > case 25: > > config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > @@ -247,42 +221,6 @@ hdac_pin_patch(struct hdaa_widget *w) > > config |= HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE; > > break; > > } > > - } else if (id == HDA_CODEC_ALC861 && subid == > > - ASUS_W6F_SUBVENDOR) { > > - switch (nid) { > > - case 11: > > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); > > - break; > > - case 12: > > - case 14: > > - case 16: > > - case 31: > > - case 32: > > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); > > - break; > > - case 15: > > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC861 && subid == > > - UNIWILL_9075_SUBVENDOR) { > > - switch (nid) { > > - case 15: > > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); > > - break; > > - } > > } > > > > /* New patches */ > > @@ -290,10 +228,10 @@ hdac_pin_patch(struct hdaa_widget *w) > > subid == LENOVO_X300_SUBVENDOR) { > > switch (nid) { > > case 17: /* Headphones with redirection */ > > - patch = "as=1 seq=15"; > > + patch_str = "as=1 seq=15"; > > break; > > case 20: /* Two mics together */ > > - patch = "as=2 seq=15"; > > + patch_str = "as=2 seq=15"; > > break; > > } > > } else if (id == HDA_CODEC_AD1986A && > > @@ -302,60 +240,45 @@ hdac_pin_patch(struct hdaa_widget *w) > > subid == ASUS_P5PL2_SUBVENDOR)) { > > switch (nid) { > > case 26: /* Headphones with redirection */ > > - patch = "as=1 seq=15"; > > + patch_str = "as=1 seq=15"; > > break; > > case 28: /* 5.1 out => 2.0 out + 1 input */ > > - patch = "device=Line-in as=8 seq=1"; > > + patch_str = "device=Line-in as=8 seq=1"; > > break; > > case 29: /* Can't use this as input, as the only available > mic > > * preamplifier is busy by front panel mic (nid > 31). > > * If you want to use this rear connector as mic > input, > > * you have to disable the front panel one. */ > > - patch = "as=0"; > > + patch_str = "as=0"; > > break; > > case 31: /* Lot of inputs configured with as=15 and > unusable */ > > - patch = "as=8 seq=3"; > > + patch_str = "as=8 seq=3"; > > break; > > case 32: > > - patch = "as=8 seq=4"; > > + patch_str = "as=8 seq=4"; > > break; > > case 34: > > - patch = "as=8 seq=5"; > > + patch_str = "as=8 seq=5"; > > break; > > case 36: > > - patch = "as=8 seq=6"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC260 && > > - HDA_DEV_MATCH(SONY_S5_SUBVENDOR, subid)) { > > - switch (nid) { > > - case 16: > > - patch = "seq=15 device=Headphones"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC268) { > > - if (subid == ACER_T5320_SUBVENDOR) { > > - switch (nid) { > > - case 20: /* Headphones Jack */ > > - patch = "as=1 seq=15"; > > + patch_str = "as=8 seq=6"; > > break; > > } > > - } > > } else if (id == HDA_CODEC_CX20561 && > > subid == LENOVO_B450_SUBVENDOR) { > > switch (nid) { > > case 22: > > - patch = "as=1 seq=15"; > > + patch_str = "as=1 seq=15"; > > break; > > } > > } else if (id == HDA_CODEC_CX20561 && > > subid == LENOVO_T400_SUBVENDOR) { > > switch (nid) { > > case 22: > > - patch = "as=1 seq=15"; > > + patch_str = "as=1 seq=15"; > > break; > > case 26: > > - patch = "as=1 seq=0"; > > + patch_str = "as=1 seq=0"; > > break; > > } > > } else if (id == HDA_CODEC_CX20590 && > > @@ -366,102 +289,62 @@ hdac_pin_patch(struct hdaa_widget *w) > > subid == LENOVO_G580_SUBVENDOR)) { > > switch (nid) { > > case 25: > > - patch = "as=1 seq=15"; > > + patch_str = "as=1 seq=15"; > > break; > > /* > > * Group onboard mic and headphone mic > > * together. Fixes onboard mic. > > */ > > case 27: > > - patch = "as=2 seq=15"; > > + patch_str = "as=2 seq=15"; > > break; > > case 35: > > - patch = "as=2"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC269 && > > - (subid == LENOVO_X1CRBN_SUBVENDOR || > > - subid == LENOVO_T430_SUBVENDOR || > > - subid == LENOVO_T430S_SUBVENDOR || > > - subid == LENOVO_T530_SUBVENDOR)) { > > - switch (nid) { > > - case 21: > > - patch = "as=1 seq=15"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC285 && > > - (subid == LENOVO_X120KH_SUBVENDOR || > > - subid == LENOVO_X120QD_SUBVENDOR)) { > > - switch (nid) { > > - case 33: > > - patch = "as=1 seq=15"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC269 && > > - subid == ASUS_UX31A_SUBVENDOR) { > > - switch (nid) { > > - case 33: > > - patch = "as=1 seq=15"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC892 && > > - subid == INTEL_DH87RL_SUBVENDOR) { > > - switch (nid) { > > - case 27: > > - patch = "as=1 seq=15"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC292 && > > - subid == LENOVO_X120BS_SUBVENDOR) { > > - switch (nid) { > > - case 21: > > - patch = "as=1 seq=15"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC295 && subid == > HP_AF006UR_SUBVENDOR) { > > - switch (nid) { > > - case 18: > > - patch = "as=2"; > > - break; > > - case 25: > > - patch = "as=2 seq=15"; > > - break; > > - case 33: > > - patch = "as=1 seq=15"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC298 && > HDA_DEV_MATCH(LENOVO_ALL_SUBVENDOR, subid)) { > > - switch (nid) { > > - case 23: > > - config = 0x03a1103f; > > - break; > > - case 33: > > - config = 0x2121101f; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC298 && subid == > DELL_XPS9560_SUBVENDOR) { > > - switch (nid) { > > - case 24: > > - config = 0x01a1913c; > > - break; > > - case 26: > > - config = 0x01a1913d; > > + patch_str = "as=2"; > > break; > > } > > } else if (id == HDA_CODEC_ALC256 && (subid == > DELL_I7577_SUBVENDOR || > > subid == DELL_L7480_SUBVENDOR)) { > > switch (nid) { > > case 20: > > - patch = "as=1 seq=0"; > > + patch_str = "as=1 seq=0"; > > break; > > case 33: > > - patch = "as=1 seq=15"; > > + patch_str = "as=1 seq=15"; > > break; > > } > > + } else { > > + /* > > + * loop over hdaa_model_pin_patch > > + */ > > + struct pin_patch_t *pin_patches = NULL; > > + > > + pin_patches = match_pin_patches(id, subid); > > + > > + if (pin_patches != NULL) { > > + for (struct pin_patch_t *patch = pin_patches; > patch->type; patch++) { > > + if (nid == patch->nid) { > > + switch (patch->type) { > > + case PIN_PATCH_TYPE_STRING: > > + patch_str = > patch->patch.string; > > + case PIN_PATCH_TYPE_MASK: > > + config &= > ~patch->patch.mask[0]; > > + config |= > patch->patch.mask[1]; > > + break; > > + case PIN_PATCH_TYPE_OVERRIDE: > > + config = > patch->patch.override; > > + break; > > + default: > > + /* should panic hard */ > > + break; > > + } > > + break; > > + } > > + } > > + } > > } > > > > - if (patch != NULL) > > - config = hdaa_widget_pin_patch(config, patch); > > + if (patch_str != NULL) > > + config = hdaa_widget_pin_patch(config, patch_str); > > HDA_BOOTVERBOSE( > > if (config != orig) > > device_printf(w->devinfo->dev, > > diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h > > index 8e427d3412da..611cb98badd8 100644 > > --- a/sys/dev/sound/pci/hda/hdac.h > > +++ b/sys/dev/sound/pci/hda/hdac.h > > @@ -61,6 +61,7 @@ > > #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) > > #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) > > #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) > > +#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) > > #define HDA_INTEL_JLK HDA_MODEL_CONSTRUCT(INTEL, 0x38c8) > > #define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) > > #define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) > > @@ -91,7 +92,16 @@ > > #define HDA_INTEL_CMLKLP HDA_MODEL_CONSTRUCT(INTEL, 0x02c8) > > #define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) > > #define HDA_INTEL_TGLK HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8) > > -#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) > > +#define INTEL_A100ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xa100) > > +#define INTEL_D400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd400) > > +#define INTEL_D401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd401) > > +#define INTEL_D402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd402) > > +#define INTEL_E305ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe305) > > +#define INTEL_E308ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe308) > > +#define INTEL_E224ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe224) > > +#define INTEL_E400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe400) > > +#define INTEL_E401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe401) > > +#define INTEL_E402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe402) > > #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) > > > > /* Nvidia */ > > @@ -198,6 +208,10 @@ > > > > /* HP/Compaq */ > > #define HP_VENDORID 0x103c > > +#define HP_Z200_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x103c) > > +#define HP_225AID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x225a) > > +#define HP_2272ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2272) > > +#define HP_2273ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2273) > > #define HP_V3000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30b5) > > #define HP_NX7400_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a2) > > #define HP_NX6310_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30aa) > > @@ -207,6 +221,7 @@ > > #define HP_DV5000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a5) > > #define HP_DC7700S_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2801) > > #define HP_DC7700_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2802) > > +#define HP_DC5750_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x280a) > > #define HP_AF006UR_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x83a2) > > #define HP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0xffff) > > /* What is wrong with XN 2563 anyway? (Got the picture ?) */ > > @@ -222,7 +237,28 @@ > > #define DELL_L7480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07a0) > > #define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7) > > #define DELL_OPLX745_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01da) > > +#define DELL_05F4ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f4) > > +#define DELL_05F5ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f5) > > +#define DELL_05F6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f6) > > +#define DELL_V5470_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0615) > > +#define DELL_V5470_1_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0616) > > +#define DELL_064AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064a) > > +#define DELL_064BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064b) > > +#define DELL_9020M_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0669) > > +#define DELL_V5480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x069a) > > +#define DELL_06D9ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06d9) > > +#define DELL_06DAID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06da) > > +#define DELL_06DBID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06db) > > +#define DELL_06DDID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06dd) > > +#define DELL_06DEID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06de) > > +#define DELL_06DFID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06df) > > +#define DELL_06E0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06e0) > > +#define DELL_7559_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0706) > > +#define DELL_7000_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0798) > > #define DELL_XPS9560_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07be) > > +#define DELL_E7240_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05ca) > > +#define DELL_164AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164a) > > +#define DELL_164BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164b) > > #define DELL_I7577_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0802) > > #define DELL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0xffff) > > > > @@ -233,34 +269,66 @@ > > > > /* Acer */ > > #define ACER_VENDORID 0x1025 > > +#define ACER_0070ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0070) > > +#define ACER_0077ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0077) > > +#define ACER_0078ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0078) > > +#define ACER_0087ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0087) > > #define ACER_A5050_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x010f) > > #define ACER_A4520_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0127) > > #define ACER_A4710_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x012f) > > #define ACER_A4715_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0133) > > +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) > > #define ACER_3681WXM_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0110) > > #define ACER_T6292_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011b) > > #define ACER_T5320_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011f) > > +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) > > +#define ACER_AC700_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x047c) > > +#define ACER_V5_571G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x072d) > > +#define ACER_AO725_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0740) > > +#define ACER_AO756_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0742) > > +#define ACER_E1_472_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0762) > > +#define ACER_E1_572_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0775) > > +#define ACER_V5_573G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x079b) > > +#define ACER_CB_14_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x106d) > > +#define ACER_V5_122P_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa80d) > > +#define ACER_APFV_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa884) > > +#define ACER_E309ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe309) > > +#define ACER_E310ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe310) > > #define ACER_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xffff) > > > > /* Asus */ > > #define ASUS_VENDORID 0x1043 > > +#define ASUS_X540A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x103e) > > +#define ASUS_X540SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c0) > > +#define ASUS_X556UR_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x11c0) > > +#define ASUS_W5A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c3) > > +#define ASUS_X540LA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10d0) > > #define ASUS_A8X_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1153) > > #define ASUS_U5F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) > > #define ASUS_W6F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) > > +#define ASUS_X541SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12e0) > > +#define ASUS_X541UV_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12f0) > > #define ASUS_A7M_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1323) > > #define ASUS_F3JC_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1338) > > #define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339) > > +#define ASUS_Z550SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13b0) > > #define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2) > > #define ASUS_UX31A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1517) > > +#define ASUS_Z71V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1964) > > #define ASUS_W2J_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1971) > > #define ASUS_M5200_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1993) > > +#define ASUS_G73JW_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a13) > > +#define ASUS_X705UD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a30) > > +#define ASUS_Z550MA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1bbd) > > +#define ASUS_X555UB_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1ccd) > > #define ASUS_P5PL2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x817f) > > #define ASUS_P1AH2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) > > #define ASUS_M2NPVMX_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) > > #define ASUS_M2V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81e7) > > #define ASUS_P5BWD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81ec) > > #define ASUS_M2N_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8234) > > -#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(NVIDIA, 0xcb84) > > +#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xcb84) > > +#define ASUS_X101CH_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8516) > > #define ASUS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xffff) > > > > /* IBM / Lenovo */ > > @@ -287,7 +355,11 @@ > > #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) > > #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) > > #define LENOVO_T530_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6) > > +#define LENOVO_X230_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fa) > > +#define LENOVO_X230T_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2203) > > +#define LENOVO_T431S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2208) > > #define LENOVO_G580_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3977) > > +#define LENOVO_3000_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e) > > #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) > > > > /* Samsung */ > > @@ -307,8 +379,19 @@ > > /* Sony */ > > #define SONY_VENDORID 0x104d > > #define SONY_S5_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81cc) > > +#define SONY_81A0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81a0) > > +#define SONY_81D6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81d6) > > +#define SONY_81BBID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81bb) > > +#define SONY_VAIO_TX_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81e2) > > +#define SONY_VAIO_S13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x9099) > > +#define SONY_VAIO_P11_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b5) > > +#define SONY_VAIO_P13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b6) > > #define SONY_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0xffff) > > > > +/* Tyan? */ > > +#define TYAN_VENDORID 0x10f1 > > +#define TYAN_N6650W_SUBVENDOR HDA_MODEL_CONSTRUCT(TYAN, 0x2915) > > + > > /* > > * Apple Intel MacXXXX seems using Sigmatel codec/vendor id > > * instead of their own, which is beyond my comprehension > > @@ -322,18 +405,32 @@ > > /* LG Electronics */ > > #define LG_VENDORID 0x1854 > > #define LG_LW20_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0018) > > +#define LG_M1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x003b) > > +#define LG_P1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x005f) > > +#define LG_W1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0068) > > +#define LG_LW25_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0077) > > #define LG_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0xffff) > > > > /* Fujitsu Siemens */ > > #define FS_VENDORID 0x1734 > > #define FS_PA1510_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b8) > > #define FS_SI1848_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10cd) > > +#define FS_AMILO_M1437_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x107c) > > +#define FS_AMILO_M1451G_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1094) > > +#define FS_AMILO_PI1556_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b0) > > +#define FS_AMILO_XI1526_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10ac) > > +#define FS_H270_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1147) > > #define FS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0xffff) > > > > /* Fujitsu Limited */ > > #define FL_VENDORID 0x10cf > > #define FL_S7020D_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1326) > > +#define FL_LB_S7110_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1397) > > #define FL_U1010_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x142d) > > +#define FL_1475ID_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1475) > > +#define FL_LB_U904_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1845) > > +#define FL_LB_T731_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x15dc) > > +#define FL_LB_E725_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1757) > > #define FL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0xffff) > > > > /* Toshiba */ > > @@ -346,18 +443,61 @@ > > #define MSI_VENDORID 0x1462 > > #define MSI_MS1034_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x0349) > > #define MSI_MS034A_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x034a) > > +#define MSI_1150ID_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x1150) > > +#define MSI_MS_B120_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xb120) > > #define MSI_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xffff) > > > > /* Giga-Byte Technology */ > > #define GB_VENDORID 0x1458 > > #define GB_G33S2H_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa022) > > +#define GB_K8_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa102) > > +#define GB_BXBT2807_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xfa53) > > #define GP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xffff) > > > > /* Uniwill ? */ > > #define UNIWILL_VENDORID 0x1584 > > #define UNIWILL_9075_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, > 0x9075) > > +#define UNIWILL_9050_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, > 0x9050) > > +#define UNIWILL_9054_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, > 0x9054) > > +#define UNIWILL_9070_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, > 0x9070) > > #define UNIWILL_9080_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, > 0x9080) > > > > +/* Coeus / Elitegroup */ > > +#define COEUS_VENDORID 0x1019 > > +#define COEUS_G610P_SUBVENDOR HDA_MODEL_CONSTRUCT(COEUS, 0x0f69) > > +#define COEUS_A880ID_SUBVENDOR HDA_MODEL_CONSTRUCT(COEUS, 0xa880) > > + > > +/* Arima */ > > +#define ARIMA_VENDORID 0x161f > > +#define ARIMA_W810_SUBVENDOR HDA_MODEL_CONSTRUCT(ARIMA, 0x0f69) > > + > > +/* Shuttle Computer */ > > +#define SHUTTLE_VENDORID 0x1039 > > +#define SHUTTLE_ST20G5_SUBVENDOR HDA_MODEL_CONSTRUCT(SHUTTLE, 0xc790) > > + > > +/* First International Computer */ > > +#define FIC_VENDORID 0x1509 > > +#define FIC_P4M_SUBVENDOR HDA_MODEL_CONSTRUCT(FIC, 0x925d) > > + > > +/* Gateway 2000 */ > > +#define GATEWAY_VENDORID 0x107b > > +#define GATEWAY_3032ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3032) > > +#define GATEWAY_3033ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3033) > > +#define GATEWAY_4039ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x4039) > > + > > +/* Biostar */ > > +#define BIOSTAR_VENDORID 0x1565 > > +#define BIOSTAR_8202ID_SUBVENDOR HDA_MODEL_CONSTRUCT(BIOSTAR, 0x8202) > > + > > +/* EPoX Computer Co., Ltd. */ > > +#define EPOX_VENDORID 0x1695 > > +#define EPOX_400DID_SUBVENDOR HDA_MODEL_CONSTRUCT(EPOX, 0x400d) > > +#define EPOX_EP5LDA_SUBVENDOR HDA_MODEL_CONSTRUCT(EPOX, 0x4012) > > + > > +/* AOpen */ > > +#define AOPEN_VENDORID 0xa0a0 > > +#define AOPEN_I915GMMHFS_SUBVENDOR HDA_MODEL_CONSTRUCT(AOPEN, 0x8202) > > + > > /* All codecs you can eat... */ > > #define HDA_CODEC_CONSTRUCT(vendor, id) \ > > (((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0xffff)) > > @@ -390,6 +530,7 @@ > > #define HDA_CODEC_ALC268 HDA_CODEC_CONSTRUCT(REALTEK, 0x0268) > > #define HDA_CODEC_ALC269 HDA_CODEC_CONSTRUCT(REALTEK, 0x0269) > > #define HDA_CODEC_ALC270 HDA_CODEC_CONSTRUCT(REALTEK, 0x0270) > > +#define HDA_CODEC_ALC271 HDA_CODEC_CONSTRUCT(REALTEK, 0x0271) > > #define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272) > > #define HDA_CODEC_ALC273 HDA_CODEC_CONSTRUCT(REALTEK, 0x0273) > > #define HDA_CODEC_ALC274 HDA_CODEC_CONSTRUCT(REALTEK, 0x0274) > > diff --git a/sys/dev/sound/pci/hda/pin_patch.h > b/sys/dev/sound/pci/hda/pin_patch.h > > new file mode 100644 > > index 000000000000..8e2c9875906f > > --- /dev/null > > +++ b/sys/dev/sound/pci/hda/pin_patch.h > > @@ -0,0 +1,121 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > > + * > > + * Copyright (c) 2018 Khamba Staring > > + * All rights reserved. > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above copyright > > + * notice, this list of conditions and the following disclaimer in > the > > + * documentation and/or other materials provided with the > distribution. > > + * > > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' > AND > > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE > LIABLE > > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > GOODS > > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > STRICT > > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN > ANY WAY > > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY > OF > > + * SUCH DAMAGE. > > + * > > + * $FreeBSD$ > > + */ > > +#ifndef PIN_PATCH_H > > +#define PIN_PATCH_H > > + > > +#include "hdac.h" > > + > > +#define PIN_SUBVENDOR(sv) { .id = sv } > > + > > + > > +#define PIN_PATCH_STRING(n, patchstr) { \ > > + .nid = n, \ > > + .type = PIN_PATCH_TYPE_STRING, \ > > + .patch.string = patchstr \ > > +} > > +#define PIN_OVERRIDE(n, newvalue) { \ > > + .nid = n, \ > > + .type = PIN_PATCH_TYPE_OVERRIDE, \ > > + .patch.override = newvalue \ > > +} > > +#define PIN_PATCH_NOT_APPLICABLE(n) \ > > + PIN_PATCH_STRING(n, "as=15 misc=1 color=Black ctype=1/8 > device=Speaker loc=Rear conn=None") > > +#define PIN_PATCH_HP_OUT(n) \ > > + PIN_PATCH_STRING(n, "seq=15 as=1 color=Green ctype=1/8 > device=Headphones loc=Rear") > > +#define PIN_PATCH_HP(n) \ > > + PIN_PATCH_STRING(n, "seq=15 as=1 misc=1 color=Green ctype=1/8 > device=Headphones loc=Rear") > > +#define PIN_PATCH_SPEAKER(n) \ > > + PIN_PATCH_STRING(n, "as=2 misc=1 ctype=ATAPI loc=Onboard > conn=Fixed") > > +#define PIN_PATCH_BASS_SPEAKER(n) \ > > + PIN_PATCH_STRING(n, "as=3 misc=1 ctype=ATAPI loc=Onboard > conn=Fixed") > > +#define PIN_PATCH_MIC_IN(n) \ > > + PIN_PATCH_STRING(n, "as=5 misc=9 color=Pink ctype=1/8 device=Mic > loc=Rear") > > +#define PIN_PATCH_MIC_INTERNAL(n) \ > > + PIN_PATCH_STRING(n, "as=6 misc=1 ctype=Digital device=Mic > loc=Internal conn=Fixed") > > +#define PIN_PATCH_MIC_FRONT(n) \ > > + PIN_PATCH_STRING(n, "as=4 misc=12 color=Pink ctype=1/8 device=Mic > loc=Front") > > +#define PIN_PATCH_LINE_IN(n) \ > > + PIN_PATCH_STRING(n, "seq=1 as=3 color=Blue ctype=1/8 > device=Line-in loc=Rear") > > +#define PIN_PATCH_LINE_OUT(n) \ > > + PIN_PATCH_STRING(n, "as=1 color=Green ctype=1/8 loc=Rear") > > +#define PIN_PATCH_SPDIF_OUT(n) \ > > + PIN_PATCH_STRING(n, "as=4 misc=1 color=Green ctype=Optical > device=SPDIF-out loc=Rear") > > +#define PIN_PATCH_JACK_WO_DETECT(n) \ > > + PIN_PATCH_STRING(n, "seq=12 as=3 misc=1 color=Pink ctype=1/8 > device=Mic loc=Rear") > > +#define PIN_PATCH_HPMIC_WO_DETECT(n) \ > > + PIN_PATCH_STRING(n, "seq=13 as=3 misc=1 color=Pink ctype=1/8 > device=Mic loc=Rear") > > +#define PIN_PATCH_HPMIC_WITH_DETECT(n) \ > > + PIN_PATCH_STRING(n, "seq=12 as=3 color=Pink ctype=1/8 device=Mic > loc=Rear") > > +#define PIN_PATCH_CLFE(n) \ > > + PIN_PATCH_STRING(n, "seq=1 as=1 misc=4 color=Black ctype=1/8 > loc=Rear") > > +#define PIN_PATCH_SURROUND(n) \ > > + PIN_PATCH_STRING(n, "seq=2 as=1 misc=4 color=Orange ctype=1/8 > loc=Rear") > > +#define PIN_PATCH_SUBWOOFER(n) \ > > + PIN_PATCH_STRING(n, "seq=1 as=1 misc=1 ctype=ATAPI device=Speaker > loc=Onboard conn=Fixed") > > +#define PIN_PATCH_DOCK_LINE_OUT(n) \ > > + PIN_PATCH_STRING(n, "seq=15 as=3 color=Black ctype=1/8 > loc=Ext-Rear") > > +#define PIN_PATCH_DOCK_HP(n) \ > > + PIN_PATCH_STRING(n, "seq=15 as=3 color=Black ctype=1/8 > device=Headphones loc=Ext-Rear") > > +#define PIN_PATCH_DOCK_MIC_IN(n) \ > > + PIN_PATCH_STRING(n, "as=4 color=Black ctype=1/8 device=Mic > loc=Ext-Left") > > + > > +enum { > > + PIN_PATCH_TYPE_EOL, /* end-of-list */ > > + PIN_PATCH_TYPE_STRING, > > + PIN_PATCH_TYPE_MASK, > > + PIN_PATCH_TYPE_OVERRIDE > > +}; > > + > > +struct pin_patch_t { > > + nid_t nid; /* nid to patch */ > > + int type; /* patch type */ > > + union { > > + const char *string; /* patch string */ > > + uint32_t mask[2]; /* pin config mask */ > > + uint32_t override; /* pin config override */ > > + } patch; > > +}; > > + > > +struct pin_machine_model_t { > > + uint32_t id; /* vendor machine id */ > > +}; > > + > > +struct model_pin_patch_t { > > + struct pin_machine_model_t *models; /* list of machine models > */ > > + struct pin_patch_t *pin_patches; /* hardcoded overrides */ > > + void (*fixup_func)(struct hdaa_widget *); /* for future use */ > > +}; > > + > > +struct hdaa_model_pin_patch_t { > > + uint32_t id; /* the hdaa id */ > > + struct model_pin_patch_t *patches; /* list of machine patches > */ > > +}; > > + > > +#endif /* PIN_PATCH_H */ > > diff --git a/sys/dev/sound/pci/hda/pin_patch_realtek.h > b/sys/dev/sound/pci/hda/pin_patch_realtek.h > > new file mode 100644 > > index 000000000000..ddaeeaef5345 > > --- /dev/null > > +++ b/sys/dev/sound/pci/hda/pin_patch_realtek.h > > @@ -0,0 +1,992 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > > + * > > + * Copyright (c) 2018 Khamba Staring > > + * All rights reserved. > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above copyright > > + * notice, this list of conditions and the following disclaimer in > the > > + * documentation and/or other materials provided with the > distribution. > > + * > > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' > AND > > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE > LIABLE > > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > GOODS > > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > STRICT > > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN > ANY WAY > > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY > OF > > + * SUCH DAMAGE. > > + * > > + * $FreeBSD$ > > + */ > > + > > +#ifndef PIN_PATCH_REALTEK_H > > +#define PIN_PATCH_REALTEK_H > > + > > +#include "hdac.h" > > +#include "pin_patch.h" > > + > > +/* > > + * Pin patches > > + */ > > +static struct pin_patch_t pin_patches_lg_lw20[] = { > > + { > > + .nid = 26, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + > HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > > + }, { > > + .nid = 27, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + > HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT } > > + }, { } > > +}; > > + > > +static struct pin_patch_t pin_patches_clevo_d900t_asus_m5200[] = { > > + { > > + .nid = 24, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + > HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > > + }, { > > + .nid = 25, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + > HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN } > > + }, { > > + .nid = 26, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + > HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > > + }, { > > + .nid = 27, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + > HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > > + }, { > > + .nid = 28, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_CD } > > + }, { } > > +}; > > + > > +static struct pin_patch_t pin_patches_msi_ms034a[] = { > > + { > > + .nid = 25, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { > > + .nid = 28, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_CD | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { } > > +}; > > + > > +static struct pin_patch_t pin_patches_asus_w6f[] = { > > + { > > + .nid = 11, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { > > + .nid = 12, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { > > + .nid = 14, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { > > + .nid = 15, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK } > > + }, { > > + .nid = 16, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { > > + .nid = 31, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { > > + .nid = 32, > > *** 839 LINES SKIPPED *** > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-dev-commits-src-main@freebsd.org Sun Jul 4 14:52:42 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC1A06662D8 for ; Sun, 4 Jul 2021 14:52:42 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHsHZ55ySz3FVM for ; Sun, 4 Jul 2021 14:52:42 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f49.google.com with SMTP id i8so5921835wrp.12 for ; Sun, 04 Jul 2021 07:52:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=jMEWZhgXqq/fE30ZhCh8gF5SBcmIvVnq6r7C8LfeN/U=; b=hqbTKZ/bm1N6tVrJjYH5nQronW/8k+RB/EP7HvFzVfUxZlRWhb+UyaWoa8mj1bc8Lr sP6zbRrB6hkVHY48N6iZBd85RGrUEm5WGcxYsVz32QbWJHDz0R64yY2ZTgHTwl4vsF1L RZUi9ZvufM57NQO7VAyajE3oJzNg108/MlDr4YJLXOc8K2nDBpqWcgbHsfo4H7MAgnJW FXW8LV1Omyxw4/6JW3EY0CV8lrBPJLWRRXzlDkxb8474XkamD4sagtfEy1TrHTrmXDHb ySjdKWjm/Mus3mziFE5goh7qjzc/l0UcvEtMJbXZe1jne9ITkGqlaS1RmyPkTOPB1E3z FSlA== X-Gm-Message-State: AOAM533ip0RssZllVjjkGwMR4uUR++8ktTbJ0g2mWf/vfz4TNmp4d1j4 3vBOqtJ3QZ2/gRY2t6nA2jN1vg== X-Google-Smtp-Source: ABdhPJy8zBGxTPF0cQODfONaKLlS3TsgzNqDccMkus1sKJDRYl1egpO5RQy3xOIzPGmqBJg7RSAaNw== X-Received: by 2002:a05:6000:1a8e:: with SMTP id f14mr10644332wry.61.1625410361158; Sun, 04 Jul 2021 07:52:41 -0700 (PDT) Received: from smtpclient.apple (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id w9sm9531347wmc.19.2021.07.04.07.52.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Jul 2021 07:52:40 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: git: ffe6afc4f012 - main - freebsd-tips: Use a fetchable URL as example From: Jessica Clarke In-Reply-To: <202107041401.164E1KXH094610@gitrepo.freebsd.org> Date: Sun, 4 Jul 2021 15:52:40 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <03B758C5-2243-4ACF-9574-D984B283B407@freebsd.org> References: <202107041401.164E1KXH094610@gitrepo.freebsd.org> To: Li-Wen Hsu X-Mailer: Apple Mail (2.3654.100.0.2.22) X-Rspamd-Queue-Id: 4GHsHZ55ySz3FVM X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 14:52:42 -0000 Hi, On 4 Jul 2021, at 15:01, Li-Wen Hsu wrote: >=20 > The branch main has been updated by lwhsu: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dffe6afc4f0121f1909f2fa88694228f7= 71dd3fcb >=20 > commit ffe6afc4f0121f1909f2fa88694228f771dd3fcb > Author: Li-Wen Hsu > AuthorDate: 2021-07-04 14:00:46 +0000 > Commit: Li-Wen Hsu > CommitDate: 2021-07-04 14:00:46 +0000 >=20 > freebsd-tips: Use a fetchable URL as example >=20 > MFC after: 3 days > --- > usr.bin/fortune/datfiles/freebsd-tips | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/usr.bin/fortune/datfiles/freebsd-tips = b/usr.bin/fortune/datfiles/freebsd-tips > index cbbaff9eb84f..c747c689791b 100644 > --- a/usr.bin/fortune/datfiles/freebsd-tips > +++ b/usr.bin/fortune/datfiles/freebsd-tips > @@ -439,7 +439,7 @@ You can use "pkg info" to see a list of packages = you have installed. > % > You can use the 'fetch' command to retrieve files over ftp, http or = https. >=20 > - fetch https://www.FreeBSD.org/index.html > + fetch https://www.FreeBSD.org/images/beastie.png >=20 > will download the front page of the FreeBSD web site. This description no longer matches. Jess From owner-dev-commits-src-main@freebsd.org Sun Jul 4 15:49:02 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E774966716B; Sun, 4 Jul 2021 15:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHtXZ5yP1z3KkN; Sun, 4 Jul 2021 15:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 B4C401565A; Sun, 4 Jul 2021 15:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 164Fn2lt030802; Sun, 4 Jul 2021 15:49:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164Fn2Ga030801; Sun, 4 Jul 2021 15:49:02 GMT (envelope-from git) Date: Sun, 4 Jul 2021 15:49:02 GMT Message-Id: <202107041549.164Fn2Ga030801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 2f4d91f9cb22 - main - libalias: Rewrite HISTORY MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f4d91f9cb22fc65eb65407e8118b433a5d71976 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 15:49:03 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=2f4d91f9cb22fc65eb65407e8118b433a5d71976 commit 2f4d91f9cb22fc65eb65407e8118b433a5d71976 Author: Lutz Donnerhacke AuthorDate: 2021-07-04 15:46:47 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-07-04 15:46:47 +0000 libalias: Rewrite HISTORY Fix the history entry (wrong year) and add the missing recent work. MFC together with the other patches. MFC after: 2 days --- sys/netinet/libalias/HISTORY | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/libalias/HISTORY b/sys/netinet/libalias/HISTORY index 04427be17b39..87d5b6f8ed76 100644 --- a/sys/netinet/libalias/HISTORY +++ b/sys/netinet/libalias/HISTORY @@ -144,6 +144,7 @@ Version 3.2: July, 2000 (Erik Salander, erik@whistle.com and Junichi Satoh, junichi@junichi.org) - Added support for streaming media (RTSP and PNA) aliasing. -Version 3.3: May 2020 (donner) +Version 3.3: May 2021 (donner) - Dropped LibAliasCheckNewLink - - Refactor the database handling, perfomance improvements. + - Refactor the database handling + - Switch to more effienct SPLAY trees From owner-dev-commits-src-main@freebsd.org Sun Jul 4 15:57:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F7B1667225; Sun, 4 Jul 2021 15:57: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHtkB0S9Gz3LfB; Sun, 4 Jul 2021 15:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 EBC11157EA; Sun, 4 Jul 2021 15:57:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 164FvL7D043845; Sun, 4 Jul 2021 15:57:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164FvL3i043844; Sun, 4 Jul 2021 15:57:21 GMT (envelope-from git) Date: Sun, 4 Jul 2021 15:57:21 GMT Message-Id: <202107041557.164FvL3i043844@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 4060e77f49d1 - main - libalias: Remove a stray directive MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4060e77f49d1b9fd2254f3f4da94fd64fce83f72 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 15:57:22 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=4060e77f49d1b9fd2254f3f4da94fd64fce83f72 commit 4060e77f49d1b9fd2254f3f4da94fd64fce83f72 Author: Lutz Donnerhacke AuthorDate: 2021-07-04 15:54:45 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-07-04 15:54:45 +0000 libalias: Remove a stray directive Removal of a preprocessor line was missed during development. Do it now and MFC it together with the other patches. MFC after: 2 days --- sys/netinet/libalias/alias_db.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c index 5b53067705bf..c09ad4352ce4 100644 --- a/sys/netinet/libalias/alias_db.c +++ b/sys/netinet/libalias/alias_db.c @@ -119,7 +119,6 @@ StartPointIn(struct libalias *la, SPLAY_INSERT(splay_in, &la->linkSplayIn, grp); return (grp); } -#undef INGUARD static int SeqDiff(u_long x, u_long y)